@ticketboothapp/booking 1.2.68 → 1.2.70
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
CHANGED
|
@@ -4511,6 +4511,10 @@ export function AdminChangeBookingFlow({
|
|
|
4511
4511
|
previousReturnAvailabilityId: initialValues?.returnAvailabilityId ?? null,
|
|
4512
4512
|
},
|
|
4513
4513
|
});
|
|
4514
|
+
const refAfterChange = initialValues?.bookingReference?.trim();
|
|
4515
|
+
if (refAfterChange) {
|
|
4516
|
+
onSuccess?.({ reservationReference: refAfterChange });
|
|
4517
|
+
}
|
|
4514
4518
|
setLoading(false);
|
|
4515
4519
|
return;
|
|
4516
4520
|
}
|
|
@@ -4832,22 +4836,31 @@ export function AdminChangeBookingFlow({
|
|
|
4832
4836
|
reservationExpiration: undefined,
|
|
4833
4837
|
customerLastName: lastName.trim(),
|
|
4834
4838
|
bookingDate: datePart,
|
|
4835
|
-
// Paid change:
|
|
4836
|
-
//
|
|
4839
|
+
// Paid change: customer site returns to /manage-booking with change_payment intent.
|
|
4840
|
+
// Provider dashboard embed uses getSuccessUrl (same as main booking tab) so Stripe does not 404 on /manage-booking.
|
|
4837
4841
|
successUrlOverride:
|
|
4838
4842
|
isCustomerSelfServeChange && changeBookingReferenceForPaidFlow
|
|
4839
|
-
?
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
: '';
|
|
4849
|
-
|
|
4850
|
-
|
|
4843
|
+
? bookingAppMode === 'provider-dashboard' && getSuccessUrl
|
|
4844
|
+
? getSuccessUrl({
|
|
4845
|
+
reservationRef:
|
|
4846
|
+
formatBookingRefForDisplay(changeBookingReferenceForPaidFlow) ||
|
|
4847
|
+
changeBookingReferenceForPaidFlow,
|
|
4848
|
+
lastName: lastName.trim(),
|
|
4849
|
+
focusDate: datePart,
|
|
4850
|
+
})
|
|
4851
|
+
: (() => {
|
|
4852
|
+
const origin = typeof window !== 'undefined' ? window.location.origin : '';
|
|
4853
|
+
const ref = encodeURIComponent(
|
|
4854
|
+
formatBookingRefForDisplay(changeBookingReferenceForPaidFlow) ||
|
|
4855
|
+
changeBookingReferenceForPaidFlow,
|
|
4856
|
+
);
|
|
4857
|
+
const ln = encodeURIComponent(lastName.trim());
|
|
4858
|
+
const fromQ = `${MANAGE_BOOKING_QUERY_FROM}=${encodeURIComponent(MANAGE_BOOKING_FROM_CHANGE_PAYMENT)}`;
|
|
4859
|
+
const intentQ = changeIntentIdForCheckout
|
|
4860
|
+
? `&changeIntentId=${encodeURIComponent(changeIntentIdForCheckout)}`
|
|
4861
|
+
: '';
|
|
4862
|
+
return `${origin}/manage-booking?ref=${ref}&lastName=${ln}&${fromQ}${intentQ}`;
|
|
4863
|
+
})()
|
|
4851
4864
|
: undefined,
|
|
4852
4865
|
ticketLines: ticketLinesForModal,
|
|
4853
4866
|
feeLineItems: feeLineItemsWithAddOns,
|
|
@@ -4988,6 +5001,7 @@ export function AdminChangeBookingFlow({
|
|
|
4988
5001
|
previousAvailabilityId: initialValues?.availabilityId ?? null,
|
|
4989
5002
|
previousReturnAvailabilityId: initialValues?.returnAvailabilityId ?? null,
|
|
4990
5003
|
},
|
|
5004
|
+
deferPaymentToBalance: true,
|
|
4991
5005
|
});
|
|
4992
5006
|
const bookRef = initialValues?.bookingReference?.trim() || adminChoiceData.reservationReference;
|
|
4993
5007
|
setShowAdminPaymentChoice(false);
|
|
@@ -28,6 +28,11 @@ export type ProviderDashboardChangeBookingPayload = {
|
|
|
28
28
|
previousAvailabilityId?: string | null;
|
|
29
29
|
previousReturnAvailabilityId?: string | null;
|
|
30
30
|
} | null;
|
|
31
|
+
/**
|
|
32
|
+
* When true, apply the change now but do not run an immediate card charge: record the amount still
|
|
33
|
+
* owed (e.g. pending charge on file) and update the receipt. Provider /change API must support this.
|
|
34
|
+
*/
|
|
35
|
+
deferPaymentToBalance?: boolean;
|
|
31
36
|
};
|
|
32
37
|
|
|
33
38
|
/** Seeds the flow when opening provider change-booking (matches TicketBooth `BookingWidget` `initialBooking`). */
|