feat(workflows): per-quote booking-workflow picker + quote→invoice (no gallery) built-in
A quote can now choose which flow runs on acceptance instead of every enabled quote.accepted flow firing. Migration 147 adds quotes.booking_workflow_id; the editor shows a "Booking workflow (on acceptance)" dropdown listing the quote.accepted flows (workflow-engine flag only); emitQuoteEvent passes it as the new emitWorkflowEvent targetWorkflowId so ONLY the picked flow runs (still gated on enabled + trigger match → a disabled/None selection runs nothing). Adds the booking_invoice_only built-in (quote.accepted → prepare invoice → review gate → send; no event/gallery, no wait), the variant requested for shoots billed without an online gallery. Disabled stub like the other booking flows until the prepare_*/send_document cutover. Tests: targetWorkflowId runs only the selected flow; invoice-only built-in has no wait/prepare_event.
This commit is contained in:
@@ -64,6 +64,7 @@ export interface QuoteSummary {
|
||||
eventName: string | null;
|
||||
eventDate: string | null;
|
||||
eventType: string | null;
|
||||
bookingWorkflowId: number | null;
|
||||
totalAmountMinor: number;
|
||||
sentAt: string | null;
|
||||
acceptedAt: string | null;
|
||||
@@ -180,6 +181,7 @@ export interface QuoteCreatePayload {
|
||||
eventName?: string;
|
||||
eventDate?: string;
|
||||
eventType?: string | null;
|
||||
bookingWorkflowId?: number | null;
|
||||
eventTimeStart?: string;
|
||||
eventTimeEnd?: string;
|
||||
expectedDurationHours?: number;
|
||||
|
||||
Reference in New Issue
Block a user