@itilite/iui-user-management 0.4.56 → 0.4.57
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 +58 -13
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +58 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6558,21 +6558,66 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6558
6558
|
} else {
|
|
6559
6559
|
dispatch(showLoader());
|
|
6560
6560
|
if (cardApiflag === true) {
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6561
|
+
dispatch(createUser(payload)).then(function (res) {
|
|
6562
|
+
var _config$routes4, _config$routes4$users, _config$routes4$users2;
|
|
6563
|
+
if (res !== null && res !== void 0 && res.user_id) {
|
|
6564
|
+
fetch(userAddEditUrl.cardsEditUserDetails(res === null || res === void 0 ? void 0 : res.user_id), {
|
|
6565
|
+
method: 'POST',
|
|
6566
|
+
body: JSON.stringify(cardsPayload),
|
|
6567
|
+
headers: {
|
|
6568
|
+
'Content-Type': 'application/json',
|
|
6569
|
+
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6570
|
+
}
|
|
6571
|
+
}).then(function (response) {
|
|
6572
|
+
if (response.status !== 200) {
|
|
6573
|
+
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6574
|
+
}
|
|
6575
|
+
})["catch"](function (error) {
|
|
6576
|
+
console.log("errorrr", error);
|
|
6577
|
+
});
|
|
6567
6578
|
}
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6579
|
+
(config === null || config === void 0 ? void 0 : (_config$routes4 = config.routes) === null || _config$routes4 === void 0 ? void 0 : (_config$routes4$users = _config$routes4.users) === null || _config$routes4$users === void 0 ? void 0 : (_config$routes4$users2 = _config$routes4$users.list) === null || _config$routes4$users2 === void 0 ? void 0 : _config$routes4$users2.path) && history.push(config.routes.users.list.path);
|
|
6580
|
+
})["catch"](function (err) {
|
|
6581
|
+
if (typeof err === 'object') {
|
|
6582
|
+
if (err.country_code) {
|
|
6583
|
+
err.contact_number = err.country_code;
|
|
6584
|
+
}
|
|
6585
|
+
if (err.contact_country_code) {
|
|
6586
|
+
err.contact_number = err.contact_country_code;
|
|
6587
|
+
}
|
|
6588
|
+
if (err.passport) {
|
|
6589
|
+
err.passport_photo = _extends({}, err.passport);
|
|
6590
|
+
delete err.passport;
|
|
6591
|
+
}
|
|
6592
|
+
setErrorArray(Object.keys(err));
|
|
6593
|
+
setErrorMsgs(err);
|
|
6594
|
+
var _loop4 = function _loop4() {
|
|
6595
|
+
if (Object.hasOwnProperty.call(err, _key4)) {
|
|
6596
|
+
if (err[_key4]) {
|
|
6597
|
+
if (_key4 in passportInfoInput || _key4 in travelPreferenceInfo || _key4 in secureTravelInputInfo) {
|
|
6598
|
+
setAdditionalInfoFlag('open');
|
|
6599
|
+
}
|
|
6600
|
+
var el = document.getElementById(_key4 === 'country_code' || _key4 === 'contact_country_code' ? 'contact_number' : _key4);
|
|
6601
|
+
if (el) {
|
|
6602
|
+
setTimeout(function () {
|
|
6603
|
+
el.scrollIntoView({
|
|
6604
|
+
behavior: 'smooth',
|
|
6605
|
+
block: 'center'
|
|
6606
|
+
});
|
|
6607
|
+
}, 500);
|
|
6608
|
+
return 1;
|
|
6609
|
+
}
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
};
|
|
6613
|
+
for (var _key4 in err) {
|
|
6614
|
+
if (_loop4()) break;
|
|
6615
|
+
}
|
|
6616
|
+
} else if (typeof err === 'string') {
|
|
6617
|
+
IUIToastMessageService$4.warningNotify(err);
|
|
6571
6618
|
} else {
|
|
6572
6619
|
IUIToastMessageService$4.warningNotify('Opps, Something went wrong.');
|
|
6573
6620
|
}
|
|
6574
|
-
})["catch"](function (error) {
|
|
6575
|
-
console.log("errorrr", error);
|
|
6576
6621
|
})["finally"](function () {
|
|
6577
6622
|
dispatch(stopLoader());
|
|
6578
6623
|
});
|
|
@@ -6596,8 +6641,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6596
6641
|
}
|
|
6597
6642
|
}
|
|
6598
6643
|
} else {
|
|
6599
|
-
var _config$
|
|
6600
|
-
(config === null || config === void 0 ? void 0 : (_config$
|
|
6644
|
+
var _config$routes5, _config$routes5$users, _config$routes5$users2;
|
|
6645
|
+
(config === null || config === void 0 ? void 0 : (_config$routes5 = config.routes) === null || _config$routes5 === void 0 ? void 0 : (_config$routes5$users = _config$routes5.users) === null || _config$routes5$users === void 0 ? void 0 : (_config$routes5$users2 = _config$routes5$users.list) === null || _config$routes5$users2 === void 0 ? void 0 : _config$routes5$users2.path) && history.push(config.routes.users.list.path);
|
|
6601
6646
|
}
|
|
6602
6647
|
};
|
|
6603
6648
|
var handleCustomFieldsNavigation = function handleCustomFieldsNavigation() {
|