protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
$this->getCancelFormAction(),
Action::make('pending')
->action(function () {
$this->data['status'] = 'pending';
$this->save();
$this->refreshFormData([]);
return;
})
->visible(fn () => $this->record->status == 'pending')
];
}
protected function getFormActions(): array
{
return [
$this->getSaveFormAction(),
$this->getCancelFormAction(),
Action::make('pending')
->action(function () {
$this->data['status'] = 'pending';
$this->save();
$this->refreshFormData([]);
return;
})
->visible(fn () => $this->record->status == 'pending')
];
}