@itilite/iui-user-management 1.4.781 → 1.4.891

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 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: 20px;
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: #6b7280;
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
- color: #6b7280;
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 _pg$gateway, _selectedCard$metadat;
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
- console.log('Mark as default:', selectedCard);
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;
@@ -2854,7 +2865,11 @@ var CardsManagement = function CardsManagement(_ref) {
2854
2865
  }) : 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
2866
  className: classes.addCardButton,
2856
2867
  onClick: function onClick() {
2857
- return window.location.assign(_url);
2868
+ sendLog({
2869
+ eventName: 'add_user_card_clicked',
2870
+ logImpression: true
2871
+ });
2872
+ window.location.assign(_url);
2858
2873
  }
2859
2874
  }, /*#__PURE__*/React__default.createElement("span", {
2860
2875
  className: classes.plusIcon
@@ -2898,7 +2913,7 @@ var CardsManagement = function CardsManagement(_ref) {
2898
2913
  }
2899
2914
  }, selectedCard && !+selectedCard.metadata.default_card && /*#__PURE__*/React__default.createElement(core.MenuItem, {
2900
2915
  onClick: handleMarkAsDefault
2901
- }, "Mark as default"), /*#__PURE__*/React__default.createElement(core.MenuItem, {
2916
+ }, "Mark as default"), (cardsCount === 1 || cardsCount > 1 && !+(selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$metadat = selectedCard.metadata) === null || _selectedCard$metadat === void 0 ? void 0 : _selectedCard$metadat.default_card)) && /*#__PURE__*/React__default.createElement(core.MenuItem, {
2902
2917
  onClick: handleDeleteCard,
2903
2918
  style: {
2904
2919
  color: '#ff4444'
@@ -2911,7 +2926,9 @@ var PaymentCards = function PaymentCards(_ref) {
2911
2926
  var _ref$paymentDetails = _ref.paymentDetails,
2912
2927
  paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
2913
2928
  _ref$paymentMethod = _ref.paymentMethod,
2914
- paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod;
2929
+ paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
2930
+ _ref$sendLog = _ref.sendLog,
2931
+ sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
2915
2932
  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
2933
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null);
2917
2934
  }
@@ -2919,7 +2936,8 @@ var PaymentCards = function PaymentCards(_ref) {
2919
2936
  className: styles$1.dividerColor
2920
2937
  }), /*#__PURE__*/React__default.createElement(CardsManagement, {
2921
2938
  paymentDetails: paymentDetails,
2922
- paymentMethod: paymentMethod
2939
+ paymentMethod: paymentMethod,
2940
+ sendLog: sendLog
2923
2941
  }));
2924
2942
  };
2925
2943
 
@@ -2995,7 +3013,9 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
2995
3013
  _props$roles = props.roles,
2996
3014
  roles = _props$roles === void 0 ? [] : _props$roles,
2997
3015
  _props$paymentMethod = props.paymentMethod,
2998
- paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod;
3016
+ paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
3017
+ _props$sendLog = props.sendLog,
3018
+ sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
2999
3019
  var _useState = React.useState({
3000
3020
  product: '',
3001
3021
  approvers: []
@@ -3293,7 +3313,8 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
3293
3313
  }));
3294
3314
  })))), type === 'travel' && paymentDetails && isProfile && /*#__PURE__*/React__default.createElement(PaymentCards, {
3295
3315
  paymentDetails: paymentDetails,
3296
- paymentMethod: paymentMethod
3316
+ paymentMethod: paymentMethod,
3317
+ sendLog: sendLog
3297
3318
  }));
3298
3319
  };
3299
3320
 
@@ -5052,6 +5073,7 @@ function withStore(Component) {
5052
5073
  }
5053
5074
 
5054
5075
  var ExpandMoreIcon = function ExpandMoreIcon(props) {
5076
+ var fillColor = props.fillColor || '#6B7280';
5055
5077
  return /*#__PURE__*/React__default.createElement("svg", {
5056
5078
  xmlns: "http://www.w3.org/2000/svg",
5057
5079
  width: props.width,
@@ -5059,7 +5081,7 @@ var ExpandMoreIcon = function ExpandMoreIcon(props) {
5059
5081
  fill: "none",
5060
5082
  viewBox: "0 0 12 7"
5061
5083
  }, /*#__PURE__*/React__default.createElement("path", {
5062
- fill: "#6B7280",
5084
+ fill: fillColor,
5063
5085
  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
5086
  }));
5065
5087
  };
@@ -6427,7 +6449,9 @@ var UserAddEdit = function UserAddEdit(props) {
6427
6449
  _props$isProfile = props.isProfile,
6428
6450
  isProfile = _props$isProfile === void 0 ? false : _props$isProfile,
6429
6451
  _props$paymentMethod = props.paymentMethod,
6430
- paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod;
6452
+ paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
6453
+ _props$sendLog = props.sendLog,
6454
+ sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
6431
6455
  env$4.init(config, isProfile);
6432
6456
  var queryParams = new URLSearchParams(window.location.search);
6433
6457
  var verifyUserId = Number(queryParams.get(config.routes.users.add.queryParamKeys.verifyUserId));
@@ -6651,6 +6675,26 @@ var UserAddEdit = function UserAddEdit(props) {
6651
6675
  console.log('errorrr', error);
6652
6676
  });
6653
6677
  };
