Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
1 parent
8147f23750
commit
e3ec83686c
52 files changed
+363
-26
No files matched your search
+8
@@ -39,16 +39,20 @@ public function form(Schema $schema): Schema
|
||||
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 @@ public function table(Table $table): Table
|
||||
->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 @@ public function table(Table $table): Table
|
||||
])
|
||||
->filters([
|
||||
SelectFilter::make('severity')
|
||||
->label(__('hr.fields.severity'))
|
||||
->options(DisciplinarySeverity::class),
|
||||
TrashedFilter::make(),
|
||||
])
|
||||
|
||||
Reference in new issue
Block a user