@itilite/iui-user-management 0.4.33 → 0.4.34

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, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordionMain, icons, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUISearch, IUIDropdownButton, IUITabs } from '@itilite/iuistyles';
1
+ import { IUIAsyncSelect, IUIBox, IUILabel, IUIFileUpload, IUICheckboxButton, IUIPhone, IUISelect, IUIDatePicker, IUIInput, IUIDivider, IUIGrid, IUITypography, IUIRadio, IUIButton, IUIModal, IUIAccordion, IUIAccordionSummary, IUIAccordionDetails, IUIIconButton, IUICard, IUIBackdrop, IUICircularProgress, IUIBreadCrumb, IUIDropzone, IUIStepper, IUIFormControlLabel, IUICheckBox, IUIPrimaryRadio, IUITable, IUISkeleton, IUIProfileBox, IUIFormGroup, IUISearch, IUIDropdownButton, IUITabs } from '@itilite/iuistyles';
2
2
  import React, { useState, useEffect, useRef, Fragment as Fragment$1 } from 'react';
3
3
  import { configs, services, utilUrls } from '@itilite/utils';
4
4
  import axios from 'axios';
@@ -1102,12 +1102,6 @@ var setSignUpRequestList = function setSignUpRequestList(payload) {
1102
1102
  payload: payload
1103
1103
  };
1104
1104
  };
1105
- var setUserActiveStatus = function setUserActiveStatus(payload) {
1106
- return {
1107
- type: SET_ACTIVE_STATUS,
1108
- payload: payload
1109
- };
1110
- };
1111
1105
  var setBulkDeactivatedUsers = function setBulkDeactivatedUsers(payload) {
1112
1106
  return {
1113
1107
  type: SET_BULK_DEACTIVATED_USERS,
@@ -1200,27 +1194,6 @@ var updateTabValue = function updateTabValue(tabId) {
1200
1194
  payload: tabId
1201
1195
  };
1202
1196
  };
1203
- var updateActiveStatus = function updateActiveStatus(activateVal, id) {
1204
- return function (dispatch) {
1205
- return new Promise(function (resolve, reject) {
1206
- api$1.get(userListUrl.updateActiveStatus + 'user_id=' + id + '&activate=' + activateVal).then(function (res) {
1207
- dispatch(setUserActiveStatus({
1208
- is_active: activateVal !== 0,
1209
- id: id
1210
- }));
1211
- IUIToastMessageService.sNotify(res.data.message);
1212
- resolve(res);
1213
- })["catch"](function (err) {
1214
- if (!err.response.data.status) {
1215
- IUIToastMessageService.warningNotify(err.response.data.message);
1216
- reject(err);
1217
- return;
1218
- }
1219
- reject(err);
1220
- });
1221
- });
1222
- };
1223
- };
1224
1197
 
1225
1198
  var api$2 = configs.api;
1226
1199
  var IUIToastMessageService$1 = services.IUIToastMessageService,
@@ -4290,8 +4263,49 @@ function withStore(Component) {
4290
4263
  return WrappedComponent;
4291
4264
  }
4292
4265
 
4266
+ var ExpandMoreIcon = function ExpandMoreIcon(props) {
4267
+ return /*#__PURE__*/React.createElement("svg", {
4268
+ xmlns: "http://www.w3.org/2000/svg",
4269
+ width: props.width,
4270
+ height: props.height,
4271
+ fill: "none",
4272
+ viewBox: "0 0 12 7"
4273
+ }, /*#__PURE__*/React.createElement("path", {
4274
+ fill: "#6B7280",
4275
+ 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"
4276
+ }));
4277
+ };
4278
+
4279
+ var ExpandLessIcon = function ExpandLessIcon(props) {
4280
+ return /*#__PURE__*/React.createElement("svg", {
4281
+ xmlns: "http://www.w3.org/2000/svg",
4282
+ width: props.width,
4283
+ height: props.height,
4284
+ fill: "none",
4285
+ viewBox: "0 0 10 6"
4286
+ }, /*#__PURE__*/React.createElement("path", {
4287
+ fill: "#6B7280",
4288
+ d: "M.293.293a1 1 0 011.414 0L5 3.586 8.293.293a1 1 0 011.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
4289
+ }));
4290
+ };
4291
+
4292
+ var CrossIcon = function CrossIcon(props) {
4293
+ var _props$color = props.color,
4294
+ color = _props$color === void 0 ? '#6B7280' : _props$color;
4295
+ return /*#__PURE__*/React.createElement("svg", {
4296
+ xmlns: "http://www.w3.org/2000/svg",
4297
+ width: props.width,
4298
+ height: props.height,
4299
+ fill: "none",
4300
+ viewBox: "0 0 14 14"
4301
+ }, /*#__PURE__*/React.createElement("path", {
4302
+ fill: color,
4303
+ d: "M.293.292a1 1 0 011.414 0L7 5.585 12.293.292a1 1 0 111.414 1.415L8.414 7l5.293 5.292a1 1 0 01-1.414 1.415L7 8.414l-5.293 5.293a1 1 0 01-1.414-1.415L5.586 7 .293 1.707a1 1 0 010-1.415z"
4304
+ }));
4305
+ };
4306
+
4293
4307
  var AdditionalInfo = function AdditionalInfo(_ref) {
4294
- var _clsx2;
4308
+ var _clsx;
4295
4309
  var membershipInfoInput = _ref.membershipInfoInput,
4296
4310
  onMemInfoInputChange = _ref.onMemInfoInputChange,
4297
4311
  addMemInfoInput = _ref.addMemInfoInput,
@@ -4320,10 +4334,6 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
4320
4334
  setAdditionalInfoFlag(defaultExpand ? panel : false);
4321
4335
  };
4322
4336
  };
