translate base
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user