feat(notification): update welcome email to include tenant URL and call-to-action button

This commit is contained in:
ncoronel 2026-09-04 10:51:00 -03:00
parent ffa3f10b18
commit e4db36e650
2 changed files with 8 additions and 2 deletions

View File

@ -32,13 +32,14 @@ class NotificationMailService
$tenant = Tenant::query()->with('websiteType')->where('codigo', $tenantCode)->firstOrFail();
$user = User::query()->findOrFail($userId);
$brand = $tenant->websiteType ?? $tenant;
$tenantUrl = 'https://'.$tenant->dominio.$tenant->base_path;
$this->mailService
->forTenant($tenantCode)
->send(
$user->email,
"Bienvenido a {$brand->nombre}",
view('mail.notifications.welcome', compact('brand', 'user'))->render(),
view('mail.notifications.welcome', compact('brand', 'user', 'tenantUrl'))->render(),
$brand,
);

View File

@ -1,3 +1,8 @@
<h1 style="margin: 0 0 20px;">¡Bienvenido a {{ $brand->nombre }}!</h1>
<p>Hola {{ $user->nombre_apellido }}, tu cuenta fue creada correctamente.</p>
<p>Ya podés ingresar y comenzar a comprar.</p>
<div style="text-align: center; margin-bottom: 28px;">
<a href="{{ $tenantUrl }}"
style="display: inline-block; padding: 12px 24px; background-color: {{ $brand->primary_color }}; color: #ffffff; text-decoration: none; border-radius: 6px; font-weight: bold;">
Encendé tu experiencia
</a>
</div>