Hintergründe zum EventInvitePage Layout Customizer hinzugefügt. Badge und CTA entfernt, Textfelder zu Textareas gemacht. Geschenkgutscheine verbessert, E-Mail-Versand ergänzt + Resend + Confirmationseite mit Code-Copy und Link zur Package-Seite, die den Code als URL-Parameter enthält.

This commit is contained in:
Codex Agent
2025-12-08 16:20:04 +01:00
parent 046e2fe3ec
commit 4784c23e70
35 changed files with 1503 additions and 136 deletions

View File

@@ -0,0 +1,58 @@
<?php
namespace App\Mail;
use App\Models\GiftVoucher;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Mail\Mailables\Content;
use Illuminate\Mail\Mailables\Envelope;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\URL;
class GiftVoucherIssued extends Mailable
{
use Queueable, SerializesModels;
public function __construct(
public GiftVoucher $voucher,
public bool $forRecipient = false
) {}
public function envelope(): Envelope
{
$amount = number_format((float) $this->voucher->amount, 2);
return new Envelope(
subject: $this->forRecipient
? __('emails.gift_voucher.recipient.subject', ['amount' => $amount, 'currency' => $this->voucher->currency])
: __('emails.gift_voucher.purchaser.subject', ['amount' => $amount, 'currency' => $this->voucher->currency]),
);
}
public function content(): Content
{
$amount = number_format((float) $this->voucher->amount, 2);
$printUrl = URL::signedRoute('marketing.gift-vouchers.print', [
'locale' => app()->getLocale(),
'voucher' => $this->voucher->id,
'code' => $this->voucher->code,
]);
return new Content(
view: 'emails.gift-voucher',
with: [
'voucher' => $this->voucher,
'amount' => $amount,
'currency' => $this->voucher->currency,
'forRecipient' => $this->forRecipient,
'printUrl' => $printUrl,
],
);
}
public function attachments(): array
{
return [];
}
}