language files combined, settings fixed, "new" badge integrated

This commit is contained in:
2025-08-01 23:34:41 +02:00
parent b2968f203d
commit 80873877c1
44 changed files with 1319 additions and 358 deletions

View File

@@ -27,24 +27,50 @@ class UserResource extends Resource
{
return $form
->schema([
TextInput::make('name')
->label(__('filament.resource.user.form.name'))
->required()
->maxLength(255),
TextInput::make('email')
->label(__('filament.resource.user.form.email'))
->email()
->required()
->maxLength(255),
TextInput::make('password')
->label(__('filament.resource.user.form.password'))
->password()
->required()
->maxLength(255),
Select::make('role_id')
->relationship('role', 'name')
->label(__('filament.resource.user.form.role'))
->required(),
Forms\Components\Section::make('User Details')
->schema([
TextInput::make('name')
->label(__('filament.resource.user.form.name'))
->required()
->maxLength(255),
TextInput::make('email')
->label(__('filament.resource.user.form.email'))
->email()
->required()
->maxLength(255),
TextInput::make('password')
->label(__('filament.resource.user.form.password'))
->password()
->dehydrateStateUsing(fn (string $state): string => bcrypt($state))
->dehydrated(fn (?string $state): bool => filled($state))
->required(fn (string $operation): bool => $operation === 'create')
->maxLength(255),
Select::make('role_id')
->relationship('role', 'name')
->label(__('filament.resource.user.form.role'))
->required(),
])->columns(2),
Forms\Components\Section::make('Preferences')
->schema([
Forms\Components\Toggle::make('email_notifications_enabled')
->label(__('Email Notifications'))
->default(true),
Select::make('theme_preference')
->label(__('Theme'))
->options([
'light' => 'Light',
'dark' => 'Dark',
])
->default('light'),
Select::make('locale')
->label(__('Language'))
->options([
'en' => 'English',
'de' => 'Deutsch',
])
->default('en'),
])->columns(2),
]);
}