@djb25/digit-ui-module-vendor 1.0.40 → 1.0.42

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,6 +1,6 @@
1
1
  import React, { useState, useEffect, useMemo, useCallback } from 'react';
2
2
  import { useLocation, Switch, useHistory, useParams, Link, useRouteMatch, Redirect, Route } from 'react-router-dom';
3
- import { AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormStep, LabelFieldPair, CardLabel, CustomTooltip, TextInput, MobileNumber, Dropdown as Dropdown$3, UploadFile, Toast, Loader, Card, ActionBar, SubmitBar, RadioOrSelect, Header, SearchForm, SearchField, CardLabelError, DatePicker as DatePicker$5, Table, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ApplyFilterBar, AddIcon, Menu, LinkLabel, ViewsIcon, ToggleSwitch, Modal, MdClose, MultiSelectDropdown, CitizenHomeCard, CardSectionHeader, Row, EditIcon, DeleteIcon, CardText, FormComposer, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon } from '@djb25/digit-ui-react-components';
3
+ import { AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, VerticalTimeline, FormStep, LabelFieldPair, CardLabel, CustomTooltip, TextInput, MobileNumber, Dropdown as Dropdown$2, UploadFile, Toast, Loader, Card, ActionBar, SubmitBar, RadioOrSelect, Header, SearchForm, SearchField, CardLabelError, DatePicker as DatePicker$4, Table, ShippingTruck, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ApplyFilterBar, AddIcon, Menu, LinkLabel, ViewsIcon, ToggleSwitch, Modal, MdClose, MultiSelectDropdown, CitizenHomeCard, CardSectionHeader, Row, EditIcon, DeleteIcon, CardText, FormComposer, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon } from '@djb25/digit-ui-react-components';
4
4
  import { useTranslation } from 'react-i18next';
5
5
  import { useForm, Controller } from 'react-hook-form';
6
6
  import { useQueryClient } from 'react-query';
