diff --git a/backend/src/controllers/customer.controller.ts b/backend/src/controllers/customer.controller.ts index 6759e20b..4b435c6b 100644 --- a/backend/src/controllers/customer.controller.ts +++ b/backend/src/controllers/customer.controller.ts @@ -88,6 +88,9 @@ export async function updateCustomer(req: Request, res: Response): Promise salutation: 'Anrede', firstName: 'Vorname', lastName: 'Nachname', email: 'E-Mail', phone: 'Telefon', mobile: 'Mobil', birthDate: 'Geburtsdatum', birthPlace: 'Geburtsort', companyName: 'Firma', type: 'Typ', taxNumber: 'Steuernummer', notes: 'Notizen', + useInformalAddress: 'Anrede per', + autoBirthdayGreeting: 'Autom. Geburtstagsgruß', + autoBirthdayChannel: 'Kanal für Geburtstagsgruß', }; for (const [key, value] of Object.entries(data)) { // Technische/interne Felder überspringen diff --git a/backend/src/services/customer.service.ts b/backend/src/services/customer.service.ts index 32e9287a..755abf7b 100644 --- a/backend/src/services/customer.service.ts +++ b/backend/src/services/customer.service.ts @@ -136,6 +136,7 @@ export async function updateCustomer( data: { type?: CustomerType; salutation?: string; + useInformalAddress?: boolean; firstName?: string; lastName?: string; companyName?: string; @@ -148,6 +149,8 @@ export async function updateCustomer( businessRegistration?: string; commercialRegister?: string; notes?: string; + autoBirthdayGreeting?: boolean; + autoBirthdayChannel?: string | null; } ) { return prisma.customer.update({ diff --git a/frontend/src/pages/customers/CustomerForm.tsx b/frontend/src/pages/customers/CustomerForm.tsx index f0d15cf7..6f8b7254 100644 --- a/frontend/src/pages/customers/CustomerForm.tsx +++ b/frontend/src/pages/customers/CustomerForm.tsx @@ -39,6 +39,8 @@ export default function CustomerForm() { if (data.foundingDate) { data.foundingDate = data.foundingDate.split('T')[0] as any; } + // Boolean → String für