Anbieter: Kontakt + Kündigung als Stammdaten
Sieben neue optionale Felder am Provider (contactEmail, contactPhone, contactFax, contactAddress, cancellationEmail, cancellationFax, cancellationAddress). Postadressen TEXT, Rest VARCHAR(191). Migration mit IF NOT EXISTS. Modal "Anbieter bearbeiten" bekommt neue Sektion "Kontakt & Kündigung" mit zwei Untergruppen. Backend validiert Emails gegen isValidEmail (Header-Injection-Schutz), Telefon/Fax gegen sanitizePhoneField (kein CRLF), Postadressen via sanitizeNotes mit 500-Cap. Factory-Defaults Export/Import mitgezogen. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,13 @@ export interface ProviderExport {
|
||||
portalUrl: string | null;
|
||||
usernameFieldName: string | null;
|
||||
passwordFieldName: string | null;
|
||||
contactEmail: string | null;
|
||||
contactPhone: string | null;
|
||||
contactFax: string | null;
|
||||
contactAddress: string | null;
|
||||
cancellationEmail: string | null;
|
||||
cancellationFax: string | null;
|
||||
cancellationAddress: string | null;
|
||||
isActive: boolean;
|
||||
tariffs: { name: string; isActive: boolean }[];
|
||||
}
|
||||
@@ -90,6 +97,13 @@ export async function collectFactoryDefaults() {
|
||||
portalUrl: p.portalUrl,
|
||||
usernameFieldName: p.usernameFieldName,
|
||||
passwordFieldName: p.passwordFieldName,
|
||||
contactEmail: p.contactEmail,
|
||||
contactPhone: p.contactPhone,
|
||||
contactFax: p.contactFax,
|
||||
contactAddress: p.contactAddress,
|
||||
cancellationEmail: p.cancellationEmail,
|
||||
cancellationFax: p.cancellationFax,
|
||||
cancellationAddress: p.cancellationAddress,
|
||||
isActive: p.isActive,
|
||||
tariffs: p.tariffs.map((t) => ({ name: t.name, isActive: t.isActive })),
|
||||
})),
|
||||
@@ -284,6 +298,13 @@ export async function importFactoryDefaults(
|
||||
portalUrl: p.portalUrl ?? null,
|
||||
usernameFieldName: p.usernameFieldName ?? null,
|
||||
passwordFieldName: p.passwordFieldName ?? null,
|
||||
contactEmail: p.contactEmail ?? null,
|
||||
contactPhone: p.contactPhone ?? null,
|
||||
contactFax: p.contactFax ?? null,
|
||||
contactAddress: p.contactAddress ?? null,
|
||||
cancellationEmail: p.cancellationEmail ?? null,
|
||||
cancellationFax: p.cancellationFax ?? null,
|
||||
cancellationAddress: p.cancellationAddress ?? null,
|
||||
isActive: p.isActive ?? true,
|
||||
},
|
||||
create: {
|
||||
@@ -291,6 +312,13 @@ export async function importFactoryDefaults(
|
||||
portalUrl: p.portalUrl ?? null,
|
||||
usernameFieldName: p.usernameFieldName ?? null,
|
||||
passwordFieldName: p.passwordFieldName ?? null,
|
||||
contactEmail: p.contactEmail ?? null,
|
||||
contactPhone: p.contactPhone ?? null,
|
||||
contactFax: p.contactFax ?? null,
|
||||
contactAddress: p.contactAddress ?? null,
|
||||
cancellationEmail: p.cancellationEmail ?? null,
|
||||
cancellationFax: p.cancellationFax ?? null,
|
||||
cancellationAddress: p.cancellationAddress ?? null,
|
||||
isActive: p.isActive ?? true,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user