@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.
@@ -1,4 +1,4 @@
1
- import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIGrid, IUIDivider, IUITypography, IUIRadio, IUIButton, IUIModal, IUISearch, IUICircularProgress, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUICard, IUIBackdrop, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIIconButton, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUIDropdownButton, IUITabs } from '@itilite/iuistyles';
1
+ import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIGrid, IUIDivider, IUITypography, IUIRadio, IUIButton, IUIModal, IUISearch, IUICircularProgress, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUICard, IUIBackdrop, IUIBreadCrumb, IUIDropdownButton, IUIDropzone, IUIStepper, IUIIconButton, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUITabs } from '@itilite/iuistyles';
2
2
  import React, { useState, Fragment as Fragment$1, useEffect, memo, useRef } from 'react';
3
3
  import { configs, services, utilUrls } from '@itilite/utils';
4
4
  import axios from 'axios';
@@ -182,19 +182,9 @@ function _finallyRethrows(body, finalizer) {
182
182
  return finalizer(false, result);
183
183
  }
184
184
 
185
- 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"};
185
+ 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"};
186
186
 
187
- function r(e) {
188
- var t,
189
- f,
190
- n = "";
191
- 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);
192
- return n;
193
- }
194
- function clsx() {
195
- for (var e, t, f = 0, n = ""; f < arguments.length;) (e = arguments[f++]) && (t = r(e)) && (n && (n += " "), n += t);
196
- return n;
197
- }
187
+ 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}
198
188
 
