diff --git a/app/app/lib/recesso.copy.ts b/app/app/lib/recesso.copy.ts index c8b0908..dcdfb97 100644 --- a/app/app/lib/recesso.copy.ts +++ b/app/app/lib/recesso.copy.ts @@ -47,6 +47,12 @@ export const ERROR = { generic: "Si è verificato un problema. Riprova tra poco.", } as const; +// Avvisi informativi (non bloccanti). +export const NOTICE = { + orderClosed: + "Questo ordine risulta già annullato o rimborsato. Puoi comunque registrare il recesso; il negozio ti contatterà per eventuali dettagli.", +} as const; + // Schermata finale (dopo "Conferma recesso"). export function successMessage( orderName: string, diff --git a/app/app/lib/recesso.server.ts b/app/app/lib/recesso.server.ts index 8a71e30..617cd78 100644 --- a/app/app/lib/recesso.server.ts +++ b/app/app/lib/recesso.server.ts @@ -806,6 +806,21 @@ const PAGE_CSS = ` font-size: 0.92rem; } .error__icon { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: currentColor; } + .notice { + display: flex; + align-items: flex-start; + gap: 10px; + background: rgba(240, 170, 40, 0.14); + border: 1px solid rgba(240, 170, 40, 0.55); + border-left: 3px solid rgba(240, 170, 40, 0.95); + border-radius: var(--radius-sm); + padding: 12px 14px; + margin: 0 0 18px; + color: var(--text); + font-size: 0.9rem; + line-height: 1.5; + } + .notice__icon { flex: none; width: 20px; height: 20px; margin-top: 1px; fill: #e0a020; } /* Riepilogo (step 3) */ .summary { margin: 18px 0 4px; } @@ -893,6 +908,14 @@ function errorBanner(message?: string): string { `; } +function noticeBanner(message?: string): string { + if (!message) return ""; + return `