@ticketboothapp/booking 1.2.114 → 1.2.115
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
|
@@ -3351,8 +3351,9 @@ export function AdminChangeBookingFlow({
|
|
|
3351
3351
|
/** Latest cart context for get-promo-discount; effect only keys off promoDiscountFetchKey. */
|
|
3352
3352
|
const promoDiscountParamsRef = useRef({
|
|
3353
3353
|
selectedAvailability: null as Availability | null,
|
|
3354
|
-
ticketLineItems: [] as Array<{ category: string; qty: number }>,
|
|
3354
|
+
ticketLineItems: [] as Array<{ category: string; qty: number; itemTotal: number }>,
|
|
3355
3355
|
effectiveSubtotal: 0,
|
|
3356
|
+
displayedProductFeeTotal: 0,
|
|
3356
3357
|
appliedPromoCode: null as string | null,
|
|
3357
3358
|
changeBookingPromo: null as { priorAmount?: number } | null,
|
|
3358
3359
|
});
|
|
@@ -3377,6 +3378,11 @@ export function AdminChangeBookingFlow({
|
|
|
3377
3378
|
selectedAvailability.availabilityId ?? '',
|
|
3378
3379
|
currency,
|
|
3379
3380
|
quantitiesSignature,
|
|
3381
|
+
ticketLineItemsForChangeFlowDisplay
|
|
3382
|
+
.map((line) => `${line.category}:${line.qty}:${Math.round(line.itemTotal * 100)}`)
|
|
3383
|
+
.sort()
|
|
3384
|
+
.join('|'),
|
|
3385
|
+
String(Math.round(feeLineItems.reduce((sum, fee) => sum + fee.totalAmount, 0) * 100)),
|
|
3380
3386
|
String(Math.round(effectiveSubtotalForCheckout * 100)),
|
|
3381
3387
|
lockedPromoCode ? String(Math.round(originalReceiptPromoAdjustment.amount * 100)) : '',
|
|
3382
3388
|
].join('::');
|
|
@@ -3390,6 +3396,8 @@ export function AdminChangeBookingFlow({
|
|
|
3390
3396
|
product.productId,
|
|
3391
3397
|
currency,
|
|
3392
3398
|
quantitiesSignature,
|
|
3399
|
+
ticketLineItemsForChangeFlowDisplay,
|
|
3400
|
+
feeLineItems,
|
|
3393
3401
|
effectiveSubtotalForCheckout,
|
|
3394
3402
|
lockedPromoCode,
|
|
3395
3403
|
originalReceiptPromoAdjustment.amount,
|
|
@@ -3397,8 +3405,9 @@ export function AdminChangeBookingFlow({
|
|
|
3397
3405
|
|
|
3398
3406
|
promoDiscountParamsRef.current = {
|
|
3399
3407
|
selectedAvailability,
|
|
3400
|
-
ticketLineItems:
|
|
3408
|
+
ticketLineItems: ticketLineItemsForChangeFlowDisplay.map((l) => ({ category: l.category, qty: l.qty, itemTotal: l.itemTotal })),
|
|
3401
3409
|
effectiveSubtotal: effectiveSubtotalForCheckout,
|
|
3410
|
+
displayedProductFeeTotal: feeLineItems.reduce((sum, fee) => sum + fee.totalAmount, 0),
|
|
3402
3411
|
appliedPromoCode,
|
|
3403
3412
|
changeBookingPromo: lockedPromoCode
|
|
3404
3413
|
? { priorAmount: originalReceiptPromoAdjustment.amount }
|
|
@@ -3421,6 +3430,7 @@ export function AdminChangeBookingFlow({
|
|
|
3421
3430
|
selectedAvailability: sel,
|
|
3422
3431
|
ticketLineItems: lines,
|
|
3423
3432
|
effectiveSubtotal: sub,
|
|
3433
|
+
displayedProductFeeTotal,
|
|
3424
3434
|
appliedPromoCode: code,
|
|
3425
3435
|
changeBookingPromo,
|
|
3426
3436
|
} = promoDiscountParamsRef.current;
|
|
@@ -3445,8 +3455,13 @@ export function AdminChangeBookingFlow({
|
|
|
3445
3455
|
? {
|
|
3446
3456
|
forBookingChange: true,
|
|
3447
3457
|
priorPromoDiscountAmount: changeBookingPromo.priorAmount,
|
|
3458
|
+
displayedTicketLines: lines,
|
|
3459
|
+
displayedProductFeeTotal,
|
|
3460
|
+
}
|
|
3461
|
+
: {
|
|
3462
|
+
displayedTicketLines: lines,
|
|
3463
|
+
displayedProductFeeTotal,
|
|
3448
3464
|
}
|
|
3449
|
-
: undefined
|
|
3450
3465
|
)
|
|
3451
3466
|
.then((res) => {
|
|
3452
3467
|
if (cancelled) return;
|
|
@@ -3173,8 +3173,9 @@ export function ChangeBookingFlow({
|
|
|
3173
3173
|
/** Latest cart context for get-promo-discount; effect only keys off promoDiscountFetchKey. */
|
|
3174
3174
|
const promoDiscountParamsRef = useRef({
|
|
3175
3175
|
selectedAvailability: null as Availability | null,
|
|
3176
|
-
ticketLineItems: [] as Array<{ category: string; qty: number }>,
|
|
3176
|
+
ticketLineItems: [] as Array<{ category: string; qty: number; itemTotal: number }>,
|
|
3177
3177
|
effectiveSubtotal: 0,
|
|
3178
|
+
displayedProductFeeTotal: 0,
|
|
3178
3179
|
appliedPromoCode: null as string | null,
|
|
3179
3180
|
/** Change flow: pass BE stored promo discount for expired / fixed promo locking. */
|
|
3180
3181
|
changeBookingPromo: null as { priorAmount?: number } | null,
|
|
@@ -3195,6 +3196,11 @@ export function ChangeBookingFlow({
|
|
|
3195
3196
|
selectedAvailability.availabilityId ?? '',
|
|
3196
3197
|
currency,
|
|
3197
3198
|
quantitiesSignature,
|
|
3199
|
+
ticketLineItemsForChangeFlowDisplay
|
|
3200
|
+
.map((line) => `${line.category}:${line.qty}:${Math.round(line.itemTotal * 100)}`)
|
|
3201
|
+
.sort()
|
|
3202
|
+
.join('|'),
|
|
3203
|
+
String(Math.round(feeLineItems.reduce((sum, fee) => sum + fee.totalAmount, 0) * 100)),
|
|
3198
3204
|
String(Math.round(effectiveSubtotal * 100)),
|
|
3199
3205
|
lockedPromoCode ? String(Math.round((originalReceipt?.promoAmount ?? 0) * 100)) : '',
|
|
3200
3206
|
].join('::');
|
|
@@ -3208,6 +3214,8 @@ export function ChangeBookingFlow({
|
|
|
3208
3214
|
product.productId,
|
|
3209
3215
|
currency,
|
|
3210
3216
|
quantitiesSignature,
|
|
3217
|
+
ticketLineItemsForChangeFlowDisplay,
|
|
3218
|
+
feeLineItems,
|
|
3211
3219
|
effectiveSubtotal,
|
|
3212
3220
|
lockedPromoCode,
|
|
3213
3221
|
originalReceipt?.promoAmount,
|
|
@@ -3215,8 +3223,9 @@ export function ChangeBookingFlow({
|
|
|
3215
3223
|
|
|
3216
3224
|
promoDiscountParamsRef.current = {
|
|
3217
3225
|
selectedAvailability,
|
|
3218
|
-
ticketLineItems:
|
|
3226
|
+
ticketLineItems: ticketLineItemsForChangeFlowDisplay.map((l) => ({ category: l.category, qty: l.qty, itemTotal: l.itemTotal })),
|
|
3219
3227
|
effectiveSubtotal,
|
|
3228
|
+
displayedProductFeeTotal: feeLineItems.reduce((sum, fee) => sum + fee.totalAmount, 0),
|
|
3220
3229
|
appliedPromoCode,
|
|
3221
3230
|
changeBookingPromo: lockedPromoCode
|
|
3222
3231
|
? { priorAmount: originalReceipt?.promoAmount }
|
|
@@ -3239,6 +3248,7 @@ export function ChangeBookingFlow({
|
|
|
3239
3248
|
selectedAvailability: sel,
|
|
3240
3249
|
ticketLineItems: lines,
|
|
3241
3250
|
effectiveSubtotal: sub,
|
|
3251
|
+
displayedProductFeeTotal,
|
|
3242
3252
|
appliedPromoCode: code,
|
|
3243
3253
|
changeBookingPromo,
|
|
3244
3254
|
} = promoDiscountParamsRef.current;
|
|
@@ -3263,8 +3273,13 @@ export function ChangeBookingFlow({
|
|
|
3263
3273
|
? {
|
|
3264
3274
|
forBookingChange: true,
|
|
3265
3275
|
priorPromoDiscountAmount: changeBookingPromo.priorAmount,
|
|
3276
|
+
displayedTicketLines: lines,
|
|
3277
|
+
displayedProductFeeTotal,
|
|
3278
|
+
}
|
|
3279
|
+
: {
|
|
3280
|
+
displayedTicketLines: lines,
|
|
3281
|
+
displayedProductFeeTotal,
|
|
3266
3282
|
}
|
|
3267
|
-
: undefined
|
|
3268
3283
|
)
|
|
3269
3284
|
.then((res) => {
|
|
3270
3285
|
if (cancelled) return;
|