mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-05 07:52:34 +00:00
tests
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
use App\Actions\StorageProvider\DeleteStorageProvider;
|
||||
use App\Models\StorageProvider;
|
||||
use App\Web\Pages\Settings\StorageProviders\Actions\Edit;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Support\Enums\MaxWidth;
|
||||
use Filament\Tables\Actions\DeleteAction;
|
||||
use Filament\Tables\Actions\EditAction;
|
||||
@ -71,7 +72,14 @@ public function getTable(): Table
|
||||
->modalHeading('Delete Storage Provider')
|
||||
->authorize(fn (StorageProvider $record) => auth()->user()->can('delete', $record))
|
||||
->using(function (array $data, StorageProvider $record) {
|
||||
app(DeleteStorageProvider::class)->delete($record);
|
||||
try {
|
||||
app(DeleteStorageProvider::class)->delete($record);
|
||||
} catch (\Exception $e) {
|
||||
Notification::make()
|
||||
->danger()
|
||||
->title($e->getMessage())
|
||||
->send();
|
||||
}
|
||||
}),
|
||||
]);
|
||||
}
|
||||
|
Reference in New Issue
Block a user