Fix: Anrede per Du/Sie wird nicht gespeichert
Das useInformalAddress-Feld war: 1. Im Frontend-Submit-Handler nicht in submitData enthalten (wurde bei jedem Update rausgefiltert) 2. Im Service-Type nicht definiert (TypeScript-mäßig unbekannt) 3. Beim Laden im Edit-Mode: Boolean aus DB matchte nicht das String-value des <select> Fixes: - Frontend: submitData enthält jetzt useInformalAddress (String oder Boolean → sauberes Boolean) - Frontend: beim reset() wird Boolean zu 'true'/'false' konvertiert für <select> - Backend: Service-Type erweitert um useInformalAddress, autoBirthdayGreeting, autoBirthdayChannel - Backend: Audit-Feldlabels für die neuen Felder Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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({
|
||||
|
||||
Reference in New Issue
Block a user