Add labels for various fields across HR resources to improve localization and user experience.

This commit is contained in:
Mekan1206 committed 2026-08-02 20:10:48 +05:00
1 parent 8147f23750
commit e3ec83686c
52 files changed
+363 -26

No files matched your search

@@ -42,15 +42,17 @@ public function form(Schema $schema): Schema
return $schema
->components([
Select::make('type')
->label(__('hr.fields.type'))
->options(VacationType::class)
->required()
->native(false),
HrForm::leaveDatePicker('start_date', __(hr.fields.start_date)),
HrForm::leaveDatePicker('end_date', __(hr.fields.end_date)),
HrForm::leaveDatePicker('start_date', __('hr.fields.start_date')),
HrForm::leaveDatePicker('end_date', __('hr.fields.end_date')),
DatePicker::make('return_date')
->label(__('hr.fields.return_date')),
HrForm::leaveDaysDisplay(),
Textarea::make('reason')
->label(__('hr.fields.reason'))
->rows(3)
->columnSpanFull(),
HrForm::fileUpload('attachment_path')
@@ -66,20 +68,25 @@ public function table(Table $table): Table
->recordTitleAttribute('start_date')
->columns([
TextColumn::make('type')
->label(__('hr.fields.type'))
->badge()
->color(fn (VacationType $state): string => $state->color())
->formatStateUsing(fn (VacationType $state): string => $state->label())
->sortable(),
TextColumn::make('start_date')
->label(__('hr.fields.start_date'))
->date()
->sortable(),
TextColumn::make('end_date')
->label(__('hr.fields.end_date'))
->date()
->sortable(),
TextColumn::make('days')
->label(__('hr.fields.days'))
->numeric()
->sortable(),
TextColumn::make('status')
->label(__('hr.fields.status'))
->badge()
->color(fn (ApprovalStatus $state): string => $state->color())
->formatStateUsing(fn (ApprovalStatus $state): string => $state->label())
@@ -90,8 +97,10 @@ public function table(Table $table): Table
])
->filters([
SelectFilter::make('status')
->label(__('hr.fields.status'))
->options(ApprovalStatus::class),
SelectFilter::make('type')
->label(__('hr.fields.type'))
->options(VacationType::class),
TrashedFilter::make(),
])