Fix tenant event form package selector so it no longer renders empty-value options, handles loading/empty
states, and pulls data from the authenticated /api/v1/tenant/packages endpoint.
(resources/js/admin/pages/EventFormPage.tsx, resources/js/admin/api.ts)
- Harden tenant-admin auth flow: prevent PKCE state loss, scope out StrictMode double-processing, add SPA
routes for /event-admin/login and /event-admin/logout, and tighten token/session clearing semantics (resources/js/admin/auth/{context,tokens}.tsx, resources/js/admin/pages/{AuthCallbackPage,LogoutPage}.tsx,
resources/js/admin/router.tsx, routes/web.php)
This commit is contained in:
@@ -99,6 +99,24 @@ class Package extends Model
|
||||
return $this->type === 'reseller';
|
||||
}
|
||||
|
||||
public function getNameForLocale(?string $locale = null): string
|
||||
{
|
||||
$locale = $locale ?: app()->getLocale();
|
||||
$translations = $this->name_translations ?? [];
|
||||
|
||||
if (!empty($translations[$locale])) {
|
||||
return $translations[$locale];
|
||||
}
|
||||
|
||||
foreach (['en', 'de'] as $fallback) {
|
||||
if ($locale !== $fallback && !empty($translations[$fallback])) {
|
||||
return $translations[$fallback];
|
||||
}
|
||||
}
|
||||
|
||||
return $this->name ?? '';
|
||||
}
|
||||
|
||||
public function getLimitsAttribute(): array
|
||||
{
|
||||
return [
|
||||
|
||||
Reference in New Issue
Block a user