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..73f3cb8 --- /dev/null +++ b/app/Filament/Actions/Cheerful/CreateAction.php @@ -0,0 +1,18 @@ +successNotification( + CheerfulNotification::create() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/DeleteAction.php b/app/Filament/Actions/Cheerful/DeleteAction.php new file mode 100644 index 0000000..18cd7fe --- /dev/null +++ b/app/Filament/Actions/Cheerful/DeleteAction.php @@ -0,0 +1,18 @@ +successNotification( + CheerfulNotification::delete() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/EditAction.php b/app/Filament/Actions/Cheerful/EditAction.php new file mode 100644 index 0000000..1672243 --- /dev/null +++ b/app/Filament/Actions/Cheerful/EditAction.php @@ -0,0 +1,18 @@ +successNotification( + CheerfulNotification::update() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/ForceDeleteAction.php b/app/Filament/Actions/Cheerful/ForceDeleteAction.php new file mode 100644 index 0000000..6690c69 --- /dev/null +++ b/app/Filament/Actions/Cheerful/ForceDeleteAction.php @@ -0,0 +1,18 @@ +successNotification( + CheerfulNotification::forceDelete() + ); + } +} diff --git a/app/Filament/Actions/Cheerful/RestoreAction.php b/app/Filament/Actions/Cheerful/RestoreAction.php new file mode 100644 index 0000000..de03fc9 --- /dev/null +++ b/app/Filament/Actions/Cheerful/RestoreAction.php @@ -0,0 +1,18 @@ +successNotification( + CheerfulNotification::restore() + ); + } +} diff --git a/app/Filament/Actions/DefaultBulkActions.php b/app/Filament/Actions/DefaultBulkActions.php new file mode 100644 index 0000000..eda71ec --- /dev/null +++ b/app/Filament/Actions/DefaultBulkActions.php @@ -0,0 +1,34 @@ +modalHeading("Hapus {$entity} yang dipilih") + ->successNotification( + CheerfulNotification::bulkDelete() + ), + + ForceDeleteBulkAction::make() + ->modalHeading("Hapus {$entity} yang dipilih") + ->successNotification( + CheerfulNotification::bulkForceDelete() + ), + + RestoreBulkAction::make() + ->modalHeading("Pulihkan {$entity} yang dipilih") + ->successNotification( + CheerfulNotification::bulkRestore() + ), + ]; + } +} diff --git a/app/Filament/Columns/TimestampColumns.php b/app/Filament/Columns/TimestampColumns.php new file mode 100644 index 0000000..0db19f9 --- /dev/null +++ b/app/Filament/Columns/TimestampColumns.php @@ -0,0 +1,34 @@ +label('Dibuat') + ->sortable() + ->toggleable(isToggledHiddenByDefault: true) + ->dateTime('l, d F Y H:i:s') + ->wrap(), + + TextColumn::make('updated_at') + ->label('Diperbarui') + ->sortable() + ->toggleable(isToggledHiddenByDefault: true) + ->dateTime('l, d F Y H:i:s') + ->wrap(), + + TextColumn::make('deleted_at') + ->label('Dihapus') + ->sortable() + ->toggleable(isToggledHiddenByDefault: true) + ->dateTime('l, d F Y H:i:s') + ->wrap(), + ]; + } +} diff --git a/app/Filament/Pages/Auth/Login.php b/app/Filament/Pages/Auth/Login.php index cfee65b..ccf1c8b 100644 --- a/app/Filament/Pages/Auth/Login.php +++ b/app/Filament/Pages/Auth/Login.php @@ -136,7 +136,7 @@ public function authenticate(): ?LoginResponse CheerfulNotification::success( 'Hore! Berhasil Masuk 🎉', - 'Selamat datang kembali, ' . $user->name . '! Siap untuk beraksi hari ini? 🚀✨' + 'Selamat datang kembali, '.$user->name.'! Siap untuk beraksi hari ini? 🚀✨' )->send(); return app(LoginResponse::class);