@salesgenterp/ui-components 0.4.303 → 0.4.305

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/dist/index.js CHANGED
@@ -5560,7 +5560,7 @@ if (process.env.NODE_ENV !== 'production') {
5560
5560
  });
5561
5561
 
5562
5562
  var _templateObject$s, _templateObject2$j, _templateObject3$d, _templateObject4$9, _templateObject5$7, _templateObject6$6;
5563
- var ProductImage = styled__default.img(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 58px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
5563
+ var ProductImage = styled__default.img(_templateObject$s || (_templateObject$s = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 50px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
5564
5564
  var ProductName = styled__default.h6(_templateObject2$j || (_templateObject2$j = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
5565
5565
  return props.size || '1em';
5566
5566
  }, function (props) {
@@ -5798,7 +5798,7 @@ EnhancedTableHead.propTypes = {
5798
5798
  rowCount: propTypes.number.isRequired
5799
5799
  };
5800
5800
  function EnhancedTable(_ref) {
5801
- var _cartData$cartLineIte, _styles$scroll, _styles$scroll2, _sortBy, _styles$Btn, _styles$Btn2;
5801
+ var _cartData$cartLineIte, _styles$Btn, _styles$scroll, _styles$scroll2, _sortBy, _styles$Btn2, _styles$Btn3;
5802
5802
  var cartData = _ref.cartData,
5803
5803
  loading = _ref.loading,
5804
5804
  imgnotfoundUrl = _ref.imgnotfoundUrl,
@@ -5876,7 +5876,7 @@ function EnhancedTable(_ref) {
5876
5876
  }, [cartData]);
5877
5877
  return /*#__PURE__*/React.createElement(CartPageBox, null, loading && /*#__PURE__*/React.createElement(Loader$1, null, /*#__PURE__*/React.createElement(reactSpinners.BounceLoader, {
5878
5878
  size: 40,
5879
- color: styles.Btn.background,
5879
+ color: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
5880
5880
  loading: true
5881
5881
  })), /*#__PURE__*/React.createElement(Box, {
5882
5882
  sx: {
@@ -5914,8 +5914,8 @@ function EnhancedTable(_ref) {
5914
5914
  handleRemoveProduct: handleRemoveProduct
5915
5915
  });
5916
5916
  }))))), /*#__PURE__*/React.createElement(CartButtonsRow, {
5917
- bg: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
5918
- color: styles === null || styles === void 0 ? void 0 : (_styles$Btn2 = styles.Btn) === null || _styles$Btn2 === void 0 ? void 0 : _styles$Btn2.color
5917
+ bg: styles === null || styles === void 0 ? void 0 : (_styles$Btn2 = styles.Btn) === null || _styles$Btn2 === void 0 ? void 0 : _styles$Btn2.background,
5918
+ color: styles === null || styles === void 0 ? void 0 : (_styles$Btn3 = styles.Btn) === null || _styles$Btn3 === void 0 ? void 0 : _styles$Btn3.color
5919
5919
  }, /*#__PURE__*/React.createElement("button", {
5920
5920
  onClick: function onClick() {
5921
5921
  new Promise(function (resolve, reject) {
@@ -5985,7 +5985,7 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
5985
5985
  };
5986
5986
 
5987
5987
  var CartPageMainRetail = function CartPageMainRetail(_ref) {
5988
- var _cartData$cartLineIte;
5988
+ var _styles$Btn, _cartData$cartLineIte;
5989
5989
  var retail = _ref.retail,
5990
5990
  cartData = _ref.cartData,
5991
5991
  loading = _ref.loading,
@@ -5999,7 +5999,7 @@ var CartPageMainRetail = function CartPageMainRetail(_ref) {
5999
5999
  retail: retail
6000
6000
  }, loading && /*#__PURE__*/React__default.createElement(Loader$1, null, /*#__PURE__*/React__default.createElement(reactSpinners.BounceLoader, {
6001
6001
  size: 40,
6002
- color: styles.Btn.background,
6002
+ color: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
6003
6003
  loading: true
6004
6004
  })), cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (item) {
6005
6005
  return /*#__PURE__*/React__default.createElement(CartPageProductCard, {
@@ -6089,8 +6089,8 @@ var CartSummary = function CartSummary(_ref) {
6089
6089
  var storeIdList = (storeData === null || storeData === void 0 ? void 0 : (_storeData$map = storeData.map(function (data) {
6090
6090
  return data === null || data === void 0 ? void 0 : data.id;
6091
6091
  })) === null || _storeData$map === void 0 ? void 0 : _storeData$map.join(',')) || 2;
6092
- var cartSummary = styles.cartSummary,
6093
- Btn = styles.Btn;
6092
+ var cartSummary = styles === null || styles === void 0 ? void 0 : styles.cartSummary;
6093
+ var Btn = styles === null || styles === void 0 ? void 0 : styles.Btn;
6094
6094
  var _useState = React.useState(false),
6095
6095
  buttonLoading = _useState[0],
6096
6096
  setButtonLoading = _useState[1];
@@ -7354,7 +7354,7 @@ var _templateObject$A;
7354
7354
  var Container$1 = styled__default.div(_templateObject$A || (_templateObject$A = _taggedTemplateLiteralLoose([""])));
7355
7355
 
7356
7356
  var _templateObject$B, _templateObject2$q, _templateObject3$i, _templateObject4$d, _templateObject5$b, _templateObject6$a;
7357
- var ProductImage$1 = styled__default.img(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 58px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
7357
+ var ProductImage$1 = styled__default.img(_templateObject$B || (_templateObject$B = _taggedTemplateLiteralLoose(["\n min-width: 50px;\n min-height: 50px;\n @media only screen and (max-width: 640px) {\n margin: 0.5em 0;\n padding-right: 0.5em;\n }\n"])));
7358
7358
  var ProductName$1 = styled__default.h6(_templateObject2$q || (_templateObject2$q = _taggedTemplateLiteralLoose(["\n font-size: ", ";\n padding: 0;\n line-height: 1.3em;\n max-height: ", ";\n height: ", ";\n overflow: hidden;\n text-overflow: ellipsis;\n height: fit-content;\n"])), function (props) {
7359
7359
  return props.size || '1em';
7360
7360
  }, function (props) {
@@ -8200,10 +8200,12 @@ var _templateObject$H, _templateObject2$u, _templateObject3$k, _templateObject4$
8200
8200
  var CheckoutRootContainer = styled__default.div(_templateObject$H || (_templateObject$H = _taggedTemplateLiteralLoose(["\n width: 100%;\n padding: 4rem;\n background-color: ", ";\n font-size: 16px;\n\n div,\n button,\n span {\n font-size: 16px;\n }\n @media only screen and (max-width: 1620px) {\n padding: 3em 0.5em;\n }\n @media screen and (max-width: 840px) {\n div,\n button,\n span {\n font-size: 12px;\n }\n padding: 2rem 0.5rem;\n }\n"])), function (props) {
8201
8201
  return props.bg;
8202
8202
  });
8203
- var CheckoutPageContainer = styled__default.div(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n background-color: ", ";\n margin: 0 auto;\n padding: 2.375em 3.5em 2.5em 4.5em;\n padding-left: min(4.5em, 2.5vw);\n color: rgba(50, 50, 50, 1);\n /* max-height: 90vh; */\n overflow: hidden;\n /* background: gainsboro; */\n border-radius: 28px;\n /* background-color: #fff8f6; */\n @media only screen and (max-width: 1508px) {\n flex-direction: column;\n align-items: center;\n max-height: max-content;\n }\n @media only screen and (max-width: 788px) {\n padding: 1em 0.5em;\n }\n .icon {\n font-size: 12px;\n }\n ////////////checkout and cart fonts\n /////////////////\n /* /////remove arrows from number input */\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n /* //////mui inputs */\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n outline: none;\n }\n\n .MuiInputBase-root .MuiOutlinedInput-root,\n .MuiInputBase-colorPrimary,\n .MuiInputBase-fullWidth,\n .MuiInputBase-formControl {\n border-radius: 10px;\n }\n // /* /////stepper length */\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 60px !important;\n }\n\n @media only screen and (max-width: 640px) {\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 40px !important;\n }\n }\n"])), function (props) {
8203
+ var CheckoutPageContainer = styled__default.div(_templateObject2$u || (_templateObject2$u = _taggedTemplateLiteralLoose(["\n width: 100%;\n max-width: ", ";\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: flex-start;\n background-color: ", ";\n margin: 0 auto;\n padding: 2.375em 3.5em 2.5em 4.5em;\n padding-left: min(4.5em, 2.5vw);\n color: rgba(50, 50, 50, 1);\n /* max-height: 90vh; */\n overflow: hidden;\n /* background: gainsboro; */\n border-radius: 28px;\n /* background-color: #fff8f6; */\n @media only screen and (max-width: 1508px) {\n flex-direction: column;\n align-items: center;\n max-height: max-content;\n }\n @media only screen and (max-width: 788px) {\n padding: 1em 0.5em;\n }\n .icon {\n font-size: 12px;\n }\n ////////////checkout and cart fonts\n /////////////////\n /* /////remove arrows from number input */\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type='number'] {\n -moz-appearance: textfield;\n }\n\n /* //////mui inputs */\n\n .Mui-checked {\n color: ", ";\n }\n\n .MuiOutlinedInput-notchedOutline {\n border: none;\n outline: none;\n }\n\n .MuiInputBase-root .MuiOutlinedInput-root,\n .MuiInputBase-colorPrimary,\n .MuiInputBase-fullWidth,\n .MuiInputBase-formControl {\n border-radius: 10px;\n }\n // /* /////stepper length */\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 60px !important;\n }\n\n @media only screen and (max-width: 640px) {\n .MuiStepConnector-line,\n .MuiStepConnector-lineVertical {\n min-height: 40px !important;\n }\n }\n"])), function (props) {
8204
8204
  return props.maxWidth || '1605px';
8205
8205
  }, function (props) {
8206
8206
  return props.bg || '#fff8f6';
8207
+ }, function (props) {
8208
+ return props.primaryColor || 'rgba(50, 50, 50, 1)';
8207
8209
  });
8208
8210
  var Row = styled__default.div(_templateObject3$k || (_templateObject3$k = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n"])));
8209
8211
  var CheckoutMainWithHeader = styled__default(material.Stack)(_templateObject4$f || (_templateObject4$f = _taggedTemplateLiteralLoose([""])));
@@ -8224,7 +8226,7 @@ var CheckoutSummaryContainer = styled__default.div(_templateObject$I || (_templa
8224
8226
  }, function (props) {
8225
8227
  return props.color || ' rgba(50, 50, 50, 1)';
8226
8228
  });
8227
- var TextRow = styled__default.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 1em;\n padding-bottom: 1em;\n width: 90%;\n border-bottom: 1px solid #f7f7f7;\n .text {\n font-size: 1.1em;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
8229
+ var TextRow = styled__default.div(_templateObject2$v || (_templateObject2$v = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 0.8rem;\n padding-bottom: 0.8rem;\n width: 90%;\n border-bottom: 1px solid #f7f7f7;\n .text {\n font-size: 1.1em;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
8228
8230
  var FilledInfo = styled__default.div(_templateObject3$l || (_templateObject3$l = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n text-transform: capitalize;\n max-width: 60%;\n }\n .bold {\n font-weight: 700;\n margin-bottom: 0.8em;\n max-width: 300px;\n width: fit-content;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n }\n .blank {\n opacity: 0;\n }\n"])));
8229
8231
 
8230
8232
  var CheckoutSummary = function CheckoutSummary(_ref) {
@@ -8247,7 +8249,14 @@ var CheckoutSummary = function CheckoutSummary(_ref) {
8247
8249
  className: "text"
8248
8250
  }, "Order Total:"), /*#__PURE__*/React__default.createElement("h6", {
8249
8251
  className: "total"
8250
- }, renderMoney(orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount))), discountTotal && discountTotal > 0 ? /*#__PURE__*/React__default.createElement(TextRow, null, /*#__PURE__*/React__default.createElement("p", {
8252
+ }, renderMoney(orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount))), (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.taxAmount) > 0 ? /*#__PURE__*/React__default.createElement(TextRow, null, /*#__PURE__*/React__default.createElement("p", {
8253
+ className: "text"
8254
+ }, "Tax Amount:"), /*#__PURE__*/React__default.createElement("h6", {
8255
+ className: "total",
8256
+ style: {
8257
+ fontSize: '1rem'
8258
+ }
8259
+ }, renderMoney((orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.taxAmount) || 0))) : null, discountTotal && discountTotal > 0 ? /*#__PURE__*/React__default.createElement(TextRow, null, /*#__PURE__*/React__default.createElement("p", {
8251
8260
  className: "text"
8252
8261
  }, "Discount Total:"), /*#__PURE__*/React__default.createElement("h6", {
8253
8262
  className: "total",
@@ -8342,7 +8351,7 @@ var ButtonRowContainer = styled__default.div(_templateObject8$7 || (_templateObj
8342
8351
  }, function (props) {
8343
8352
  return props.disabledBack ? 'not-allowed' : 'pointer';
8344
8353
  });
8345
- var CheckBoxRow = styled__default.div(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n padding: ", ";\n margin-left: ", ";\n p {\n font-size: 0.85em;\n }\n\n button {\n border: none;\n border-radius: 4px;\n padding: 0.8em 3em;\n background: ", ";\n color: white;\n text-transform: uppercase;\n font-weight: 600;\n margin: 1em;\n margin-top: 2em;\n transition: 0.4s;\n cursor: pointer;\n min-width: max-content;\n &:hover {\n padding: 0.7em 2.7em;\n }\n }\n .back {\n background-color: ", ";\n padding: 0.8em 2em;\n &:hover {\n padding: 0.8em 2.4em;\n }\n }\n .bold,\n .red {\n font-weight: 600;\n font-size: 1.125em;\n }\n .red {\n margin-left: 0.5em;\n color: ", ";\n }\n .medium {\n font-weight: 600;\n font-size: 1em;\n }\n @media only screen and (max-width: 640px) {\n button {\n &:hover {\n padding: 0.8em 3em;\n }\n }\n\n .back {\n &:hover {\n padding: 0.8em 2em;\n }\n margin-left: 0;\n }\n }\n"])), function (props) {
8354
+ var CheckBoxRow = styled__default.div(_templateObject9$5 || (_templateObject9$5 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n cursor: pointer;\n padding: ", ";\n margin-left: ", ";\n p {\n font-size: 0.85em;\n }\n\n button {\n border: none;\n border-radius: 4px;\n padding: 0.8rem 3rem;\n background: ", ";\n color: white;\n text-transform: uppercase;\n font-weight: 600;\n margin: 1em;\n margin-top: 2em;\n transition: 0.4s;\n cursor: pointer;\n min-width: max-content;\n &:hover {\n padding: 0.7em 2.7em;\n }\n }\n .back {\n background-color: ", ";\n padding: 0.8em 2em;\n &:hover {\n padding: 0.8em 2.4em;\n }\n }\n .bold,\n .red {\n font-weight: 600;\n font-size: 1.125em;\n }\n .red {\n margin-left: 0.5em;\n color: ", ";\n }\n .medium {\n font-weight: 600;\n font-size: 1em;\n }\n @media only screen and (max-width: 640px) {\n button {\n &:hover {\n padding: 0.8em 3em;\n }\n }\n\n .back {\n &:hover {\n padding: 0.8em 2em;\n }\n margin-left: 0;\n }\n }\n"])), function (props) {
8346
8355
  return props.padding;
8347
8356
  }, function (props) {
8348
8357
  return props.marginLeft;
@@ -9525,12 +9534,11 @@ var Step3 = function Step3(_ref) {
9525
9534
  setPaymentDetails = _ref.setPaymentDetails,
9526
9535
  payments = _ref.payments,
9527
9536
  storeCredits = _ref.storeCredits,
9528
- total = _ref.total,
9537
+ orderTotal = _ref.orderTotal,
9529
9538
  styles = _ref.styles,
9530
9539
  states = _ref.states,
9531
9540
  countries = _ref.countries,
9532
9541
  setSelectedCountry = _ref.setSelectedCountry,
9533
- shippingMethod = _ref.shippingMethod,
9534
9542
  customer = _ref.customer;
9535
9543
  var _useState = React.useState(payments && (payments === null || payments === void 0 ? void 0 : payments[0])),
9536
9544
  selectedMethod = _useState[0],
@@ -9552,7 +9560,7 @@ var Step3 = function Step3(_ref) {
9552
9560
  addNewCard = _useState6[0],
9553
9561
  setAddNewCard = _useState6[1];
9554
9562
  var isCard = selectedMethod === null || selectedMethod === void 0 ? void 0 : (_selectedMethod$name = selectedMethod.name) === null || _selectedMethod$name === void 0 ? void 0 : _selectedMethod$name.toLowerCase().includes('card');
9555
- var storeCr = storeCredits > total + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) ? total + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) : storeCredits;
9563
+ var storeCr = storeCredits > ((orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) || 0) ? (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) || 0 : storeCredits;
9556
9564
  React.useEffect(function () {
9557
9565
  (function () {
9558
9566
  try {
@@ -9621,7 +9629,7 @@ var Step3 = function Step3(_ref) {
9621
9629
  className: "bold"
9622
9630
  }, "Due Amount:"), /*#__PURE__*/React__default.createElement("span", {
9623
9631
  className: "red primaryColor"
9624
- }, renderMoney(total + (shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount)))), storeCredits ? /*#__PURE__*/React__default.createElement(CheckBoxRow, {
9632
+ }, renderMoney(orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount))), storeCredits ? /*#__PURE__*/React__default.createElement(CheckBoxRow, {
9625
9633
  marginLeft: "1em",
9626
9634
  style: {
9627
9635
  paddingBottom: '1.5em',
@@ -9646,11 +9654,11 @@ var Step3 = function Step3(_ref) {
9646
9654
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
9647
9655
  key: i
9648
9656
  }, /*#__PURE__*/React__default.createElement(PaymentLi, {
9649
- style: storeCredits >= total && useStoreCr ? {
9657
+ style: storeCredits >= (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && useStoreCr ? {
9650
9658
  opacity: '.5'
9651
9659
  } : {},
9652
9660
  onClick: function onClick() {
9653
- if (storeCredits >= total && useStoreCr) return;
9661
+ if (storeCredits >= (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && useStoreCr) return;
9654
9662
  setSelectedMethod(payment);
9655
9663
  setSelectCardValue(null);
9656
9664
  }
@@ -9660,7 +9668,7 @@ var Step3 = function Step3(_ref) {
9660
9668
  className: "innerCircle"
9661
9669
  })), /*#__PURE__*/React__default.createElement("p", null, payment === null || payment === void 0 ? void 0 : payment.name)), (selectedMethod === null || selectedMethod === void 0 ? void 0 : selectedMethod.id) === (payment === null || payment === void 0 ? void 0 : payment.id) && /*#__PURE__*/React__default.createElement("div", {
9662
9670
  style: {
9663
- opacity: storeCredits >= total && useStoreCr && '.5',
9671
+ opacity: storeCredits >= (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && useStoreCr && '.5',
9664
9672
  background: '#f7f7f7',
9665
9673
  borderRadius: '1rem',
9666
9674
  padding: '1rem'
@@ -9702,7 +9710,7 @@ var Step3 = function Step3(_ref) {
9702
9710
  })), /*#__PURE__*/React__default.createElement("p", null, "Add New Card")), addNewCard && /*#__PURE__*/React__default.createElement(PaymentForm, {
9703
9711
  handleSave: function handleSave(cardData) {
9704
9712
  setCard(cardData);
9705
- setPaymentDetails(useStoreCr, useStoreCr && storeCredits > total ? null : selectedMethod, isCard && cardData);
9713
+ setPaymentDetails(useStoreCr, useStoreCr && storeCredits > (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) ? null : selectedMethod, isCard && cardData);
9706
9714
  _handleNext();
9707
9715
  },
9708
9716
  saved: card ? true : false,
@@ -9712,11 +9720,11 @@ var Step3 = function Step3(_ref) {
9712
9720
  }))));
9713
9721
  } else {
9714
9722
  return /*#__PURE__*/React__default.createElement(PaymentLi, {
9715
- style: storeCredits >= total && useStoreCr ? {
9723
+ style: storeCredits >= (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && useStoreCr ? {
9716
9724
  opacity: '.5'
9717
9725
  } : {},
9718
9726
  onClick: function onClick() {
9719
- if (storeCredits >= total && useStoreCr) return;
9727
+ if (storeCredits >= (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && useStoreCr) return;
9720
9728
  setSelectedMethod(payment);
9721
9729
  setSelectCardValue(null);
9722
9730
  }
@@ -9733,10 +9741,10 @@ var Step3 = function Step3(_ref) {
9733
9741
  }, selectedMethod === null || selectedMethod === void 0 ? void 0 : selectedMethod.description), /*#__PURE__*/React__default.createElement(ButtonRow, {
9734
9742
  handleBack: handleBack,
9735
9743
  handleNext: function handleNext() {
9736
- setPaymentDetails(useStoreCr, useStoreCr && storeCredits > total ? null : selectedMethod, isCard && card);
9744
+ setPaymentDetails(useStoreCr, useStoreCr && storeCredits > (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) ? null : selectedMethod, isCard && card);
9737
9745
  _handleNext();
9738
9746
  },
9739
- nextDisabled: useStoreCr && storeCredits < total && isCard && !card || !useStoreCr && isCard && !card,
9747
+ nextDisabled: useStoreCr && storeCredits < (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) && isCard && !card || !useStoreCr && isCard && !card,
9740
9748
  color: styles === null || styles === void 0 ? void 0 : (_styles$button2 = styles.button) === null || _styles$button2 === void 0 ? void 0 : _styles$button2.bg
9741
9749
  })));
9742
9750
  };
@@ -10060,7 +10068,7 @@ var Step4 = function Step4(_ref) {
10060
10068
  align: "right"
10061
10069
  }, /*#__PURE__*/React__default.createElement("p", {
10062
10070
  className: "max sm primaryColor"
10063
- }, "Calculated later"))), discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.map(function (coupon) {
10071
+ }, renderMoney((orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.taxAmount) || 0)))), discountCoupons === null || discountCoupons === void 0 ? void 0 : discountCoupons.map(function (coupon) {
10064
10072
  return /*#__PURE__*/React__default.createElement(StyledTableRow, null, /*#__PURE__*/React__default.createElement(StyledTableCell, {
10065
10073
  colSpan: 1,
10066
10074
  noSmall: true
@@ -10194,7 +10202,7 @@ var Step4 = function Step4(_ref) {
10194
10202
  onClick: function onClick() {
10195
10203
  return clickRedirect('privacy-policy');
10196
10204
  }
10197
- }, "Privacy Policy?")))), /*#__PURE__*/React__default.createElement(material.Grid, {
10205
+ }, "Privacy Policy.")))), /*#__PURE__*/React__default.createElement(material.Grid, {
10198
10206
  item: true,
10199
10207
  xs: 12
10200
10208
  }, /*#__PURE__*/React__default.createElement(CheckBoxRow, null, /*#__PURE__*/React__default.createElement("p", {
@@ -10273,7 +10281,7 @@ var steps = [{
10273
10281
  })
10274
10282
  }];
10275
10283
  var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10276
- var _styles$input, _customer$customerDto11, _customer$customerDto12, _customer$customerDto13, _customer$customerDto14, _styles$checkoutSumma, _styles$checkoutSumma2;
10284
+ var _styles$input, _customer$customerDto12, _customer$customerDto13, _customer$customerDto14, _customer$customerDto15, _styles$checkoutSumma, _styles$checkoutSumma2;
10277
10285
  var apiEndPoint = _ref.apiEndPoint,
10278
10286
  token = _ref.token,
10279
10287
  authoriseDotNet = _ref.authoriseDotNet,
@@ -10287,7 +10295,6 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10287
10295
  clickRedirect = _ref.clickRedirect,
10288
10296
  shippingText = _ref.shippingText,
10289
10297
  showShippingPriceRangeLimit = _ref.showShippingPriceRangeLimit,
10290
- taxPercentage = _ref.taxPercentage,
10291
10298
  _ref$taxExempt = _ref.taxExempt,
10292
10299
  taxExempt = _ref$taxExempt === void 0 ? false : _ref$taxExempt;
10293
10300
  var _useState = React.useState(false),
@@ -10437,47 +10444,73 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10437
10444
  }
10438
10445
  }, [customer, currStep]);
10439
10446
  React.useEffect(function () {
10440
- var _ref2, _ref3, _ref4, _cartData$totalCartPr, _ref5;
10441
- var totalData = {
10442
- taxAmount: parseFloat((_ref2 = taxPercentage ? taxPercentage / 100 * (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) : 0) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2)),
10443
- shippingAmount: parseFloat((_ref3 = (shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) === null || _ref3 === void 0 ? void 0 : _ref3.toFixed(2)),
10444
- adjustmentValue: parseFloat((_ref4 = ccProcessingFees ? (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) * (ccProcessingFees / 100) : 0) === null || _ref4 === void 0 ? void 0 : _ref4.toFixed(2)),
10445
- subTotal: parseFloat(cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2)),
10446
- totalAmount: parseFloat((_ref5 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + (taxPercentage ? taxPercentage / 100 * (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) : 0) + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) + (ccProcessingFees ? (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) * (ccProcessingFees / 100) : 0)) === null || _ref5 === void 0 ? void 0 : _ref5.toFixed(2)),
10447
- totalQuantity: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity
10448
- };
10449
- setOrderTotal(totalData);
10450
- }, [taxPercentage, cartData, shippingMethod, ccProcessingFees]);
10447
+ (function () {
10448
+ try {
10449
+ var _temp9 = function _temp9() {
10450
+ var _taxAmount, _ref2, _ref3, _cartData$totalCartPr, _ref4;
10451
+ var totalData = {
10452
+ taxAmount: parseFloat((_taxAmount = taxAmount) === null || _taxAmount === void 0 ? void 0 : _taxAmount.toFixed(2)),
10453
+ shippingAmount: parseFloat((_ref2 = (shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2)),
10454
+ adjustmentValue: parseFloat((_ref3 = ccProcessingFees ? (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) * (ccProcessingFees / 100) : 0) === null || _ref3 === void 0 ? void 0 : _ref3.toFixed(2)),
10455
+ subTotal: parseFloat(cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2)),
10456
+ totalAmount: parseFloat((_ref4 = (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + taxAmount + ((shippingMethod === null || shippingMethod === void 0 ? void 0 : shippingMethod.amount) || 0) + (ccProcessingFees ? (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) * (ccProcessingFees / 100) : 0)) === null || _ref4 === void 0 ? void 0 : _ref4.toFixed(2)),
10457
+ totalQuantity: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity
10458
+ };
10459
+ setOrderTotal(totalData);
10460
+ };
10461
+ var taxAmount = 0;
10462
+ var _temp8 = function (_cartData$cartLineIte) {
10463
+ if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.length) > 0) {
10464
+ return Promise.resolve(API$1({
10465
+ apiEndPoint: apiEndPoint,
10466
+ token: token,
10467
+ url: "/cartLineItem/totalTax",
10468
+ queryParams: {
10469
+ storeId: 2,
10470
+ customerShippingAddressId: shippingAddressId
10471
+ }
10472
+ })).then(function (taxData) {
10473
+ var _customer$customerDto;
10474
+ taxAmount = !(customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.taxable) ? 0 : lodash.sumBy(taxData, 'taxAmount') || 0;
10475
+ });
10476
+ }
10477
+ }();
10478
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
10479
+ } catch (e) {
10480
+ Promise.reject(e);
10481
+ }
10482
+ })();
10483
+ }, [cartData, shippingMethod, ccProcessingFees, shippingAddressId]);
10451
10484
  var onLoginCustomer = function onLoginCustomer(data) {
10452
10485
  try {
10453
- var _temp9 = function _temp9() {
10486
+ var _temp11 = function _temp11() {
10454
10487
  setLoginLoading(false);
10455
10488
  };
10456
10489
  setLoginLoading(true);
10457
- var _temp8 = _catch(function () {
10490
+ var _temp10 = _catch(function () {
10458
10491
  return Promise.resolve(handleLogin(data)).then(function () {});
10459
10492
  }, function () {});
10460
- return Promise.resolve(_temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8));
10493
+ return Promise.resolve(_temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10));
10461
10494
  } catch (e) {
10462
10495
  return Promise.reject(e);
10463
10496
  }
10464
10497
  };
10465
10498
  var addStoreAddress = function addStoreAddress(data) {
10466
10499
  try {
10467
- var _temp11 = _catch(function () {
10468
- var _customer$customerDto, _customer$customerDto2;
10500
+ var _temp13 = _catch(function () {
10501
+ var _customer$customerDto2, _customer$customerDto3;
10469
10502
  return Promise.resolve(API$1({
10470
10503
  apiEndPoint: apiEndPoint,
10471
10504
  token: token,
10472
10505
  method: 'POST',
10473
- url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto = customer.customerDto) === null || _customer$customerDto === void 0 ? void 0 : _customer$customerDto.id) + "/address",
10506
+ url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id) + "/address",
10474
10507
  body: _extends({}, data, {
10475
- customerId: customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id
10508
+ customerId: customer === null || customer === void 0 ? void 0 : (_customer$customerDto3 = customer.customerDto) === null || _customer$customerDto3 === void 0 ? void 0 : _customer$customerDto3.id
10476
10509
  }),
10477
10510
  successMessage: 'Address added successfully.',
10478
10511
  errorMessage: 'Error in added the address.'
10479
10512
  })).then(function (result) {
10480
- var _temp10 = function () {
10513
+ var _temp12 = function () {
10481
10514
  if (result) {
10482
10515
  return Promise.resolve(API$1({
10483
10516
  apiEndPoint: apiEndPoint,
@@ -10488,10 +10521,10 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10488
10521
  });
10489
10522
  }
10490
10523
  }();
10491
- if (_temp10 && _temp10.then) return _temp10.then(function () {});
10524
+ if (_temp12 && _temp12.then) return _temp12.then(function () {});
10492
10525
  });
10493
10526
  }, function () {});
10494
- return Promise.resolve(_temp11 && _temp11.then ? _temp11.then(function () {}) : void 0);
10527
+ return Promise.resolve(_temp13 && _temp13.then ? _temp13.then(function () {}) : void 0);
10495
10528
  } catch (e) {
10496
10529
  return Promise.reject(e);
10497
10530
  }
@@ -10514,12 +10547,12 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10514
10547
  setShippingMethod(shippingMethod);
10515
10548
  };
10516
10549
  var setPaymentDetails = function setPaymentDetails(storeCr, paymentMethod, cr) {
10517
- var _customer$customerDto3;
10518
- if (storeCr && (customer === null || customer === void 0 ? void 0 : (_customer$customerDto3 = customer.customerDto) === null || _customer$customerDto3 === void 0 ? void 0 : _customer$customerDto3.storeCredit) > 0) {
10519
- var _customer$customerDto4;
10550
+ var _customer$customerDto4;
10551
+ if (storeCr && (customer === null || customer === void 0 ? void 0 : (_customer$customerDto4 = customer.customerDto) === null || _customer$customerDto4 === void 0 ? void 0 : _customer$customerDto4.storeCredit) > 0) {
10552
+ var _customer$customerDto5;
10520
10553
  setStoreCredits({
10521
10554
  id: 5,
10522
- amount: customer === null || customer === void 0 ? void 0 : (_customer$customerDto4 = customer.customerDto) === null || _customer$customerDto4 === void 0 ? void 0 : _customer$customerDto4.storeCredit
10555
+ amount: customer === null || customer === void 0 ? void 0 : (_customer$customerDto5 = customer.customerDto) === null || _customer$customerDto5 === void 0 ? void 0 : _customer$customerDto5.storeCredit
10523
10556
  });
10524
10557
  } else {
10525
10558
  setStoreCredits(null);
@@ -10535,11 +10568,11 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10535
10568
  };
10536
10569
  var onPlaceOrder = function onPlaceOrder(note) {
10537
10570
  try {
10538
- var _temp13 = function _temp13() {
10571
+ var _temp15 = function _temp15() {
10539
10572
  setOrdering(false);
10540
10573
  };
10541
10574
  setOrdering(true);
10542
- var _temp12 = _catch(function () {
10575
+ var _temp14 = _catch(function () {
10543
10576
  var authorizeCustomerCardData = {
10544
10577
  authorizeDotNetCustomerProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerProfileId,
10545
10578
  authorizeDotNetCustomerPaymentProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerPaymentProfileId
@@ -10590,24 +10623,24 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10590
10623
  });
10591
10624
  }
10592
10625
  if (selectedStoreCredits && (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) > (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) {
10593
- var _ref6;
10626
+ var _ref5;
10594
10627
  orderPaymentList = [{
10595
- amount: (_ref6 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) === null || _ref6 === void 0 ? void 0 : _ref6.toFixed(2),
10628
+ amount: parseFloat((_ref5 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) === null || _ref5 === void 0 ? void 0 : _ref5.toFixed(2)),
10596
10629
  paymentModeId: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.id
10597
10630
  }];
10598
10631
  } else if (selectedStoreCredits && (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) < (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) {
10599
- var _selectedStoreCredits, _ref7;
10632
+ var _selectedStoreCredits, _ref6;
10600
10633
  orderPaymentList = [{
10601
- amount: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : (_selectedStoreCredits = selectedStoreCredits.amount) === null || _selectedStoreCredits === void 0 ? void 0 : _selectedStoreCredits.toFixed(2),
10634
+ amount: parseFloat(selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : (_selectedStoreCredits = selectedStoreCredits.amount) === null || _selectedStoreCredits === void 0 ? void 0 : _selectedStoreCredits.toFixed(2)),
10602
10635
  paymentModeId: selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.id
10603
10636
  }, _extends({
10604
- amount: (_ref7 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) - discountTotal) === null || _ref7 === void 0 ? void 0 : _ref7.toFixed(2),
10637
+ amount: parseFloat((_ref6 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - (selectedStoreCredits === null || selectedStoreCredits === void 0 ? void 0 : selectedStoreCredits.amount) - discountTotal) === null || _ref6 === void 0 ? void 0 : _ref6.toFixed(2)),
10605
10638
  paymentModeId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id
10606
10639
  }, authorizeCustomerCardData)];
10607
10640
  } else {
10608
- var _ref8;
10641
+ var _ref7;
10609
10642
  orderPaymentList = [_extends({
10610
- amount: (_ref8 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) === null || _ref8 === void 0 ? void 0 : _ref8.toFixed(2),
10643
+ amount: parseFloat((_ref7 = (orderTotal === null || orderTotal === void 0 ? void 0 : orderTotal.totalAmount) - discountTotal) === null || _ref7 === void 0 ? void 0 : _ref7.toFixed(2)),
10611
10644
  paymentModeId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.id,
10612
10645
  customerOrderCard: ecommerceCustomPaymentDto
10613
10646
  }, authorizeCustomerCardData)];
@@ -10623,7 +10656,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10623
10656
  }
10624
10657
  return Promise.resolve(placeOrder(body)).then(function () {});
10625
10658
  }, function () {});
10626
- return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(_temp13) : _temp13(_temp12));
10659
+ return Promise.resolve(_temp14 && _temp14.then ? _temp14.then(_temp15) : _temp15(_temp14));
10627
10660
  } catch (e) {
10628
10661
  return Promise.reject(e);
10629
10662
  }
@@ -10634,7 +10667,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10634
10667
  bg: styles === null || styles === void 0 ? void 0 : styles.bg
10635
10668
  }, /*#__PURE__*/React__default.createElement(material.CssBaseline, null), /*#__PURE__*/React__default.createElement(CheckoutPageContainer, {
10636
10669
  className: "checkout",
10637
- bg: styles === null || styles === void 0 ? void 0 : styles.bg
10670
+ bg: styles === null || styles === void 0 ? void 0 : styles.bg,
10671
+ primaryColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor
10638
10672
  }, /*#__PURE__*/React__default.createElement(material.Stack, {
10639
10673
  flexDirection: "column",
10640
10674
  alignItems: "flex-start"
@@ -10662,7 +10696,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10662
10696
  width: '100%'
10663
10697
  }
10664
10698
  }, steps === null || steps === void 0 ? void 0 : steps.map(function (item, index) {
10665
- var _styles$stepperIcon, _styles$stepperIcon2, _customer$customerDto5, _customer$customerDto6, _customer$customerDto7, _customer$customerDto8, _customer$customerDto9, _customer$customerDto10;
10699
+ var _styles$stepperIcon, _styles$stepperIcon2, _customer$customerDto6, _customer$customerDto7, _customer$customerDto8, _customer$customerDto9, _customer$customerDto10, _customer$customerDto11;
10666
10700
  return /*#__PURE__*/React__default.createElement(material.Step, {
10667
10701
  key: index
10668
10702
  }, /*#__PURE__*/React__default.createElement(material.StepLabel, {
@@ -10695,7 +10729,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10695
10729
  text: item.text,
10696
10730
  icon: item.icon,
10697
10731
  single: true,
10698
- username: index === 0 ? customer === null || customer === void 0 ? void 0 : (_customer$customerDto5 = customer.customerDto) === null || _customer$customerDto5 === void 0 ? void 0 : _customer$customerDto5.firstName : '',
10732
+ username: index === 0 ? customer === null || customer === void 0 ? void 0 : (_customer$customerDto6 = customer.customerDto) === null || _customer$customerDto6 === void 0 ? void 0 : _customer$customerDto6.firstName : '',
10699
10733
  primaryColor: styles === null || styles === void 0 ? void 0 : styles.primaryColor,
10700
10734
  closed: true,
10701
10735
  handleClick: function handleClick() {
@@ -10710,7 +10744,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10710
10744
  }, /*#__PURE__*/React__default.createElement(Step0, {
10711
10745
  currStep: currStep,
10712
10746
  loading: loginLoading,
10713
- userName: customer === null || customer === void 0 ? void 0 : (_customer$customerDto6 = customer.customerDto) === null || _customer$customerDto6 === void 0 ? void 0 : _customer$customerDto6.firstName,
10747
+ userName: customer === null || customer === void 0 ? void 0 : (_customer$customerDto7 = customer.customerDto) === null || _customer$customerDto7 === void 0 ? void 0 : _customer$customerDto7.firstName,
10714
10748
  handleBack: handleBack,
10715
10749
  handleNext: handleNext,
10716
10750
  handleLogin: onLoginCustomer,
@@ -10752,7 +10786,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10752
10786
  setShipping: setShipping,
10753
10787
  showShipping: showShipping,
10754
10788
  shippingMethod: shippingMethod,
10755
- storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto7 = customer.customerDto) === null || _customer$customerDto7 === void 0 ? void 0 : _customer$customerDto7.storeCredit,
10789
+ storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto8 = customer.customerDto) === null || _customer$customerDto8 === void 0 ? void 0 : _customer$customerDto8.storeCredit,
10756
10790
  discountCoupons: discountCoupons,
10757
10791
  addShipping: addStoreAddress,
10758
10792
  setSelectedCountry: setSelectedCountry,
@@ -10768,7 +10802,6 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10768
10802
  apiEndPoint: apiEndPoint,
10769
10803
  authoriseDotNet: authoriseDotNet,
10770
10804
  token: token,
10771
- shippingMethod: shippingMethod,
10772
10805
  currstep: currStep,
10773
10806
  handleBack: handleBack,
10774
10807
  handleNext: handleNext,
@@ -10776,8 +10809,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10776
10809
  payments: paymentMethods,
10777
10810
  states: states,
10778
10811
  countries: countries,
10779
- storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto8 = customer.customerDto) === null || _customer$customerDto8 === void 0 ? void 0 : _customer$customerDto8.storeCredit,
10780
- total: cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice,
10812
+ storeCredits: customer === null || customer === void 0 ? void 0 : (_customer$customerDto9 = customer.customerDto) === null || _customer$customerDto9 === void 0 ? void 0 : _customer$customerDto9.storeCredit,
10813
+ orderTotal: orderTotal,
10781
10814
  styles: styles,
10782
10815
  setSelectedCountry: setSelectedCountry
10783
10816
  })), index === 4 && /*#__PURE__*/React__default.createElement(material.StepContent, {
@@ -10802,17 +10835,17 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
10802
10835
  discountCoupons: discountCoupons,
10803
10836
  shippingText: shippingText,
10804
10837
  ccProcessingFees: ccProcessingFees,
10805
- shippingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto9 = customer.customerDto) === null || _customer$customerDto9 === void 0 ? void 0 : (_customer$customerDto10 = _customer$customerDto9.customerStoreAddressList) === null || _customer$customerDto10 === void 0 ? void 0 : _customer$customerDto10.find(function (item) {
10838
+ shippingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto10 = customer.customerDto) === null || _customer$customerDto10 === void 0 ? void 0 : (_customer$customerDto11 = _customer$customerDto10.customerStoreAddressList) === null || _customer$customerDto11 === void 0 ? void 0 : _customer$customerDto11.find(function (item) {
10806
10839
  return (item === null || item === void 0 ? void 0 : item.id) === shippingAddressId;
10807
10840
  }),
10808
10841
  taxExempt: taxExempt,
10809
10842
  orderTotal: orderTotal
10810
10843
  })));
10811
10844
  }))))), /*#__PURE__*/React__default.createElement(CheckoutSummary, {
10812
- billingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto11 = customer.customerDto) === null || _customer$customerDto11 === void 0 ? void 0 : (_customer$customerDto12 = _customer$customerDto11.customerStoreAddressList) === null || _customer$customerDto12 === void 0 ? void 0 : _customer$customerDto12.find(function (item) {
10845
+ billingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto12 = customer.customerDto) === null || _customer$customerDto12 === void 0 ? void 0 : (_customer$customerDto13 = _customer$customerDto12.customerStoreAddressList) === null || _customer$customerDto13 === void 0 ? void 0 : _customer$customerDto13.find(function (item) {
10813
10846
  return (item === null || item === void 0 ? void 0 : item.id) === billingAddressId;
10814
10847
  }),
10815
- shippingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto13 = customer.customerDto) === null || _customer$customerDto13 === void 0 ? void 0 : (_customer$customerDto14 = _customer$customerDto13.customerStoreAddressList) === null || _customer$customerDto14 === void 0 ? void 0 : _customer$customerDto14.find(function (item) {
10848
+ shippingInformation: customer === null || customer === void 0 ? void 0 : (_customer$customerDto14 = customer.customerDto) === null || _customer$customerDto14 === void 0 ? void 0 : (_customer$customerDto15 = _customer$customerDto14.customerStoreAddressList) === null || _customer$customerDto15 === void 0 ? void 0 : _customer$customerDto15.find(function (item) {
10816
10849
  return (item === null || item === void 0 ? void 0 : item.id) === shippingAddressId;
10817
10850
  }),
10818
10851
  shippingMethod: shippingMethod,