@djb25/digit-ui-module-vendor 1.0.64 → 1.0.66

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,7 +1,7 @@
1
- import React, { useState, useEffect, useCallback, useReducer, useMemo, useRef } from 'react';
1
+ import React, { useState, useMemo, useEffect, useCallback, useReducer, useRef } from 'react';
2
2
  import { useHistory, Link, useLocation, useParams, useRouteMatch, Switch, Route, Redirect } from 'react-router-dom';
3
3
  import { useTranslation } from 'react-i18next';
4
- import { VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, Loader, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader, CardText, Row, EditIcon, DeleteIcon, Header, SearchForm, SearchField, MobileNumber, CardLabelError, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, FormStep, LabelFieldPair, CardLabel, UploadFile, RadioOrSelect, MultiSelectDropdown, CitizenHomeCard, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon, CustomTooltip } from '@djb25/digit-ui-react-components';
4
+ import { Loader, VerticalTimeline, FormComposer, Toast, Card, ShippingTruck, Table, CheckBox, RadioButtons, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Dropdown, AddIcon, Menu, LinkLabel, SubmitBar, TextInput, DatePicker as DatePicker$4, ViewsIcon, ToggleSwitch, Modal, MdClose, CardSectionHeader, CardText, Row, EditIcon, DeleteIcon, Header, SearchForm, SearchField, MobileNumber, CardLabelError, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, HomeIcon, PropertyHouse, EmployeeModuleCard, FormStep, LabelFieldPair, CardLabel, UploadFile, RadioOrSelect, MultiSelectDropdown, CitizenHomeCard, CardHeader, CardSubHeader, StatusTable, LinkButton, Banner, InfoIcon, CustomTooltip } from '@djb25/digit-ui-react-components';
5
5
  import { useQueryClient } from 'react-query';
6
6
  import { useForm, Controller } from 'react-hook-form';
7
7
 
@@ -123,6 +123,22 @@ const SurveyorConfig = function (t, agencies, reportingManagers, disabled) {
123
123
  },
124
124
  className: "payment-form-text-input-correction"
125
125
  }
