Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -13,9 +13,11 @@ class PositionForm
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label(__('hr.fields.name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
Textarea::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
]);
|
||||
|
||||
@@ -12,17 +12,22 @@ class PositionInfolist
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('name'),
|
||||
TextEntry::make('name')
|
||||
->label(__('hr.fields.name')),
|
||||
TextEntry::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->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 (Position $record): bool => $record->trashed()),
|
||||
]);
|
||||
|
||||
@@ -19,21 +19,26 @@ class PositionsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')
|
||||
->label(__('hr.fields.name'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->searchable()
|
||||
->limit(50)
|
||||
->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