mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 14:36:17 +00:00
fixing routes
This commit is contained in:
@ -38,7 +38,7 @@ public function getWidgets(): array
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
CreateAction::make()
|
||||
CreateAction::make('create')
|
||||
->label('Create User')
|
||||
->icon('heroicon-o-plus')
|
||||
->authorize('create', User::class)
|
||||
|
@ -87,13 +87,6 @@ public function getTable(): Table
|
||||
->label('Projects')
|
||||
->icon('heroicon-o-rectangle-stack')
|
||||
->authorize(fn ($record) => auth()->user()->can('update', $record))
|
||||
->action(function ($record, array $data) {
|
||||
app(UpdateProjects::class)->update($record, $data);
|
||||
Notification::make()
|
||||
->title('Projects Updated')
|
||||
->success()
|
||||
->send();
|
||||
})
|
||||
->form(function (Form $form, $record) {
|
||||
return $form
|
||||
->schema([
|
||||
@ -105,10 +98,17 @@ public function getTable(): Table
|
||||
])
|
||||
->columns(1);
|
||||
})
|
||||
->action(function ($record, array $data) {
|
||||
app(UpdateProjects::class)->update($record, $data);
|
||||
Notification::make()
|
||||
->title('Projects Updated')
|
||||
->success()
|
||||
->send();
|
||||
})
|
||||
->modalSubmitActionLabel('Save')
|
||||
->modalWidth(MaxWidth::Large),
|
||||
DeleteAction::make()
|
||||
->authorize(fn ($record) => auth()->user()->can('delete', $record)),
|
||||
DeleteAction::make('delete')
|
||||
->authorize(fn (User $record) => auth()->user()->can('delete', $record)),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user