return Actions\EditAction::make()
->modalHeading(__('Edit shift'))
->form(ScheduleResource::getFormSchema())
->modalSubmitActionLabel(__('Edit only this shift'))
->extraModalFooterActions([
Action::make('editAll')
->label(__('Edit all future shifts'))
->requiresConfirmation()
->action(function (Schedule $record, array $data) {
dd($data);
// returns null :(
})
,
Action::make('delete')
->hiddenLabel()
->icon('heroicon-s-trash')
->color('danger')
->requiresConfirmation()
->tooltip(__('Delete this shift'))
->cancelParentActions()
->action(function (Schedule $record) {
$record->delete();
$this->refreshRecords();
}),
return Actions\EditAction::make()
->modalHeading(__('Edit shift'))
->form(ScheduleResource::getFormSchema())
->modalSubmitActionLabel(__('Edit only this shift'))
->extraModalFooterActions([
Action::make('editAll')
->label(__('Edit all future shifts'))
->requiresConfirmation()
->action(function (Schedule $record, array $data) {
dd($data);
// returns null :(
})
,
Action::make('delete')
->hiddenLabel()
->icon('heroicon-s-trash')
->color('danger')
->requiresConfirmation()
->tooltip(__('Delete this shift'))
->cancelParentActions()
->action(function (Schedule $record) {
$record->delete();
$this->refreshRecords();
}),