Add labels for various fields across HR resources to improve localization and user experience.
This commit is contained in:
@@ -16,6 +16,7 @@ class UserForm
|
||||
return $schema
|
||||
->components([
|
||||
TextInput::make('name')
|
||||
->label(__('hr.fields.name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('email')
|
||||
@@ -25,6 +26,7 @@ class UserForm
|
||||
->maxLength(255)
|
||||
->unique(ignoreRecord: true),
|
||||
TextInput::make('password')
|
||||
->label(__('hr.fields.password'))
|
||||
->password()
|
||||
->dehydrateStateUsing(fn (?string $state): ?string => filled($state) ? Hash::make($state) : null)
|
||||
->dehydrated(fn (?string $state): bool => filled($state))
|
||||
@@ -43,6 +45,7 @@ class UserForm
|
||||
->required()
|
||||
->default(config('hr.default_locale')),
|
||||
Select::make('roles')
|
||||
->label(__('hr.fields.roles'))
|
||||
->relationship('roles', 'name')
|
||||
->multiple()
|
||||
->preload()
|
||||
|
||||
@@ -11,16 +11,20 @@ class UserInfolist
|
||||
{
|
||||
return $schema
|
||||
->components([
|
||||
TextEntry::make('name'),
|
||||
TextEntry::make('name')
|
||||
->label(__('hr.fields.name')),
|
||||
TextEntry::make('email')
|
||||
->label(__('hr.fields.email_address')),
|
||||
TextEntry::make('email_verified_at')
|
||||
->label(__('hr.fields.email_verified_at'))
|
||||
->dateTime()
|
||||
->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('department.name')
|
||||
|
||||
Reference in New Issue
Block a user