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:
@@ -21,34 +21,39 @@ class TenantResource extends Resource
|
||||
{
|
||||
protected static ?string $model = Tenant::class;
|
||||
protected static BackedEnum|string|null $navigationIcon = 'heroicon-o-building-office';
|
||||
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 = 10;
|
||||
|
||||
public static function form(Schema $form): Schema
|
||||
{
|
||||
return $form->schema([
|
||||
TextInput::make('name')
|
||||
->label('Tenant Name')
|
||||
->label(__('admin.tenants.fields.name'))
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('slug')
|
||||
->label('Slug')
|
||||
->label(__('admin.tenants.fields.slug'))
|
||||
->required()
|
||||
->unique(ignoreRecord: true)
|
||||
->maxLength(255),
|
||||
TextInput::make('contact_email')
|
||||
->label('Contact Email')
|
||||
->label(__('admin.tenants.fields.contact_email'))
|
||||
->email()
|
||||
->required()
|
||||
->maxLength(255),
|
||||
TextInput::make('event_credits_balance')
|
||||
->label('Event Credits Balance')
|
||||
->label(__('admin.tenants.fields.event_credits_balance'))
|
||||
->numeric()
|
||||
->default(0),
|
||||
KeyValue::make('features')
|
||||
->label('Features')
|
||||
->keyLabel('Key')
|
||||
->valueLabel('Value'),
|
||||
->label(__('admin.tenants.fields.features'))
|
||||
->keyLabel(__('admin.common.key'))
|
||||
->valueLabel(__('admin.common.value')),
|
||||
])->columns(2);
|
||||
}
|
||||
|
||||
@@ -60,8 +65,8 @@ class TenantResource extends Resource
|
||||
Tables\Columns\TextColumn::make('name')->searchable()->sortable(),
|
||||
Tables\Columns\TextColumn::make('slug')->searchable(),
|
||||
Tables\Columns\TextColumn::make('contact_email'),
|
||||
Tables\Columns\TextColumn::make('event_credits_balance')->label('Credits'),
|
||||
Tables\Columns\TextColumn::make('last_activity_at')->since()->label('Last activity'),
|
||||
Tables\Columns\TextColumn::make('event_credits_balance')->label(__('admin.common.credits')),
|
||||
Tables\Columns\TextColumn::make('last_activity_at')->since()->label(__('admin.common.last_activity')),
|
||||
Tables\Columns\TextColumn::make('created_at')->dateTime()->toggleable(isToggledHiddenByDefault: true),
|
||||
])
|
||||
->filters([])
|
||||
|
||||
Reference in New Issue
Block a user