@salesgenterp/ui-components 0.4.524 → 0.4.526

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
@@ -2870,7 +2870,9 @@ var Dashboard = function Dashboard(_ref) {
2870
2870
  hideTotalCardInDashboardSummary = _ref.hideTotalCardInDashboardSummary,
2871
2871
  _ref$showOnlyRecentOr = _ref.showOnlyRecentOrder,
2872
2872
  showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
2873
- hidePayActionButton = _ref.hidePayActionButton;
2873
+ hidePayActionButton = _ref.hidePayActionButton,
2874
+ hideInvoiceTab = _ref.hideInvoiceTab,
2875
+ hideSalesOrderTab = _ref.hideSalesOrderTab;
2874
2876
  var _useState = React.useState({}),
2875
2877
  customerData = _useState[0],
2876
2878
  setCustomerData = _useState[1];
@@ -2906,6 +2908,14 @@ var Dashboard = function Dashboard(_ref) {
2906
2908
  var _useState7 = React.useState(0),
2907
2909
  value = _useState7[0],
2908
2910
  setValue = _useState7[1];
2911
+ React.useEffect(function () {
2912
+ if (hideSalesOrderTab) {
2913
+ setValue(1);
2914
+ }
2915
+ if (hideInvoiceTab) {
2916
+ setValue(0);
2917
+ }
2918
+ }, [hideSalesOrderTab, hideInvoiceTab]);
2909
2919
  var handleChange = function handleChange(event, newValue) {
2910
2920
  setValue(newValue);
2911
2921
  setTriggerTableData(getRandomString());
@@ -3337,9 +3347,9 @@ var Dashboard = function Dashboard(_ref) {
3337
3347
  "aria-label": "basic tabs example",
3338
3348
  primaryColor: primaryColor,
3339
3349
  fontColor: fontColor
3340
- }, /*#__PURE__*/React__default.createElement(material.Tab, _extends({
3350
+ }, !hideSalesOrderTab && /*#__PURE__*/React__default.createElement(material.Tab, _extends({
3341
3351
  label: "Sales Orders"
3342
- }, a11yProps(0))), /*#__PURE__*/React__default.createElement(material.Tab, _extends({
3352
+ }, a11yProps(0))), !hideInvoiceTab && /*#__PURE__*/React__default.createElement(material.Tab, _extends({
3343
3353
  label: "Recent Invoices"
3344
3354
  }, a11yProps(1)))))), /*#__PURE__*/React__default.createElement(TypographyContainer$2, {
3345
3355
  variant: "h4",
@@ -4905,7 +4915,11 @@ var AccountDetails = function AccountDetails(_ref) {
4905
4915
  _ref$showOnlyRecentOr = _ref.showOnlyRecentOrder,
4906
4916
  showOnlyRecentOrder = _ref$showOnlyRecentOr === void 0 ? false : _ref$showOnlyRecentOr,
4907
4917
  _ref$hidePayActionBut = _ref.hidePayActionButton,
4908
- hidePayActionButton = _ref$hidePayActionBut === void 0 ? false : _ref$hidePayActionBut;
4918
+ hidePayActionButton = _ref$hidePayActionBut === void 0 ? false : _ref$hidePayActionBut,
4919
+ _ref$hideSalesOrderTa = _ref.hideSalesOrderTab,
4920
+ hideSalesOrderTab = _ref$hideSalesOrderTa === void 0 ? false : _ref$hideSalesOrderTa,
4921
+ _ref$hideInvoiceTab = _ref.hideInvoiceTab,
4922
+ hideInvoiceTab = _ref$hideInvoiceTab === void 0 ? false : _ref$hideInvoiceTab;
4909
4923
  var _useAllSystemFeatureV = useAllSystemFeatureValues({
4910
4924
  apiEndPoint: apiEndPoint,
4911
4925
  token: token
@@ -5074,7 +5088,9 @@ var AccountDetails = function AccountDetails(_ref) {
5074
5088
  removeSocialLinks: removeSocialLinks,
5075
5089
  hideTotalCardInDashboardSummary: hideTotalCardInDashboardSummary,
5076
5090
  showOnlyRecentOrder: showOnlyRecentOrder,
5077
- hidePayActionButton: hidePayActionButton
5091
+ hidePayActionButton: hidePayActionButton,
5092
+ hideSalesOrderTab: hideSalesOrderTab,
5093
+ hideInvoiceTab: hideInvoiceTab
5078
5094
  });
5079
5095
  case 'myProfile':
5080
5096
  return /*#__PURE__*/React__default.createElement(MyProfile, {
@@ -8695,7 +8711,7 @@ var OutOfStock = function OutOfStock(_ref) {
8695
8711
  setSubscribed = _React$useState4[1];
8696
8712
  var MasterProductDetails = product === null || product === void 0 ? void 0 : product.masterProductDetails;
8697
8713
  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) {
8698
- return (item === null || item === void 0 ? void 0 : item.availableQuantity) === 0;
8714
+ return (item === null || item === void 0 ? void 0 : item.availableQuantity) <= 0;
8699
8715
  })) || [];
8700
8716
  var handleSelectAllClick = function handleSelectAllClick(event) {
8701
8717
  if (event.target.checked) {