translate base
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\ActivityLogs;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\ActivityLogs\Pages\ListActivityLogs;
|
||||
use App\Filament\Resources\ActivityLogs\Pages\ViewActivityLog;
|
||||
use App\Filament\Resources\ActivityLogs\Schemas\ActivityLogInfolist;
|
||||
@@ -22,18 +23,27 @@ class ActivityLogResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedClipboardDocumentList;
|
||||
|
||||
protected static string|UnitEnum|null $navigationGroup = 'System';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::System;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
protected static ?string $navigationLabel = 'Audit Log';
|
||||
|
||||
protected static ?string $modelLabel = 'Activity Log';
|
||||
|
||||
protected static ?string $pluralModelLabel = 'Activity Logs';
|
||||
|
||||
protected static ?string $slug = 'activity-logs';
|
||||
|
||||
public static function getNavigationLabel(): string
|
||||
{
|
||||
return __('hr.resources.audit_log');
|
||||
}
|
||||
|
||||
public static function getModelLabel(): string
|
||||
{
|
||||
return __('hr.resources.activity_log');
|
||||
}
|
||||
|
||||
public static function getPluralModelLabel(): string
|
||||
{
|
||||
return __('hr.resources.activity_logs');
|
||||
}
|
||||
|
||||
public static function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema;
|
||||
|
||||
@@ -15,28 +15,28 @@ class ActivityLogInfolist
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Section::make('Activity Details')
|
||||
Section::make(__('hr.sections.activity_details'))
|
||||
->schema([
|
||||
TextEntry::make('created_at')
|
||||
->label('Date')
|
||||
->label(__('hr.fields.date'))
|
||||
->dateTime(),
|
||||
TextEntry::make('description'),
|
||||
TextEntry::make('event')
|
||||
->badge(),
|
||||
TextEntry::make('log_name')
|
||||
->label('Log Name'),
|
||||
->label(__('hr.fields.log_name')),
|
||||
TextEntry::make('subject_type')
|
||||
->label('Subject Type')
|
||||
->label(__('hr.fields.subject_type'))
|
||||
->formatStateUsing(fn (?string $state): string => $state ? class_basename($state) : '—'),
|
||||
TextEntry::make('subject_id')
|
||||
->label('Subject ID'),
|
||||
->label(__('hr.fields.subject_id')),
|
||||
TextEntry::make('causer.name')
|
||||
->label('Causer'),
|
||||
->label(__('hr.fields.causer')),
|
||||
KeyValueEntry::make('properties.attributes')
|
||||
->label('Changes')
|
||||
->label(__('hr.fields.changes'))
|
||||
->visible(fn ($record): bool => filled($record->properties['attributes'] ?? null)),
|
||||
KeyValueEntry::make('properties.old')
|
||||
->label('Previous Values')
|
||||
->label(__('hr.fields.previous_values'))
|
||||
->visible(fn ($record): bool => filled($record->properties['old'] ?? null)),
|
||||
])
|
||||
->columns(2),
|
||||
|
||||
@@ -25,7 +25,7 @@ class ActivityLogsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('created_at')
|
||||
->label('Date')
|
||||
->label(__('hr.fields.date'))
|
||||
->dateTime()
|
||||
->sortable(),
|
||||
TextColumn::make('description')
|
||||
@@ -36,15 +36,15 @@ class ActivityLogsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('subject_type')
|
||||
->label('Subject Type')
|
||||
->label(__('hr.fields.subject_type'))
|
||||
->formatStateUsing(fn (?string $state): string => $state ? class_basename($state) : '—')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('subject_id')
|
||||
->label('Subject ID')
|
||||
->label(__('hr.fields.subject_id'))
|
||||
->sortable(),
|
||||
TextColumn::make('causer.name')
|
||||
->label('Causer')
|
||||
->label(__('hr.fields.causer'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('log_name')
|
||||
@@ -53,14 +53,14 @@ class ActivityLogsTable
|
||||
->defaultSort('created_at', 'desc')
|
||||
->filters([
|
||||
SelectFilter::make('subject_type')
|
||||
->label('Subject Type')
|
||||
->label(__('hr.fields.subject_type'))
|
||||
->options([
|
||||
Employee::class => 'Employee',
|
||||
Vacation::class => 'Vacation',
|
||||
Bonus::class => 'Bonus',
|
||||
DisciplinaryReport::class => 'Disciplinary Report',
|
||||
Department::class => 'Department',
|
||||
User::class => 'User',
|
||||
Employee::class => __('hr.audit.employee'),
|
||||
Vacation::class => __('hr.audit.vacation'),
|
||||
Bonus::class => __('hr.audit.bonus'),
|
||||
DisciplinaryReport::class => __('hr.audit.disciplinary_report'),
|
||||
Department::class => __('hr.audit.department'),
|
||||
User::class => __('hr.audit.user'),
|
||||
]),
|
||||
SelectFilter::make('event')
|
||||
->options(fn (): array => \Spatie\Activitylog\Models\Activity::query()
|
||||
@@ -69,16 +69,16 @@ class ActivityLogsTable
|
||||
->pluck('event', 'event')
|
||||
->all()),
|
||||
SelectFilter::make('causer')
|
||||
->label('Causer')
|
||||
->label(__('hr.fields.causer'))
|
||||
->relationship('causer', 'name')
|
||||
->searchable()
|
||||
->preload(),
|
||||
Filter::make('created_at')
|
||||
->schema([
|
||||
DatePicker::make('from')
|
||||
->label('From'),
|
||||
->label(__('hr.fields.from')),
|
||||
DatePicker::make('until')
|
||||
->label('Until'),
|
||||
->label(__('hr.fields.until')),
|
||||
])
|
||||
->query(function (Builder $query, array $data): Builder {
|
||||
return $query
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Bonuses;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Bonuses\Pages\CreateBonus;
|
||||
use App\Filament\Resources\Bonuses\Pages\EditBonus;
|
||||
use App\Filament\Resources\Bonuses\Pages\ListBonuses;
|
||||
@@ -27,7 +28,7 @@ class BonusResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCurrencyDollar;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ class BonusInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('bonus_date')
|
||||
->date(),
|
||||
TextEntry::make('bonus_type')
|
||||
|
||||
@@ -22,14 +22,14 @@ class BonusesTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_date')
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->badge()
|
||||
->color(fn (BonusType $state): string => $state->color())
|
||||
->formatStateUsing(fn (BonusType $state): string => $state->label())
|
||||
@@ -56,7 +56,7 @@ class BonusesTable
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('bonus_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->options(BonusType::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Departments;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Departments\Pages\CreateDepartment;
|
||||
use App\Filament\Resources\Departments\Pages\EditDepartment;
|
||||
use App\Filament\Resources\Departments\Pages\ListDepartments;
|
||||
@@ -27,7 +28,7 @@ class DepartmentResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedBuildingOffice2;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Organization';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Organization;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ class DepartmentForm
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
Toggle::make('is_active')
|
||||
->label('Active')
|
||||
->label(__('hr.fields.active'))
|
||||
->default(true)
|
||||
->required(),
|
||||
]);
|
||||
|
||||
@@ -29,9 +29,9 @@ class DepartmentsTable
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
TextColumn::make('is_active')
|
||||
->label('Status')
|
||||
->label(__('hr.fields.status'))
|
||||
->badge()
|
||||
->formatStateUsing(fn (bool $state): string => $state ? 'Active' : 'Inactive')
|
||||
->formatStateUsing(fn (bool $state): string => $state ? __('enums.employment_status.active') : __('enums.employment_status.inactive'))
|
||||
->color(fn (bool $state): string => $state ? 'success' : 'danger')
|
||||
->sortable(),
|
||||
TextColumn::make('created_at')
|
||||
@@ -49,10 +49,10 @@ class DepartmentsTable
|
||||
])
|
||||
->filters([
|
||||
TernaryFilter::make('is_active')
|
||||
->label('Status')
|
||||
->placeholder('All departments')
|
||||
->trueLabel('Active')
|
||||
->falseLabel('Inactive'),
|
||||
->label(__('hr.fields.status'))
|
||||
->placeholder(__('hr.filters.all_departments'))
|
||||
->trueLabel(__('enums.employment_status.active'))
|
||||
->falseLabel(__('enums.employment_status.inactive')),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\DisciplinaryReports;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\CreateDisciplinaryReport;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\EditDisciplinaryReport;
|
||||
use App\Filament\Resources\DisciplinaryReports\Pages\ListDisciplinaryReports;
|
||||
@@ -27,7 +28,7 @@ class DisciplinaryReportResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedExclamationTriangle;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class DisciplinaryReportForm
|
||||
->required()
|
||||
->native(false),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
|
||||
@@ -13,7 +13,7 @@ class DisciplinaryReportInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('report_date')
|
||||
->date(),
|
||||
TextEntry::make('title'),
|
||||
|
||||
@@ -23,7 +23,7 @@ class DisciplinaryReportsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('report_date')
|
||||
@@ -39,12 +39,12 @@ class DisciplinaryReportsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
IconColumn::make('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-paper-clip')
|
||||
->falseIcon('heroicon-o-minus'),
|
||||
TextColumn::make('creator.name')
|
||||
->label('Created By')
|
||||
->label(__('hr.fields.created_by'))
|
||||
->sortable()
|
||||
->toggleable(),
|
||||
TextColumn::make('created_at')
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\EmployeeDocuments;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\CreateEmployeeDocument;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\EditEmployeeDocument;
|
||||
use App\Filament\Resources\EmployeeDocuments\Pages\ListEmployeeDocuments;
|
||||
@@ -27,7 +28,7 @@ class EmployeeDocumentResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDocument;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 5;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ class EmployeeDocumentForm
|
||||
->required()
|
||||
->maxLength(255),
|
||||
HrForm::fileUpload('file_path')
|
||||
->label('Document')
|
||||
->label(__('hr.fields.document'))
|
||||
->required()
|
||||
->acceptedFileTypes(['application/pdf', 'image/*', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'])
|
||||
->maxSize(15360),
|
||||
|
||||
@@ -13,7 +13,7 @@ class EmployeeDocumentInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('document_type')
|
||||
->badge(),
|
||||
TextEntry::make('title'),
|
||||
|
||||
@@ -24,11 +24,11 @@ class EmployeeDocumentsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->badge()
|
||||
->color(fn (DocumentType $state): string => $state->color())
|
||||
->formatStateUsing(fn (DocumentType $state): string => $state->label())
|
||||
@@ -56,13 +56,13 @@ class EmployeeDocumentsTable
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->options(DocumentType::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('download')
|
||||
->label('Download')
|
||||
->label(__('hr.actions.download'))
|
||||
->icon('heroicon-o-arrow-down-tray')
|
||||
->visible(fn (EmployeeDocument $record): bool => filled($record->file_path))
|
||||
->action(function (EmployeeDocument $record) {
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Employees;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Employees\Pages\CreateEmployee;
|
||||
use App\Filament\Resources\Employees\Pages\EditEmployee;
|
||||
use App\Filament\Resources\Employees\Pages\ListEmployees;
|
||||
@@ -36,7 +37,7 @@ class EmployeeResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedUsers;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Employees';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Employees;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
@@ -80,9 +81,9 @@ class EmployeeResource extends Resource
|
||||
{
|
||||
/** @var Employee $record */
|
||||
return [
|
||||
'Employee #' => $record->employee_number,
|
||||
'Department' => $record->department?->name ?? '—',
|
||||
'Position' => $record->position?->name ?? '—',
|
||||
__('hr.fields.employee_number') => $record->employee_number,
|
||||
__('hr.fields.department') => $record->department?->name ?? '—',
|
||||
__('hr.fields.position') => $record->position?->name ?? '—',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -27,7 +27,10 @@ class BonusesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'bonuses';
|
||||
|
||||
protected static ?string $title = 'Bonuses';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.bonuses");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -61,7 +64,7 @@ class BonusesRelationManager extends RelationManager
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->badge()
|
||||
->color(fn (BonusType $state): string => $state->color())
|
||||
->formatStateUsing(fn (BonusType $state): string => $state->label())
|
||||
@@ -75,7 +78,7 @@ class BonusesRelationManager extends RelationManager
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('bonus_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->options(BonusType::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
|
||||
@@ -29,7 +29,10 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'disciplinaryReports';
|
||||
|
||||
protected static ?string $title = 'Disciplinary Reports';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.disciplinary_reports");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -50,7 +53,7 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
->required()
|
||||
->native(false),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
@@ -73,12 +76,12 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
->formatStateUsing(fn (DisciplinarySeverity $state): string => $state->label())
|
||||
->sortable(),
|
||||
IconColumn::make('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-paper-clip')
|
||||
->falseIcon('heroicon-o-minus'),
|
||||
TextColumn::make('creator.name')
|
||||
->label('Created By')
|
||||
->label(__('hr.fields.created_by'))
|
||||
->toggleable(),
|
||||
])
|
||||
->filters([
|
||||
|
||||
@@ -29,7 +29,10 @@ class DocumentsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'documents';
|
||||
|
||||
protected static ?string $title = 'Employee Documents';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.employee_documents");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -43,7 +46,7 @@ class DocumentsRelationManager extends RelationManager
|
||||
->required()
|
||||
->maxLength(255),
|
||||
HrForm::fileUpload('file_path')
|
||||
->label('Document')
|
||||
->label(__('hr.fields.document'))
|
||||
->required()
|
||||
->acceptedFileTypes(['application/pdf', 'image/*', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'])
|
||||
->maxSize(15360),
|
||||
@@ -56,7 +59,7 @@ class DocumentsRelationManager extends RelationManager
|
||||
->recordTitleAttribute('title')
|
||||
->columns([
|
||||
TextColumn::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->badge()
|
||||
->color(fn (DocumentType $state): string => $state->color())
|
||||
->formatStateUsing(fn (DocumentType $state): string => $state->label())
|
||||
@@ -71,7 +74,7 @@ class DocumentsRelationManager extends RelationManager
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('document_type')
|
||||
->label('Type')
|
||||
->label(__('hr.fields.type'))
|
||||
->options(DocumentType::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
@@ -80,7 +83,7 @@ class DocumentsRelationManager extends RelationManager
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('download')
|
||||
->label('Download')
|
||||
->label(__('hr.actions.download'))
|
||||
->icon('heroicon-o-arrow-down-tray')
|
||||
->visible(fn (EmployeeDocument $record): bool => filled($record->file_path))
|
||||
->action(function (EmployeeDocument $record) {
|
||||
|
||||
@@ -26,7 +26,10 @@ class ExplanationsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'explanations';
|
||||
|
||||
protected static ?string $title = 'Explanations';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.explanations");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -43,7 +46,7 @@ class ExplanationsRelationManager extends RelationManager
|
||||
->rows(4)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
@@ -64,7 +67,7 @@ class ExplanationsRelationManager extends RelationManager
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
IconColumn::make('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-paper-clip')
|
||||
->falseIcon('heroicon-o-minus'),
|
||||
|
||||
@@ -24,7 +24,10 @@ class GiftsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'gifts';
|
||||
|
||||
protected static ?string $title = 'Gifts';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.gifts");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -34,7 +37,7 @@ class GiftsRelationManager extends RelationManager
|
||||
->required()
|
||||
->default(now()),
|
||||
TextInput::make('gift_name')
|
||||
->label('Gift Name')
|
||||
->label(__('hr.fields.gift_name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('value')
|
||||
@@ -59,7 +62,7 @@ class GiftsRelationManager extends RelationManager
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('gift_name')
|
||||
->label('Gift')
|
||||
->label(__('hr.fields.gift'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('value')
|
||||
|
||||
@@ -25,14 +25,17 @@ class SickLeavesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'sickLeaves';
|
||||
|
||||
protected static ?string $title = 'Sick Leaves';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.sick_leaves");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
TextInput::make('medical_institution')
|
||||
->maxLength(255),
|
||||
@@ -40,7 +43,7 @@ class SickLeavesRelationManager extends RelationManager
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('document_path')
|
||||
->label('Medical Document')
|
||||
->label(__('hr.fields.medical_document'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
@@ -64,7 +67,7 @@ class SickLeavesRelationManager extends RelationManager
|
||||
->searchable()
|
||||
->toggleable(),
|
||||
IconColumn::make('document_path')
|
||||
->label('Document')
|
||||
->label(__('hr.fields.document'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-document-check')
|
||||
->falseIcon('heroicon-o-document'),
|
||||
|
||||
@@ -29,14 +29,17 @@ class UnpaidLeavesRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'unpaidLeaves';
|
||||
|
||||
protected static ?string $title = 'Unpaid Leaves';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.unpaid_leaves");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
Textarea::make('reason')
|
||||
->rows(3)
|
||||
@@ -64,7 +67,7 @@ class UnpaidLeavesRelationManager extends RelationManager
|
||||
->formatStateUsing(fn (ApprovalStatus $state): string => $state->label())
|
||||
->sortable(),
|
||||
TextColumn::make('approver.name')
|
||||
->label('Approved By')
|
||||
->label(__('hr.fields.approved_by'))
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([
|
||||
@@ -77,7 +80,7 @@ class UnpaidLeavesRelationManager extends RelationManager
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Approve')
|
||||
->label(__('hr.actions.approve'))
|
||||
->icon('heroicon-o-check-badge')
|
||||
->color('success')
|
||||
->requiresConfirmation()
|
||||
@@ -86,7 +89,7 @@ class UnpaidLeavesRelationManager extends RelationManager
|
||||
$unpaidLeaveService->approve($record, Auth::user());
|
||||
}),
|
||||
Action::make('reject')
|
||||
->label('Reject')
|
||||
->label(__('hr.actions.reject'))
|
||||
->icon('heroicon-o-x-mark')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
@@ -32,7 +32,10 @@ class VacationsRelationManager extends RelationManager
|
||||
{
|
||||
protected static string $relationship = 'vacations';
|
||||
|
||||
protected static ?string $title = 'Vacations';
|
||||
public static function getTitle(\Illuminate\Database\Eloquent\Model $ownerRecord, string $pageClass): string
|
||||
{
|
||||
return __("hr.relation_managers.vacations");
|
||||
}
|
||||
|
||||
public function form(Schema $schema): Schema
|
||||
{
|
||||
@@ -42,16 +45,16 @@ class VacationsRelationManager extends RelationManager
|
||||
->options(VacationType::class)
|
||||
->required()
|
||||
->native(false),
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
DatePicker::make('return_date')
|
||||
->label('Return Date'),
|
||||
->label(__('hr.fields.return_date')),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
Textarea::make('reason')
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
@@ -82,7 +85,7 @@ class VacationsRelationManager extends RelationManager
|
||||
->formatStateUsing(fn (ApprovalStatus $state): string => $state->label())
|
||||
->sortable(),
|
||||
TextColumn::make('approver.name')
|
||||
->label('Approved By')
|
||||
->label(__('hr.fields.approved_by'))
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([
|
||||
@@ -97,7 +100,7 @@ class VacationsRelationManager extends RelationManager
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Approve')
|
||||
->label(__('hr.actions.approve'))
|
||||
->icon('heroicon-o-check-badge')
|
||||
->color('success')
|
||||
->requiresConfirmation()
|
||||
@@ -106,7 +109,7 @@ class VacationsRelationManager extends RelationManager
|
||||
$vacationService->approve($record, Auth::user());
|
||||
}),
|
||||
Action::make('reject')
|
||||
->label('Reject')
|
||||
->label(__('hr.actions.reject'))
|
||||
->icon('heroicon-o-x-mark')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
@@ -19,12 +19,12 @@ class EmployeeForm
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Tabs::make('Employee')
|
||||
Tabs::make(__('hr.tabs.employee'))
|
||||
->tabs([
|
||||
Tab::make('Personal')
|
||||
Tab::make(__('hr.tabs.personal'))
|
||||
->schema([
|
||||
HrForm::fileUpload('profile_photo_path')
|
||||
->label('Photo')
|
||||
->label(__('hr.fields.photo'))
|
||||
->image()
|
||||
->avatar()
|
||||
->imageEditor(),
|
||||
@@ -36,7 +36,7 @@ class EmployeeForm
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('national_id')
|
||||
->label('National ID')
|
||||
->label(__('hr.fields.national_id'))
|
||||
->maxLength(50),
|
||||
Select::make('gender')
|
||||
->options(Gender::class)
|
||||
@@ -53,7 +53,7 @@ class EmployeeForm
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2),
|
||||
Tab::make('Employment')
|
||||
Tab::make(__('hr.tabs.employment'))
|
||||
->schema([
|
||||
Select::make('department_id')
|
||||
->relationship('department', 'name')
|
||||
|
||||
@@ -22,14 +22,14 @@ class EmployeeInfolist
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
Tabs::make('Employee Details')
|
||||
Tabs::make(__('hr.sections.employee_details'))
|
||||
->tabs([
|
||||
Tab::make('Overview')
|
||||
Tab::make(__('hr.sections.overview'))
|
||||
->schema([
|
||||
Section::make('Profile')
|
||||
Section::make(__('hr.sections.profile'))
|
||||
->schema([
|
||||
ImageEntry::make('profile_photo_path')
|
||||
->label('Photo')
|
||||
->label(__('hr.fields.photo'))
|
||||
->disk(config('hr.file_uploads.disk'))
|
||||
->visibility('private')
|
||||
->circular()
|
||||
@@ -37,10 +37,10 @@ class EmployeeInfolist
|
||||
->placeholder('—')
|
||||
->columnSpanFull(),
|
||||
TextEntry::make('employee_number')
|
||||
->label('Employee #'),
|
||||
->label(__('hr.fields.employee_number')),
|
||||
TextEntry::make('full_name'),
|
||||
TextEntry::make('national_id')
|
||||
->label('National ID')
|
||||
->label(__('hr.fields.national_id'))
|
||||
->placeholder('—'),
|
||||
TextEntry::make('gender')
|
||||
->badge()
|
||||
@@ -54,18 +54,18 @@ class EmployeeInfolist
|
||||
->columnSpanFull(),
|
||||
])
|
||||
->columns(2),
|
||||
Section::make('Organization')
|
||||
Section::make(__('hr.navigation.organization'))
|
||||
->schema([
|
||||
TextEntry::make('department.name')
|
||||
->label('Department')
|
||||
->label(__('hr.fields.department'))
|
||||
->badge()
|
||||
->color('info'),
|
||||
TextEntry::make('position.name')
|
||||
->label('Position')
|
||||
->label(__('hr.fields.position'))
|
||||
->badge()
|
||||
->color('primary'),
|
||||
TextEntry::make('shift.name')
|
||||
->label('Shift')
|
||||
->label(__('hr.fields.shift'))
|
||||
->badge()
|
||||
->color('gray'),
|
||||
TextEntry::make('employment_status')
|
||||
@@ -75,19 +75,19 @@ class EmployeeInfolist
|
||||
->icon(fn (EmploymentStatus $state): string => $state->icon()),
|
||||
])
|
||||
->columns(2),
|
||||
Section::make('Employment Timeline')
|
||||
Section::make(__('hr.sections.employment_timeline'))
|
||||
->schema([
|
||||
TextEntry::make('hire_date')
|
||||
->label('Hire Date')
|
||||
->label(__('hr.fields.hire_date'))
|
||||
->date()
|
||||
->icon('heroicon-o-calendar'),
|
||||
TextEntry::make('termination_date')
|
||||
->label('Termination Date')
|
||||
->label(__('hr.fields.termination_date'))
|
||||
->date()
|
||||
->placeholder('—')
|
||||
->icon('heroicon-o-calendar-days'),
|
||||
TextEntry::make('tenure')
|
||||
->label('Tenure')
|
||||
->label(__('hr.fields.tenure'))
|
||||
->state(fn (Employee $record): string => $record->hire_date
|
||||
? $record->hire_date->diffForHumans(now(), true)
|
||||
: '—'),
|
||||
@@ -97,78 +97,78 @@ class EmployeeInfolist
|
||||
])
|
||||
->columns(2),
|
||||
]),
|
||||
Tab::make('Statistics')
|
||||
Tab::make(__('hr.sections.statistics'))
|
||||
->schema([
|
||||
Section::make('Leave & Attendance')
|
||||
Section::make(__('hr.sections.leave_attendance'))
|
||||
->schema([
|
||||
TextEntry::make('stats_vacation_taken')
|
||||
->label('Vacation Taken (days)')
|
||||
->label(__('hr.fields.vacation_taken_days'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->vacationTaken)
|
||||
->numeric()
|
||||
->icon('heroicon-o-sun'),
|
||||
TextEntry::make('stats_vacation_remaining')
|
||||
->label('Vacation Remaining (days)')
|
||||
->label(__('hr.fields.vacation_remaining_days'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->vacationRemaining)
|
||||
->numeric()
|
||||
->color('success')
|
||||
->icon('heroicon-o-calendar'),
|
||||
TextEntry::make('stats_sick_leave_count')
|
||||
->label('Sick Leave Records')
|
||||
->label(__('hr.fields.sick_leave_records'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->sickLeaveCount)
|
||||
->numeric()
|
||||
->icon('heroicon-o-heart'),
|
||||
])
|
||||
->columns(3),
|
||||
Section::make('HR Records')
|
||||
Section::make(__('hr.sections.hr_records'))
|
||||
->schema([
|
||||
TextEntry::make('stats_reports_count')
|
||||
->label('Disciplinary Reports')
|
||||
->label(__('hr.fields.disciplinary_reports'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->reportsCount)
|
||||
->numeric()
|
||||
->icon('heroicon-o-exclamation-triangle'),
|
||||
TextEntry::make('stats_bonuses_total')
|
||||
->label('Total Bonuses')
|
||||
->label(__('hr.fields.total_bonuses'))
|
||||
->state(fn (Employee $record): float => app(EmployeeStatisticsService::class)->summary($record)->bonusesTotal)
|
||||
->money('TMT')
|
||||
->icon('heroicon-o-banknotes'),
|
||||
TextEntry::make('stats_gifts_count')
|
||||
->label('Gifts Received')
|
||||
->label(__('hr.fields.gifts_received'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->giftsCount)
|
||||
->numeric()
|
||||
->icon('heroicon-o-gift'),
|
||||
])
|
||||
->columns(3),
|
||||
]),
|
||||
Tab::make('Leave Summary')
|
||||
Tab::make(__('hr.sections.leave_summary'))
|
||||
->schema([
|
||||
Section::make('Annual Leave Balance')
|
||||
Section::make(__('hr.sections.annual_leave_balance'))
|
||||
->schema([
|
||||
TextEntry::make('leave_balance_taken')
|
||||
->label('Days Taken')
|
||||
->label(__('hr.fields.days_taken'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->vacationTaken)
|
||||
->suffix(' days'),
|
||||
->suffix(' ' . __('hr.messages.days_suffix')),
|
||||
TextEntry::make('leave_balance_remaining')
|
||||
->label('Days Remaining')
|
||||
->label(__('hr.fields.days_remaining'))
|
||||
->state(fn (Employee $record): int => app(EmployeeStatisticsService::class)->summary($record)->vacationRemaining)
|
||||
->suffix(' days')
|
||||
->suffix(' ' . __('hr.messages.days_suffix'))
|
||||
->color('success'),
|
||||
TextEntry::make('leave_balance_total')
|
||||
->label('Annual Allowance')
|
||||
->label(__('hr.fields.annual_allowance'))
|
||||
->state(fn (): int => (int) config('hr.annual_leave_days'))
|
||||
->suffix(' days'),
|
||||
->suffix(' ' . __('hr.messages.days_suffix')),
|
||||
])
|
||||
->columns(3),
|
||||
Section::make('Upcoming Approved Leave')
|
||||
Section::make(__('hr.sections.upcoming_approved_leave'))
|
||||
->schema([
|
||||
TextEntry::make('upcoming_leave')
|
||||
->label('Scheduled Vacations')
|
||||
->label(__('hr.fields.scheduled_vacations'))
|
||||
->state(function (Employee $record): string {
|
||||
$upcoming = app(EmployeeStatisticsService::class)
|
||||
->summary($record)
|
||||
->upcomingLeave;
|
||||
|
||||
if ($upcoming->isEmpty()) {
|
||||
return 'No upcoming approved leave';
|
||||
return __('hr.messages.no_upcoming_approved_leave');
|
||||
}
|
||||
|
||||
return $upcoming
|
||||
@@ -184,14 +184,14 @@ class EmployeeInfolist
|
||||
->listWithLineBreaks()
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
Section::make('Other Leave Types')
|
||||
Section::make(__('hr.sections.other_leave_types'))
|
||||
->schema([
|
||||
TextEntry::make('unpaid_leaves_count')
|
||||
->label('Unpaid Leave Records')
|
||||
->label(__('hr.fields.unpaid_leave_records'))
|
||||
->state(fn (Employee $record): int => $record->unpaidLeaves()->count())
|
||||
->numeric(),
|
||||
TextEntry::make('explanations_count')
|
||||
->label('Explanations')
|
||||
->label(__('hr.fields.explanations'))
|
||||
->state(fn (Employee $record): int => $record->explanations()->count())
|
||||
->numeric(),
|
||||
])
|
||||
|
||||
@@ -28,14 +28,14 @@ class EmployeesTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee_number')
|
||||
->label('Number')
|
||||
->label(__('hr.fields.number'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('full_name')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('national_id')
|
||||
->label('National ID')
|
||||
->label(__('hr.fields.national_id'))
|
||||
->searchable()
|
||||
->toggleable(),
|
||||
TextColumn::make('gender')
|
||||
@@ -47,25 +47,25 @@ class EmployeesTable
|
||||
->searchable()
|
||||
->toggleable(),
|
||||
TextColumn::make('department.name')
|
||||
->label('Department')
|
||||
->label(__('hr.fields.department'))
|
||||
->badge()
|
||||
->color('info')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('position.name')
|
||||
->label('Position')
|
||||
->label(__('hr.fields.position'))
|
||||
->badge()
|
||||
->color('primary')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('shift.name')
|
||||
->label('Shift')
|
||||
->label(__('hr.fields.shift'))
|
||||
->badge()
|
||||
->color('gray')
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('employment_status')
|
||||
->label('Status')
|
||||
->label(__('hr.fields.status'))
|
||||
->badge()
|
||||
->color(fn (EmploymentStatus $state): string => $state->color())
|
||||
->formatStateUsing(fn (EmploymentStatus $state): string => $state->label())
|
||||
@@ -93,22 +93,22 @@ class EmployeesTable
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('department_id')
|
||||
->label('Department')
|
||||
->label(__('hr.fields.department'))
|
||||
->relationship('department', 'name')
|
||||
->searchable()
|
||||
->preload(),
|
||||
SelectFilter::make('position_id')
|
||||
->label('Position')
|
||||
->label(__('hr.fields.position'))
|
||||
->relationship('position', 'name')
|
||||
->searchable()
|
||||
->preload(),
|
||||
SelectFilter::make('shift_id')
|
||||
->label('Shift')
|
||||
->label(__('hr.fields.shift'))
|
||||
->relationship('shift', 'name')
|
||||
->searchable()
|
||||
->preload(),
|
||||
SelectFilter::make('employment_status')
|
||||
->label('Employment Status')
|
||||
->label(__('hr.fields.employment_status'))
|
||||
->options(EmploymentStatus::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
@@ -120,11 +120,11 @@ class EmployeesTable
|
||||
BulkActionGroup::make([
|
||||
ExportExcelAction::bulk('exportSelected', \App\Exports\EmployeesExport::class, 'employees.xlsx'),
|
||||
BulkAction::make('changeDepartment')
|
||||
->label('Change Department')
|
||||
->label(__('hr.actions.change_department'))
|
||||
->icon('heroicon-o-building-office-2')
|
||||
->schema([
|
||||
Select::make('department_id')
|
||||
->label('Department')
|
||||
->label(__('hr.fields.department'))
|
||||
->options(fn (): array => Department::query()->orderBy('name')->pluck('name', 'id')->all())
|
||||
->searchable()
|
||||
->required(),
|
||||
|
||||
@@ -22,23 +22,23 @@ class EmployeeStatsWidget extends StatsOverviewWidget
|
||||
$summary = app(EmployeeStatisticsService::class)->summary($this->record);
|
||||
|
||||
return [
|
||||
Stat::make('Vacation Taken', (string) $summary->vacationTaken)
|
||||
->description("{$summary->vacationRemaining} days remaining")
|
||||
Stat::make(__('hr.fields.vacation_taken_days'), (string) $summary->vacationTaken)
|
||||
->description("{$summary->vacationRemaining} " . __('hr.fields.days_remaining'))
|
||||
->descriptionIcon('heroicon-o-calendar')
|
||||
->color('primary')
|
||||
->icon('heroicon-o-sun'),
|
||||
Stat::make('Sick Leaves', (string) $summary->sickLeaveCount)
|
||||
->description('Total records')
|
||||
Stat::make(__('hr.relation_managers.sick_leaves'), (string) $summary->sickLeaveCount)
|
||||
->description(__('hr.fields.sick_leave_records'))
|
||||
->descriptionIcon('heroicon-o-heart')
|
||||
->color('warning')
|
||||
->icon('heroicon-o-heart'),
|
||||
Stat::make('Disciplinary Reports', (string) $summary->reportsCount)
|
||||
->description('On file')
|
||||
Stat::make(__('hr.fields.disciplinary_reports'), (string) $summary->reportsCount)
|
||||
->description(__('hr.fields.disciplinary_reports'))
|
||||
->descriptionIcon('heroicon-o-exclamation-triangle')
|
||||
->color('danger')
|
||||
->icon('heroicon-o-exclamation-triangle'),
|
||||
Stat::make('Total Bonuses', number_format($summary->bonusesTotal, 2).' TMT')
|
||||
->description("{$summary->giftsCount} gifts received")
|
||||
Stat::make(__('hr.fields.total_bonuses'), number_format($summary->bonusesTotal, 2).' TMT')
|
||||
->description("{$summary->giftsCount} " . __('hr.fields.gifts_received'))
|
||||
->descriptionIcon('heroicon-o-gift')
|
||||
->color('success')
|
||||
->icon('heroicon-o-banknotes'),
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Explanations;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Explanations\Pages\CreateExplanation;
|
||||
use App\Filament\Resources\Explanations\Pages\EditExplanation;
|
||||
use App\Filament\Resources\Explanations\Pages\ListExplanations;
|
||||
@@ -27,7 +28,7 @@ class ExplanationResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedDocumentText;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class ExplanationForm
|
||||
->rows(4)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
|
||||
@@ -13,7 +13,7 @@ class ExplanationInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('explanation_date')
|
||||
->date(),
|
||||
TextEntry::make('reason'),
|
||||
|
||||
@@ -20,7 +20,7 @@ class ExplanationsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('explanation_date')
|
||||
@@ -33,7 +33,7 @@ class ExplanationsTable
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
IconColumn::make('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-paper-clip')
|
||||
->falseIcon('heroicon-o-minus'),
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Gifts;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Gifts\Pages\CreateGift;
|
||||
use App\Filament\Resources\Gifts\Pages\EditGift;
|
||||
use App\Filament\Resources\Gifts\Pages\ListGifts;
|
||||
@@ -27,7 +28,7 @@ class GiftResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedGift;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Records';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Records;
|
||||
|
||||
protected static ?int $navigationSort = 4;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class GiftForm
|
||||
->required()
|
||||
->default(now()),
|
||||
TextInput::make('gift_name')
|
||||
->label('Gift Name')
|
||||
->label(__('hr.fields.gift_name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('value')
|
||||
|
||||
@@ -13,7 +13,7 @@ class GiftInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('gift_date')
|
||||
->date(),
|
||||
TextEntry::make('gift_name'),
|
||||
|
||||
@@ -19,14 +19,14 @@ class GiftsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('gift_date')
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('gift_name')
|
||||
->label('Gift')
|
||||
->label(__('hr.fields.gift'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('value')
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Positions;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Positions\Pages\CreatePosition;
|
||||
use App\Filament\Resources\Positions\Pages\EditPosition;
|
||||
use App\Filament\Resources\Positions\Pages\ListPositions;
|
||||
@@ -27,7 +28,7 @@ class PositionResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedBriefcase;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Organization';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Organization;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
|
||||
@@ -22,18 +22,18 @@ class ShiftForm
|
||||
->maxLength(50)
|
||||
->unique(ignoreRecord: true),
|
||||
TimePicker::make('starts_at')
|
||||
->label('Starts at')
|
||||
->label(__('hr.fields.starts_at'))
|
||||
->required()
|
||||
->seconds(false),
|
||||
TimePicker::make('ends_at')
|
||||
->label('Ends at')
|
||||
->label(__('hr.fields.ends_at'))
|
||||
->required()
|
||||
->seconds(false),
|
||||
Textarea::make('description')
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
Toggle::make('is_active')
|
||||
->label('Active')
|
||||
->label(__('hr.fields.active'))
|
||||
->default(true)
|
||||
->required(),
|
||||
]);
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Shifts;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Shifts\Pages\CreateShift;
|
||||
use App\Filament\Resources\Shifts\Pages\EditShift;
|
||||
use App\Filament\Resources\Shifts\Pages\ListShifts;
|
||||
@@ -27,7 +28,7 @@ class ShiftResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedClock;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Organization';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::Organization;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
|
||||
@@ -26,20 +26,20 @@ class ShiftsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('starts_at')
|
||||
->label('Starts')
|
||||
->label(__('hr.fields.starts'))
|
||||
->time()
|
||||
->sortable(),
|
||||
TextColumn::make('ends_at')
|
||||
->label('Ends')
|
||||
->label(__('hr.fields.ends'))
|
||||
->time()
|
||||
->sortable(),
|
||||
TextColumn::make('description')
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
TextColumn::make('is_active')
|
||||
->label('Status')
|
||||
->label(__('hr.fields.status'))
|
||||
->badge()
|
||||
->formatStateUsing(fn (bool $state): string => $state ? 'Active' : 'Inactive')
|
||||
->formatStateUsing(fn (bool $state): string => $state ? __('enums.employment_status.active') : __('enums.employment_status.inactive'))
|
||||
->color(fn (bool $state): string => $state ? 'success' : 'danger')
|
||||
->sortable(),
|
||||
TextColumn::make('created_at')
|
||||
@@ -57,10 +57,10 @@ class ShiftsTable
|
||||
])
|
||||
->filters([
|
||||
TernaryFilter::make('is_active')
|
||||
->label('Status')
|
||||
->placeholder('All shifts')
|
||||
->trueLabel('Active')
|
||||
->falseLabel('Inactive'),
|
||||
->label(__('hr.fields.status'))
|
||||
->placeholder(__('hr.filters.all_shifts'))
|
||||
->trueLabel(__('enums.employment_status.active'))
|
||||
->falseLabel(__('enums.employment_status.inactive')),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
->recordActions([
|
||||
|
||||
@@ -14,8 +14,8 @@ class SickLeaveForm
|
||||
return $schema
|
||||
->components([
|
||||
HrForm::employeeSelect(),
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
TextInput::make('medical_institution')
|
||||
->maxLength(255),
|
||||
@@ -23,7 +23,7 @@ class SickLeaveForm
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('document_path')
|
||||
->label('Medical Document')
|
||||
->label(__('hr.fields.medical_document'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
|
||||
@@ -13,7 +13,7 @@ class SickLeaveInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('start_date')
|
||||
->date(),
|
||||
TextEntry::make('end_date')
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\SickLeaves;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\SickLeaves\Pages\CreateSickLeave;
|
||||
use App\Filament\Resources\SickLeaves\Pages\EditSickLeave;
|
||||
use App\Filament\Resources\SickLeaves\Pages\ListSickLeaves;
|
||||
@@ -27,7 +28,7 @@ class SickLeaveResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedHeart;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Leave Management';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::LeaveManagement;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class SickLeavesTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('start_date')
|
||||
@@ -36,7 +36,7 @@ class SickLeavesTable
|
||||
->searchable()
|
||||
->toggleable(),
|
||||
IconColumn::make('document_path')
|
||||
->label('Document')
|
||||
->label(__('hr.fields.document'))
|
||||
->boolean()
|
||||
->trueIcon('heroicon-o-document-check')
|
||||
->falseIcon('heroicon-o-document')
|
||||
|
||||
@@ -13,8 +13,8 @@ class UnpaidLeaveForm
|
||||
return $schema
|
||||
->components([
|
||||
HrForm::employeeSelect(),
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
Textarea::make('reason')
|
||||
->rows(3)
|
||||
|
||||
@@ -13,7 +13,7 @@ class UnpaidLeaveInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('start_date')
|
||||
->date(),
|
||||
TextEntry::make('end_date')
|
||||
|
||||
@@ -28,7 +28,7 @@ class UnpaidLeavesTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('start_date')
|
||||
@@ -47,7 +47,7 @@ class UnpaidLeavesTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('approver.name')
|
||||
->label('Approved By')
|
||||
->label(__('hr.fields.approved_by'))
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('approved_at')
|
||||
->dateTime()
|
||||
@@ -70,12 +70,12 @@ class UnpaidLeavesTable
|
||||
SelectFilter::make('status')
|
||||
->options(ApprovalStatus::class),
|
||||
Filter::make('date_range')
|
||||
->label('Date Range')
|
||||
->label(__('hr.fields.date_range'))
|
||||
->schema([
|
||||
DatePicker::make('start_from')
|
||||
->label('Start from'),
|
||||
->label(__('hr.fields.start_from')),
|
||||
DatePicker::make('start_until')
|
||||
->label('Start until'),
|
||||
->label(__('hr.fields.start_until')),
|
||||
])
|
||||
->query(function (Builder $query, array $data): Builder {
|
||||
return $query
|
||||
@@ -92,7 +92,7 @@ class UnpaidLeavesTable
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Approve')
|
||||
->label(__('hr.actions.approve'))
|
||||
->icon('heroicon-o-check-badge')
|
||||
->color('success')
|
||||
->requiresConfirmation()
|
||||
@@ -101,7 +101,7 @@ class UnpaidLeavesTable
|
||||
$unpaidLeaveService->approve($record, Auth::user());
|
||||
}),
|
||||
Action::make('reject')
|
||||
->label('Reject')
|
||||
->label(__('hr.actions.reject'))
|
||||
->icon('heroicon-o-x-mark')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\UnpaidLeaves;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\UnpaidLeaves\Pages\CreateUnpaidLeave;
|
||||
use App\Filament\Resources\UnpaidLeaves\Pages\EditUnpaidLeave;
|
||||
use App\Filament\Resources\UnpaidLeaves\Pages\ListUnpaidLeaves;
|
||||
@@ -27,7 +28,7 @@ class UnpaidLeaveResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedCalendarDays;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Leave Management';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::LeaveManagement;
|
||||
|
||||
protected static ?int $navigationSort = 3;
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class UserForm
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('email')
|
||||
->label('Email address')
|
||||
->label(__('hr.fields.email_address'))
|
||||
->email()
|
||||
->required()
|
||||
->maxLength(255)
|
||||
@@ -34,7 +34,14 @@ class UserForm
|
||||
->relationship('department', 'name')
|
||||
->searchable()
|
||||
->preload()
|
||||
->label('Department (for managers)'),
|
||||
->label(__('hr.fields.department_for_managers')),
|
||||
Select::make('locale')
|
||||
->label(__('hr.fields.locale'))
|
||||
->options(collect(config('hr.supported_locales'))
|
||||
->mapWithKeys(fn (string $locale): array => [$locale => config('hr.locale_labels')[$locale]])
|
||||
->all())
|
||||
->required()
|
||||
->default(config('hr.default_locale')),
|
||||
Select::make('roles')
|
||||
->relationship('roles', 'name')
|
||||
->multiple()
|
||||
|
||||
@@ -13,7 +13,7 @@ class UserInfolist
|
||||
->components([
|
||||
TextEntry::make('name'),
|
||||
TextEntry::make('email')
|
||||
->label('Email address'),
|
||||
->label(__('hr.fields.email_address')),
|
||||
TextEntry::make('email_verified_at')
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
@@ -24,7 +24,7 @@ class UserInfolist
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('department.name')
|
||||
->label('Department')
|
||||
->label(__('hr.fields.department'))
|
||||
->placeholder('-'),
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ class UsersTable
|
||||
TextColumn::make('name')
|
||||
->searchable(),
|
||||
TextColumn::make('email')
|
||||
->label('Email address')
|
||||
->label(__('hr.fields.email_address'))
|
||||
->searchable(),
|
||||
TextColumn::make('email_verified_at')
|
||||
->dateTime()
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Users;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Users\Pages\CreateUser;
|
||||
use App\Filament\Resources\Users\Pages\EditUser;
|
||||
use App\Filament\Resources\Users\Pages\ListUsers;
|
||||
@@ -17,6 +18,7 @@ use Filament\Resources\Resource;
|
||||
use Filament\Schemas\Schema;
|
||||
use Filament\Support\Icons\Heroicon;
|
||||
use Filament\Tables\Table;
|
||||
use UnitEnum;
|
||||
|
||||
class UserResource extends Resource
|
||||
{
|
||||
@@ -24,7 +26,7 @@ class UserResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedUsers;
|
||||
|
||||
protected static string|\UnitEnum|null $navigationGroup = 'System';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::System;
|
||||
|
||||
protected static ?int $navigationSort = 2;
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@ class VacationForm
|
||||
->options(VacationType::class)
|
||||
->required()
|
||||
->native(false),
|
||||
HrForm::leaveDatePicker('start_date', 'Start Date'),
|
||||
HrForm::leaveDatePicker('end_date', 'End Date'),
|
||||
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
|
||||
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
|
||||
DatePicker::make('return_date')
|
||||
->label('Return Date'),
|
||||
->label(__('hr.fields.return_date')),
|
||||
HrForm::leaveDaysDisplay(),
|
||||
Textarea::make('reason')
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
HrForm::fileUpload('attachment_path')
|
||||
->label('Attachment')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->acceptedFileTypes(['application/pdf', 'image/*'])
|
||||
->maxSize(10240),
|
||||
]);
|
||||
|
||||
@@ -13,7 +13,7 @@ class VacationInfolist
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('employee.id')
|
||||
->label('Employee'),
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('type')
|
||||
->badge(),
|
||||
TextEntry::make('start_date')
|
||||
|
||||
@@ -30,7 +30,7 @@ class VacationsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('employee.full_name')
|
||||
->label('Employee')
|
||||
->label(__('hr.fields.employee'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('type')
|
||||
@@ -55,7 +55,7 @@ class VacationsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('approver.name')
|
||||
->label('Approved By')
|
||||
->label(__('hr.fields.approved_by'))
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('approved_at')
|
||||
->dateTime()
|
||||
@@ -80,12 +80,12 @@ class VacationsTable
|
||||
SelectFilter::make('type')
|
||||
->options(VacationType::class),
|
||||
Filter::make('date_range')
|
||||
->label('Date Range')
|
||||
->label(__('hr.fields.date_range'))
|
||||
->schema([
|
||||
DatePicker::make('start_from')
|
||||
->label('Start from'),
|
||||
->label(__('hr.fields.start_from')),
|
||||
DatePicker::make('start_until')
|
||||
->label('Start until'),
|
||||
->label(__('hr.fields.start_until')),
|
||||
])
|
||||
->query(function (Builder $query, array $data): Builder {
|
||||
return $query
|
||||
@@ -102,7 +102,7 @@ class VacationsTable
|
||||
])
|
||||
->recordActions([
|
||||
Action::make('approve')
|
||||
->label('Approve')
|
||||
->label(__('hr.actions.approve'))
|
||||
->icon('heroicon-o-check-badge')
|
||||
->color('success')
|
||||
->requiresConfirmation()
|
||||
@@ -111,7 +111,7 @@ class VacationsTable
|
||||
$vacationService->approve($record, Auth::user());
|
||||
}),
|
||||
Action::make('reject')
|
||||
->label('Reject')
|
||||
->label(__('hr.actions.reject'))
|
||||
->icon('heroicon-o-x-mark')
|
||||
->color('danger')
|
||||
->requiresConfirmation()
|
||||
|
||||
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Resources\Vacations;
|
||||
|
||||
use App\Enums\NavigationGroup;
|
||||
use App\Filament\Resources\Vacations\Pages\CreateVacation;
|
||||
use App\Filament\Resources\Vacations\Pages\EditVacation;
|
||||
use App\Filament\Resources\Vacations\Pages\ListVacations;
|
||||
@@ -27,7 +28,7 @@ class VacationResource extends Resource
|
||||
|
||||
protected static string|BackedEnum|null $navigationIcon = Heroicon::OutlinedSun;
|
||||
|
||||
protected static string | UnitEnum | null $navigationGroup = 'Leave Management';
|
||||
protected static string|UnitEnum|null $navigationGroup = NavigationGroup::LeaveManagement;
|
||||
|
||||
protected static ?int $navigationSort = 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user