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()
|
||||
|
||||
Reference in New Issue
Block a user