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