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,65 @@
@php
$withdrawalUrl = app()->getLocale() === 'de' ? url('/de/widerrufsbelehrung') : url('/en/withdrawal');
@endphp
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="UTF-8">
<title>{{ $forRecipient ? __('emails.gift_voucher.recipient.subject', ['amount' => $amount, 'currency' => $currency]) : __('emails.gift_voucher.purchaser.subject', ['amount' => $amount, 'currency' => $currency]) }}</title>
</head>
<body style="font-family: Arial, sans-serif; background-color: #f7f7f7; padding: 20px; color: #111827;">
<div style="max-width: 640px; margin: 0 auto; background: #ffffff; border-radius: 10px; padding: 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);">
<h1 style="margin-top: 0; font-size: 22px;">
{{ $forRecipient ? __('emails.gift_voucher.recipient.greeting') : __('emails.gift_voucher.purchaser.greeting') }}
</h1>
<p style="font-size: 15px; line-height: 1.6; margin-bottom: 16px;">
{!! $forRecipient
? __('emails.gift_voucher.recipient.body', [
'amount' => $amount,
'currency' => $currency,
'purchaser' => $voucher->purchaser_email,
])
: __('emails.gift_voucher.purchaser.body', [
'amount' => $amount,
'currency' => $currency,
'recipient' => $voucher->recipient_email ?: __('emails.gift_voucher.purchaser.recipient_fallback'),
])
!!}
</p>
@if ($voucher->message)
<div style="margin: 18px 0; padding: 14px 16px; background: #f3f4f6; border-left: 4px solid #2563eb; border-radius: 8px;">
<strong>{{ __('emails.gift_voucher.message_title') }}</strong>
<p style="margin: 8px 0 0; white-space: pre-line;">{{ $voucher->message }}</p>
</div>
@endif
<div style="margin: 18px 0; padding: 16px; border: 1px dashed #d1d5db; border-radius: 10px; background: #f9fafb;">
<p style="margin: 0 0 6px; font-size: 14px; color: #6b7280;">{{ __('emails.gift_voucher.code_label') }}</p>
<div style="display: inline-block; padding: 10px 14px; background: #111827; color: #ffffff; border-radius: 8px; font-weight: bold; letter-spacing: 1px;">
{{ $voucher->code }}
</div>
<p style="margin: 10px 0 0; font-size: 14px; color: #4b5563;">
{{ __('emails.gift_voucher.redeem_hint') }}
</p>
@isset($printUrl)
<p style="margin: 8px 0 0; font-size: 14px;">
<a href="{{ $printUrl }}">{{ __('emails.gift_voucher.printable') }}</a>
</p>
@endisset
</div>
<p style="font-size: 14px; color: #4b5563; margin: 12px 0;">
{{ __('emails.gift_voucher.expiry', ['date' => optional($voucher->expires_at)->toFormattedDateString()]) }}
</p>
<p style="font-size: 14px; color: #4b5563; margin: 12px 0;">
{!! __('emails.gift_voucher.withdrawal', ['url' => $withdrawalUrl]) !!}
</p>
<p style="font-size: 14px; color: #4b5563; margin-top: 20px;">
{!! __('emails.gift_voucher.footer') !!}
</p>
</div>
</body>
</html>

View File

@@ -0,0 +1,62 @@
@php
use SimpleSoftwareIO\QrCode\Facades\QrCode;
@endphp
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
<meta charset="UTF-8">
<title>{{ __('Gift Voucher') }} - {{ $voucher->code }}</title>
<style>
body { font-family: Arial, sans-serif; background: #f7f7f7; margin: 0; padding: 20px; color: #111827; }
.wrap { max-width: 720px; margin: 0 auto; background: #fff; padding: 28px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.badge { display: inline-block; padding: 6px 10px; background: #eef2ff; color: #4338ca; border-radius: 10px; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.code { display: inline-block; padding: 10px 14px; background: #111827; color: #fff; border-radius: 10px; font-weight: bold; letter-spacing: 1px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(240px,1fr)); gap: 16px; margin-top: 18px; }
.card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #f9fafb; }
.muted { color: #6b7280; font-size: 14px; }
.title { font-size: 24px; margin: 10px 0; }
.qr { text-align: center; }
.qr svg { max-width: 180px; }
</style>
</head>
<body>
<div class="wrap">
<div class="badge">{{ __('Gift Voucher') }}</div>
<h1 class="title">{{ config('app.name') }}</h1>
<p class="muted">{{ __('Show or share this page, or scan the QR to redeem the voucher code at checkout.') }}</p>
<div class="grid">
<div class="card">
<p class="muted">{{ __('Voucher code') }}</p>
<div class="code">{{ $voucher->code }}</div>
<p class="muted" style="margin-top:12px;">
{{ __('Value') }}: {{ number_format((float) $voucher->amount, 2) }} {{ $voucher->currency }}<br>
@if($voucher->expires_at)
{{ __('Valid until') }}: {{ $voucher->expires_at->toFormattedDateString() }}
@endif
</p>
</div>
<div class="card qr">
{!! QrCode::size(180)->generate($voucher->code) !!}
<p class="muted">{{ __('Scan to redeem code at checkout') }}</p>
</div>
</div>
@if($voucher->recipient_name || $voucher->recipient_email)
<div class="card" style="margin-top:16px;">
<strong>{{ __('Recipient') }}:</strong>
<p class="muted" style="margin:6px 0 0;">
{{ $voucher->recipient_name ?? '' }} {{ $voucher->recipient_email ? '('.$voucher->recipient_email.')' : '' }}
</p>
</div>
@endif
@if($voucher->message)
<div class="card" style="margin-top:16px;">
<strong>{{ __('Message') }}</strong>
<p style="margin:8px 0 0; white-space: pre-line;">{{ $voucher->message }}</p>
</div>
@endif
</div>
</body>
</html>