6678
+ var fetchLoggedUserCardsDetails = function fetchLoggedUserCardsDetails() {
6679
+ fetch(userAddEditUrl.cardsAddUsersDetails(), {
6680
+ method: 'GET',
6681
+ headers: {
6682
+ 'Content-Type': 'application/json',
6683
+ authorization: "Bearer " + IUILocalStorageService$5.getAccessToken()
6684
+ }
6685
+ }).then(function (response) {
6686
+ return response.json();
6687
+ }).then(function (res) {
6688
+ var _res$roles2;
6689
+ if (res !== null && res !== void 0 && (_res$roles2 = res.roles) !== null && _res$roles2 !== void 0 && _res$roles2.length) {
6690
+ dispatch(setCardsDetails(res));
6691
+ } else {
6692
+ IUIToastMessageService$6.warningNotify('Opps, Something went wrong.');
6693
+ }
6694
+ })["catch"](function (error) {
6695
+ console.log('errorrr', error);
6696
+ });
6697
+ };
6654
6698
  React.useEffect(function () {
6655
6699
  var countryObject = countryContactCode.find(function (t) {
6656
6700
  return t.dial_code === countryDialCode;
@@ -7351,8 +7395,13 @@ var UserAddEdit = function UserAddEdit(props) {
7351
7395
  React.useEffect(function () {
7352
7396
  if (isRendered === true) {
7353
7397
  renderFields === null || renderFields === void 0 ? void 0 : renderFields.products.forEach(function (prod) {
7398
+ console.log(prod, isProfile, editUserId, id, 'card check');
7354
7399
  if ((prod === null || prod === void 0 ? void 0 : prod.name) === 'card') {
7355
- fetchEditUserCardsDetails(isProfile ? id : editUserId);
7400
+ if (isProfile || editUserId) {
7401
+ fetchEditUserCardsDetails(isProfile ? id : editUserId);
7402
+ } else {
7403
+ fetchLoggedUserCardsDetails();
7404
+ }
7356
7405
  }
7357
7406
  });
7358
7407
  setPersonalInfoInput(_extends({}, personalInfoInput, {
@@ -7681,7 +7730,10 @@ var UserAddEdit = function UserAddEdit(props) {
7681
7730
  return Promise.reject(e);
7682
7731
  }
7683
7732
  };
7684
- var formSubmitHandler = function formSubmitHandler() {
7733
+ var formSubmitHandler = function formSubmitHandler(send_welcome_email) {
7734
+ if (send_welcome_email === void 0) {
7735
+ send_welcome_email = false;
7736
+ }
7685
7737
  try {
7686
7738
  var checkAnyError = doesFormHasError();
7687
7739
  if (checkAnyError) {
@@ -7719,6 +7771,9 @@ var UserAddEdit = function UserAddEdit(props) {
7719
7771
  cardsRole: cardsRole,
7720
7772
  isCardsAdmin: isCardsAdmin
7721
7773
  };
7774
+ if (!isEditMode && !isProfile) {
7775
+ payload.send_welcome_email = send_welcome_email;
7776
+ }
7722
7777
  if (verifyUserId) {
7723
7778
  payload.verifyUserId = verifyUserId;
7724
7779
  }
@@ -8107,12 +8162,34 @@ var UserAddEdit = function UserAddEdit(props) {
8107
8162
  onClick: handleCancelNavigation
8108
8163
  })), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8109
8164
  component: "div",
8110
- className: "pageHeader--button-single button-right"
8111
- }, /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
8165
+ className: clsx('pageHeader--button-single', styles.buttonRight)
8166
+ }, isEditMode || isProfile ? /*#__PURE__*/React__default.createElement(iuistyles.IUIButton, {
8112
8167
  buttonText: "Save",
8113
8168
  type: "contained",
8114
8169
  onClick: formSubmitHandler,
8115
8170
  disabled: isPageLoading || productAccess.travel === false && productAccess.expense === false || !!doesFormHasError()
8171
+ }) : /*#__PURE__*/React__default.createElement(iuistyles.IUIDropdownButton, {
8172
+ buttonText: "Create user",
8173
+ outlinedBtn: false,
8174
+ className: styles.containedDropdownBtn,
8175
+ placement: "bottom-end",
8176
+ endIcon: /*#__PURE__*/React__default.createElement(ExpandMoreIcon, {
8177
+ fillColor: "white",
8178
+ width: "10",
8179
+ height: "10",
8180
+ fill: true
8181
+ }),
8182
+ menuListInfo: [{
8183
+ label: 'Send email invite',
8184
+ handler: function handler() {
8185
+ return formSubmitHandler(true);
8186
+ }
8187
+ }, {
8188
+ label: 'Do not send email',
8189
+ handler: function handler() {
8190
+ return formSubmitHandler(false);
8191
+ }
8192
+ }]
8116
8193
  }))))), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
8117
8194
  component: "div",
8118
8195
  marginTop: "8rem",
@@ -8326,7 +8403,8 @@ var UserAddEdit = function UserAddEdit(props) {
8326
8403
  isProfile: isProfile,
8327
8404
  editUserId: editUserId,
8328
8405
  roles: renderFields.travelRoles,
8329
- paymentMethod: paymentMethod
8406
+ paymentMethod: paymentMethod,
8407
+ sendLog: sendLog
8330
8408
  }), /*#__PURE__*/React__default.createElement(AdditionalInfo, {
8331
8409
  membershipInfoInput: membershipInfoInput,
8332
8410
  onMemInfoInputChange: onMemInfoInputChange,
@@ -8371,7 +8449,8 @@ var UserAddEdit = function UserAddEdit(props) {
8371
8449
  isProfile: isProfile,
8372
8450
  editUserId: editUserId,
8373
8451
  roles: renderFields.expenseRoles,
8374
- paymentMethod: paymentMethod
8452
+ paymentMethod: paymentMethod,
8453
+ sendLog: sendLog
8375
8454
  }), /*#__PURE__*/React__default.createElement(iuistyles.IUIDivider, {
8376
8455
  className: styles.dividerColor
8377
8456
  }), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React__default.createElement(CardsField, {
@@ -8622,10 +8701,15 @@ var downloadUploadedRecords = function downloadUploadedRecords(type, jobId) {
8622
8701
  });
8623
8702
  };
8624
8703
  };
8625
- var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers) {
8704
+ var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers, sendInvite) {
8705
+ if (sendInvite === void 0) {
8706
+ sendInvite = false;
8707
+ }
8626
8708
  return function (dispatch) {
8627
8709
  return new Promise(function (resolve, reject) {
8628
- api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers).then(function (res) {
8710
+ api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers, {
8711
+ should_send_welcome_email: sendInvite
8712
+ }).then(function (res) {
8629
8713
  resolve(res);
8630
8714
  })["catch"](function (err) {
8631
8715
  reject(err);
@@ -8886,9 +8970,12 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
8886
8970
  var _useState5 = React.useState(false),
8887
8971
  canUpdateExistingUsers = _useState5[0],
8888
8972
  setCanUpdateExistingUsers = _useState5[1];
8889
- var _useState6 = React.useState(false),
8890
- isFileDownloading = _useState6[0],
8891
- setDownlStatus = _useState6[1];
8973
+ var _useState6 = React.useState(true),
8974
+ sendInvite = _useState6[0],
8975
+ setSendInvite = _useState6[1];
8976
+ var _useState7 = React.useState(false),
8977
+ isFileDownloading = _useState7[0],
8978
+ setDownlStatus = _useState7[1];
8892
8979
  var _useSelector = reactRedux.useSelector(function (state) {
8893
8980
  return state.common;
8894
8981
  }),
@@ -8996,7 +9083,7 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
8996
9083
  }
8997
9084
  }
8998
9085
  setImportStatus(1);
8999
- return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0))).then(function (res) {
9086
+ return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0, sendInvite))).then(function (res) {
9000
9087
  var _temp = function () {
9001
9088
  if (res.data.status) {
9002
9089
  return Promise.resolve(dispatch(_executionJob(jobId, 'is_job_completed')).then(function (resp) {
@@ -9027,6 +9114,9 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
9027
9114
  var handleExistingUserUpdation = function handleExistingUserUpdation(event) {
9028
9115
  setCanUpdateExistingUsers(!canUpdateExistingUsers);
9029
9116
  };
9117
+ var handleSendInvite = function handleSendInvite() {
9118
+ setSendInvite(!sendInvite);
9119
+ };
9030
9120
  var CustomStepIcon = function CustomStepIcon(step) {
9031
9121
  if ((importStatus === 1 || importStatus === 2 || importStatus === 4) && step === Number(activeStep)) {
9032
9122
  return /*#__PURE__*/React__default.createElement(iuistyles.IUIPrimaryRadio, {
@@ -9336,6 +9426,18 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
9336
9426
  label: "Update any existing users",
9337
9427
  className: clsx(styles$5.checkboxlabel, (_clsx5 = {}, _clsx5[styles$5.disabledText] = +userBulkImportInfo.exist_users === 0, _clsx5)),
9338
9428
  disabled: +userBulkImportInfo.exist_users === 0
9429
+ })), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
9430
+ display: "flex",
9431
+ style: {
9432
+ paddingLeft: '28px'
9433
+ }
9434
+ }, /*#__PURE__*/React__default.createElement(iuistyles.IUIFormControlLabel, {
9435
+ control: /*#__PURE__*/React__default.createElement(iuistyles.IUICheckBox, {
9436
+ handleCheckBoxHandler: handleSendInvite,
9437
+ checked: sendInvite
9438
+ }),
9439
+ label: "Send invitation emails to new users who have not logged into the platform.",
9440
+ className: clsx(styles$5.checkboxlabel)
9339
9441
  })), /*#__PURE__*/React__default.createElement(iuistyles.IUIBox, {
9340
9442
  display: "flex",
9341
9443
  style: {