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

@@ -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(),
]);

View File

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

View File

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