Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -18,19 +18,23 @@ class BonusForm
|
||||
->components([
|
||||
HrForm::employeeSelect(),
|
||||
DatePicker::make('bonus_date')
|
||||
->label(__('hr.fields.bonus_date'))
|
||||
->required()
|
||||
->default(now()),
|
||||
Select::make('bonus_type')
|
||||
->label(__('hr.fields.bonus_type'))
|
||||
->options(BonusType::class)
|
||||
->required()
|
||||
->native(false),
|
||||
TextInput::make('amount')
|
||||
->label(__('hr.fields.amount'))
|
||||
->required()
|
||||
->numeric()
|
||||
->prefix('TMT')
|
||||
->minValue(0)
|
||||
->step(0.01),
|
||||
Textarea::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
|
||||
@@ -15,21 +15,28 @@ class BonusInfolist
|
||||
TextEntry::make('employee.id')
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('bonus_date')
|
||||
->label(__('hr.fields.bonus_date'))
|
||||
->date(),
|
||||
TextEntry::make('bonus_type')
|
||||
->label(__('hr.fields.bonus_type'))
|
||||
->badge(),
|
||||
TextEntry::make('amount')
|
||||
->label(__('hr.fields.amount'))
|
||||
->numeric(),
|
||||
TextEntry::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->placeholder('-')
|
||||
->columnSpanFull(),
|
||||
TextEntry::make('created_at')
|
||||
->label(__('hr.fields.created_at'))
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('updated_at')
|
||||
->label(__('hr.fields.updated_at'))
|
||||
->dateTime()
|
||||
->placeholder('-'),
|
||||
TextEntry::make('deleted_at')
|
||||
->label(__('hr.fields.deleted_at'))
|
||||
->dateTime()
|
||||
->visible(fn (Bonus $record): bool => $record->trashed()),
|
||||
]);
|
||||
|
||||
@@ -26,6 +26,7 @@ class BonusesTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_date')
|
||||
->label(__('hr.fields.bonus_date'))
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('bonus_type')
|
||||
@@ -36,20 +37,25 @@ class BonusesTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('amount')
|
||||
->label(__('hr.fields.amount'))
|
||||
->money('TMT')
|
||||
->sortable(),
|
||||
TextColumn::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->limit(40)
|
||||
->toggleable(),
|
||||
TextColumn::make('created_at')
|
||||
->label(__('hr.fields.created_at'))
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('updated_at')
|
||||
->label(__('hr.fields.updated_at'))
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
TextColumn::make('deleted_at')
|
||||
->label(__('hr.fields.deleted_at'))
|
||||
->dateTime()
|
||||
->sortable()
|
||||
->toggleable(isToggledHiddenByDefault: true),
|
||||
|
||||
Reference in New Issue
Block a user