Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -16,12 +16,15 @@ class ExplanationForm
|
||||
->components([
|
||||
HrForm::employeeSelect(),
|
||||
DatePicker::make('explanation_date')
|
||||
->label(__('hr.fields.explanation_date'))
|
||||
->required()
|
||||
->default(now()),
|
||||
TextInput::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Textarea::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->required()
|
||||
->rows(4)
|
||||
->columnSpanFull(),
|
||||
|
||||
@@ -15,19 +15,26 @@ class ExplanationInfolist
|
||||
TextEntry::make('employee.id')
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('explanation_date')
|
||||
->label(__('hr.fields.explanation_date'))
|
||||
->date(),
|
||||
TextEntry::make('reason'),
|
||||
TextEntry::make('reason')
|
||||
->label(__('hr.fields.reason')),
|
||||
TextEntry::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->columnSpanFull(),
|
||||
TextEntry::make('attachment_path')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->placeholder('-'),
|
||||
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 (Explanation $record): bool => $record->trashed()),
|
||||
]);
|
||||
|
||||
@@ -24,12 +24,15 @@ class ExplanationsTable
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('explanation_date')
|
||||
->label(__('hr.fields.explanation_date'))
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('reason')
|
||||
->label(__('hr.fields.reason'))
|
||||
->searchable()
|
||||
->limit(40),
|
||||
TextColumn::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
IconColumn::make('attachment_path')
|
||||
@@ -38,14 +41,17 @@ class ExplanationsTable
|
||||
->trueIcon('heroicon-o-paper-clip')
|
||||
->falseIcon('heroicon-o-minus'),
|
||||
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