@itilite/iui-user-management 1.4.842 → 1.4.892
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 +43 -6
- package/dist/index.js +113 -35
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +114 -36
- package/dist/index.modern.js.map +1 -1
- package/package.json +43 -44
package/dist/index.css
CHANGED
|
@@ -188,6 +188,26 @@
|
|
|
188
188
|
._ajB82 {
|
|
189
189
|
width: 100% !important;
|
|
190
190
|
}
|
|
191
|
+
|
|
192
|
+
._1lEyQ ul li:hover {
|
|
193
|
+
background-color: rgba(254, 210, 193, 0.4509803922) !important;
|
|
194
|
+
border-radius: 8px;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
._3ymE1.MuiButton-root {
|
|
198
|
+
background-color: #EC5D25;
|
|
199
|
+
color: #ffffff;
|
|
200
|
+
border: none;
|
|
201
|
+
border-radius: 8px !important;
|
|
202
|
+
padding: 8px 16px !important;
|
|
203
|
+
height: 40px;
|
|
204
|
+
}
|
|
205
|
+
._3ymE1.MuiButton-root:hover {
|
|
206
|
+
background-color: #ec5d25 !important;
|
|
207
|
+
}
|
|
208
|
+
._3ymE1 .MuiButton-endIcon svg {
|
|
209
|
+
fill: #ffffff !important;
|
|
210
|
+
}
|
|
191
211
|
._smjc4 {
|
|
192
212
|
border-radius: 15px;
|
|
193
213
|
background-color: #F4F4F4;
|
|
@@ -384,6 +404,7 @@
|
|
|
384
404
|
position: relative;
|
|
385
405
|
transition: all 0.2s ease;
|
|
386
406
|
min-height: 200px;
|
|
407
|
+
height: 216px;
|
|
387
408
|
display: flex;
|
|
388
409
|
flex-direction: column;
|
|
389
410
|
width: 305px;
|
|
@@ -426,7 +447,7 @@
|
|
|
426
447
|
display: flex;
|
|
427
448
|
justify-content: space-between;
|
|
428
449
|
align-items: center;
|
|
429
|
-
margin-bottom:
|
|
450
|
+
margin-bottom: 16px;
|
|
430
451
|
padding: 16px;
|
|
431
452
|
border-top-left-radius: 12px;
|
|
432
453
|
border-top-right-radius: 12px;
|
|
@@ -437,7 +458,7 @@
|
|
|
437
458
|
}
|
|
438
459
|
|
|
439
460
|
._2Vlhq {
|
|
440
|
-
color: #
|
|
461
|
+
color: #363E4F;
|
|
441
462
|
}
|
|
442
463
|
|
|
443
464
|
._bp-Mt {
|
|
@@ -446,6 +467,8 @@
|
|
|
446
467
|
color: #363E4F;
|
|
447
468
|
margin: 0 0 4px 0;
|
|
448
469
|
line-height: 20px;
|
|
470
|
+
font-family: "Inter";
|
|
471
|
+
margin-bottom: 0;
|
|
449
472
|
}
|
|
450
473
|
|
|
451
474
|
._3l4HZ {
|
|
@@ -453,6 +476,7 @@
|
|
|
453
476
|
font-weight: 500;
|
|
454
477
|
letter-spacing: 0.5px;
|
|
455
478
|
line-height: 20px;
|
|
479
|
+
font-family: "Inter";
|
|
456
480
|
}
|
|
457
481
|
._duePd ._3l4HZ {
|
|
458
482
|
color: #6b7280;
|
|
@@ -484,21 +508,33 @@
|
|
|
484
508
|
}
|
|
485
509
|
|
|
486
510
|
._7FOPe {
|
|
511
|
+
color: #363E4F;
|
|
512
|
+
font-family: Inter;
|
|
487
513
|
font-size: 13px;
|
|
514
|
+
font-style: normal;
|
|
488
515
|
font-weight: 400;
|
|
489
|
-
color: #1a1a1a;
|
|
490
|
-
margin-bottom: 12px;
|
|
491
|
-
letter-spacing: 1px;
|
|
492
516
|
line-height: 18px;
|
|
517
|
+
margin-bottom: 12px;
|
|
493
518
|
}
|
|
494
519
|
|
|
495
520
|
._CI_p2,
|
|
496
521
|
._3Gzqu {
|
|
522
|
+
color: #363E4F;
|
|
523
|
+
font-family: Inter;
|
|
497
524
|
font-size: 13px;
|
|
498
|
-
|
|
525
|
+
font-style: normal;
|
|
526
|
+
font-weight: 400;
|
|
527
|
+
line-height: 18px;
|
|
528
|
+
}
|
|
529
|
+
|
|
530
|
+
._3Gzqu {
|
|
499
531
|
margin-bottom: 6px;
|
|
500
532
|
}
|
|
501
533
|
|
|
534
|
+
._CI_p2 {
|
|
535
|
+
margin-bottom: 12px;
|
|
536
|
+
}
|
|
537
|
+
|
|
502
538
|
._ivgBf {
|
|
503
539
|
font-size: 13px;
|
|
504
540
|
color: #9ca3af;
|
|
@@ -510,6 +546,7 @@
|
|
|
510
546
|
justify-content: space-between;
|
|
511
547
|
align-items: center;
|
|
512
548
|
padding: 0 16px 16px 16px;
|
|
549
|
+
margin-top: -14px;
|
|
513
550
|
}
|
|
514
551
|
|
|
515
552
|
._EV0l8 {
|
package/dist/index.js
CHANGED
|
@@ -185,19 +185,9 @@ function _finallyRethrows(body, finalizer) {
|
|
|
185
185
|
return finalizer(false, result);
|
|
186
186
|
}
|
|
187
187
|
|
|
188
|
-
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"};
|
|
188
|
+
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","buttonRight":"_1lEyQ","containedDropdownBtn":"_3ymE1"};
|
|
189
189
|
|
|
190
|
-
function r(e) {
|
|
191
|
-
var t,
|
|
192
|
-
f,
|
|
193
|
-
n = "";
|
|
194
|
-
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);
|
|
195
|
-
return n;
|
|
196
|
-
}
|
|
197
|
-
function clsx() {
|
|
198
|
-
for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
|
|
199
|
-
return n;
|
|
200
|
-
}
|
|
190
|
+
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}
|
|
201
191
|
|
|
202
192
|
var GetInputType = React__default.forwardRef(function (props, ref) {
|
|
203
193
|
var _p = props._p,
|
|
@@ -899,6 +889,9 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
|
|
|
899
889
|
approvers: {},
|
|
900
890
|
requested_user_is_admin: payload.isCardsAdmin
|
|
901
891
|
};
|
|
892
|
+
if (payload.send_welcome_email !== undefined) {
|
|
893
|
+
res.should_send_welcome_email = payload.send_welcome_email;
|
|
894
|
+
}
|
|
902
895
|
var userTags = [];
|
|
903
896
|
for (var key in payload.userTagType) {
|
|
904
897
|
if (Object.hasOwnProperty.call(payload.userTagType, key) && payload.userTagType[key]) {
|
|
@@ -2647,11 +2640,13 @@ var Visa = function Visa(props) {
|
|
|
2647
2640
|
var IUILocalStorageService$4 = utils.services.IUILocalStorageService;
|
|
2648
2641
|
var env$3 = utils.configs.env;
|
|
2649
2642
|
var CardsManagement = function CardsManagement(_ref) {
|
|
2650
|
-
var _pg$gateway;
|
|
2643
|
+
var _selectedCard$metadat, _pg$gateway, _selectedCard$metadat2;
|
|
2651
2644
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2652
2645
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2653
2646
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2654
|
-
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod
|
|
2647
|
+
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
|
|
2648
|
+
_ref$sendLog = _ref.sendLog,
|
|
2649
|
+
sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
|
|
2655
2650
|
var dispatch = reactRedux.useDispatch();
|
|
2656
2651
|
var _ref2 = paymentDetails || {},
|
|
2657
2652
|
_ref2$pg = _ref2.pg,
|
|
@@ -2673,8 +2668,16 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2673
2668
|
setSelectedCard(null);
|
|
2674
2669
|
};
|
|
2675
2670
|
var handleMarkAsDefault = function handleMarkAsDefault() {
|
|
2676
|
-
|
|
2671
|
+
var _selectedCard$card;
|
|
2677
2672
|
if (!pg || !selectedCard) return;
|
|
2673
|
+
sendLog({
|
|
2674
|
+
eventName: 'edit_card_clicked',
|
|
2675
|
+
customProperties: {
|
|
2676
|
+
action_type: 'Make default',
|
|
2677
|
+
card_last4: (selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$card = selectedCard.card) === null || _selectedCard$card === void 0 ? void 0 : _selectedCard$card.last4) || ''
|
|
2678
|
+
},
|
|
2679
|
+
logImpression: true
|
|
2680
|
+
});
|
|
2678
2681
|
dispatch(setDefaultPaymentCard({
|
|
2679
2682
|
user_id: +pg.user_id,
|
|
2680
2683
|
method_id: selectedCard.id,
|
|
@@ -2684,13 +2687,21 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2684
2687
|
handleMenuClose();
|
|
2685
2688
|
};
|
|
2686
2689
|
var handleDeleteCard = function handleDeleteCard() {
|
|
2690
|
+
var _selectedCard$card2;
|
|
2691
|
+
sendLog({
|
|
2692
|
+
eventName: 'edit_card_clicked',
|
|
2693
|
+
customProperties: {
|
|
2694
|
+
action_type: 'Delete',
|
|
2695
|
+
card_last4: (selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$card2 = selectedCard.card) === null || _selectedCard$card2 === void 0 ? void 0 : _selectedCard$card2.last4) || ''
|
|
2696
|
+
},
|
|
2697
|
+
logImpression: true
|
|
2698
|
+
});
|
|
2687
2699
|
dispatch(deletePaymentCard({
|
|
2688
2700
|
pmId: selectedCard.id,
|
|
2689
2701
|
vendorId: pg.vendor_id
|
|
2690
2702
|
}));
|
|
2691
2703
|
handleMenuClose();
|
|
2692
2704
|
};
|
|
2693
|
-
console.log('test mudu 22');
|
|
2694
2705
|
var getBrandLogo = function getBrandLogo(brand) {
|
|
2695
2706
|
var width = 40;
|
|
2696
2707
|
var aspectRatio = 780 / 500;
|
|
@@ -2819,6 +2830,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2819
2830
|
});
|
|
2820
2831
|
var cardsCount = (personalCards === null || personalCards === void 0 ? void 0 : personalCards.length) + (corporateCards === null || corporateCards === void 0 ? void 0 : corporateCards.length);
|
|
2821
2832
|
var _url = env$3.getPaymentUrl() + ("/api/v1/auth/" + IUILocalStorageService$4.getAccessToken() + "/1/" + pg.entity_id + "/0/" + pg.vendor_id + "/1");
|
|
2833
|
+
console.log('show card delete', selectedCard, !+(selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$metadat = selectedCard.metadata) === null || _selectedCard$metadat === void 0 ? void 0 : _selectedCard$metadat.default_card), cardsCount, cards);
|
|
2822
2834
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2823
2835
|
style: {
|
|
2824
2836
|
marginBottom: -20
|
|
@@ -2854,7 +2866,11 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2854
2866
|
}) : null), console.log('cards', cards, 'cardsCount', cardsCount, pg), (!cards || cardsCount < 10) && (pg === null || pg === void 0 ? void 0 : (_pg$gateway = pg.gateway) === null || _pg$gateway === void 0 ? void 0 : _pg$gateway.toLowerCase()) === 'stripe' && (pg === null || pg === void 0 ? void 0 : pg.save_card_enable) === 1 && paymentMethod === 1 && /*#__PURE__*/React__default.createElement("button", {
|
|
2855
2867
|
className: classes.addCardButton,
|
|
2856
2868
|
onClick: function onClick() {
|
|
2857
|
-
|
|
2869
|
+
sendLog({
|
|
2870
|
+
eventName: 'add_user_card_clicked',
|
|
2871
|
+
logImpression: true
|
|
2872
|
+
});
|
|
2873
|
+
window.location.assign(_url);
|
|
2858
2874
|
}
|
|
2859
2875
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2860
2876
|
className: classes.plusIcon
|
|
@@ -2898,7 +2914,7 @@ var CardsManagement = function CardsManagement(_ref) {
|
|
|
2898
2914
|
}
|
|
2899
2915
|
}, selectedCard && !+selectedCard.metadata.default_card && /*#__PURE__*/React__default.createElement(core.MenuItem, {
|
|
2900
2916
|
onClick: handleMarkAsDefault
|
|
2901
|
-
}, "Mark as default"), /*#__PURE__*/React__default.createElement(core.MenuItem, {
|
|
2917
|
+
}, "Mark as default"), (cardsCount === 1 || cardsCount > 1 && !+(selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$metadat2 = selectedCard.metadata) === null || _selectedCard$metadat2 === void 0 ? void 0 : _selectedCard$metadat2.default_card)) && /*#__PURE__*/React__default.createElement(core.MenuItem, {
|
|
2902
2918
|
onClick: handleDeleteCard,
|
|
2903
2919
|
style: {
|
|
2904
2920
|
color: '#ff4444'
|
|
@@ -2911,7 +2927,9 @@ var PaymentCards = function PaymentCards(_ref) {
|
|
|
2911
2927
|
var _ref$paymentDetails = _ref.paymentDetails,
|
|
2912
2928
|
paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
|
|
2913
2929
|
_ref$paymentMethod = _ref.paymentMethod,
|
|
2914
|
-
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod
|
|
2930
|
+
paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
|
|
2931
|
+
_ref$sendLog = _ref.sendLog,
|
|
2932
|
+
sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
|
|
2915
2933
|
if (!paymentDetails || ((_Object$keys = Object.keys(paymentDetails)) === null || _Object$keys === void 0 ? void 0 : _Object$keys.length) === 0 || (!(paymentDetails !== null && paymentDetails !== void 0 && paymentDetails.cards) || (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$cards = paymentDetails.cards) === null || _paymentDetails$cards === void 0 ? void 0 : _paymentDetails$cards.length) === 0) && ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$pg = paymentDetails.pg) === null || _paymentDetails$pg === void 0 ? void 0 : _paymentDetails$pg.gateway.toLowerCase()) !== 'stripe' || (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$pg2 = paymentDetails.pg) === null || _paymentDetails$pg2 === void 0 ? void 0 : _paymentDetails$pg2.save_card_enable) !== 1 || paymentMethod !== 1)) {
|
|
2916
2934
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
|
|
2917
2935
|
}
|
|
@@ -2919,7 +2937,8 @@ var PaymentCards = function PaymentCards(_ref) {
|
|
|
2919
2937
|
className: styles$1.dividerColor
|
|
2920
2938
|
}), /*#__PURE__*/React__default.createElement(CardsManagement, {
|
|
2921
2939
|
paymentDetails: paymentDetails,
|
|
2922
|
-
paymentMethod: paymentMethod
|
|
2940
|
+
paymentMethod: paymentMethod,
|
|
2941
|
+
sendLog: sendLog
|
|
2923
2942
|
}));
|
|
2924
2943
|
};
|
|
2925
2944
|
|
|
@@ -2995,7 +3014,9 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
2995
3014
|
_props$roles = props.roles,
|
|
2996
3015
|
roles = _props$roles === void 0 ? [] : _props$roles,
|
|
2997
3016
|
_props$paymentMethod = props.paymentMethod,
|
|
2998
|
-
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod
|
|
3017
|
+
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
|
|
3018
|
+
_props$sendLog = props.sendLog,
|
|
3019
|
+
sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
|
|
2999
3020
|
var _useState = React.useState({
|
|
3000
3021
|
product: '',
|
|
3001
3022
|
approvers: []
|
|
@@ -3293,7 +3314,8 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
|
|
|
3293
3314
|
}));
|
|
3294
3315
|
})))), type === 'travel' && paymentDetails && isProfile && /*#__PURE__*/React__default.createElement(PaymentCards, {
|
|
3295
3316
|
paymentDetails: paymentDetails,
|
|
3296
|
-
paymentMethod: paymentMethod
|
|
3317
|
+
paymentMethod: paymentMethod,
|
|
3318
|
+
sendLog: sendLog
|
|
3297
3319
|
}));
|
|
3298
3320
|
};
|
|
3299
3321
|
|
|
@@ -5052,6 +5074,7 @@ function withStore(Component) {
|
|
|
5052
5074
|
}
|
|
5053
5075
|
|
|
5054
5076
|
var ExpandMoreIcon = function ExpandMoreIcon(props) {
|
|
5077
|
+
var fillColor = props.fillColor || '#6B7280';
|
|
5055
5078
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
5056
5079
|
xmlns: "http://www.w3.org/2000/svg",
|
|
5057
5080
|
width: props.width,
|
|
@@ -5059,7 +5082,7 @@ var ExpandMoreIcon = function ExpandMoreIcon(props) {
|
|
|
5059
5082
|
fill: "none",
|
|
5060
5083
|
viewBox: "0 0 12 7"
|
|
5061
5084
|
}, /*#__PURE__*/React__default.createElement("path", {
|
|
5062
|
-
fill:
|
|
5085
|
+
fill: fillColor,
|
|
5063
5086
|
d: "M.293.294a1 1 0 011.414 0L6 4.587 10.293.294a1 1 0 111.414 1.414l-5 5a1 1 0 01-1.414 0l-5-5a1 1 0 010-1.414z"
|
|
5064
5087
|
}));
|
|
5065
5088
|
};
|
|
@@ -6427,7 +6450,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
6427
6450
|
_props$isProfile = props.isProfile,
|
|
6428
6451
|
isProfile = _props$isProfile === void 0 ? false : _props$isProfile,
|
|
6429
6452
|
_props$paymentMethod = props.paymentMethod,
|
|
6430
|
-
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod
|
|
6453
|
+
paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
|
|
6454
|
+
_props$sendLog = props.sendLog,
|
|
6455
|
+
sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
|
|
6431
6456
|
env$4.init(config, isProfile);
|
|
6432
6457
|
var queryParams = new URLSearchParams(window.location.search);
|
|
6433
6458
|
var verifyUserId = Number(queryParams.get(config.routes.users.add.queryParamKeys.verifyUserId));
|
|
@@ -7706,7 +7731,10 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7706
7731
|
return Promise.reject(e);
|
|
7707
7732
|
}
|
|
7708
7733
|
};
|
|
7709
|
-
var formSubmitHandler = function formSubmitHandler() {
|
|
7734
|
+
var formSubmitHandler = function formSubmitHandler(send_welcome_email) {
|
|
7735
|
+
if (send_welcome_email === void 0) {
|
|
7736
|
+
send_welcome_email = false;
|
|
7737
|
+
}
|
|
7710
7738
|
try {
|
|
7711
7739
|
var checkAnyError = doesFormHasError();
|
|
7712
7740
|
if (checkAnyError) {
|
|
@@ -7744,6 +7772,9 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
7744
7772
|
cardsRole: cardsRole,
|
|
7745
7773
|
isCardsAdmin: isCardsAdmin
|
|
7746
7774
|
};
|
|
7775
|
+
if (!isEditMode && !isProfile) {
|
|
7776
|
+
payload.send_welcome_email = send_welcome_email;
|
|
7777
|
+
}
|
|
7747
7778
|
if (verifyUserId) {
|
|
7748
7779
|
payload.verifyUserId = verifyUserId;
|
|
7749
7780
|
}
|
|
@@ -8132,12 +8163,34 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
8132
8163
|
onClick: handleCancelNavigation
|
|
8133
8164
|
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
8134
8165
|
component: "div",
|
|
8135
|
-
className:
|
|
8136
|
-
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
8166
|
+
className: clsx('pageHeader--button-single', styles.buttonRight)
|
|
8167
|
+
}, isEditMode || isProfile ? /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
|
|
8137
8168
|
buttonText: "Save",
|
|
8138
8169
|
type: "contained",
|
|
8139
8170
|
onClick: formSubmitHandler,
|
|
8140
8171
|
disabled: isPageLoading || productAccess.travel === false && productAccess.expense === false || !!doesFormHasError()
|
|
8172
|
+
}) : /*#__PURE__*/React__default.createElement(iuistyles.IUIDropdownButton, {
|
|
8173
|
+
buttonText: "Create user",
|
|
8174
|
+
outlinedBtn: false,
|
|
8175
|
+
className: styles.containedDropdownBtn,
|
|
8176
|
+
placement: "bottom-end",
|
|
8177
|
+
endIcon: /*#__PURE__*/React__default.createElement(ExpandMoreIcon, {
|
|
8178
|
+
fillColor: "white",
|
|
8179
|
+
width: "10",
|
|
8180
|
+
height: "10",
|
|
8181
|
+
fill: true
|
|
8182
|
+
}),
|
|
8183
|
+
menuListInfo: [{
|
|
8184
|
+
label: 'Send email invite',
|
|
8185
|
+
handler: function handler() {
|
|
8186
|
+
return formSubmitHandler(true);
|
|
8187
|
+
}
|
|
8188
|
+
}, {
|
|
8189
|
+
label: 'Do not send email',
|
|
8190
|
+
handler: function handler() {
|
|
8191
|
+
return formSubmitHandler(false);
|
|
8192
|
+
}
|
|
8193
|
+
}]
|
|
8141
8194
|
}))))), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
8142
8195
|
component: "div",
|
|
8143
8196
|
marginTop: "8rem",
|
|
@@ -8351,7 +8404,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
8351
8404
|
isProfile: isProfile,
|
|
8352
8405
|
editUserId: editUserId,
|
|
8353
8406
|
roles: renderFields.travelRoles,
|
|
8354
|
-
paymentMethod: paymentMethod
|
|
8407
|
+
paymentMethod: paymentMethod,
|
|
8408
|
+
sendLog: sendLog
|
|
8355
8409
|
}), /*#__PURE__*/React__default.createElement(AdditionalInfo, {
|
|
8356
8410
|
membershipInfoInput: membershipInfoInput,
|
|
8357
8411
|
onMemInfoInputChange: onMemInfoInputChange,
|
|
@@ -8396,7 +8450,8 @@ var UserAddEdit = function UserAddEdit(props) {
|
|
|
8396
8450
|
isProfile: isProfile,
|
|
8397
8451
|
editUserId: editUserId,
|
|
8398
8452
|
roles: renderFields.expenseRoles,
|
|
8399
|
-
paymentMethod: paymentMethod
|
|
8453
|
+
paymentMethod: paymentMethod,
|
|
8454
|
+
sendLog: sendLog
|
|
8400
8455
|
}), /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
|
|
8401
8456
|
className: styles.dividerColor
|
|
8402
8457
|
}), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React__default.createElement(CardsField, {
|
|
@@ -8647,10 +8702,15 @@ var downloadUploadedRecords = function downloadUploadedRecords(type, jobId) {
|
|
|
8647
8702
|
});
|
|
8648
8703
|
};
|
|
8649
8704
|
};
|
|
8650
|
-
var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers) {
|
|
8705
|
+
var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers, sendInvite) {
|
|
8706
|
+
if (sendInvite === void 0) {
|
|
8707
|
+
sendInvite = false;
|
|
8708
|
+
}
|
|
8651
8709
|
return function (dispatch) {
|
|
8652
8710
|
return new Promise(function (resolve, reject) {
|
|
8653
|
-
api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers
|
|
8711
|
+
api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers, {
|
|
8712
|
+
should_send_welcome_email: sendInvite
|
|
8713
|
+
}).then(function (res) {
|
|
8654
8714
|
resolve(res);
|
|
8655
8715
|
})["catch"](function (err) {
|
|
8656
8716
|
reject(err);
|
|
@@ -8911,9 +8971,12 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
8911
8971
|
var _useState5 = React.useState(false),
|
|
8912
8972
|
canUpdateExistingUsers = _useState5[0],
|
|
8913
8973
|
setCanUpdateExistingUsers = _useState5[1];
|
|
8914
|
-
var _useState6 = React.useState(
|
|
8915
|
-
|
|
8916
|
-
|
|
8974
|
+
var _useState6 = React.useState(true),
|
|
8975
|
+
sendInvite = _useState6[0],
|
|
8976
|
+
setSendInvite = _useState6[1];
|
|
8977
|
+
var _useState7 = React.useState(false),
|
|
8978
|
+
isFileDownloading = _useState7[0],
|
|
8979
|
+
setDownlStatus = _useState7[1];
|
|
8917
8980
|
var _useSelector = reactRedux.useSelector(function (state) {
|
|
8918
8981
|
return state.common;
|
|
8919
8982
|
}),
|
|
@@ -9021,7 +9084,7 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
9021
9084
|
}
|
|
9022
9085
|
}
|
|
9023
9086
|
setImportStatus(1);
|
|
9024
|
-
return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0))).then(function (res) {
|
|
9087
|
+
return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0, sendInvite))).then(function (res) {
|
|
9025
9088
|
var _temp = function () {
|
|
9026
9089
|
if (res.data.status) {
|
|
9027
9090
|
return Promise.resolve(dispatch(_executionJob(jobId, 'is_job_completed')).then(function (resp) {
|
|
@@ -9052,6 +9115,9 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
9052
9115
|
var handleExistingUserUpdation = function handleExistingUserUpdation(event) {
|
|
9053
9116
|
setCanUpdateExistingUsers(!canUpdateExistingUsers);
|
|
9054
9117
|
};
|
|
9118
|
+
var handleSendInvite = function handleSendInvite() {
|
|
9119
|
+
setSendInvite(!sendInvite);
|
|
9120
|
+
};
|
|
9055
9121
|
var CustomStepIcon = function CustomStepIcon(step) {
|
|
9056
9122
|
if ((importStatus === 1 || importStatus === 2 || importStatus === 4) && step === Number(activeStep)) {
|
|
9057
9123
|
return /*#__PURE__*/React__default.createElement(iuistyles.IUIPrimaryRadio, {
|
|
@@ -9361,6 +9427,18 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
|
|
|
9361
9427
|
label: "Update any existing users",
|
|
9362
9428
|
className: clsx(styles$5.checkboxlabel, (_clsx5 = {}, _clsx5[styles$5.disabledText] = +userBulkImportInfo.exist_users === 0, _clsx5)),
|
|
9363
9429
|
disabled: +userBulkImportInfo.exist_users === 0
|
|
9430
|
+
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9431
|
+
display: "flex",
|
|
9432
|
+
style: {
|
|
9433
|
+
paddingLeft: '28px'
|
|
9434
|
+
}
|
|
9435
|
+
}, /*#__PURE__*/React__default.createElement(iuistyles.IUIFormControlLabel, {
|
|
9436
|
+
control: /*#__PURE__*/React__default.createElement(iuistyles.IUICheckBox, {
|
|
9437
|
+
handleCheckBoxHandler: handleSendInvite,
|
|
9438
|
+
checked: sendInvite
|
|
9439
|
+
}),
|
|
9440
|
+
label: "Send invitation emails to new users who have not logged into the platform.",
|
|
9441
|
+
className: clsx(styles$5.checkboxlabel)
|
|
9364
9442
|
})), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
|
|
9365
9443
|
display: "flex",
|
|
9366
9444
|
style: {
|