Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -39,16 +39,20 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
return $schema
|
||||
->components([
|
||||
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),
|
||||
@@ -65,12 +69,15 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
->recordTitleAttribute('title')
|
||||
->columns([
|
||||
TextColumn::make('report_date')
|
||||
->label(__('hr.fields.report_date'))
|
||||
->date()
|
||||
->sortable(),
|
||||
TextColumn::make('title')
|
||||
->label(__('hr.fields.title'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('severity')
|
||||
->label(__('hr.fields.severity'))
|
||||
->badge()
|
||||
->color(fn (DisciplinarySeverity $state): string => $state->color())
|
||||
->formatStateUsing(fn (DisciplinarySeverity $state): string => $state->label())
|
||||
@@ -86,6 +93,7 @@ class DisciplinaryReportsRelationManager extends RelationManager
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('severity')
|
||||
->label(__('hr.fields.severity'))
|
||||
->options(DisciplinarySeverity::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user