@salesgenterp/ui-components 0.4.414 → 0.4.416
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 +27 -43
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +27 -43
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4107,29 +4107,23 @@ var StoreTabs = function StoreTabs(_ref) {
|
|
|
4107
4107
|
var _useState2 = React.useState(),
|
|
4108
4108
|
storeData = _useState2[0],
|
|
4109
4109
|
setStoreData = _useState2[1];
|
|
4110
|
-
console.log(storeData, 'level 2 rendered');
|
|
4111
4110
|
var handleChange = function handleChange(event, newValue) {
|
|
4112
4111
|
setValue(newValue);
|
|
4113
4112
|
};
|
|
4114
4113
|
React.useEffect(function () {
|
|
4115
|
-
|
|
4114
|
+
(function () {
|
|
4116
4115
|
try {
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
}();
|
|
4124
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
4125
|
-
}, function (error) {
|
|
4126
|
-
console.log(error, 'check sub catch error main file');
|
|
4127
|
-
}));
|
|
4116
|
+
var _temp = function (_customer$customerDto) {
|
|
4117
|
+
if (customer !== null && customer !== void 0 && (_customer$customerDto = customer.customerDto) !== null && _customer$customerDto !== void 0 && _customer$customerDto.id && token && apiEndPoint) {
|
|
4118
|
+
return Promise.resolve(getAllStoreAddress()).then(function () {});
|
|
4119
|
+
}
|
|
4120
|
+
}();
|
|
4121
|
+
return _temp && _temp.then ? _temp.then(function () {}) : void 0;
|
|
4128
4122
|
} catch (e) {
|
|
4129
|
-
|
|
4123
|
+
Promise.reject(e);
|
|
4130
4124
|
}
|
|
4131
4125
|
})();
|
|
4132
|
-
}, [customer]);
|
|
4126
|
+
}, [customer, token, apiEndPoint]);
|
|
4133
4127
|
var getAllStoreAddress = function getAllStoreAddress() {
|
|
4134
4128
|
try {
|
|
4135
4129
|
var _temp2 = _catch(function () {
|
|
@@ -4140,12 +4134,9 @@ var StoreTabs = function StoreTabs(_ref) {
|
|
|
4140
4134
|
url: "/ecommerce/customer/" + (customer === null || customer === void 0 ? void 0 : (_customer$customerDto2 = customer.customerDto) === null || _customer$customerDto2 === void 0 ? void 0 : _customer$customerDto2.id) + "/address",
|
|
4141
4135
|
errorMessage: 'Error in getting store data.'
|
|
4142
4136
|
})).then(function (data) {
|
|
4143
|
-
console.log(data, 'check inside try 1 function');
|
|
4144
4137
|
setStoreData(data);
|
|
4145
4138
|
});
|
|
4146
|
-
}, function (
|
|
4147
|
-
console.log(error, 'check api function error');
|
|
4148
|
-
});
|
|
4139
|
+
}, function () {});
|
|
4149
4140
|
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
4150
4141
|
} catch (e) {
|
|
4151
4142
|
return Promise.reject(e);
|
|
@@ -4202,32 +4193,25 @@ var StoreList = function StoreList(_ref) {
|
|
|
4202
4193
|
var _useState = React.useState(),
|
|
4203
4194
|
customer = _useState[0],
|
|
4204
4195
|
setCustomer = _useState[1];
|
|
4205
|
-
console.log('check level 1 rendered');
|
|
4206
4196
|
React.useEffect(function () {
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
}, function (error) {
|
|
4224
|
-
console.log(error, 'check catch error main file');
|
|
4225
|
-
}));
|
|
4226
|
-
} catch (e) {
|
|
4227
|
-
return Promise.reject(e);
|
|
4228
|
-
}
|
|
4197
|
+
(function () {
|
|
4198
|
+
return _catch(function () {
|
|
4199
|
+
var _temp = function () {
|
|
4200
|
+
if (apiEndPoint && token) {
|
|
4201
|
+
return Promise.resolve(API({
|
|
4202
|
+
apiEndPoint: apiEndPoint,
|
|
4203
|
+
token: token,
|
|
4204
|
+
url: "/ecommerce/customer",
|
|
4205
|
+
errorMessage: 'Error in getting user profile data.'
|
|
4206
|
+
})).then(function (data) {
|
|
4207
|
+
setCustomer(data);
|
|
4208
|
+
});
|
|
4209
|
+
}
|
|
4210
|
+
}();
|
|
4211
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
4212
|
+
}, function () {});
|
|
4229
4213
|
})();
|
|
4230
|
-
}, [token]);
|
|
4214
|
+
}, [token, apiEndPoint]);
|
|
4231
4215
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StoreHeader, null, /*#__PURE__*/React__default.createElement("span", {
|
|
4232
4216
|
className: "manageStore"
|
|
4233
4217
|
}, /*#__PURE__*/React__default.createElement(TypographyContainer$5, {
|