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