@ticketboothapp/booking 1.2.170 → 1.2.172

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ticketboothapp/booking",
3
- "version": "1.2.170",
3
+ "version": "1.2.172",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -212,14 +212,13 @@ export function AdminChangeCheckoutPanel({
212
212
  onLineAmountReset,
213
213
  lineLabelInputs,
214
214
  }: AdminChangeCheckoutPanelProps) {
215
+ const authoritativeAmountDue = serverAmountDue ?? changeFlowAmountDue;
215
216
  const totalSummaryLabel =
216
217
  (serverRefundCandidate ?? 0) > 0.005
217
218
  ? 'Amount to refund customer'
218
- : changeFlowAmountDue < -0.005
219
- ? 'Balance reduction'
220
- : changeFlowAmountDue > 0.005
221
- ? 'Amount due from customer'
222
- : 'No payment or refund due';
219
+ : authoritativeAmountDue > 0.005
220
+ ? 'Amount due from customer'
221
+ : 'No payment or refund due';
223
222
  const pricingAdjustments = (
224
223
  <AdminChangePricingAdjustments
225
224
  showChangeFlowManualPriceLines={showChangeFlowManualPriceLines}
@@ -188,7 +188,8 @@ export function useAdminChangeQuotePreview({
188
188
  latestChangeQuote?.canProceed === false &&
189
189
  (latestChangeQuote.refundDecisionOperations?.length ?? 0) === 0;
190
190
  const refundDecisionRequired = (latestChangeQuote?.refundDecisionOperations?.length ?? 0) > 0;
191
- const hasPublishedChangeQuote = latestChangeQuote !== null;
191
+ const hasPublishedChangeQuoteRef = useRef(latestChangeQuote !== null);
192
+ hasPublishedChangeQuoteRef.current = latestChangeQuote !== null;
192
193
  /**
193
194
  * Existing admin adjustments must be discoverable before the operator makes a change.
194
195
  * Initial selection hydration can briefly leave the live availability/return unset, so use
@@ -480,7 +481,7 @@ export function useAdminChangeQuotePreview({
480
481
  if (canReuseCompletedAdminChangeQuote(
481
482
  changeQuoteInputsKey,
482
483
  lastCompletedQuoteInputsKeyRef.current,
483
- hasPublishedChangeQuote,
484
+ hasPublishedChangeQuoteRef.current,
484
485
  )) {
485
486
  setChangeQuoteLoading(false);
486
487
  return;
@@ -581,7 +582,6 @@ export function useAdminChangeQuotePreview({
581
582
  canRequestChangeQuote,
582
583
  missingRequiredReturnSelection,
583
584
  changeQuoteInputsKey,
584
- hasPublishedChangeQuote,
585
585
  ]);
586
586
 
587
587
  return {