4323
- var ExpandMore = icons.ExpandMore,
4324
- ExpandLess = icons.ExpandLess,
4325
- Add = icons.Add,
4326
- Cross = icons.Cross;
4327
4337
  var _useSelector = useSelector(function (state) {
4328
4338
  return state.userAddEdit.renderFields;
4329
4339
  }),
@@ -4381,316 +4391,312 @@ var AdditionalInfo = function AdditionalInfo(_ref) {
4381
4391
  }
4382
4392
  return null;
4383
4393
  };
4384
- var getAccordianSummary = function getAccordianSummary() {
4394
+ return /*#__PURE__*/React.createElement(IUIAccordion, {
4395
+ expanded: defaultExpand === 'open',
4396
+ onChange: handleChange('open'),
4397
+ className: styles.additionalInfoContainer
4398
+ }, /*#__PURE__*/React.createElement(IUIAccordionSummary, {
4399
+ expandIcon: defaultExpand ? /*#__PURE__*/React.createElement(ExpandLessIcon, {
4400
+ width: "12px",
4401
+ height: "7px"
4402
+ }) : /*#__PURE__*/React.createElement(ExpandMoreIcon, {
4403
+ width: "12px",
4404
+ height: "7px"
4405
+ }),
4406
+ "aria-controls": "panel1bh-content",
4407
+ id: "panel1bh-header",
4408
+ className: clsx(styles.additionalInfoTitle, (_clsx = {}, _clsx[styles.expandIconAlign] = defaultExpand === 'open', _clsx))
4409
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4410
+ container: true,
4411
+ className: clsx(styles.product_info, styles.sectionWrapper)
4412
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4413
+ item: true,
4414
+ sm: 12,
4415
+ md: 4,
4416
+ className: styles.titleContainer
4417
+ }, /*#__PURE__*/React.createElement(IUILabel, {
4418
+ label: "Additional information",
4419
+ headerType: true,
4420
+ description: "Passport, Membership, Travel preferences..."
4421
+ })))), /*#__PURE__*/React.createElement(IUIAccordionDetails, {
4422
+ className: styles.detailsContainer
4423
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4424
+ container: true,
4425
+ className: clsx(styles.work_info, styles.sectionWrapper)
4426
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4427
+ item: true,
4428
+ sm: 12,
4429
+ md: 4
4430
+ }, /*#__PURE__*/React.createElement(IUILabel, {
4431
+ label: "Passport information",
4432
+ headerType: true
4433
+ })), /*#__PURE__*/React.createElement(IUIGrid, {
4434
+ item: true,
4435
+ sm: 12,
4436
+ md: 8,
4437
+ lg: 8,
4438
+ xl: 6
4439
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4440
+ container: true,
4441
+ className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4442
+ }, passportInfo.map(function (p, i) {
4443
+ var _clsx2;
4444
+ if (!p.visibility) {
4445
+ return null;
4446
+ }
4385
4447
  return /*#__PURE__*/React.createElement(IUIGrid, {
4386
- container: true,
4387
- className: clsx(styles.product_info, styles.sectionWrapper)
4388
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4389
4448
  item: true,
4390
4449
  sm: 12,
4391
- md: 4,
4392
- className: styles.titleContainer
4393
- }, /*#__PURE__*/React.createElement(IUILabel, {
4394
- label: "Additional information",
4395
- headerType: true,
4396
- description: "Passport, Membership, Travel preferences..."
4397
- })));
4398
- };
4399
- var getAccordianDetails = function getAccordianDetails() {
4400
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(IUIGrid, {
4401
- container: true,
4402
- className: clsx(styles.work_info, styles.sectionWrapper)
4450
+ md: 12,
4451
+ lg: p.type === 'datepicker' ? 2 : p.fullWidth ? 12 : 6,
4452
+ xl: p.type === 'datepicker' ? 2 : p.fullWidth ? 12 : 6,
4453
+ key: i,
4454
+ className: clsx(styles.margin, (_clsx2 = {}, _clsx2[styles.minGridWidth] = p.type === 'datepicker', _clsx2))
4455
+ }, /*#__PURE__*/React.createElement(GetInputType, {
4456
+ _p: p,
4457
+ inputState: passportInfoInput,
4458
+ onValueChange: onPassportInfoInputChange,
4459
+ dropdownList: dropdownList,
4460
+ errorArray: errorArray,
4461
+ errorMsg: errorMsgs[p.name],
4462
+ dateFormat: dateFormat
4463
+ }));
4464
+ })))), /*#__PURE__*/React.createElement(IUIDivider, {
4465
+ className: styles.dividerColor
4466
+ }), /*#__PURE__*/React.createElement(IUIGrid, {
4467
+ container: true,
4468
+ className: clsx(styles.personal_info, styles.sectionWrapper)
4469
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4470
+ item: true,
4471
+ sm: 12,
4472
+ md: 4
4473
+ }, /*#__PURE__*/React.createElement(IUILabel, {
4474
+ label: "Membership information",
4475
+ headerType: true,
4476
+ description: "You can add up to " + maxMembershipInput + " membership details"
4477
+ })), /*#__PURE__*/React.createElement(IUIGrid, {
4478
+ item: true,
4479
+ sm: 12,
4480
+ md: 8,
4481
+ lg: 8,
4482
+ xl: 6
4483
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4484
+ container: true,
4485
+ className: styles.formFieldsWrapper
4486
+ }, membershipInfoInput.length === 0 && /*#__PURE__*/React.createElement(IUIBox, {
4487
+ className: styles.emptyFieldContainer
4488
+ }, /*#__PURE__*/React.createElement(IUITypography, {
4489
+ className: styles.emptyFieldDescription
4490
+ }, "No membership details added yet"), /*#__PURE__*/React.createElement(IUIBox, {
4491
+ className: clsx(styles.emptyFieldBtnContainer, styles.rowGap),
4492
+ display: "flex"
4493
+ }, /*#__PURE__*/React.createElement(IUIButton, {
4494
+ buttonText: "Add airline",
4495
+ type: "text",
4496
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4497
+ width: "10",
4498
+ height: "10",
4499
+ color: "#EC5D25"
4500
+ }),
4501
+ className: styles.paddingTop,
4502
+ onClick: function onClick(e) {
4503
+ return addMemInfoInput('flight');
4504
+ }
4505
+ }), /*#__PURE__*/React.createElement(IUIButton, {
4506
+ buttonText: "Add hotel",
4507
+ type: "text",
4508
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4509
+ width: "10",
4510
+ height: "10",
4511
+ color: "#EC5D25"
4512
+ }),
4513
+ className: styles.paddingTop,
4514
+ onClick: function onClick(e) {
4515
+ return addMemInfoInput('hotel');
4516
+ }
4517
+ }), /*#__PURE__*/React.createElement(IUIButton, {
4518
+ buttonText: "Add car rental",
4519
+ type: "text",
4520
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4521
+ width: "10",
4522
+ height: "10",
4523
+ color: "#EC5D25"
4524
+ }),
4525
+ className: styles.paddingTop,
4526
+ onClick: function onClick(e) {
4527
+ return addMemInfoInput('rental_car');
4528
+ }
4529
+ }))), membershipInfoInput.length > 0 && membershipInfoInput.map(function (val, index) {
4530
+ if (index >= maxMembershipInput) {
4531
+ return null;
4532
+ }
4533
+ return /*#__PURE__*/React.createElement(React.Fragment, {
4534
+ key: index.toString()
4403
4535
  }, /*#__PURE__*/React.createElement(IUIGrid, {
4404
4536
  item: true,
4405
- sm: 12,
4406
- md: 4
4407
- }, /*#__PURE__*/React.createElement(IUILabel, {
4408
- label: "Passport information",
4409
- headerType: true
4410
- })), /*#__PURE__*/React.createElement(IUIGrid, {
4411
- item: true,
4412
- sm: 12,
4413
4537
  md: 8,
4414
- lg: 8,
4538
+ lg: 6,
4415
4539
  xl: 6
4416
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4417
- container: true,
4418
- className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4419
- }, passportInfo.map(function (p, i) {
4420
- var _clsx;
4421
- if (!p.visibility) {
4422
- return null;
4423
- }
4424
- return /*#__PURE__*/React.createElement(IUIGrid, {
4425
- item: true,
4426
- sm: 12,
4427
- md: 12,
4428
- lg: p.type === 'datepicker' ? 2 : p.fullWidth ? 12 : 6,
4429
- xl: p.type === 'datepicker' ? 2 : p.fullWidth ? 12 : 6,
4430
- key: i,
4431
- className: clsx(styles.margin, (_clsx = {}, _clsx[styles.minGridWidth] = p.type === 'datepicker', _clsx))
4432
- }, /*#__PURE__*/React.createElement(GetInputType, {
4433
- _p: p,
4434
- inputState: passportInfoInput,
4435
- onValueChange: onPassportInfoInputChange,
4436
- dropdownList: dropdownList,
4437
- errorArray: errorArray,
4438
- errorMsg: errorMsgs[p.name],
4439
- dateFormat: dateFormat
4440
- }));
4441
- })))), /*#__PURE__*/React.createElement(IUIDivider, {
4442
- className: styles.dividerColor
4443
- }), /*#__PURE__*/React.createElement(IUIGrid, {
4444
- container: true,
4445
- className: clsx(styles.personal_info, styles.sectionWrapper)
4446
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4447
- item: true,
4448
- sm: 12,
4449
- md: 4
4450
- }, /*#__PURE__*/React.createElement(IUILabel, {
4451
- label: "Membership information",
4452
- headerType: true,
4453
- description: "You can add up to " + maxMembershipInput + " membership details"
4540
+ }, /*#__PURE__*/React.createElement(MembershipField, {
4541
+ val: val,
4542
+ index: index,
4543
+ key: index.toString()
4454
4544
  })), /*#__PURE__*/React.createElement(IUIGrid, {
4455
4545
  item: true,
4456
- sm: 12,
4457
4546
  md: 8,
4458
- lg: 8,
4547
+ lg: 6,
4459
4548
  xl: 6
4460
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4461
- container: true,
4462
- className: styles.formFieldsWrapper
4463
- }, membershipInfoInput.length === 0 && /*#__PURE__*/React.createElement(IUIBox, {
4464
- className: styles.emptyFieldContainer
4465
- }, /*#__PURE__*/React.createElement(IUITypography, {
4466
- className: styles.emptyFieldDescription
4467
- }, "No membership details added yet"), /*#__PURE__*/React.createElement(IUIBox, {
4468
- className: clsx(styles.emptyFieldBtnContainer, styles.rowGap),
4469
- display: "flex"
4470
- }, /*#__PURE__*/React.createElement(IUIButton, {
4471
- buttonText: "Add airline",
4472
- type: "text",
4473
- startIcon: /*#__PURE__*/React.createElement(icons.Add, {
4474
- width: "10",
4475
- height: "10",
4476
- color: "#EC5D25"
4477
- }),
4478
- className: styles.paddingTop,
4479
- onClick: function onClick(e) {
4480
- return addMemInfoInput('flight');
4481
- }
4482
- }), /*#__PURE__*/React.createElement(IUIButton, {
4483
- buttonText: "Add hotel",
4484
- type: "text",
4485
- startIcon: /*#__PURE__*/React.createElement(icons.Add, {
4486
- width: "10",
4487
- height: "10",
4488
- color: "#EC5D25"
4489
- }),
4490
- className: styles.paddingTop,
4491
- onClick: function onClick(e) {
4492
- return addMemInfoInput('hotel');
4493
- }
4494
- }), /*#__PURE__*/React.createElement(IUIButton, {
4495
- buttonText: "Add car rental",
4496
- type: "text",
4497
- startIcon: /*#__PURE__*/React.createElement(icons.Add, {
4498
- width: "10",
4499
- height: "10",
4500
- color: "#EC5D25"
4501
- }),
4502
- className: styles.paddingTop,
4503
- onClick: function onClick(e) {
4504
- return addMemInfoInput('rental_car');
4505
- }
4506
- }))), membershipInfoInput.length > 0 && membershipInfoInput.map(function (val, index) {
4507
- if (index >= maxMembershipInput) {
4508
- return null;
4509
- }
4510
- return /*#__PURE__*/React.createElement(React.Fragment, {
4511
- key: index.toString()
4512
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4513
- item: true,
4514
- md: 8,
4515
- lg: 6,
4516
- xl: 6
4517
- }, /*#__PURE__*/React.createElement(MembershipField, {
4518
- val: val,
4519
- index: index,
4520
- key: index.toString()
4521
- })), /*#__PURE__*/React.createElement(IUIGrid, {
4522
- item: true,
4523
- md: 8,
4524
- lg: 6,
4525
- xl: 6
4526
- }, /*#__PURE__*/React.createElement(IUIBox, {
4527
- component: "div",
4528
- display: "flex"
4529
- }, /*#__PURE__*/React.createElement(IUIInput, {
4530
- label: "Membership number",
4531
- placeholder: "Enter membership number",
4532
- fullwidth: false,
4533
- defaultValue: val.number,
4534
- onValueChange: function onValueChange(_ref6) {
4535
- var _value = _ref6._value;
4536
- return onMemInfoInputChange(index, 'number', _value);
4537
- }
4538
- }), /*#__PURE__*/React.createElement(IUIIconButton, {
4539
- style: {
4540
- marginTop: '30px'
4541
- },
4542
- disableRipple: true,
4543
- onClick: function onClick() {
4544
- return handleRemoveMemFields(index);
4545
- },
4546
- className: styles.backGrdColorOnHover
4547
- }, /*#__PURE__*/React.createElement(Cross, {
4548
- width: "14",
4549
- height: "14"
4550
- })))));
4551
- }), membershipInfoInput.length < maxMembershipInput && membershipInfoInput.length > 0 && /*#__PURE__*/React.createElement(IUIGrid, {
4552
- item: true,
4553
- md: 8,
4554
- lg: 8,
4555
- xl: 8
4556
4549
  }, /*#__PURE__*/React.createElement(IUIBox, {
4557
- className: clsx(styles.emptyFieldBtnContainer, styles.rowGap),
4550
+ component: "div",
4558
4551
  display: "flex"
4559
- }, /*#__PURE__*/React.createElement(IUIButton, {
4560
- buttonText: "Add airline",
4561
- type: "text",
4562
- startIcon: /*#__PURE__*/React.createElement(Add, {
4563
- width: "10",
4564
- height: "10",
4565
- color: "#EC5D25"
4566
- }),
4567
- className: styles.paddingTop,
4568
- onClick: function onClick(e) {
4569
- return addMemInfoInput('flight');
4570
- }
4571
- }), /*#__PURE__*/React.createElement(IUIButton, {
4572
- buttonText: "Add hotel",
4573
- type: "text",
4574
- startIcon: /*#__PURE__*/React.createElement(Add, {
4575
- width: "10",
4576
- height: "10",
4577
- color: "#EC5D25"
4578
- }),
4579
- className: styles.paddingTop,
4580
- onClick: function onClick(e) {
4581
- return addMemInfoInput('hotel');
4582
- }
4583
- }), /*#__PURE__*/React.createElement(IUIButton, {
4584
- buttonText: "Add car rental",
4585
- type: "text",
4586
- startIcon: /*#__PURE__*/React.createElement(icons.Add, {
4587
- width: "10",
4588
- height: "10",
4589
- color: "#EC5D25"
4590
- }),
4591
- className: styles.paddingTop,
4592
- onClick: function onClick(e) {
4593
- return addMemInfoInput('rental_car');
4594
- }
4595
- })))))), /*#__PURE__*/React.createElement(IUIDivider, {
4596
- className: styles.dividerColor
4597
- }), /*#__PURE__*/React.createElement(IUIGrid, {
4598
- container: true,
4599
- className: clsx(styles.personal_info, styles.sectionWrapper)
4600
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4601
- item: true,
4602
- sm: 12,
4603
- md: 4
4604
- }, /*#__PURE__*/React.createElement(IUILabel, {
4605
- label: "Travel preferences",
4606
- headerType: true
4607
- })), /*#__PURE__*/React.createElement(IUIGrid, {
4608
- item: true,
4609
- sm: 12,
4610
- md: 8,
4611
- lg: 8,
4612
- xl: 6
4613
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4614
- container: true,
4615
- className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4616
- }, travelPreference.map(function (p, i) {
4617
- if (!p.visibility) {
4618
- return null;
4552
+ }, /*#__PURE__*/React.createElement(IUIInput, {
4553
+ label: "Membership number",
4554
+ placeholder: "Enter membership number",
4555
+ fullwidth: false,
4556
+ defaultValue: val.number,
4557
+ onValueChange: function onValueChange(_ref6) {
4558
+ var _value = _ref6._value;
4559
+ return onMemInfoInputChange(index, 'number', _value);
4619
4560
  }
4620
- return /*#__PURE__*/React.createElement(IUIGrid, {
4621
- item: true,
4622
- sm: 12,
4623
- md: 12,
4624
- lg: p.fullWidth ? 12 : 6,
4625
- xl: p.fullWidth ? 12 : 6,
4626
- key: i,
4627
- className: clsx(styles.margin)
4628
- }, /*#__PURE__*/React.createElement(GetInputType, {
4629
- _p: p,
4630
- inputState: travelPreferenceInfo,
4631
- onValueChange: travelPreferenceOnChange,
4632
- dropdownList: dropdownList,
4633
- errorArray: errorArray,
4634
- errorMsg: errorMsgs[p.name]
4635
- }));
4636
- })))), /*#__PURE__*/React.createElement(IUIDivider, {
4637
- className: styles.dividerColor
4638
- }), /*#__PURE__*/React.createElement(IUIGrid, {
4639
- container: true,
4640
- className: clsx(styles.personal_info, styles.sectionWrapper)
4641
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4561
+ }), /*#__PURE__*/React.createElement(IUIIconButton, {
4562
+ style: {
4563
+ marginTop: '30px'
4564
+ },
4565
+ disableRipple: true,
4566
+ onClick: function onClick() {
4567
+ return handleRemoveMemFields(index);
4568
+ },
4569
+ className: styles.backGrdColorOnHover
4570
+ }, /*#__PURE__*/React.createElement(CrossIcon, {
4571
+ width: "14",
4572
+ height: "14"
4573
+ })))));
4574
+ }), membershipInfoInput.length < maxMembershipInput && membershipInfoInput.length > 0 && /*#__PURE__*/React.createElement(IUIGrid, {
4575
+ item: true,
4576
+ md: 8,
4577
+ lg: 8,
4578
+ xl: 8
4579
+ }, /*#__PURE__*/React.createElement(IUIBox, {
4580
+ className: clsx(styles.emptyFieldBtnContainer, styles.rowGap),
4581
+ display: "flex"
4582
+ }, /*#__PURE__*/React.createElement(IUIButton, {
4583
+ buttonText: "Add airline",
4584
+ type: "text",
4585
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4586
+ width: "10",
4587
+ height: "10",
4588
+ color: "#EC5D25"
4589
+ }),
4590
+ className: styles.paddingTop,
4591
+ onClick: function onClick(e) {
4592
+ return addMemInfoInput('flight');
4593
+ }
4594
+ }), /*#__PURE__*/React.createElement(IUIButton, {
4595
+ buttonText: "Add hotel",
4596
+ type: "text",
4597
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4598
+ width: "10",
4599
+ height: "10",
4600
+ color: "#EC5D25"
4601
+ }),
4602
+ className: styles.paddingTop,
4603
+ onClick: function onClick(e) {
4604
+ return addMemInfoInput('hotel');
4605
+ }
4606
+ }), /*#__PURE__*/React.createElement(IUIButton, {
4607
+ buttonText: "Add car rental",
4608
+ type: "text",
4609
+ startIcon: /*#__PURE__*/React.createElement(AddIcon, {
4610
+ width: "10",
4611
+ height: "10",
4612
+ color: "#EC5D25"
4613
+ }),
4614
+ className: styles.paddingTop,
4615
+ onClick: function onClick(e) {
4616
+ return addMemInfoInput('rental_car');
4617
+ }
4618
+ })))))), /*#__PURE__*/React.createElement(IUIDivider, {
4619
+ className: styles.dividerColor
4620
+ }), /*#__PURE__*/React.createElement(IUIGrid, {
4621
+ container: true,
4622
+ className: clsx(styles.personal_info, styles.sectionWrapper)
4623
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4624
+ item: true,
4625
+ sm: 12,
4626
+ md: 4
4627
+ }, /*#__PURE__*/React.createElement(IUILabel, {
4628
+ label: "Travel preferences",
4629
+ headerType: true
4630
+ })), /*#__PURE__*/React.createElement(IUIGrid, {
4631
+ item: true,
4632
+ sm: 12,
4633
+ md: 8,
4634
+ lg: 8,
4635
+ xl: 6
4636
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4637
+ container: true,
4638
+ className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4639
+ }, travelPreference.map(function (p, i) {
4640
+ if (!p.visibility) {
4641
+ return null;
4642
+ }
4643
+ return /*#__PURE__*/React.createElement(IUIGrid, {
4642
4644
  item: true,
4643
4645
  sm: 12,
4644
- md: 4
4645
- }, /*#__PURE__*/React.createElement(IUILabel, {
4646
- label: "Secure traveler information",
4647
- headerType: true
4648
- })), /*#__PURE__*/React.createElement(IUIGrid, {
4646
+ md: 12,
4647
+ lg: p.fullWidth ? 12 : 6,
4648
+ xl: p.fullWidth ? 12 : 6,
4649
+ key: i,
4650
+ className: clsx(styles.margin)
4651
+ }, /*#__PURE__*/React.createElement(GetInputType, {
4652
+ _p: p,
4653
+ inputState: travelPreferenceInfo,
4654
+ onValueChange: travelPreferenceOnChange,
4655
+ dropdownList: dropdownList,
4656
+ errorArray: errorArray,
4657
+ errorMsg: errorMsgs[p.name]
4658
+ }));
4659
+ })))), /*#__PURE__*/React.createElement(IUIDivider, {
4660
+ className: styles.dividerColor
4661
+ }), /*#__PURE__*/React.createElement(IUIGrid, {
4662
+ container: true,
4663
+ className: clsx(styles.personal_info, styles.sectionWrapper)
4664
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4665
+ item: true,
4666
+ sm: 12,
4667
+ md: 4
4668
+ }, /*#__PURE__*/React.createElement(IUILabel, {
4669
+ label: "Secure traveler information",
4670
+ headerType: true
4671
+ })), /*#__PURE__*/React.createElement(IUIGrid, {
4672
+ item: true,
4673
+ sm: 12,
4674
+ md: 8,
4675
+ lg: 8,
4676
+ xl: 6
4677
+ }, /*#__PURE__*/React.createElement(IUIGrid, {
4678
+ container: true,
4679
+ className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4680
+ }, secureTravelInfo.map(function (p, i) {
4681
+ if (!p.visibility) {
4682
+ return null;
4683
+ }
4684
+ return /*#__PURE__*/React.createElement(IUIGrid, {
4649
4685
  item: true,
4650
4686
  sm: 12,
4651
- md: 8,
4652
- lg: 8,
4653
- xl: 6
4654
- }, /*#__PURE__*/React.createElement(IUIGrid, {
4655
- container: true,
4656
- className: clsx(styles.formFieldsWrapper, styles.firstRowMargin)
4657
- }, secureTravelInfo.map(function (p, i) {
4658
- if (!p.visibility) {
4659
- return null;
4660
- }
4661
- return /*#__PURE__*/React.createElement(IUIGrid, {
4662
- item: true,
4663
- sm: 12,
4664
- md: 12,
4665
- lg: p.fullWidth ? 12 : 6,
4666
- xl: p.fullWidth ? 12 : 6,
4667
- key: i,
4668
- className: clsx(styles.margin)
4669
- }, /*#__PURE__*/React.createElement(GetInputType, {
4670
- _p: p,
4671
- inputState: secureTravelInputInfo,
4672
- onValueChange: onSecureTraveelerInfoInputChange,
4673
- errorArray: errorArray,
4674
- errorMsg: errorMsgs[p.name]
4675
- }));
4676
- })))));
4677
- };
4678
- return /*#__PURE__*/React.createElement(IUIAccordionMain, {
4679
- expanded: defaultExpand === 'open',
4680
- onChange: handleChange('open'),
4681
- accordionClass: styles.additionalInfoContainer,
4682
- summaryComponent: getAccordianSummary(),
4683
- summaryClass: clsx(styles.additionalInfoTitle, (_clsx2 = {}, _clsx2[styles.expandIconAlign] = defaultExpand === 'open', _clsx2)),
4684
- expandIcon: defaultExpand ? /*#__PURE__*/React.createElement(ExpandLess, {
4685
- width: "12px",
4686
- height: "7px"
4687
- }) : /*#__PURE__*/React.createElement(ExpandMore, {
4688
- width: "12px",
4689
- height: "7px"
4690
- }),
4691
- detailsComponent: getAccordianDetails(),
4692
- detailsClass: styles.detailsContainer
4693
- });
4687
+ md: 12,
4688
+ lg: p.fullWidth ? 12 : 6,
4689
+ xl: p.fullWidth ? 12 : 6,
4690
+ key: i,
4691
+ className: clsx(styles.margin)
4692
+ }, /*#__PURE__*/React.createElement(GetInputType, {
4693
+ _p: p,
4694
+ inputState: secureTravelInputInfo,
4695
+ onValueChange: onSecureTraveelerInfoInputChange,
4696
+ errorArray: errorArray,
4697
+ errorMsg: errorMsgs[p.name]
4698
+ }));
4699
+ }))))));
4694
4700
  };
