Deploy 1: i18n + Notifications + Global Search + Tests

- SetLocale middleware (ro/ru/en, session-first, user-persisted)
- Lang switcher in topbar (Filament render hook USER_MENU_BEFORE)
- POST /locale/{lang} route persists to user.locale + session
- Database notifications enabled on tenant panel (30s polling)
- GlobalSearch (Cmd+K / Ctrl+K) on Client, Vehicle, WorkOrder, Lead, Part
- Tests: TenantIsolation (4), AuthFlow (2), WorkOrderCalc (3), MarkupRule (3)
This commit is contained in:
2026-05-07 18:22:48 +00:00
parent 6c72fc7db1
commit d1e0695930
17 changed files with 770 additions and 0 deletions
@@ -27,6 +27,24 @@ class VehicleResource extends Resource
protected static ?int $navigationSort = 20;
public static function getGloballySearchableAttributes(): array
{
return ['plate', 'vin', 'brand', 'model'];
}
public static function getGlobalSearchResultTitle(\Illuminate\Database\Eloquent\Model $record): string
{
return trim(($record->brand ?? '') . ' ' . ($record->model ?? '') . ' — ' . ($record->plate ?? $record->vin ?? '?'));
}
public static function getGlobalSearchResultDetails(\Illuminate\Database\Eloquent\Model $record): array
{
return [
'Client' => $record->client?->name ?? '—',
'An' => $record->year ?? '—',
];
}
public static function form(Schema $schema): Schema
{
return $schema->components([