Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -14,11 +14,15 @@ class DepartmentForm
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label(__('hr.fields.name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
|
||||
Textarea::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->rows(3)
|
||||
->columnSpanFull(),
|
||||
|
||||
Toggle::make('is_active')
|
||||
->label(__('hr.fields.active'))
|
||||
->default(true)
|
||||
|
||||
@@ -13,20 +13,27 @@ class DepartmentInfolist
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('name'),
|
||||
TextEntry::make('code'),
|
||||
TextEntry::make('name')
|
||||
->label(__('hr.fields.name')),
|
||||
TextEntry::make('code')
|
||||
->label(__('hr.fields.code')),
|
||||
TextEntry::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->placeholder('-')
|
||||
->columnSpanFull(),
|
||||
IconEntry::make('is_active')
|
||||
->label(__('hr.fields.status'))
|
||||
->boolean(),
|
||||
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 (Department $record): bool => $record->trashed()),
|
||||
]);
|
||||
|
||||
@@ -20,12 +20,15 @@ class DepartmentsTable
|
||||
return $table
|
||||
->columns([
|
||||
TextColumn::make('name')
|
||||
->label(__('hr.fields.name'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('code')
|
||||
->label(__('hr.fields.code'))
|
||||
->searchable()
|
||||
->sortable(),
|
||||
TextColumn::make('description')
|
||||
->label(__('hr.fields.description'))
|
||||
->limit(50)
|
||||
->toggleable(),
|
||||
TextColumn::make('is_active')
|
||||
@@ -35,14 +38,17 @@ class DepartmentsTable
|
||||
->color(fn (bool $state): string => $state ? 'success' : 'danger')
|
||||
->sortable(),
|
||||
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