feat(profile): add username + preferred_locale; wire to Inertia + middleware
- DB: users.username (unique), users.preferred_locale (default from app.locale) - Backend: validation, model fillable; share supportedLocales; SetLocaleFromUser - Frontend: profile page fields + types - Filament: SuperAdmin profile page with username/language feat(admin-nav): move Tasks to Bibliothek and add menu labels fix(tasks-table): show localized title/emotion/event type; add translated headers feat(l10n): add missing table headers for emotions and event types; normalize en/de files refactor: tidy translations for tasks/emotions/event types
This commit is contained in:
@@ -23,52 +23,57 @@ class LegalPageResource extends Resource
|
||||
{
|
||||
protected static ?string $model = LegalPage::class;
|
||||
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-scale';
|
||||
protected static UnitEnum|string|null $navigationGroup = 'Platform';
|
||||
protected static UnitEnum|string|null $navigationGroup = null;
|
||||
|
||||
public static function getNavigationGroup(): UnitEnum|string|null
|
||||
{
|
||||
return __('admin.nav.platform');
|
||||
}
|
||||
protected static ?int $navigationSort = 40;
|
||||
|
||||
public static function form(Schema $form): Schema
|
||||
{
|
||||
return $form->schema([
|
||||
TextInput::make('slug')
|
||||
->label('Slug')
|
||||
->label(__('admin.legal_pages.fields.slug'))
|
||||
->required()
|
||||
->unique(ignoreRecord: true)
|
||||
->maxLength(255),
|
||||
KeyValue::make('title')
|
||||
->label('Title (de/en)')
|
||||
->keyLabel('locale')
|
||||
->valueLabel('value')
|
||||
->label(__('admin.legal_pages.fields.title_localized'))
|
||||
->keyLabel(__('admin.common.locale'))
|
||||
->valueLabel(__('admin.common.value'))
|
||||
->default(['de' => '', 'en' => ''])
|
||||
->required(),
|
||||
SchemaTabs::make('content_tabs')
|
||||
->label('Content Localization')
|
||||
->label(__('admin.legal_pages.fields.content_localization'))
|
||||
->tabs([
|
||||
SchemaTab::make('German')
|
||||
SchemaTab::make(__('admin.common.german'))
|
||||
->icon('heroicon-o-language')
|
||||
->schema([
|
||||
MarkdownEditor::make('body_markdown.de')
|
||||
->label('Content (German)')
|
||||
->label(__('admin.legal_pages.fields.content_de'))
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
SchemaTab::make('English')
|
||||
SchemaTab::make(__('admin.common.english'))
|
||||
->icon('heroicon-o-language')
|
||||
->schema([
|
||||
MarkdownEditor::make('body_markdown.en')
|
||||
->label('Content (English)')
|
||||
->label(__('admin.legal_pages.fields.content_en'))
|
||||
->required()
|
||||
->columnSpanFull(),
|
||||
]),
|
||||
])
|
||||
->columnSpanFull(),
|
||||
Toggle::make('is_published')
|
||||
->label('Is Published')
|
||||
->label(__('admin.legal_pages.fields.is_published'))
|
||||
->default(true),
|
||||
DatePicker::make('effective_from')
|
||||
->label('Effective From')
|
||||
->label(__('admin.legal_pages.fields.effective_from'))
|
||||
->required(),
|
||||
TextInput::make('version')
|
||||
->label('Version')
|
||||
->label(__('admin.legal_pages.fields.version'))
|
||||
->required()
|
||||
->default('1.0')
|
||||
->maxLength(20),
|
||||
|
||||
Reference in New Issue
Block a user