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