@salesgenterp/ui-components 0.4.447 → 0.4.449

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
@@ -7069,7 +7069,7 @@ var CartTableCell$1 = styled__default(material.TableCell)(_templateObject4$c ||
7069
7069
  var QuantityBox = styled__default.div(_templateObject5$8 || (_templateObject5$8 = _taggedTemplateLiteralLoose(["\n height: 30px;\n width: 86px;\n border: 1px solid rgb(211, 210, 210);\n display: flex;\n align-items: center;\n justify-content: space-between;\n font-size: 13.5px;\n color: #323232;\n padding: 0 0.5rem;\n border-radius: 5px;\n max-width: 100%;\n .icon {\n cursor: pointer;\n height: 100%;\n display: grid;\n place-items: center;\n }\n .qt {\n font-size: 12px;\n color: black;\n font-weight: 500;\n cursor: auto;\n height: 100%;\n input {\n width: 40px;\n height: 100%;\n text-align: center;\n border: none;\n }\n }\n"])));
7070
7070
  var DeleteBtn = styled__default.div(_templateObject6$6 || (_templateObject6$6 = _taggedTemplateLiteralLoose(["\n display: grid;\n place-items: center;\n cursor: pointer;\n border-radius: 50%;\n width: 20px;\n height: 20px;\n background: #eef1f4;\n color: #393f48;\n font-size: 0.75em;\n transition: 0.4s;\n &:hover {\n background: red;\n color: white;\n }\n"])));
7071
7071
  var CardRow = function CardRow(_ref) {
7072
- var _styles$price, _styles$Btn, _row$standardPrice, _row$subtotal;
7072
+ var _styles$price, _styles$Btn;
7073
7073
  var row = _ref.row,
7074
7074
  isItemSelected = _ref.isItemSelected,
7075
7075
  handleClick = _ref.handleClick,
@@ -7170,7 +7170,14 @@ var CardRow = function CardRow(_ref) {
7170
7170
  className: "CartnoBelowSm"
7171
7171
  }, /*#__PURE__*/React__default.createElement("p", {
7172
7172
  className: "price"
7173
- }, "$", row === null || row === void 0 ? void 0 : (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
7173
+ }, (row === null || row === void 0 ? void 0 : row.originalStandardPrice) > (row === null || row === void 0 ? void 0 : row.originalStandardPrice) - (row === null || row === void 0 ? void 0 : row.discountAmount) && /*#__PURE__*/React__default.createElement("span", {
7174
+ style: {
7175
+ fontSize: '1rem',
7176
+ color: 'grey',
7177
+ textDecoration: 'line-through',
7178
+ marginRight: '0.5rem'
7179
+ }
7180
+ }, "$", row === null || row === void 0 ? void 0 : row.originalStandardPrice.toFixed(2)), "$", ((row === null || row === void 0 ? void 0 : row.originalStandardPrice) - (row === null || row === void 0 ? void 0 : row.discountAmount)).toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
7174
7181
  align: "center"
7175
7182
  }, /*#__PURE__*/React__default.createElement(QuantityBox, null, /*#__PURE__*/React__default.createElement("span", {
7176
7183
  className: "icon",
@@ -7221,7 +7228,7 @@ var CardRow = function CardRow(_ref) {
7221
7228
  className: "CartnoPaddingSm"
7222
7229
  }, /*#__PURE__*/React__default.createElement("p", {
7223
7230
  className: "price"
7224
- }, "$", (_row$subtotal = row.subtotal) === null || _row$subtotal === void 0 ? void 0 : _row$subtotal.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
7231
+ }, "$", ((row === null || row === void 0 ? void 0 : row.originalStandardPrice) * (row === null || row === void 0 ? void 0 : row.quantity) - (row === null || row === void 0 ? void 0 : row.discountAmount) * (row === null || row === void 0 ? void 0 : row.quantity)).toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
7225
7232
  alig: "center"
7226
7233
  }, /*#__PURE__*/React__default.createElement(DeleteBtn, {
7227
7234
  onClick: function onClick(e) {
@@ -8160,7 +8167,7 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
8160
8167
  onClick: function onClick() {
8161
8168
  return handleRedirect(product);
8162
8169
  }
8163
- }, product === null || product === void 0 ? void 0 : product.productName)), /*#__PURE__*/React__default.createElement("h6", null, (product === null || product === void 0 ? void 0 : product.standardPrice) === (product === null || product === void 0 ? void 0 : product.cartStandardPrice) ? "$" + (product === null || product === void 0 ? void 0 : product.standardPrice) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (product === null || product === void 0 ? void 0 : product.cartStandardPrice) && /*#__PURE__*/React__default.createElement("span", null, renderMoney(product === null || product === void 0 ? void 0 : product.cartStandardPrice)), renderMoney(product === null || product === void 0 ? void 0 : product.standardPrice)))), /*#__PURE__*/React__default.createElement(material.Stack, {
8170
+ }, product === null || product === void 0 ? void 0 : product.productName)), /*#__PURE__*/React__default.createElement("h6", null, !((product === null || product === void 0 ? void 0 : product.originalStandardPrice) > (product === null || product === void 0 ? void 0 : product.originalStandardPrice) - (product === null || product === void 0 ? void 0 : product.discountAmount)) ? "$" + ((product === null || product === void 0 ? void 0 : product.originalStandardPrice) - (product === null || product === void 0 ? void 0 : product.discountAmount)) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", null, renderMoney(product === null || product === void 0 ? void 0 : product.originalStandardPrice)), renderMoney((product === null || product === void 0 ? void 0 : product.originalStandardPrice) - (product === null || product === void 0 ? void 0 : product.discountAmount))))), /*#__PURE__*/React__default.createElement(material.Stack, {
8164
8171
  flexDirection: "column",
8165
8172
  justifyContent: "space-between",
8166
8173
  alignItems: "flex-end",
@@ -12574,11 +12581,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12574
12581
  styles = _ref.styles,
12575
12582
  cartData = _ref.cartData,
12576
12583
  handleLogin = _ref.handleLogin,
12577
- placeOrder = _ref.placeOrder,
12578
12584
  clickRedirect = _ref.clickRedirect,
12579
- shippingText = _ref.shippingText,
12580
- _ref$enableSalesOrder = _ref.enableSalesOrder,
12581
- enableSalesOrder = _ref$enableSalesOrder === void 0 ? false : _ref$enableSalesOrder;
12585
+ shippingText = _ref.shippingText;
12582
12586
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
12583
12587
  apiEndPoint: apiEndPoint,
12584
12588
  token: token
@@ -12794,7 +12798,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12794
12798
  var _taxAmount2 = 0;
12795
12799
  var _couponDiscountTotal = 0;
12796
12800
  var _temp12 = function (_cartData$cartLineIte) {
12797
- if (taxExempt && shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.length) > 0) {
12801
+ if (shippingAddressId && (cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.length) > 0) {
12798
12802
  var _temp9 = _catch(function () {
12799
12803
  return Promise.resolve(API({
12800
12804
  apiEndPoint: apiEndPoint,
@@ -12943,11 +12947,11 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
12943
12947
  };
12944
12948
  var onPlaceOrder = function onPlaceOrder(note, transactionId) {
12945
12949
  try {
12946
- var _temp21 = function _temp21() {
12950
+ var _temp20 = function _temp20() {
12947
12951
  setOrdering(false);
12948
12952
  };
12949
12953
  setOrdering(true);
12950
- var _temp20 = _catch(function () {
12954
+ var _temp19 = _catch(function () {
12951
12955
  var authorizeCustomerCardData = {
12952
12956
  authorizeDotNetCustomerProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerProfileId,
12953
12957
  authorizeDotNetCustomerPaymentProfileId: selectedPaymentMethod === null || selectedPaymentMethod === void 0 ? void 0 : selectedPaymentMethod.authorizeDotNetCustomerPaymentProfileId
@@ -13024,29 +13028,17 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
13024
13028
  }, authorizeCustomerCardData)];
13025
13029
  }
13026
13030
  var paymentDtoList = orderPaymentList;
13027
- var body = {
13028
- orderDto: orderDto,
13029
- paymentDtoList: paymentDtoList,
13030
- discountCouponList: discountCoupons
13031
- };
13032
13031
  var salesOrderDtoBody = {
13033
13032
  salesOrderDto: orderDto,
13034
13033
  salesOrderPaymentDtoList: paymentDtoList,
13035
13034
  discountCouponList: discountCoupons
13036
13035
  };
13037
13036
  if (ecommerceCustomPaymentDto) {
13038
- body.ecommerceCustomPaymentDto;
13037
+ salesOrderDtoBody.ecommerceCustomPaymentDto;
13039
13038
  }
13040
- var _temp19 = function () {
13041
- if (enableSalesOrder) {
13042
- return Promise.resolve(createSalesOrder(salesOrderDtoBody)).then(function () {});
13043
- } else {
13044
- return Promise.resolve(placeOrder(body)).then(function () {});
13045
- }
13046
- }();
13047
- if (_temp19 && _temp19.then) return _temp19.then(function () {});
13039
+ return Promise.resolve(createSalesOrder(salesOrderDtoBody)).then(function () {});
13048
13040
  }, function () {});
13049
- return Promise.resolve(_temp20 && _temp20.then ? _temp20.then(_temp21) : _temp21(_temp20));
13041
+ return Promise.resolve(_temp19 && _temp19.then ? _temp19.then(_temp20) : _temp20(_temp19));
13050
13042
  } catch (e) {
13051
13043
  return Promise.reject(e);
13052
13044
  }