126
+ }, {
127
+ label: t("ES_VENDOR_ZONE"),
128
+ isMandatory: true,
129
+ type: "component",
130
+ key: "zoneIds",
131
+ populators: {
132
+ name: "zoneIds",
133
+ validation: {
134
+ required: true
135
+ },
136
+ className: "mb-16"
137
+ },
138
+ props: {
139
+ isMultiSelect: false
140
+ },
141
+ component: "SelectEkycZones"
126
142
  }, {
127
143
  label: t("ES_VENDOR_SURVEYOR_DESCRIPTION"),
128
144
  isMandatory: false,
@@ -136,7 +152,7 @@ const SurveyorConfig = function (t, agencies, reportingManagers, disabled) {
136
152
  };
137
153
 
138
154
  const AddSurveyor = _ref => {
139
- var _Digit$UserService$ge;
155
+ var _Digit$UserService$ge, _userInfo$roles;
140
156
  const _useTranslation = useTranslation(),
141
157
  t = _useTranslation.t;
142
158
  const history = useHistory();
@@ -153,14 +169,63 @@ const AddSurveyor = _ref => {
153
169
  setCanSubmit = _useState2[1];
154
170
  const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSurveyorCreate(tenantId),
155
171
  mutateAsync = _Digit$Hooks$fsm$useS.mutateAsync;
156
- const Config = SurveyorConfig(t);
157
- const defaultValues = {
158
- role: {
159
- code: "SURVEYOR",
160
- name: "Surveyor"
161
- },
162
- mobileNumber: ""
163
- };
172
+ 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");
173
+ const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
174
+ status: "ACTIVE"
175
+ }, {
176
+ enabled: isSupervisor,
177
+ staleTime: Infinity
178
+ }),
179
+ supervisorSearchResponse = _Digit$Hooks$fsm$useS2.data,
180
+ isSupervisorSearchLoading = _Digit$Hooks$fsm$useS2.isLoading;
181
+ const matchedSupervisor = useMemo(() => {
182
+ if (!(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) return null;
183
+ return supervisorSearchResponse.supervisors.find(s => {
184
+ var _s$id, _userInfo$uuid, _s$owner, _s$owner$uuid, _userInfo$uuid2, _s$owner2;
185
+ return ((_s$id = s.id) === null || _s$id === void 0 ? void 0 : _s$id.toLowerCase()) === (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$uuid = userInfo.uuid) === null || _userInfo$uuid === void 0 ? void 0 : _userInfo$uuid.toLowerCase()) || ((_s$owner = s.owner) === null || _s$owner === void 0 ? void 0 : (_s$owner$uuid = _s$owner.uuid) === null || _s$owner$uuid === void 0 ? void 0 : _s$owner$uuid.toLowerCase()) === (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$uuid2 = userInfo.uuid) === null || _userInfo$uuid2 === void 0 ? void 0 : _userInfo$uuid2.toLowerCase()) || ((_s$owner2 = s.owner) === null || _s$owner2 === void 0 ? void 0 : _s$owner2.mobileNumber) === (userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber) || s.mobileNo === (userInfo === null || userInfo === void 0 ? void 0 : userInfo.mobileNumber);
186
+ });
187
+ }, [supervisorSearchResponse, userInfo]);
188
+ const _useState3 = useState(null),
189
+ defaultValues = _useState3[0],
190
+ setDefaultValues = _useState3[1];
191
+ useEffect(() => {
192
+ if (!isSupervisor) {
193
+ setDefaultValues({
194
+ role: {
195
+ code: "SURVEYOR",
196
+ name: "Surveyor"
197
+ },
198
+ mobileNumber: ""
199
+ });
200
+ } else if (supervisorSearchResponse && !isSupervisorSearchLoading) {
201
+ setDefaultValues({
202
+ role: {
203
+ code: "SURVEYOR",
204
+ name: "Surveyor"
205
+ },
206
+ mobileNumber: "",
207
+ zoneIds: (matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.assignedZoneId) || ""
208
+ });
209
+ }
210
+ }, [isSupervisor, supervisorSearchResponse, isSupervisorSearchLoading, matchedSupervisor]);
211
+ const Config = useMemo(() => {
212
+ const baseConfig = SurveyorConfig(t);
213
+ if (isSupervisor) {
214
+ return baseConfig.map(section => _extends({}, section, {
215
+ body: section.body.map(field => {
216
+ if (field.key === "zoneIds") {
217
+ return _extends({}, field, {
218
+ props: _extends({}, field.props, {
219
+ disable: true
220
+ })
221
+ });
222
+ }
223
+ return field;
224
+ })
225
+ }));
226
+ }
227
+ return baseConfig;
228
+ }, [t, isSupervisor]);
164
229
  const isValidAge = dateStr => {
165
230
  if (!dateStr) return false;
166
231
  const today = new Date();
@@ -185,8 +250,8 @@ const AddSurveyor = _ref => {
185
250
  };
186
251
  const onSubmit = function (data) {
187
252
  try {
188
- var _userInfo$roles, _Digit$UserService$ge2, _data$gender;
189
- 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");
253
+ var _data$zoneIds, _Digit$UserService$ge2, _data$gender;
254
+ const assignedZone = Array.isArray(data === null || data === void 0 ? void 0 : data.zoneIds) ? (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.map(ele => ele.code).join(",")) || "" : (data === null || data === void 0 ? void 0 : data.zoneIds) || "";
190
255
  const formData = {
191
256
  RequestInfo: _extends({
192
257
  apiId: "Rainmaker",
@@ -208,6 +273,9 @@ const AddSurveyor = _ref => {
208
273
  }),
209
274
  surveyor: {
210
275
  tenantId: tenantId,
276
+ vendorId: isSupervisor ? matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.vendorId : undefined,
277
+ supervisorId: isSupervisor ? matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.id : undefined,
278
+ assignedZoneId: assignedZone,
211
279
  description: (data === null || data === void 0 ? void 0 : data.description) || "",
212
280
  correspondenceAddress: data === null || data === void 0 ? void 0 : data.correspondenceAddress,
213
281
  additionalDetails: {
@@ -250,6 +318,9 @@ const AddSurveyor = _ref => {
250
318
  return Promise.reject(e);
251
319
  }
252
320
  };
321
+ if (isSupervisor && (isSupervisorSearchLoading || !defaultValues)) {
322
+ return /*#__PURE__*/React.createElement(Loader, null);
323
+ }
253
324
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(VerticalTimeline, {
254
325
  config: [{
255
326
  route: "surveyor-details",
@@ -1017,7 +1088,7 @@ const VendorInbox = props => {
1017
1088
  const userInfo = Digit.SessionStorage.get("User");
1018
1089
  const userRoles = userInfo.info.roles;
1019
1090
  const userType = (_userInfo$info$type = userInfo.info.type) === null || _userInfo$info$type === void 0 ? void 0 : _userInfo$info$type.toLowerCase();
1020
- const EKYC_ROLES = ["EKYC_VENDOR", "EKYC_SUPERVISOR", "EKYC_SURVEYOR"];
1091
+ const EKYC_ROLES = ["EKYC_SUPERVISOR", "EKYC_SURVEYOR"];
1021
1092
  const isEkycRole = userRoles === null || userRoles === void 0 ? void 0 : userRoles.some(role => EKYC_ROLES.includes((role === null || role === void 0 ? void 0 : role.code) || role));
1022
1093
  const openWorkOrderModal = vendorDetails => {
1023
1094
  setSelectedVendorForWorkOrder(vendorDetails);
@@ -1342,9 +1413,11 @@ const VendorInbox = props => {
1342
1413
  });
1343
1414
  },
1344
1415
  onSuccess: (data, variables) => {
1416
+ console.log("newStatus:", newStatus, "isDisable:", newStatus === "DISABLED");
1345
1417
  setShowToast({
1346
1418
  key: "success",
1347
- action: "SUPERVISOR"
1419
+ action: "SUPERVISOR",
1420
+ isDisable: newStatus === "DISABLED"
1348
1421
  });
1349
1422
  queryClient.invalidateQueries("FSM_SUPERVISOR_SEARCH");
1350
1423
  queryClient.invalidateQueries("SUPERVISOR_SEARCH");
@@ -1378,9 +1451,11 @@ const VendorInbox = props => {
1378
1451
  });
1379
1452
  },
1380
1453
  onSuccess: (data, variables) => {
1454
+ console.log("newStatus:", newStatus, "isDisable:", newStatus === "DISABLED");
1381
1455
  setShowToast({
1382
1456
  key: "success",
1383
- action: "SURVEYOR"
1457
+ action: "SURVEYOR",
1458
+ isDisable: newStatus === "DISABLED"
1384
1459
  });
1385
1460
  queryClient.invalidateQueries("FSM_SURVEYOR_SEARCH");
1386
1461
  queryClient.invalidateQueries("SURVEYOR_SEARCH");
@@ -1788,7 +1863,7 @@ const VendorInbox = props => {
1788
1863
  }
1789
1864
  const hasDetails = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.vendorAdditionalDetails) !== null;
1790
1865
  return /*#__PURE__*/React.createElement(Link, {
1791
- to: hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/additionaldetails/vendor-details?vendorId=" + vendorId
1866
+ to: !hasDetails ? "/digit-ui/" + userType + "/vendor/registry/additionaldetails/info?vendorId=" + vendorId : "/digit-ui/" + userType + "/vendor/registry/vendor-details/" + vendorId
1792
1867
  }, /*#__PURE__*/React.createElement("button", {
1793
1868
  className: "submit-bar",
1794
1869
  style: {
@@ -4672,13 +4747,26 @@ const VendorConfig = function (t, module, genderMenu, update) {
4672
4747
  populators: {
4673
4748
  name: "dob",
4674
4749
  validation: {
4675
- required: true
4750
+ required: true,
4751
+ validate: value => {
4752
+ if (!value) return true;
4753
+ const dob = new Date(value);
4754
+ const today = new Date();
4755
+ let age = today.getFullYear() - dob.getFullYear();
4756
+ const m = today.getMonth() - dob.getMonth();
4757
+ if (m < 0 || m === 0 && today.getDate() < dob.getDate()) {
4758
+ age--;
4759
+ }
4760
+ return age >= 18 || t("ES_VENDOR_DOB_MIN_AGE_ERROR") || "Vendor must be 18 years or older";
4761
+ }
4676
4762
  },
4677
4763
  component: (props, customProps) => /*#__PURE__*/React.createElement(DatePicker$4, _extends({
4678
4764
  onChange: props.onChange,
4679
4765
  date: props.value
4680
4766
  }, customProps, {
4681
- max: convertEpochToDate(new Date().setFullYear(new Date().getFullYear()))
4767
+ isDOB: true,
4768
+ minAge: 18,
4769
+ max: convertEpochToDate(new Date().setFullYear(new Date().getFullYear() - 18))
4682
4770
  }))
4683
4771
  }
4684
4772
  }] : [])]
@@ -4703,7 +4791,8 @@ const VendorConfig = function (t, module, genderMenu, update) {
4703
4791
 
4704
4792
  const AddVendor = () => {
4705
4793
  var _Digit$UserService$ge, _formData$serviceType2;
4706
- const tenantId = Digit.ULBService.getCurrentTenantId();
4794
+ const rawTenantId = Digit.ULBService.getCurrentTenantId();
4795
+ const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
4707
4796
  const _useTranslation = useTranslation(),
4708
4797
  t = _useTranslation.t;
4709
4798
  const history = useHistory();
@@ -4925,7 +5014,7 @@ const AddVendor = () => {
4925
5014
  onError: error => {
4926
5015
  setShowToast({
4927
5016
  key: "error",
4928
- action: error
5017
+ action: (error === null || error === void 0 ? void 0 : error.message) || error
4929
5018
  });
4930
5019
  },
4931
5020
  onSuccess: () => {
@@ -5635,7 +5724,7 @@ const createConfig = [{
5635
5724
  body: [{
5636
5725
  route: "info",
5637
5726
  component: "ServiceDoc",
5638
- nextStep: "vendor-details",
5727
+ nextStep: "modify-details",
5639
5728
  key: "Documents"
5640
5729
  }, {
5641
5730
  route: "modify-details",
@@ -5685,12 +5774,19 @@ const VENDORCreate = _ref => {
5685
5774
  React.useEffect(() => {
5686
5775
  const searchParams = new URLSearchParams(search || window.location.search);
5687
5776
  const vendorId = searchParams.get("vendorId");
5688
- if (vendorId && params.vendor_id !== vendorId) {
5689
- setParams(_extends({}, params, {
5690
- vendor_id: vendorId
5691
- }));
5777
+ if (vendorId) {
5778
+ if (params.vendor_id !== vendorId) {
5779
+ setParams(_extends({}, params, {
5780
+ vendor_id: vendorId
5781
+ }));
5782
+ }
5783
+ } else {
5784
+ if (params && Object.keys(params).length > 0 && window.location.href.includes("/info") && sessionStorage.getItem("docReqScreenByBack") !== "true") {
5785
+ clearParams();
5786
+ queryClient.invalidateQueries("VENDOR_CREATE");
5787
+ }
5692
5788
  }
5693
- }, [search, window.location.search, params, setParams]);
5789
+ }, [search, pathname, params, setParams, clearParams, queryClient]);
5694
5790
  const goNext = (skipStep, index, isAddMultiple, key) => {
5695
5791
  let currentPath = pathname.split("/").pop(),
5696
5792
  lastchar = currentPath.charAt(currentPath.length - 1),
@@ -5732,10 +5828,6 @@ const VENDORCreate = _ref => {
5732
5828
  }
5733
5829
  redirectWithHistory(nextPage);
5734
5830
  };
5735
- if (params && Object.keys(params).length > 0 && window.location.href.includes("/info") && sessionStorage.getItem("docReqScreenByBack") !== "true") {
5736
- clearParams();
5737
- queryClient.invalidateQueries("VENDOR_CREATE");
5738
- }
5739
5831
  const vendorcreate = function () {
5740
5832
  try {
5741
5833
  history.push(match.path + "/acknowledgement");
@@ -5826,7 +5918,7 @@ const EditVendor = () => {
5826
5918
  const _useState = useState(null),
5827
5919
  showToast = _useState[0],
5828
5920
  setShowToast = _useState[1];
5829
- const _useState2 = useState(false),
5921
+ const _useState2 = useState(true),
5830
5922
  canSubmit = _useState2[0],
5831
5923
  setCanSubmit = _useState2[1];
5832
5924
  const _useState3 = useState({}),
@@ -5860,22 +5952,20 @@ const EditVendor = () => {
5860
5952
  const _useState6 = useState([]),
5861
5953
  zones = _useState6[0],
5862
5954
  setZones = _useState6[1];
5863
- const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]),
5864
- boundaryData = _Digit$Hooks$useCommo.data,
5955
+ const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "common-masters", ["ZroOfficeList"]),
5956
+ zroData = _Digit$Hooks$useCommo.data,
5865
5957
  isLoading = _Digit$Hooks$useCommo.isLoading;
5866
5958
  useEffect(() => {
5867
- var _boundaryData$egovLo, _boundaryData$egovLo$, _boundaryData$MdmsRes, _boundaryData$MdmsRes2, _boundaryData$MdmsRes3;
5868
- 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]);
5869
- const boundaries = (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.boundary) || (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.children) || [];
5870
- if (Array.isArray(boundaries === null || boundaries === void 0 ? void 0 : boundaries.children) && (boundaries === null || boundaries === void 0 ? void 0 : boundaries.children.length) > 0) {
5871
- const allZones = boundaries.children.flatMap(assembly => ((assembly === null || assembly === void 0 ? void 0 : assembly.children) || []).map(zone => ({
5872
- code: zone.code,
5873
- name: zone.name
5874
- })));
5875
- const zonesList = [...new Map(allZones.map(zone => [zone.code, zone])).values()];
5876
- setZones(zonesList);
5959
+ var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
5960
+ const zroOfficeList = (zroData === null || zroData === void 0 ? void 0 : (_zroData$commonMaste = zroData["common-masters"]) === null || _zroData$commonMaste === void 0 ? void 0 : _zroData$commonMaste.ZroOfficeList) || (zroData === null || zroData === void 0 ? void 0 : (_zroData$MdmsRes = zroData.MdmsRes) === null || _zroData$MdmsRes === void 0 ? void 0 : (_zroData$MdmsRes$comm = _zroData$MdmsRes["common-masters"]) === null || _zroData$MdmsRes$comm === void 0 ? void 0 : _zroData$MdmsRes$comm.ZroOfficeList) || [];
5961
+ if (Array.isArray(zroOfficeList)) {
5962
+ const activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
5963
+ code: zro.code,
5964
+ name: zro.code
5965
+ }));
5966
+ setZones(activeZros);
5877
5967
  }
5878
- }, [boundaryData]);
5968
+ }, [zroData]);
5879
5969
  useEffect(() => {
5880
5970
  var _genderTypeData$commo, _genderTypeData$commo2;
5881
5971
  if (genderTypeData && (_genderTypeData$commo = genderTypeData["common-masters"]) !== null && _genderTypeData$commo !== void 0 && (_genderTypeData$commo2 = _genderTypeData$commo.GenderType) !== null && _genderTypeData$commo2 !== void 0 && _genderTypeData$commo2.length) {
@@ -5975,22 +6065,21 @@ const EditVendor = () => {
5975
6065
  if (typeof dsoDetails.zoneIds[0] === "object") return;
5976
6066
  setDefaultValues(prev => _extends({}, prev, {
5977
6067
  zoneIds: zones.filter(z => {
5978
- var _prev$zoneIds;
5979
- return prev === null || prev === void 0 ? void 0 : (_prev$zoneIds = prev.zoneIds) === null || _prev$zoneIds === void 0 ? void 0 : _prev$zoneIds.includes(z.name);
6068
+ const prevZones = (prev === null || prev === void 0 ? void 0 : prev.zoneIds) || [];
6069
+ return prevZones.some(prevZ => typeof prevZ === "object" ? (prevZ === null || prevZ === void 0 ? void 0 : prevZ.code) === z.code : prevZ === z.code || prevZ === z.name);
5980
6070
  })
5981
6071
  }));
5982
6072
  }, [dsoDetails === null || dsoDetails === void 0 ? void 0 : dsoDetails.zoneIds, zones]);
5983
6073
  const onFormValueChange = (setValue, data) => {
5984
- var _data$propertyAddress, _data$propertyAddress2, _data$serviceType, _data$serviceType2;
5985
- const isAddressFilled = (data === null || data === void 0 ? void 0 : (_data$propertyAddress = data.propertyAddress) === null || _data$propertyAddress === void 0 ? void 0 : _data$propertyAddress.city) && (data === null || data === void 0 ? void 0 : (_data$propertyAddress2 = data.propertyAddress) === null || _data$propertyAddress2 === void 0 ? void 0 : _data$propertyAddress2.locality);
6074
+ var _data$serviceType, _data$serviceType2, _data$serviceType2$co, _data$serviceType3, _data$serviceType3$i;
5986
6075
  const isVendorDetailsFilled = (data === null || data === void 0 ? void 0 : data.vendorName) && (data === null || data === void 0 ? void 0 : data.phone) && (data === null || data === void 0 ? void 0 : (_data$serviceType = data.serviceType) === null || _data$serviceType === void 0 ? void 0 : _data$serviceType.code);
5987
- const isEkyc = (data === null || data === void 0 ? void 0 : (_data$serviceType2 = data.serviceType) === null || _data$serviceType2 === void 0 ? void 0 : _data$serviceType2.code) === "EKYC";
6076
+ const isEkyc = (data === null || data === void 0 ? void 0 : (_data$serviceType2 = data.serviceType) === null || _data$serviceType2 === void 0 ? void 0 : (_data$serviceType2$co = _data$serviceType2.code) === null || _data$serviceType2$co === void 0 ? void 0 : _data$serviceType2$co.toUpperCase()) === "EKYC" || (data === null || data === void 0 ? void 0 : (_data$serviceType3 = data.serviceType) === null || _data$serviceType3 === void 0 ? void 0 : (_data$serviceType3$i = _data$serviceType3.i18nKey) === null || _data$serviceType3$i === void 0 ? void 0 : _data$serviceType3$i.toUpperCase()) === "EKYC";
5988
6077
  let isEkycFieldsFilled = true;
5989
6078
  if (isEkyc) {
5990
- var _data$zoneIds, _data$clusterIds;
5991
- isEkycFieldsFilled = (data === null || data === void 0 ? void 0 : data.ownerName) && (data === null || data === void 0 ? void 0 : data.contractStartDate) && (data === null || data === void 0 ? void 0 : data.contractEndDate) && (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.length) > 0 && (data === null || data === void 0 ? void 0 : (_data$clusterIds = data.clusterIds) === null || _data$clusterIds === void 0 ? void 0 : _data$clusterIds.length) > 0 && (data === null || data === void 0 ? void 0 : data.gender) && (data === null || data === void 0 ? void 0 : data.dob);
6079
+ var _data$zoneIds;
6080
+ isEkycFieldsFilled = (data === null || data === void 0 ? void 0 : data.ownerName) && (data === null || data === void 0 ? void 0 : data.contractStartDate) && (data === null || data === void 0 ? void 0 : data.contractEndDate) && (data === null || data === void 0 ? void 0 : (_data$zoneIds = data.zoneIds) === null || _data$zoneIds === void 0 ? void 0 : _data$zoneIds.length) > 0 && (data === null || data === void 0 ? void 0 : data.gender) && (data === null || data === void 0 ? void 0 : data.dob);
5992
6081
  }
5993
- if (isVendorDetailsFilled && isAddressFilled && isEkycFieldsFilled) {
6082
+ if (isVendorDetailsFilled && isEkycFieldsFilled) {
5994
6083
  setCanSubmit(true);
5995
6084
  } else {
5996
6085
  setCanSubmit(false);
@@ -6000,7 +6089,7 @@ const EditVendor = () => {
6000
6089
  setShowToast(null);
6001
6090
  };
6002
6091
  const onSubmit = data => {
6003
- var _address$city, _address$city2, _address$city3, _address$city4, _address$locality, _address$locality2, _address$ward, _address$ward2, _mergedData$plotNo, _mergedData$buildingN, _mergedData$serviceTy, _mergedData$address, _mergedData$address2, _mergedData$relations, _mergedData$gender, _mergedData$serviceTy2;
6092
+ var _address$city, _address$city2, _address$city3, _address$city4, _address$locality, _address$locality2, _address$ward, _address$ward2, _mergedData$plotNo, _mergedData$buildingN, _mergedData$serviceTy, _mergedData$serviceTy2, _mergedData$serviceTy3, _mergedData$serviceTy4, _mergedData$address, _mergedData$address2, _mergedData$relations, _mergedData$gender, _mergedData$serviceTy5;
6004
6093
  const mergedData = data;
6005
6094
  const address = mergedData === null || mergedData === void 0 ? void 0 : mergedData.propertyAddress;
6006
6095
  const pincode = address === null || address === void 0 ? void 0 : address.pincode;
@@ -6021,7 +6110,7 @@ const EditVendor = () => {
6021
6110
  const buildingName = mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$buildingN = mergedData.buildingName) === null || _mergedData$buildingN === void 0 ? void 0 : _mergedData$buildingN.trim();
6022
6111
  const emailId = mergedData === null || mergedData === void 0 ? void 0 : mergedData.emailId;
6023
6112
  const phone = mergedData === null || mergedData === void 0 ? void 0 : mergedData.phone;
6024
- const isEkyc = (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : _mergedData$serviceTy.i18nKey) === "EKYC";
6113
+ const isEkyc = (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy = mergedData.serviceType) === null || _mergedData$serviceTy === void 0 ? void 0 : (_mergedData$serviceTy2 = _mergedData$serviceTy.code) === null || _mergedData$serviceTy2 === void 0 ? void 0 : _mergedData$serviceTy2.toUpperCase()) === "EKYC" || (mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy3 = mergedData.serviceType) === null || _mergedData$serviceTy3 === void 0 ? void 0 : (_mergedData$serviceTy4 = _mergedData$serviceTy3.i18nKey) === null || _mergedData$serviceTy4 === void 0 ? void 0 : _mergedData$serviceTy4.toUpperCase()) === "EKYC";
6025
6114
  let vendorData = _extends({}, dsoDetails, {
6026
6115
  tenantId: tenantId,
6027
6116
  name,
@@ -6066,7 +6155,7 @@ const EditVendor = () => {
6066
6155
  mobileNumber: phone
6067
6156
  }),
6068
6157
  additionalDetails: {
6069
- serviceType: isEkyc ? "ekyc" : mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy2 = mergedData.serviceType) === null || _mergedData$serviceTy2 === void 0 ? void 0 : _mergedData$serviceTy2.code
6158
+ serviceType: isEkyc ? "ekyc" : mergedData === null || mergedData === void 0 ? void 0 : (_mergedData$serviceTy5 = mergedData.serviceType) === null || _mergedData$serviceTy5 === void 0 ? void 0 : _mergedData$serviceTy5.code
6070
6159
  },
6071
6160
  vehicles: [],
6072
6161
  drivers: [],
@@ -6097,7 +6186,7 @@ const EditVendor = () => {
6097
6186
  onError: error => {
6098
6187
  setShowToast({
6099
6188
  key: "error",
6100
- action: error
6189
+ action: (error === null || error === void 0 ? void 0 : error.message) || error
6101
6190
  });
6102
6191
  },
6103
6192
  onSuccess: () => {
@@ -6559,6 +6648,9 @@ const ServiceDoc = _ref => {
6559
6648
  _Digit$Hooks$asset$us2 = _Digit$Hooks$asset$us.data,
6560
6649
  Documentsob = _Digit$Hooks$asset$us2 === void 0 ? {} : _Digit$Hooks$asset$us2;
6561
6650
  let docs = Documentsob === null || Documentsob === void 0 ? void 0 : (_Documentsob$ASSET = Documentsob.ASSET) === null || _Documentsob$ASSET === void 0 ? void 0 : _Documentsob$ASSET.Documents;
6651
+ const onSubmit = () => {
6652
+ onSelect(config.key, {});
6653
+ };
6562
6654
  return /*#__PURE__*/React.createElement("div", {
6563
6655
  className: "employee-form-content"
6564
6656
  }, isLoading && /*#__PURE__*/React.createElement(Loader, null), Array.isArray(docs) && docs.map((_ref2, index) => {
@@ -6580,7 +6672,7 @@ const ServiceDoc = _ref => {
6580
6672
  }, dropdownIndex + 1, ". ", t(stringReplaceAll(dropdownData === null || dropdownData === void 0 ? void 0 : dropdownData.code, ".", "_")))));
6581
6673
  }), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
6582
6674
  label: t("COMMON_NEXT"),
6583
- onSubmit: onSelect
6675
+ onSubmit: onSubmit
6584
6676
  })));
6585
6677
  };
6586
6678
 
@@ -7663,91 +7755,91 @@ const CheckPage = _ref2 => {
7663
7755
  label: t("VENDOR_ID"),
7664
7756
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.VendorId)),
7665
7757
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7666
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7758
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7667
7759
  })
7668
7760
  }), /*#__PURE__*/React.createElement(Row, {
7669
7761
  label: t("VENDOR_BANK_IFSC_CODE"),
7670
7762
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.IFSC)),
7671
7763
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7672
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7764
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7673
7765
  })
7674
7766
  }), /*#__PURE__*/React.createElement(Row, {
7675
7767
  label: t("VENDOR_BANK_NAME"),
7676
7768
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.Bank)),
7677
7769
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7678
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7770
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7679
7771
  })
7680
7772
  }), /*#__PURE__*/React.createElement(Row, {
7681
7773
  label: t("VENDOR_BANK_BRANCH"),
7682
7774
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.BankbranchName)),
7683
7775
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7684
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7776
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7685
7777
  })
