@itilite/iui-user-management 1.4.4986 → 1.4.4988
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.css +4 -5
- package/dist/index.js +20 -60
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +20 -60
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -421,8 +421,8 @@
|
|
|
421
421
|
max-height: 40px;
|
|
422
422
|
max-width: 48px;
|
|
423
423
|
border-radius: 6px;
|
|
424
|
-
-o-object-fit:
|
|
425
|
-
object-fit:
|
|
424
|
+
-o-object-fit: contain;
|
|
425
|
+
object-fit: contain;
|
|
426
426
|
border: 1px solid #d1d5db;
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -528,9 +528,8 @@
|
|
|
528
528
|
width: 48px;
|
|
529
529
|
height: 40px;
|
|
530
530
|
border-radius: 4px;
|
|
531
|
-
-o-object-fit:
|
|
532
|
-
object-fit:
|
|
533
|
-
border: 1px solid #d1d5db;
|
|
531
|
+
-o-object-fit: contain;
|
|
532
|
+
object-fit: contain;
|
|
534
533
|
}
|
|
535
534
|
._2cSoW img {
|
|
536
535
|
width: 48px;
|
package/dist/index.js
CHANGED
|
@@ -4551,7 +4551,10 @@ var MembershipForm = function MembershipForm(_ref) {
|
|
|
4551
4551
|
placeholder: placeholder,
|
|
4552
4552
|
value: membershipName,
|
|
4553
4553
|
onChangeHandler: function onChangeHandler(e) {
|
|
4554
|
-
|
|
4554
|
+
var inputValue = e.target.value;
|
|
4555
|
+
if ((inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) <= 50) {
|
|
4556
|
+
setMembershipName(inputValue);
|
|
4557
|
+
}
|
|
4555
4558
|
},
|
|
4556
4559
|
iconComponent: null,
|
|
4557
4560
|
style: {
|
|
@@ -4580,7 +4583,10 @@ var MembershipForm = function MembershipForm(_ref) {
|
|
|
4580
4583
|
placeholder: "e.g. ABCD1234",
|
|
4581
4584
|
value: membershipNumber,
|
|
4582
4585
|
onChangeHandler: function onChangeHandler(e) {
|
|
4583
|
-
|
|
4586
|
+
var inputValue = e.target.value;
|
|
4587
|
+
if ((inputValue === null || inputValue === void 0 ? void 0 : inputValue.length) <= 50) {
|
|
4588
|
+
setMembershipNumber(inputValue);
|
|
4589
|
+
}
|
|
4584
4590
|
},
|
|
4585
4591
|
iconComponent: null,
|
|
4586
4592
|
style: {
|
|
@@ -5277,7 +5283,7 @@ var Membership = function Membership(_ref) {
|
|
|
5277
5283
|
cancelLabel: selectedMembershipChain ? 'Cancel' : '',
|
|
5278
5284
|
submitLabel: selectedMembershipChain ? isUpdating ? 'Saving...' : editIndex ? 'Save' : 'Add' : '',
|
|
5279
5285
|
submitHandler: handleSubmit,
|
|
5280
|
-
isDisabledSubmitBtn: isUpdating || !membershipNumber,
|
|
5286
|
+
isDisabledSubmitBtn: isUpdating || !membershipNumber || isOtherMembership && !membershipName,
|
|
5281
5287
|
width: "640px",
|
|
5282
5288
|
headerText: selectedMembershipChain ? '' : title,
|
|
5283
5289
|
subHanderText: selectedMembershipChain ? '' : subtitle,
|
|
@@ -5366,7 +5372,6 @@ var Membership = function Membership(_ref) {
|
|
|
5366
5372
|
var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
5367
5373
|
var _clsx;
|
|
5368
5374
|
var membershipInfoInput = _ref.membershipInfoInput,
|
|
5369
|
-
addMemInfoInput = _ref.addMemInfoInput,
|
|
5370
5375
|
travelPreferenceInfo = _ref.travelPreferenceInfo,
|
|
5371
5376
|
_ref$travelPreference = _ref.travelPreferenceOnChange,
|
|
5372
5377
|
travelPreferenceOnChange = _ref$travelPreference === void 0 ? function () {} : _ref$travelPreference,
|
|
@@ -5494,50 +5499,7 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
|
|
|
5494
5499
|
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIGrid, {
|
|
5495
5500
|
container: true,
|
|
5496
5501
|
className: styles.formFieldsWrapper
|
|
5497
|
-
},
|
|
5498
|
-
className: styles.emptyFieldContainer
|
|
5499
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUITypography, {
|
|
5500
|
-
className: styles.emptyFieldDescription
|
|
5501
|
-
}, "No membership details added yet"), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
5502
|
-
className: clsx(styles.emptyFieldBtnContainer, styles.rowGap),
|
|
5503
|
-
display: "flex"
|
|
5504
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
5505
|
-
buttonText: "Add airline",
|
|
5506
|
-
type: "text",
|
|
5507
|
-
startIcon: /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
5508
|
-
width: "10",
|
|
5509
|
-
height: "10",
|
|
5510
|
-
color: "#EC5D25"
|
|
5511
|
-
}),
|
|
5512
|
-
className: styles.paddingTop,
|
|
5513
|
-
onClick: function onClick(e) {
|
|
5514
|
-
return addMemInfoInput('flight');
|
|
5515
|
-
}
|
|
5516
|
-
}), /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
5517
|
-
buttonText: "Add hotel",
|
|
5518
|
-
type: "text",
|
|
5519
|
-
startIcon: /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
5520
|
-
width: "10",
|
|
5521
|
-
height: "10",
|
|
5522
|
-
color: "#EC5D25"
|
|
5523
|
-
}),
|
|
5524
|
-
className: styles.paddingTop,
|
|
5525
|
-
onClick: function onClick(e) {
|
|
5526
|
-
return addMemInfoInput('hotel');
|
|
5527
|
-
}
|
|
5528
|
-
}), /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
5529
|
-
buttonText: "Add car rental",
|
|
5530
|
-
type: "text",
|
|
5531
|
-
startIcon: /*#__PURE__*/React__default.createElement(AddIcon, {
|
|
5532
|
-
width: "10",
|
|
5533
|
-
height: "10",
|
|
5534
|
-
color: "#EC5D25"
|
|
5535
|
-
}),
|
|
5536
|
-
className: styles.paddingTop,
|
|
5537
|
-
onClick: function onClick(e) {
|
|
5538
|
-
return addMemInfoInput('rental_car');
|
|
5539
|
-
}
|
|
5540
|
-
}))), /*#__PURE__*/React__default.createElement(Membership, {
|
|
5502
|
+
}, /*#__PURE__*/React__default.createElement(Membership, {
|
|
5541
5503
|
membershipInfoInput: membershipInfoInput,
|
|
5542
5504
|
setMembershipInfoInput: setMembershipInfoInput,
|
|
5543
5505
|
isProfile: isProfile
|
|
@@ -6017,7 +5979,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6017
5979
|
method: 'GET',
|
|
6018
5980
|
headers: {
|
|
6019
5981
|
'Content-Type': 'application/json',
|
|
6020
|
-
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
5982
|
+
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6021
5983
|
}
|
|
6022
5984
|
}).then(function (response) {
|
|
6023
5985
|
return response.json();
|
|
@@ -6029,7 +5991,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6029
5991
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
6030
5992
|
}
|
|
6031
5993
|
})["catch"](function (error) {
|
|
6032
|
-
console.log(
|
|
5994
|
+
console.log("errorrr", error);
|
|
6033
5995
|
});
|
|
6034
5996
|
};
|
|
6035
5997
|
var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
|
|
@@ -6037,7 +5999,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6037
5999
|
method: 'GET',
|
|
6038
6000
|
headers: {
|
|
6039
6001
|
'Content-Type': 'application/json',
|
|
6040
|
-
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6002
|
+
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6041
6003
|
}
|
|
6042
6004
|
}).then(function (response) {
|
|
6043
6005
|
return response.json();
|
|
@@ -6049,7 +6011,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6049
6011
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
6050
6012
|
}
|
|
6051
6013
|
})["catch"](function (error) {
|
|
6052
|
-
console.log(
|
|
6014
|
+
console.log("errorrr", error);
|
|
6053
6015
|
});
|
|
6054
6016
|
};
|
|
6055
6017
|
React.useEffect(function () {
|
|
@@ -7089,7 +7051,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7089
7051
|
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
7090
7052
|
}
|
|
7091
7053
|
var cardsPayload = {
|
|
7092
|
-
roles: [cardsRole]
|
|
7054
|
+
"roles": [cardsRole]
|
|
7093
7055
|
};
|
|
7094
7056
|
var payload = {
|
|
7095
7057
|
personalInfoInput: personalInfoInput,
|
|
@@ -7275,7 +7237,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7275
7237
|
body: JSON.stringify(cardsPayload),
|
|
7276
7238
|
headers: {
|
|
7277
7239
|
'Content-Type': 'application/json',
|
|
7278
|
-
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7240
|
+
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7279
7241
|
}
|
|
7280
7242
|
}).then(function (response) {
|
|
7281
7243
|
if (response.status === 200) {
|
|
@@ -7284,7 +7246,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7284
7246
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
7285
7247
|
}
|
|
7286
7248
|
})["catch"](function (error) {
|
|
7287
|
-
console.log(
|
|
7249
|
+
console.log("errorrr", error);
|
|
7288
7250
|
})["finally"](function () {
|
|
7289
7251
|
dispatch(stopLoader());
|
|
7290
7252
|
});
|
|
@@ -7302,14 +7264,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7302
7264
|
body: JSON.stringify(cardsPayload),
|
|
7303
7265
|
headers: {
|
|
7304
7266
|
'Content-Type': 'application/json',
|
|
7305
|
-
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7267
|
+
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7306
7268
|
}
|
|
7307
7269
|
}).then(function (response) {
|
|
7308
7270
|
if (response.status !== 200) {
|
|
7309
7271
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
7310
7272
|
}
|
|
7311
7273
|
})["catch"](function (error) {
|
|
7312
|
-
console.log(
|
|
7274
|
+
console.log("errorrr", error);
|
|
7313
7275
|
});
|
|
7314
7276
|
}
|
|
7315
7277
|
(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);
|
|
@@ -7763,9 +7725,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7763
7725
|
errorMsgs: errorMsgs,
|
|
7764
7726
|
dateFormat: dateFormat,
|
|
7765
7727
|
defaultExpand: isAdditionalInfoExpanded,
|
|
7766
|
-
setAdditionalInfoFlag: setAdditionalInfoFlag
|
|
7767
|
-
setMembershipInfoInput: setMembershipInfoInput,
|
|
7768
|
-
isProfile: isProfile
|
|
7728
|
+
setAdditionalInfoFlag: setAdditionalInfoFlag
|
|
7769
7729
|
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
|
|
7770
7730
|
className: styles.dividerColor
|
|
7771
7731
|
}), productAccess && productAccess.expense && /*#__PURE__*/React__default.createElement(TravelExpenseFields, {
|