feat: mail change and return 0

This commit is contained in:
Leon Morival 2026-04-29 15:24:36 +02:00
parent 932d9a38a4
commit 9b7d3ea9dc
2 changed files with 8 additions and 4 deletions

View File

@ -33,6 +33,11 @@ class HuntResource extends JsonResource
return (int) $stepsSumXp;
}
return (int) $this->resource->steps()->sum('xp');
return (int) (
$this->resource->steps_sum_xp
?? $this->resource->steps?->sum('xp')
?? $this->resource->steps()->sum('xp')
?? 0
);
}
}

View File

@ -12,7 +12,6 @@
<table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width: 560px; overflow: hidden; background: #ffffff; border: 1px solid #e6ebf2; border-radius: 12px;">
<tr>
<td style="padding: 32px 32px 16px;">
<p style="margin: 0 0 8px; color: #657086; font-size: 14px;">{{ config('app.name') }}</p>
<h1 style="margin: 0; color: #101828; font-size: 28px; line-height: 1.2;">Quelqu'un vient de rejoindre ta hunt</h1>
</td>
</tr>
@ -49,8 +48,8 @@
Garde un oeil sur l'activité de cette hunt pour suivre sa progression et préparer la suite de l'expérience.
</p>
<p style="margin: 0;">
<a href="{{ config('app.url') }}" style="display: inline-block; padding: 14px 22px; background: #16a34a; border-radius: 8px; color: #ffffff; font-size: 16px; font-weight: 700; text-decoration: none;">
Ouvrir {{ config('app.name') }}
<a href="{{ config('app.url') . '/admin }}" style="display: inline-block; padding: 14px 22px; background: #16a34a; border-radius: 8px; color: #ffffff; font-size: 16px; font-weight: 700; text-decoration: none;">
Ouvrir le tableau de bord
</a>
</p>
</td>