- Introduce `CheerfulNotification` utility class to standardize cheerful and expressive notifications across the application. - Refactor custom "Cheerful" actions (Create, Edit, Delete, etc.) and `DefaultBulkActions` to utilize the new utility class. - Update all `ToggleColumn` status updates in Master Data modules to use `CheerfulNotification::statusUpdated()`. - Replace inline `Notification::make()` calls in custom actions (Reply, Crawl News, Cooperation actions) and Resource Pages with `CheerfulNotification` methods. - Address various lint errors by standardizing the use of the `Auth` facade and improving type hinting for the authenticated `User` model.
38 lines
1003 B
PHP
38 lines
1003 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Monitoring\ContentRecaps\Pages;
|
|
|
|
use App\Filament\Resources\Monitoring\ContentRecaps\ContentRecapResource;
|
|
use App\Filament\Support\CheerfulNotification;
|
|
use Filament\Actions\Action;
|
|
use Filament\Notifications\Notification;
|
|
use Filament\Resources\Pages\CreateRecord;
|
|
|
|
class CreateContentRecap extends CreateRecord
|
|
{
|
|
protected static string $resource = ContentRecapResource::class;
|
|
|
|
protected static ?string $title = 'Tambah Rekap Konten';
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
Action::make('back')
|
|
->label('Kembali')
|
|
->url(ListContentRecaps::getUrl())
|
|
->outlined()
|
|
->color('secondary'),
|
|
];
|
|
}
|
|
|
|
protected function getCreatedNotification(): ?Notification
|
|
{
|
|
return CheerfulNotification::create();
|
|
}
|
|
|
|
protected function getRedirectUrl(): string
|
|
{
|
|
return $this->getResource()::getUrl('index');
|
|
}
|
|
}
|