7686
7778
  }), /*#__PURE__*/React.createElement(Row, {
7687
7779
  label: t("VENDOR_MICR_NO"),
7688
7780
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.micrNo)),
7689
7781
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7690
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7782
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7691
7783
  })
7692
7784
  }), /*#__PURE__*/React.createElement(Row, {
7693
7785
  label: t("BANK_ACCONT_NO"),
7694
7786
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.AccountNo)),
7695
7787
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7696
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7788
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7697
7789
  })
7698
7790
  }), /*#__PURE__*/React.createElement(Row, {
7699
7791
  label: t("PAN_NO"),
7700
7792
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.PanNo)),
7701
7793
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7702
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7794
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7703
7795
  })
7704
7796
  }), /*#__PURE__*/React.createElement(Row, {
7705
7797
  label: t("GST_NO"),
7706
7798
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.GstNo)),
7707
7799
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7708
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7800
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7709
7801
  })
7710
7802
  }), /*#__PURE__*/React.createElement(Row, {
7711
7803
  label: t("GST_REGISTERED_STATE/UT"),
7712
7804
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.GstState)),
7713
7805
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7714
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7806
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7715
7807
  })
7716
7808
  }), /*#__PURE__*/React.createElement(Row, {
7717
7809
  label: t("REGISTRATION_NO"),
7718
7810
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.RegistrationNo)),
7719
7811
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7720
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7812
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7721
7813
  })
