base commit
This commit is contained in:
47
app/Filament/Resources/Employees/Pages/ViewEmployee.php
Normal file
47
app/Filament/Resources/Employees/Pages/ViewEmployee.php
Normal file
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Employees\Pages;
|
||||
|
||||
use App\Filament\Resources\Employees\EmployeeResource;
|
||||
use App\Filament\Resources\Employees\Widgets\EmployeeStatsWidget;
|
||||
use App\Filament\Support\ExportPdfAction;
|
||||
use Filament\Actions\EditAction;
|
||||
use Filament\Resources\Pages\ViewRecord;
|
||||
|
||||
class ViewEmployee extends ViewRecord
|
||||
{
|
||||
protected static string $resource = EmployeeResource::class;
|
||||
|
||||
protected function getHeaderActions(): array
|
||||
{
|
||||
return [
|
||||
ExportPdfAction::employeeProfile(),
|
||||
ExportPdfAction::employeeLeaveSummary(),
|
||||
EditAction::make(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array<class-string>
|
||||
*/
|
||||
protected function getHeaderWidgets(): array
|
||||
{
|
||||
return [
|
||||
EmployeeStatsWidget::class,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int | array<string, ?int>
|
||||
*/
|
||||
public function getHeaderWidgetsColumns(): int | array
|
||||
{
|
||||
return [
|
||||
'default' => 1,
|
||||
'sm' => 2,
|
||||
'xl' => 4,
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user