implemented event package addons with filament resource, event-admin purchase path and notifications, showing up in purchase history
This commit is contained in:
44
resources/views/emails/addons/receipt.blade.php
Normal file
44
resources/views/emails/addons/receipt.blade.php
Normal file
@@ -0,0 +1,44 @@
|
||||
@php
|
||||
/** @var \App\Models\EventPackageAddon $addon */
|
||||
$event = $addon->event;
|
||||
$tenant = $event?->tenant;
|
||||
$label = $addon->metadata['label'] ?? $addon->addon_key;
|
||||
$amount = $addon->amount ? number_format((float) $addon->amount, 2).' '.($addon->currency ?? 'EUR') : __('emails.addons.receipt.unknown_amount');
|
||||
$summary = [];
|
||||
if ($addon->extra_photos > 0) {
|
||||
$summary[] = __('emails.addons.receipt.summary.photos', ['count' => number_format($addon->extra_photos)]);
|
||||
}
|
||||
if ($addon->extra_guests > 0) {
|
||||
$summary[] = __('emails.addons.receipt.summary.guests', ['count' => number_format($addon->extra_guests)]);
|
||||
}
|
||||
if ($addon->extra_gallery_days > 0) {
|
||||
$summary[] = __('emails.addons.receipt.summary.gallery', ['count' => $addon->extra_gallery_days]);
|
||||
}
|
||||
@endphp
|
||||
|
||||
@component('mail::message')
|
||||
# {{ __('emails.addons.receipt.subject', ['addon' => $label]) }}
|
||||
|
||||
{{ __('emails.addons.receipt.greeting', ['name' => $tenant?->name ?? __('emails.package_limits.team_fallback')]) }}
|
||||
|
||||
{{ __('emails.addons.receipt.body', [
|
||||
'addon' => $label,
|
||||
'event' => $event?->name['de'] ?? $event?->name['en'] ?? $event?->name ?? __('emails.package_limits.event_fallback'),
|
||||
'amount' => $amount,
|
||||
]) }}
|
||||
|
||||
@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
|
||||
Reference in New Issue
Block a user