feat(crm): event-type dropdown on quotes; quote→event uses it (no more hardcoded 'wedding')

Quotes now carry an event type (migration 146: quotes.event_type, the
event_types.slug_prefix), chosen from the active event-types catalog in the
quote editor's Event section. convertToEvent reads it instead of the
unconditional hardcoded 'wedding': quote.event_type → crm_default_event_type
setting → 'wedding' as last-resort seeded fallback. When the booking flow's
prepare_event is wired, it reads the same field.

Backend: createQuote/updateQuote persist event_type (hasColumn-guarded);
adminQuotes route accepts + returns eventType. Frontend: FormState + payload +
load + a catalog-sourced dropdown ("— Use default —"); EN/DE strings.
This commit is contained in:
Luca
2026-06-23 17:52:50 +02:00
parent 182e655fcf
commit f78671fc6c
7 changed files with 78 additions and 2 deletions
+2
View File
@@ -63,6 +63,7 @@ export interface QuoteSummary {
validUntil: string | null;
eventName: string | null;
eventDate: string | null;
eventType: string | null;
totalAmountMinor: number;
sentAt: string | null;
acceptedAt: string | null;
@@ -178,6 +179,7 @@ export interface QuoteCreatePayload {
validUntil?: string;
eventName?: string;
eventDate?: string;
eventType?: string | null;
eventTimeStart?: string;
eventTimeEnd?: string;
expectedDurationHours?: number;