diff --git a/app/Filament/Actions/BackAction.php b/app/Filament/Actions/BackAction.php new file mode 100644 index 0000000..a483718 --- /dev/null +++ b/app/Filament/Actions/BackAction.php @@ -0,0 +1,22 @@ +label('Kembali') + ->color('secondary') + ->outlined(); + } +} diff --git a/app/Filament/Actions/Cheerful/CreateAction.php b/app/Filament/Actions/Cheerful/CreateAction.php new file mode 100644 index 0000000..2bd97fc --- /dev/null +++ b/app/Filament/Actions/Cheerful/CreateAction.php @@ -0,0 +1,18 @@ +successNotification( + SystemNotification::create() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/DeleteAction.php b/app/Filament/Actions/Cheerful/DeleteAction.php new file mode 100644 index 0000000..94dd337 --- /dev/null +++ b/app/Filament/Actions/Cheerful/DeleteAction.php @@ -0,0 +1,18 @@ +successNotification( + SystemNotification::delete() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/EditAction.php b/app/Filament/Actions/Cheerful/EditAction.php new file mode 100644 index 0000000..9f622d5 --- /dev/null +++ b/app/Filament/Actions/Cheerful/EditAction.php @@ -0,0 +1,18 @@ +successNotification( + SystemNotification::update() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/ForceDeleteAction.php b/app/Filament/Actions/Cheerful/ForceDeleteAction.php new file mode 100644 index 0000000..81c8ffc --- /dev/null +++ b/app/Filament/Actions/Cheerful/ForceDeleteAction.php @@ -0,0 +1,18 @@ +successNotification( + SystemNotification::forceDelete() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/RestoreAction.php b/app/Filament/Actions/Cheerful/RestoreAction.php new file mode 100644 index 0000000..9205e5c --- /dev/null +++ b/app/Filament/Actions/Cheerful/RestoreAction.php @@ -0,0 +1,18 @@ +successNotification( + SystemNotification::restore() + ); + } +} diff --git a/app/Filament/Actions/DefaultBulkActions.php b/app/Filament/Actions/DefaultBulkActions.php new file mode 100644 index 0000000..ddfa462 --- /dev/null +++ b/app/Filament/Actions/DefaultBulkActions.php @@ -0,0 +1,34 @@ +modalHeading("Hapus {$entity} yang dipilih") + ->successNotification( + SystemNotification::bulkDelete() + ), + + ForceDeleteBulkAction::make() + ->modalHeading("Hapus {$entity} yang dipilih") + ->successNotification( + SystemNotification::bulkForceDelete() + ), + + RestoreBulkAction::make() + ->modalHeading("Pulihkan {$entity} yang dipilih") + ->successNotification( + SystemNotification::bulkRestore() + ), + ]; + } +} diff --git a/app/Filament/Actions/GoToDateAction.php b/app/Filament/Actions/GoToDateAction.php new file mode 100644 index 0000000..bdd8eff --- /dev/null +++ b/app/Filament/Actions/GoToDateAction.php @@ -0,0 +1,35 @@ +label('Lompat ke Tanggal') + ->icon('heroicon-o-calendar-days') + ->schema([ + DatePicker::make('date') + ->label('Pilih Tanggal') + ->placeholder(fn () => now()->addMonth(10)->format('l, d F Y')) + ->required() + ->native(false) + ->displayFormat('l, d F Y'), + ]) + ->action(function (array $data, $livewire) { + $livewire->setOption('date', $data['date']); + }) + ->modalWidth(Width::Large); + } +}