4695
4701
 
4696
4702
  var styles$3 = {"root":"_b_muK","minWidth":"_3OQXs","bullet":"_1Q5vL","pos":"_6wGWA","cardHeader":"_SWCfJ","pageHeader":"_2ZeWp","buttonHover":"_2Iuy1","cardHeaderBackground":"_3NJWF","actionCustom":"_3Kbfm"};
@@ -6774,7 +6780,7 @@ var fetchBulkactionHistory = function fetchBulkactionHistory(url) {
6774
6780
  };
6775
6781
  };
6776
6782
 
6777
- var styles$5 = {"UUIUserManagementList":"_3WNHx","scrollOverlayMenu":"_2_WEg","overlaysearch":"_1Pbhb","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","avatarClassName":"_2qO_X","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","user_list_page_tabs":"_xWE7K","TabLabelCount":"_13pXn","deactivateAlert":"_3hvWz","departmentHeadText":"_3pOsV","deactivateBtn":"_2v6e4"};
6783
+ var styles$5 = {"UUIUserManagementList":"_3WNHx","scrollOverlayMenu":"_2_WEg","overlaysearch":"_1Pbhb","pageHeader":"_1WLpc","buttonWrapper":"_2egTG","headingWrapper":"_1He01","headingSignUpWrapper":"_Q8vqd","heading":"_1uPaO","headingLarge":"_2FsLd","headingMedium":"_nGXA9","headingSmall":"_2rpwF","description":"_25vb9","headerText":"_1Ny9J","letterImage":"_2hr3R","tablewrapper":"_1-RPw","rowText":"_1LXyO","textTransform":"_3kFQS","lightColor":"_3Ghgw","avatarClassName":"_2qO_X","tooltipText":"_151u_","tooltip":"_-LQNH","importModalBodyContainer":"_25xUk","dividerColor":"_2HZv9","w100":"_3vGmU","downloadTemplateContainer":"_3-Xu_","downloadTemplateDescContainer":"_tLw43","labelContainer":"_7TYUZ","downlTempHeader":"__CZpe","downlTempDescription":"_19jEe","downloadTemplateButton":"_1qXtq","fileUploaderContainer":"_1YVz2","colGap":"_3vnY5","deActivateModalContainer":"_28H9H","backdrop":"_1ky1x","errorText":"_26_if","deactivateAlert":"_3hvWz","departmentHeadText":"_3pOsV","deactivateBtn":"_2v6e4","user_list_page_tabs":"_xWE7K","TabLabelCount":"_13pXn"};
6778
6784
 
