From 2c1e7af7975dec79e5f6920b923d589e08fd009e Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 2 May 2026 00:34:26 +0200 Subject: [PATCH] Billing rework --- src/app/[locale]/settings/billing/page.tsx | 1 + src/components/onboarding/wizard.tsx | 19 ++++++++++++++++++- .../settings/billing-settings-form.tsx | 19 +++++++++++++++++-- src/messages/de.json | 6 ++++-- src/messages/en.json | 6 ++++-- src/messages/fr.json | 6 ++++-- src/messages/it.json | 6 ++++-- 7 files changed, 52 insertions(+), 11 deletions(-) diff --git a/src/app/[locale]/settings/billing/page.tsx b/src/app/[locale]/settings/billing/page.tsx index 1c230d2..28877c8 100644 --- a/src/app/[locale]/settings/billing/page.tsx +++ b/src/app/[locale]/settings/billing/page.tsx @@ -40,6 +40,7 @@ export default async function BillingSettingsPage() { isPersonal={user.isPersonal} orgName={user.orgName} userName={user.name} + userEmail={user.email} /> ); diff --git a/src/components/onboarding/wizard.tsx b/src/components/onboarding/wizard.tsx index 521b1a4..2a7af8e 100644 --- a/src/components/onboarding/wizard.tsx +++ b/src/components/onboarding/wizard.tsx @@ -1008,7 +1008,11 @@ export function OnboardingWizard({ })) } rows={3} - placeholder={t("billingNotesPlaceholder")} + placeholder={t( + isPersonal + ? "billingNotesPlaceholderPersonal" + : "billingNotesPlaceholder" + )} className="w-full px-3 py-2 bg-surface-2 border border-border rounded-lg text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent transition-colors resize-y" /> @@ -1113,6 +1117,19 @@ export function OnboardingWizard({ } /> + {/* Bug 35: VAT review row. Company customers see this so + they can verify the VAT id they typed before submitting. + Personal customers never see it — they don't have a + VAT number, the form didn't ask, the review hides it. */} + {!isPersonal && + config.billingAddress.vatNumber && + config.billingAddress.vatNumber.trim().length > 0 && ( + + )} setNotes(e.target.value)} rows={3} className="w-full px-3 py-2 rounded-lg border border-border bg-surface-2 text-text-primary text-sm focus:outline-none focus:border-text-secondary" - placeholder={t("notesPlaceholder")} + placeholder={t( + isPersonal ? "notesPlaceholderPersonal" : "notesPlaceholder" + )} /> diff --git a/src/messages/de.json b/src/messages/de.json index 9d55757..bb53f4b 100644 --- a/src/messages/de.json +++ b/src/messages/de.json @@ -118,7 +118,8 @@ "rejectionReason": "Angegebener Grund", "saveChanges": "Änderungen speichern", "billingVatNumber": "MWST-Nummer", - "billingVatHelp": "Ihre registrierte MWST-Nummer. Falls Ihre Firma von der MWST befreit ist, leer lassen und in den Notizen erläutern." + "billingVatHelp": "Ihre registrierte MWST-Nummer. Falls Ihre Firma von der MWST befreit ist, leer lassen und in den Notizen erläutern.", + "billingNotesPlaceholderPersonal": "Was wir wissen sollten — bevorzugte Zahlungsart, Rechnungsreferenz, etc." }, "dashboard": { "title": "Dashboard", @@ -409,6 +410,7 @@ "saved": "Gespeichert.", "saveFailed": "Konnte nicht gespeichert werden. Bitte erneut versuchen.", "lastUpdated": "Zuletzt aktualisiert {when}", - "fullName": "Voller Name" + "fullName": "Voller Name", + "notesPlaceholderPersonal": "Was wir wissen sollten — bevorzugte Zahlungsart, Rechnungsreferenz, etc." } } diff --git a/src/messages/en.json b/src/messages/en.json index 414482a..b30b57c 100644 --- a/src/messages/en.json +++ b/src/messages/en.json @@ -118,7 +118,8 @@ "rejectionReason": "Reason given", "saveChanges": "Save changes", "billingVatNumber": "VAT number", - "billingVatHelp": "Your registered VAT identifier. If your company is VAT-exempt, leave blank and explain in the notes field." + "billingVatHelp": "Your registered VAT identifier. If your company is VAT-exempt, leave blank and explain in the notes field.", + "billingNotesPlaceholderPersonal": "Anything we should know — preferred payment method, billing reference, etc." }, "dashboard": { "title": "Dashboard", @@ -409,6 +410,7 @@ "saved": "Saved.", "saveFailed": "Could not save. Please try again.", "lastUpdated": "Last updated {when}", - "fullName": "Full name" + "fullName": "Full name", + "notesPlaceholderPersonal": "Anything we should know — preferred payment method, billing reference, etc." } } diff --git a/src/messages/fr.json b/src/messages/fr.json index 18adff2..07e3ab9 100644 --- a/src/messages/fr.json +++ b/src/messages/fr.json @@ -118,7 +118,8 @@ "rejectionReason": "Motif indiqué", "saveChanges": "Enregistrer les modifications", "billingVatNumber": "Numéro de TVA", - "billingVatHelp": "Votre identifiant TVA enregistré. Si votre entreprise est exonérée de TVA, laissez vide et précisez dans les notes." + "billingVatHelp": "Votre identifiant TVA enregistré. Si votre entreprise est exonérée de TVA, laissez vide et précisez dans les notes.", + "billingNotesPlaceholderPersonal": "Tout ce que nous devons savoir — moyen de paiement préféré, référence de facturation, etc." }, "dashboard": { "title": "Tableau de bord", @@ -409,6 +410,7 @@ "saved": "Enregistré.", "saveFailed": "Impossible d'enregistrer. Veuillez réessayer.", "lastUpdated": "Dernière mise à jour {when}", - "fullName": "Nom complet" + "fullName": "Nom complet", + "notesPlaceholderPersonal": "Tout ce que nous devons savoir — moyen de paiement préféré, référence de facturation, etc." } } diff --git a/src/messages/it.json b/src/messages/it.json index 44f00ed..0419132 100644 --- a/src/messages/it.json +++ b/src/messages/it.json @@ -118,7 +118,8 @@ "rejectionReason": "Motivo indicato", "saveChanges": "Salva modifiche", "billingVatNumber": "Partita IVA", - "billingVatHelp": "Il tuo identificativo IVA registrato. Se la tua azienda è esente IVA, lascia vuoto e spiega nelle note." + "billingVatHelp": "Il tuo identificativo IVA registrato. Se la tua azienda è esente IVA, lascia vuoto e spiega nelle note.", + "billingNotesPlaceholderPersonal": "Qualsiasi cosa dovremmo sapere — metodo di pagamento preferito, riferimento per fatturazione, ecc." }, "dashboard": { "title": "Dashboard", @@ -409,6 +410,7 @@ "saved": "Salvato.", "saveFailed": "Impossibile salvare. Riprova.", "lastUpdated": "Ultimo aggiornamento {when}", - "fullName": "Nome completo" + "fullName": "Nome completo", + "notesPlaceholderPersonal": "Qualsiasi cosa dovremmo sapere — metodo di pagamento preferito, riferimento per fatturazione, ecc." } }