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:
@@ -27,20 +27,29 @@ class RefundReceipt extends Notification implements ShouldQueue
|
||||
$tenant = $this->purchase->tenant;
|
||||
$package = $this->purchase->package;
|
||||
$amount = number_format((float) $this->purchase->price, 2);
|
||||
|
||||
$mail = (new MailMessage)
|
||||
->subject(__('emails.refund.subject', ['package' => $package?->name ?? __('emails.package_limits.package_fallback')]))
|
||||
->greeting(__('emails.refund.greeting', ['name' => $tenant?->name ?? __('emails.package_limits.team_fallback')]))
|
||||
->line(__('emails.refund.body', [
|
||||
$subject = __('emails.refund.subject', ['package' => $package?->name ?? __('emails.package_limits.package_fallback')]);
|
||||
$greeting = __('emails.refund.greeting', ['name' => $tenant?->name ?? __('emails.package_limits.team_fallback')]);
|
||||
$lines = [
|
||||
__('emails.refund.body', [
|
||||
'amount' => $amount,
|
||||
'currency' => '€',
|
||||
'provider_id' => $this->purchase->provider_id ?? '—',
|
||||
]));
|
||||
]),
|
||||
];
|
||||
|
||||
if ($this->reason) {
|
||||
$mail->line(__('emails.refund.reason', ['reason' => $this->reason]));
|
||||
$lines[] = __('emails.refund.reason', ['reason' => $this->reason]);
|
||||
}
|
||||
|
||||
return $mail->line(__('emails.refund.footer'));
|
||||
return (new MailMessage)
|
||||
->subject($subject)
|
||||
->view('emails.notifications.basic', [
|
||||
'title' => $subject,
|
||||
'preheader' => $greeting,
|
||||
'heroTitle' => $greeting,
|
||||
'heroSubtitle' => $subject,
|
||||
'lines' => $lines,
|
||||
'footer' => __('emails.refund.footer'),
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user