Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -18,16 +18,20 @@ class DisciplinaryReportForm
|
||||
->components([
|
||||
HrForm::employeeSelect(),
|
||||
DatePicker::make('report_date')
|
||||
->label(__('hr.fields.report_date'))
|
||||
->required()
|
||||
->default(now()),
|
||||
TextInput::make('title')
|
||||
->label(__('hr.fields.title'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Textarea::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->required()
|
||||
->rows(4)
|
||||
->columnSpanFull(),
|
||||
Select::make('severity')
|
||||
->label(__('hr.fields.severity'))
|
||||
->options(DisciplinarySeverity::class)
|
||||
->required()
|
||||
->native(false),
|
||||
|
||||
@@ -15,24 +15,33 @@ class DisciplinaryReportInfolist
|
||||
TextEntry::make('employee.id')
|
||||
->label(__('hr.fields.employee')),
|
||||
TextEntry::make('report_date')
|
||||
->label(__('hr.fields.report_date'))
|
||||
->date(),
|
||||
TextEntry::make('title'),
|
||||
TextEntry::make('title')
|
||||
->label(__('hr.fields.title')),
|
||||
TextEntry::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->columnSpanFull(),
|
||||
TextEntry::make('severity')
|
||||
->label(__('hr.fields.severity'))
|
||||
->badge(),
|
||||
TextEntry::make('attachment_path')
|
||||
->label(__('hr.fields.attachment'))
|
||||
->placeholder('-'),
|
||||
TextEntry::make('created_by')
|
||||
->label(__('hr.fields.created_by'))
|
||||
->numeric()
|
||||
->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 (DisciplinaryReport $record): bool => $record->trashed()),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user