@salesgenterp/ui-components 0.4.523 → 0.4.525

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
@@ -3741,6 +3741,7 @@ var MyProfile = function MyProfile(_ref) {
3741
3741
  xs: 12,
3742
3742
  md: 6
3743
3743
  }, /*#__PURE__*/React__default.createElement(FormTextField, {
3744
+ disabled: disabledUpdateProfileFromDashboard,
3744
3745
  label: "First Name",
3745
3746
  name: "firstName",
3746
3747
  required: true,
@@ -3753,6 +3754,7 @@ var MyProfile = function MyProfile(_ref) {
3753
3754
  }, /*#__PURE__*/React__default.createElement(FormTextField, {
3754
3755
  label: "Last Name",
3755
3756
  name: "lastName",
3757
+ disabled: disabledUpdateProfileFromDashboard,
3756
3758
  required: true,
3757
3759
  control: control,
3758
3760
  fontColor: fontColor
@@ -3764,6 +3766,7 @@ var MyProfile = function MyProfile(_ref) {
3764
3766
  label: "Company Name",
3765
3767
  name: "company",
3766
3768
  required: true,
3769
+ disabled: disabledUpdateProfileFromDashboard,
3767
3770
  control: control,
3768
3771
  fontColor: fontColor
3769
3772
  })), /*#__PURE__*/React__default.createElement(material.Grid, {
@@ -3776,7 +3779,8 @@ var MyProfile = function MyProfile(_ref) {
3776
3779
  type: "email",
3777
3780
  required: true,
3778
3781
  control: control,
3779
- fontColor: fontColor
3782
+ fontColor: fontColor,
3783
+ disabled: disabledUpdateProfileFromDashboard
3780
3784
  })), /*#__PURE__*/React__default.createElement(material.Grid, {
3781
3785
  item: true,
3782
3786
  xs: 12,
@@ -3787,7 +3791,8 @@ var MyProfile = function MyProfile(_ref) {
3787
3791
  type: "number",
3788
3792
  required: true,
3789
3793
  control: control,
3790
- fontColor: fontColor
3794
+ fontColor: fontColor,
3795
+ disabled: disabledUpdateProfileFromDashboard
3791
3796
  })), /*#__PURE__*/React__default.createElement(material.Grid, {
3792
3797
  item: true,
3793
3798
  xs: 12,
@@ -3798,7 +3803,8 @@ var MyProfile = function MyProfile(_ref) {
3798
3803
  type: "number",
3799
3804
  required: true,
3800
3805
  control: control,
3801
- fontColor: fontColor
3806
+ fontColor: fontColor,
3807
+ disabled: disabledUpdateProfileFromDashboard
3802
3808
  })), /*#__PURE__*/React__default.createElement(material.Grid, {
3803
3809
  item: true,
3804
3810
  xs: 12,
@@ -3820,7 +3826,7 @@ var MyProfile = function MyProfile(_ref) {
3820
3826
  control: control,
3821
3827
  fontColor: fontColor,
3822
3828
  disabled: true
3823
- }))), /*#__PURE__*/React__default.createElement(MuiButton, {
3829
+ }))), !disabledUpdateProfileFromDashboard && /*#__PURE__*/React__default.createElement(MuiButton, {
3824
3830
  variant: "contained",
3825
3831
  loading: isLoading,
3826
3832
  onClick: handleSubmit(updateProfile),
@@ -7494,12 +7500,12 @@ var CardRow = function CardRow(_ref) {
7494
7500
  }, row.productName), /*#__PURE__*/React__default.createElement(CouponDiscountName, {
7495
7501
  discountAmount: row === null || row === void 0 ? void 0 : row.couponDiscount,
7496
7502
  discountName: row === null || row === void 0 ? void 0 : row.couponCode
7497
- }), ((row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) || (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) && /*#__PURE__*/React__default.createElement("p", {
7503
+ }), !allowToProcessInvoiceForOutOfStockProductsEcommerce ? ((row === null || row === void 0 ? void 0 : row.quantity) > (row === null || row === void 0 ? void 0 : row.availableQuantity) || (row === null || row === void 0 ? void 0 : row.availableQuantity) <= 0) && /*#__PURE__*/React__default.createElement("p", {
7498
7504
  style: {
7499
7505
  color: 'red',
7500
7506
  fontWeight: 500
7501
7507
  }
7502
- }, "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", {
7508
+ }, "Maximum available quantity is ", row === null || row === void 0 ? void 0 : row.availableQuantity) : /*#__PURE__*/React__default.createElement("div", null), (row === null || row === void 0 ? void 0 : row.quantity) <= 0 && /*#__PURE__*/React__default.createElement("p", {
7503
7509
  style: {
7504
7510
  color: 'red',
7505
7511
  fontWeight: 500
@@ -7945,12 +7951,12 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
7945
7951
  }, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, null))), !doNotShowPrice && /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement(TotalAfterDiscount, {
7946
7952
  totalAmount: ((item === null || item === void 0 ? void 0 : item.standardPrice) - (item === null || item === void 0 ? void 0 : item.discountAmount)) * item.quantity,
7947
7953
  discountAmount: item === null || item === void 0 ? void 0 : item.couponDiscount
7948
- }))), ((item === null || item === void 0 ? void 0 : item.quantity) > (item === null || item === void 0 ? void 0 : item.availableQuantity) || (item === null || item === void 0 ? void 0 : item.availableQuantity) <= 0) && /*#__PURE__*/React__default.createElement("p", {
7954
+ }))), !allowToProcessInvoiceForOutOfStockProductsEcommerce ? ((item === null || item === void 0 ? void 0 : item.quantity) > (item === null || item === void 0 ? void 0 : item.availableQuantity) || (item === null || item === void 0 ? void 0 : item.availableQuantity) <= 0) && /*#__PURE__*/React__default.createElement("p", {
7949
7955
  style: {
7950
7956
  color: 'red',
7951
7957
  fontWeight: 500
7952
7958
  }
7953
- }, "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", {
7959
+ }, "Maximum available quantity is ", item === null || item === void 0 ? void 0 : item.availableQuantity) : /*#__PURE__*/React__default.createElement("div", null), (item === null || item === void 0 ? void 0 : item.quantity) <= 0 && /*#__PURE__*/React__default.createElement("p", {
7954
7960
  style: {
7955
7961
  color: 'red',
7956
7962
  fontWeight: 500
@@ -8689,7 +8695,7 @@ var OutOfStock = function OutOfStock(_ref) {
8689
8695
  setSubscribed = _React$useState4[1];
8690
8696
  var MasterProductDetails = product === null || product === void 0 ? void 0 : product.masterProductDetails;
8691
8697
  var outofstockproducts = (product === null || product === void 0 ? void 0 : (_product$body = product.body) === null || _product$body === void 0 ? void 0 : (_product$body$content = _product$body.content) === null || _product$body$content === void 0 ? void 0 : _product$body$content.filter(function (item) {
8692
- return (item === null || item === void 0 ? void 0 : item.availableQuantity) === 0;
8698
+ return (item === null || item === void 0 ? void 0 : item.availableQuantity) <= 0;
8693
8699
  })) || [];
8694
8700
  var handleSelectAllClick = function handleSelectAllClick(event) {
8695
8701
  if (event.target.checked) {
@@ -9479,12 +9485,12 @@ var CardRow$1 = function CardRow(_ref) {
9479
9485
  id: row === null || row === void 0 ? void 0 : row.labelId,
9480
9486
  scope: "row",
9481
9487
  padding: "none"
9482
- }, /*#__PURE__*/React__default.createElement(ProductName$1, null, row.productName), (row.quantity > row.availableQuantity || row.availableQuantity <= 0) && /*#__PURE__*/React__default.createElement("p", {
9488
+ }, /*#__PURE__*/React__default.createElement(ProductName$1, null, row.productName), !allowToProcessInvoiceForOutOfStockProductsEcommerce ? (row.quantity > row.availableQuantity || row.availableQuantity <= 0) && /*#__PURE__*/React__default.createElement("p", {
9483
9489
  style: {
9484
9490
  color: 'red',
9485
9491
  fontWeight: 500
9486
9492
  }
9487
- }, "Maximum available quantity is ", row.availableQuantity)), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
9493
+ }, "Maximum available quantity is ", row.availableQuantity) : /*#__PURE__*/React__default.createElement("div", null)), /*#__PURE__*/React__default.createElement(CartTableCell$2, {
9488
9494
  align: "center",
9489
9495
  className: "CartnoBelowSm"
9490
9496
  }, /*#__PURE__*/React__default.createElement("p", {