@itilite/iui-user-management 1.4.75 → 1.4.77
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 -4
- package/dist/index.js +34 -46
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +34 -46
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -536,14 +536,14 @@
|
|
|
536
536
|
align-items: center;
|
|
537
537
|
}
|
|
538
538
|
._2cSoW ._3CdwB {
|
|
539
|
-
width:
|
|
539
|
+
width: 72px;
|
|
540
540
|
border-radius: 4px;
|
|
541
541
|
-o-object-fit: contain;
|
|
542
542
|
object-fit: contain;
|
|
543
543
|
height: auto;
|
|
544
544
|
}
|
|
545
545
|
._2cSoW img {
|
|
546
|
-
width:
|
|
546
|
+
width: 72px;
|
|
547
547
|
-o-object-fit: cover;
|
|
548
548
|
object-fit: cover;
|
|
549
549
|
border-radius: 4px;
|
|
@@ -570,8 +570,8 @@
|
|
|
570
570
|
|
|
571
571
|
._2cSoW ._2d5UD,
|
|
572
572
|
._2d9GY ._2d5UD {
|
|
573
|
-
height:
|
|
574
|
-
width:
|
|
573
|
+
height: 56px;
|
|
574
|
+
width: 72px;
|
|
575
575
|
background-color: #ffe9cf;
|
|
576
576
|
display: flex;
|
|
577
577
|
justify-content: center;
|
package/dist/index.js
CHANGED
|
@@ -189,17 +189,7 @@ function _finallyRethrows(body, finalizer) {
|
|
|
189
189
|
|
|
190
190
|
var styles = {"UUIUserManagementAddEdit":"_3n-WG","pageHeader":"_3qWcA","buttonWrapper":"_1IP9P","scrolled":"_m8f96","headingButtonWrapper":"_w9z7b","headingButtonWrapperProfile":"_12Wd9","hintText":"_ySdbZ","heading":"_2Y1Aw","headingLarge":"_2K1NF","headingMedium":"_RUuAz","headingSmall":"_23Dye","additionalInfoContainer":"_1Suhw","additionalInfoTitle":"_56iJF","titleContainer":"_H5nfl","expandIconAlign":"_3F4i0","detailsContainer":"_2G0LW","formWrapper":"_2fPRc","sectionWrapper":"_37Gqp","margin":"_2Sdl7","minGridWidth":"_2D7iu","firstRowMargin":"_1BozG","firstChildMargin":"_2C3Mb","paddingTop":"_DBPjV","backGrdColorOnHover":"_5oE6H","fieldMargin":"_RCWjq","productContainerGap":"_tuCbi","containerWidth":"_1oWos","productItemBroder":"_T0Hcd","headingPadding":"_2MFfQ","emptyFieldContainer":"_3VWtw","emptyFieldDescription":"_2jC5u","rowGap":"_1NJFY","formTitle":"_GAKk2","formDescription":"_3TZ6Z","themeLink":"_eJ_1B","dashedLine":"_3ZOs1","dividerColor":"_2pxEJ","errorTextCls":"_27eth","backdrop":"_Pm0Au","inputWidth":"_ajB82"};
|
|
191
191
|
|
|
192
|
-
function r(e) {
|
|
193
|
-
var t,
|
|
194
|
-
f,
|
|
195
|
-
n = "";
|
|
196
|
-
if ("string" == typeof e || "number" == typeof e) n += e;else if ("object" == typeof e) if (Array.isArray(e)) for (t = 0; t < e.length; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);else for (t in e) e[t] && (n && (n += " "), n += t);
|
|
197
|
-
return n;
|
|
198
|
-
}
|
|
199
|
-
function clsx() {
|
|
200
|
-
for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
201
|
-
return n;
|
|
202
|
-
}
|
|
192
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
203
193
|
|
|
204
194
|
var GetInputType = React__default.forwardRef(function (props, ref) {
|
|
205
195
|
var _p = props._p,
|
|
@@ -3484,6 +3474,17 @@ var cardsConstants = {
|
|
|
3484
3474
|
fullWidth: false,
|
|
3485
3475
|
visibility: true,
|
|
3486
3476
|
disableText: 'Please get in touch with your administrator to change this value.'
|
|
3477
|
+
}, {
|
|
3478
|
+
id: 3,
|
|
3479
|
+
label: 'Bookkeeper',
|
|
3480
|
+
description: 'This role is capable of reading all the action for own and other card employees',
|
|
3481
|
+
value: '',
|
|
3482
|
+
name: '',
|
|
3483
|
+
type: 'radio',
|
|
3484
|
+
isAssigned: false,
|
|
3485
|
+
fullWidth: false,
|
|
3486
|
+
visibility: true,
|
|
3487
|
+
disableText: 'Please get in touch with your administrator to change this value.'
|
|
3487
3488
|
}]
|
|
3488
3489
|
};
|
|
3489
3490
|
var passportInfo = [{
|
|
@@ -6059,7 +6060,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6059
6060
|
method: 'GET',
|
|
6060
6061
|
headers: {
|
|
6061
6062
|
'Content-Type': 'application/json',
|
|
6062
|
-
|
|
6063
|
+
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6063
6064
|
}
|
|
6064
6065
|
}).then(function (response) {
|
|
6065
6066
|
return response.json();
|
|
@@ -6071,27 +6072,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6071
6072
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
6072
6073
|
}
|
|
6073
6074
|
})["catch"](function (error) {
|
|
6074
|
-
console.log(
|
|
6075
|
-
});
|
|
6076
|
-
};
|
|
6077
|
-
var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
|
|
6078
|
-
fetch(userAddEditUrl.cardsAddUsersDetails(), {
|
|
6079
|
-
method: 'GET',
|
|
6080
|
-
headers: {
|
|
6081
|
-
'Content-Type': 'application/json',
|
|
6082
|
-
'authorization': "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
6083
|
-
}
|
|
6084
|
-
}).then(function (response) {
|
|
6085
|
-
return response.json();
|
|
6086
|
-
}).then(function (res) {
|
|
6087
|
-
var _res$roles2;
|
|
6088
|
-
if (res !== null && res !== void 0 && (_res$roles2 = res.roles) !== null && _res$roles2 !== void 0 && _res$roles2.length) {
|
|
6089
|
-
dispatch(setCardsDetails(res));
|
|
6090
|
-
} else {
|
|
6091
|
-
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
6092
|
-
}
|
|
6093
|
-
})["catch"](function (error) {
|
|
6094
|
-
console.log("errorrr", error);
|
|
6075
|
+
console.log('errorrr', error);
|
|
6095
6076
|
});
|
|
6096
6077
|
};
|
|
6097
6078
|
React.useEffect(function () {
|
|
@@ -6271,13 +6252,20 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6271
6252
|
}
|
|
6272
6253
|
} else if (isCardsDetailsRendered && isProfile && productAccess.card) {
|
|
6273
6254
|
var targetRole = isCardsAdmin ? 'card-admin' : 'card-holder';
|
|
6274
|
-
|
|
6275
|
-
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6255
|
+
var _selectedRole = cardsDetails.cardsRoles.find(function (role) {
|
|
6256
|
+
return role.isAssigned;
|
|
6257
|
+
});
|
|
6258
|
+
if (_selectedRole) {
|
|
6259
|
+
setCardsRole(_selectedRole.value);
|
|
6260
|
+
} else {
|
|
6261
|
+
for (var _iterator = _createForOfIteratorHelperLoose(cardsDetails.cardsRoles), _step; !(_step = _iterator()).done;) {
|
|
6262
|
+
var role = _step.value;
|
|
6263
|
+
var splitRoleVal = role.value.split(':');
|
|
6264
|
+
var profileRole = splitRoleVal[2];
|
|
6265
|
+
if (profileRole === targetRole) {
|
|
6266
|
+
setCardsRole(role.value);
|
|
6267
|
+
break;
|
|
6268
|
+
}
|
|
6281
6269
|
}
|
|
6282
6270
|
}
|
|
6283
6271
|
}
|
|
@@ -6788,7 +6776,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6788
6776
|
if (isRendered === true) {
|
|
6789
6777
|
renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
|
|
6790
6778
|
if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
|
|
6791
|
-
|
|
6779
|
+
fetchEditUserCardsDetails(isProfile ? id : editUserId);
|
|
6792
6780
|
}
|
|
6793
6781
|
});
|
|
6794
6782
|
setPersonalInfoInput(_extends({}, personalInfoInput, {
|
|
@@ -7131,7 +7119,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7131
7119
|
employeeInfoInput.skip_manager_id = employeeInfoInput.skip_manager.value;
|
|
7132
7120
|
}
|
|
7133
7121
|
var cardsPayload = {
|
|
7134
|
-
|
|
7122
|
+
roles: [cardsRole]
|
|
7135
7123
|
};
|
|
7136
7124
|
var payload = {
|
|
7137
7125
|
personalInfoInput: personalInfoInput,
|
|
@@ -7317,7 +7305,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7317
7305
|
body: JSON.stringify(cardsPayload),
|
|
7318
7306
|
headers: {
|
|
7319
7307
|
'Content-Type': 'application/json',
|
|
7320
|
-
|
|
7308
|
+
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7321
7309
|
}
|
|
7322
7310
|
}).then(function (response) {
|
|
7323
7311
|
if (response.status === 200) {
|
|
@@ -7326,7 +7314,7 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7326
7314
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
7327
7315
|
}
|
|
7328
7316
|
})["catch"](function (error) {
|
|
7329
|
-
console.log(
|
|
7317
|
+
console.log('errorrr', error);
|
|
7330
7318
|
})["finally"](function () {
|
|
7331
7319
|
dispatch(stopLoader());
|
|
7332
7320
|
});
|
|
@@ -7344,14 +7332,14 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7344
7332
|
body: JSON.stringify(cardsPayload),
|
|
7345
7333
|
headers: {
|
|
7346
7334
|
'Content-Type': 'application/json',
|
|
7347
|
-
|
|
7335
|
+
authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
|
|
7348
7336
|
}
|
|
7349
7337
|
}).then(function (response) {
|
|
7350
7338
|
if (response.status !== 200) {
|
|
7351
7339
|
IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
|
|
7352
7340
|
}
|
|
7353
7341
|
})["catch"](function (error) {
|
|
7354
|
-
console.log(
|
|
7342
|
+
console.log('errorrr', error);
|
|
7355
7343
|
});
|
|
7356
7344
|
}
|
|
7357
7345
|
(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);
|