@@ -697,7 +697,7 @@ const VendorDetails = ({
697
697
  rules: {
698
698
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
699
699
  },
700
- render: props => /*#__PURE__*/React.createElement(Dropdown$3, {
700
+ render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
701
701
  selected: VendorType,
702
702
  select: setVendorType,
703
703
  option: [{
@@ -737,7 +737,7 @@ const VendorDetails = ({
737
737
  rules: {
738
738
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
739
739
  },
740
- render: props => /*#__PURE__*/React.createElement(Dropdown$3, {
740
+ render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
741
741
  selected: VendorCategory,
742
742
  select: setVendorCategory,
743
743
  option: [{
@@ -777,7 +777,7 @@ const VendorDetails = ({
777
777
  rules: {
778
778
  required: t("CORE_COMMON_REQUIRED_ERRMSG")
779
779
  },
780
- render: props => /*#__PURE__*/React.createElement(Dropdown$3, {
780
+ render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
781
781
  selected: Status,
782
782
  select: setStatus,
783
783
  option: [{
@@ -1134,7 +1134,7 @@ const VendorSelectAddress = ({
1134
1134
  });
1135
1135
  }
1136
1136
  if (userType === "employee") {
1137
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$3, {
1137
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("MYCITY_CODE_LABEL"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
1138
1138
  className: "",
1139
1139
  isMandatory: true,
1140
1140
  selected: (cities === null || cities === void 0 ? void 0 : cities.length) === 1 ? cities[0] : selectedCity,
@@ -1143,7 +1143,7 @@ const VendorSelectAddress = ({
1143
1143
  select: selectCity,
1144
1144
  optionKey: "code",
1145
1145
  t: t
1146
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$3, {
1146
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_NEW_APPLICATION_LOCATION_MOHALLA"), config.isMandatory ? " * " : null), /*#__PURE__*/React.createElement(Dropdown$2, {
1147
1147
  className: "",
1148
1148
  isMandatory: true,
1149
1149
  selected: selectedLocality,
@@ -1302,7 +1302,7 @@ const VendorSearchApplication = ({
1302
1302
  name: "vendorName",
1303
1303
  render: field => {
1304
1304
  var _vendorData$vendor2;
1305
- return /*#__PURE__*/React.createElement(Dropdown$3, {
1305
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
1306
1306
  selected: field.value || "",
1307
1307
  select: field.onChange,
1308
1308
  onBlur: field.onBlur,
@@ -1336,7 +1336,7 @@ const VendorSearchApplication = ({
1336
1336
  className: "employee-card-input employee-card-input--front"
1337
1337
  }, "+91")
1338
1338
  }), /*#__PURE__*/React.createElement(CardLabelError, null, formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : (_formState$errors$mob = _formState$errors["mobileNumber"]) === null || _formState$errors$mob === void 0 ? void 0 : _formState$errors$mob.message)), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("VENDOR_FROM_DATE")), /*#__PURE__*/React.createElement(Controller, {
1339
- render: props => /*#__PURE__*/React.createElement(DatePicker$5, {
1339
+ render: props => /*#__PURE__*/React.createElement(DatePicker$4, {
1340
1340
  date: props.value,
1341
1341
  disabled: false,
1342
1342
  onChange: props.onChange
@@ -1344,7 +1344,7 @@ const VendorSearchApplication = ({
1344
1344
  name: "fromDate",
1345
1345
  control: control
1346
1346
  })), /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement("label", null, t("VENDOR_TO_DATE")), /*#__PURE__*/React.createElement(Controller, {
1347
- render: props => /*#__PURE__*/React.createElement(DatePicker$5, {
1347
+ render: props => /*#__PURE__*/React.createElement(DatePicker$4, {
1348
1348
  date: props.value,
1349
1349
  disabled: false,
1350
1350
  onChange: props.onChange
@@ -1567,7 +1567,7 @@ const ApplicationTable = ({
1567
1567
  csvExportButtonLabel,
1568
1568
  ...rest
1569
1569
  }) => {
1570
- return /*#__PURE__*/React.createElement(Table, Object.assign({
1570
+ return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Table, Object.assign({
1571
1571
  className: _className,
1572
1572
  t: t,
1573
1573
  data: data,
@@ -1589,7 +1589,7 @@ const ApplicationTable = ({
1589
1589
  getCSVExportData: getCSVExportData,
1590
1590
  csvExportColumns: csvExportColumns,
1591
1591
  csvExportButtonLabel: csvExportButtonLabel
1592
- }, rest));
1592
+ }, rest)));
1593
1593
  };
1594
1594
 
1595
1595
  const StatusCount = ({
@@ -1845,7 +1845,7 @@ const DropdownStatus = ({
1845
1845
  applicationStatuses,
1846
1846
  areApplicationStatus
1847
1847
  }) => {
1848
- return areApplicationStatus ? /*#__PURE__*/React.createElement(Dropdown$3, {
1848
+ return areApplicationStatus ? /*#__PURE__*/React.createElement(Dropdown$2, {
1849
1849
  option: applicationStatuses,
1850
1850
  optionKey: "name",
1851
1851
  selected: value,
@@ -1942,7 +1942,7 @@ const RegisteredVendorSearch = ({
1942
1942
  switch (input.type) {
1943
1943
  case "date":
1944
1944
  return /*#__PURE__*/React.createElement(Controller, {
1945
- render: props => /*#__PURE__*/React.createElement(DatePicker$5, {
1945
+ render: props => /*#__PURE__*/React.createElement(DatePicker$4, {
1946
1946
  date: props.value,
1947
1947
  onChange: props.onChange
1948
1948
  }),
@@ -1962,7 +1962,7 @@ const RegisteredVendorSearch = ({
1962
1962
  });
1963
1963
  case "dropdown":
1964
1964
  return /*#__PURE__*/React.createElement(Controller, {
1965
- render: props => /*#__PURE__*/React.createElement(Dropdown$3, {
1965
+ render: props => /*#__PURE__*/React.createElement(Dropdown$2, {
1966
1966
  option: input.options,
1967
1967
  optionKey: input.optionsKey,
1968
1968
  value: props.value,
@@ -1991,10 +1991,7 @@ const RegisteredVendorSearch = ({
1991
1991
  const userType = userInfo.info.type;
1992
1992
  const vendorItems = [...(matchedRoles !== null && matchedRoles !== void 0 && (_matchedRoles$wt = matchedRoles.wt) !== null && _matchedRoles$wt !== void 0 && _matchedRoles$wt.includes("WT_VENDOR") ? ["VENDOR"] : []), ...(matchedRoles !== null && matchedRoles !== void 0 && (_matchedRoles$wt2 = matchedRoles.wt) !== null && _matchedRoles$wt2 !== void 0 && _matchedRoles$wt2.includes("WT_VENDOR") ? ["DRIVER", "VEHICLE"] : []), ...(matchedRoles !== null && matchedRoles !== void 0 && (_matchedRoles$ekyc = matchedRoles.ekyc) !== null && _matchedRoles$ekyc !== void 0 && _matchedRoles$ekyc.includes("EKYC_VENDOR") ? ["SUPERVISOR"] : []), ...(matchedRoles !== null && matchedRoles !== void 0 && (_matchedRoles$ekyc2 = matchedRoles.ekyc) !== null && _matchedRoles$ekyc2 !== void 0 && _matchedRoles$ekyc2.includes("EKYC_SUPERVISOR") || matchedRoles !== null && matchedRoles !== void 0 && (_matchedRoles$ekyc3 = matchedRoles.ekyc) !== null && _matchedRoles$ekyc3 !== void 0 && _matchedRoles$ekyc3.includes("EKYC_VENDOR") ? ["SURVEYOR"] : [])];
1993
1993
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1994
- className: "search-container",
1995
- style: {
1996
- width: "auto"
1997
- }
1994
+ className: "search-container"
1998
1995
  }, /*#__PURE__*/React.createElement("div", {
1999
1996
  className: "search-complaint-container"
2000
1997
  }, (type === "mobile" || mobileView) && /*#__PURE__*/React.createElement("div", {
@@ -2844,7 +2841,7 @@ const VendorInbox = props => {
2844
2841
  Cell: ({
2845
2842
  row
2846
2843
  }) => {
2847
- return /*#__PURE__*/React.createElement(Dropdown$3, {
2844
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
2848
2845
  className: "fsm-registry-dropdown",
2849
2846
  selected: getSelectedVendorOption(row.original, vendors),
2850
2847
  option: vendors,
@@ -2899,7 +2896,7 @@ const VendorInbox = props => {
2899
2896
  }) => {
2900
2897
  const selectedVendor = getSelectedVendorOption(row.original, vendors);
2901
2898
  const vendorFillingPoints = getVendorFillingPoints(selectedVendor);
2902
- return /*#__PURE__*/React.createElement(Dropdown$3, {
2899
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
2903
2900
  className: "fsm-registry-dropdown",
2904
2901
  selected: getSelectedFillingPointOption(row.original, vendorFillingPoints),
2905
2902
  option: vendorFillingPoints,
@@ -2928,7 +2925,7 @@ const VendorInbox = props => {
2928
2925
  const selectedVendor = getSelectedVendorOption(row.original, vendors);
2929
2926
  const selectedFillingPoint = getSelectedFillingPointOption(row.original, getVendorFillingPoints(selectedVendor));
2930
2927
  const availableDrivers = getVendorDriversForFillingPoint(selectedVendor, selectedFillingPoint);
2931
- return /*#__PURE__*/React.createElement(Dropdown$3, {
2928
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
2932
2929
  className: "fsm-registry-dropdown",
2933
2930
  selected: getSelectedDriverOption(row.original, availableDrivers),
2934
2931
  option: availableDrivers,
@@ -3021,7 +3018,7 @@ const VendorInbox = props => {
3021
3018
  Cell: ({
3022
3019
  row
3023
3020
  }) => {
3024
- return /*#__PURE__*/React.createElement(Dropdown$3, {
3021
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
3025
3022
  className: "fsm-registry-dropdown",
3026
3023
  selected: (vendors === null || vendors === void 0 ? void 0 : vendors.find(vendor => {
3027
3024
  var _row$original$vendorD, _row$original$vendor;
@@ -3131,7 +3128,7 @@ const VendorInbox = props => {
3131
3128
  Cell: ({
3132
3129
  row
3133
3130
  }) => {
3134
- return /*#__PURE__*/React.createElement(Dropdown$3, {
3131
+ return /*#__PURE__*/React.createElement(Dropdown$2, {
3135
3132
  className: "fsm-registry-dropdown",
3136
3133
  selected: (vendors === null || vendors === void 0 ? void 0 : vendors.find(vendor => {
3137
3134
  var _row$original$vendorD2, _row$original$vendor2;
@@ -3454,7 +3451,10 @@ const VendorInbox = props => {
3454
3451
  style: {
3455
3452
  flex: 1,
3456
3453
  width: "100%",
3457
- marginLeft: props.userRole === "FSM_ADMIN" ? "" : "24px"
3454
+ marginLeft: props.userRole === "FSM_ADMIN" ? "" : "24px",
3455
+ display: "flex",
3456
+ flexDirection: "column",
3457
+ gap: "12px"
3458
3458
  }
3459
3459
  }, /*#__PURE__*/React.createElement(RegisteredVendorSearch, {
3460
3460
  onSearch: props.onSearch,
@@ -3908,7 +3908,7 @@ const SelectServiceType = ({
3908
3908
  return /*#__PURE__*/React.createElement(Loader, null);
3909
3909
  }
3910
3910
  if (userType === "employee") {
3911
- return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$3, {
3911
+ return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement(Dropdown$2, {
3912
3912
  className: "payment-form-text-input-correction",
3913
3913
  isMandatory: config.isMandatory,
3914
3914
  selected: serviceTypes,
@@ -4012,14 +4012,14 @@ const SelectVehicleType = ({
4012
4012
  if (!vehicleData || !serviceTypeData) {
4013
4013
  return /*#__PURE__*/React.createElement("div", null, t("ERROR_FETCHING_DATA"));
4014
4014
  }
4015
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$3, {
4015
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_MODEL")), /*#__PURE__*/React.createElement(Dropdown$2, {
4016
4016
  className: "form-field",
4017
4017
  selected: selectedModal,
4018
4018
  option: modals,
4019
4019
  select: selectModal,
4020
4020
  optionKey: "name",
4021
4021
  t: t
4022
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$3, {
4022
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_FSM_REGISTRY_VEHICLE_TYPE")), /*#__PURE__*/React.createElement(Dropdown$2, {
4023
4023
  className: "form-field",
4024
4024
  selected: selectedType,
4025
4025
  option: types,
@@ -4311,7 +4311,7 @@ const SupervisorAreaAssignment = ({
4311
4311
  onSelect(config.key, updatedData);
4312
4312
  };
4313
4313
  if (isLoading) return /*#__PURE__*/React.createElement(Loader, null);
4314
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_ZONE") + " *"), /*#__PURE__*/React.createElement(Dropdown$3, {
4314
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_ZONE") + " *"), /*#__PURE__*/React.createElement(Dropdown$2, {
4315
4315
  selected: selectedZone,
4316
4316
  option: zones,
4317
4317
  select: val => {
@@ -4320,7 +4320,7 @@ const SupervisorAreaAssignment = ({
4320
4320
  },
4321
4321
  optionKey: "name",
4322
4322
  t: t
4323
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_CLUSTER") + " *"), /*#__PURE__*/React.createElement(Dropdown$3, {
4323
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_CLUSTER") + " *"), /*#__PURE__*/React.createElement(Dropdown$2, {
4324
4324
  selected: selectedCluster,
4325
4325
  option: clusters,
4326
4326
  select: val => {
@@ -4330,7 +4330,7 @@ const SupervisorAreaAssignment = ({
4330
4330
  optionKey: "name",
4331
4331
  t: t,
4332
4332
  disable: !selectedZone
4333
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_WARD") + " *"), /*#__PURE__*/React.createElement(Dropdown$3, {
4333
+ })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("ES_VENDOR_SUPERVISOR_WARD") + " *"), /*#__PURE__*/React.createElement(Dropdown$2, {
4334
4334
  selected: selectedWard,
4335
4335
  option: wards,
4336
4336
  select: val => {
@@ -4920,7 +4920,7 @@ const EditVendorDetails = props => {
4920
4920
  });
4921
4921
  }
4922
4922
  if (selectedAction === "ADD_VEHICLE") {
4923
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VEHICLE`)), /*#__PURE__*/React.createElement(Dropdown$3, {
4923
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VEHICLE`)), /*#__PURE__*/React.createElement(Dropdown$2, {
4924
4924
  t: t,
4925
4925
  option: vehicles,
4926
4926
  value: selectedOption,
@@ -4930,7 +4930,7 @@ const EditVendorDetails = props => {
4930
4930
  }));
4931
4931
  }
4932
4932
  if (selectedAction === "ADD_DRIVER") {
4933
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_DRIVER`)), /*#__PURE__*/React.createElement(Dropdown$3, {
4933
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_DRIVER`)), /*#__PURE__*/React.createElement(Dropdown$2, {
4934
4934
  t: t,
4935
4935
  option: drivers,
4936
4936
  value: selectedOption,
@@ -5187,15 +5187,13 @@ const EditVendorDetails = props => {
5187
5187
  }))) : /*#__PURE__*/React.createElement(Loader, null));
5188
5188
  };
5189
5189
 
5190
- const {
5191
- DatePicker,
5192
- Dropdown
5193
- } = require("@djb25/digit-ui-react-components");
5194
5190
  const VendorConfig = (t, disabled = false, formData = {}) => {
5195
5191
  var _formData$serviceType;
5196
5192
  const isEkyc = (formData === null || formData === void 0 ? void 0 : (_formData$serviceType = formData.serviceType) === null || _formData$serviceType === void 0 ? void 0 : _formData$serviceType.code) === "EKYC";
5197
5193
  return [{
5198
5194
  head: "ES_VRNDOR_NEW_VENDOR_DETAILS",
5195
+ isCollapsible: true,
5196
+ isDefaultOpen: true,
5199
5197
  body: [{
5200
5198
  label: "ES_FSM_REGISTRY_NEW_VENDOR_NAME",
5201
5199
  isMandatory: true,
@@ -5275,7 +5273,7 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
5275
5273
  validation: {
5276
5274
  required: true
5277
5275
  },
5278
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker, Object.assign({
5276
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
5279
5277
  onChange: props.onChange,
5280
5278
  date: props.value
5281
5279
  }, customProps))
@@ -5290,7 +5288,7 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
5290
5288
  validation: {
5291
5289
  required: true
5292
5290
  },
5293
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker, Object.assign({
5291
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
5294
5292
  onChange: props.onChange,
5295
5293
  date: props.value
5296
5294
  }, customProps))
@@ -5320,17 +5318,6 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
5320
5318
  error: t("FSM_REGISTRY_INVALID_NAME"),
5321
5319
  className: "payment-form-text-input-correction"
5322
5320
  }
5323
- }, {
5324
- label: "ES_FSM_REGISTRY_NEW_FATHER_NAME",
5325
- isMandatory: true,
5326
- type: "text",
5327
- populators: {
5328
- name: "fatherOrHusbandName",
5329
- validation: {
5330
- required: true
5331
- },
5332
- className: "payment-form-text-input-correction"
5333
- }
5334
5321
  }, {
5335
5322
  label: "ES_FSM_REGISTRY_NEW_GENDER",
5336
5323
  isMandatory: true,
@@ -5361,113 +5348,25 @@ const VendorConfig = (t, disabled = false, formData = {}) => {
5361
5348
  validation: {
5362
5349
  required: true
5363
5350
  },
5364
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker, Object.assign({
5351
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
5365
5352
  onChange: props.onChange,
5366
5353
  date: props.value
5367
5354
  }, customProps, {
5368
5355
  max: convertEpochToDate(new Date().setFullYear(new Date().getFullYear()))
5369
5356
  }))
5370
5357
  }
5371
- }, {
5372
- label: "ES_FSM_REGISTRY_NEW_RELATIONSHIP",
5373
- isMandatory: true,
5374
- type: "component",
5375
- key: "relationship",
5376
- component: "SelectEkycDropdown",
5377
- populators: {
5378
- name: "relationship",
5379
- options: [{
5380
- code: "FATHER",
5381
- name: "ES_COMMON_RELATION_FATHER"
5382
- }, {
5383
- code: "HUSBAND",
5384
- name: "ES_COMMON_RELATION_HUSBAND"
5385
- }, {
5386
- code: "OTHER",
5387
- name: "ES_COMMON_RELATION_OTHER"
5388
- }],
5389
- optionsKey: "name"
5390
- }
5391
5358
  }] : [])]
5392
5359
  }, {
5393
- head: "ES_FSM_REGISTRY_NEW_ADDRESS_DETAILS",
5360
+ isCreateConnection: true,
5361
+ className: "new-application-card",
5394
5362
  body: [{
5395
- label: "HOUSE_NO",
5396
- isMandatory: false,
5397
- type: "text",
5398
- key: "doorNo",
5399
- populators: {
5400
- name: "doorNo",
5401
- defaultValue: "",
5402
- className: "payment-form-text-input-correction"
5403
- }
5404
- }, {
5405
- label: "ES_FSM_REGISTRY_NEW_PLOT",
5406
- isMandatory: false,
5407
- type: "text",
5408
- key: "plotNo",
5409
- populators: {
5410
- name: "plotNo",
5411
- defaultValue: "",
5412
- className: "payment-form-text-input-correction"
5413
- }
5414
- }, {
5415
- label: "ES_FSM_REGISTRY_NEW_BUILDING_NAME",
5416
- isMandatory: false,
5417
- type: "text",
5418
- key: "buildingName",
5419
- populators: {
5420
- name: "buildingName",
5421
- defaultValue: "",
5422
- className: "payment-form-text-input-correction"
5423
- }
5424
- }, {
5425
- label: "ES_FSM_REGISTRY_NEW_STREET",
5426
- isMandatory: false,
5427
- type: "text",
5428
- key: "street",
5429
- populators: {
5430
- name: "street",
5431
- defaultValue: "",
5432
- className: "payment-form-text-input-correction"
5433
- }
5434
- }, {
5435
- label: "ES_FSM_REGISTRY_NEW_PINCODE",
5436
- isMandatory: false,
5437
- type: "text",
5438
- key: "pincode",
5439
- populators: {
5440
- name: "pincode",
5441
- validation: {
5442
- required: false,
5443
- pattern: /^[1-9][0-9]{5}$/
5444
- },
5445
- error: t("FSM_REGISTRY_INVALID_PINCODE"),
5446
- defaultValue: "",
5447
- className: "payment-form-text-input-correction"
5448
- }
5449
- }, {
5450
- route: "address",
5451
- component: "VendorSelectAddress",
5363
+ type: "component",
5364
+ key: "propertyAddress",
5365
+ component: "CPTPropertyLocationDetails",
5452
5366
  withoutLabel: true,
5453
- texts: {
5454
- headerCaption: "CS_FILE_APPLICATION_PROPERTY_LOCATION_LABEL",
5455
- header: "CS_FILE_APPLICATION_PROPERTY_LOCATION_ADDRESS_TEXT",
5456
- cardText: "CS_FILE_APPLICATION_PROPERTY_LOCATION_CITY_MOHALLA_TEXT",
5457
- submitBarLabel: "CS_COMMON_NEXT"
5458
- },
5459
- key: "address",
5460
- isMandatory: true,
5461
- type: "component"
5462
- }, {
5463
- label: "ES_FSM_REGISTRY_NEW_LANDMARK",
5464
- isMandatory: false,
5465
- type: "text",
5466
- key: "landmark",
5467
- populators: {
5468
- name: "landmark",
5469
- defaultValue: "",
5470
- className: "payment-form-text-input-correction"
5367
+ props: {
5368
+ hidePropertySearch: true,
5369
+ hideZRO: true
5471
5370
  }
5472
5371
  }]
5473
5372
  }];
@@ -5478,7 +5377,6 @@ const AddVendor = ({
5478
5377
  heading
5479
5378
  }) => {
5480
5379
  const tenantId = Digit.ULBService.getCurrentTenantId();
5481
- const stateId = Digit.ULBService.getStateId();
5482
5380
  const {
5483
5381
  t
5484
5382
  } = useTranslation();
@@ -5565,6 +5463,7 @@ const AddVendor = ({
5565
5463
  const onSubmit = data => {
5566
5464
  var _mergedData$street, _mergedData$doorNo, _mergedData$plotNo, _mergedData$landmark, _mergedData$address, _mergedData$address$c, _mergedData$address2, _mergedData$address2$, _mergedData$address3, _mergedData$address3$, _mergedData$address4, _mergedData$address4$, _mergedData$buildingN, _mergedData$address5, _mergedData$address5$, _mergedData$address6, _mergedData$address6$, _mergedData$address7, _mergedData$address7$, _mergedData$serviceTy, _mergedData$address8, _mergedData$address9, _mergedData$relations, _mergedData$gender, _mergedData$serviceTy2;
5567
5465
  const mergedData = data;
5466
+ console.log(mergedData);
5568
5467
  const name = mergedData === null || mergedData === void 0 ? void 0 : mergedData.vendorName;
5569
5468
  const pincode = mergedData === null || mergedData === void 0 ? void 0 : mergedData.pincode;
5570
5469
  const street = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$street = mergedData.street) === null || _mergedData$street === void 0 ? void 0 : _mergedData$street.trim();
@@ -5608,7 +5507,7 @@ const AddVendor = ({
5608
5507
  },
5609
5508
  geoLocation: {
5610
5509
  latitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address8 = mergedData.address) === null || _mergedData$address8 === void 0 ? void 0 : _mergedData$address8.latitude) || 28.6139,
5611
- longitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address9 = mergedData.address) === null || _mergedData$address9 === void 0 ? void 0 : _mergedData$address9.longitude) || 77.2090
5510
+ longitude: (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$address9 = mergedData.address) === null || _mergedData$address9 === void 0 ? void 0 : _mergedData$address9.longitude) || 77.209
5612
5511
  }
5613
5512
  },
5614
5513
  owner: {
@@ -5638,34 +5537,6 @@ const AddVendor = ({
5638
5537
  contractEndDate: mergedData.contractEndDate ? new Date(mergedData.contractEndDate).getTime() : null
5639
5538
  };
5640
5539
  }
5641
- const payload = {
5642
- vendor: vendorData
5643
- };
5644
- if (isEkyc) {
5645
- payload.RequestInfo = {
5646
- apiId: "Rainmaker",
5647
- msgId: "ekyc-vendor-create"
5648
- };
5649
- }
5650
- mutate(payload, {
5651
- onError: error => {
5652
- setShowToast({
5653
- key: "error",
5654
- action: error
5655
- });
5656
- setTimeout(closeToast, 5000);
5657
- },
5658
- onSuccess: (data, variables) => {
5659
- setShowToast({
5660
- key: "success",
5661
- action: "ADD_VENDOR"
5662
- });
5663
- setTimeout(() => {
5664
- closeToast();
5665
- history.push("/digit-ui/employee/vendor/search-vendor");
5666
- }, 2000);
5667
- }
5668
- });
5669
5540
  };
5670
5541
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
5671
5542
  config: [{
@@ -5689,18 +5560,14 @@ const AddVendor = ({
5689
5560
  overflowY: "auto"
5690
5561
  }
5691
5562
  }, /*#__PURE__*/React.createElement(FormComposer, {
5563
+ config: Config,
5564
+ userType: "employee",
5565
+ onFormValueChange: onFormValueChange,
5692
5566
  label: t("ES_COMMON_APPLICATION_SUBMIT"),
5693
- config: Config.filter(i => !i.hideInEmployee).map(config => ({
5694
- ...config,
5695
- isCollapsible: true,
5696
- isDefaultOpen: true,
5697
- body: config.body.filter(a => !a.hideInEmployee)
5698
- })),
5699
5567
  onSubmit: onSubmit,
5700
5568
  defaultValues: defaultValues,
5701
- onFormValueChange: onFormValueChange,
5702
- noBreakLine: true,
5703
5569
  noCard: true,
5570
+ noBreakLine: true,
5704
5571
  isDisabled: !canSubmit
5705
5572
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
5706
5573
  error: showToast.key === "error",
@@ -5710,8 +5577,8 @@ const AddVendor = ({
5710
5577
  };
5711
5578
 
5712
5579
  const {
5713
- Dropdown: Dropdown$1,
5714
- DatePicker: DatePicker$1
5580
+ Dropdown,
5581
+ DatePicker
5715
5582
  } = require("@djb25/digit-ui-react-components");
5716
5583
  const SupervisorConfig = (t, agencies = [], reportingManagers = [], disabled = false) => {
5717
5584
  return [{
@@ -5822,7 +5689,7 @@ const SupervisorConfig = (t, agencies = [], reportingManagers = [], disabled = f
5822
5689
  validation: {
5823
5690
  required: true
5824
5691
  },
5825
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$1, Object.assign({
5692
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker, Object.assign({
5826
5693
  onChange: props.onChange,
5827
5694
  date: props.value
5828
5695
  }, customProps))
@@ -6313,7 +6180,7 @@ const SupervisorDetails = props => {
6313
6180
  });
6314
6181
  }
6315
6182
  if (selectedAction === "ADD_VENDOR" || selectedAction === "EDIT_VENDOR") {
6316
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
6183
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
6317
6184
  t: t,
6318
6185
  option: vendors,
6319
6186
  value: selectedOption,
@@ -6657,8 +6524,8 @@ const EditSupervisor = () => {
6657
6524
  };
6658
6525
 
6659
6526
  const {
6660
- Dropdown: Dropdown$2,
6661
- DatePicker: DatePicker$2
6527
+ Dropdown: Dropdown$1,
6528
+ DatePicker: DatePicker$1
6662
6529
  } = require("@djb25/digit-ui-react-components");
6663
6530
  const SurveyorConfig = (t, agencies = [], reportingManagers = [], disabled = false) => {
6664
6531
  return [{
@@ -6756,7 +6623,7 @@ const SurveyorConfig = (t, agencies = [], reportingManagers = [], disabled = fal
6756
6623
  validation: {
6757
6624
  required: true
6758
6625
  },
6759
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$2, Object.assign({
6626
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$1, Object.assign({
6760
6627
  onChange: props.onChange,
6761
6628
  date: props.value
6762
6629
  }, customProps))
@@ -6825,7 +6692,7 @@ const AddSurveyor = ({
6825
6692
  setShowToast(null);
6826
6693
  };
6827
6694
  const onSubmit = data => {
6828
- var _userInfo$roles, _Digit$UserService$ge2, _data$agencyName, _data$agencyName2, _data$reportingManage, _data$reportingManage2, _data$relationship, _data$gender;
6695
+ var _userInfo$roles, _Digit$UserService$ge2, _data$relationship, _data$gender;
6829
6696
  const isSupervisor = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => role.code === "EKYC_SUPERVISOR");
6830
6697
  const formData = {
6831
6698
  RequestInfo: {
@@ -6849,8 +6716,6 @@ const AddSurveyor = ({
6849
6716
  },
6850
6717
  surveyor: {
6851
6718
  tenantId: tenantId,
6852
- vendorId: vendorIdParam || (data === null || data === void 0 ? void 0 : (_data$agencyName = data.agencyName) === null || _data$agencyName === void 0 ? void 0 : _data$agencyName.code) || (data === null || data === void 0 ? void 0 : (_data$agencyName2 = data.agencyName) === null || _data$agencyName2 === void 0 ? void 0 : _data$agencyName2.id) || (userInfo === null || userInfo === void 0 ? void 0 : userInfo.uuid),
6853
- supervisorId: (data === null || data === void 0 ? void 0 : (_data$reportingManage = data.reportingManager) === null || _data$reportingManage === void 0 ? void 0 : _data$reportingManage.code) || (data === null || data === void 0 ? void 0 : (_data$reportingManage2 = data.reportingManager) === null || _data$reportingManage2 === void 0 ? void 0 : _data$reportingManage2.id) || null,
6854
6719
  description: (data === null || data === void 0 ? void 0 : data.description) || "",
6855
6720
  additionalDetails: {
6856
6721
  serviceType: "ekyc"
@@ -7218,7 +7083,7 @@ const SurveyorDetails = props => {
7218
7083
  });
7219
7084
  }
7220
7085
  if (selectedAction === "ADD_VENDOR" || selectedAction === "EDIT_VENDOR") {
7221
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
7086
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
7222
7087
  t: t,
7223
7088
  option: vendors,
7224
7089
  value: selectedOption,
@@ -7947,7 +7812,7 @@ const VENDORCreate = ({
7947
7812
  };
7948
7813
 
7949
7814
  const {
7950
- DatePicker: DatePicker$3
7815
+ DatePicker: DatePicker$2
7951
7816
  } = require("@djb25/digit-ui-react-components");
7952
7817
  const DriverConfig = (t, disabled = false) => {
7953
7818
  return [{
@@ -8041,7 +7906,7 @@ const DriverConfig = (t, disabled = false) => {
8041
7906
  validation: {
8042
7907
  required: true
8043
7908
  },
8044
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
7909
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$2, Object.assign({
8045
7910
  onChange: props.onChange,
8046
7911
  date: props.value
8047
7912
  }, customProps, {
@@ -8566,7 +8431,7 @@ const DriverDetails = () => {
8566
8431
  });
8567
8432
  }
8568
8433
  if (selectedAction === "ADD_VENDOR") {
8569
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
8434
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
8570
8435
  t: t,
8571
8436
  option: vendors,
8572
8437
  value: selectedOption,
@@ -8576,7 +8441,7 @@ const DriverDetails = () => {
8576
8441
  }));
8577
8442
  }
8578
8443
  if (selectedAction === "EDIT_VENDOR") {
8579
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
8444
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
8580
8445
  t: t,
8581
8446
  option: vendors,
8582
8447
  value: selectedOption,
@@ -8690,7 +8555,7 @@ const DriverDetails = () => {
8690
8555
  };
8691
8556
 
8692
8557
  const {
8693
- DatePicker: DatePicker$4
8558
+ DatePicker: DatePicker$3
8694
8559
  } = require("@djb25/digit-ui-react-components");
8695
8560
  const VehicleConfig = (t, disabled = false) => {
8696
8561
  return [{
@@ -8746,7 +8611,7 @@ const VehicleConfig = (t, disabled = false) => {
8746
8611
  validation: {
8747
8612
  required: true
8748
8613
  },
8749
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
8614
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
8750
8615
  onChange: props.onChange,
8751
8616
  date: props.value
8752
8617
  }, customProps))
@@ -8761,7 +8626,7 @@ const VehicleConfig = (t, disabled = false) => {
8761
8626
  validation: {
8762
8627
  required: true
8763
8628
  },
8764
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
8629
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
8765
8630
  onChange: props.onChange,
8766
8631
  date: props.value
8767
8632
  }, customProps))
@@ -8776,7 +8641,7 @@ const VehicleConfig = (t, disabled = false) => {
8776
8641
  validation: {
8777
8642
  required: true
8778
8643
  },
8779
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
8644
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
8780
8645
  onChange: props.onChange,
8781
8646
  date: props.value
8782
8647
  }, customProps))
@@ -8791,7 +8656,7 @@ const VehicleConfig = (t, disabled = false) => {
8791
8656
  validation: {
8792
8657
  required: true
8793
8658
  },
8794
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
8659
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
8795
8660
  onChange: props.onChange,
8796
8661
  date: props.value
8797
8662
  }, customProps))
@@ -8846,7 +8711,7 @@ const VehicleConfig = (t, disabled = false) => {
8846
8711
  validation: {
8847
8712
  required: true
8848
8713
  },
8849
- component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, Object.assign({
8714
+ component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$3, Object.assign({
8850
8715
  onChange: props.onChange,
8851
8716
  date: props.value
8852
8717
  }, customProps, {
@@ -9431,7 +9296,7 @@ const VehicleDetails = props => {
9431
9296
  });
9432
9297
  }
9433
9298
  if (selectedAction === "ADD_VENDOR") {
9434
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
9299
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
9435
9300
  t: t,
9436
9301
  option: vendors,
9437
9302
  value: selectedOption,
@@ -9441,7 +9306,7 @@ const VehicleDetails = props => {
9441
9306
  }));
9442
9307
  }
9443
9308
  if (selectedAction === "EDIT_VENDOR") {
9444
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$3, {
9309
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardText, null, t(`ES_FSM_REGISTRY_SELECT_VENODOR`)), /*#__PURE__*/React.createElement(Dropdown$2, {
9445
9310
  t: t,
9446
9311
  option: vendors,
9447
9312
  value: selectedOption,
@@ -9592,8 +9457,8 @@ const SelectEkycZones = ({
9592
9457
  var _boundaryData$egovLo, _boundaryData$egovLo$, _boundaryData$MdmsRes, _boundaryData$MdmsRes2, _boundaryData$MdmsRes3;
9593
9458
  const tenantBoundary = (boundaryData === null || boundaryData === void 0 ? void 0 : (_boundaryData$egovLo = boundaryData["egov-location"]) === null || _boundaryData$egovLo === void 0 ? void 0 : (_boundaryData$egovLo$ = _boundaryData$egovLo.TenantBoundary) === null || _boundaryData$egovLo$ === void 0 ? void 0 : _boundaryData$egovLo$[0]) || (boundaryData === null || boundaryData === void 0 ? void 0 : (_boundaryData$MdmsRes = boundaryData.MdmsRes) === null || _boundaryData$MdmsRes === void 0 ? void 0 : (_boundaryData$MdmsRes2 = _boundaryData$MdmsRes["egov-location"]) === null || _boundaryData$MdmsRes2 === void 0 ? void 0 : (_boundaryData$MdmsRes3 = _boundaryData$MdmsRes2.TenantBoundary) === null || _boundaryData$MdmsRes3 === void 0 ? void 0 : _boundaryData$MdmsRes3[0]);
9594
9459
  const boundaries = (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.boundary) || (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.children) || [];
9595
- if (Array.isArray(boundaries) && boundaries.length > 0) {
9596
- const zonesList = boundaries.map(b => ({
9460
+ if (Array.isArray(boundaries === null || boundaries === void 0 ? void 0 : boundaries.children) && (boundaries === null || boundaries === void 0 ? void 0 : boundaries.children.length) > 0) {
9461
+ const zonesList = boundaries === null || boundaries === void 0 ? void 0 : boundaries.children.map(b => ({
9597
9462
  code: b.code,
9598
9463
  name: b.name
9599
9464
  }));
@@ -9642,7 +9507,7 @@ const SelectEkycClusters = ({
9642
9507
  const tenantId = Digit.ULBService.getCurrentTenantId();
9643
9508
  const [clusters, setClusters] = useState([]);
9644
9509
  const [selectedClusters, setSelectedClusters] = useState(Array.isArray(formData === null || formData === void 0 ? void 0 : formData.clusterIds) ? formData.clusterIds : []);
9645
- const selectedZones = Array.isArray(formData === null || formData === void 0 ? void 0 : formData.zoneIds) ? formData.zoneIds : [];
9510
+ const selectedZones = React.useMemo(() => Array.isArray(formData === null || formData === void 0 ? void 0 : formData.zoneIds) ? formData.zoneIds : [], [formData === null || formData === void 0 ? void 0 : formData.zoneIds]);
9646
9511
  const {
9647
9512
  data: boundaryData
9648
9513
  } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
@@ -9712,8 +9577,11 @@ const SelectEkycClusters = ({
9712
9577
  }];
9713
9578
  }
9714
9579
  }
9715
- setClusters(allClusters);
9716
- }, [selectedZones, boundaryData]);
9580
+ setClusters(prev => {
9581
+ const same = JSON.stringify(prev) === JSON.stringify(allClusters);
9582
+ return same ? prev : allClusters;
9583
+ });
9584
+ }, [formData === null || formData === void 0 ? void 0 : formData.zoneIds, boundaryData]);
9717
9585
  const handleSelect = value => {
9718
9586
  setSelectedClusters(value);
9719
9587
  onSelect(config.key, value);
@@ -9744,7 +9612,7 @@ const SelectEkycDropdown = ({
9744
9612
  };
9745
9613
  return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label)), /*#__PURE__*/React.createElement("div", {
9746
9614
  className: "field"
9747
- }, /*#__PURE__*/React.createElement(Dropdown$3, {
9615
+ }, /*#__PURE__*/React.createElement(Dropdown$2, {
9748
9616
  selected: selected,
9749
9617
  option: options,
9750
9618
  select: handleSelect,