Converted all notification emails to the branded layout by routing them through a shared Blade template and swapping
the MailMessage builders to use view(). This keeps the existing copy/labels but aligns the look with resources/views/ emails/partials/layout.blade.php. I also switched the customer add‑on receipt notification to reuse the existing branded view and added missing translations for the upload pipeline alert.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@extends('emails.partials.layout')
|
||||
|
||||
@php
|
||||
/** @var \App\Models\EventPackageAddon $addon */
|
||||
$event = $addon->event;
|
||||
@@ -14,31 +16,45 @@
|
||||
if ($addon->extra_gallery_days > 0) {
|
||||
$summary[] = __('emails.addons.receipt.summary.gallery', ['count' => $addon->extra_gallery_days]);
|
||||
}
|
||||
$eventName = $event?->name['de'] ?? $event?->name['en'] ?? $event?->name ?? __('emails.package_limits.event_fallback');
|
||||
$ctaUrl = url('/tenant/events/'.($event?->slug ?? ''));
|
||||
@endphp
|
||||
|
||||
@component('mail::message')
|
||||
# {{ __('emails.addons.receipt.subject', ['addon' => $label]) }}
|
||||
@section('title', __('emails.addons.receipt.subject', ['addon' => $label]))
|
||||
@section('preheader', __('emails.addons.receipt.subtitle', ['addon' => $label]))
|
||||
@section('hero_title', __('emails.addons.receipt.greeting', ['name' => $tenant?->name ?? __('emails.package_limits.team_fallback')]))
|
||||
@section('hero_subtitle', __('emails.addons.receipt.subtitle', ['addon' => $label]))
|
||||
|
||||
{{ __('emails.addons.receipt.greeting', ['name' => $tenant?->name ?? __('emails.package_limits.team_fallback')]) }}
|
||||
@section('content')
|
||||
<p style="margin:0 0 12px; font-size:15px; color:#1f2937;">
|
||||
{{ __('emails.addons.receipt.body', [
|
||||
'addon' => $label,
|
||||
'event' => $eventName,
|
||||
'amount' => $amount,
|
||||
]) }}
|
||||
</p>
|
||||
@if (! empty($summary))
|
||||
<div style="background-color:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:16px; margin-bottom:12px;">
|
||||
<p style="margin:0 0 8px; font-size:13px; text-transform:uppercase; letter-spacing:0.08em; color:#64748b;">
|
||||
{{ __('emails.addons.receipt.summary_title') }}
|
||||
</p>
|
||||
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="border-collapse:collapse;">
|
||||
@foreach ($summary as $line)
|
||||
<tr>
|
||||
<td style="padding:6px 0; font-size:14px; color:#0f172a;">{{ $line }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
</div>
|
||||
@endif
|
||||
@endsection
|
||||
|
||||
{{ __('emails.addons.receipt.body', [
|
||||
'addon' => $label,
|
||||
'event' => $event?->name['de'] ?? $event?->name['en'] ?? $event?->name ?? __('emails.package_limits.event_fallback'),
|
||||
'amount' => $amount,
|
||||
]) }}
|
||||
@section('cta')
|
||||
<a href="{{ $ctaUrl }}" style="display:inline-block; background-color:#111827; color:#ffffff; text-decoration:none; padding:12px 20px; border-radius:999px; font-weight:600; font-size:14px;">
|
||||
{{ __('emails.addons.receipt.action') }}
|
||||
</a>
|
||||
@endsection
|
||||
|
||||
@if(!empty($summary))
|
||||
**{{ __('emails.addons.receipt.summary_title', 'Included:') }}**
|
||||
|
||||
@foreach($summary as $line)
|
||||
- {{ $line }}
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
@component('mail::button', ['url' => url('/tenant/events/'.($event?->slug ?? ''))])
|
||||
{{ __('emails.addons.receipt.action') }}
|
||||
@endcomponent
|
||||
|
||||
{{ __('emails.package_limits.footer') }}
|
||||
|
||||
@endcomponent
|
||||
@section('footer')
|
||||
{!! __('emails.brand.footer') !!}
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user