feat: branded HookLab approval email + decouple email from Stripe

- Email sending now independent from Stripe payment link generation
- Professional dark-themed HTML email template matching HookLab branding
- Return emailSent/emailError/stripeError status in API response
- Admin UI shows detailed status after approve action
- Default to onboarding@resend.dev when no custom domain

https://claude.ai/code/session_01H2aRGDaKgarPvhay2HxN6Y
This commit is contained in:
Claude
2026-02-10 19:43:05 +00:00
parent eafa783040
commit a6f32dd77a
2 changed files with 112 additions and 37 deletions

View File

@@ -62,6 +62,15 @@ export default function AdminCandidaturesPage() {
setCheckoutUrls((prev) => ({ ...prev, [id]: data.checkoutUrl }));
}
// Afficher le statut détaillé
const msgs: string[] = [];
if (data.emailSent) msgs.push("Email envoyé !");
if (data.emailError) msgs.push("Email : " + data.emailError);
if (data.stripeError) msgs.push("Stripe : " + data.stripeError);
if (msgs.length > 0) {
setError(msgs.join(" | "));
}
await fetchCandidatures();
} catch (err) {
setError(err instanceof Error ? err.message : "Erreur");