@ticketboothapp/booking 1.2.118 → 1.2.119
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
|
@@ -2765,7 +2765,9 @@ export function AdminChangeBookingFlow({
|
|
|
2765
2765
|
*/
|
|
2766
2766
|
const returnOptionsWithFloor = useMemo(() => {
|
|
2767
2767
|
const options = selectedAvailability?.returnOptions ?? [];
|
|
2768
|
-
const serverReturnMap =
|
|
2768
|
+
const serverReturnMap = useAdminFeAuthoritativeQuote
|
|
2769
|
+
? undefined
|
|
2770
|
+
: latestChangeQuote?.serverPreview?.returnOptionPriceByReturnAvailabilityId;
|
|
2769
2771
|
const floor = effectiveChangeFlowReturnUnitFloorPerPerson;
|
|
2770
2772
|
const applyReturnFloor = floor != null && isCustomerSelfServeChange;
|
|
2771
2773
|
return options.map((opt) => {
|
|
@@ -2800,6 +2802,7 @@ export function AdminChangeBookingFlow({
|
|
|
2800
2802
|
isCustomerSelfServeChange,
|
|
2801
2803
|
currency,
|
|
2802
2804
|
changeFlowSeatCreditForReturnAvailabilityId,
|
|
2805
|
+
useAdminFeAuthoritativeQuote,
|
|
2803
2806
|
latestChangeQuote?.serverPreview?.returnOptionPriceByReturnAvailabilityId,
|
|
2804
2807
|
]);
|
|
2805
2808
|
|
|
@@ -2809,7 +2812,9 @@ export function AdminChangeBookingFlow({
|
|
|
2809
2812
|
const applyReturnFloor = floor != null && isCustomerSelfServeChange;
|
|
2810
2813
|
const rawPerPerson = selectedReturnOption.priceAdjustmentByCurrency?.[currency] ?? 0;
|
|
2811
2814
|
let perPerson = rawPerPerson;
|
|
2812
|
-
const serverReturnMap =
|
|
2815
|
+
const serverReturnMap = useAdminFeAuthoritativeQuote
|
|
2816
|
+
? undefined
|
|
2817
|
+
: latestChangeQuote?.serverPreview?.returnOptionPriceByReturnAvailabilityId;
|
|
2813
2818
|
if (isCustomerSelfServeChange && serverReturnMap && selectedReturnOption.returnAvailabilityId) {
|
|
2814
2819
|
const sid = selectedReturnOption.returnAvailabilityId.trim();
|
|
2815
2820
|
const sp = serverReturnMap[sid];
|
|
@@ -2833,6 +2838,7 @@ export function AdminChangeBookingFlow({
|
|
|
2833
2838
|
effectiveChangeFlowReturnUnitFloorPerPerson,
|
|
2834
2839
|
isCustomerSelfServeChange,
|
|
2835
2840
|
currency,
|
|
2841
|
+
useAdminFeAuthoritativeQuote,
|
|
2836
2842
|
latestChangeQuote?.serverPreview?.returnOptionPriceByReturnAvailabilityId,
|
|
2837
2843
|
]);
|
|
2838
2844
|
|
|
@@ -2872,7 +2878,7 @@ export function AdminChangeBookingFlow({
|
|
|
2872
2878
|
/** Quote `ticketUnitPriceByCategory` overrides catalog units for ticket rows (customer self-serve only). */
|
|
2873
2879
|
const pricingForTicketSelector = useMemo(() => {
|
|
2874
2880
|
const m = latestChangeQuote?.serverPreview?.ticketUnitPriceByCategory;
|
|
2875
|
-
if (!isCustomerSelfServeChange || !m) return pricing;
|
|
2881
|
+
if (useAdminFeAuthoritativeQuote || !isCustomerSelfServeChange || !m) return pricing;
|
|
2876
2882
|
return pricing.map((r) => {
|
|
2877
2883
|
const u = m[r.category.toUpperCase()];
|
|
2878
2884
|
if (u == null || !Number.isFinite(u)) return r;
|
|
@@ -2883,7 +2889,7 @@ export function AdminChangeBookingFlow({
|
|
|
2883
2889
|
baseInDisplayCurrency: u,
|
|
2884
2890
|
};
|
|
2885
2891
|
});
|
|
2886
|
-
}, [pricing, latestChangeQuote?.serverPreview?.ticketUnitPriceByCategory, isCustomerSelfServeChange]);
|
|
2892
|
+
}, [pricing, latestChangeQuote?.serverPreview?.ticketUnitPriceByCategory, isCustomerSelfServeChange, useAdminFeAuthoritativeQuote]);
|
|
2887
2893
|
|
|
2888
2894
|
// Price breakdown: mid-layer returns line items (base + one per rule/deal). UI renders each line; rate in brackets when used.
|
|
2889
2895
|
const getPriceBreakdown = useCallback((category: string, priceCAD: number, baseInDisplayCurrency: number | undefined, appliedAdjustments: Array<{ type: string; id: string; name: string; changeByCurrency?: Record<string, number> }> = []): PriceBreakdownData | null => {
|
|
@@ -3533,7 +3539,7 @@ export function AdminChangeBookingFlow({
|
|
|
3533
3539
|
|
|
3534
3540
|
const checkoutPriceSummaryLinesForCheckout = useMemo(() => {
|
|
3535
3541
|
let raw: PriceSummaryLine[];
|
|
3536
|
-
if (suppressSelfServeCurrencyUi && selfServePricingConfirmed) {
|
|
3542
|
+
if (!useAdminFeAuthoritativeQuote && suppressSelfServeCurrencyUi && selfServePricingConfirmed) {
|
|
3537
3543
|
const serverLines = latestChangeQuote?.serverPreview?.priceSummaryLines;
|
|
3538
3544
|
raw = serverLines && serverLines.length > 0 ? serverLines : checkoutPriceSummaryLines;
|
|
3539
3545
|
} else {
|
|
@@ -3561,6 +3567,7 @@ export function AdminChangeBookingFlow({
|
|
|
3561
3567
|
}, [
|
|
3562
3568
|
suppressSelfServeCurrencyUi,
|
|
3563
3569
|
selfServePricingConfirmed,
|
|
3570
|
+
useAdminFeAuthoritativeQuote,
|
|
3564
3571
|
checkoutPriceSummaryLines,
|
|
3565
3572
|
latestChangeQuote?.serverPreview?.priceSummaryLines,
|
|
3566
3573
|
effectivePromoDiscountAmount,
|
|
@@ -4104,7 +4111,7 @@ export function AdminChangeBookingFlow({
|
|
|
4104
4111
|
const displayedChangeAmountsRaw = resolveChangeFlowDisplayedAmounts({
|
|
4105
4112
|
providerPreview: providerTotalsPreview,
|
|
4106
4113
|
serverQuotePreview:
|
|
4107
|
-
isCustomerSelfServeChange && latestChangeQuote?.serverDisplay
|
|
4114
|
+
!useAdminFeAuthoritativeQuote && isCustomerSelfServeChange && latestChangeQuote?.serverDisplay
|
|
4108
4115
|
? latestChangeQuote.serverDisplay
|
|
4109
4116
|
: null,
|
|
4110
4117
|
fromCart: {
|
|
@@ -4116,7 +4123,7 @@ export function AdminChangeBookingFlow({
|
|
|
4116
4123
|
/** When cart drives display, {@link effectiveSubtotalForCheckout} already includes admin adjustments — do not add twice. */
|
|
4117
4124
|
const displayLayerUsesExternalPricing =
|
|
4118
4125
|
Boolean(providerTotalsPreview) ||
|
|
4119
|
-
(isCustomerSelfServeChange && Boolean(latestChangeQuote?.serverDisplay));
|
|
4126
|
+
(!useAdminFeAuthoritativeQuote && isCustomerSelfServeChange && Boolean(latestChangeQuote?.serverDisplay));
|
|
4120
4127
|
const adminTaxDeltaForExternalDisplay =
|
|
4121
4128
|
displayLayerUsesExternalPricing && !isTaxIncludedInPrice && Math.abs(adminCustomAdjustmentTotal) >= 0.0005
|
|
4122
4129
|
? roundMoney(adminCustomAdjustmentTotal * (pricingConfig?.taxRate ?? 0))
|