Move save buttons to the top.

This commit is contained in:
notCharles 2024-05-13 19:58:01 -04:00
parent 68195ab0b7
commit 35ac1f863a
5 changed files with 21 additions and 5 deletions

View File

@ -206,9 +206,15 @@ class EditEgg extends EditRecord
->color('primary')
// TODO uses old admin panel export service
->url(fn (Egg $egg): string => route('admin.eggs.export', ['egg' => $egg['id']])),
$this->getSaveFormAction()->formId('form'),
];
}
protected function getFormActions(): array
{
return [];
}
public function getRelationManagers(): array
{
return [

View File

@ -2,7 +2,6 @@
namespace App\Filament\Resources\EggResource\RelationManagers;
use App\Filament\Resources\EggResource;
use App\Models\Server;
use Filament\Resources\RelationManagers\RelationManager;
use Filament\Tables;

View File

@ -98,6 +98,12 @@ class EditMount extends EditRecord
{
return [
Actions\DeleteAction::make(),
$this->getSaveFormAction()->formId('form'),
];
}
protected function getFormActions(): array
{
return [];
}
}

View File

@ -191,18 +191,17 @@ class EditNode extends EditRecord
return $data;
}
protected function getSteps(): array
protected function getFormActions(): array
{
return [
];
return [];
}
protected function getHeaderActions(): array
{
return [
Actions\DeleteAction::make()
->disabled(fn (Node $node) => $node->servers()->count() > 0)
->label(fn (Node $node) => $node->servers()->count() > 0 ? 'Node Has Servers' : 'Delete'),
$this->getSaveFormAction()->formId('form'),
];
}

View File

@ -67,6 +67,12 @@ class EditUser extends EditRecord
{
return [
Actions\DeleteAction::make(),
$this->getSaveFormAction()->formId('form'),
];
}
protected function getFormActions(): array
{
return [];
}
}