7722
7814
  }), /*#__PURE__*/React.createElement(Row, {
7723
7815
  label: t("EPF_NO"),
7724
7816
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.EpfNo)),
7725
7817
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7726
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7818
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7727
7819
  })
7728
7820
  }), /*#__PURE__*/React.createElement(Row, {
7729
7821
  label: t("ESI_NO"),
7730
7822
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : vendordet.EsiNo)),
7731
7823
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7732
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7824
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7733
7825
  })
7734
7826
  }), /*#__PURE__*/React.createElement(Row, {
7735
7827
  label: t("VENDOR_TYPE"),
7736
7828
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$VendorType = vendordet.VendorType) === null || _vendordet$VendorType === void 0 ? void 0 : _vendordet$VendorType.code)),
7737
7829
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7738
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7830
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7739
7831
  })
7740
7832
  }), /*#__PURE__*/React.createElement(Row, {
7741
7833
  label: t("VENDOR_CATEGORY"),
7742
7834
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$VendorCate = vendordet.VendorCategory) === null || _vendordet$VendorCate === void 0 ? void 0 : _vendordet$VendorCate.code)),
7743
7835
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7744
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7836
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7745
7837
  })
7746
7838
  }), /*#__PURE__*/React.createElement(Row, {
7747
7839
  label: t("VENDOR_STATUS"),
7748
7840
  text: "" + t(checkForNA(vendordet === null || vendordet === void 0 ? void 0 : (_vendordet$Status = vendordet.Status) === null || _vendordet$Status === void 0 ? void 0 : _vendordet$Status.code)),
7749
7841
  actionButton: /*#__PURE__*/React.createElement(ActionButton, {
7750
- jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/vendor-details"
7842
+ jumpTo: "/digit-ui/" + (window.location.pathname.includes("/citizen") ? "citizen" : "employee") + "/vendor/registry/additionaldetails/modify-details"
7751
7843
  })
7752
7844
  }))), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(CardSubHeader, null, t("VENDOR_DOCUMENTS_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
7753
7845
  label: t("VENDOR_DOCUMENTS"),
@@ -9460,14 +9552,17 @@ const VehicleDetails = props => {
9460
9552
  };
9461
9553
 
9462
9554
  const SelectEkycZones = _ref => {
9463
- var _Digit$SessionStorage, _loggedInUser$roles;
9555
+ var _Digit$SessionStorage, _loggedInUser$roles, _config$props;
9464
9556
  let config = _ref.config,
9465
9557
  onSelect = _ref.onSelect,
9466
9558
  t = _ref.t,
9467
9559
  formData = _ref.formData,
9468
9560
  _ref$isMultiSelect = _ref.isMultiSelect,
9469
- isMultiSelect = _ref$isMultiSelect === void 0 ? true : _ref$isMultiSelect;
9470
- const tenantId = Digit.ULBService.getCurrentTenantId();
9561
+ isMultiSelect = _ref$isMultiSelect === void 0 ? true : _ref$isMultiSelect,
9562
+ _ref$disable = _ref.disable,
9563
+ disable = _ref$disable === void 0 ? false : _ref$disable;
9564
+ const rawTenantId = Digit.ULBService.getCurrentTenantId();
9565
+ const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
9471
9566
  const _useState = useState([]),
9472
9567
  zones = _useState[0],
9473
9568
  setZones = _useState[1];
@@ -9475,16 +9570,25 @@ const SelectEkycZones = _ref => {
9475
9570
  selectedZones = _useState2[0],
9476
9571
  setSelectedZones = _useState2[1];
9477
9572
  const initialized = useRef(false);
9573
+ const isVendorPage = window.location.pathname.includes("/new-vendor") || window.location.pathname.includes("/modify-vendor") || window.location.href.includes("/new-vendor") || window.location.href.includes("/modify-vendor");
9478
9574
  const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
9479
9575
  const roles = (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$roles = loggedInUser.roles) === null || _loggedInUser$roles === void 0 ? void 0 : _loggedInUser$roles.map(r => r.code)) || [];
9480
9576
  const isEkycVendor = roles.includes("EKYC_VENDOR");
9577
+ const isEkycSupervisor = roles.includes("EKYC_SUPERVISOR");
9481
9578
  const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
9482
9579
  status: "ACTIVE"
9483
9580
  }, {
9484
- enabled: isEkycVendor
9581
+ enabled: isEkycVendor && !isVendorPage
9485
9582
  }),
9486
9583
  vendorSearchResponse = _Digit$Hooks$fsm$useD.data,
9487
9584
  isVendorSearchLoading = _Digit$Hooks$fsm$useD.isLoading;
9585
+ const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
9586
+ status: "ACTIVE"
9587
+ }, {
9588
+ enabled: isEkycSupervisor
9589
+ }),
9590
+ supervisorSearchResponse = _Digit$Hooks$fsm$useS.data,
9591
+ isSupervisorSearchLoading = _Digit$Hooks$fsm$useS.isLoading;
9488
9592
  const matchedVendor = React.useMemo(() => {
9489
9593
  var _vendorSearchResponse, _vendorSearchResponse2;
9490
9594
  if (!vendorSearchResponse) return null;
@@ -9498,35 +9602,36 @@ const SelectEkycZones = _ref => {
9498
9602
  return userUuid && ownerUuid === userUuid || userMobile && ownerMobile === userMobile;
9499
9603
  })) === null || _vendorSearchResponse === void 0 ? void 0 : _vendorSearchResponse.dsoDetails) || ((_vendorSearchResponse2 = vendorSearchResponse[0]) === null || _vendorSearchResponse2 === void 0 ? void 0 : _vendorSearchResponse2.dsoDetails) || vendorSearchResponse[0];
