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:
2025-09-11 21:17:19 +02:00
parent 40aa5fc188
commit fc1e64fea3
33 changed files with 960 additions and 161 deletions

View File

@@ -9,7 +9,12 @@ use Filament\Actions;
class RecentPhotosTable extends BaseWidget
{
protected static ?string $heading = 'Recent uploads';
protected static ?string $heading = null;
public function getHeading()
{
return __('admin.widgets.recent_uploads.heading');
}
protected int|string|array $columnSpan = 'full';
public function table(Tables\Table $table): Tables\Table
@@ -21,22 +26,23 @@ class RecentPhotosTable extends BaseWidget
->limit(10)
)
->columns([
Tables\Columns\ImageColumn::make('thumbnail_path')->label('Thumb')->circular(),
Tables\Columns\TextColumn::make('id')->label('#'),
Tables\Columns\TextColumn::make('event_id')->label('Event'),
Tables\Columns\TextColumn::make('likes_count')->label('Likes'),
Tables\Columns\ImageColumn::make('thumbnail_path')->label(__('admin.common.thumb'))->circular(),
Tables\Columns\TextColumn::make('id')->label(__('admin.common.hash')),
Tables\Columns\TextColumn::make('event_id')->label(__('admin.common.event')),
Tables\Columns\TextColumn::make('likes_count')->label(__('admin.common.likes')),
Tables\Columns\TextColumn::make('created_at')->since(),
])
->actions([
Actions\Action::make('feature')
->label('Feature')
->label(__('admin.photos.actions.feature'))
->visible(fn(Photo $record) => ! (bool)($record->is_featured ?? 0))
->action(fn(Photo $record) => $record->update(['is_featured' => 1])),
Actions\Action::make('unfeature')
->label('Unfeature')
->label(__('admin.photos.actions.unfeature'))
->visible(fn(Photo $record) => (bool)($record->is_featured ?? 0))
->action(fn(Photo $record) => $record->update(['is_featured' => 0])),
])
->paginated(false);
}
}