translate base

This commit is contained in:
Mekan1206
2026-07-31 18:08:08 +05:00
parent a794dacd39
commit 581cb8241c
413 changed files with 9087 additions and 428 deletions

View File

@@ -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;

View File

@@ -24,7 +24,7 @@ class DepartmentForm
->rows(3)
->columnSpanFull(),
Toggle::make('is_active')
->label('Active')
->label(__('hr.fields.active'))
->default(true)
->required(),
]);

View File

@@ -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([