9500
9604
  }, [vendorSearchResponse, loggedInUser]);
9501
- const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]),
9502
- boundaryData = _Digit$Hooks$useCommo.data,
9605
+ const matchedSupervisor = React.useMemo(() => {
9606
+ if (!(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) return null;
9607
+ return supervisorSearchResponse.supervisors.find(s => {
9608
+ var _s$id, _loggedInUser$uuid, _s$owner, _s$owner$uuid, _loggedInUser$uuid2, _s$owner2;
9609
+ return ((_s$id = s.id) === null || _s$id === void 0 ? void 0 : _s$id.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid = loggedInUser.uuid) === null || _loggedInUser$uuid === void 0 ? void 0 : _loggedInUser$uuid.toLowerCase()) || ((_s$owner = s.owner) === null || _s$owner === void 0 ? void 0 : (_s$owner$uuid = _s$owner.uuid) === null || _s$owner$uuid === void 0 ? void 0 : _s$owner$uuid.toLowerCase()) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : (_loggedInUser$uuid2 = loggedInUser.uuid) === null || _loggedInUser$uuid2 === void 0 ? void 0 : _loggedInUser$uuid2.toLowerCase()) || ((_s$owner2 = s.owner) === null || _s$owner2 === void 0 ? void 0 : _s$owner2.mobileNumber) === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber) || s.mobileNo === (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.mobileNumber);
9610
+ });
9611
+ }, [supervisorSearchResponse, loggedInUser]);
9612
+ const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS("dl", "common-masters", ["ZroOfficeList"]),
9613
+ zroData = _Digit$Hooks$useCommo.data,
9503
9614
  isLoading = _Digit$Hooks$useCommo.isLoading;
