@ticketboothapp/booking 1.2.105 → 1.2.106

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.105",
3
+ "version": "1.2.106",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css",
@@ -930,6 +930,10 @@ export function PrivateShuttleBookingFlow({
930
930
  const avail = dateAvailabilities.find(
931
931
  (a) => getPrivateShuttleAvailabilityOptionId(a) === optionId
932
932
  );
933
+ const profileOptionPrice = resourcePriceByOption?.[optionId]?.[currency];
934
+ if (profileOptionPrice != null) {
935
+ return applyResourceAdjustments(profileOptionPrice, avail, currency);
936
+ }
933
937
  if (currency === 'CAD' && opt?.pricing?.['RESOURCE'] != null) {
934
938
  return applyResourceAdjustments(opt.pricing['RESOURCE'], avail, currency);
935
939
  }
@@ -939,8 +943,6 @@ export function PrivateShuttleBookingFlow({
939
943
  return resourceRate.priceByCurrency[currency];
940
944
  if (currency === 'CAD' && resourceRate?.price != null) return resourceRate.price;
941
945
  }
942
- if (resourcePriceByOption?.[optionId]?.[currency] != null)
943
- return resourcePriceByOption[optionId][currency];
944
946
  if (currency === 'CAD' && resourcePriceByCurrency?.[currency] != null) return resourcePriceByCurrency[currency];
945
947
  return opt?.pricing?.['RESOURCE'] ?? 0;
946
948
  },
@@ -955,6 +957,12 @@ export function PrivateShuttleBookingFlow({
955
957
  );
956
958
 
957
959
  const resourcePrice = useMemo(() => {
960
+ const selectedProfileOptionPrice = selectedOption
961
+ ? resourcePriceByOption?.[selectedOption]?.[currency]
962
+ : undefined;
963
+ if (selectedProfileOptionPrice != null) {
964
+ return applyResourceAdjustments(selectedProfileOptionPrice, selectedAvailability, currency);
965
+ }
958
966
  if (currency === 'CAD' && selectedOptionConfig?.pricing?.['RESOURCE'] != null)
959
967
  return applyResourceAdjustments(
960
968
  selectedOptionConfig.pricing['RESOURCE'],
@@ -970,8 +978,6 @@ export function PrivateShuttleBookingFlow({
970
978
  if (fromRate != null) return fromRate;
971
979
  }
972
980
  }
973
- if (selectedOption && resourcePriceByOption?.[selectedOption]?.[currency] != null)
974
- return resourcePriceByOption[selectedOption][currency];
975
981
  if (currency === 'CAD' && resourcePriceByCurrency?.[currency] != null) return resourcePriceByCurrency[currency];
976
982
  if (precomputedPrices?.['RESOURCE']?.[currency] != null)
977
983
  return precomputedPrices['RESOURCE'][currency];