29 lines
967 B
PHP
29 lines
967 B
PHP
<?php
|
|
|
|
namespace App\Filament\Actions\Cheerful;
|
|
|
|
use App\Enums\NotifStyle;
|
|
use App\Filament\Support\CheerfulNotification;
|
|
use Filament\Actions\ForceDeleteAction as ActionsForceDeleteAction;
|
|
|
|
class ForceDeleteAction extends ActionsForceDeleteAction
|
|
{
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->modalHeading(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL
|
|
? 'Yakin Hapus Selamanya? 🗑️🔥'
|
|
: 'Hapus Permanen'
|
|
);
|
|
|
|
$this->modalDescription(fn () => CheerfulNotification::getNotifStyle() === NotifStyle::CHEERFUL
|
|
? 'Data ini bakal hilang dari muka bumi sistem dan nggak bisa balik lagi. Hati-hati ya! 😨🙏'
|
|
: 'Tindakan ini tidak dapat dibatalkan. Apakah Anda yakin ingin menghapus data ini secara permanen?'
|
|
);
|
|
|
|
$this->successNotification(fn () => CheerfulNotification::forceDelete()
|
|
);
|
|
}
|
|
}
|