- Upgrade Filament framework from v3 to v4 - Update all Filament resources and pages for v4 compatibility - Fix test suite to maintain 100% pass rate (321 tests passing) - Add visibility condition for ticket close action (only when not closed) - Update dependencies and build assets for new Filament version - Maintain backward compatibility while leveraging v4 improvements
34 lines
799 B
PHP
34 lines
799 B
PHP
<?php
|
|
|
|
namespace App\Filament\Resources\PlanResource\Pages;
|
|
|
|
use Filament\Actions\DeleteAction;
|
|
use App\Filament\Resources\PlanResource;
|
|
use Filament\Actions;
|
|
use Filament\Notifications\Notification;
|
|
use Filament\Resources\Pages\EditRecord;
|
|
|
|
class EditPlan extends EditRecord
|
|
{
|
|
protected static string $resource = PlanResource::class;
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [
|
|
DeleteAction::make(),
|
|
];
|
|
}
|
|
protected function getRedirectUrl(): ?string
|
|
{
|
|
return $this->getResource()::getUrl('index');
|
|
}
|
|
|
|
protected function getSavedNotification(): ?Notification
|
|
{
|
|
return Notification::make()
|
|
->success()
|
|
->title('Plan updated')
|
|
->body('Plan updated successfully');
|
|
}
|
|
}
|