- 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.
32 lines
1008 B
PHP
32 lines
1008 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\Master\Users\Pages;
|
|
|
|
use App\Filament\Actions\Cheerful\CreateAction;
|
|
use App\Filament\Resources\Master\Users\UserResource;
|
|
use Filament\Resources\Pages\ManageRecords;
|
|
use Filament\Support\Enums\Width;
|
|
|
|
class ManageUsers extends ManageRecords
|
|
{
|
|
protected static ?string $title = 'Pengguna';
|
|
|
|
protected static string $resource = UserResource::class;
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
CreateAction::make()
|
|
->label('Tambah')
|
|
->modalHeading('Tambah Pengguna')
|
|
->modalSubmitActionLabel('Simpan')
|
|
->modalCancelActionLabel('Batal')
|
|
->extraModalFooterActions(fn (CreateAction $action): array => [
|
|
$action->makeModalSubmitAction('createAnother', arguments: ['another' => true])
|
|
->label('Simpan dan Tambah Lagi'),
|
|
])
|
|
->modalWidth(Width::Large),
|
|
];
|
|
}
|
|
}
|