9504
9615
  useEffect(() => {
9505
- var _boundaryData$egovLo, _boundaryData$egovLo$, _boundaryData$MdmsRes, _boundaryData$MdmsRes2, _boundaryData$MdmsRes3;
9506
- 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]);
9507
- const boundaries = (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.boundary) || (tenantBoundary === null || tenantBoundary === void 0 ? void 0 : tenantBoundary.children) || [];
9508
- if (Array.isArray(boundaries === null || boundaries === void 0 ? void 0 : boundaries.children)) {
9509
- const allZones = boundaries.children.flatMap(assembly => (assembly.children || []).map(zone => ({
9510
- code: zone.code,
9511
- name: zone.name
9512
- })));
9513
- let zonesList = [...new Map(allZones.map(z => [z.code, z])).values()];
9514
- if (isEkycVendor && matchedVendor !== null && matchedVendor !== void 0 && matchedVendor.zoneIds) {
9515
- const assignedZoneCodes = matchedVendor.zoneIds.map(z => String(z).toUpperCase());
9516
- zonesList = zonesList.filter(z => assignedZoneCodes.includes(String(z.code).toUpperCase()) || assignedZoneCodes.includes(String(z.name).toUpperCase()));
9517
- }
9518
- setZones(zonesList);
9616
+ var _zroData$commonMaste, _zroData$MdmsRes, _zroData$MdmsRes$comm;
9617
+ const zroOfficeList = (zroData === null || zroData === void 0 ? void 0 : (_zroData$commonMaste = zroData["common-masters"]) === null || _zroData$commonMaste === void 0 ? void 0 : _zroData$commonMaste.ZroOfficeList) || (zroData === null || zroData === void 0 ? void 0 : (_zroData$MdmsRes = zroData.MdmsRes) === null || _zroData$MdmsRes === void 0 ? void 0 : (_zroData$MdmsRes$comm = _zroData$MdmsRes["common-masters"]) === null || _zroData$MdmsRes$comm === void 0 ? void 0 : _zroData$MdmsRes$comm.ZroOfficeList) || [];
9618
+ if (Array.isArray(zroOfficeList)) {
9619
+ const activeZros = zroOfficeList.filter(zro => zro && zro.active).map(zro => ({
9620
+ code: zro.code,
9621
+ name: zro.code
9622
+ }));
9623
+ setZones(activeZros);
9519
9624
  }
9520
- }, [boundaryData, isEkycVendor, matchedVendor]);
9625
+ }, [zroData]);
9521
9626
  useEffect(() => {
9522
9627
  if (!zones.length || !(formData !== null && formData !== void 0 && formData.zoneIds)) return;
9523
9628
  if (isMultiSelect) {
9524
9629
  if (!Array.isArray(formData.zoneIds)) return;
9525
- if (formData.zoneIds.length && typeof formData.zoneIds[0] === "object") {
9526
- setSelectedZones(formData.zoneIds);
9630
+ if (formData.zoneIds.length && typeof formData.zoneIds[0] === "object" && formData.zoneIds[0] !== null) {
9631
+ setSelectedZones(formData.zoneIds.filter(Boolean));
9527
9632
  return;
9528
9633
  }
9529
- const selected = zones.filter(zone => formData.zoneIds.includes(zone.name) || formData.zoneIds.includes(zone.code));
9634
+ const selected = zones.filter(zone => zone && (formData.zoneIds.includes(zone.name) || formData.zoneIds.includes(zone.code)));
9530
9635
  setSelectedZones(selected);
9531
9636
  if (!initialized.current) {
9532
9637
  initialized.current = true;
@@ -9538,10 +9643,10 @@ const SelectEkycZones = _ref => {
9538
9643
  var _selectedVal$, _selectedVal$2;
9539
9644
  selectedVal = ((_selectedVal$ = selectedVal[0]) === null || _selectedVal$ === void 0 ? void 0 : _selectedVal$.name) || ((_selectedVal$2 = selectedVal[0]) === null || _selectedVal$2 === void 0 ? void 0 : _selectedVal$2.code) || selectedVal[0] || "";
9540
9645
  }
9541
- if (typeof selectedVal === "object") {
9646
+ if (selectedVal && typeof selectedVal === "object") {
9542
9647
  selectedVal = selectedVal.name || selectedVal.code || "";
9543
9648
  }
9544
- const selected = zones.find(zone => zone.name === selectedVal || zone.code === selectedVal);
9649
+ const selected = zones.find(zone => zone && (zone.name === selectedVal || zone.code === selectedVal));
9545
9650
  setSelectedZones(selected ? [selected] : []);
9546
9651
  if (!initialized.current && selected) {
9547
9652
  initialized.current = true;
@@ -9549,6 +9654,13 @@ const SelectEkycZones = _ref => {
9549
9654
  }
9550
9655
  }
9551
9656
  }, [zones, formData === null || formData === void 0 ? void 0 : formData.zoneIds, config.key, onSelect, isMultiSelect]);
9657
+ useEffect(() => {
9658
+ if (isEkycSupervisor && zones.length > 0 && !(formData !== null && formData !== void 0 && formData.zoneIds) && !initialized.current) {
9659
+ initialized.current = true;
9660
+ setSelectedZones([zones[0]]);
9661
+ onSelect(config.key, zones[0].name || "");
9662
+ }
9663
+ }, [isEkycSupervisor, zones, formData === null || formData === void 0 ? void 0 : formData.zoneIds, config.key, onSelect]);
9552
9664
  const handleSelect = value => {
9553
9665
  if (isMultiSelect) {
9554
9666
  const selected = Array.isArray(value) ? value.map(v => Array.isArray(v) ? v[1] : v).filter(Boolean) : [];
@@ -9560,7 +9672,7 @@ const SelectEkycZones = _ref => {
9560
9672
  onSelect(config.key, (selectedZone === null || selectedZone === void 0 ? void 0 : selectedZone.name) || "");
9561
9673
  }
9562
9674
  };
9563
- if (isLoading || isEkycVendor && isVendorSearchLoading) return /*#__PURE__*/React.createElement(Loader, null);
9675
+ if (isLoading || isEkycVendor && !isVendorPage && isVendorSearchLoading || isEkycSupervisor && isSupervisorSearchLoading) return /*#__PURE__*/React.createElement(Loader, null);
9564
9676
  return /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(config.label), config.isMandatory ? /*#__PURE__*/React.createElement("span", {
9565
9677
  className: "check-page-link-button"
9566
9678
  }, " * ") : ""), /*#__PURE__*/React.createElement("div", {
@@ -9581,13 +9693,14 @@ const SelectEkycZones = _ref => {
9581
9693
  ServerStyle: {
9582
9694
  backgroundColor: "#fff"
9583
9695
  },
9584
- defaultLabel: isMultiSelect ? selectedZones.length + " Selected" : ""
9696
+ defaultLabel: isMultiSelect ? selectedZones.length + " Selected" : "",
9697
+ disable: disable || isEkycSupervisor || ((_config$props = config.props) === null || _config$props === void 0 ? void 0 : _config$props.disable) || config.disable
9585
9698
  })), isMultiSelect && selectedZones.length > 0 && /*#__PURE__*/React.createElement("div", {
9586
9699
  className: "selected-zones"
9587
- }, selectedZones.map(zone => /*#__PURE__*/React.createElement("span", {
9700
+ }, selectedZones.filter(zone => zone && zone.code).map(zone => /*#__PURE__*/React.createElement("span", {
9588
9701
  key: zone.code,
9589
9702
  className: "selected-zone-chip"
9590
- }, zone.name))));
9703
+ }, t(zone.code)))));
9591
9704
  };