6779
6785
  var BulkUploadModal = function BulkUploadModal(props) {
6780
6786
  var isOpenImportUsersModal = props.isOpenImportUsersModal,
@@ -8035,19 +8041,6 @@ var BulkDownloadIcon = function BulkDownloadIcon(props) {
8035
8041
 
8036
8042
  var classes = {"containedBtn":"_2A4_u","customMiniBox":"_QGIKG","muiBtn":"_3iFbO","outlinedBtn":"_3lQYD","menuList":"_1C8bJ","menuListContainer":"_1N83W","menuItemContainer":"_3VtcE","menuItemtext":"_2xqnU","subTxt":"_3CVzX"};
8037
8043
 
8038
- var ExpandMoreIcon = function ExpandMoreIcon(props) {
8039
- return /*#__PURE__*/React.createElement("svg", {
8040
- xmlns: "http://www.w3.org/2000/svg",
8041
- width: props.width,
8042
- height: props.height,
8043
- fill: "none",
8044
- viewBox: "0 0 12 7"
8045
- }, /*#__PURE__*/React.createElement("path", {
8046
- fill: "#6B7280",
8047
- 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"
8048
- }));
8049
- };
8050
-
8051
8044
  var DropdownBtn = function DropdownBtn(props) {
8052
8045
  var _clsx;
8053
8046
  var _props$buttonText = props.buttonText,
@@ -8682,12 +8675,18 @@ var UserList = function UserList(_ref2) {
8682
8675
  var _useState10 = useState(false),
8683
8676
  isApiFetching = _useState10[0],
8684
8677
  setisApiFetching = _useState10[1];
8685
- var _useState11 = useState(false),
8686
- showInviteModal = _useState11[0],
8687
- setToggleInviteModal = _useState11[1];
8688
- var _useState12 = useState(''),
8689
- userIds = _useState12[0],
8690
- setUserIds = _useState12[1];
8678
+ var _useState11 = useState({
8679
+ value: '',
8680
+ label: 'Select approver'
8681
+ }),
8682
+ travelFYI = _useState11[0],
8683
+ setTravelFYI = _useState11[1];
8684
+ var _useState12 = useState(false),
8685
+ showInviteModal = _useState12[0],
8686
+ setToggleInviteModal = _useState12[1];
8687
+ var _useState13 = useState(''),
8688
+ userIds = _useState13[0],
8689
+ setUserIds = _useState13[1];
8691
8690
  var _React$useState6 = React.useState(false),
8692
8691
  overlayMenu = _React$useState6[0],
8693
8692
  setOverlayMenu = _React$useState6[1];
@@ -8714,40 +8713,34 @@ var UserList = function UserList(_ref2) {
8714
8713
  var _React$useState7 = React.useState(1),
8715
8714
  signup_page = _React$useState7[0],
8716
8715
  setSignUpPage = _React$useState7[1];
8717
- var _useState13 = useState(5),
8718
- signup_rowsPerPage = _useState13[0],
8719
- setSignUpRowsPerPage = _useState13[1];
8716
+ var _useState14 = useState(5),
8717
+ signup_rowsPerPage = _useState14[0],
8718
+ setSignUpRowsPerPage = _useState14[1];
8720
8719
  var _React$useState8 = React.useState('asc'),
8721
8720
  signup_order = _React$useState8[0],
8722
8721
  setSignUpOrder = _React$useState8[1];
8723
8722
  var _React$useState9 = React.useState('fname'),
8724
8723
  signup_orderBy = _React$useState9[0],
8725
8724
  setSignUpOrderBy = _React$useState9[1];
8726
- var _useState14 = useState(''),
8727
- signup_searchValue = _useState14[0],
8728
- set_signup_SearchValue = _useState14[1];
8729
- var _useState15 = useState(false),
8730
- isSignUpSortingChange = _useState15[0],
8731
- setSignUpSortingChange = _useState15[1];
8725
+ var _useState15 = useState(''),
8726
+ signup_searchValue = _useState15[0],
8727
+ set_signup_SearchValue = _useState15[1];
8732
8728
  var _useState16 = useState(false),
8733
- isSignUpSearchingChange = _useState16[0],
8734
- setSignUpSearchingChange = _useState16[1];
8729
+ isSignUpSortingChange = _useState16[0],
8730
+ setSignUpSortingChange = _useState16[1];
8735
8731
  var _useState17 = useState(false),
8736
- isSignUpSortingChangeTemp = _useState17[0],
8737
- setSignUpSortingChangeTemp = _useState17[1];
8732
+ isSignUpSearchingChange = _useState17[0],
8733
+ setSignUpSearchingChange = _useState17[1];
8738
8734
  var _useState18 = useState(false),
8739
- isSignUpSearchingChangeTemp = _useState18[0],
8740
- setSignUpSearchingChangeTemp = _useState18[1];
8735
+ isSignUpSortingChangeTemp = _useState18[0],
8736
+ setSignUpSortingChangeTemp = _useState18[1];
8737
+ var _useState19 = useState(false),
8738
+ isSignUpSearchingChangeTemp = _useState19[0],
8739
+ setSignUpSearchingChangeTemp = _useState19[1];
8741
8740
  var _useSelector3 = useSelector(function (state) {
8742
8741
  return state.userList;
8743
8742
  }),
8744
8743
  signupRequestListInfo = _useSelector3.signupRequestListInfo;
8745
- var _useState19 = useState({
8746
- value: '',
8747
- label: 'Select approver'
8748
- }),
8749
- travelFYI = _useState19[0],
8750
- setTravelFYI = _useState19[1];
8751
8744
  var openDeactivateModal = function openDeactivateModal() {
8752
8745
  if (Object.values(selected).flat().length === 0 || Object.values(selected).flat() === undefined) {
8753
8746
  IUIToastMessageService$7.warningNotify('Select at least one user to deactivate.');
@@ -8864,17 +8857,7 @@ var UserList = function UserList(_ref2) {
8864
8857
  setSortingChangeTemp(!isSortingChangeTemp);
8865
8858
  };
8866
8859
  var handleActiveUser = function handleActiveUser(e, id, page) {
8867
- var isActive = e.target.checked;
8868
- dispatch(updateActiveStatus(e.target.checked ? 1 : 0, e.target.id)).then(function () {
8869
- if (!isActive) {
8870
- if (Object.values(selected).flat().includes(id.toString())) {
8871
- var _extends5;
8872
- var selectedTemp = _extends({}, selected);
8873
- selectedTemp[page].splice(selectedTemp[page].indexOf(id.toString()), 1);
8874
- setSelected(_extends({}, selected, (_extends5 = {}, _extends5[page] = selectedTemp[page], _extends5)));
8875
- }
8876
- }
8877
- });
8860
+ setDeactivateSingle(true);
8878
8861
  };
8879
8862
  var handleDeactivateUsers = function handleDeactivateUsers() {
8880
8863
  dispatch(deActivateUsers(Object.values(selected).flat()));