simedkom/app/Filament/Resources/Monitoring/ContentRecaps/Pages/EditContentRecap.php
Yoga Pangestu 2983cd243f refactor: centralize cheerful notifications and cleanup auth calls
- 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.
2026-01-14 09:54:46 +07:00

37 lines
1019 B
PHP

<?php
namespace App\Filament\Resources\Monitoring\ContentRecaps\Pages;
use App\Filament\Resources\Monitoring\ContentRecaps\ContentRecapResource;
use App\Filament\Resources\Monitoring\MediaMonitorings\Pages\ListMediaMonitorings;
use App\Filament\Support\CheerfulNotification;
use Filament\Actions\Action;
use Filament\Notifications\Notification;
use Filament\Resources\Pages\EditRecord;
class EditContentRecap extends EditRecord
{
protected static string $resource = ContentRecapResource::class;
protected function getHeaderActions(): array
{
return [
Action::make('back')
->label('Kembali')
->url(ListMediaMonitorings::getUrl())
->outlined()
->color('secondary'),
];
}
protected function getSavedNotification(): ?Notification
{
return CheerfulNotification::update();
}
protected function getRedirectUrl(): string
{
return $this->getResource()::getUrl('index');
}
}