9592
9705
 
9593
9706
  const SelectEkycClusters = _ref => {
@@ -9727,70 +9840,82 @@ const SelectEkycDropdown = _ref => {
9727
9840
  };
9728
9841
 
9729
9842
  const AdditionalDetails = _ref => {
9730
- var _formData$ownerKey, _formData$ownerKey2, _formData$ownerKey3, _formData$ownerKey4;
9843
+ var _formData$ownerKey, _formData$ownerKey2, _formData$ownerKey3, _formData$ownerKey4, _formData$config$key, _formData$config$key2, _formData$config$key3, _formData$config$key4, _formData$config$key5, _formData$config$key6, _formData$config$key7, _formData$config$key8, _formData$config$key9, _formData$config$key0, _formData$config$key1, _formData$config$key10, _formData$config$key11, _formData$config$key12, _formData$config$key13, _formData$config$key14, _formData$config$key15, _formData$config$key16;
9731
9844
  let t = _ref.t,
9732
9845
  config = _ref.config,
9733
9846
  onSelect = _ref.onSelect,
9734
9847
  userType = _ref.userType,
9735
9848
  formData = _ref.formData;
9736
9849
  let index = 0;
9850
+ const rawTenantId = Digit.ULBService.getCurrentTenantId();
9851
+ const tenantId = rawTenantId !== null && rawTenantId !== void 0 && rawTenantId.includes(".") ? rawTenantId : rawTenantId + ".djb";
9852
+ const vendorId = (formData === null || formData === void 0 ? void 0 : formData.vendor_id) || new URLSearchParams(window.location.search).get("vendorId");
9853
+ const _Digit$Hooks$vendor$u = Digit.Hooks.vendor.useEmpvendorCommonSearch({
9854
+ tenantId,
9855
+ filters: {
9856
+ vendorId: vendorId
9857
+ }
9858
+ }, {
9859
+ enabled: !!vendorId
9860
+ }),
9861
+ vendorAdditionalData = _Digit$Hooks$vendor$u.data;
9737
9862
  const user = Digit.UserService.getUser().info;
9738
9863
  const applicantName = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].applicantName || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey = formData.ownerKey) === null || _formData$ownerKey === void 0 ? void 0 : _formData$ownerKey.applicantName) || "";
9739
9864
  const emailId = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].emailId || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey2 = formData.ownerKey) === null || _formData$ownerKey2 === void 0 ? void 0 : _formData$ownerKey2.emailId) || "";
9740
9865
  const mobileNumber = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].mobileNumber || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey3 = formData.ownerKey) === null || _formData$ownerKey3 === void 0 ? void 0 : _formData$ownerKey3.mobileNumber) || (user === null || user === void 0 ? void 0 : user.mobileNumber);
9741
9866
  const altMobileNumber = formData.ownerKey && formData.ownerKey[index] && formData.ownerKey[index].altMobileNumber || (formData === null || formData === void 0 ? void 0 : (_formData$ownerKey4 = formData.ownerKey) === null || _formData$ownerKey4 === void 0 ? void 0 : _formData$ownerKey4.altmobileNumber) || "";
9742
- const _useState = useState(""),
9867
+ const _useState = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.VendorCategory) || ""),
9743
9868
  VendorCategory = _useState[0],
9744
9869
  setVendorCategory = _useState[1];
9745
- const _useState2 = useState(""),
9870
+ const _useState2 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.VendorId) || ""),
9746
9871
  VendorId = _useState2[0],
9747
9872
  setVendorId = _useState2[1];
9748
- const _useState3 = useState(""),
9873
+ const _useState3 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key3 = formData[config.key]) === null || _formData$config$key3 === void 0 ? void 0 : _formData$config$key3.name) || ""),
9749
9874
  userName = _useState3[0],
9750
9875
  setUserName = _useState3[1];
9751
- const _useState4 = useState(""),
9876
+ const _useState4 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key4 = formData[config.key]) === null || _formData$config$key4 === void 0 ? void 0 : _formData$config$key4.Bank) || ""),
9752
9877
  Bank = _useState4[0],
9753
9878
  setBank = _useState4[1];
9754
- const _useState5 = useState(),
9879
+ const _useState5 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key5 = formData[config.key]) === null || _formData$config$key5 === void 0 ? void 0 : _formData$config$key5.BankbranchName) || undefined),
9755
9880
  BankbranchName = _useState5[0],
9756
9881
  setBankbranchName = _useState5[1];
9757
- const _useState6 = useState(""),
9882
+ const _useState6 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key6 = formData[config.key]) === null || _formData$config$key6 === void 0 ? void 0 : _formData$config$key6.IFSC) || ""),
9758
9883
  IFSC = _useState6[0],
9759
9884
  setIFSC = _useState6[1];
9760
- const _useState7 = useState(""),
9885
+ const _useState7 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key7 = formData[config.key]) === null || _formData$config$key7 === void 0 ? void 0 : _formData$config$key7.AccountNo) || ""),
9761
9886
  AccountNo = _useState7[0],
9762
9887
  setAccountNo = _useState7[1];
