Skip to content

Commit

Permalink
fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
atmonshi committed Dec 3, 2023
1 parent 469ec03 commit cb47d6e
Showing 1 changed file with 19 additions and 26 deletions.
45 changes: 19 additions & 26 deletions src/Filament/Resources/FormResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,31 +198,24 @@ public static function getWidgets(): array
public static function getActions(): array
{
$action = [
ActionGroup::make([
ViewAction::make(),
EditAction::make('edit'),

Action::make('entries')
->color('info')
->label(__('Entries'))
->icon('clarity-data-cluster-line')
->tooltip(__('view all entries'))
->url(fn (ZeusForm $record): string => url('admin/responses?form_id=' . $record->id)),

Action::make('prefilledLink')
->label(__('Prefilled Link'))
->icon('heroicon-o-link')
->tooltip(__('Get Prefilled Link'))
->visible(class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class))
->url(fn (ZeusForm $record): string => FormResource::getUrl('prefilled', [$record])),

ReplicateFormAction::make(),

ReplicateFormAction::make(),
DeleteAction::make(),
ForceDeleteAction::make(),
RestoreAction::make(),
]),
ViewAction::make(),
EditAction::make('edit'),
Action::make('entries')
->color('info')
->label(__('Entries'))
->icon('clarity-data-cluster-line')
->tooltip(__('view all entries'))
->url(fn (ZeusForm $record): string => url('admin/responses?form_id=' . $record->id)),
Action::make('prefilledLink')
->label(__('Prefilled Link'))
->icon('heroicon-o-link')
->tooltip(__('Get Prefilled Link'))
->visible(class_exists(\LaraZeus\BoltPro\BoltProServiceProvider::class))
->url(fn (ZeusForm $record): string => FormResource::getUrl('prefilled', [$record])),
ReplicateFormAction::make(),
DeleteAction::make(),
ForceDeleteAction::make(),
RestoreAction::make(),
];

if (class_exists(\LaraZeus\Helen\HelenServiceProvider::class)) {
Expand All @@ -231,6 +224,6 @@ public static function getActions(): array
->distUrl(fn (ZeusForm $record) => route('bolt.form.show', $record));
}

return $action;
return [ActionGroup::make($action)];
}
}

0 comments on commit cb47d6e

Please sign in to comment.