@ticketboothapp/booking 1.2.62 → 1.2.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/booking/AdminChangeBookingFlow.tsx +4915 -0
- package/src/components/booking/BookingFlow.tsx +8 -3
- package/src/components/booking/ChangeBookingFlow.tsx +112 -578
- package/src/components/booking/booking-flow-types.ts +3 -5
- package/src/index.ts +1 -0
- package/src/lib/booking/change-flow-pricing.ts +6 -5
|
@@ -3,7 +3,6 @@ import type { Product } from '../../lib/booking-api';
|
|
|
3
3
|
import type { BookingSourceMetadata } from '../../lib/booking/source-metadata';
|
|
4
4
|
import type { Currency } from './CurrencySwitcher';
|
|
5
5
|
import type { BookingFlowUiOptions } from './booking-flow-ui';
|
|
6
|
-
import type { ProviderDashboardChangeBookingPayload } from './provider-dashboard-change-booking';
|
|
7
6
|
|
|
8
7
|
/** Live selection snapshot for change-booking compare UI (parent dialog). */
|
|
9
8
|
export interface ChangeFlowSelectionPreview {
|
|
@@ -109,7 +108,7 @@ export interface BookingFlowBaseProps {
|
|
|
109
108
|
/** Standard (new) reservation flow — no change-booking receipt or callbacks. */
|
|
110
109
|
export interface NewBookingFlowProps extends BookingFlowBaseProps {}
|
|
111
110
|
|
|
112
|
-
/** Change booking — adds receipt snapshot, compare preview, and
|
|
111
|
+
/** Change booking — adds receipt snapshot, compare preview, and dashboard selection preview hooks. */
|
|
113
112
|
export interface ChangeBookingFlowProps extends BookingFlowBaseProps {
|
|
114
113
|
/** Called when date/tickets/itinerary selection updates (for side-by-side compare in dialog). */
|
|
115
114
|
onChangeFlowSelectionPreview?: (preview: ChangeFlowSelectionPreview | null) => void;
|
|
@@ -128,10 +127,9 @@ export interface ChangeBookingFlowProps extends BookingFlowBaseProps {
|
|
|
128
127
|
}>;
|
|
129
128
|
} | null;
|
|
130
129
|
/**
|
|
131
|
-
*
|
|
132
|
-
* quote and payment (`quoteChangeBooking`, Stripe).
|
|
130
|
+
* When true, {@link BookingFlow} renders {@link AdminChangeBookingFlow} (placeholder split from customer flow).
|
|
133
131
|
*/
|
|
134
|
-
|
|
132
|
+
useAdminChangeBookingFlow?: boolean;
|
|
135
133
|
}
|
|
136
134
|
|
|
137
135
|
/**
|
package/src/index.ts
CHANGED
|
@@ -15,6 +15,7 @@ export {
|
|
|
15
15
|
export { BookingFlow } from './components/booking/BookingFlow';
|
|
16
16
|
export { NewBookingFlow } from './components/booking/NewBookingFlow';
|
|
17
17
|
export { ChangeBookingFlow } from './components/booking/ChangeBookingFlow';
|
|
18
|
+
export { AdminChangeBookingFlow } from './components/booking/AdminChangeBookingFlow';
|
|
18
19
|
export type {
|
|
19
20
|
BookingFlowBaseProps,
|
|
20
21
|
BookingFlowProps,
|
|
@@ -5,9 +5,10 @@
|
|
|
5
5
|
* channel) on top of these formulas.
|
|
6
6
|
*
|
|
7
7
|
* ### 1. When receipt “paid floors” apply
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* floors
|
|
8
|
+
* When the booking’s **parent catalog product** matches the **loaded product** (`changeFlowApplyReceiptPaidFloors` in
|
|
9
|
+
* BookingFlow). The **host embed** must pass `originalReceipt.lineItems` (or `returnUnitFloorPerPerson`) into change mode
|
|
10
|
+
* so return/ticket floors match the server; without receipt lines the UI can hide a $0 catalog return row while the BE
|
|
11
|
+
* still applies a receipt return floor.
|
|
11
12
|
*
|
|
12
13
|
* ### 2. Tickets (per category)
|
|
13
14
|
* **Unchanged itinerary** (same calendar departure date **and** same product option as the booking): among seats up to the
|
|
@@ -26,12 +27,12 @@
|
|
|
26
27
|
* BE `PublicChangeBookingQuotePricing`: **baseline party** (originally booked headcount) vs **incremental** seats. **Rule A**
|
|
27
28
|
* (same `returnAvailabilityId` as the booking **and** unchanged outbound itinerary): protected pay exact locked per person;
|
|
28
29
|
* incremental pay **live catalog** return only ($0 when free). **Else Rule B:** protected pay **`max(floor, live)`**;
|
|
29
|
-
* incremental pay **live** only.
|
|
30
|
+
* incremental pay **live** only.
|
|
30
31
|
*
|
|
31
32
|
* ### 5. Return option — **picker UI only** (BookingFlow)
|
|
32
33
|
* **Self-serve:** return cards use the floored per-person price when a floor exists (aligned with §4), for every return
|
|
33
34
|
* slot, regardless of date/option change.
|
|
34
|
-
* **Provider dashboard:** cards show **catalog** prices
|
|
35
|
+
* **Provider dashboard:** return cards typically show **catalog** prices; order summary still uses §4 when receipt floors are available.
|
|
35
36
|
*
|
|
36
37
|
* ### 6. Quote “new booking” total & balance
|
|
37
38
|
* **FE proposed total** = full cart math (subtotal + tax − promo), cent-rounded; optional **1¢ reconcile** to old receipt
|