@salesgenterp/ui-components 0.4.386 → 0.4.387

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
@@ -6604,7 +6604,7 @@ var CardRow = function CardRow(_ref) {
6604
6604
  className: "CartnoPaddingSm"
6605
6605
  }, /*#__PURE__*/React__default.createElement(ProductImage, {
6606
6606
  src: row.imageUrl && row.imageUrl !== 'null' ? row.imageUrl : imgnotfoundUrlcommon,
6607
- alt: 'no product image available',
6607
+ alt: 'img',
6608
6608
  width: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.width) || 50,
6609
6609
  height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) || 50
6610
6610
  })), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
@@ -6617,7 +6617,12 @@ var CardRow = function CardRow(_ref) {
6617
6617
  color: 'red',
6618
6618
  fontWeight: 500
6619
6619
  }
6620
- }, "Maximum available quantity is ", row === null || row === void 0 ? void 0 : row.availableQuantity)), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
6620
+ }, "Maximum available quantity is ", row === null || row === void 0 ? void 0 : row.availableQuantity), (row === null || row === void 0 ? void 0 : row.quantity) <= 0 && /*#__PURE__*/React__default.createElement("p", {
6621
+ style: {
6622
+ color: 'red',
6623
+ fontWeight: 500
6624
+ }
6625
+ }, "Quantity can not be less than 0")), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
6621
6626
  align: "center",
6622
6627
  className: "CartnoBelowSm"
6623
6628
  }, /*#__PURE__*/React__default.createElement("p", {
@@ -6899,7 +6904,7 @@ function EnhancedTable(_ref) {
6899
6904
  styles: styles,
6900
6905
  disabledSelectAllProductCheckbox: disabledSelectAllProductCheckbox
6901
6906
  }), /*#__PURE__*/React.createElement(TableBody, null, (_sortBy = lodash.sortBy(cartArray, function (o) {
6902
- return !((o === null || o === void 0 ? void 0 : o.availableQuantity) <= 0 || (o === null || o === void 0 ? void 0 : o.quantity) > (o === null || o === void 0 ? void 0 : o.availableQuantity));
6907
+ return !((o === null || o === void 0 ? void 0 : o.quantity) <= 0 || (o === null || o === void 0 ? void 0 : o.availableQuantity) <= 0 || (o === null || o === void 0 ? void 0 : o.quantity) > (o === null || o === void 0 ? void 0 : o.availableQuantity));
6903
6908
  })) === null || _sortBy === void 0 ? void 0 : _sortBy.map(function (row, index) {
6904
6909
  var isItemSelected = isSelected(row);
6905
6910
  return /*#__PURE__*/React.createElement(CardRow, {
@@ -6984,7 +6989,7 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
6984
6989
  };
6985
6990
  return /*#__PURE__*/React__default.createElement(CartPageCard, null, /*#__PURE__*/React__default.createElement(CartPageImg, {
6986
6991
  src: item.imageUrl && item.imageUrl !== 'null' ? item.imageUrl : imgnotfoundUrlcommon,
6987
- alt: 'no product image available',
6992
+ alt: 'img',
6988
6993
  width: imgSize === null || imgSize === void 0 ? void 0 : imgSize.width,
6989
6994
  height: imgSize === null || imgSize === void 0 ? void 0 : imgSize.height
6990
6995
  }), /*#__PURE__*/React__default.createElement(NameAndQtBox, null, /*#__PURE__*/React__default.createElement(CartPageCardName, null, /*#__PURE__*/React__default.createElement(material.Tooltip, {
@@ -7026,7 +7031,12 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
7026
7031
  color: 'red',
7027
7032
  fontWeight: 500
7028
7033
  }
7029
- }, "Maximum available quantity is ", item === null || item === void 0 ? void 0 : item.availableQuantity)), /*#__PURE__*/React__default.createElement(CloseBtn, {
7034
+ }, "Maximum available quantity is ", item === null || item === void 0 ? void 0 : item.availableQuantity), (item === null || item === void 0 ? void 0 : item.quantity) <= 0 && /*#__PURE__*/React__default.createElement("p", {
7035
+ style: {
7036
+ color: 'red',
7037
+ fontWeight: 500
7038
+ }
7039
+ }, "Quantity can not be less than 0")), /*#__PURE__*/React__default.createElement(CloseBtn, {
7030
7040
  onClick: function onClick() {
7031
7041
  if (loading) return;
7032
7042
  var sure = confirm('Are you sure you want to remove this item from cart');
@@ -7054,7 +7064,7 @@ var CartPageMainRetail = function CartPageMainRetail(_ref) {
7054
7064
  color: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background,
7055
7065
  loading: true
7056
7066
  })), (_sortBy = lodash.sortBy(cartData === null || cartData === void 0 ? void 0 : cartData.cartLineItemDtoList, function (o) {
7057
- return !((o === null || o === void 0 ? void 0 : o.availableQuantity) <= 0 || (o === null || o === void 0 ? void 0 : o.quantity) > (o === null || o === void 0 ? void 0 : o.availableQuantity));
7067
+ return !((o === null || o === void 0 ? void 0 : o.quantity) <= 0 || (o === null || o === void 0 ? void 0 : o.availableQuantity) <= 0 || (o === null || o === void 0 ? void 0 : o.quantity) > (o === null || o === void 0 ? void 0 : o.availableQuantity));
7058
7068
  })) === null || _sortBy === void 0 ? void 0 : _sortBy.map(function (item) {
7059
7069
  return /*#__PURE__*/React__default.createElement(CartPageProductCard, {
7060
7070
  item: item,
@@ -7576,7 +7586,7 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
7576
7586
  color: color
7577
7587
  }, /*#__PURE__*/React__default.createElement("img", {
7578
7588
  src: product.imageUrl && product.imageUrl !== 'null' ? product.imageUrl : imgnotfoundUrlcommon,
7579
- alt: 'no product image available'
7589
+ alt: 'img'
7580
7590
  }), /*#__PURE__*/React__default.createElement(material.Stack, {
7581
7591
  flexDirection: "column",
7582
7592
  justifyContent: "space-between",
@@ -8785,7 +8795,7 @@ var CardRow$1 = function CardRow(_ref) {
8785
8795
  className: "CartnoPaddingSm"
8786
8796
  }, /*#__PURE__*/React__default.createElement(ProductImage$1, {
8787
8797
  src: row.imageUrl && row.imageUrl !== 'null' ? row.imageUrl : imgnotfoundUrlcommon,
8788
- alt: 'no product image available',
8798
+ alt: 'img',
8789
8799
  width: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.width) || 50,
8790
8800
  height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) || 50
8791
8801
  })), /*#__PURE__*/React__default.createElement(CartTableCell$2, {