Aggiunge routing contatti per reparto con endpoint Cloudflare e Resend

Introduce selettore reparto nel form, instradamento verso destinatari dedicati via variabili ambiente e fallback al destinatario generale. Mantiene modalita dev/live e validazione Turnstile lato server.

Made-with: Cursor
This commit is contained in:
Javaxman
2026-04-23 21:12:45 +02:00
parent 5ab329adbf
commit 70759d6c1c
6 changed files with 63 additions and 3 deletions

View File

@ -11,6 +11,7 @@ const model = {
fieldName: cf.fieldName,
fieldCompany: cf.fieldCompany,
fieldCountry: cf.fieldCountry,
fieldDepartment: cf.fieldDepartment,
fieldEmail: cf.fieldEmail,
fieldMessage: cf.fieldMessage,
};
@ -161,6 +162,20 @@ const fieldClass =
class={fieldClass}
/>
</div>
<div>
<label class="block text-xs font-medium text-nx-muted" for="nx-cf-department">
{cf.departmentLabel}
</label>
<select
id="nx-cf-department"
name={cf.fieldDepartment}
class={fieldClass}
>
{cf.departmentOptions.map((opt) => (
<option value={opt.value}>{opt.label}</option>
))}
</select>
</div>
<div>
<label class="block text-xs font-medium text-nx-muted" for="nx-cf-msg">
{cf.messageLabel}