199
189
  var GetInputType = React.forwardRef(function (props, ref) {
200
190
  var _p = props._p,
@@ -896,6 +886,9 @@ var formatCreateUserPayload = function formatCreateUserPayload(payload) {
896
886
  approvers: {},
897
887
  requested_user_is_admin: payload.isCardsAdmin
898
888
  };
889
+ if (payload.send_welcome_email !== undefined) {
890
+ res.should_send_welcome_email = payload.send_welcome_email;
891
+ }
899
892
  var userTags = [];
900
893
  for (var key in payload.userTagType) {
901
894
  if (Object.hasOwnProperty.call(payload.userTagType, key) && payload.userTagType[key]) {
@@ -2644,11 +2637,13 @@ var Visa = function Visa(props) {
2644
2637
  var IUILocalStorageService$4 = services.IUILocalStorageService;
2645
2638
  var env$3 = configs.env;
2646
2639
  var CardsManagement = function CardsManagement(_ref) {
2647
- var _pg$gateway;
2640
+ var _selectedCard$metadat, _pg$gateway, _selectedCard$metadat2;
2648
2641
  var _ref$paymentDetails = _ref.paymentDetails,
2649
2642
  paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
2650
2643
  _ref$paymentMethod = _ref.paymentMethod,
2651
- paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod;
2644
+ paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
2645
+ _ref$sendLog = _ref.sendLog,
2646
+ sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
2652
2647
  var dispatch = useDispatch();
2653
2648
  var _ref2 = paymentDetails || {},
2654
2649
  _ref2$pg = _ref2.pg,
@@ -2670,8 +2665,16 @@ var CardsManagement = function CardsManagement(_ref) {
2670
2665
  setSelectedCard(null);
2671
2666
  };
2672
2667
  var handleMarkAsDefault = function handleMarkAsDefault() {
2673
- console.log('Mark as default:', selectedCard);
2668
+ var _selectedCard$card;
2674
2669
  if (!pg || !selectedCard) return;
2670
+ sendLog({
2671
+ eventName: 'edit_card_clicked',
2672
+ customProperties: {
2673
+ action_type: 'Make default',
2674
+ card_last4: (selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$card = selectedCard.card) === null || _selectedCard$card === void 0 ? void 0 : _selectedCard$card.last4) || ''
2675
+ },
2676
+ logImpression: true
2677
+ });
2675
2678
  dispatch(setDefaultPaymentCard({
2676
2679
  user_id: +pg.user_id,
2677
2680
  method_id: selectedCard.id,
@@ -2681,13 +2684,21 @@ var CardsManagement = function CardsManagement(_ref) {
2681
2684
  handleMenuClose();
2682
2685
  };
2683
2686
  var handleDeleteCard = function handleDeleteCard() {
2687
+ var _selectedCard$card2;
2688
+ sendLog({
2689
+ eventName: 'edit_card_clicked',
2690
+ customProperties: {
2691
+ action_type: 'Delete',
2692
+ card_last4: (selectedCard === null || selectedCard === void 0 ? void 0 : (_selectedCard$card2 = selectedCard.card) === null || _selectedCard$card2 === void 0 ? void 0 : _selectedCard$card2.last4) || ''
2693
+ },
2694
+ logImpression: true
2695
+ });
2684
2696
  dispatch(deletePaymentCard({
2685
2697
  pmId: selectedCard.id,
2686
2698
  vendorId: pg.vendor_id
2687
2699
  }));
2688
2700
  handleMenuClose();
2689
2701
  };
2690
- console.log('test mudu 22');
2691
2702
  var getBrandLogo = function getBrandLogo(brand) {
2692
2703
  var width = 40;
2693
2704
  var aspectRatio = 780 / 500;
@@ -2816,6 +2827,7 @@ var CardsManagement = function CardsManagement(_ref) {
2816
2827
  });
2817
2828
  var cardsCount = (personalCards === null || personalCards === void 0 ? void 0 : personalCards.length) + (corporateCards === null || corporateCards === void 0 ? void 0 : corporateCards.length);
2818
2829
  var _url = env$3.getPaymentUrl() + ("/api/v1/auth/" + IUILocalStorageService$4.getAccessToken() + "/1/" + pg.entity_id + "/0/" + pg.vendor_id + "/1");
2830
+ 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);
2819
2831
  return /*#__PURE__*/React.createElement("div", {
2820
2832
  style: {
2821
2833
  marginBottom: -20
@@ -2851,7 +2863,11 @@ var CardsManagement = function CardsManagement(_ref) {
2851
2863
  }) : 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.createElement("button", {
2852
2864
  className: classes.addCardButton,
2853
2865
  onClick: function onClick() {
2854
- return window.location.assign(_url);
2866
+ sendLog({
2867
+ eventName: 'add_user_card_clicked',
2868
+ logImpression: true
2869
+ });
2870
+ window.location.assign(_url);
2855
2871
  }
2856
2872
  }, /*#__PURE__*/React.createElement("span", {
2857
2873
  className: classes.plusIcon
@@ -2895,7 +2911,7 @@ var CardsManagement = function CardsManagement(_ref) {
2895
2911
  }
2896
2912
  }, selectedCard && !+selectedCard.metadata.default_card && /*#__PURE__*/React.createElement(MenuItem, {
2897
2913
  onClick: handleMarkAsDefault
2898
- }, "Mark as default"), /*#__PURE__*/React.createElement(MenuItem, {
2914
+ }, "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.createElement(MenuItem, {
2899
2915
  onClick: handleDeleteCard,
2900
2916
  style: {
2901
2917
  color: '#ff4444'
@@ -2908,7 +2924,9 @@ var PaymentCards = function PaymentCards(_ref) {
2908
2924
  var _ref$paymentDetails = _ref.paymentDetails,
2909
2925
  paymentDetails = _ref$paymentDetails === void 0 ? {} : _ref$paymentDetails,
2910
2926
  _ref$paymentMethod = _ref.paymentMethod,
2911
- paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod;
2927
+ paymentMethod = _ref$paymentMethod === void 0 ? null : _ref$paymentMethod,
2928
+ _ref$sendLog = _ref.sendLog,
2929
+ sendLog = _ref$sendLog === void 0 ? function () {} : _ref$sendLog;
2912
2930
  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)) {
2913
2931
  return /*#__PURE__*/React.createElement(React.Fragment, null);
2914
2932
  }
@@ -2916,7 +2934,8 @@ var PaymentCards = function PaymentCards(_ref) {
2916
2934
  className: styles$1.dividerColor
2917
2935
  }), /*#__PURE__*/React.createElement(CardsManagement, {
2918
2936
  paymentDetails: paymentDetails,
2919
- paymentMethod: paymentMethod
2937
+ paymentMethod: paymentMethod,
2938
+ sendLog: sendLog
2920
2939
  }));
2921
2940
  };
2922
2941
 
@@ -2992,7 +3011,9 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
2992
3011
  _props$roles = props.roles,
2993
3012
  roles = _props$roles === void 0 ? [] : _props$roles,
2994
3013
  _props$paymentMethod = props.paymentMethod,
2995
- paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod;
3014
+ paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
3015
+ _props$sendLog = props.sendLog,
3016
+ sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
2996
3017
  var _useState = useState({
2997
3018
  product: '',
2998
3019
  approvers: []
@@ -3290,7 +3311,8 @@ var TravelExpenseFields = function TravelExpenseFields(props) {
3290
3311
  }));
3291
3312
  })))), type === 'travel' && paymentDetails && isProfile && /*#__PURE__*/React.createElement(PaymentCards, {
3292
3313
  paymentDetails: paymentDetails,
3293
- paymentMethod: paymentMethod
3314
+ paymentMethod: paymentMethod,
3315
+ sendLog: sendLog
3294
3316
  }));
3295
3317
  };
3296
3318
 
@@ -5049,6 +5071,7 @@ function withStore(Component) {
5049
5071
  }
5050
5072
 
5051
5073
  var ExpandMoreIcon = function ExpandMoreIcon(props) {
5074
+ var fillColor = props.fillColor || '#6B7280';
5052
5075
  return /*#__PURE__*/React.createElement("svg", {
5053
5076
  xmlns: "http://www.w3.org/2000/svg",
5054
5077
  width: props.width,
@@ -5056,7 +5079,7 @@ var ExpandMoreIcon = function ExpandMoreIcon(props) {
5056
5079
  fill: "none",
5057
5080
  viewBox: "0 0 12 7"
5058
5081
  }, /*#__PURE__*/React.createElement("path", {
5059
- fill: "#6B7280",
5082
+ fill: fillColor,
5060
5083
  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"
5061
5084
  }));
5062
5085
  };
@@ -6424,7 +6447,9 @@ var UserAddEdit = function UserAddEdit(props) {
6424
6447
  _props$isProfile = props.isProfile,
6425
6448
  isProfile = _props$isProfile === void 0 ? false : _props$isProfile,
6426
6449
  _props$paymentMethod = props.paymentMethod,
6427
- paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod;
6450
+ paymentMethod = _props$paymentMethod === void 0 ? null : _props$paymentMethod,
6451
+ _props$sendLog = props.sendLog,
6452
+ sendLog = _props$sendLog === void 0 ? function () {} : _props$sendLog;
6428
6453
  env$4.init(config, isProfile);
6429
6454
  var queryParams = new URLSearchParams(window.location.search);
6430
6455
  var verifyUserId = Number(queryParams.get(config.routes.users.add.queryParamKeys.verifyUserId));
@@ -7703,7 +7728,10 @@ var UserAddEdit = function UserAddEdit(props) {
7703
7728
  return Promise.reject(e);
7704
7729
  }
7705
7730
  };
7706
- var formSubmitHandler = function formSubmitHandler() {
7731
+ var formSubmitHandler = function formSubmitHandler(send_welcome_email) {
7732
+ if (send_welcome_email === void 0) {
7733
+ send_welcome_email = false;
7734
+ }
7707
7735
  try {
7708
7736
  var checkAnyError = doesFormHasError();
7709
7737
  if (checkAnyError) {
@@ -7741,6 +7769,9 @@ var UserAddEdit = function UserAddEdit(props) {
7741
7769
  cardsRole: cardsRole,
7742
7770
  isCardsAdmin: isCardsAdmin
7743
7771
  };
7772
+ if (!isEditMode && !isProfile) {
7773
+ payload.send_welcome_email = send_welcome_email;
7774
+ }
7744
7775
  if (verifyUserId) {
7745
7776
  payload.verifyUserId = verifyUserId;
7746
7777
  }
@@ -8129,12 +8160,34 @@ var UserAddEdit = function UserAddEdit(props) {
8129
8160
  onClick: handleCancelNavigation
8130
8161
  })), /*#__PURE__*/React.createElement(IUIBox, {
8131
8162
  component: "div",
8132
- className: "pageHeader--button-single button-right"
8133
- }, /*#__PURE__*/React.createElement(IUIButton, {
8163
+ className: clsx('pageHeader--button-single', styles.buttonRight)
8164
+ }, isEditMode || isProfile ? /*#__PURE__*/React.createElement(IUIButton, {
8134
8165
  buttonText: "Save",
8135
8166
  type: "contained",
8136
8167
  onClick: formSubmitHandler,
8137
8168
  disabled: isPageLoading || productAccess.travel === false && productAccess.expense === false || !!doesFormHasError()
8169
+ }) : /*#__PURE__*/React.createElement(IUIDropdownButton, {
8170
+ buttonText: "Create user",
8171
+ outlinedBtn: false,
8172
+ className: styles.containedDropdownBtn,
8173
+ placement: "bottom-end",
8174
+ endIcon: /*#__PURE__*/React.createElement(ExpandMoreIcon, {
8175
+ fillColor: "white",
8176
+ width: "10",
8177
+ height: "10",
8178
+ fill: true
8179
+ }),
8180
+ menuListInfo: [{
8181
+ label: 'Send email invite',
8182
+ handler: function handler() {
8183
+ return formSubmitHandler(true);
8184
+ }
8185
+ }, {
8186
+ label: 'Do not send email',
8187
+ handler: function handler() {
8188
+ return formSubmitHandler(false);
8189
+ }
8190
+ }]
8138
8191
  }))))), /*#__PURE__*/React.createElement(IUIBox, {
8139
8192
  component: "div",
8140
8193
  marginTop: "8rem",
@@ -8348,7 +8401,8 @@ var UserAddEdit = function UserAddEdit(props) {
8348
8401
  isProfile: isProfile,
8349
8402
  editUserId: editUserId,
8350
8403
  roles: renderFields.travelRoles,
8351
- paymentMethod: paymentMethod
8404
+ paymentMethod: paymentMethod,
8405
+ sendLog: sendLog
8352
8406
  }), /*#__PURE__*/React.createElement(AdditionalInfo, {
8353
8407
  membershipInfoInput: membershipInfoInput,
8354
8408
  onMemInfoInputChange: onMemInfoInputChange,
@@ -8393,7 +8447,8 @@ var UserAddEdit = function UserAddEdit(props) {
8393
8447
  isProfile: isProfile,
8394
8448
  editUserId: editUserId,
8395
8449
  roles: renderFields.expenseRoles,
8396
- paymentMethod: paymentMethod
8450
+ paymentMethod: paymentMethod,
8451
+ sendLog: sendLog
8397
8452
  }), /*#__PURE__*/React.createElement(IUIDivider, {
8398
8453
  className: styles.dividerColor
8399
8454
  }), isCardsDetailsRendered && productAccess && productAccess.card && /*#__PURE__*/React.createElement(CardsField, {
@@ -8644,10 +8699,15 @@ var downloadUploadedRecords = function downloadUploadedRecords(type, jobId) {
8644
8699
  });
8645
8700
  };
8646
8701
  };
8647
- var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers) {
8702
+ var importUploadedRecords = function importUploadedRecords(jobId, canUpdateExistingUsers, sendInvite) {
8703
+ if (sendInvite === void 0) {
8704
+ sendInvite = false;
8705
+ }
8648
8706
  return function (dispatch) {
8649
8707
  return new Promise(function (resolve, reject) {
8650
- api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers).then(function (res) {
8708
+ api$8.post(userBulkImport.importRecords() + "?job_id=" + jobId + "&update=" + canUpdateExistingUsers, {
8709
+ should_send_welcome_email: sendInvite
8710
+ }).then(function (res) {
8651
8711
  resolve(res);
8652
8712
  })["catch"](function (err) {
8653
8713
  reject(err);
@@ -8908,9 +8968,12 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
8908
8968
  var _useState5 = useState(false),
8909
8969
  canUpdateExistingUsers = _useState5[0],
8910
8970
  setCanUpdateExistingUsers = _useState5[1];
8911
- var _useState6 = useState(false),
8912
- isFileDownloading = _useState6[0],
8913
- setDownlStatus = _useState6[1];
8971
+ var _useState6 = useState(true),
8972
+ sendInvite = _useState6[0],
8973
+ setSendInvite = _useState6[1];
8974
+ var _useState7 = useState(false),
8975
+ isFileDownloading = _useState7[0],
8976
+ setDownlStatus = _useState7[1];
8914
8977
  var _useSelector = useSelector(function (state) {
8915
8978
  return state.common;
8916
8979
  }),
@@ -9018,7 +9081,7 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
9018
9081
  }
9019
9082
  }
9020
9083
  setImportStatus(1);
9021
- return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0))).then(function (res) {
9084
+ return Promise.resolve(dispatch(importUploadedRecords(jobId, canUpdateExistingUsers ? 1 : 0, sendInvite))).then(function (res) {
9022
9085
  var _temp = function () {
9023
9086
  if (res.data.status) {
9024
9087
  return Promise.resolve(dispatch(_executionJob(jobId, 'is_job_completed')).then(function (resp) {
@@ -9049,6 +9112,9 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
9049
9112
  var handleExistingUserUpdation = function handleExistingUserUpdation(event) {
9050
9113
  setCanUpdateExistingUsers(!canUpdateExistingUsers);
9051
9114
  };
9115
+ var handleSendInvite = function handleSendInvite() {
9116
+ setSendInvite(!sendInvite);
9117
+ };
9052
9118
  var CustomStepIcon = function CustomStepIcon(step) {
9053
9119
  if ((importStatus === 1 || importStatus === 2 || importStatus === 4) && step === Number(activeStep)) {
9054
9120
  return /*#__PURE__*/React.createElement(IUIPrimaryRadio, {
@@ -9358,6 +9424,18 @@ var UserBulkUpload = function UserBulkUpload(_ref) {
9358
9424
  label: "Update any existing users",
9359
9425
  className: clsx(styles$5.checkboxlabel, (_clsx5 = {}, _clsx5[styles$5.disabledText] = +userBulkImportInfo.exist_users === 0, _clsx5)),
9360
9426
  disabled: +userBulkImportInfo.exist_users === 0
9427
+ })), /*#__PURE__*/React.createElement(IUIBox, {
9428
+ display: "flex",
9429
+ style: {
9430
+ paddingLeft: '28px'
9431
+ }
9432
+ }, /*#__PURE__*/React.createElement(IUIFormControlLabel, {
9433
+ control: /*#__PURE__*/React.createElement(IUICheckBox, {
9434
+ handleCheckBoxHandler: handleSendInvite,
9435
+ checked: sendInvite
9436
+ }),
9437
+ label: "Send invitation emails to new users who have not logged into the platform.",
9438
+ className: clsx(styles$5.checkboxlabel)
9361
9439
  })), /*#__PURE__*/React.createElement(IUIBox, {
9362
9440
  display: "flex",
9363
9441
  style: {