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:
Codex Agent
2025-10-19 23:00:47 +02:00
parent a949c8d3af
commit 6290a3a448
95 changed files with 3708 additions and 394 deletions

View File

@@ -17,7 +17,7 @@ class AbandonedCheckout extends Mailable
public function __construct(
public User $user,
public Package $package,
public string $timing, // '1h', '24h', '1w'
public string $timing,
public string $resumeUrl
) {
//
@@ -25,10 +25,9 @@ class AbandonedCheckout extends Mailable
public function envelope(): Envelope
{
$subjectKey = 'emails.abandoned_checkout.subject_' . $this->timing;
return new Envelope(
subject: __('emails.abandoned_checkout.subject_' . $this->timing, [
'package' => $this->package->name
'package' => $this->localizedPackageName(),
]),
);
}
@@ -40,6 +39,7 @@ class AbandonedCheckout extends Mailable
with: [
'user' => $this->user,
'package' => $this->package,
'packageName' => $this->localizedPackageName(),
'timing' => $this->timing,
'resumeUrl' => $this->resumeUrl,
],
@@ -50,4 +50,11 @@ class AbandonedCheckout extends Mailable
{
return [];
}
}
private function localizedPackageName(): string
{
$locale = $this->locale ?? app()->getLocale();
return $this->package->getNameForLocale($locale);
}
}

View File

@@ -20,7 +20,7 @@ class ContactConfirmation extends Mailable
public function envelope(): Envelope
{
return new Envelope(
subject: 'Vielen Dank fuer Ihre Nachricht bei Fotospiel',
subject: __('emails.contact_confirmation.subject', ['name' => $this->name]),
);
}

View File

@@ -21,7 +21,7 @@ class PurchaseConfirmation extends Mailable
public function envelope(): Envelope
{
return new Envelope(
subject: __('emails.purchase.subject', ['package' => $this->purchase->package->name]),
subject: __('emails.purchase.subject', ['package' => $this->localizedPackageName()]),
);
}
@@ -33,6 +33,7 @@ class PurchaseConfirmation extends Mailable
'purchase' => $this->purchase,
'user' => $this->purchase->tenant->user,
'package' => $this->purchase->package,
'packageName' => $this->localizedPackageName(),
],
);
}
@@ -41,4 +42,11 @@ class PurchaseConfirmation extends Mailable
{
return [];
}
}
private function localizedPackageName(): string
{
$locale = $this->locale ?? app()->getLocale();
return optional($this->purchase->package)->getNameForLocale($locale) ?? '';
}
}