diff --git a/app/Filament/Pages/Dashboard.php b/app/Filament/Pages/Dashboard.php index f99f62e..8690dfe 100644 --- a/app/Filament/Pages/Dashboard.php +++ b/app/Filament/Pages/Dashboard.php @@ -25,6 +25,11 @@ public function getColumns(): int|string|array protected function getHeaderActions(): array { return [ + Actions\Action::make('create') + ->label('New Presentation') + ->url(route('filament.admin.resources.presentations.create')) + ->icon('heroicon-m-plus') + ->button(), Actions\Action::make('Reset Filters') ->color('gray') ->action(function () { diff --git a/app/Filament/Widgets/TopViews.php b/app/Filament/Widgets/TopViews.php index 45a9f0b..0520e44 100644 --- a/app/Filament/Widgets/TopViews.php +++ b/app/Filament/Widgets/TopViews.php @@ -4,7 +4,7 @@ use App\Enums\PresentationFilter; use App\Models\AggregateView; -use Filament\Tables; +use Filament\Tables\Actions\Action; use Filament\Tables\Columns\TextColumn; use Filament\Tables\Table; use Filament\Widgets\Concerns\InteractsWithPageFilters; @@ -78,8 +78,16 @@ public function table(Table $table): Table 'record' => $record->presentation, ]) ) - ->actions([ - Tables\Actions\Action::make('View') + ->emptyStateHeading('No presentations found') + ->emptyStateDescription(null) + ->emptyStateActions([ + Action::make('create') + ->label('Create Presentation') + ->url(route('filament.admin.resources.presentations.create')) + ->icon('heroicon-m-plus') + ->button(), + ])->actions([ + Action::make('View') ->url(function (AggregateView $record): string { if ($record->isInstructions) { return route('home');