use Filament\Actions\Action as ActionsAction;public function changeLineItemGlAccountAction(): ActionsAction { return ActionsAction::make('changeLineItemGlAccount') ->requiresConfirmation() ->modalHeading(__('resources/gl-accounts.change_all_lines')) ->modalDescription(__('resources/gl-accounts.change_all_lines_description')) ->modalCancelActionLabel(__('general.no')) ->modalSubmitActionLabel(__('general.yes')) ->action(function () { $glAccountId = $this->data['gl_account_id']; foreach ($this->data['lineItems'] as &$lineItem) { $lineItem['gl_account_id'] = $glAccountId; } }); }
SESSION_DOMAIN
protected function getFormActions(): array { return [ Actions\CreateAction::make() ->submit('save') ->label('Aanmaken'), Actions\Action::make('cancel') ->label('Annuleren') ->color('gray') ->url($this->getResource()::getUrl('create', ['project' => $this->project->id])), ]; }
->columnSpan(fn (Get $get) => $get('project_id') ? 3 : 4)