@salesgenterp/ui-components 0.4.401 → 0.4.403
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 +45 -31
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +45 -31
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3152,7 +3152,8 @@ var MyProfile = function MyProfile(_ref) {
|
|
|
3152
3152
|
label: "Sales Representative",
|
|
3153
3153
|
name: "salesRepresentativeName",
|
|
3154
3154
|
control: control,
|
|
3155
|
-
fontColor: fontColor
|
|
3155
|
+
fontColor: fontColor,
|
|
3156
|
+
disabled: true
|
|
3156
3157
|
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3157
3158
|
item: true,
|
|
3158
3159
|
xs: 12,
|
|
@@ -3162,7 +3163,8 @@ var MyProfile = function MyProfile(_ref) {
|
|
|
3162
3163
|
name: "salesRepresentativePhone",
|
|
3163
3164
|
type: "number",
|
|
3164
3165
|
control: control,
|
|
3165
|
-
fontColor: fontColor
|
|
3166
|
+
fontColor: fontColor,
|
|
3167
|
+
disabled: true
|
|
3166
3168
|
}))), /*#__PURE__*/React__default.createElement(MuiButton, {
|
|
3167
3169
|
variant: "contained",
|
|
3168
3170
|
loading: isLoading,
|
|
@@ -4255,8 +4257,6 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4255
4257
|
_ref$imgNotFoundUrl = _ref.imgNotFoundUrl,
|
|
4256
4258
|
imgNotFoundUrl = _ref$imgNotFoundUrl === void 0 ? noImgAvailable$1 : _ref$imgNotFoundUrl,
|
|
4257
4259
|
hideInvoiceAction = _ref.hideInvoiceAction,
|
|
4258
|
-
_ref$payInvoiceFromDa = _ref.payInvoiceFromDashboard,
|
|
4259
|
-
payInvoiceFromDashboard = _ref$payInvoiceFromDa === void 0 ? true : _ref$payInvoiceFromDa,
|
|
4260
4260
|
_ref$removeSocialLink = _ref.removeSocialLinks,
|
|
4261
4261
|
removeSocialLinks = _ref$removeSocialLink === void 0 ? false : _ref$removeSocialLink;
|
|
4262
4262
|
serviceApiEndPoint = serviceApiEndPoint || (apiEndPoint === null || apiEndPoint === void 0 ? void 0 : apiEndPoint.replace('/api', '/services/pdf'));
|
|
@@ -4285,17 +4285,20 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4285
4285
|
})) === null || _storeData$find === void 0 ? void 0 : _storeData$find.id) || 2),
|
|
4286
4286
|
defaultStoreId = _useState6[0],
|
|
4287
4287
|
setDefaultStoreId = _useState6[1];
|
|
4288
|
-
var _useState7 = React.useState(
|
|
4288
|
+
var _useState7 = React.useState(false),
|
|
4289
|
+
authoriseDotNet = _useState7[0],
|
|
4290
|
+
setAuthoriseDotNet = _useState7[1];
|
|
4291
|
+
var _useState8 = React.useState({
|
|
4289
4292
|
primaryColor: primaryColor || '#424242',
|
|
4290
4293
|
secondaryColor: secondaryColor || '#FFFFFF',
|
|
4291
4294
|
backgroundColor: backgroundColor || '#F5F5F5',
|
|
4292
4295
|
fontColor: fontColor || '#391111'
|
|
4293
4296
|
}),
|
|
4294
|
-
colors =
|
|
4295
|
-
setColors =
|
|
4296
|
-
var
|
|
4297
|
-
tabValue =
|
|
4298
|
-
setTabValue =
|
|
4297
|
+
colors = _useState8[0],
|
|
4298
|
+
setColors = _useState8[1];
|
|
4299
|
+
var _useState9 = React.useState(path || 'dashboard'),
|
|
4300
|
+
tabValue = _useState9[0],
|
|
4301
|
+
setTabValue = _useState9[1];
|
|
4299
4302
|
React.useEffect(function () {
|
|
4300
4303
|
setTabValue(path || 'dashboard');
|
|
4301
4304
|
}, [path]);
|
|
@@ -4326,32 +4329,43 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4326
4329
|
React.useEffect(function () {
|
|
4327
4330
|
(function () {
|
|
4328
4331
|
try {
|
|
4329
|
-
var
|
|
4332
|
+
var _temp3 = function _temp3() {
|
|
4330
4333
|
setDataLoading(false);
|
|
4331
4334
|
};
|
|
4332
|
-
|
|
4333
|
-
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
|
|
4340
|
-
|
|
4341
|
-
|
|
4342
|
-
|
|
4343
|
-
|
|
4344
|
-
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4335
|
+
var _temp2 = function () {
|
|
4336
|
+
if (apiEndPoint && token) {
|
|
4337
|
+
setDataLoading(true);
|
|
4338
|
+
var _temp = _catch(function () {
|
|
4339
|
+
return Promise.resolve(API({
|
|
4340
|
+
apiEndPoint: apiEndPoint,
|
|
4341
|
+
token: token,
|
|
4342
|
+
url: "/store"
|
|
4343
|
+
})).then(function (data) {
|
|
4344
|
+
var _data$map, _data$find;
|
|
4345
|
+
setStoreData(data);
|
|
4346
|
+
setSoreIdList((data === null || data === void 0 ? void 0 : (_data$map = data.map(function (data) {
|
|
4347
|
+
return data === null || data === void 0 ? void 0 : data.id;
|
|
4348
|
+
})) === null || _data$map === void 0 ? void 0 : _data$map.join(',')) || 1);
|
|
4349
|
+
setDefaultStoreId((data === null || data === void 0 ? void 0 : (_data$find = data.find(function (data) {
|
|
4350
|
+
return (data === null || data === void 0 ? void 0 : data.defaultStore) === true;
|
|
4351
|
+
})) === null || _data$find === void 0 ? void 0 : _data$find.id) || 2);
|
|
4352
|
+
return Promise.resolve(getStoreFeature({
|
|
4353
|
+
apiEndPoint: apiEndPoint,
|
|
4354
|
+
token: token
|
|
4355
|
+
})).then(function (storeFeature) {
|
|
4356
|
+
setAuthoriseDotNet((storeFeature === null || storeFeature === void 0 ? void 0 : storeFeature.defaultPaymentProvider) === DEFAULT_PAYMENT_PROVIDER.AUTHORISE_DOT_NET);
|
|
4357
|
+
});
|
|
4358
|
+
});
|
|
4359
|
+
}, function () {});
|
|
4360
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
4361
|
+
}
|
|
4362
|
+
}();
|
|
4363
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
4350
4364
|
} catch (e) {
|
|
4351
4365
|
Promise.reject(e);
|
|
4352
4366
|
}
|
|
4353
4367
|
})();
|
|
4354
|
-
}, []);
|
|
4368
|
+
}, [token]);
|
|
4355
4369
|
var handleColors = function handleColors(isNightMode) {
|
|
4356
4370
|
isNightMode ? setColors({
|
|
4357
4371
|
primaryColor: primaryColor || '#BF262D',
|
|
@@ -4396,7 +4410,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
4396
4410
|
hideDiscountImage: hideDiscountImage,
|
|
4397
4411
|
imgNotFoundUrl: imgNotFoundUrl,
|
|
4398
4412
|
hideInvoiceAction: hideInvoiceAction,
|
|
4399
|
-
payInvoiceFromDashboard:
|
|
4413
|
+
payInvoiceFromDashboard: authoriseDotNet,
|
|
4400
4414
|
removeSocialLinks: removeSocialLinks
|
|
4401
4415
|
});
|
|
4402
4416
|
case 'myProfile':
|