9763
- const _useState8 = useState(""),
9888
+ const _useState8 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key8 = formData[config.key]) === null || _formData$config$key8 === void 0 ? void 0 : _formData$config$key8.PanNo) || ""),
9764
9889
  PanNo = _useState8[0],
9765
9890
  setPanNo = _useState8[1];
9766
- const _useState9 = useState(""),
9891
+ const _useState9 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key9 = formData[config.key]) === null || _formData$config$key9 === void 0 ? void 0 : _formData$config$key9.GstNo) || ""),
9767
9892
  GstNo = _useState9[0],
9768
9893
  setGstNo = _useState9[1];
9769
- const _useState0 = useState(""),
9894
+ const _useState0 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key0 = formData[config.key]) === null || _formData$config$key0 === void 0 ? void 0 : _formData$config$key0.GstState) || ""),
9770
9895
  GstState = _useState0[0],
9771
9896
  setGstState = _useState0[1];
9772
- const _useState1 = useState(""),
9897
+ const _useState1 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key1 = formData[config.key]) === null || _formData$config$key1 === void 0 ? void 0 : _formData$config$key1.RegistrationNo) || ""),
9773
9898
  RegistrationNo = _useState1[0],
9774
9899
  setRegistrationNo = _useState1[1];
9775
- const _useState10 = useState(""),
9900
+ const _useState10 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key10 = formData[config.key]) === null || _formData$config$key10 === void 0 ? void 0 : _formData$config$key10.EpfNo) || ""),
9776
9901
  EpfNo = _useState10[0],
9777
9902
  setEpfNo = _useState10[1];
9778
- const _useState11 = useState(""),
9903
+ const _useState11 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key11 = formData[config.key]) === null || _formData$config$key11 === void 0 ? void 0 : _formData$config$key11.EsiNo) || ""),
9779
9904
  EsiNo = _useState11[0],
9780
9905
  setEsiNo = _useState11[1];
9781
- const _useState12 = useState(""),
9906
+ const _useState12 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key12 = formData[config.key]) === null || _formData$config$key12 === void 0 ? void 0 : _formData$config$key12.VendorType) || ""),
9782
9907
  VendorType = _useState12[0],
9783
9908
  setVendorType = _useState12[1];
9784
- const _useState13 = useState(""),
9909
+ const _useState13 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key13 = formData[config.key]) === null || _formData$config$key13 === void 0 ? void 0 : _formData$config$key13.Status) || ""),
9785
9910
  Status = _useState13[0],
9786
9911
  setStatus = _useState13[1];
9787
- const _useState14 = useState(""),
9912
+ const _useState14 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key14 = formData[config.key]) === null || _formData$config$key14 === void 0 ? void 0 : _formData$config$key14.micrNo) || ""),
9788
9913
  micrNo = _useState14[0],
9789
9914
  setmicrNo = _useState14[1];
9790
- const _useState15 = useState(""),
9915
+ const _useState15 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key15 = formData[config.key]) === null || _formData$config$key15 === void 0 ? void 0 : _formData$config$key15.PhoneNo) || ""),
9791
9916
  PhoneNo = _useState15[0],
9792
9917
  setPhoneNo = _useState15[1];
9793
- const _useState16 = useState(""),
9918
+ const _useState16 = useState((formData === null || formData === void 0 ? void 0 : (_formData$config$key16 = formData[config.key]) === null || _formData$config$key16 === void 0 ? void 0 : _formData$config$key16.ContactPerson) || ""),
9794
9919
  ContactPerson = _useState16[0],
9795
9920
  setContactPerson = _useState16[1];
9796
9921
  useEffect(() => {
@@ -9850,22 +9975,59 @@ const AdditionalDetails = _ref => {
9850
9975
  function setcontactperson(e) {
9851
9976
  setContactPerson(e.target.value);
9852
9977
  }
9853
- const tenantId = Digit.ULBService.getCurrentTenantId();
9854
9978
  const _useForm = useForm(),
9855
9979
  control = _useForm.control;
9856
9980
  const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
9981
+ ids: vendorId
9982
+ }, {
9983
+ enabled: !!vendorId,
9857
9984
  staleTime: Infinity
9858
9985
  }),
9859
9986
  dsoData = _Digit$Hooks$fsm$useD.data;
9860
9987
  useEffect(() => {
9861
- if (dsoData) {
9862
- const vendor = dsoData.find(item => item.id);
9863
- if (vendor) {
9864
- setUserName(vendor.name);
9865
- setVendorId(vendor.id);
9866
- }
9988
+ if (dsoData && dsoData.length > 0) {
9989
+ const vendor = dsoData[0];
9990
+ setUserName(vendor.name);
9991
+ setVendorId(vendor.id);
9867
9992
  }
9868
9993
  }, [dsoData]);
9994
+ useEffect(() => {
9995
+ var _vendorAdditionalData, _vendorAdditionalData2;
9996
+ if (vendorAdditionalData !== null && vendorAdditionalData !== void 0 && (_vendorAdditionalData = vendorAdditionalData.VendorDetails) !== null && _vendorAdditionalData !== void 0 && (_vendorAdditionalData2 = _vendorAdditionalData[0]) !== null && _vendorAdditionalData2 !== void 0 && _vendorAdditionalData2.vendorAdditionalDetails) {
9997
+ const details = vendorAdditionalData.VendorDetails[0].vendorAdditionalDetails;
9998
+ if (details.ifscCode) setIFSC(details.ifscCode);
9999
+ if (details.bank) setBank(details.bank);
10000
+ if (details.bankBranchName) setBankbranchName(details.bankBranchName);
10001
+ if (details.micrNo) setmicrNo(details.micrNo);
10002
+ if (details.bankAccountNumber) setAccountNo(details.bankAccountNumber);
10003
+ if (details.vendorPhone) setPhoneNo(details.vendorPhone);
10004
+ if (details.contactPerson) setContactPerson(details.contactPerson);
10005
+ if (details.panNo) setPanNo(details.panNo);
10006
+ if (details.gstTinNo) setGstNo(details.gstTinNo);
10007
+ if (details.gstRegisteredState) setGstState(details.gstRegisteredState);
10008
+ if (details.registrationNo) setRegistrationNo(details.registrationNo);
10009
+ if (details.epfNo) setEpfNo(details.epfNo);
10010
+ if (details.esiNo) setEsiNo(details.esiNo);
10011
+ if (details.serviceType) {
10012
+ setVendorType({
10013
+ code: details.serviceType,
10014
+ i18nKey: details.serviceType === "SUPPLIER" ? "Supplier" : details.serviceType === "CONTRACTOR" ? "Contractor" : details.serviceType
10015
+ });
10016
+ }
10017
+ if (details.vendorCategory) {
10018
+ setVendorCategory({
10019
+ code: details.vendorCategory,
10020
+ i18nKey: details.vendorCategory === "FIRM" ? "Firm" : details.vendorCategory === "Individual" ? "Individual" : details.vendorCategory
10021
+ });
10022
+ }
10023
+ if (details.status) {
10024
+ setStatus({
10025
+ code: details.status,
10026
+ i18nKey: details.status === "ACTIVE" ? "Active" : details.status === "INACTIVE" ? "Inactive" : details.status
10027
+ });
10028
+ }
10029
+ }
10030
+ }, [vendorAdditionalData]);
9869
10031
  const goNext = () => {
9870
10032
  let owner = formData.ownerKey && formData.ownerKey[index];
9871
10033
  let ownerStep;