label('Export PDF') ->icon('heroicon-o-document-arrow-down') ->action(fn (Employee $record, PdfExportService $pdf) => $pdf->employeeProfile($record)); } public static function employeeLeaveSummary(): Action { return Action::make('exportLeavePdf') ->label('Leave Summary PDF') ->icon('heroicon-o-document-text') ->action(fn (Employee $record, PdfExportService $pdf) => $pdf->leaveSummary($record)); } public static function employeeList(): Action { return Action::make('exportPdf') ->label('Export PDF') ->icon('heroicon-o-document-arrow-down') ->action(fn (PdfExportService $pdf) => $pdf->employeeList( Employee::query()->with(['department', 'position', 'shift'])->orderBy('full_name')->get() )); } public static function employeeListBulk(): BulkAction { return BulkAction::make('exportPdf') ->label('Export PDF') ->icon('heroicon-o-document-arrow-down') ->action(fn (Collection $records, PdfExportService $pdf) => $pdf->employeeList( Employee::query() ->with(['department', 'position', 'shift']) ->whereIn('id', $records->pluck('id')) ->orderBy('full_name') ->get() )) ->deselectRecordsAfterCompletion(); } }