@salesgenterp/ui-components 0.4.488 → 0.4.490

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
@@ -7350,7 +7350,7 @@ var CardRow = function CardRow(_ref) {
7350
7350
  setQuantity(row === null || row === void 0 ? void 0 : row.quantity);
7351
7351
  }, [row]);
7352
7352
  var onChangeQuantity = function onChangeQuantity(product) {
7353
- if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
7353
+ if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || !allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
7354
7354
  return handleRemoveProduct(product);
7355
7355
  } else {
7356
7356
  handleIncrementDecrement(product, product);
@@ -7446,7 +7446,7 @@ var CardRow = function CardRow(_ref) {
7446
7446
  onClick: function onClick(e) {
7447
7447
  e.stopPropagation();
7448
7448
  if (loading) return;
7449
- if ((row === null || row === void 0 ? void 0 : row.availableQuantity) === 0 || (row === null || row === void 0 ? void 0 : row.quantity) === 1) {
7449
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0 || (row === null || row === void 0 ? void 0 : row.quantity) === 1) {
7450
7450
  return handleRemoveProduct(row);
7451
7451
  }
7452
7452
  onChangeQuantity(_extends({}, row, {
@@ -7472,7 +7472,7 @@ var CardRow = function CardRow(_ref) {
7472
7472
  onClick: function onClick(e) {
7473
7473
  e.stopPropagation();
7474
7474
  if (loading) return;
7475
- if ((row === null || row === void 0 ? void 0 : row.availableQuantity) === 0) {
7475
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) {
7476
7476
  return handleRemoveProduct(row);
7477
7477
  }
7478
7478
  onChangeQuantity(_extends({}, row, {
@@ -7798,7 +7798,7 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
7798
7798
  }, [item]);
7799
7799
  var onChangeQuantity = function onChangeQuantity(product) {
7800
7800
  handleIncrementDecrement(product, product);
7801
- if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
7801
+ if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || !allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
7802
7802
  return handleRemoveProduct(product);
7803
7803
  }
7804
7804
  };
@@ -8321,7 +8321,7 @@ var CartPageComponent = function CartPageComponent(_ref) {
8321
8321
  };
8322
8322
  var onChangeQuantity = function onChangeQuantity(product) {
8323
8323
  handleIncrementDecrement(product, product);
8324
- if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
8324
+ if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || !allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
8325
8325
  return handleRemoveProduct(product);
8326
8326
  }
8327
8327
  };
@@ -8429,7 +8429,7 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
8429
8429
  if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
8430
8430
  var onChangeQuantity = function onChangeQuantity(product) {
8431
8431
  handleIncrementDecrement(product, product);
8432
- if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
8432
+ if ((product === null || product === void 0 ? void 0 : product.quantity) <= 0 || !allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0) {
8433
8433
  return handleRemoveProduct(product);
8434
8434
  }
8435
8435
  };
@@ -8488,7 +8488,7 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
8488
8488
  onClick: function onClick(e) {
8489
8489
  e.stopPropagation();
8490
8490
  if (loading) return;
8491
- if ((product === null || product === void 0 ? void 0 : product.availableQuantity) === 0 || (product === null || product === void 0 ? void 0 : product.quantity) === 1) {
8491
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (product === null || product === void 0 ? void 0 : product.availableQuantity) <= 0 || (product === null || product === void 0 ? void 0 : product.quantity) === 1) {
8492
8492
  return handleRemoveProduct(product);
8493
8493
  }
8494
8494
  onChangeQuantity(_extends({}, product, {
@@ -8532,8 +8532,9 @@ var CartDrawer = function CartDrawer(_ref) {
8532
8532
  imgnotfoundUrl = _ref.imgnotfoundUrl,
8533
8533
  cartHeadingText = _ref.cartHeadingText,
8534
8534
  _ref$doNotShowPrice = _ref.doNotShowPrice,
8535
- doNotShowPrice = _ref$doNotShowPrice === void 0 ? false : _ref$doNotShowPrice;
8536
- var allowToProcessInvoiceForOutOfStockProductsEcommerce = false;
8535
+ doNotShowPrice = _ref$doNotShowPrice === void 0 ? false : _ref$doNotShowPrice,
8536
+ _ref$allowToProcessIn = _ref.allowToProcessInvoiceForOutOfStockProductsEcommerce,
8537
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref$allowToProcessIn === void 0 ? false : _ref$allowToProcessIn;
8537
8538
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(CartDrawerContainer, {
8538
8539
  className: "cartDrawer-container",
8539
8540
  maxWidth: maxWidth
@@ -9374,7 +9375,9 @@ var CardRow$1 = function CardRow(_ref) {
9374
9375
  handleRemoveProduct = _ref.handleRemoveProduct,
9375
9376
  loading = _ref.loading,
9376
9377
  imgSize = _ref.imgSize,
9377
- styles = _ref.styles;
9378
+ styles = _ref.styles,
9379
+ _ref$allowToProcessIn = _ref.allowToProcessInvoiceForOutOfStockProductsEcommerce,
9380
+ allowToProcessInvoiceForOutOfStockProductsEcommerce = _ref$allowToProcessIn === void 0 ? false : _ref$allowToProcessIn;
9378
9381
  var imgnotfoundUrlcommon = noImgAvailable$1;
9379
9382
  if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
9380
9383
  return /*#__PURE__*/React__default.createElement(CartTableRow$1, {
@@ -9430,7 +9433,7 @@ var CardRow$1 = function CardRow(_ref) {
9430
9433
  onClick: function onClick(e) {
9431
9434
  e.stopPropagation();
9432
9435
  if (loading) return;
9433
- if ((row === null || row === void 0 ? void 0 : row.availableQuantity) === 0) {
9436
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) {
9434
9437
  return handleRemoveProduct(row, index);
9435
9438
  }
9436
9439
  handleIncrementDecrement('decrement', _extends({}, row, {
@@ -9448,7 +9451,7 @@ var CardRow$1 = function CardRow(_ref) {
9448
9451
  onClick: function onClick(e) {
9449
9452
  e.stopPropagation();
9450
9453
  if (loading) return;
9451
- if ((row === null || row === void 0 ? void 0 : row.availableQuantity) === 0) {
9454
+ if (!allowToProcessInvoiceForOutOfStockProductsEcommerce && (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) {
9452
9455
  return handleRemoveProduct(row, index);
9453
9456
  }
9454
9457
  handleIncrementDecrement('increment', _extends({}, row, {