@djb25/digit-ui-module-ekyc 1.0.70 → 1.0.71

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.
@@ -8,25 +8,23 @@ import { FaBuilding, FaUser, FaClock, FaChartLine, FaUsers, FaCheckCircle } from
8
8
 
9
9
  const EKYCCard = () => {
10
10
  var _Digit$SessionStorage, _Digit$SessionStorage2;
11
- const {
12
- t
13
- } = useTranslation();
11
+ const _useTranslation = useTranslation(),
12
+ t = _useTranslation.t;
14
13
  if (!Digit.Utils.ekycAccess()) {
15
14
  return null;
16
15
  }
17
16
  const tenantId = Digit.ULBService.getCurrentTenantId();
18
17
  const citizenInfo = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : _Digit$SessionStorage2.roles;
19
18
  const roles = Array.isArray(citizenInfo) ? citizenInfo.map(ele => ele.code || ele) : [];
20
- const {
21
- data: listData,
22
- isLoading
23
- } = Digit.Hooks.ekyc.useEkycApplicationList({}, {
24
- tenantId,
25
- offset: 0,
26
- limit: 1
27
- }, {
28
- enabled: !!tenantId
29
- });
19
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycApplicationList({}, {
20
+ tenantId,
21
+ offset: 0,
22
+ limit: 1
23
+ }, {
24
+ enabled: !!tenantId
25
+ }),
26
+ listData = _Digit$Hooks$ekyc$use.data,
27
+ isLoading = _Digit$Hooks$ekyc$use.isLoading;
30
28
  const totalCount = isLoading ? "-" : (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
31
29
  const isCitizen = window.location.pathname.includes("/citizen");
32
30
  const prefix = isCitizen ? "/digit-ui/citizen/ekyc" : "/digit-ui/employee/ekyc";
@@ -35,57 +33,57 @@ const EKYCCard = () => {
35
33
  if (roles.includes("EKYC_SURVEYOR")) {
36
34
  links.push({
37
35
  label: t("SURVEYOR_DASHBOARD"),
38
- link: `${prefix}/surveyor-dashboard`
36
+ link: prefix + "/surveyor-dashboard"
39
37
  });
40
38
  }
41
39
  if (roles.includes("EKYC_SUPERVISOR") || roles.includes("EKYC_VENDOR")) {
42
40
  links.push({
43
41
  count: totalCount,
44
42
  label: t("EKYC_INBOX"),
45
- link: `${prefix}/inbox`
43
+ link: prefix + "/inbox"
46
44
  });
47
45
  }
48
46
  if (roles.includes("EKYC_SUPERVISOR")) {
49
47
  links.push({
50
48
  label: t("EKYC_SUPERVISOR_DASHBOARD"),
51
- link: `${prefix}/supervisor-dashboard`
49
+ link: prefix + "/supervisor-dashboard"
52
50
  }, {
53
51
  label: t("EKYC_ASSIGN"),
54
- link: `${prefix}/assign`
52
+ link: prefix + "/assign"
55
53
  });
56
54
  }
57
55
  if (roles.includes("EKYC_VENDOR")) {
58
56
  links.push({
59
57
  label: t("EKYC_VENDOR_DASHBOARD"),
60
- link: `${prefix}/vendor-dashboard`
58
+ link: prefix + "/vendor-dashboard"
61
59
  });
62
60
  }
63
61
  if (roles.includes("EKYC_SUPERVISOR") || roles.includes("EKYC_VENDOR")) {
64
62
  links.push({
65
63
  label: t("TITLE_VENDOR_MANAGEMENT"),
66
- link: `/digit-ui/citizen/vendor/search-vendor`
64
+ link: "/digit-ui/citizen/vendor/search-vendor"
67
65
  });
68
66
  }
69
67
  if (links.length === 0 || roles.length === 1 && roles.includes("CITIZEN")) {
70
68
  links.push({
71
69
  label: t("EKYC_STATUS"),
72
- link: `${prefix}/:id`
70
+ link: prefix + "/:id"
73
71
  });
74
72
  }
75
73
  } else {
76
74
  links = [{
77
75
  label: t("EKYC_ADMIN_DASHBOARD") || "Admin Dashboard",
78
- link: `${prefix}/admin-dashboard`
76
+ link: prefix + "/admin-dashboard"
79
77
  }, {
80
78
  count: totalCount,
81
79
  label: t("EKYC_INBOX"),
82
- link: `${prefix}/inbox`
80
+ link: prefix + "/inbox"
83
81
  }, {
84
82
  label: t("EKYC_WORK_ORDER"),
85
- link: `${prefix}/work-order`
83
+ link: prefix + "/work-order"
86
84
  }, ...(!roles.includes("EMPLOYEE") ? [{
87
85
  label: t("EKYC_ASSIGN"),
88
- link: `${prefix}/assign`
86
+ link: prefix + "/assign"
89
87
  }] : [])];
90
88
  }
91
89
  const propsForModuleCard = {
@@ -94,13 +92,32 @@ const EKYCCard = () => {
94
92
  kpis: isCitizen ? [] : [{
95
93
  count: totalCount,
96
94
  label: t("TOTAL_EKYC"),
97
- link: `${prefix}/admin-dashboard`
95
+ link: prefix + "/admin-dashboard"
98
96
  }],
99
97
  links: links
100
98
  };
101
99
  return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
102
100
  };
103
101
 
102
+ function _extends() {
103
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
104
+ for (var e = 1; e < arguments.length; e++) {
105
+ var t = arguments[e];
106
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
107
+ }
108
+ return n;
109
+ }, _extends.apply(null, arguments);
110
+ }
111
+ function _objectWithoutPropertiesLoose(r, e) {
112
+ if (null == r) return {};
113
+ var t = {};
114
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
115
+ if (-1 !== e.indexOf(n)) continue;
116
+ t[n] = r[n];
117
+ }
118
+ return t;
119
+ }
120
+
104
121
  const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
105
122
  const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
106
123
  function _catch(body, recover) {
@@ -293,19 +310,24 @@ const getChartConstructor = () => {
293
310
  };
294
311
  const StatusCards = _ref => {
295
312
  var _Digit$SessionStorage;
296
- let {
297
- countData
298
- } = _ref;
299
- const {
300
- t
301
- } = useTranslation();
302
- const [ekycDownloadLoading, setEkycDownloadLoading] = useState(false);
303
- const [showReportMenu, setShowReportMenu] = useState(false);
304
- const [customDate, setCustomDate] = useState({
305
- from: "",
306
- to: ""
307
- });
308
- const [showCustomPicker, setShowCustomPicker] = useState(false);
313
+ let countData = _ref.countData;
314
+ const _useTranslation = useTranslation(),
315
+ t = _useTranslation.t;
316
+ const _useState = useState(false),
317
+ ekycDownloadLoading = _useState[0],
318
+ setEkycDownloadLoading = _useState[1];
319
+ const _useState2 = useState(false),
320
+ showReportMenu = _useState2[0],
321
+ setShowReportMenu = _useState2[1];
322
+ const _useState3 = useState({
323
+ from: "",
324
+ to: ""
325
+ }),
326
+ customDate = _useState3[0],
327
+ setCustomDate = _useState3[1];
328
+ const _useState4 = useState(false),
329
+ showCustomPicker = _useState4[0],
330
+ setShowCustomPicker = _useState4[1];
309
331
  const reportMenuRef = useRef(null);
310
332
  useEffect(() => {
311
333
  const handler = e => {
@@ -328,25 +350,23 @@ const StatusCards = _ref => {
328
350
  setEkycDownloadLoading(true);
329
351
  return Promise.resolve(_finallyRethrows(function () {
330
352
  return _catch(function () {
331
- return Promise.resolve(Digit.EkycService.application_list({
353
+ return Promise.resolve(Digit.EkycService.application_list(_extends({
332
354
  tenantId: tenantId,
333
355
  offset: 0,
334
356
  limit: 10000,
335
- reportDownload: true,
336
- ...(fromDate && {
337
- fromDate
338
- }),
339
- ...(toDate && {
340
- toDate
341
- })
342
- })).then(function (response) {
357
+ reportDownload: true
358
+ }, fromDate && {
359
+ fromDate
360
+ }, toDate && {
361
+ toDate
362
+ }))).then(function (response) {
343
363
  const consumerList = (response === null || response === void 0 ? void 0 : response.consumerList) || [];
344
364
  if (consumerList.length === 0) {
345
365
  alert(t("NO_DATA_FOUND") || "No data found for download.");
346
366
  return;
347
367
  }
348
368
  const excelData = getEkycExcelData(consumerList, t);
349
- const cleanFileName = `eKYC_All_Data_Admin_${fullName.replace(/[^a-zA-Z0-9]/g, "_")}`;
369
+ const cleanFileName = "eKYC_All_Data_Admin_" + fullName.replace(/[^a-zA-Z0-9]/g, "_");
350
370
  Digit.Download.Excel(excelData, cleanFileName);
351
371
  });
352
372
  }, function (error) {
@@ -519,10 +539,8 @@ const StatusCards = _ref => {
519
539
  label: t("THIS_MONTH") || "This Month",
520
540
  key: "month"
521
541
  }].map(_ref2 => {
522
- let {
523
- label,
524
- key
525
- } = _ref2;
542
+ let label = _ref2.label,
543
+ key = _ref2.key;
526
544
  return /*#__PURE__*/React.createElement("div", {
527
545
  key: key,
528
546
  className: "menu-item",
@@ -538,17 +556,15 @@ const StatusCards = _ref => {
538
556
  }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "From"), /*#__PURE__*/React.createElement("input", {
539
557
  type: "date",
540
558
  value: customDate.from,
541
- onChange: e => setCustomDate({
542
- ...customDate,
559
+ onChange: e => setCustomDate(_extends({}, customDate, {
543
560
  from: e.target.value
544
- })
561
+ }))
545
562
  })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "To"), /*#__PURE__*/React.createElement("input", {
546
563
  type: "date",
547
564
  value: customDate.to,
548
- onChange: e => setCustomDate({
549
- ...customDate,
565
+ onChange: e => setCustomDate(_extends({}, customDate, {
550
566
  to: e.target.value
551
- })
567
+ }))
552
568
  }))), /*#__PURE__*/React.createElement("div", {
553
569
  style: {
554
570
  display: "flex",
@@ -610,10 +626,8 @@ const StatusCards = _ref => {
610
626
  };
611
627
 
612
628
  const Dashboard = _ref => {
613
- let {
614
- progressData,
615
- isProgressLoading
616
- } = _ref;
629
+ let progressData = _ref.progressData,
630
+ isProgressLoading = _ref.isProgressLoading;
617
631
  const countData = {
618
632
  total: (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnosInSystem) || 0,
619
633
  completed: (progressData === null || progressData === void 0 ? void 0 : progressData.completedKnosInZones) || 0,
@@ -665,31 +679,26 @@ const EkycDashboardSkeleton = () => {
665
679
  })))))));
666
680
  };
667
681
 
682
+ const _excluded = ["tableConfig", "filterComponent"];
668
683
  const DesktopInbox = _ref => {
669
684
  var _Digit$ComponentRegis;
670
- let {
671
- tableConfig,
672
- filterComponent,
673
- ...props
674
- } = _ref;
675
- const {
676
- data,
677
- isLoading,
678
- onSort,
679
- onNextPage,
680
- onPrevPage,
681
- currentPage,
682
- pageSizeLimit,
683
- onPageSizeChange,
684
- parentRoute,
685
- searchParams,
686
- sortParams,
687
- totalRecords,
688
- countData
689
- } = props;
690
- const {
691
- t
692
- } = useTranslation();
685
+ let filterComponent = _ref.filterComponent,
686
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
687
+ const data = props.data,
688
+ isLoading = props.isLoading,
689
+ onSort = props.onSort,
690
+ onNextPage = props.onNextPage,
691
+ onPrevPage = props.onPrevPage,
692
+ currentPage = props.currentPage,
693
+ pageSizeLimit = props.pageSizeLimit,
694
+ onPageSizeChange = props.onPageSizeChange,
695
+ parentRoute = props.parentRoute,
696
+ searchParams = props.searchParams,
697
+ sortParams = props.sortParams,
698
+ totalRecords = props.totalRecords,
699
+ countData = props.countData;
700
+ const _useTranslation = useTranslation(),
701
+ t = _useTranslation.t;
693
702
  const toTitleCase = str => {
694
703
  if (!str) return "";
695
704
  return String(str).toLowerCase().replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
@@ -697,11 +706,12 @@ const DesktopInbox = _ref => {
697
706
  const history = useHistory();
698
707
  const tenantId = Digit.ULBService.getCurrentTenantId();
699
708
  const FilterComponent = (_Digit$ComponentRegis = Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent(filterComponent);
700
- const [selectedKno, setSelectedKno] = useState("");
701
- const {
702
- data: reviewData,
703
- getReview
704
- } = Digit.Hooks.ekyc.useEkycAPI("review", tenantId);
709
+ const _useState = useState(""),
710
+ selectedKno = _useState[0],
711
+ setSelectedKno = _useState[1];
712
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAPI("review", tenantId),
713
+ reviewData = _Digit$Hooks$ekyc$use.data,
714
+ getReview = _Digit$Hooks$ekyc$use.getReview;
705
715
  const handleReview = kno => {
706
716
  setSelectedKno(kno);
707
717
  getReview({
@@ -722,9 +732,7 @@ const DesktopInbox = _ref => {
722
732
  accessor: "applicationNumber",
723
733
  Cell: _ref2 => {
724
734
  var _row$original, _row$original2;
725
- let {
726
- row
727
- } = _ref2;
735
+ let row = _ref2.row;
728
736
  const kno = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.kno) || ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationNumber) || "NA";
729
737
  return /*#__PURE__*/React.createElement("span", {
730
738
  className: "link",
@@ -736,9 +744,7 @@ const DesktopInbox = _ref => {
736
744
  accessor: "citizenName",
737
745
  Cell: _ref3 => {
738
746
  var _row$original3;
739
- let {
740
- row
741
- } = _ref3;
747
+ let row = _ref3.row;
742
748
  return /*#__PURE__*/React.createElement("span", null, toTitleCase((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.citizenName) || "NA");
743
749
  }
744
750
  }, {
@@ -746,12 +752,10 @@ const DesktopInbox = _ref => {
746
752
  accessor: "actionStatus",
747
753
  Cell: _ref4 => {
748
754
  var _row$original4, _row$original5;
749
- let {
750
- row
751
- } = _ref4;
755
+ let row = _ref4.row;
752
756
  const status = (((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT").toUpperCase();
753
757
  return /*#__PURE__*/React.createElement("span", {
754
- className: `ekyc-status-tag ${status}`
758
+ className: "ekyc-status-tag " + status
755
759
  }, toTitleCase(((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.status) || "DEFAULT"));
756
760
  }
757
761
  }, {
@@ -759,13 +763,11 @@ const DesktopInbox = _ref => {
759
763
  accessor: "ekycStatus",
760
764
  Cell: _ref5 => {
761
765
  var _row$original6, _row$original7;
762
- let {
763
- row
764
- } = _ref5;
766
+ let row = _ref5.row;
765
767
  const raw = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.ekycStatus) || ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.ekycstatus) || "NA";
766
768
  const ekycStatus = raw.toUpperCase();
767
769
  return /*#__PURE__*/React.createElement("span", {
768
- className: `ekyc-status-tag ${ekycStatus}`
770
+ className: "ekyc-status-tag " + ekycStatus
769
771
  }, toTitleCase(raw));
770
772
  }
771
773
  }, {
@@ -773,9 +775,7 @@ const DesktopInbox = _ref => {
773
775
  accessor: "status",
774
776
  Cell: _ref6 => {
775
777
  var _row$original8, _row$original9;
776
- let {
777
- row
778
- } = _ref6;
778
+ let row = _ref6.row;
779
779
  const kno = ((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.kno) || ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.applicationNumber) || "NA";
780
780
  return /*#__PURE__*/React.createElement("span", {
781
781
  className: "link",
@@ -840,24 +840,20 @@ const DesktopInbox = _ref => {
840
840
  }))))));
841
841
  };
842
842
 
843
+ const _excluded$1 = ["onSearch", "searchParams", "FilterComponent", "children"];
843
844
  const SearchConsumer = _ref => {
844
845
  var _props$countData, _props$countData2, _props$countData3;
845
- let {
846
- onSearch,
847
- searchParams,
848
- FilterComponent,
849
- children,
850
- ...props
851
- } = _ref;
852
- const {
853
- t
854
- } = useTranslation();
855
- const [_searchParams, setSearchParams] = useState(() => ({
856
- ...searchParams
857
- }));
846
+ let onSearch = _ref.onSearch,
847
+ searchParams = _ref.searchParams,
848
+ children = _ref.children,
849
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
850
+ const _useTranslation = useTranslation(),
851
+ t = _useTranslation.t;
852
+ const _useState = useState(() => _extends({}, searchParams)),
853
+ _searchParams = _useState[0],
854
+ setSearchParams = _useState[1];
858
855
  const onChange = (key, value) => {
859
- setSearchParams(prev => ({
860
- ...prev,
856
+ setSearchParams(prev => _extends({}, prev, {
861
857
  [key]: value
862
858
  }));
863
859
  };
@@ -989,24 +985,21 @@ const SearchConsumer = _ref => {
989
985
 
990
986
  const MobileInbox = _ref => {
991
987
  var _data$items;
992
- let {
993
- data,
994
- isLoading,
995
- onSearch,
996
- searchParams,
997
- parentRoute,
998
- countData
999
- } = _ref;
1000
- const {
1001
- t
1002
- } = useTranslation();
988
+ let data = _ref.data,
989
+ isLoading = _ref.isLoading,
990
+ onSearch = _ref.onSearch,
991
+ searchParams = _ref.searchParams,
992
+ parentRoute = _ref.parentRoute,
993
+ countData = _ref.countData;
994
+ const _useTranslation = useTranslation(),
995
+ t = _useTranslation.t;
1003
996
  const mobileData = (data === null || data === void 0 ? void 0 : (_data$items = data.items) === null || _data$items === void 0 ? void 0 : _data$items.map(item => ({
1004
997
  [t("EKYC_APPLICATION_NO")]: item.applicationNumber,
1005
998
  [t("EKYC_CITIZEN_NAME")]: item.citizenName,
1006
999
  [t("EKYC_MOBILE_NO")]: item.mobileNumber,
1007
1000
  [t("EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
1008
- className: `ekyc-status-tag ${item.status}`
1009
- }, t(`EKYC_STATUS_${item.status}`))
1001
+ className: "ekyc-status-tag " + item.status
1002
+ }, t("EKYC_STATUS_" + item.status))
1010
1003
  }))) || [];
1011
1004
  return /*#__PURE__*/React.createElement("div", {
1012
1005
  className: "inbox-wrapper"
@@ -1015,7 +1008,7 @@ const MobileInbox = _ref => {
1015
1008
  }, /*#__PURE__*/React.createElement(Header, {
1016
1009
  className: "title"
1017
1010
  }, t("EKYC_INBOX_HEADER")), /*#__PURE__*/React.createElement(Link, {
1018
- to: `${parentRoute}/create-kyc`
1011
+ to: parentRoute + "/create-kyc"
1019
1012
  }, /*#__PURE__*/React.createElement(SubmitBar, {
1020
1013
  label: t("EKYC_CREATE_KYC")
1021
1014
  }))), /*#__PURE__*/React.createElement("div", {
@@ -1031,7 +1024,7 @@ const MobileInbox = _ref => {
1031
1024
  data: mobileData,
1032
1025
  t: t,
1033
1026
  serviceRequestIdKey: t("EKYC_APPLICATION_NO"),
1034
- linkPrefix: `${parentRoute}/application-details/`
1027
+ linkPrefix: parentRoute + "/application-details/"
1035
1028
  }) : /*#__PURE__*/React.createElement(Card, null, t("ES_COMMON_NO_DATA").split("\\n").map((text, index) => /*#__PURE__*/React.createElement("p", {
1036
1029
  key: index,
1037
1030
  style: {
@@ -1040,37 +1033,28 @@ const MobileInbox = _ref => {
1040
1033
  }, text)))));
1041
1034
  };
1042
1035
 
1036
+ const _excluded$2 = ["searchParams", "onFilterChange", "defaultSearchParams", "statusMap", "moduleCode"];
1043
1037
  const Filter = _ref => {
1044
- let {
1045
- searchParams,
1046
- onFilterChange,
1047
- defaultSearchParams,
1048
- statusMap,
1049
- moduleCode,
1050
- ...props
1051
- } = _ref;
1052
- const {
1053
- t
1054
- } = useTranslation();
1055
- const [_searchParams, setSearchParams] = useState(() => ({
1056
- ...searchParams
1057
- }));
1038
+ let searchParams = _ref.searchParams,
1039
+ onFilterChange = _ref.onFilterChange,
1040
+ defaultSearchParams = _ref.defaultSearchParams,
1041
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
1042
+ const _useTranslation = useTranslation(),
1043
+ t = _useTranslation.t;
1044
+ const _useState = useState(() => _extends({}, searchParams)),
1045
+ _searchParams = _useState[0],
1046
+ setSearchParams = _useState[1];
1058
1047
  const applyLocalFilters = () => {
1059
1048
  onFilterChange(_searchParams);
1060
1049
  };
1061
1050
  const clearAll = () => {
1062
- setSearchParams({
1063
- ...defaultSearchParams
1064
- });
1065
- onFilterChange({
1066
- ...defaultSearchParams
1067
- });
1051
+ setSearchParams(_extends({}, defaultSearchParams));
1052
+ onFilterChange(_extends({}, defaultSearchParams));
1068
1053
  };
1069
1054
  const onStatusChange = value => {
1070
- const newParams = {
1071
- ..._searchParams,
1055
+ const newParams = _extends({}, _searchParams, {
1072
1056
  status: value
1073
- };
1057
+ });
1074
1058
  setSearchParams(newParams);
1075
1059
  onFilterChange(newParams);
1076
1060
  };
@@ -1108,34 +1092,17 @@ const Filter = _ref => {
1108
1092
  })));
1109
1093
  };
1110
1094
 
1111
- function _extends() {
1112
- return _extends = Object.assign ? Object.assign.bind() : function (n) {
1113
- for (var e = 1; e < arguments.length; e++) {
1114
- var t = arguments[e];
1115
- for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
1116
- }
1117
- return n;
1118
- }, _extends.apply(null, arguments);
1119
- }
1120
-
1121
1095
  const downloadSurveyorPDF = function (_ref) {
1122
- let {
1123
- rows,
1124
- surveyorName,
1125
- employeeId,
1126
- mobileNumber,
1127
- vendorName,
1128
- supervisorName,
1129
- dashboardInfo,
1130
- t
1131
- } = _ref;
1096
+ let rows = _ref.rows,
1097
+ surveyorName = _ref.surveyorName,
1098
+ employeeId = _ref.employeeId,
1099
+ mobileNumber = _ref.mobileNumber,
1100
+ vendorName = _ref.vendorName,
1101
+ supervisorName = _ref.supervisorName,
1102
+ dashboardInfo = _ref.dashboardInfo,
1103
+ t = _ref.t;
1132
1104
  try {
1133
1105
  const tenantId = Digit.ULBService.getCurrentTenantId();
1134
- const initData = Digit.SessionStorage.get("initData");
1135
- const tenants = (initData === null || initData === void 0 ? void 0 : initData.tenants) || [];
1136
- const tenantInfo = tenants.find(tenant => tenant.code === tenantId);
1137
- const capitalize = text => text && text.substr(0, 1).toUpperCase() + text.substr(1);
1138
- const ulbCamel = ulb => ulb && ulb.toLowerCase().split(" ").map(capitalize).join(" ");
1139
1106
  const name = "Delhi Jal Board";
1140
1107
  const email = "contact@delhijalboard.nic.in";
1141
1108
  const phoneNumber = "+91-11-23538416";
@@ -1151,7 +1118,7 @@ const downloadSurveyorPDF = function (_ref) {
1151
1118
  second: "2-digit",
1152
1119
  hour12: false
1153
1120
  });
1154
- const downloadDateTime = `${formattedDate} ${formattedTime}`;
1121
+ const downloadDateTime = formattedDate + " " + formattedTime;
1155
1122
  const isValDefined = val => val !== undefined && val !== null && val !== "";
1156
1123
  const details = [{
1157
1124
  title: t("SURVEYOR_DETAILS"),
@@ -1210,14 +1177,12 @@ const downloadSurveyorPDF = function (_ref) {
1210
1177
  }
1211
1178
  };
1212
1179
  const downloadSupervisorPDF = function (_ref2) {
1213
- let {
1214
- rows,
1215
- supervisorName,
1216
- mobileNumber,
1217
- vendorName,
1218
- dashboardInfo,
1219
- t
1220
- } = _ref2;
1180
+ let rows = _ref2.rows,
1181
+ supervisorName = _ref2.supervisorName,
1182
+ mobileNumber = _ref2.mobileNumber,
1183
+ vendorName = _ref2.vendorName,
1184
+ dashboardInfo = _ref2.dashboardInfo,
1185
+ t = _ref2.t;
1221
1186
  try {
1222
1187
  const tenantId = Digit.ULBService.getCurrentTenantId();
1223
1188
  const name = "Delhi Jal Board";
@@ -1235,7 +1200,7 @@ const downloadSupervisorPDF = function (_ref2) {
1235
1200
  second: "2-digit",
1236
1201
  hour12: false
1237
1202
  });
1238
- const downloadDateTime = `${formattedDate} ${formattedTime}`;
1203
+ const downloadDateTime = formattedDate + " " + formattedTime;
1239
1204
  const isValDefined = val => val !== undefined && val !== null && val !== "";
1240
1205
  const details = [{
1241
1206
  title: t("SUPERVISOR_DETAILS") || "Supervisor Details",
@@ -1275,21 +1240,11 @@ const downloadSupervisorPDF = function (_ref2) {
1275
1240
  lastName: "",
1276
1241
  mobileNo: row.status || "N/A",
1277
1242
  zoneName: String(row.total || 0),
1278
- ekycStatus: `${row.completed || 0} / ${row.pending || 0}`,
1279
- progress: row.progress || "0%"
1243
+ ekycStatus: (row.completed || 0) + " / " + (row.pending || 0),
1244
+ progress: row.progress || "0%",
1245
+ submittedAt: null
1280
1246
  };
1281
1247
  });
1282
- const originalToLocaleDateString = Date.prototype.toLocaleDateString;
1283
- let progressIndex = 0;
1284
- Date.prototype.toLocaleDateString = function () {
1285
- if (progressIndex < mappedRows.length) {
1286
- return mappedRows[progressIndex++].progress || "0%";
1287
- }
1288
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
1289
- args[_key] = arguments[_key];
1290
- }
1291
- return originalToLocaleDateString.apply(this, args);
1292
- };
1293
1248
  const customT = key => {
1294
1249
  if (key === "KNO") return t("SURVEYOR_NAME") || "Surveyor Name";
1295
1250
  if (key === "CONSUMER") return t("MOBILE_NUMBER") || "Mobile Number";
@@ -1319,23 +1274,19 @@ const downloadSupervisorPDF = function (_ref2) {
1319
1274
  } else {
1320
1275
  console.error("Digit.Utils.pdf.generateSurveyorReport is not available");
1321
1276
  }
1322
- } finally {
1323
- Date.prototype.toLocaleDateString = originalToLocaleDateString;
1324
- }
1277
+ } catch (_unused) {}
1325
1278
  return Promise.resolve();
1326
1279
  } catch (e) {
1327
1280
  return Promise.reject(e);
1328
1281
  }
1329
1282
  };
1330
1283
  const downloadVendorPDF = function (_ref3) {
1331
- let {
1332
- rows,
1333
- vendorName,
1334
- mobileNumber,
1335
- email,
1336
- dashboardInfo,
1337
- t
1338
- } = _ref3;
1284
+ let rows = _ref3.rows,
1285
+ vendorName = _ref3.vendorName,
1286
+ mobileNumber = _ref3.mobileNumber,
1287
+ email = _ref3.email,
1288
+ dashboardInfo = _ref3.dashboardInfo,
1289
+ t = _ref3.t;
1339
1290
  try {
1340
1291
  const tenantId = Digit.ULBService.getCurrentTenantId();
1341
1292
  const name = "Delhi Jal Board";
@@ -1353,7 +1304,7 @@ const downloadVendorPDF = function (_ref3) {
1353
1304
  second: "2-digit",
1354
1305
  hour12: false
1355
1306
  });
1356
- const downloadDateTime = `${formattedDate} ${formattedTime}`;
1307
+ const downloadDateTime = formattedDate + " " + formattedTime;
1357
1308
  const isValDefined = val => val !== undefined && val !== null && val !== "";
1358
1309
  const details = [{
1359
1310
  title: t("VENDOR_DETAILS") || "Vendor Details",
@@ -1391,20 +1342,9 @@ const downloadVendorPDF = function (_ref3) {
1391
1342
  lastName: "",
1392
1343
  mobileNo: row.status || "N/A",
1393
1344
  zoneName: String(row.total || 0),
1394
- ekycStatus: `${row.completed || 0} / ${row.pending || 0}`,
1345
+ ekycStatus: (row.completed || 0) + " / " + (row.pending || 0),
1395
1346
  progress: row.progress || "0%"
1396
1347
  }));
1397
- const originalToLocaleDateString = Date.prototype.toLocaleDateString;
1398
- let progressIndex = 0;
1399
- Date.prototype.toLocaleDateString = function () {
1400
- if (progressIndex < mappedRows.length) {
1401
- return mappedRows[progressIndex++].progress || "0%";
1402
- }
1403
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
1404
- args[_key2] = arguments[_key2];
1405
- }
1406
- return originalToLocaleDateString.apply(this, args);
1407
- };
1408
1348
  const customT = key => {
1409
1349
  if (key === "KNO") return t("SUPERVISOR_NAME") || "Supervisor Name";
1410
1350
  if (key === "CONSUMER") return t("MOBILE_NUMBER") || "Mobile Number";
@@ -1433,9 +1373,7 @@ const downloadVendorPDF = function (_ref3) {
1433
1373
  } else {
1434
1374
  console.error("Digit.Utils.pdf.generateSurveyorReport is not available");
1435
1375
  }
1436
- } finally {
1437
- Date.prototype.toLocaleDateString = originalToLocaleDateString;
1438
- }
1376
+ } catch (_unused2) {}
1439
1377
  return Promise.resolve();
1440
1378
  } catch (e) {
1441
1379
  return Promise.reject(e);
@@ -1444,40 +1382,38 @@ const downloadVendorPDF = function (_ref3) {
1444
1382
 
1445
1383
  const VendorDetailsCard = () => {
1446
1384
  var _vendor$owner, _vendor$owner2, _vendorName$charAt, _progressData$supervi;
1447
- const {
1448
- t
1449
- } = useTranslation();
1385
+ const _useTranslation = useTranslation(),
1386
+ t = _useTranslation.t;
1450
1387
  const history = useHistory();
1451
1388
  const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
1452
- const {
1453
- vendorId
1454
- } = useParams();
1455
- const {
1456
- data: {
1457
- vendor: [vendor] = []
1458
- } = {},
1459
- isLoading: isVendorSearchLoading
1460
- } = Digit.Hooks.fsm.useVendorSearch({
1461
- tenantId,
1462
- filters: {
1463
- status: "ACTIVE",
1464
- ids: vendorId
1465
- },
1466
- config: {
1467
- enabled: !!tenantId,
1468
- staleTime: 300000
1469
- }
1470
- });
1389
+ const _useParams = useParams(),
1390
+ vendorId = _useParams.vendorId;
1391
+ const _Digit$Hooks$fsm$useV = Digit.Hooks.fsm.useVendorSearch({
1392
+ tenantId,
1393
+ filters: {
1394
+ status: "ACTIVE",
1395
+ ids: vendorId
1396
+ },
1397
+ config: {
1398
+ enabled: !!tenantId,
1399
+ staleTime: 300000
1400
+ }
1401
+ }),
1402
+ _Digit$Hooks$fsm$useV2 = _Digit$Hooks$fsm$useV.data,
1403
+ _Digit$Hooks$fsm$useV3 = _Digit$Hooks$fsm$useV2 === void 0 ? {} : _Digit$Hooks$fsm$useV2,
1404
+ _Digit$Hooks$fsm$useV4 = _Digit$Hooks$fsm$useV3.vendor,
1405
+ _Digit$Hooks$fsm$useV5 = _Digit$Hooks$fsm$useV4 === void 0 ? [] : _Digit$Hooks$fsm$useV4,
1406
+ vendor = _Digit$Hooks$fsm$useV5[0],
1407
+ isVendorSearchLoading = _Digit$Hooks$fsm$useV.isLoading;
1471
1408
  const targetVendorId = vendorId || (vendor === null || vendor === void 0 ? void 0 : vendor.id) || (vendor === null || vendor === void 0 ? void 0 : vendor.vendorId);
1472
- const {
1473
- isLoading: isProgressLoading,
1474
- data: progressData
1475
- } = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
1476
- vendorId: targetVendorId
1477
- } : {}, {
1478
- enabled: !!tenantId,
1479
- keepPreviousData: true
1480
- });
1409
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
1410
+ vendorId: targetVendorId
1411
+ } : {}, {
1412
+ enabled: !!tenantId,
1413
+ keepPreviousData: true
1414
+ }),
1415
+ isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
1416
+ progressData = _Digit$Hooks$ekyc$use.data;
1481
1417
  const vendorName = (vendor === null || vendor === void 0 ? void 0 : vendor.name) || "N/A";
1482
1418
  const mobileNumber = (vendor === null || vendor === void 0 ? void 0 : vendor.mobileNumber) || (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner = vendor.owner) === null || _vendor$owner === void 0 ? void 0 : _vendor$owner.mobileNumber) || "N/A";
1483
1419
  const email = (vendor === null || vendor === void 0 ? void 0 : (_vendor$owner2 = vendor.owner) === null || _vendor$owner2 === void 0 ? void 0 : _vendor$owner2.emailId) || "N/A";
@@ -1524,40 +1460,44 @@ const VendorDetailsCard = () => {
1524
1460
  icon: /*#__PURE__*/React.createElement(FaClock, null)
1525
1461
  }, {
1526
1462
  label: "OVERALL_PROGRESS",
1527
- count: `${progressPercent}%`,
1463
+ count: progressPercent + "%",
1528
1464
  color: "#DB2777",
1529
1465
  type: "progress",
1530
1466
  icon: /*#__PURE__*/React.createElement(FaChartLine, null)
1531
1467
  }];
1532
1468
  }, [vendor, progressData]);
1533
- const [currentPage, setCurrentPage] = useState(0);
1534
- const [pageSize, setPageSize] = useState(20);
1535
- const [ekycDownloadLoading, setEkycDownloadLoading] = useState(false);
1469
+ const _useState = useState(0),
1470
+ currentPage = _useState[0],
1471
+ setCurrentPage = _useState[1];
1472
+ const _useState2 = useState(20),
1473
+ pageSize = _useState2[0],
1474
+ setPageSize = _useState2[1];
1475
+ const _useState3 = useState(false),
1476
+ ekycDownloadLoading = _useState3[0],
1477
+ setEkycDownloadLoading = _useState3[1];
1536
1478
  const handleDownloadEkycData = function (fromDate, toDate) {
1537
1479
  try {
1538
1480
  setEkycDownloadLoading(true);
1539
1481
  return Promise.resolve(_finallyRethrows(function () {
1540
1482
  return _catch(function () {
1541
- return Promise.resolve(Digit.EkycService.application_list({
1483
+ return Promise.resolve(Digit.EkycService.application_list(_extends({
1542
1484
  tenantId: tenantId,
1543
1485
  offset: 0,
1544
1486
  limit: 10000,
1545
1487
  vendorId: targetVendorId,
1546
- reportDownload: true,
1547
- ...(fromDate && {
1548
- fromDate
1549
- }),
1550
- ...(toDate && {
1551
- toDate
1552
- })
1553
- })).then(function (response) {
1488
+ reportDownload: true
1489
+ }, fromDate && {
1490
+ fromDate
1491
+ }, toDate && {
1492
+ toDate
1493
+ }))).then(function (response) {
1554
1494
  const consumerList = (response === null || response === void 0 ? void 0 : response.consumerList) || [];
1555
1495
  if (!consumerList || consumerList.length === 0) {
1556
1496
  alert(t("NO_EKYC_DATA_FOUND") || "No eKYC data found to download.");
1557
1497
  return;
1558
1498
  }
1559
1499
  const excelData = getEkycExcelData(consumerList, t);
1560
- const cleanFileName = `eKYC_Data_${vendorName.replace(/[^a-zA-Z0-9]/g, "_")}`;
1500
+ const cleanFileName = "eKYC_Data_" + vendorName.replace(/[^a-zA-Z0-9]/g, "_");
1561
1501
  Digit.Download.Excel(excelData, cleanFileName);
1562
1502
  });
1563
1503
  }, function (error) {
@@ -1609,11 +1549,9 @@ const VendorDetailsCard = () => {
1609
1549
  },
1610
1550
  Cell: _ref => {
1611
1551
  var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _row$original2, _row$original3;
1612
- let {
1613
- row
1614
- } = _ref;
1552
+ let row = _ref.row;
1615
1553
  const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
1616
- const targetPath = `/digit-ui/${userType}/ekyc/supervisor-dashboard/${row === null || row === void 0 ? void 0 : (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.supervisorId}`;
1554
+ const targetPath = "/digit-ui/" + userType + "/ekyc/supervisor-dashboard/" + (row === null || row === void 0 ? void 0 : (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.supervisorId);
1617
1555
  return /*#__PURE__*/React.createElement("a", {
1618
1556
  href: targetPath,
1619
1557
  style: {
@@ -1636,11 +1574,9 @@ const VendorDetailsCard = () => {
1636
1574
  accessor: row => (row === null || row === void 0 ? void 0 : row.status) || "ACTIVE",
1637
1575
  id: "status",
1638
1576
  Cell: _ref2 => {
1639
- let {
1640
- value
1641
- } = _ref2;
1577
+ let value = _ref2.value;
1642
1578
  return /*#__PURE__*/React.createElement("span", {
1643
- className: `status-badge verified`
1579
+ className: "status-badge verified"
1644
1580
  }, t(value) || value);
1645
1581
  }
1646
1582
  }, {
@@ -1648,7 +1584,7 @@ const VendorDetailsCard = () => {
1648
1584
  accessor: row => (row === null || row === void 0 ? void 0 : row.totalKnos) || 0,
1649
1585
  id: "totalEkycApplications"
1650
1586
  }, {
1651
- Header: t("EKYC_COMPLETED") || "eKYC Completed",
1587
+ Header: t("EKYC_SUBMITTED") || "eKYC Completed",
1652
1588
  accessor: row => (row === null || row === void 0 ? void 0 : row.submittedKnos) || 0,
1653
1589
  id: "ekycCompleted"
1654
1590
  }, {
@@ -1657,16 +1593,24 @@ const VendorDetailsCard = () => {
1657
1593
  id: "pendingApplications"
1658
1594
  }, {
1659
1595
  Header: t("OVERALL_PROGRESS") || "Overall Progress",
1660
- accessor: row => `${(row === null || row === void 0 ? void 0 : row.progressPercent) || 0}%`,
1596
+ accessor: row => ((row === null || row === void 0 ? void 0 : row.progressPercent) || 0) + "%",
1661
1597
  id: "overallProgress"
1662
1598
  }], [t, history]);
1663
- const [showReportMenu, setShowReportMenu] = useState(false);
1664
- const [customDate, setCustomDate] = useState({
1665
- from: "",
1666
- to: ""
1667
- });
1668
- const [showCustomPicker, setShowCustomPicker] = useState(false);
1669
- const [reportLoading, setReportLoading] = useState(false);
1599
+ const _useState4 = useState(false),
1600
+ showReportMenu = _useState4[0],
1601
+ setShowReportMenu = _useState4[1];
1602
+ const _useState5 = useState({
1603
+ from: "",
1604
+ to: ""
1605
+ }),
1606
+ customDate = _useState5[0],
1607
+ setCustomDate = _useState5[1];
1608
+ const _useState6 = useState(false),
1609
+ showCustomPicker = _useState6[0],
1610
+ setShowCustomPicker = _useState6[1];
1611
+ const _useState7 = useState(false),
1612
+ reportLoading = _useState7[0],
1613
+ setReportLoading = _useState7[1];
1670
1614
  const reportMenuRef = useRef(null);
1671
1615
  useEffect(() => {
1672
1616
  const handler = e => {
@@ -1687,7 +1631,7 @@ const VendorDetailsCard = () => {
1687
1631
  total: s.totalKnos,
1688
1632
  completed: s.submittedKnos,
1689
1633
  pending: s.pendingKnos,
1690
- progress: `${s.progressPercent || 0}%`
1634
+ progress: (s.progressPercent || 0) + "%"
1691
1635
  }));
1692
1636
  downloadVendorPDF({
1693
1637
  rows: rowsWithStats,
@@ -1737,15 +1681,13 @@ const VendorDetailsCard = () => {
1737
1681
  }
1738
1682
  };
1739
1683
  const StatCard = _ref3 => {
1740
- let {
1741
- title,
1742
- value,
1743
- type,
1744
- isLoading,
1745
- icon
1746
- } = _ref3;
1684
+ let title = _ref3.title,
1685
+ value = _ref3.value,
1686
+ type = _ref3.type,
1687
+ isLoading = _ref3.isLoading,
1688
+ icon = _ref3.icon;
1747
1689
  return /*#__PURE__*/React.createElement("div", {
1748
- className: `stat-card ${type}`
1690
+ className: "stat-card " + type
1749
1691
  }, isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1750
1692
  className: "stat-title skeleton skeleton-text"
1751
1693
  }), /*#__PURE__*/React.createElement("div", {
@@ -1840,10 +1782,8 @@ const VendorDetailsCard = () => {
1840
1782
  label: t("THIS_MONTH") || "This Month",
1841
1783
  key: "month"
1842
1784
  }].map(_ref4 => {
1843
- let {
1844
- label,
1845
- key
1846
- } = _ref4;
1785
+ let label = _ref4.label,
1786
+ key = _ref4.key;
1847
1787
  return /*#__PURE__*/React.createElement("div", {
1848
1788
  key: key,
1849
1789
  className: "menu-item",
@@ -1859,17 +1799,15 @@ const VendorDetailsCard = () => {
1859
1799
  }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "From"), /*#__PURE__*/React.createElement("input", {
1860
1800
  type: "date",
1861
1801
  value: customDate.from,
1862
- onChange: e => setCustomDate({
1863
- ...customDate,
1802
+ onChange: e => setCustomDate(_extends({}, customDate, {
1864
1803
  from: e.target.value
1865
- })
1804
+ }))
1866
1805
  })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "To"), /*#__PURE__*/React.createElement("input", {
1867
1806
  type: "date",
1868
1807
  value: customDate.to,
1869
- onChange: e => setCustomDate({
1870
- ...customDate,
1808
+ onChange: e => setCustomDate(_extends({}, customDate, {
1871
1809
  to: e.target.value
1872
- })
1810
+ }))
1873
1811
  }))), /*#__PURE__*/React.createElement("div", {
1874
1812
  style: {
1875
1813
  display: "flex",
@@ -1943,32 +1881,31 @@ const VendorDetailsCard = () => {
1943
1881
 
1944
1882
  const useInboxTableConfig = _ref => {
1945
1883
  var _formState$tableForm, _formState$tableForm2, _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _formState$searchForm;
1946
- let {
1947
- parentRoute,
1948
- onPageSizeChange,
1949
- formState,
1950
- totalCount,
1951
- table,
1952
- dispatch,
1953
- checkPathName,
1954
- onSortingByData,
1955
- tenantId,
1956
- inboxStyles = {},
1957
- tableStyle = {}
1958
- } = _ref;
1959
- const {
1960
- t
1961
- } = useTranslation();
1884
+ let onPageSizeChange = _ref.onPageSizeChange,
1885
+ formState = _ref.formState,
1886
+ totalCount = _ref.totalCount,
1887
+ table = _ref.table,
1888
+ dispatch = _ref.dispatch,
1889
+ checkPathName = _ref.checkPathName,
1890
+ onSortingByData = _ref.onSortingByData,
1891
+ tenantId = _ref.tenantId,
1892
+ _ref$inboxStyles = _ref.inboxStyles,
1893
+ inboxStyles = _ref$inboxStyles === void 0 ? {} : _ref$inboxStyles,
1894
+ _ref$tableStyle = _ref.tableStyle,
1895
+ tableStyle = _ref$tableStyle === void 0 ? {} : _ref$tableStyle;
1896
+ const _useTranslation = useTranslation(),
1897
+ t = _useTranslation.t;
1962
1898
  const toTitleCase = str => {
1963
1899
  if (!str) return "";
1964
1900
  return String(str).toLowerCase().replace(/_/g, " ").replace(/\b\w/g, c => c.toUpperCase());
1965
1901
  };
1966
1902
  const history = useHistory();
1967
- const [selectedKno, setSelectedKno] = useState("");
1968
- const {
1969
- data: reviewData,
1970
- getReview
1971
- } = Digit.Hooks.ekyc.useEkycAPI("review", tenantId);
1903
+ const _useState = useState(""),
1904
+ selectedKno = _useState[0],
1905
+ setSelectedKno = _useState[1];
1906
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAPI("review", tenantId),
1907
+ reviewData = _Digit$Hooks$ekyc$use.data,
1908
+ getReview = _Digit$Hooks$ekyc$use.getReview;
1972
1909
  const handleReview = kno => {
1973
1910
  setSelectedKno(kno);
1974
1911
  getReview({
@@ -1980,7 +1917,7 @@ const useInboxTableConfig = _ref => {
1980
1917
  const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
1981
1918
  React.useEffect(() => {
1982
1919
  if (reviewData) {
1983
- history.push(`/digit-ui/${userType}/ekyc/review/${selectedKno}`, {
1920
+ history.push("/digit-ui/" + userType + "/ekyc/review/" + selectedKno, {
1984
1921
  aadhaarData: reviewData === null || reviewData === void 0 ? void 0 : reviewData.aadhaarData,
1985
1922
  reviewData
1986
1923
  });
@@ -1992,9 +1929,7 @@ const useInboxTableConfig = _ref => {
1992
1929
  disableSortBy: true,
1993
1930
  Cell: _ref2 => {
1994
1931
  var _row$original, _row$original2;
1995
- let {
1996
- row
1997
- } = _ref2;
1932
+ let row = _ref2.row;
1998
1933
  const kno = ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.kno) || ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.applicationNumber) || "NA";
1999
1934
  return /*#__PURE__*/React.createElement("span", {
2000
1935
  className: "link",
@@ -2006,9 +1941,7 @@ const useInboxTableConfig = _ref => {
2006
1941
  accessor: "citizenName",
2007
1942
  Cell: _ref3 => {
2008
1943
  var _row$original3;
2009
- let {
2010
- row
2011
- } = _ref3;
1944
+ let row = _ref3.row;
2012
1945
  return /*#__PURE__*/React.createElement("span", null, toTitleCase((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.citizenName) || "NA");
2013
1946
  }
2014
1947
  }, {
@@ -2016,30 +1949,24 @@ const useInboxTableConfig = _ref => {
2016
1949
  accessor: "actionStatus",
2017
1950
  Cell: _ref4 => {
2018
1951
  var _row$original4, _row$original5;
2019
- let {
2020
- row
2021
- } = _ref4;
1952
+ let row = _ref4.row;
2022
1953
  const status = (((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.status) || "DEFAULT").toUpperCase();
2023
1954
  return /*#__PURE__*/React.createElement("span", {
2024
- className: `ekyc-status-tag ${status}`
1955
+ className: "ekyc-status-tag " + status
2025
1956
  }, toTitleCase(((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.status) || "DEFAULT"));
2026
1957
  }
2027
1958
  }, {
2028
1959
  Header: t("SUBMITTED_AT") || "Submitted At",
2029
1960
  accessor: "submittedAt",
2030
1961
  Cell: _ref5 => {
2031
- let {
2032
- value
2033
- } = _ref5;
1962
+ let value = _ref5.value;
2034
1963
  return value ? Digit.DateUtils.ConvertEpochToDate(value) : "-";
2035
1964
  }
2036
1965
  }, {
2037
1966
  Header: t("ASSIGNED_AT") || "Assigned At",
2038
1967
  accessor: "assignedAt",
2039
1968
  Cell: _ref6 => {
2040
- let {
2041
- value
2042
- } = _ref6;
1969
+ let value = _ref6.value;
2043
1970
  return value ? Digit.DateUtils.ConvertEpochToDate(value) : "-";
2044
1971
  }
2045
1972
  }, {
@@ -2047,13 +1974,11 @@ const useInboxTableConfig = _ref => {
2047
1974
  accessor: "ekycStatus",
2048
1975
  Cell: _ref7 => {
2049
1976
  var _row$original6, _row$original7;
2050
- let {
2051
- row
2052
- } = _ref7;
1977
+ let row = _ref7.row;
2053
1978
  const raw = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.ekycStatus) || ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.ekycstatus) || "NA";
2054
1979
  const ekycStatus = raw.toUpperCase();
2055
1980
  return /*#__PURE__*/React.createElement("span", {
2056
- className: `ekyc-status-tag ${ekycStatus}`
1981
+ className: "ekyc-status-tag " + ekycStatus
2057
1982
  }, toTitleCase(raw));
2058
1983
  }
2059
1984
  }];
@@ -2068,10 +1993,9 @@ const useInboxTableConfig = _ref => {
2068
1993
  var _formState$tableForm3;
2069
1994
  return dispatch({
2070
1995
  action: "mutateTableForm",
2071
- data: {
2072
- ...formState.tableForm,
1996
+ data: _extends({}, formState.tableForm, {
2073
1997
  offset: parseInt((_formState$tableForm3 = formState.tableForm) === null || _formState$tableForm3 === void 0 ? void 0 : _formState$tableForm3.offset) + limit
2074
- },
1998
+ }),
2075
1999
  checkPathName
2076
2000
  });
2077
2001
  },
@@ -2079,10 +2003,9 @@ const useInboxTableConfig = _ref => {
2079
2003
  var _formState$tableForm4;
2080
2004
  return dispatch({
2081
2005
  action: "mutateTableForm",
2082
- data: {
2083
- ...formState.tableForm,
2006
+ data: _extends({}, formState.tableForm, {
2084
2007
  offset: parseInt((_formState$tableForm4 = formState.tableForm) === null || _formState$tableForm4 === void 0 ? void 0 : _formState$tableForm4.offset) - limit
2085
- },
2008
+ }),
2086
2009
  checkPathName
2087
2010
  });
2088
2011
  },
@@ -2092,28 +2015,22 @@ const useInboxTableConfig = _ref => {
2092
2015
  onSearch: formState === null || formState === void 0 ? void 0 : (_formState$searchForm = formState.searchForm) === null || _formState$searchForm === void 0 ? void 0 : _formState$searchForm.message,
2093
2016
  onLastPage: () => dispatch({
2094
2017
  action: "mutateTableForm",
2095
- data: {
2096
- ...formState.tableForm,
2018
+ data: _extends({}, formState.tableForm, {
2097
2019
  offset: Math.max(0, Math.floor((totalCount - 1) / limit) * limit)
2098
- },
2020
+ }),
2099
2021
  checkPathName
2100
2022
  }),
2101
2023
  onFirstPage: () => dispatch({
2102
2024
  action: "mutateTableForm",
2103
- data: {
2104
- ...formState.tableForm,
2025
+ data: _extends({}, formState.tableForm, {
2105
2026
  offset: 0
2106
- },
2027
+ }),
2107
2028
  checkPathName
2108
2029
  }),
2109
2030
  data: table,
2110
2031
  columns: tableColumnConfig,
2111
- inboxStyles: {
2112
- ...inboxStyles
2113
- },
2114
- tableStyle: {
2115
- ...tableStyle
2116
- }
2032
+ inboxStyles: _extends({}, inboxStyles),
2033
+ tableStyle: _extends({}, tableStyle)
2117
2034
  };
2118
2035
  };
2119
2036
 
@@ -2150,18 +2067,16 @@ var get = function (obj, path, defaultValue) {
2150
2067
  };
2151
2068
  var isPrimitive = value => isNullOrUndefined(value) || !isObjectType(value);
2152
2069
  var isFunction = value => typeof value === 'function';
2153
- var skipValidation = _ref8 => {
2154
- let {
2155
- isOnBlur,
2156
- isOnChange,
2157
- isOnTouch,
2158
- isTouched,
2159
- isReValidateOnBlur,
2160
- isReValidateOnChange,
2161
- isBlurEvent,
2162
- isSubmitted,
2163
- isOnAll
2164
- } = _ref8;
2070
+ var skipValidation = _ref9 => {
2071
+ let isOnBlur = _ref9.isOnBlur,
2072
+ isOnChange = _ref9.isOnChange,
2073
+ isOnTouch = _ref9.isOnTouch,
2074
+ isTouched = _ref9.isTouched,
2075
+ isReValidateOnBlur = _ref9.isReValidateOnBlur,
2076
+ isReValidateOnChange = _ref9.isReValidateOnChange,
2077
+ isBlurEvent = _ref9.isBlurEvent,
2078
+ isSubmitted = _ref9.isSubmitted,
2079
+ isOnAll = _ref9.isOnAll;
2165
2080
  if (isOnAll) {
2166
2081
  return false;
2167
2082
  } else if (!isSubmitted && isOnTouch) {
@@ -2173,7 +2088,7 @@ var skipValidation = _ref8 => {
2173
2088
  }
2174
2089
  return true;
2175
2090
  };
2176
- const isMatchFieldArrayName = (name, searchName) => RegExp(`^${searchName}([|.)\\d+`.replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name);
2091
+ const isMatchFieldArrayName = (name, searchName) => RegExp(("^" + searchName + "([|.)\\d+").replace(/\[/g, '\\[').replace(/\]/g, '\\]')).test(name);
2177
2092
  var isNameInFieldArray = (names, name) => [...names].some(current => isMatchFieldArrayName(name, current));
2178
2093
  function __rest(s, e) {
2179
2094
  var t = {};
@@ -2187,48 +2102,43 @@ const FormContext = createContext(null);
2187
2102
  FormContext.displayName = 'RHFContext';
2188
2103
  const useFormContext = () => useContext(FormContext);
2189
2104
  var getInputValue = event => isPrimitive(event) || !isObject(event.target) || isObject(event.target) && !event.type ? event : isUndefined(event.target.value) ? event.target.checked : event.target.value;
2190
- function useController(_ref17) {
2191
- let {
2192
- name,
2193
- rules,
2194
- defaultValue,
2195
- control,
2196
- onFocus
2197
- } = _ref17;
2105
+ function useController(_ref20) {
2106
+ let name = _ref20.name,
2107
+ rules = _ref20.rules,
2108
+ defaultValue = _ref20.defaultValue,
2109
+ control = _ref20.control,
2110
+ onFocus = _ref20.onFocus;
2198
2111
  const methods = useFormContext();
2199
2112
  if (process.env.NODE_ENV !== 'production') {
2200
2113
  if (!control && !methods) {
2201
2114
  throw new Error('📋 Controller is missing `control` prop. https://react-hook-form.com/api#Controller');
2202
2115
  }
2203
2116
  }
2204
- const {
2205
- defaultValuesRef,
2206
- setValue,
2207
- register,
2208
- unregister,
2209
- trigger,
2210
- mode,
2211
- reValidateMode: {
2212
- isReValidateOnBlur,
2213
- isReValidateOnChange
2214
- },
2215
- formState,
2216
- formStateRef: {
2217
- current: {
2218
- isSubmitted,
2219
- touched,
2220
- errors
2221
- }
2222
- },
2223
- updateFormState,
2224
- readFormStateRef,
2225
- fieldsRef,
2226
- fieldArrayNamesRef,
2227
- shallowFieldsStateRef
2228
- } = control || methods.control;
2117
+ const _ref21 = control || methods.control,
2118
+ defaultValuesRef = _ref21.defaultValuesRef,
2119
+ setValue = _ref21.setValue,
2120
+ register = _ref21.register,
2121
+ unregister = _ref21.unregister,
2122
+ trigger = _ref21.trigger,
2123
+ mode = _ref21.mode,
2124
+ _ref21$reValidateMode = _ref21.reValidateMode,
2125
+ isReValidateOnBlur = _ref21$reValidateMode.isReValidateOnBlur,
2126
+ isReValidateOnChange = _ref21$reValidateMode.isReValidateOnChange,
2127
+ formState = _ref21.formState,
2128
+ _ref21$formStateRef$c = _ref21.formStateRef.current,
2129
+ isSubmitted = _ref21$formStateRef$c.isSubmitted,
2130
+ touched = _ref21$formStateRef$c.touched,
2131
+ errors = _ref21$formStateRef$c.errors,
2132
+ updateFormState = _ref21.updateFormState,
2133
+ readFormStateRef = _ref21.readFormStateRef,
2134
+ fieldsRef = _ref21.fieldsRef,
2135
+ fieldArrayNamesRef = _ref21.fieldArrayNamesRef,
2136
+ shallowFieldsStateRef = _ref21.shallowFieldsStateRef;
2229
2137
  const isNotFieldArray = !isNameInFieldArray(fieldArrayNamesRef.current, name);
2230
2138
  const getInitialValue = () => !isUndefined(get(shallowFieldsStateRef.current, name)) && isNotFieldArray ? get(shallowFieldsStateRef.current, name) : isUndefined(defaultValue) ? get(defaultValuesRef.current, name) : defaultValue;
2231
- const [value, setInputStateValue] = useState(getInitialValue());
2139
+ const _useState3 = useState(getInitialValue()),
2140
+ value = _useState3[0],
2141
+ setInputStateValue = _useState3[1];
2232
2142
  const valueRef = useRef(value);
2233
2143
  const ref = useRef({
2234
2144
  focus: () => null
@@ -2239,7 +2149,7 @@ function useController(_ref17) {
2239
2149
  }
2240
2150
  if (process.env.NODE_ENV !== 'production') {
2241
2151
  if (!isFunction(ref.current.focus)) {
2242
- console.warn(`📋 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method`);
2152
+ console.warn("\uD83D\uDCCB 'ref' from Controller render prop must be attached to a React component or a DOM Element whose ref provides a 'focus()' method");
2243
2153
  }
2244
2154
  }
2245
2155
  }));
@@ -2250,8 +2160,8 @@ function useController(_ref17) {
2250
2160
  isSubmitted,
2251
2161
  isTouched: !!get(touched, name)
2252
2162
  }, mode)), [isReValidateOnBlur, isReValidateOnChange, isSubmitted, touched, name, mode]);
2253
- const commonTask = useCallback(_ref18 => {
2254
- let [event] = _ref18;
2163
+ const commonTask = useCallback(_ref22 => {
2164
+ let event = _ref22[0];
2255
2165
  const data = getInputValue(event);
2256
2166
  setInputStateValue(data);
2257
2167
  valueRef.current = data;
@@ -2290,7 +2200,7 @@ function useController(_ref17) {
2290
2200
  useEffect(() => {
2291
2201
  if (process.env.NODE_ENV !== 'production') {
2292
2202
  if (isUndefined(value)) {
2293
- console.warn(`📋 ${name} is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)`);
2203
+ console.warn("\uD83D\uDCCB " + name + " is missing in the 'defaultValue' prop of either its Controller (https://react-hook-form.com/api#Controller) or useForm (https://react-hook-form.com/api#useForm)");
2294
2204
  }
2295
2205
  if (!isNotFieldArray && isUndefined(defaultValue)) {
2296
2206
  console.warn('📋 Controller is missing `defaultValue` prop when using `useFieldArray`. https://react-hook-form.com/api#Controller');
@@ -2344,35 +2254,23 @@ function useController(_ref17) {
2344
2254
  };
2345
2255
  }
2346
2256
  const Controller = props => {
2347
- const {
2348
- rules,
2349
- as,
2350
- render,
2351
- defaultValue,
2352
- control,
2353
- onFocus
2354
- } = props,
2257
+ const as = props.as,
2258
+ render = props.render,
2355
2259
  rest = __rest(props, ["rules", "as", "render", "defaultValue", "control", "onFocus"]);
2356
- const {
2357
- field,
2358
- meta
2359
- } = useController(props);
2260
+ const _useController = useController(props),
2261
+ field = _useController.field,
2262
+ meta = _useController.meta;
2360
2263
  const componentProps = Object.assign(Object.assign({}, rest), field);
2361
2264
  return as ? isValidElement(as) ? cloneElement(as, componentProps) : createElement(as, componentProps) : render ? render(field, meta) : null;
2362
2265
  };
2363
2266
 
2364
2267
  const SearchFormFieldsComponents = _ref => {
2365
- let {
2366
- searchFormState,
2367
- controlSearchForm,
2368
- searchType
2369
- } = _ref;
2370
- const {
2371
- t
2372
- } = useTranslation();
2373
- const {
2374
- errors
2375
- } = searchFormState;
2268
+ let searchFormState = _ref.searchFormState,
2269
+ controlSearchForm = _ref.controlSearchForm,
2270
+ searchType = _ref.searchType;
2271
+ const _useTranslation = useTranslation(),
2272
+ t = _useTranslation.t;
2273
+ const errors = searchFormState.errors;
2376
2274
  if (searchType === "mobile") {
2377
2275
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
2378
2276
  className: "mobile-input"
@@ -2391,10 +2289,8 @@ const SearchFormFieldsComponents = _ref => {
2391
2289
  }
2392
2290
  },
2393
2291
  render: _ref2 => {
2394
- let {
2395
- onChange,
2396
- value
2397
- } = _ref2;
2292
+ let onChange = _ref2.onChange,
2293
+ value = _ref2.value;
2398
2294
  return /*#__PURE__*/React.createElement(TextInput, {
2399
2295
  value: value || "",
2400
2296
  onChange: e => onChange(e.target.value)
@@ -2419,10 +2315,8 @@ const SearchFormFieldsComponents = _ref => {
2419
2315
  }
2420
2316
  },
2421
2317
  render: _ref3 => {
2422
- let {
2423
- onChange,
2424
- value
2425
- } = _ref3;
2318
+ let onChange = _ref3.onChange,
2319
+ value = _ref3.value;
2426
2320
  return /*#__PURE__*/React.createElement(TextInput, {
2427
2321
  value: value || "",
2428
2322
  onChange: e => onChange(e.target.value)
@@ -2433,24 +2327,23 @@ const SearchFormFieldsComponents = _ref => {
2433
2327
 
2434
2328
  const useInboxMobileCardsData = _ref => {
2435
2329
  var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3;
2436
- let {
2437
- table,
2438
- tenantId,
2439
- isSupervisor = false
2440
- } = _ref;
2441
- const {
2442
- t
2443
- } = useTranslation();
2330
+ let table = _ref.table,
2331
+ tenantId = _ref.tenantId,
2332
+ _ref$isSupervisor = _ref.isSupervisor,
2333
+ isSupervisor = _ref$isSupervisor === void 0 ? false : _ref$isSupervisor;
2334
+ const _useTranslation = useTranslation(),
2335
+ t = _useTranslation.t;
2444
2336
  const history = useHistory();
2445
- const [selectedKno, setSelectedKno] = useState("");
2446
- const {
2447
- data: reviewData,
2448
- getReview
2449
- } = Digit.Hooks.ekyc.useEkycAPI("review", tenantId);
2337
+ const _useState = useState(""),
2338
+ selectedKno = _useState[0],
2339
+ setSelectedKno = _useState[1];
2340
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAPI("review", tenantId),
2341
+ reviewData = _Digit$Hooks$ekyc$use.data,
2342
+ getReview = _Digit$Hooks$ekyc$use.getReview;
2450
2343
  const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
2451
2344
  React.useEffect(() => {
2452
2345
  if (!isSupervisor && reviewData) {
2453
- history.push(`/digit-ui/${userType}/ekyc/review/${selectedKno}`, {
2346
+ history.push("/digit-ui/" + userType + "/ekyc/review/" + selectedKno, {
2454
2347
  aadhaarData: reviewData === null || reviewData === void 0 ? void 0 : reviewData.aadhaarData,
2455
2348
  reviewData
2456
2349
  });
@@ -2463,7 +2356,7 @@ const useInboxMobileCardsData = _ref => {
2463
2356
  });
2464
2357
  };
2465
2358
  const handleSupervisorReview = id => {
2466
- history.push(`/digit-ui/${userType}/ekyc/assign/surveyor-details/${id}`);
2359
+ history.push("/digit-ui/" + userType + "/ekyc/assign/surveyor-details/" + id);
2467
2360
  };
2468
2361
  const dataForMobileInboxCards = table === null || table === void 0 ? void 0 : table.map(item => {
2469
2362
  if (isSupervisor) {
@@ -2477,7 +2370,7 @@ const useInboxMobileCardsData = _ref => {
2477
2370
  }, item.surveyorName || item.name || "NA"),
2478
2371
  [t("MOBILE_NUMBER")]: item.mobileNo || ((_item$owner = item.owner) === null || _item$owner === void 0 ? void 0 : _item$owner.mobileNumber) || "NA",
2479
2372
  [t("STATUS")]: /*#__PURE__*/React.createElement("span", {
2480
- className: `ekyc-status-tag ${status}`
2373
+ className: "ekyc-status-tag " + status
2481
2374
  }, t(status)),
2482
2375
  [t("SERVICE_TYPE")]: item.serviceType || "NA"
2483
2376
  };
@@ -2492,13 +2385,13 @@ const useInboxMobileCardsData = _ref => {
2492
2385
  }, kno),
2493
2386
  [t("EKYC_CITIZEN_NAME")]: item.citizenName || "NA",
2494
2387
  [t("EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2495
- className: `ekyc-status-tag ${status}`
2496
- }, t(`${status}`)),
2388
+ className: "ekyc-status-tag " + status
2389
+ }, t("" + status)),
2497
2390
  [t("SUBMITTED_AT")]: item.submittedAt ? Digit.DateUtils.ConvertEpochToDate(item.submittedAt) : "-",
2498
2391
  [t("ASSIGNED_AT")]: item.assignedAt ? Digit.DateUtils.ConvertEpochToDate(item.assignedAt) : "-",
2499
2392
  [t("EKYC_EKYC_STATUS")]: /*#__PURE__*/React.createElement("span", {
2500
- className: `ekyc-status-tag ${ekycStatus}`
2501
- }, t(`${ekycStatus}`))
2393
+ className: "ekyc-status-tag " + ekycStatus
2394
+ }, t("" + ekycStatus))
2502
2395
  };
2503
2396
  }
2504
2397
  });
@@ -2510,17 +2403,14 @@ const useInboxMobileCardsData = _ref => {
2510
2403
  code: "ASC",
2511
2404
  i18nKey: "ES_INBOX_DATE_LATEST_LAST"
2512
2405
  }];
2513
- const {
2514
- control: controlSortForm
2515
- } = useFormContext();
2406
+ const _useFormContext = useFormContext(),
2407
+ controlSortForm = _useFormContext.control;
2516
2408
  return /*#__PURE__*/React.createElement(SearchField, null, /*#__PURE__*/React.createElement(Controller, {
2517
2409
  name: "sortOrder",
2518
2410
  control: controlSortForm,
2519
2411
  render: _ref2 => {
2520
- let {
2521
- onChange,
2522
- value
2523
- } = _ref2;
2412
+ let onChange = _ref2.onChange,
2413
+ value = _ref2.value;
2524
2414
  return /*#__PURE__*/React.createElement(RadioButtons, {
2525
2415
  onSelect: e => {
2526
2416
  onChange(e.code);
@@ -2544,15 +2434,13 @@ const useInboxMobileCardsData = _ref => {
2544
2434
  };
2545
2435
 
2546
2436
  const StatCard = _ref => {
2547
- let {
2548
- title,
2549
- value,
2550
- type,
2551
- isLoading,
2552
- icon
2553
- } = _ref;
2437
+ let title = _ref.title,
2438
+ value = _ref.value,
2439
+ type = _ref.type,
2440
+ isLoading = _ref.isLoading,
2441
+ icon = _ref.icon;
2554
2442
  return /*#__PURE__*/React.createElement("div", {
2555
- className: `stat-card ${type}`
2443
+ className: "stat-card " + type
2556
2444
  }, isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2557
2445
  className: "stat-title skeleton skeleton-text"
2558
2446
  }), /*#__PURE__*/React.createElement("div", {
@@ -2567,9 +2455,7 @@ const StatCard = _ref => {
2567
2455
  };
2568
2456
  const Inbox = _ref2 => {
2569
2457
  var _formState$tableForm3, _formState$tableForm4, _formState$searchForm3, _formState$searchForm4;
2570
- let {
2571
- parentRoute
2572
- } = _ref2;
2458
+ let parentRoute = _ref2.parentRoute;
2573
2459
  const tenantId = Digit.ULBService.getCurrentTenantId();
2574
2460
  const location = useLocation();
2575
2461
  const formInitValue = {
@@ -2582,15 +2468,14 @@ const Inbox = _ref2 => {
2582
2468
  sortOrder: "DESC"
2583
2469
  }
2584
2470
  };
2585
- const [formState, dispatch] = useReducer(formReducer, formInitValue);
2471
+ const _useReducer = useReducer(formReducer, formInitValue),
2472
+ formState = _useReducer[0],
2473
+ dispatch = _useReducer[1];
2586
2474
  const filters = useMemo(() => {
2587
2475
  const searchForm = (formState === null || formState === void 0 ? void 0 : formState.searchForm) || {};
2588
- return {
2589
- ...searchForm,
2590
- ...(searchForm.kNumber && {
2591
- kno: searchForm.kNumber
2592
- })
2593
- };
2476
+ return _extends({}, searchForm, searchForm.kNumber && {
2477
+ kno: searchForm.kNumber
2478
+ });
2594
2479
  }, [formState === null || formState === void 0 ? void 0 : formState.searchForm]);
2595
2480
  const queryParams = useMemo(() => {
2596
2481
  var _formState$tableForm, _formState$tableForm2;
@@ -2600,23 +2485,22 @@ const Inbox = _ref2 => {
2600
2485
  limit: (formState === null || formState === void 0 ? void 0 : (_formState$tableForm2 = formState.tableForm) === null || _formState$tableForm2 === void 0 ? void 0 : _formState$tableForm2.limit) || 10
2601
2486
  };
2602
2487
  }, [tenantId, formState === null || formState === void 0 ? void 0 : (_formState$tableForm3 = formState.tableForm) === null || _formState$tableForm3 === void 0 ? void 0 : _formState$tableForm3.offset, formState === null || formState === void 0 ? void 0 : (_formState$tableForm4 = formState.tableForm) === null || _formState$tableForm4 === void 0 ? void 0 : _formState$tableForm4.limit]);
2603
- const {
2604
- isLoading: isListLoading,
2605
- data: listData = {}
2606
- } = Digit.Hooks.ekyc.useEkycApplicationList(filters, queryParams, {
2607
- enabled: !!tenantId,
2608
- keepPreviousData: true
2609
- });
2610
- const {
2611
- isLoading: isProgressLoading,
2612
- data: progressData
2613
- } = Digit.Hooks.ekyc.useEkycAssignmentProgress({
2614
- tenantId,
2615
- allVendorsDetailed: true
2616
- }, {
2617
- enabled: !!tenantId,
2618
- keepPreviousData: true
2619
- });
2488
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycApplicationList(filters, queryParams, {
2489
+ enabled: !!tenantId,
2490
+ keepPreviousData: true
2491
+ }),
2492
+ isListLoading = _Digit$Hooks$ekyc$use.isLoading,
2493
+ _Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
2494
+ listData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2;
2495
+ const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useEkycAssignmentProgress({
2496
+ tenantId,
2497
+ allVendorsDetailed: true
2498
+ }, {
2499
+ enabled: !!tenantId,
2500
+ keepPreviousData: true
2501
+ }),
2502
+ isProgressLoading = _Digit$Hooks$ekyc$use3.isLoading,
2503
+ progressData = _Digit$Hooks$ekyc$use3.data;
2620
2504
  const searchDetails = useMemo(() => {
2621
2505
  var _formState$searchForm, _formState$searchForm2;
2622
2506
  return {
@@ -2625,16 +2509,15 @@ const Inbox = _ref2 => {
2625
2509
  };
2626
2510
  }, [formState === null || formState === void 0 ? void 0 : (_formState$searchForm3 = formState.searchForm) === null || _formState$searchForm3 === void 0 ? void 0 : _formState$searchForm3.kNumber, formState === null || formState === void 0 ? void 0 : (_formState$searchForm4 = formState.searchForm) === null || _formState$searchForm4 === void 0 ? void 0 : _formState$searchForm4.kName]);
2627
2511
  const isSearchActive = !!(searchDetails.kno || searchDetails.name);
2628
- const {
2629
- isLoading: isSearchLoading,
2630
- data: searchData
2631
- } = Digit.Hooks.ekyc.useSearchConnection({
2632
- tenantId,
2633
- details: searchDetails
2634
- }, {
2635
- enabled: !!tenantId && !!searchDetails.kno,
2636
- keepPreviousData: true
2637
- });
2512
+ const _Digit$Hooks$ekyc$use4 = Digit.Hooks.ekyc.useSearchConnection({
2513
+ tenantId,
2514
+ details: searchDetails
2515
+ }, {
2516
+ enabled: !!tenantId && !!searchDetails.kno,
2517
+ keepPreviousData: true
2518
+ }),
2519
+ isSearchLoading = _Digit$Hooks$ekyc$use4.isLoading,
2520
+ searchData = _Digit$Hooks$ekyc$use4.data;
2638
2521
  const sourceData = useMemo(() => {
2639
2522
  if (isSearchActive) {
2640
2523
  if (!searchData) return [];
@@ -2644,6 +2527,7 @@ const Inbox = _ref2 => {
2644
2527
  }, [isSearchActive, searchData, listData]);
2645
2528
  const filteredData = useMemo(() => {
2646
2529
  return (sourceData || []).map(item => {
2530
+ var _item$sla;
2647
2531
  const isSearchItem = !!item.connectionDetails;
2648
2532
  if (isSearchItem) {
2649
2533
  var _item$propertyInfo, _item$propertyInfo2, _item$connectionDetai, _item$propertyInfo3, _item$connectionDetai2, _item$connectionDetai3, _item$connectionDetai4, _item$connectionDetai5;
@@ -2659,8 +2543,7 @@ const Inbox = _ref2 => {
2659
2543
  };
2660
2544
  }
2661
2545
  const fullName = [item.firstName, item.middleName, item.lastName].filter(Boolean).join(" ");
2662
- return {
2663
- ...item,
2546
+ return _extends({}, item, {
2664
2547
  applicationNo: item.kno || item.applicationNumber || "",
2665
2548
  connectionNo: item.kno || "",
2666
2549
  owner: fullName || item.consumerName || item.citizenName || "",
@@ -2668,24 +2551,24 @@ const Inbox = _ref2 => {
2668
2551
  citizenName: fullName || item.consumerName || item.citizenName || "",
2669
2552
  status: item.status || "",
2670
2553
  ekycStatus: (item.ekycStatus || item.ekycstatus || "NA").toUpperCase(),
2671
- sla: item.sla ?? 0
2672
- };
2554
+ sla: (_item$sla = item.sla) != null ? _item$sla : 0
2555
+ });
2673
2556
  });
2674
2557
  }, [sourceData]);
2675
- const {
2676
- t
2677
- } = useTranslation();
2558
+ const _useTranslation = useTranslation(),
2559
+ t = _useTranslation.t;
2678
2560
  const progressMetrics = useMemo(() => {
2561
+ var _ref3, _progressData$totalKn, _progressData$submitt, _progressData$pending, _ref4, _progressData$overall;
2679
2562
  if (!progressData) return {
2680
2563
  totalKnos: 0,
2681
2564
  submittedKnos: 0,
2682
2565
  pendingKnos: 0,
2683
2566
  progressPercent: 0
2684
2567
  };
2685
- const totalKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) ?? (progressData === null || progressData === void 0 ? void 0 : progressData.totalAssignments) ?? 0;
2686
- const submittedKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) ?? 0;
2687
- const pendingKnos = (progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) ?? (totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0);
2688
- const progressPercent = (progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) ?? (progressData === null || progressData === void 0 ? void 0 : progressData.progressPercent) ?? (totalKnos > 0 ? (submittedKnos / totalKnos * 100).toFixed(1) : 0);
2568
+ const totalKnos = (_ref3 = (_progressData$totalKn = progressData === null || progressData === void 0 ? void 0 : progressData.totalKnos) != null ? _progressData$totalKn : progressData === null || progressData === void 0 ? void 0 : progressData.totalAssignments) != null ? _ref3 : 0;
2569
+ const submittedKnos = (_progressData$submitt = progressData === null || progressData === void 0 ? void 0 : progressData.submittedKnos) != null ? _progressData$submitt : 0;
2570
+ const pendingKnos = (_progressData$pending = progressData === null || progressData === void 0 ? void 0 : progressData.pendingKnos) != null ? _progressData$pending : totalKnos >= submittedKnos ? totalKnos - submittedKnos : 0;
2571
+ const progressPercent = (_ref4 = (_progressData$overall = progressData === null || progressData === void 0 ? void 0 : progressData.overallProgressPercent) != null ? _progressData$overall : progressData === null || progressData === void 0 ? void 0 : progressData.progressPercent) != null ? _ref4 : totalKnos > 0 ? (submittedKnos / totalKnos * 100).toFixed(1) : 0;
2689
2572
  return {
2690
2573
  totalKnos,
2691
2574
  submittedKnos,
@@ -2700,7 +2583,7 @@ const Inbox = _ref2 => {
2700
2583
  type: "today",
2701
2584
  icon: /*#__PURE__*/React.createElement(FaUsers, null)
2702
2585
  }, {
2703
- label: t("EKYC_COMPLETED"),
2586
+ label: t("EKYC_SUBMITTED_TITLE"),
2704
2587
  count: (progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.submittedKnos) || 0,
2705
2588
  color: "#10B981",
2706
2589
  type: "month",
@@ -2713,19 +2596,17 @@ const Inbox = _ref2 => {
2713
2596
  icon: /*#__PURE__*/React.createElement(FaClock, null)
2714
2597
  }, {
2715
2598
  label: t("OVERALL_PROGRESS"),
2716
- count: `${(progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.progressPercent) || 0}%`,
2599
+ count: ((progressMetrics === null || progressMetrics === void 0 ? void 0 : progressMetrics.progressPercent) || 0) + "%",
2717
2600
  color: "#A855F7",
2718
2601
  type: "progress",
2719
2602
  icon: /*#__PURE__*/React.createElement(FaChartLine, null)
2720
2603
  }], [progressMetrics, t]);
2721
2604
  const totalRecords = (listData === null || listData === void 0 ? void 0 : listData.totalCount) || 0;
2722
2605
  const checkPathName = location.pathname.includes("ekyc/inbox");
2723
- const SearchFormFields = useCallback(_ref3 => {
2724
- let {
2725
- registerRef,
2726
- searchFormState,
2727
- controlSearchForm
2728
- } = _ref3;
2606
+ const SearchFormFields = useCallback(_ref5 => {
2607
+ let registerRef = _ref5.registerRef,
2608
+ searchFormState = _ref5.searchFormState,
2609
+ controlSearchForm = _ref5.controlSearchForm;
2729
2610
  return /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
2730
2611
  registerRef,
2731
2612
  searchFormState,
@@ -2744,9 +2625,7 @@ const Inbox = _ref2 => {
2744
2625
  data.hasOwnProperty("") && (data === null || data === void 0 ? true : delete data[""]);
2745
2626
  dispatch({
2746
2627
  action: "mutateTableForm",
2747
- data: {
2748
- ...tableOrderFormDefaultValues
2749
- },
2628
+ data: _extends({}, tableOrderFormDefaultValues),
2750
2629
  checkPathName
2751
2630
  });
2752
2631
  dispatch({
@@ -2780,32 +2659,26 @@ const Inbox = _ref2 => {
2780
2659
  function formReducer(state, payload) {
2781
2660
  switch (payload.action) {
2782
2661
  case "mutateSearchForm":
2783
- Digit.SessionStorage.set("EKYC.INBOX", {
2784
- ...state,
2662
+ Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
2785
2663
  searchForm: payload.data
2786
- });
2787
- return {
2788
- ...state,
2664
+ }));
2665
+ return _extends({}, state, {
2789
2666
  searchForm: payload.data
2790
- };
2667
+ });
2791
2668
  case "mutateFilterForm":
2792
- Digit.SessionStorage.set("EKYC.INBOX", {
2793
- ...state,
2669
+ Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
2794
2670
  filterForm: payload.data
2795
- });
2796
- return {
2797
- ...state,
2671
+ }));
2672
+ return _extends({}, state, {
2798
2673
  filterForm: payload.data
2799
- };
2674
+ });
2800
2675
  case "mutateTableForm":
2801
- Digit.SessionStorage.set("EKYC.INBOX", {
2802
- ...state,
2676
+ Digit.SessionStorage.set("EKYC.INBOX", _extends({}, state, {
2803
2677
  tableForm: payload.data
2804
- });
2805
- return {
2806
- ...state,
2678
+ }));
2679
+ return _extends({}, state, {
2807
2680
  tableForm: payload.data
2808
- };
2681
+ });
2809
2682
  default:
2810
2683
  return state;
2811
2684
  }
@@ -2814,65 +2687,57 @@ const Inbox = _ref2 => {
2814
2687
  const newLimit = Number(e.target.value);
2815
2688
  dispatch({
2816
2689
  action: "mutateTableForm",
2817
- data: {
2818
- ...formState.tableForm,
2690
+ data: _extends({}, formState.tableForm, {
2819
2691
  limit: newLimit,
2820
2692
  offset: 0
2821
- },
2693
+ }),
2822
2694
  checkPathName
2823
2695
  });
2824
2696
  };
2825
2697
  const onSortingByData = e => {
2826
2698
  if (e.length > 0) {
2827
- const [{
2828
- id,
2829
- desc
2830
- }] = e;
2699
+ const _e$ = e[0],
2700
+ id = _e$.id,
2701
+ desc = _e$.desc;
2831
2702
  const sortOrder = desc ? "DESC" : "ASC";
2832
2703
  const sortBy = id;
2833
2704
  if (!(formState.tableForm.sortBy === sortBy && formState.tableForm.sortOrder === sortOrder)) {
2834
2705
  dispatch({
2835
2706
  action: "mutateTableForm",
2836
- data: {
2837
- ...formState.tableForm,
2707
+ data: _extends({}, formState.tableForm, {
2838
2708
  sortBy: id,
2839
2709
  sortOrder: desc ? "DESC" : "ASC"
2840
- },
2710
+ }),
2841
2711
  checkPathName
2842
2712
  });
2843
2713
  }
2844
2714
  }
2845
2715
  };
2846
- const propsForInboxTable = useInboxTableConfig({
2847
- ...{
2848
- parentRoute,
2849
- onPageSizeChange,
2850
- formState,
2851
- totalCount: totalRecords,
2852
- table: filteredData,
2853
- dispatch,
2854
- onSortingByData,
2855
- tenantId,
2856
- checkPathName,
2857
- inboxStyles: {
2858
- overflowX: "scroll",
2859
- overflowY: "hidden"
2860
- },
2861
- tableStyle: {
2862
- width: "70%"
2863
- }
2716
+ const propsForInboxTable = useInboxTableConfig(_extends({}, {
2717
+ parentRoute,
2718
+ onPageSizeChange,
2719
+ formState,
2720
+ totalCount: totalRecords,
2721
+ table: filteredData,
2722
+ dispatch,
2723
+ onSortingByData,
2724
+ tenantId,
2725
+ checkPathName,
2726
+ inboxStyles: {
2727
+ overflowX: "scroll",
2728
+ overflowY: "hidden"
2729
+ },
2730
+ tableStyle: {
2731
+ width: "70%"
2864
2732
  }
2865
- });
2733
+ }));
2866
2734
  const onMobileSortOrderData = data => {
2867
- const {
2868
- sortOrder
2869
- } = data;
2735
+ const sortOrder = data.sortOrder;
2870
2736
  dispatch({
2871
2737
  action: "mutateTableForm",
2872
- data: {
2873
- ...formState.tableForm,
2738
+ data: _extends({}, formState.tableForm, {
2874
2739
  sortOrder
2875
- }
2740
+ })
2876
2741
  });
2877
2742
  };
2878
2743
  const onSortFormReset = setSortFormValue => {
@@ -2922,16 +2787,13 @@ const Inbox = _ref2 => {
2922
2787
  };
2923
2788
 
2924
2789
  const ActionButton = _ref => {
2925
- let {
2926
- jumpTo,
2927
- state
2928
- } = _ref;
2790
+ let jumpTo = _ref.jumpTo,
2791
+ state = _ref.state;
2929
2792
  const history = useHistory();
2930
2793
  function routeTo() {
2931
- history.push(jumpTo, {
2932
- ...state,
2794
+ history.push(jumpTo, _extends({}, state, {
2933
2795
  isEditing: true
2934
- });
2796
+ }));
2935
2797
  }
2936
2798
  return /*#__PURE__*/React.createElement(LinkButton, {
2937
2799
  label: /*#__PURE__*/React.createElement(EditIcon, {
@@ -2965,16 +2827,14 @@ const extractReviewData = (searchData, flowState) => {
2965
2827
  };
2966
2828
  };
2967
2829
  const ReviewSection = _ref2 => {
2968
- let {
2969
- title,
2970
- fields,
2971
- newData,
2972
- oldData,
2973
- t,
2974
- jumpTo,
2975
- state,
2976
- hideEditButton
2977
- } = _ref2;
2830
+ let title = _ref2.title,
2831
+ fields = _ref2.fields,
2832
+ newData = _ref2.newData,
2833
+ oldData = _ref2.oldData,
2834
+ t = _ref2.t,
2835
+ jumpTo = _ref2.jumpTo,
2836
+ state = _ref2.state,
2837
+ hideEditButton = _ref2.hideEditButton;
2978
2838
  return /*#__PURE__*/React.createElement("div", {
2979
2839
  className: "review-section-wrapper",
2980
2840
  style: {
@@ -3092,77 +2952,75 @@ const ReviewSection = _ref2 => {
3092
2952
  })))));
3093
2953
  };
3094
2954
  const Review = () => {
3095
- var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _newDataRaw$address, _newDataRaw$address2, _newDataRaw$address3, _newDataRaw$address4, _newDataRaw$address5, _newDataRaw$address6, _newDataRaw$address7, _newDataRaw$address8, _newDataRaw$address9, _newDataRaw$address0, _newDataRaw$address1, _newDataRaw$address10, _newDataRaw$address11, _newDataRaw$address12, _newDataRaw$address13, _newDataRaw$address14, _newDataRaw$property, _newDataRaw$property2, _editedProperty$conne, _newDataRaw$property3, _editedProperty$conne2, _newDataRaw$property4, _editedProperty$userT, _newDataRaw$property5, _editedProperty$noOfF, _newDataRaw$property6, _newDataRaw$property7, _newDataRaw$meter, _editedMeter$meterSta, _newDataRaw$meter2, _newDataRaw$meter3, _newDataRaw$meter4, _newDataRaw$meter5, _editedMeter$workingS, _newDataRaw$meter6, _editedMeter$lastBill, _newDataRaw$meter7, _newDataRaw$meter8, _Digit$UserService$ge;
3096
- const {
3097
- t
3098
- } = useTranslation();
2955
+ var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _newDataRaw$connectio, _newDataRaw$connectio2, _newDataRaw$connectio3, _newDataRaw$address, _newDataRaw$address2, _newDataRaw$address3, _newDataRaw$address4, _newDataRaw$address5, _newDataRaw$address6, _newDataRaw$address7, _newDataRaw$address8, _newDataRaw$address9, _newDataRaw$address0, _newDataRaw$address1, _newDataRaw$address10, _newDataRaw$address11, _newDataRaw$address12, _newDataRaw$address13, _newDataRaw$address14, _newDataRaw$property, _newDataRaw$property2, _editedProperty$conne, _newDataRaw$property3, _editedProperty$conne2, _newDataRaw$property4, _editedProperty$userT, _newDataRaw$property5, _editedProperty$noOfF, _newDataRaw$property6, _newDataRaw$property7, _newDataRaw$meter, _editedMeter$meterSta, _newDataRaw$meter2, _newDataRaw$meter3, _newDataRaw$meter4, _newDataRaw$meter5, _editedMeter$workingS, _newDataRaw$meter6, _editedMeter$lastBill, _newDataRaw$meter7, _newDataRaw$meter8, _Digit$UserService$ge;
2956
+ const _useTranslation = useTranslation(),
2957
+ t = _useTranslation.t;
3099
2958
  const history = useHistory();
3100
2959
  const location = useLocation();
3101
- let {
3102
- kno,
3103
- applicationId
3104
- } = useParams();
3105
- const [agree, setAgree] = useState(false);
3106
- const [isSubmitting, setIsSubmitting] = useState(false);
3107
- const [showPreview, setShowPreview] = useState(false);
3108
- const [previewUrl, setPreviewUrl] = useState("");
3109
- const [showOptions, setShowOptions] = useState(false);
3110
- const [showToast, setShowToast] = useState(false);
3111
- const [toastData, setToastData] = useState({
3112
- error: false,
3113
- label: ""
3114
- });
2960
+ let _useParams = useParams(),
2961
+ kno = _useParams.kno,
2962
+ applicationId = _useParams.applicationId;
2963
+ const _useState = useState(false),
2964
+ agree = _useState[0],
2965
+ setAgree = _useState[1];
2966
+ const _useState2 = useState(false),
2967
+ isSubmitting = _useState2[0];
2968
+ const _useState3 = useState(false),
2969
+ showPreview = _useState3[0],
2970
+ setShowPreview = _useState3[1];
2971
+ const _useState4 = useState(""),
2972
+ previewUrl = _useState4[0],
2973
+ setPreviewUrl = _useState4[1];
2974
+ const _useState5 = useState(false),
2975
+ showOptions = _useState5[0],
2976
+ setShowOptions = _useState5[1];
2977
+ const _useState6 = useState(false),
2978
+ showToast = _useState6[0],
2979
+ setShowToast = _useState6[1];
2980
+ const _useState7 = useState({
2981
+ error: false,
2982
+ label: ""
2983
+ }),
2984
+ toastData = _useState7[0],
2985
+ setToastData = _useState7[1];
3115
2986
  const options = [{
3116
2987
  action: t("APPROVE")
3117
2988
  }, {
3118
2989
  action: t("REJECT")
3119
2990
  }];
3120
2991
  const flowState = location.state || {};
3121
- const {
3122
- edits = {}
3123
- } = flowState;
2992
+ const _flowState$edits = flowState.edits,
2993
+ edits = _flowState$edits === void 0 ? {} : _flowState$edits;
3124
2994
  const activeKno = kno || applicationId;
3125
- const {
3126
- aadhaarData = {},
3127
- addressDetails: editedAddress = {},
3128
- propertyDetails: editedProperty = {},
3129
- meterDetails: editedMeter = {}
3130
- } = edits;
2995
+ const _edits$aadhaarData = edits.aadhaarData,
2996
+ aadhaarData = _edits$aadhaarData === void 0 ? {} : _edits$aadhaarData,
2997
+ _edits$addressDetails = edits.addressDetails,
2998
+ editedAddress = _edits$addressDetails === void 0 ? {} : _edits$addressDetails,
2999
+ _edits$propertyDetail = edits.propertyDetails,
3000
+ editedProperty = _edits$propertyDetail === void 0 ? {} : _edits$propertyDetail,
3001
+ _edits$meterDetails = edits.meterDetails,
3002
+ editedMeter = _edits$meterDetails === void 0 ? {} : _edits$meterDetails;
3131
3003
  const tenantId = Digit.ULBService.getCurrentTenantId();
3132
3004
  const workflowMutation = Digit.Hooks.ekyc.useEkycWorkflow(tenantId);
3133
3005
  const updateMutation = Digit.Hooks.ekyc.useEkycUpdate(tenantId);
3134
- const {
3135
- data: searchData,
3136
- isLoading: isSearchLoading
3137
- } = Digit.Hooks.ekyc.useEkycSearchReview({
3138
- kno: activeKno,
3139
- fetchType: "REVIEW"
3140
- }, tenantId, {
3141
- enabled: !!activeKno
3142
- });
3006
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycSearchReview({
3007
+ kno: activeKno,
3008
+ fetchType: "REVIEW"
3009
+ }, tenantId, {
3010
+ enabled: !!activeKno
3011
+ }),
3012
+ searchData = _Digit$Hooks$ekyc$use.data,
3013
+ isSearchLoading = _Digit$Hooks$ekyc$use.isLoading;
3143
3014
  const userRoles = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.roles) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.map(ele => ele.code)) || [];
3144
3015
  const isZRO = userRoles.includes("EKYC_ZRO") || userRoles.includes("ZRO");
3145
3016
  const isSupervisorOrSurveyorOrVendor = userRoles.includes("EKYC_SURVEYOR") || userRoles.includes("EKYC_VENDOR");
3146
3017
  const isStatusView = location.pathname.includes("/status/");
3147
3018
  const hideEditButton = isSupervisorOrSurveyorOrVendor && !isZRO || isStatusView;
3148
- const {
3149
- newData: apiNewData,
3150
- oldData: apiOldData
3151
- } = extractReviewData(searchData, flowState);
3152
- const flatNewData = apiNewData ? {
3153
- ...(apiNewData || {}),
3154
- ...((apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.connectionDetails) || {}),
3155
- ...((apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.addressDetails) || {}),
3156
- ...((apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.propertyInfo) || {}),
3157
- ...((apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.meterDetails) || {})
3158
- } : null;
3159
- const flatOldData = apiOldData ? {
3160
- ...(apiOldData || {}),
3161
- ...((apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.connectionDetails) || {}),
3162
- ...((apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.addressDetails) || {}),
3163
- ...((apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.propertyInfo) || {}),
3164
- ...((apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.meterDetails) || {})
3165
- } : null;
3019
+ const _extractReviewData = extractReviewData(searchData, flowState),
3020
+ apiNewData = _extractReviewData.newData,
3021
+ apiOldData = _extractReviewData.oldData;
3022
+ const flatNewData = apiNewData ? _extends({}, apiNewData || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.connectionDetails) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.addressDetails) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.propertyInfo) || {}, (apiNewData === null || apiNewData === void 0 ? void 0 : apiNewData.meterDetails) || {}) : null;
3023
+ const flatOldData = apiOldData ? _extends({}, apiOldData || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.connectionDetails) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.addressDetails) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.propertyInfo) || {}, (apiOldData === null || apiOldData === void 0 ? void 0 : apiOldData.meterDetails) || {}) : null;
3166
3024
  const prepareConsolidatedData = data => {
3167
3025
  if (!data) return null;
3168
3026
  const apiConn = (data === null || data === void 0 ? void 0 : data.connectionDetails) || data || {};
@@ -3228,8 +3086,12 @@ const Review = () => {
3228
3086
  };
3229
3087
  };
3230
3088
  const newDataRaw = prepareConsolidatedData(apiNewData);
3231
- const addressData = {
3232
- ...(newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.address),
3089
+ const connectionData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.connection, {
3090
+ consumerName: (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.name) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$connectio = newDataRaw.connection) === null || _newDataRaw$connectio === void 0 ? void 0 : _newDataRaw$connectio.consumerName),
3091
+ phoneNumber: (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.mobileNumber) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$connectio2 = newDataRaw.connection) === null || _newDataRaw$connectio2 === void 0 ? void 0 : _newDataRaw$connectio2.phoneNumber),
3092
+ knumber: (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$connectio3 = newDataRaw.connection) === null || _newDataRaw$connectio3 === void 0 ? void 0 : _newDataRaw$connectio3.knumber) || activeKno
3093
+ });
3094
+ const addressData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.address, {
3233
3095
  fullAddress: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.fullAddress) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address = newDataRaw.address) === null || _newDataRaw$address === void 0 ? void 0 : _newDataRaw$address.fullAddress),
3234
3096
  flatHouseNumber: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.flatHouseNumber) || (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.flatNo) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address2 = newDataRaw.address) === null || _newDataRaw$address2 === void 0 ? void 0 : _newDataRaw$address2.flatHouseNumber),
3235
3097
  buildingTower: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.buildingTower) || (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.building) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address3 = newDataRaw.address) === null || _newDataRaw$address3 === void 0 ? void 0 : _newDataRaw$address3.buildingTower),
@@ -3246,9 +3108,8 @@ const Review = () => {
3246
3108
  noOfPerson: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.noOfPerson) || (aadhaarData === null || aadhaarData === void 0 ? void 0 : aadhaarData.noOfPersons) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address12 = newDataRaw.address) === null || _newDataRaw$address12 === void 0 ? void 0 : _newDataRaw$address12.noOfPerson),
3247
3109
  knumber: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.knumber) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address13 = newDataRaw.address) === null || _newDataRaw$address13 === void 0 ? void 0 : _newDataRaw$address13.knumber) || activeKno,
3248
3110
  doorPhotoFilestoreId: (editedAddress === null || editedAddress === void 0 ? void 0 : editedAddress.doorPhotoFilestoreId) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$address14 = newDataRaw.address) === null || _newDataRaw$address14 === void 0 ? void 0 : _newDataRaw$address14.doorPhotoFilestoreId)
3249
- };
3250
- const propertyData = {
3251
- ...(newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.property),
3111
+ });
3112
+ const propertyData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.property, {
3252
3113
  kno: (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property = newDataRaw.property) === null || _newDataRaw$property === void 0 ? void 0 : _newDataRaw$property.kno) || activeKno,
3253
3114
  pidNumber: (editedProperty === null || editedProperty === void 0 ? void 0 : editedProperty.pidNumber) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property2 = newDataRaw.property) === null || _newDataRaw$property2 === void 0 ? void 0 : _newDataRaw$property2.pidNumber),
3254
3115
  typeOfConnection: (editedProperty === null || editedProperty === void 0 ? void 0 : (_editedProperty$conne = editedProperty.connectionTypeData) === null || _editedProperty$conne === void 0 ? void 0 : _editedProperty$conne.label) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property3 = newDataRaw.property) === null || _newDataRaw$property3 === void 0 ? void 0 : _newDataRaw$property3.typeOfConnection),
@@ -3256,9 +3117,8 @@ const Review = () => {
3256
3117
  userType: (editedProperty === null || editedProperty === void 0 ? void 0 : (_editedProperty$userT = editedProperty.userTypeData) === null || _editedProperty$userT === void 0 ? void 0 : _editedProperty$userT.label) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property5 = newDataRaw.property) === null || _newDataRaw$property5 === void 0 ? void 0 : _newDataRaw$property5.userType),
3257
3118
  numberOfFloors: (editedProperty === null || editedProperty === void 0 ? void 0 : (_editedProperty$noOfF = editedProperty.noOfFloorsData) === null || _editedProperty$noOfF === void 0 ? void 0 : _editedProperty$noOfF.label) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property6 = newDataRaw.property) === null || _newDataRaw$property6 === void 0 ? void 0 : _newDataRaw$property6.numberOfFloors),
3258
3119
  propertyDocumentFileStoreId: (editedProperty === null || editedProperty === void 0 ? void 0 : editedProperty.propertyDocumentFileStoreId) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$property7 = newDataRaw.property) === null || _newDataRaw$property7 === void 0 ? void 0 : _newDataRaw$property7.propertyDocumentFileStoreId)
3259
- };
3260
- const meterData = {
3261
- ...(newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.meter),
3120
+ });
3121
+ const meterData = _extends({}, newDataRaw === null || newDataRaw === void 0 ? void 0 : newDataRaw.meter, {
3262
3122
  kno: (editedMeter === null || editedMeter === void 0 ? void 0 : editedMeter.kno) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter = newDataRaw.meter) === null || _newDataRaw$meter === void 0 ? void 0 : _newDataRaw$meter.kno) || activeKno,
3263
3123
  metered: (editedMeter === null || editedMeter === void 0 ? void 0 : (_editedMeter$meterSta = editedMeter.meterStatusData) === null || _editedMeter$meterSta === void 0 ? void 0 : _editedMeter$meterSta.value) === "Metered" || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter2 = newDataRaw.meter) === null || _newDataRaw$meter2 === void 0 ? void 0 : _newDataRaw$meter2.metered),
3264
3124
  meterNumber: newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter3 = newDataRaw.meter) === null || _newDataRaw$meter3 === void 0 ? void 0 : _newDataRaw$meter3.meterNumber,
@@ -3267,7 +3127,7 @@ const Review = () => {
3267
3127
  workingStatus: (editedMeter === null || editedMeter === void 0 ? void 0 : (_editedMeter$workingS = editedMeter.workingStatusData) === null || _editedMeter$workingS === void 0 ? void 0 : _editedMeter$workingS.value) === "Working" || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter6 = newDataRaw.meter) === null || _newDataRaw$meter6 === void 0 ? void 0 : _newDataRaw$meter6.workingStatus),
3268
3128
  lastBillRaised: (editedMeter === null || editedMeter === void 0 ? void 0 : (_editedMeter$lastBill = editedMeter.lastBillRaisedData) === null || _editedMeter$lastBill === void 0 ? void 0 : _editedMeter$lastBill.value) === "Yes" || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter7 = newDataRaw.meter) === null || _newDataRaw$meter7 === void 0 ? void 0 : _newDataRaw$meter7.lastBillRaised),
3269
3129
  meterPhotoFileStoreId: (editedMeter === null || editedMeter === void 0 ? void 0 : editedMeter.meterPhotoFileStoreId) || (newDataRaw === null || newDataRaw === void 0 ? void 0 : (_newDataRaw$meter8 = newDataRaw.meter) === null || _newDataRaw$meter8 === void 0 ? void 0 : _newDataRaw$meter8.meterPhotoFileStoreId)
3270
- };
3130
+ });
3271
3131
  const headerMapping = [{
3272
3132
  key: "kno",
3273
3133
  label: "KNO"
@@ -3588,13 +3448,12 @@ const Review = () => {
3588
3448
  }];
3589
3449
  const handleDeclaration = () => setAgree(!agree);
3590
3450
  const loggedInUserInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
3591
- const {
3592
- data: userData
3593
- } = Digit.Hooks.useUserSearch(tenantId, {
3594
- uuid: [loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid]
3595
- }, {}, {
3596
- enabled: !!(loggedInUserInfo !== null && loggedInUserInfo !== void 0 && loggedInUserInfo.uuid)
3597
- });
3451
+ const _Digit$Hooks$useUserS = Digit.Hooks.useUserSearch(tenantId, {
3452
+ uuid: [loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid]
3453
+ }, {}, {
3454
+ enabled: !!(loggedInUserInfo !== null && loggedInUserInfo !== void 0 && loggedInUserInfo.uuid)
3455
+ }),
3456
+ userData = _Digit$Hooks$useUserS.data;
3598
3457
  const supervisorData = (userData === null || userData === void 0 ? void 0 : userData.user) || [];
3599
3458
  const matchedSupervisor = supervisorData === null || supervisorData === void 0 ? void 0 : supervisorData.find(s => (s === null || s === void 0 ? void 0 : s.uuid) === (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid) || (s === null || s === void 0 ? void 0 : s.userName) === (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.userName));
3600
3459
  const supervisorId = (matchedSupervisor === null || matchedSupervisor === void 0 ? void 0 : matchedSupervisor.uuid) || (loggedInUserInfo === null || loggedInUserInfo === void 0 ? void 0 : loggedInUserInfo.uuid);
@@ -3883,13 +3742,13 @@ const Review = () => {
3883
3742
  };
3884
3743
 
3885
3744
  const AadhaarVerificationConfig = function (t, formData, uploadFile, setDocumentId, documentId) {
3886
- var _formData, _formData$consumerTyp, _formData2, _formData3, _formData3$occupantTy, _formData4, _formData5;
3745
+ var _formData, _formData$consumerTyp, _formData2, _formData3, _formData3$occupantTy, _formData4, _formData$informantIs, _formData5;
3887
3746
  if (formData === void 0) {
3888
3747
  formData = {};
3889
3748
  }
3890
3749
  const consumerType = ((_formData = formData) === null || _formData === void 0 ? void 0 : (_formData$consumerTyp = _formData.consumerType) === null || _formData$consumerTyp === void 0 ? void 0 : _formData$consumerTyp.name) || ((_formData2 = formData) === null || _formData2 === void 0 ? void 0 : _formData2.consumerType);
3891
3750
  const occupantType = ((_formData3 = formData) === null || _formData3 === void 0 ? void 0 : (_formData3$occupantTy = _formData3.occupantType) === null || _formData3$occupantTy === void 0 ? void 0 : _formData3$occupantTy.name) || ((_formData4 = formData) === null || _formData4 === void 0 ? void 0 : _formData4.occupantType);
3892
- const informantIsConsumer = ((_formData5 = formData) === null || _formData5 === void 0 ? void 0 : _formData5.informantIsConsumer) ?? true;
3751
+ const informantIsConsumer = (_formData$informantIs = (_formData5 = formData) === null || _formData5 === void 0 ? void 0 : _formData5.informantIsConsumer) != null ? _formData$informantIs : true;
3893
3752
  const fields = [{
3894
3753
  label: t("Consumer Type"),
3895
3754
  isMandatory: true,
@@ -4092,11 +3951,14 @@ const AadhaarVerificationConfig = function (t, formData, uploadFile, setDocument
4092
3951
  key: "informantIsConsumer",
4093
3952
  populators: {
4094
3953
  name: "informantIsConsumer",
4095
- component: props => /*#__PURE__*/React.createElement(CheckBox, {
4096
- label: t("Yes, the informant is the consumer"),
4097
- checked: props.value ?? true,
4098
- onChange: e => props.onChange(e.target.checked)
4099
- })
3954
+ component: props => {
3955
+ var _props$value;
3956
+ return /*#__PURE__*/React.createElement(CheckBox, {
3957
+ label: t("Yes, the informant is the consumer"),
3958
+ checked: (_props$value = props.value) != null ? _props$value : true,
3959
+ onChange: e => props.onChange(e.target.checked)
3960
+ });
3961
+ }
4100
3962
  }
4101
3963
  }];
4102
3964
  if (!informantIsConsumer) {
@@ -4207,11 +4069,14 @@ const AadhaarVerificationConfig = function (t, formData, uploadFile, setDocument
4207
4069
  validation: {
4208
4070
  required: true
4209
4071
  },
4210
- component: props => /*#__PURE__*/React.createElement(CheckBox, {
4211
- label: t("I hereby consent to verify my Aadhaar details."),
4212
- checked: props.value ?? false,
4213
- onChange: e => props.onChange(e.target.checked)
4214
- })
4072
+ component: props => {
4073
+ var _props$value2;
4074
+ return /*#__PURE__*/React.createElement(CheckBox, {
4075
+ label: t("I hereby consent to verify my Aadhaar details."),
4076
+ checked: (_props$value2 = props.value) != null ? _props$value2 : false,
4077
+ onChange: e => props.onChange(e.target.checked)
4078
+ });
4079
+ }
4215
4080
  }
4216
4081
  });
4217
4082
  return [{
@@ -4221,82 +4086,95 @@ const AadhaarVerificationConfig = function (t, formData, uploadFile, setDocument
4221
4086
  };
4222
4087
 
4223
4088
  const AadhaarVerification = _ref => {
4224
- let {
4225
- config,
4226
- onSelect,
4227
- formData
4228
- } = _ref;
4229
- const {
4230
- t
4231
- } = useTranslation();
4089
+ let config = _ref.config,
4090
+ onSelect = _ref.onSelect,
4091
+ formData = _ref.formData;
4092
+ const _useTranslation = useTranslation(),
4093
+ t = _useTranslation.t;
4232
4094
  const location = useLocation();
4233
4095
  const flowState = location.state || {};
4234
4096
  const tenantId = Digit.ULBService.getCurrentTenantId();
4235
4097
  const queryParams = new URLSearchParams(location.search);
4236
4098
  const urlKno = queryParams.get("kno");
4237
4099
  const searchKno = urlKno || (flowState === null || flowState === void 0 ? void 0 : flowState.kNumber) || (flowState === null || flowState === void 0 ? void 0 : flowState.kno) || (formData === null || formData === void 0 ? void 0 : formData.kNumber) || (formData === null || formData === void 0 ? void 0 : formData.kno) || sessionStorage.getItem("EKYC_K_NUMBER") || "";
4238
- const {
4239
- isLoading,
4240
- data: searchData
4241
- } = Digit.Hooks.ekyc.useSearchConnection({
4242
- tenantId,
4243
- details: {
4244
- kno: searchKno,
4245
- fetchType: "CONNECTION"
4246
- }
4247
- }, {
4248
- enabled: !!searchKno,
4249
- cacheTime: 0
4250
- });
4100
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useSearchConnection({
4101
+ tenantId,
4102
+ details: {
4103
+ kno: searchKno,
4104
+ fetchType: "CONNECTION"
4105
+ }
4106
+ }, {
4107
+ enabled: !!searchKno,
4108
+ cacheTime: 0
4109
+ }),
4110
+ isLoading = _Digit$Hooks$ekyc$use.isLoading,
4111
+ searchData = _Digit$Hooks$ekyc$use.data;
4251
4112
  const updateMutation = Digit.Hooks.ekyc.useEkycUpdate(tenantId);
4252
4113
  const savedData = (formData === null || formData === void 0 ? void 0 : formData.aadhaarVerification) || {};
4253
- const [documentId, setDocumentId] = useState(savedData.documentId || null);
4254
- const [documentProof, setDocumentProof] = useState(savedData.documentProof || null);
4255
- const [toast, setToast] = useState(null);
4256
- const [isDataLoaded, setIsDataLoaded] = useState(false);
4257
- const [canSubmit, setCanSubmit] = useState(false);
4258
- const [defaultValues, setDefaultValues] = useState(() => ({
4259
- kno: savedData.kno || searchKno || "",
4260
- consumerType: savedData.consumerType ? {
4261
- name: savedData.consumerType
4262
- } : null,
4263
- occupantType: savedData.occupantType ? {
4264
- name: savedData.occupantType
4265
- } : null,
4266
- categoryType: savedData.categoryType ? {
4267
- name: savedData.categoryType
4268
- } : null,
4269
- firstName: savedData.firstName || "",
4270
- middleName: savedData.middleName || "",
4271
- lastName: savedData.lastName || "",
4272
- gender: savedData.gender ? {
4273
- name: savedData.gender
4274
- } : null,
4275
- parentSpouseName: savedData.parentSpouseName || "",
4276
- mobile: savedData.mobile || "",
4277
- whatsapp: savedData.whatsapp || "",
4278
- email: savedData.email || "",
4279
- residents: savedData.residents || "",
4280
- identityType: savedData.identityType ? {
4281
- name: savedData.identityType
4282
- } : null,
4283
- documentNumber: savedData.documentNumber || "",
4284
- informantIsConsumer: savedData.informantIsConsumer ?? true,
4285
- informantName: savedData.informantName || "",
4286
- informantRelation: savedData.informantRelation || "",
4287
- documentId: savedData.documentId || null,
4288
- documentProof: savedData.documentProof || null,
4289
- idFile: savedData.idFile || null,
4290
- ownerMobile: savedData.ownerMobile || "",
4291
- tenantVerification: savedData.tenantVerification || "",
4292
- designation: savedData.designation || "",
4293
- department: savedData.department || "",
4294
- employeeId: savedData.employeeId || "",
4295
- entityName: savedData.entityName || "",
4296
- contactPerson: savedData.contactPerson || "",
4297
- consent: savedData.consent || false
4298
- }));
4299
- const [localFormData, setLocalFormData] = useState(defaultValues);
4114
+ const _useState = useState(savedData.documentId || null),
4115
+ documentId = _useState[0],
4116
+ setDocumentId = _useState[1];
4117
+ const _useState2 = useState(savedData.documentProof || null),
4118
+ documentProof = _useState2[0],
4119
+ setDocumentProof = _useState2[1];
4120
+ const _useState3 = useState(null),
4121
+ toast = _useState3[0],
4122
+ setToast = _useState3[1];
4123
+ const _useState4 = useState(false),
4124
+ isDataLoaded = _useState4[0],
4125
+ setIsDataLoaded = _useState4[1];
4126
+ const _useState5 = useState(false),
4127
+ canSubmit = _useState5[0],
4128
+ setCanSubmit = _useState5[1];
4129
+ const _useState6 = useState(() => {
4130
+ var _savedData$informantI;
4131
+ return {
4132
+ kno: savedData.kno || searchKno || "",
4133
+ consumerType: savedData.consumerType ? {
4134
+ name: savedData.consumerType
4135
+ } : null,
4136
+ occupantType: savedData.occupantType ? {
4137
+ name: savedData.occupantType
4138
+ } : null,
4139
+ categoryType: savedData.categoryType ? {
4140
+ name: savedData.categoryType
4141
+ } : null,
4142
+ firstName: savedData.firstName || "",
4143
+ middleName: savedData.middleName || "",
4144
+ lastName: savedData.lastName || "",
4145
+ gender: savedData.gender ? {
4146
+ name: savedData.gender
4147
+ } : null,
4148
+ parentSpouseName: savedData.parentSpouseName || "",
4149
+ mobile: savedData.mobile || "",
4150
+ whatsapp: savedData.whatsapp || "",
4151
+ email: savedData.email || "",
4152
+ residents: savedData.residents || "",
4153
+ identityType: savedData.identityType ? {
4154
+ name: savedData.identityType
4155
+ } : null,
4156
+ documentNumber: savedData.documentNumber || "",
4157
+ informantIsConsumer: (_savedData$informantI = savedData.informantIsConsumer) != null ? _savedData$informantI : true,
4158
+ informantName: savedData.informantName || "",
4159
+ informantRelation: savedData.informantRelation || "",
4160
+ documentId: savedData.documentId || null,
4161
+ documentProof: savedData.documentProof || null,
4162
+ idFile: savedData.idFile || null,
4163
+ ownerMobile: savedData.ownerMobile || "",
4164
+ tenantVerification: savedData.tenantVerification || "",
4165
+ designation: savedData.designation || "",
4166
+ department: savedData.department || "",
4167
+ employeeId: savedData.employeeId || "",
4168
+ entityName: savedData.entityName || "",
4169
+ contactPerson: savedData.contactPerson || "",
4170
+ consent: savedData.consent || false
4171
+ };
4172
+ }),
4173
+ defaultValues = _useState6[0],
4174
+ setDefaultValues = _useState6[1];
4175
+ const _useState7 = useState(defaultValues),
4176
+ localFormData = _useState7[0],
4177
+ setLocalFormData = _useState7[1];
4300
4178
  const extractApplicationData = searchData => {
4301
4179
  if (!searchData) return null;
4302
4180
  const reviewWrapper = (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReviewInfo) || (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReview) || searchData;
@@ -4309,6 +4187,7 @@ const AadhaarVerification = _ref => {
4309
4187
  const details = (rawData === null || rawData === void 0 ? void 0 : rawData.connectionDetails) || rawData || {};
4310
4188
  const addrDetails = (rawData === null || rawData === void 0 ? void 0 : rawData.addressDetails) || {};
4311
4189
  if (details && Object.keys(details).length > 0 && !isDataLoaded) {
4190
+ var _savedData$informantI2;
4312
4191
  let fName = "";
4313
4192
  let mName = "";
4314
4193
  let lName = "";
@@ -4357,7 +4236,7 @@ const AadhaarVerification = _ref => {
4357
4236
  name: savedData.identityType
4358
4237
  } : null,
4359
4238
  documentNumber: savedData.documentNumber || "",
4360
- informantIsConsumer: savedData.informantIsConsumer ?? true,
4239
+ informantIsConsumer: (_savedData$informantI2 = savedData.informantIsConsumer) != null ? _savedData$informantI2 : true,
4361
4240
  informantName: savedData.informantName || details.informantName || "",
4362
4241
  informantRelation: savedData.informantRelation || details.informantRelation || "",
4363
4242
  documentId: savedData.documentId || details.documentNumber || null,
@@ -4425,10 +4304,7 @@ const AadhaarVerification = _ref => {
4425
4304
  const occupantTypeChanged = ((data === null || data === void 0 ? void 0 : (_data$occupantType = data.occupantType) === null || _data$occupantType === void 0 ? void 0 : _data$occupantType.name) || (data === null || data === void 0 ? void 0 : data.occupantType)) !== ((localFormData === null || localFormData === void 0 ? void 0 : (_localFormData$occupa = localFormData.occupantType) === null || _localFormData$occupa === void 0 ? void 0 : _localFormData$occupa.name) || (localFormData === null || localFormData === void 0 ? void 0 : localFormData.occupantType));
4426
4305
  const informantIsConsumerChanged = (data === null || data === void 0 ? void 0 : data.informantIsConsumer) !== (localFormData === null || localFormData === void 0 ? void 0 : localFormData.informantIsConsumer);
4427
4306
  if (consumerTypeChanged || occupantTypeChanged || informantIsConsumerChanged) {
4428
- setLocalFormData(prev => ({
4429
- ...prev,
4430
- ...data
4431
- }));
4307
+ setLocalFormData(prev => _extends({}, prev, data));
4432
4308
  }
4433
4309
  const knoVal = (data === null || data === void 0 ? void 0 : data.kno) || searchKno;
4434
4310
  const consumerTypeVal = data === null || data === void 0 ? void 0 : data.consumerType;
@@ -4456,13 +4332,13 @@ const AadhaarVerification = _ref => {
4456
4332
  };
4457
4333
  const onSubmit = function (data) {
4458
4334
  try {
4459
- var _data$consumerType2, _data$occupantType2, _data$categoryType, _data$gender, _data$identityType;
4335
+ var _data$consumerType2, _data$occupantType2, _data$categoryType, _data$gender, _data$identityType, _data$informantIsCons;
4460
4336
  const submitData = {
4461
4337
  kno: data.kno || searchKno,
4462
4338
  consumerType: ((_data$consumerType2 = data.consumerType) === null || _data$consumerType2 === void 0 ? void 0 : _data$consumerType2.name) || data.consumerType,
4463
4339
  occupantType: ((_data$occupantType2 = data.occupantType) === null || _data$occupantType2 === void 0 ? void 0 : _data$occupantType2.name) || data.occupantType,
4464
4340
  categoryType: ((_data$categoryType = data.categoryType) === null || _data$categoryType === void 0 ? void 0 : _data$categoryType.name) || data.categoryType,
4465
- consumerName: data.consumerName || `${data.firstName || ""} ${data.middleName || ""} ${data.lastName || ""}`.trim(),
4341
+ consumerName: data.consumerName || ((data.firstName || "") + " " + (data.middleName || "") + " " + (data.lastName || "")).trim(),
4466
4342
  firstName: data.firstName,
4467
4343
  middleName: data.middleName,
4468
4344
  lastName: data.lastName,
@@ -4487,16 +4363,15 @@ const AadhaarVerification = _ref => {
4487
4363
  idProof: ((_data$identityType = data.identityType) === null || _data$identityType === void 0 ? void 0 : _data$identityType.name) || data.identityType,
4488
4364
  idNumber: data.documentNumber,
4489
4365
  consent: data.consent,
4490
- informantIsConsumer: data.informantIsConsumer ?? true,
4366
+ informantIsConsumer: (_data$informantIsCons = data.informantIsConsumer) != null ? _data$informantIsCons : true,
4491
4367
  informantName: data.informantName,
4492
4368
  informantRelation: data.informantRelation
4493
4369
  };
4494
4370
  const _temp2 = _catch(function () {
4495
- return Promise.resolve(updateMutation.mutateAsync({
4371
+ return Promise.resolve(updateMutation.mutateAsync(_extends({
4496
4372
  RequestInfo: {},
4497
- updateType: "CONSUMER",
4498
- ...submitData
4499
- })).then(function () {
4373
+ updateType: "CONSUMER"
4374
+ }, submitData))).then(function () {
4500
4375
  setToast({
4501
4376
  type: "success",
4502
4377
  message: t("Data updated successfully!")
@@ -4522,8 +4397,7 @@ const AadhaarVerification = _ref => {
4522
4397
  key: isDataLoaded ? "loaded" : "loading",
4523
4398
  isDisabled: !canSubmit,
4524
4399
  label: t("ES_COMMON_CONTINUE"),
4525
- config: Config.map(item => ({
4526
- ...item,
4400
+ config: Config.map(item => _extends({}, item, {
4527
4401
  isCollapsible: true,
4528
4402
  isDefaultOpen: true
4529
4403
  })),
@@ -4593,32 +4467,25 @@ const ekycConfig = [{
4593
4467
  }]
4594
4468
  }];
4595
4469
 
4470
+ const _excluded$3 = ["edits"];
4596
4471
  const EKYCForm = _ref => {
4597
- let {
4598
- path: passedPath
4599
- } = _ref;
4472
+ let passedPath = _ref.path;
4600
4473
  const match = useRouteMatch();
4601
- const {
4602
- t
4603
- } = useTranslation();
4474
+ const _useTranslation = useTranslation(),
4475
+ t = _useTranslation.t;
4604
4476
  const location = useLocation();
4605
- const {
4606
- pathname
4607
- } = location;
4477
+ const pathname = location.pathname;
4608
4478
  const history = useHistory();
4609
4479
  let config = [];
4610
- const [params, setParams] = Digit.Hooks.useSessionStorage("EKYC_CREATE", {});
4480
+ const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("EKYC_CREATE", {}),
4481
+ params = _Digit$Hooks$useSessi[0],
4482
+ setParams = _Digit$Hooks$useSessi[1];
4611
4483
  useEffect(() => {
4612
4484
  if (location.state && Object.keys(location.state).length > 0) {
4613
- const {
4614
- edits,
4615
- ...rest
4616
- } = location.state;
4617
- setParams({
4618
- ...params,
4619
- ...rest,
4620
- ...edits
4621
- });
4485
+ const _location$state = location.state,
4486
+ edits = _location$state.edits,
4487
+ rest = _objectWithoutPropertiesLoose(_location$state, _excluded$3);
4488
+ setParams(_extends({}, params, rest, edits));
4622
4489
  }
4623
4490
  }, [location.state]);
4624
4491
  const goNext = (skipStep, index, isAddMultiple, key) => {
@@ -4636,14 +4503,11 @@ const EKYCForm = _ref => {
4636
4503
  }
4637
4504
  const base = passedPath || match.path.split("/").slice(0, -1).join("/");
4638
4505
  if (nextStep === null) {
4639
- return redirectWithHistory(`${base}/review`, {
4640
- ...params,
4506
+ return redirectWithHistory(base + "/review", _extends({}, params, {
4641
4507
  edits: params
4642
- });
4508
+ }));
4643
4509
  }
4644
- redirectWithHistory(`${base}/${nextStep}`, {
4645
- ...params
4646
- });
4510
+ redirectWithHistory(base + "/" + nextStep, _extends({}, params));
4647
4511
  };
4648
4512
  function handleSelect(key, data, skipStep, index, isAddMultiple, silent) {
4649
4513
  if (isAddMultiple === void 0) {
@@ -4652,12 +4516,8 @@ const EKYCForm = _ref => {
4652
4516
  if (silent === void 0) {
4653
4517
  silent = false;
4654
4518
  }
4655
- setParams(prev => ({
4656
- ...prev,
4657
- [key]: {
4658
- ...params[key],
4659
- ...data
4660
- }
4519
+ setParams(prev => _extends({}, prev, {
4520
+ [key]: _extends({}, params[key], data)
4661
4521
  }));
4662
4522
  if (!silent) {
4663
4523
  goNext(skipStep, index, isAddMultiple, key);
@@ -4689,30 +4549,27 @@ const EKYCForm = _ref => {
4689
4549
  }), /*#__PURE__*/React.createElement("div", {
4690
4550
  className: "employee-form-section"
4691
4551
  }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
4692
- path: formStepRoutes.map(route => `${passedPath || match.path.split("/").slice(0, -1).join("/")}/${route}`)
4552
+ path: formStepRoutes.map(route => (passedPath || match.path.split("/").slice(0, -1).join("/")) + "/" + route)
4693
4553
  }, /*#__PURE__*/React.createElement("div", {
4694
4554
  className: "single-page-form-container"
4695
4555
  }, config.map((routeObj, index) => {
4696
- const {
4697
- component
4698
- } = routeObj;
4556
+ const component = routeObj.component;
4699
4557
  const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
4700
4558
  return /*#__PURE__*/React.createElement("div", {
4701
4559
  key: index,
4702
4560
  ref: el => sectionRefs.current[routeObj.route] = el,
4703
4561
  className: "form-section-unit"
4704
4562
  }, /*#__PURE__*/React.createElement(Component, {
4705
- config: {
4706
- ...routeObj,
4563
+ config: _extends({}, routeObj, {
4707
4564
  isCollapsible: true,
4708
4565
  defaultOpen: true
4709
- },
4566
+ }),
4710
4567
  onSelect: handleSelect,
4711
4568
  t: t,
4712
4569
  formData: params
4713
4570
  }));
4714
4571
  }))), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
4715
- to: `${passedPath || match.path.split("/").slice(0, -1).join("/")}/${config.indexRoute}`
4572
+ to: (passedPath || match.path.split("/").slice(0, -1).join("/")) + "/" + config.indexRoute
4716
4573
  }))))));
4717
4574
  };
4718
4575
 
@@ -4771,20 +4628,18 @@ const VendorPerformanceSkeleton = () => {
4771
4628
  })));
4772
4629
  };
4773
4630
  const AdminDashboard = () => {
4774
- const {
4775
- t
4776
- } = useTranslation();
4631
+ const _useTranslation = useTranslation(),
4632
+ t = _useTranslation.t;
4777
4633
  const history = useHistory();
4778
- const {
4779
- data: progressData,
4780
- isLoading: isProgressLoading
4781
- } = Digit.Hooks.ekyc.useEkycAssignmentProgress({
4782
- tenantId: "dl.djb",
4783
- allVendorsDetailed: true
4784
- }, {
4785
- enabled: true,
4786
- keepPreviousData: true
4787
- });
4634
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress({
4635
+ tenantId: "dl.djb",
4636
+ allVendorsDetailed: true
4637
+ }, {
4638
+ enabled: true,
4639
+ keepPreviousData: true
4640
+ }),
4641
+ progressData = _Digit$Hooks$ekyc$use.data,
4642
+ isProgressLoading = _Digit$Hooks$ekyc$use.isLoading;
4788
4643
  return /*#__PURE__*/React.createElement(Card, {
4789
4644
  className: "surveyor-dashboard"
4790
4645
  }, /*#__PURE__*/React.createElement(Dashboard, {
@@ -4801,7 +4656,7 @@ const AdminDashboard = () => {
4801
4656
  return /*#__PURE__*/React.createElement("div", {
4802
4657
  key: vendor.vendorId,
4803
4658
  className: "vendor-perf-card",
4804
- onClick: () => history.push(`/digit-ui/employee/ekyc/vendors/${vendor.vendorId}`)
4659
+ onClick: () => history.push("/digit-ui/employee/ekyc/vendors/" + vendor.vendorId)
4805
4660
  }, /*#__PURE__*/React.createElement("div", {
4806
4661
  className: "vendor-card-header"
4807
4662
  }, /*#__PURE__*/React.createElement("div", {
@@ -4823,7 +4678,7 @@ const AdminDashboard = () => {
4823
4678
  }, /*#__PURE__*/React.createElement("div", {
4824
4679
  className: "progress-bar-fill",
4825
4680
  style: {
4826
- width: `${vendor.progressPercent}%`
4681
+ width: vendor.progressPercent + "%"
4827
4682
  }
4828
4683
  })), /*#__PURE__*/React.createElement("div", {
4829
4684
  className: "progress-label"
@@ -4867,25 +4722,24 @@ const AdminDashboard = () => {
4867
4722
 
4868
4723
  const SupervisorDetailsCard = () => {
4869
4724
  var _Digit$SessionStorage, _fullName$charAt;
4870
- const {
4871
- t
4872
- } = useTranslation();
4725
+ const _useTranslation = useTranslation(),
4726
+ t = _useTranslation.t;
4873
4727
  const history = useHistory();
4874
4728
  const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
4875
- const {
4876
- id: supervisorId
4877
- } = useParams();
4729
+ const _useParams = useParams(),
4730
+ supervisorId = _useParams.id;
4878
4731
  const loggedInUser = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.info;
4879
- const [ekycDownloadLoading, setEkycDownloadLoading] = useState(false);
4880
- const {
4881
- data: supervisorSearchResponse,
4882
- isLoading: isSupervisorSearchLoading
4883
- } = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
4884
- status: "ACTIVE"
4885
- }, {
4886
- enabled: !!tenantId,
4887
- staleTime: 300000
4888
- });
4732
+ const _useState = useState(false),
4733
+ ekycDownloadLoading = _useState[0],
4734
+ setEkycDownloadLoading = _useState[1];
4735
+ const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
4736
+ status: "ACTIVE"
4737
+ }, {
4738
+ enabled: !!tenantId,
4739
+ staleTime: 300000
4740
+ }),
4741
+ supervisorSearchResponse = _Digit$Hooks$fsm$useS.data,
4742
+ isSupervisorSearchLoading = _Digit$Hooks$fsm$useS.isLoading;
4889
4743
  const targetVendorId = useMemo(() => {
4890
4744
  const targetId = supervisorId || (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid);
4891
4745
  if (!targetId || !(supervisorSearchResponse !== null && supervisorSearchResponse !== void 0 && supervisorSearchResponse.supervisors)) return null;
@@ -4895,34 +4749,31 @@ const SupervisorDetailsCard = () => {
4895
4749
  });
4896
4750
  return (matchedSup === null || matchedSup === void 0 ? void 0 : matchedSup.vendorId) || null;
4897
4751
  }, [supervisorId, loggedInUser, supervisorSearchResponse]);
4898
- const {
4899
- isLoading: isProgressLoading,
4900
- data: progressData
4901
- } = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
4902
- vendorId: targetVendorId,
4903
- vendorIds: [targetVendorId]
4904
- } : {}, {
4905
- enabled: !!tenantId,
4906
- keepPreviousData: true
4907
- });
4908
- const {
4909
- data: surveyorSearchResponse,
4910
- isLoading: isSurveyorSearchLoading
4911
- } = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
4912
- status: "ACTIVE"
4913
- }, {
4914
- enabled: !!tenantId,
4915
- staleTime: 300000
4916
- });
4917
- const {
4918
- data: vendorSearchResponse,
4919
- isLoading: isVendorSearchLoading
4920
- } = Digit.Hooks.fsm.useDsoSearch(tenantId, {
4921
- status: "ACTIVE"
4922
- }, {
4923
- enabled: !!tenantId,
4924
- staleTime: 300000
4925
- });
4752
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycAssignmentProgress(targetVendorId ? {
4753
+ vendorId: targetVendorId,
4754
+ vendorIds: [targetVendorId]
4755
+ } : {}, {
4756
+ enabled: !!tenantId,
4757
+ keepPreviousData: true
4758
+ }),
4759
+ isProgressLoading = _Digit$Hooks$ekyc$use.isLoading,
4760
+ progressData = _Digit$Hooks$ekyc$use.data;
4761
+ const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
4762
+ status: "ACTIVE"
4763
+ }, {
4764
+ enabled: !!tenantId,
4765
+ staleTime: 300000
4766
+ }),
4767
+ surveyorSearchResponse = _Digit$Hooks$fsm$useS2.data,
4768
+ isSurveyorSearchLoading = _Digit$Hooks$fsm$useS2.isLoading;
4769
+ const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
4770
+ status: "ACTIVE"
4771
+ }, {
4772
+ enabled: !!tenantId,
4773
+ staleTime: 300000
4774
+ }),
4775
+ vendorSearchResponse = _Digit$Hooks$fsm$useD.data,
4776
+ isVendorSearchLoading = _Digit$Hooks$fsm$useD.isLoading;
4926
4777
  const supervisor = useMemo(() => {
4927
4778
  const targetOwnerOrId = supervisorId || (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.uuid);
4928
4779
  if (!targetOwnerOrId) return null;
@@ -5079,7 +4930,7 @@ const SupervisorDetailsCard = () => {
5079
4930
  type: "today",
5080
4931
  icon: /*#__PURE__*/React.createElement(FaUsers, null)
5081
4932
  }, {
5082
- label: "EKYC_COMPLETED",
4933
+ label: "EKYC_SUBMITTED_TITLE",
5083
4934
  count: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.submittedKnos) || 0,
5084
4935
  color: "#10B981",
5085
4936
  type: "month",
@@ -5092,13 +4943,17 @@ const SupervisorDetailsCard = () => {
5092
4943
  icon: /*#__PURE__*/React.createElement(FaClock, null)
5093
4944
  }, {
5094
4945
  label: "OVERALL_PROGRESS",
5095
- count: `${(supervisor === null || supervisor === void 0 ? void 0 : supervisor.progressPercent) || 0}%`,
4946
+ count: ((supervisor === null || supervisor === void 0 ? void 0 : supervisor.progressPercent) || 0) + "%",
5096
4947
  color: "#A855F7",
5097
4948
  type: "progress",
5098
4949
  icon: /*#__PURE__*/React.createElement(FaChartLine, null)
5099
4950
  }], [supervisor]);
5100
- const [currentPage, setCurrentPage] = useState(0);
5101
- const [pageSize, setPageSize] = useState(20);
4951
+ const _useState2 = useState(0),
4952
+ currentPage = _useState2[0],
4953
+ setCurrentPage = _useState2[1];
4954
+ const _useState3 = useState(20),
4955
+ pageSize = _useState3[0],
4956
+ setPageSize = _useState3[1];
5102
4957
  const paginatedSurveyors = useMemo(() => {
5103
4958
  const start = currentPage * pageSize;
5104
4959
  const end = start + pageSize;
@@ -5109,11 +4964,9 @@ const SupervisorDetailsCard = () => {
5109
4964
  accessor: row => (row === null || row === void 0 ? void 0 : row.surveyorName) || "N/A",
5110
4965
  Cell: _ref3 => {
5111
4966
  var _Digit$SessionStorage2, _Digit$SessionStorage3, _Digit$SessionStorage4, _row$original;
5112
- let {
5113
- row
5114
- } = _ref3;
4967
+ let row = _ref3.row;
5115
4968
  const userType = ((_Digit$SessionStorage2 = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.info) === null || _Digit$SessionStorage3 === void 0 ? void 0 : (_Digit$SessionStorage4 = _Digit$SessionStorage3.type) === null || _Digit$SessionStorage4 === void 0 ? void 0 : _Digit$SessionStorage4.toLowerCase()) || "citizen";
5116
- const targetPath = `/digit-ui/${userType}/ekyc/surveyor-dashboard/${row.original.surveyorId}`;
4969
+ const targetPath = "/digit-ui/" + userType + "/ekyc/surveyor-dashboard/" + row.original.surveyorId;
5117
4970
  return /*#__PURE__*/React.createElement("a", {
5118
4971
  href: targetPath,
5119
4972
  style: {
@@ -5136,11 +4989,9 @@ const SupervisorDetailsCard = () => {
5136
4989
  accessor: () => "ACTIVE",
5137
4990
  id: "status",
5138
4991
  Cell: _ref4 => {
5139
- let {
5140
- value
5141
- } = _ref4;
4992
+ let value = _ref4.value;
5142
4993
  return /*#__PURE__*/React.createElement("span", {
5143
- className: `status-badge verified`
4994
+ className: "status-badge verified"
5144
4995
  }, t(value) || value);
5145
4996
  }
5146
4997
  }, {
@@ -5148,7 +4999,7 @@ const SupervisorDetailsCard = () => {
5148
4999
  accessor: row => (row === null || row === void 0 ? void 0 : row.totalKnos) || 0,
5149
5000
  id: "totalEkycApplications"
5150
5001
  }, {
5151
- Header: t("EKYC_COMPLETED") || "eKYC Completed",
5002
+ Header: t("EKYC_SUBMITTED") || "eKYC Completed",
5152
5003
  accessor: row => (row === null || row === void 0 ? void 0 : row.submittedKnos) || 0,
5153
5004
  id: "ekycCompleted"
5154
5005
  }, {
@@ -5157,16 +5008,24 @@ const SupervisorDetailsCard = () => {
5157
5008
  id: "pendingApplications"
5158
5009
  }, {
5159
5010
  Header: t("OVERALL_PROGRESS") || "Overall Progress",
5160
- accessor: row => `${(row === null || row === void 0 ? void 0 : row.progressPercent) || 0}%`,
5011
+ accessor: row => ((row === null || row === void 0 ? void 0 : row.progressPercent) || 0) + "%",
5161
5012
  id: "overallProgress"
5162
5013
  }], [t, history]);
5163
- const [showReportMenu, setShowReportMenu] = useState(false);
5164
- const [customDate, setCustomDate] = useState({
5165
- from: "",
5166
- to: ""
5167
- });
5168
- const [showCustomPicker, setShowCustomPicker] = useState(false);
5169
- const [reportLoading, setReportLoading] = useState(false);
5014
+ const _useState4 = useState(false),
5015
+ showReportMenu = _useState4[0],
5016
+ setShowReportMenu = _useState4[1];
5017
+ const _useState5 = useState({
5018
+ from: "",
5019
+ to: ""
5020
+ }),
5021
+ customDate = _useState5[0],
5022
+ setCustomDate = _useState5[1];
5023
+ const _useState6 = useState(false),
5024
+ showCustomPicker = _useState6[0],
5025
+ setShowCustomPicker = _useState6[1];
5026
+ const _useState7 = useState(false),
5027
+ reportLoading = _useState7[0],
5028
+ setReportLoading = _useState7[1];
5170
5029
  const reportMenuRef = useRef(null);
5171
5030
  useEffect(() => {
5172
5031
  const handler = e => {
@@ -5188,7 +5047,7 @@ const SupervisorDetailsCard = () => {
5188
5047
  total: s.totalKnos,
5189
5048
  completed: s.submittedKnos,
5190
5049
  pending: s.pendingKnos,
5191
- progress: `${s.progressPercent}%`
5050
+ progress: s.progressPercent + "%"
5192
5051
  }));
5193
5052
  const totalKnos = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.totalKnos) || 0;
5194
5053
  const completedKnos = (supervisor === null || supervisor === void 0 ? void 0 : supervisor.submittedKnos) || 0;
@@ -5249,26 +5108,24 @@ const SupervisorDetailsCard = () => {
5249
5108
  setEkycDownloadLoading(true);
5250
5109
  return Promise.resolve(_finallyRethrows(function () {
5251
5110
  return _catch(function () {
5252
- return Promise.resolve(Digit.EkycService.application_list({
5111
+ return Promise.resolve(Digit.EkycService.application_list(_extends({
5253
5112
  tenantId: tenantId || "dl.djb",
5254
5113
  offset: 0,
5255
5114
  limit: 10000,
5256
5115
  supervisorId: (supervisor === null || supervisor === void 0 ? void 0 : supervisor.supervisorId) || supervisorId,
5257
- reportDownload: true,
5258
- ...(fromDate && {
5259
- fromDate
5260
- }),
5261
- ...(toDate && {
5262
- toDate
5263
- })
5264
- })).then(function (response) {
5116
+ reportDownload: true
5117
+ }, fromDate && {
5118
+ fromDate
5119
+ }, toDate && {
5120
+ toDate
5121
+ }))).then(function (response) {
5265
5122
  const consumerList = (response === null || response === void 0 ? void 0 : response.consumerList) || [];
5266
5123
  if (consumerList.length === 0) {
5267
5124
  alert(t("NO_DATA_FOUND") || "No data found for download.");
5268
5125
  return;
5269
5126
  }
5270
5127
  const excelData = getEkycExcelData(consumerList, t);
5271
- const cleanFileName = `eKYC_Data_Supervisor_${fullName.replace(/[^a-zA-Z0-9]/g, "_")}`;
5128
+ const cleanFileName = "eKYC_Data_Supervisor_" + fullName.replace(/[^a-zA-Z0-9]/g, "_");
5272
5129
  Digit.Download.Excel(excelData, cleanFileName);
5273
5130
  });
5274
5131
  }, function (error) {
@@ -5312,15 +5169,13 @@ const SupervisorDetailsCard = () => {
5312
5169
  return null;
5313
5170
  };
5314
5171
  const StatCard = _ref5 => {
5315
- let {
5316
- title,
5317
- value,
5318
- type,
5319
- isLoading,
5320
- icon
5321
- } = _ref5;
5172
+ let title = _ref5.title,
5173
+ value = _ref5.value,
5174
+ type = _ref5.type,
5175
+ isLoading = _ref5.isLoading,
5176
+ icon = _ref5.icon;
5322
5177
  return /*#__PURE__*/React.createElement("div", {
5323
- className: `stat-card ${type}`
5178
+ className: "stat-card " + type
5324
5179
  }, isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
5325
5180
  className: "stat-title skeleton skeleton-text"
5326
5181
  }), /*#__PURE__*/React.createElement("div", {
@@ -5433,10 +5288,8 @@ const SupervisorDetailsCard = () => {
5433
5288
  label: t("THIS_MONTH") || "This Month",
5434
5289
  key: "month"
5435
5290
  }].map(_ref6 => {
5436
- let {
5437
- label,
5438
- key
5439
- } = _ref6;
5291
+ let label = _ref6.label,
5292
+ key = _ref6.key;
5440
5293
  return /*#__PURE__*/React.createElement("div", {
5441
5294
  key: key,
5442
5295
  className: "menu-item",
@@ -5452,17 +5305,15 @@ const SupervisorDetailsCard = () => {
5452
5305
  }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "From"), /*#__PURE__*/React.createElement("input", {
5453
5306
  type: "date",
5454
5307
  value: customDate.from,
5455
- onChange: e => setCustomDate({
5456
- ...customDate,
5308
+ onChange: e => setCustomDate(_extends({}, customDate, {
5457
5309
  from: e.target.value
5458
- })
5310
+ }))
5459
5311
  })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "To"), /*#__PURE__*/React.createElement("input", {
5460
5312
  type: "date",
5461
5313
  value: customDate.to,
5462
- onChange: e => setCustomDate({
5463
- ...customDate,
5314
+ onChange: e => setCustomDate(_extends({}, customDate, {
5464
5315
  to: e.target.value
5465
- })
5316
+ }))
5466
5317
  }))), /*#__PURE__*/React.createElement("div", {
5467
5318
  style: {
5468
5319
  display: "flex",
@@ -5550,39 +5401,49 @@ const SupervisorDetailsCard = () => {
5550
5401
  };
5551
5402
 
5552
5403
  const AssignEkycModal = _ref => {
5553
- let {
5554
- surveyor,
5555
- isReassign,
5556
- closeModal,
5557
- refetchDashboard,
5558
- tenantId: propsTenantId
5559
- } = _ref;
5560
- const {
5561
- t
5562
- } = useTranslation();
5404
+ let surveyor = _ref.surveyor,
5405
+ isReassign = _ref.isReassign,
5406
+ closeModal = _ref.closeModal,
5407
+ refetchDashboard = _ref.refetchDashboard,
5408
+ propsTenantId = _ref.tenantId;
5409
+ const _useTranslation = useTranslation(),
5410
+ t = _useTranslation.t;
5563
5411
  const tenantId = propsTenantId || Digit.ULBService.getCurrentTenantId();
5564
- const [selectedKnos, setSelectedKnos] = useState([]);
5565
- const [currentPage, setCurrentPage] = useState(0);
5566
- const [pageSize, setPageSize] = useState(20);
5567
- const [showToast, setShowToast] = useState(false);
5568
- const [toastData, setToastData] = useState({
5569
- error: false,
5570
- label: ""
5571
- });
5572
- const [filters, setFilters] = useState({
5573
- kno: "",
5574
- pincode: "",
5575
- zoneCode: "",
5576
- zoneName: "",
5577
- ward: "",
5578
- assembly: "",
5579
- mrkey: "",
5580
- ekycStatus: ""
5581
- });
5582
- const [debouncedFilters, setDebouncedFilters] = useState(filters);
5583
- const {
5584
- data: egovLocationData
5585
- } = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]);
5412
+ const _useState = useState([]),
5413
+ selectedKnos = _useState[0],
5414
+ setSelectedKnos = _useState[1];
5415
+ const _useState2 = useState(0),
5416
+ currentPage = _useState2[0],
5417
+ setCurrentPage = _useState2[1];
5418
+ const _useState3 = useState(20),
5419
+ pageSize = _useState3[0],
5420
+ setPageSize = _useState3[1];
5421
+ const _useState4 = useState(false),
5422
+ showToast = _useState4[0],
5423
+ setShowToast = _useState4[1];
5424
+ const _useState5 = useState({
5425
+ error: false,
5426
+ label: ""
5427
+ }),
5428
+ toastData = _useState5[0],
5429
+ setToastData = _useState5[1];
5430
+ const _useState6 = useState({
5431
+ kno: "",
5432
+ pincode: "",
5433
+ zoneCode: "",
5434
+ zoneName: "",
5435
+ ward: "",
5436
+ assembly: "",
5437
+ mrkey: "",
5438
+ ekycStatus: ""
5439
+ }),
5440
+ filters = _useState6[0],
5441
+ setFilters = _useState6[1];
5442
+ const _useState7 = useState(filters),
5443
+ debouncedFilters = _useState7[0],
5444
+ setDebouncedFilters = _useState7[1];
5445
+ const _Digit$Hooks$useCommo = Digit.Hooks.useCommonMDMS(tenantId, "egov-location", ["TenantBoundary"]),
5446
+ egovLocationData = _Digit$Hooks$useCommo.data;
5586
5447
  const boundaryData = useMemo(() => {
5587
5448
  var _egovLocationData$ego;
5588
5449
  const tenantBoundary = (egovLocationData === null || egovLocationData === void 0 ? void 0 : (_egovLocationData$ego = egovLocationData["egov-location"]) === null || _egovLocationData$ego === void 0 ? void 0 : _egovLocationData$ego.TenantBoundary) || [];
@@ -5599,10 +5460,9 @@ const AssignEkycModal = _ref => {
5599
5460
  const extractLocalities = node => {
5600
5461
  if (!node) return;
5601
5462
  if (node.label === "Locality" || node.label === "LOCALITY") {
5602
- localities.push({
5603
- ...node,
5463
+ localities.push(_extends({}, node, {
5604
5464
  name: node.localname || node.name || node.code
5605
- });
5465
+ }));
5606
5466
  }
5607
5467
  if (node.children && node.children.length > 0) {
5608
5468
  node.children.forEach(child => extractLocalities(child));
@@ -5626,18 +5486,17 @@ const AssignEkycModal = _ref => {
5626
5486
  });
5627
5487
  return Array.from(pinSet).sort();
5628
5488
  }, [structuredLocalityData]);
5629
- const {
5630
- data: filterOptionsData
5631
- } = Digit.Hooks.ekyc.useEkycApplicationList({
5632
- unassignedOnly: !isReassign,
5633
- fetchFilterOptions: true
5634
- }, {
5635
- tenantId: tenantId,
5636
- offset: 0,
5637
- limit: 1000
5638
- }, {
5639
- staleTime: Infinity
5640
- });
5489
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycApplicationList({
5490
+ unassignedOnly: !isReassign,
5491
+ fetchFilterOptions: true
5492
+ }, {
5493
+ tenantId: tenantId,
5494
+ offset: 0,
5495
+ limit: 1000
5496
+ }, {
5497
+ staleTime: Infinity
5498
+ }),
5499
+ filterOptionsData = _Digit$Hooks$ekyc$use.data;
5641
5500
  const pincodeOptions = useMemo(() => {
5642
5501
  if (!filterOptionsData) return fetchedPincodes || [];
5643
5502
  const pins = filterOptionsData.pincodeOptions || [];
@@ -5657,40 +5516,32 @@ const AssignEkycModal = _ref => {
5657
5516
  useEffect(() => {
5658
5517
  setCurrentPage(0);
5659
5518
  }, [debouncedFilters, filters.kno]);
5660
- const {
5661
- data: applicationData,
5662
- isFetching: isLoading,
5663
- refetch: refetchApplicationList
5664
- } = Digit.Hooks.ekyc.useEkycApplicationList({
5665
- unassignedOnly: !isReassign,
5666
- ...(filters.kno && {
5519
+ const _Digit$Hooks$ekyc$use2 = Digit.Hooks.ekyc.useEkycApplicationList(_extends({
5520
+ unassignedOnly: !isReassign
5521
+ }, filters.kno && {
5667
5522
  kno: filters.kno
5668
- }),
5669
- ...(debouncedFilters.ekycStatus && {
5523
+ }, debouncedFilters.ekycStatus && {
5670
5524
  ekycStatus: debouncedFilters.ekycStatus
5671
- }),
5672
- ...(debouncedFilters.zoneName && {
5525
+ }, debouncedFilters.zoneName && {
5673
5526
  zoneName: debouncedFilters.zoneName
5674
- }),
5675
- ...(debouncedFilters.assembly && {
5527
+ }, debouncedFilters.assembly && {
5676
5528
  assembly: debouncedFilters.assembly
5677
- }),
5678
- ...(debouncedFilters.ward && {
5529
+ }, debouncedFilters.ward && {
5679
5530
  ward: debouncedFilters.ward
5680
- }),
5681
- ...(debouncedFilters.mrkey && {
5531
+ }, debouncedFilters.mrkey && {
5682
5532
  mrkey: debouncedFilters.mrkey
5683
- }),
5684
- ...(debouncedFilters.pincode && {
5533
+ }, debouncedFilters.pincode && {
5685
5534
  pincode: debouncedFilters.pincode
5686
- })
5687
- }, {
5688
- tenantId: tenantId,
5689
- offset: 0,
5690
- limit: 5000
5691
- }, {
5692
- keepPreviousData: true
5693
- });
5535
+ }), {
5536
+ tenantId: tenantId,
5537
+ offset: 0,
5538
+ limit: 5000
5539
+ }, {
5540
+ keepPreviousData: true
5541
+ }),
5542
+ applicationData = _Digit$Hooks$ekyc$use2.data,
5543
+ isLoading = _Digit$Hooks$ekyc$use2.isFetching,
5544
+ refetchApplicationList = _Digit$Hooks$ekyc$use2.refetch;
5694
5545
  const handleAssignmentError = errMsg => {
5695
5546
  const isAlreadyAssigned = errMsg.toLowerCase().includes("already assigned") || errMsg.toLowerCase().includes("already assign") || errMsg.toLowerCase().includes("active assignment") || errMsg.toLowerCase().includes("mrkey") || errMsg.toLowerCase().includes("mr key") || errMsg.toLowerCase().includes("kno") || errMsg.toLowerCase().includes("already exists");
5696
5547
  if (isAlreadyAssigned) {
@@ -5838,8 +5689,7 @@ const AssignEkycModal = _ref => {
5838
5689
  setSelectedKnos(isAllSelected ? [] : allMatchingKnos);
5839
5690
  };
5840
5691
  const handleFilterChange = (key, value) => {
5841
- setFilters(prev => ({
5842
- ...prev,
5692
+ setFilters(prev => _extends({}, prev, {
5843
5693
  [key]: value
5844
5694
  }));
5845
5695
  setCurrentPage(0);
@@ -5860,9 +5710,7 @@ const AssignEkycModal = _ref => {
5860
5710
  },
5861
5711
  id: "selection",
5862
5712
  Cell: _ref2 => {
5863
- let {
5864
- row
5865
- } = _ref2;
5713
+ let row = _ref2.row;
5866
5714
  const kno = row.original.kno;
5867
5715
  return /*#__PURE__*/React.createElement("input", {
5868
5716
  type: "checkbox",
@@ -5879,7 +5727,7 @@ const AssignEkycModal = _ref => {
5879
5727
  accessor: "kno"
5880
5728
  }, {
5881
5729
  Header: "Consumer Name",
5882
- accessor: row => `${row.firstName || ""} ${row.middleName || ""} ${row.lastName || ""}`.trim(),
5730
+ accessor: row => ((row.firstName || "") + " " + (row.middleName || "") + " " + (row.lastName || "")).trim(),
5883
5731
  id: "consumerName"
5884
5732
  }, {
5885
5733
  Header: "Zone",
@@ -5891,28 +5739,24 @@ const AssignEkycModal = _ref => {
5891
5739
  Header: "Status",
5892
5740
  accessor: "status",
5893
5741
  Cell: _ref3 => {
5894
- let {
5895
- value
5896
- } = _ref3;
5742
+ let value = _ref3.value;
5897
5743
  return /*#__PURE__*/React.createElement("span", {
5898
- className: `status-badge ${value === "ACTIVE" ? "verified" : value === "PENDING" ? "pending" : "assigned"}`
5744
+ className: "status-badge " + (value === "ACTIVE" ? "verified" : value === "PENDING" ? "pending" : "assigned")
5899
5745
  }, value);
5900
5746
  }
5901
5747
  }, {
5902
5748
  Header: "eKYC Status",
5903
5749
  accessor: "ekycStatus",
5904
5750
  Cell: _ref4 => {
5905
- let {
5906
- value
5907
- } = _ref4;
5751
+ let value = _ref4.value;
5908
5752
  const status = (value || "NA").toUpperCase();
5909
5753
  return value ? /*#__PURE__*/React.createElement("span", {
5910
- className: `ekyc-status-tag ${status}`
5754
+ className: "ekyc-status-tag " + status
5911
5755
  }, t(status)) : "-";
5912
5756
  }
5913
5757
  }], [selectedKnos, paginatedData, allData]);
5914
5758
  return /*#__PURE__*/React.createElement(Modal, {
5915
- headerBarMain: isReassign ? `Reassign KNOs to ${surveyor === null || surveyor === void 0 ? void 0 : surveyor.name}` : `Assign KNOs to ${surveyor === null || surveyor === void 0 ? void 0 : surveyor.name}`,
5759
+ headerBarMain: isReassign ? "Reassign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name) : "Assign KNOs to " + (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name),
5916
5760
  headerBarEnd: /*#__PURE__*/React.createElement(Close, {
5917
5761
  onClick: closeModal
5918
5762
  }),
@@ -5995,37 +5839,39 @@ const AssignEkycModal = _ref => {
5995
5839
  const SurveyorDetailsDashboard = () => {
5996
5840
  var _Digit$SessionStorage, _Digit$SessionStorage2, _surveyorSearchById$s, _Digit$SessionStorage3, _Digit$SessionStorage4, _surveyor$owner, _surveyor$owner2, _surveyor$owner3, _surveyor$owner4, _fullName$charAt, _dashboardData$dashbo, _dashboardData$dashbo2, _dashboardData$dashbo3, _dashboardData$dashbo4, _surveyor$owner7, _surveyor$owner8, _surveyor$owner9, _dashboardData$dashbo5, _dashboardData$dashbo6;
5997
5841
  const tenantId = Digit.ULBService.getCurrentTenantId();
5998
- const [showModal, setShowModal] = useState(null);
5999
- const [showOptions, setShowOptions] = useState(false);
6000
- const [ekycDownloadLoading, setEkycDownloadLoading] = useState(false);
6001
- const {
6002
- id: surveyorId
6003
- } = useParams();
5842
+ const _useState = useState(null),
5843
+ showModal = _useState[0],
5844
+ setShowModal = _useState[1];
5845
+ const _useState2 = useState(false),
5846
+ showOptions = _useState2[0],
5847
+ setShowOptions = _useState2[1];
5848
+ const _useState3 = useState(false),
5849
+ ekycDownloadLoading = _useState3[0],
5850
+ setEkycDownloadLoading = _useState3[1];
5851
+ const _useParams = useParams(),
5852
+ surveyorId = _useParams.id;
6004
5853
  const ownerIds = (_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : _Digit$SessionStorage2.uuid;
6005
- const {
6006
- t
6007
- } = useTranslation();
6008
- const {
6009
- data: surveyorSearchById,
6010
- isLoading: isLoadingId
6011
- } = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
6012
- ids: surveyorId
6013
- }, {
6014
- enabled: !!surveyorId,
6015
- staleTime: Infinity
6016
- });
5854
+ const _useTranslation = useTranslation(),
5855
+ t = _useTranslation.t;
5856
+ const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSurveyorSearch(tenantId, {
5857
+ ids: surveyorId
5858
+ }, {
5859
+ enabled: !!surveyorId,
5860
+ staleTime: Infinity
5861
+ }),
5862
+ surveyorSearchById = _Digit$Hooks$fsm$useS.data,
5863
+ isLoadingId = _Digit$Hooks$fsm$useS.isLoading;
6017
5864
  const hasFoundById = !!(surveyorSearchById !== null && surveyorSearchById !== void 0 && (_surveyorSearchById$s = surveyorSearchById.surveyors) !== null && _surveyorSearchById$s !== void 0 && _surveyorSearchById$s.length);
6018
- const {
6019
- data: surveyorSearchByOwner,
6020
- isLoading: isLoadingOwner
6021
- } = Digit.Hooks.fsm.useSurveyorSearch(tenantId, surveyorId ? {
6022
- ownerIds: surveyorId
6023
- } : {
6024
- ownerIds
6025
- }, {
6026
- enabled: !surveyorId || !isLoadingId && !hasFoundById,
6027
- staleTime: Infinity
6028
- });
5865
+ const _Digit$Hooks$fsm$useS2 = Digit.Hooks.fsm.useSurveyorSearch(tenantId, surveyorId ? {
5866
+ ownerIds: surveyorId
5867
+ } : {
5868
+ ownerIds
5869
+ }, {
5870
+ enabled: !surveyorId || !isLoadingId && !hasFoundById,
5871
+ staleTime: Infinity
5872
+ }),
5873
+ surveyorSearchByOwner = _Digit$Hooks$fsm$useS2.data,
5874
+ isLoadingOwner = _Digit$Hooks$fsm$useS2.isLoading;
6029
5875
  const surveyorSearchResponse = useMemo(() => {
6030
5876
  if (surveyorId && hasFoundById) {
6031
5877
  return surveyorSearchById;
@@ -6038,24 +5884,22 @@ const SurveyorDetailsDashboard = () => {
6038
5884
  var _surveyorSearchRespon;
6039
5885
  return (surveyorSearchResponse === null || surveyorSearchResponse === void 0 ? void 0 : (_surveyorSearchRespon = surveyorSearchResponse.surveyors) === null || _surveyorSearchRespon === void 0 ? void 0 : _surveyorSearchRespon[0]) || null;
6040
5886
  }, [surveyorSearchResponse]);
6041
- const {
6042
- data: vendorData,
6043
- isLoading: isVendorLoading
6044
- } = Digit.Hooks.fsm.useDsoSearch(tenantId, {
6045
- status: "ACTIVE"
6046
- }, {
6047
- enabled: !!tenantId,
6048
- staleTime: 300000
6049
- });
6050
- const {
6051
- data: supervisorSearchResponse,
6052
- isLoading: isSupervisorSearchLoading
6053
- } = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
6054
- status: "ACTIVE"
6055
- }, {
6056
- enabled: !!tenantId,
6057
- staleTime: 300000
6058
- });
5887
+ const _Digit$Hooks$fsm$useD = Digit.Hooks.fsm.useDsoSearch(tenantId, {
5888
+ status: "ACTIVE"
5889
+ }, {
5890
+ enabled: !!tenantId,
5891
+ staleTime: 300000
5892
+ }),
5893
+ vendorData = _Digit$Hooks$fsm$useD.data,
5894
+ isVendorLoading = _Digit$Hooks$fsm$useD.isLoading;
5895
+ const _Digit$Hooks$fsm$useS3 = Digit.Hooks.fsm.useSupervisorSearch(tenantId, {
5896
+ status: "ACTIVE"
5897
+ }, {
5898
+ enabled: !!tenantId,
5899
+ staleTime: 300000
5900
+ }),
5901
+ supervisorSearchResponse = _Digit$Hooks$fsm$useS3.data,
5902
+ isSupervisorSearchLoading = _Digit$Hooks$fsm$useS3.isLoading;
6059
5903
  const vendorName = useMemo(() => {
6060
5904
  var _mappedVendor$dsoDeta;
6061
5905
  if (surveyor !== null && surveyor !== void 0 && surveyor.vendorName) return surveyor.vendorName;
@@ -6079,22 +5923,26 @@ const SurveyorDetailsDashboard = () => {
6079
5923
  const fullName = (surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner = surveyor.owner) === null || _surveyor$owner === void 0 ? void 0 : _surveyor$owner.name) || (surveyor === null || surveyor === void 0 ? void 0 : surveyor.name) || "N/A";
6080
5924
  const employeeId = (surveyor === null || surveyor === void 0 ? void 0 : surveyor.employeeId) || (surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner2 = surveyor.owner) === null || _surveyor$owner2 === void 0 ? void 0 : _surveyor$owner2.uuid) || (surveyor === null || surveyor === void 0 ? void 0 : surveyor.id);
6081
5925
  const mobileNumber = (surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner3 = surveyor.owner) === null || _surveyor$owner3 === void 0 ? void 0 : _surveyor$owner3.mobileNumber) || (surveyor === null || surveyor === void 0 ? void 0 : surveyor.mobileNo) || "N/A";
6082
- const [currentPage, setCurrentPage] = useState(0);
6083
- const [pageSize, setPageSize] = useState(20);
5926
+ const _useState4 = useState(0),
5927
+ currentPage = _useState4[0],
5928
+ setCurrentPage = _useState4[1];
5929
+ const _useState5 = useState(20),
5930
+ pageSize = _useState5[0],
5931
+ setPageSize = _useState5[1];
6084
5932
  const queryParams = {
6085
5933
  tenantId: "dl.djb",
6086
5934
  offset: currentPage * pageSize,
6087
5935
  limit: pageSize,
6088
5936
  surveyorId: surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner4 = surveyor.owner) === null || _surveyor$owner4 === void 0 ? void 0 : _surveyor$owner4.uuid
6089
5937
  };
6090
- const {
6091
- isFetching: isDashboardLoading,
6092
- data: dashboardData = {},
6093
- refetch: refetchDashboard
6094
- } = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, queryParams, {
6095
- enabled: !!queryParams.tenantId && !!queryParams.surveyorId,
6096
- keepPreviousData: true
6097
- });
5938
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycSurveyorDashboard({}, queryParams, {
5939
+ enabled: !!queryParams.tenantId && !!queryParams.surveyorId,
5940
+ keepPreviousData: true
5941
+ }),
5942
+ isDashboardLoading = _Digit$Hooks$ekyc$use.isFetching,
5943
+ _Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
5944
+ dashboardData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2,
5945
+ refetchDashboard = _Digit$Hooks$ekyc$use.refetch;
6098
5946
  const toTitleCase = str => {
6099
5947
  if (!str) return "";
6100
5948
  const cleanStr = String(str).includes(".") ? String(str).split(".").pop() : String(str);
@@ -6105,7 +5953,7 @@ const SurveyorDetailsDashboard = () => {
6105
5953
  accessor: "kno"
6106
5954
  }, {
6107
5955
  Header: t("CONSUMER_NAME") || "Consumer Name",
6108
- accessor: row => toTitleCase(`${row.firstName || ""} ${row.middleName || ""} ${row.lastName || ""}`.trim()),
5956
+ accessor: row => toTitleCase(((row.firstName || "") + " " + (row.middleName || "") + " " + (row.lastName || "")).trim()),
6109
5957
  id: "consumerName"
6110
5958
  }, {
6111
5959
  Header: t("ZONE") || "Zone",
@@ -6115,40 +5963,42 @@ const SurveyorDetailsDashboard = () => {
6115
5963
  Header: t("EKYC_STATUS") || "eKYC Status",
6116
5964
  accessor: "ekycStatus",
6117
5965
  Cell: _ref => {
6118
- let {
6119
- value
6120
- } = _ref;
5966
+ let value = _ref.value;
6121
5967
  const status = (value || "NA").toUpperCase();
6122
5968
  return value ? /*#__PURE__*/React.createElement("span", {
6123
- className: `ekyc-status-tag ${status}`
5969
+ className: "ekyc-status-tag " + status
6124
5970
  }, toTitleCase(value)) : "-";
6125
5971
  }
6126
5972
  }, {
6127
5973
  Header: t("SUBMITTED_AT") || "Submitted At",
6128
5974
  accessor: "submittedAt",
6129
5975
  Cell: _ref2 => {
6130
- let {
6131
- value
6132
- } = _ref2;
5976
+ let value = _ref2.value;
6133
5977
  return value ? Digit.DateUtils.ConvertEpochToDate(value) : "-";
6134
5978
  }
6135
5979
  }, {
6136
5980
  Header: t("ASSIGNED_AT") || "Assigned At",
6137
5981
  accessor: "assignedAt",
6138
5982
  Cell: _ref3 => {
6139
- let {
6140
- value
6141
- } = _ref3;
5983
+ let value = _ref3.value;
6142
5984
  return value ? Digit.DateUtils.ConvertEpochToDate(value) : "-";
6143
5985
  }
6144
5986
  }], [t]);
6145
- const [showReportMenu, setShowReportMenu] = useState(false);
6146
- const [customDate, setCustomDate] = useState({
6147
- from: "",
6148
- to: ""
6149
- });
6150
- const [showCustomPicker, setShowCustomPicker] = useState(false);
6151
- const [reportLoading, setReportLoading] = useState(false);
5987
+ const _useState6 = useState(false),
5988
+ showReportMenu = _useState6[0],
5989
+ setShowReportMenu = _useState6[1];
5990
+ const _useState7 = useState({
5991
+ from: "",
5992
+ to: ""
5993
+ }),
5994
+ customDate = _useState7[0],
5995
+ setCustomDate = _useState7[1];
5996
+ const _useState8 = useState(false),
5997
+ showCustomPicker = _useState8[0],
5998
+ setShowCustomPicker = _useState8[1];
5999
+ const _useState9 = useState(false),
6000
+ reportLoading = _useState9[0],
6001
+ setReportLoading = _useState9[1];
6152
6002
  const reportMenuRef = useRef(null);
6153
6003
  useEffect(() => {
6154
6004
  const handler = e => {
@@ -6266,15 +6116,13 @@ const SurveyorDetailsDashboard = () => {
6266
6116
  }
6267
6117
  };
6268
6118
  const StatCard = _ref4 => {
6269
- let {
6270
- title,
6271
- value,
6272
- type,
6273
- isLoading,
6274
- icon
6275
- } = _ref4;
6119
+ let title = _ref4.title,
6120
+ value = _ref4.value,
6121
+ type = _ref4.type,
6122
+ isLoading = _ref4.isLoading,
6123
+ icon = _ref4.icon;
6276
6124
  return /*#__PURE__*/React.createElement("div", {
6277
- className: `stat-card ${type}`
6125
+ className: "stat-card " + type
6278
6126
  }, isLoading ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
6279
6127
  className: "stat-title skeleton skeleton-text"
6280
6128
  }), /*#__PURE__*/React.createElement("div", {
@@ -6302,26 +6150,24 @@ const SurveyorDetailsDashboard = () => {
6302
6150
  return Promise.resolve(_finallyRethrows(function () {
6303
6151
  return _catch(function () {
6304
6152
  var _surveyor$owner6;
6305
- return Promise.resolve(Digit.EkycService.application_list({
6153
+ return Promise.resolve(Digit.EkycService.application_list(_extends({
6306
6154
  tenantId: tenantId || "dl.djb",
6307
6155
  offset: 0,
6308
6156
  limit: 10000,
6309
6157
  surveyorId: surveyor === null || surveyor === void 0 ? void 0 : (_surveyor$owner6 = surveyor.owner) === null || _surveyor$owner6 === void 0 ? void 0 : _surveyor$owner6.uuid,
6310
- reportDownload: true,
6311
- ...(fromDate && {
6312
- fromDate
6313
- }),
6314
- ...(toDate && {
6315
- toDate
6316
- })
6317
- })).then(function (response) {
6158
+ reportDownload: true
6159
+ }, fromDate && {
6160
+ fromDate
6161
+ }, toDate && {
6162
+ toDate
6163
+ }))).then(function (response) {
6318
6164
  const consumerList = (response === null || response === void 0 ? void 0 : response.consumerList) || [];
6319
6165
  if (consumerList.length === 0) {
6320
6166
  alert(t("NO_DATA_FOUND") || "No data found for download.");
6321
6167
  return;
6322
6168
  }
6323
6169
  const excelData = getEkycExcelData(consumerList, t);
6324
- const cleanFileName = `eKYC_Data_${fullName.replace(/[^a-zA-Z0-9]/g, "_")}`;
6170
+ const cleanFileName = "eKYC_Data_" + fullName.replace(/[^a-zA-Z0-9]/g, "_");
6325
6171
  Digit.Download.Excel(excelData, cleanFileName);
6326
6172
  });
6327
6173
  }, function (error) {
@@ -6452,10 +6298,8 @@ const SurveyorDetailsDashboard = () => {
6452
6298
  label: t("THIS_MONTH") || "This Month",
6453
6299
  key: "month"
6454
6300
  }].map(_ref5 => {
6455
- let {
6456
- label,
6457
- key
6458
- } = _ref5;
6301
+ let label = _ref5.label,
6302
+ key = _ref5.key;
6459
6303
  return /*#__PURE__*/React.createElement("div", {
6460
6304
  key: key,
6461
6305
  className: "menu-item",
@@ -6471,17 +6315,15 @@ const SurveyorDetailsDashboard = () => {
6471
6315
  }, /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "From"), /*#__PURE__*/React.createElement("input", {
6472
6316
  type: "date",
6473
6317
  value: customDate.from,
6474
- onChange: e => setCustomDate({
6475
- ...customDate,
6318
+ onChange: e => setCustomDate(_extends({}, customDate, {
6476
6319
  from: e.target.value
6477
- })
6320
+ }))
6478
6321
  })), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("span", null, "To"), /*#__PURE__*/React.createElement("input", {
6479
6322
  type: "date",
6480
6323
  value: customDate.to,
6481
- onChange: e => setCustomDate({
6482
- ...customDate,
6324
+ onChange: e => setCustomDate(_extends({}, customDate, {
6483
6325
  to: e.target.value
6484
- })
6326
+ }))
6485
6327
  }))), /*#__PURE__*/React.createElement("div", {
6486
6328
  style: {
6487
6329
  display: "flex",
@@ -6585,32 +6427,42 @@ const SurveyorDetailsDashboard = () => {
6585
6427
 
6586
6428
  const WorkOrder = () => {
6587
6429
  const tenantId = Digit.ULBService.getCurrentTenantId();
6588
- const {
6589
- t
6590
- } = useTranslation();
6430
+ const _useTranslation = useTranslation(),
6431
+ t = _useTranslation.t;
6591
6432
  const history = useHistory();
6592
- const [showToast, setShowToast] = useState(null);
6593
- const [vendor, setVendor] = useState(null);
6594
- const [validFrom, setValidFrom] = useState("");
6595
- const [validTo, setValidTo] = useState("");
6596
- const [uploadedFile, setUploadedFile] = useState(null);
6597
- const [file, setFile] = useState(null);
6598
- const [error, setError] = useState(null);
6599
- const {
6600
- data: vendorOptions,
6601
- isLoading: isVendorLoading
6602
- } = Digit.Hooks.fsm.useVendorSearch({
6603
- tenantId,
6604
- filters: {
6605
- status: "ACTIVE"
6606
- },
6607
- config: {
6608
- select: data => (data === null || data === void 0 ? void 0 : data.vendor) || []
6609
- }
6610
- });
6611
- const {
6612
- mutate: createWorkOrder
6613
- } = Digit.Hooks.wt.useVendorWorkOrderCreate(tenantId);
6433
+ const _useState = useState(null),
6434
+ showToast = _useState[0],
6435
+ setShowToast = _useState[1];
6436
+ const _useState2 = useState(null),
6437
+ vendor = _useState2[0],
6438
+ setVendor = _useState2[1];
6439
+ const _useState3 = useState(""),
6440
+ validFrom = _useState3[0],
6441
+ setValidFrom = _useState3[1];
6442
+ const _useState4 = useState(""),
6443
+ validTo = _useState4[0],
6444
+ setValidTo = _useState4[1];
6445
+ const _useState5 = useState(null),
6446
+ uploadedFile = _useState5[0],
6447
+ setUploadedFile = _useState5[1];
6448
+ const _useState6 = useState(null),
6449
+ file = _useState6[0],
6450
+ setFile = _useState6[1];
6451
+ const _useState7 = useState(null),
6452
+ error = _useState7[0],
6453
+ setError = _useState7[1];
6454
+ const _Digit$Hooks$fsm$useV = Digit.Hooks.fsm.useVendorSearch({
6455
+ tenantId,
6456
+ filters: {
6457
+ status: "ACTIVE"
6458
+ },
6459
+ config: {
6460
+ select: data => (data === null || data === void 0 ? void 0 : data.vendor) || []
6461
+ }
6462
+ }),
6463
+ vendorOptions = _Digit$Hooks$fsm$useV.data;
6464
+ const _Digit$Hooks$wt$useVe = Digit.Hooks.wt.useVendorWorkOrderCreate(tenantId),
6465
+ createWorkOrder = _Digit$Hooks$wt$useVe.mutate;
6614
6466
  useEffect(() => {
6615
6467
  (function () {
6616
6468
  try {
@@ -6710,7 +6562,7 @@ const WorkOrder = () => {
6710
6562
  display: "flex",
6711
6563
  flexDirection: "column"
6712
6564
  }
6713
- }, /*#__PURE__*/React.createElement(Label, null, `${t("EKYC_VENDOR_NAME")}`, " ", /*#__PURE__*/React.createElement("span", {
6565
+ }, /*#__PURE__*/React.createElement(Label, null, "" + t("EKYC_VENDOR_NAME"), " ", /*#__PURE__*/React.createElement("span", {
6714
6566
  className: "check-page-link-button"
6715
6567
  }, "*")), /*#__PURE__*/React.createElement(Dropdown, {
6716
6568
  t: t,
@@ -6724,7 +6576,7 @@ const WorkOrder = () => {
6724
6576
  display: "flex",
6725
6577
  flexDirection: "column"
6726
6578
  }
6727
- }, /*#__PURE__*/React.createElement(Label, null, `${t("COMMON_VALID_FROM_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
6579
+ }, /*#__PURE__*/React.createElement(Label, null, "" + t("COMMON_VALID_FROM_DATE"), " ", /*#__PURE__*/React.createElement("span", {
6728
6580
  className: "check-page-link-button"
6729
6581
  }, "*")), /*#__PURE__*/React.createElement(DatePicker, {
6730
6582
  date: validFrom,
@@ -6737,7 +6589,7 @@ const WorkOrder = () => {
6737
6589
  display: "flex",
6738
6590
  flexDirection: "column"
6739
6591
  }
6740
- }, /*#__PURE__*/React.createElement(Label, null, `${t("COMMON_VALID_TO_DATE")}`, " ", /*#__PURE__*/React.createElement("span", {
6592
+ }, /*#__PURE__*/React.createElement(Label, null, "" + t("COMMON_VALID_TO_DATE"), " ", /*#__PURE__*/React.createElement("span", {
6741
6593
  className: "check-page-link-button"
6742
6594
  }, "*")), /*#__PURE__*/React.createElement(DatePicker, {
6743
6595
  date: validTo,
@@ -6751,7 +6603,7 @@ const WorkOrder = () => {
6751
6603
  display: "flex",
6752
6604
  flexDirection: "column"
6753
6605
  }
6754
- }, /*#__PURE__*/React.createElement(Label, null, `${t("EKYC_UPLOAD_DOCUMENT")}`, " ", /*#__PURE__*/React.createElement("span", {
6606
+ }, /*#__PURE__*/React.createElement(Label, null, "" + t("EKYC_UPLOAD_DOCUMENT"), " ", /*#__PURE__*/React.createElement("span", {
6755
6607
  className: "check-page-link-button"
6756
6608
  }, "*")), /*#__PURE__*/React.createElement(UploadFile, {
6757
6609
  id: "ekyc-doc",
@@ -6759,7 +6611,7 @@ const WorkOrder = () => {
6759
6611
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
6760
6612
  onUpload: selectfile,
6761
6613
  onDelete: () => setUploadedFile(null),
6762
- message: uploadedFile ? `1 ${t(`EKYC_ACTION_FILEUPLOADED`)}` : t(`EKYC_ACTION_NO_FILEUPLOADED`),
6614
+ message: uploadedFile ? "1 " + t("EKYC_ACTION_FILEUPLOADED") : t("EKYC_ACTION_NO_FILEUPLOADED"),
6763
6615
  error: error
6764
6616
  })))), /*#__PURE__*/React.createElement("div", {
6765
6617
  style: {
@@ -6782,32 +6634,26 @@ function formReducer(state, payload) {
6782
6634
  const storageKey = "EKYC.SW.INBOX";
6783
6635
  switch (payload.action) {
6784
6636
  case "mutateSearchForm":
6785
- Digit.SessionStorage.set(storageKey, {
6786
- ...state,
6637
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
6787
6638
  searchForm: payload.data
6788
- });
6789
- return {
6790
- ...state,
6639
+ }));
6640
+ return _extends({}, state, {
6791
6641
  searchForm: payload.data
6792
- };
6642
+ });
6793
6643
  case "mutateFilterForm":
6794
- Digit.SessionStorage.set(storageKey, {
6795
- ...state,
6644
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
6796
6645
  filterForm: payload.data
6797
- });
6798
- return {
6799
- ...state,
6646
+ }));
6647
+ return _extends({}, state, {
6800
6648
  filterForm: payload.data
6801
- };
6649
+ });
6802
6650
  case "mutateTableForm":
6803
- Digit.SessionStorage.set(storageKey, {
6804
- ...state,
6651
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
6805
6652
  tableForm: payload.data
6806
- });
6807
- return {
6808
- ...state,
6653
+ }));
6654
+ return _extends({}, state, {
6809
6655
  tableForm: payload.data
6810
- };
6656
+ });
6811
6657
  default:
6812
6658
  return state;
6813
6659
  }
@@ -6827,9 +6673,7 @@ const tableColumnConfig = (t, handleReview) => [{
6827
6673
  accessor: "surveyorName",
6828
6674
  Cell: _ref => {
6829
6675
  var _row$original, _row$original2, _row$original3;
6830
- let {
6831
- row
6832
- } = _ref;
6676
+ let row = _ref.row;
6833
6677
  const id = (_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.id;
6834
6678
  return /*#__PURE__*/React.createElement("span", {
6835
6679
  className: "link",
@@ -6841,9 +6685,7 @@ const tableColumnConfig = (t, handleReview) => [{
6841
6685
  accessor: "mobileNo",
6842
6686
  Cell: _ref2 => {
6843
6687
  var _row$original4, _row$original5, _row$original5$owner;
6844
- let {
6845
- row
6846
- } = _ref2;
6688
+ let row = _ref2.row;
6847
6689
  return /*#__PURE__*/React.createElement("span", null, ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.mobileNo) || ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$owner = _row$original5.owner) === null || _row$original5$owner === void 0 ? void 0 : _row$original5$owner.mobileNumber) || "NA");
6848
6690
  }
6849
6691
  }, {
@@ -6851,12 +6693,10 @@ const tableColumnConfig = (t, handleReview) => [{
6851
6693
  accessor: "status",
6852
6694
  Cell: _ref3 => {
6853
6695
  var _row$original6;
6854
- let {
6855
- row
6856
- } = _ref3;
6696
+ let row = _ref3.row;
6857
6697
  const status = ((_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.status) || "DEFAULT";
6858
6698
  return /*#__PURE__*/React.createElement("span", {
6859
- className: `ekyc-status-tag ${status}`
6699
+ className: "ekyc-status-tag " + status
6860
6700
  }, t(status));
6861
6701
  }
6862
6702
  }, {
@@ -6864,32 +6704,29 @@ const tableColumnConfig = (t, handleReview) => [{
6864
6704
  accessor: "serviceType",
6865
6705
  Cell: _ref4 => {
6866
6706
  var _row$original7;
6867
- let {
6868
- row
6869
- } = _ref4;
6707
+ let row = _ref4.row;
6870
6708
  return /*#__PURE__*/React.createElement("span", null, ((_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : _row$original7.serviceType) || "NA");
6871
6709
  }
6872
6710
  }];
6873
6711
 
6874
6712
  const SupervisorInboxTableConfig = _ref => {
6875
6713
  var _Digit$SessionStorage, _Digit$SessionStorage2, _Digit$SessionStorage3, _formState$tableForm, _formState$tableForm2;
6876
- let {
6877
- onPageSizeChange,
6878
- formState,
6879
- totalCount,
6880
- table,
6881
- dispatch,
6882
- onSortingByData,
6883
- inboxStyles = {},
6884
- tableStyle = {}
6885
- } = _ref;
6886
- const {
6887
- t
6888
- } = useTranslation();
6714
+ let onPageSizeChange = _ref.onPageSizeChange,
6715
+ formState = _ref.formState,
6716
+ totalCount = _ref.totalCount,
6717
+ table = _ref.table,
6718
+ dispatch = _ref.dispatch,
6719
+ onSortingByData = _ref.onSortingByData,
6720
+ _ref$inboxStyles = _ref.inboxStyles,
6721
+ inboxStyles = _ref$inboxStyles === void 0 ? {} : _ref$inboxStyles,
6722
+ _ref$tableStyle = _ref.tableStyle,
6723
+ tableStyle = _ref$tableStyle === void 0 ? {} : _ref$tableStyle;
6724
+ const _useTranslation = useTranslation(),
6725
+ t = _useTranslation.t;
6889
6726
  const history = useHistory();
6890
6727
  const userType = ((_Digit$SessionStorage = Digit.SessionStorage.get("User")) === null || _Digit$SessionStorage === void 0 ? void 0 : (_Digit$SessionStorage2 = _Digit$SessionStorage.info) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.type) === null || _Digit$SessionStorage3 === void 0 ? void 0 : _Digit$SessionStorage3.toLowerCase()) || "citizen";
6891
6728
  const handleReview = id => {
6892
- history.push(`/digit-ui/${userType}/ekyc/assign/surveyor-details/${id}`);
6729
+ history.push("/digit-ui/" + userType + "/ekyc/assign/surveyor-details/" + id);
6893
6730
  };
6894
6731
  const limit = (formState === null || formState === void 0 ? void 0 : (_formState$tableForm = formState.tableForm) === null || _formState$tableForm === void 0 ? void 0 : _formState$tableForm.limit) || 10;
6895
6732
  const offset = (formState === null || formState === void 0 ? void 0 : (_formState$tableForm2 = formState.tableForm) === null || _formState$tableForm2 === void 0 ? void 0 : _formState$tableForm2.offset) || 0;
@@ -6901,48 +6738,42 @@ const SupervisorInboxTableConfig = _ref => {
6901
6738
  onPageSizeChange,
6902
6739
  onNextPage: () => dispatch({
6903
6740
  action: "mutateTableForm",
6904
- data: {
6905
- ...formState.tableForm,
6741
+ data: _extends({}, formState.tableForm, {
6906
6742
  offset: Number(offset) + Number(limit)
6907
- }
6743
+ })
6908
6744
  }),
6909
6745
  onPrevPage: () => dispatch({
6910
6746
  action: "mutateTableForm",
6911
- data: {
6912
- ...formState.tableForm,
6747
+ data: _extends({}, formState.tableForm, {
6913
6748
  offset: Number(offset) - Number(limit)
6914
- }
6749
+ })
6915
6750
  }),
6916
6751
  onLastPage: () => dispatch({
6917
6752
  action: "mutateTableForm",
6918
- data: {
6919
- ...formState.tableForm,
6753
+ data: _extends({}, formState.tableForm, {
6920
6754
  offset: Math.ceil(totalCount / limit) * limit - Number(limit)
6921
- }
6755
+ })
6922
6756
  }),
6923
6757
  onFirstPage: () => dispatch({
6924
6758
  action: "mutateTableForm",
6925
- data: {
6926
- ...formState.tableForm,
6759
+ data: _extends({}, formState.tableForm, {
6927
6760
  offset: 0
6928
- }
6761
+ })
6929
6762
  }),
6930
6763
  totalRecords: totalCount,
6931
6764
  onSort: onSortingByData,
6932
6765
  data: table,
6933
6766
  columns: tableColumnConfig(t, handleReview),
6934
- inboxStyles: {
6935
- ...inboxStyles
6936
- },
6937
- tableStyle: {
6938
- ...tableStyle
6939
- }
6767
+ inboxStyles: _extends({}, inboxStyles),
6768
+ tableStyle: _extends({}, tableStyle)
6940
6769
  };
6941
6770
  };
6942
6771
 
6943
6772
  const AssignEkyc = () => {
6944
6773
  var _formState$tableForm, _formState$tableForm2, _formState$tableForm3, _formState$tableForm4, _formState$searchForm, _dashboardData$dashbo;
6945
- const [formState, dispatch] = useReducer(formReducer, formInitValue);
6774
+ const _useReducer = useReducer(formReducer, formInitValue),
6775
+ formState = _useReducer[0],
6776
+ dispatch = _useReducer[1];
6946
6777
  let paginationParms = {
6947
6778
  limit: (formState === null || formState === void 0 ? void 0 : (_formState$tableForm = formState.tableForm) === null || _formState$tableForm === void 0 ? void 0 : _formState$tableForm.limit) || 10,
6948
6779
  offset: (formState === null || formState === void 0 ? void 0 : (_formState$tableForm2 = formState.tableForm) === null || _formState$tableForm2 === void 0 ? void 0 : _formState$tableForm2.offset) || 0,
@@ -6951,20 +6782,18 @@ const AssignEkyc = () => {
6951
6782
  };
6952
6783
  const mobileNumber = (formState === null || formState === void 0 ? void 0 : (_formState$searchForm = formState.searchForm) === null || _formState$searchForm === void 0 ? void 0 : _formState$searchForm.mobileNumber) || "";
6953
6784
  const isSearchActive = !!mobileNumber;
6954
- const filters = {
6955
- ...paginationParms,
6785
+ const filters = _extends({}, paginationParms, {
6956
6786
  status: "ACTIVE,DISABLED"
6957
- };
6787
+ });
6958
6788
  if (isSearchActive) {
6959
6789
  filters.mobileNumber = mobileNumber;
6960
6790
  }
6961
- const {
6962
- data: dashboardData,
6963
- isLoading
6964
- } = Digit.Hooks.fsm.useSurveyorSearch("dl.djb", filters, {
6965
- enabled: true,
6966
- keepPreviousData: true
6967
- });
6791
+ const _Digit$Hooks$fsm$useS = Digit.Hooks.fsm.useSurveyorSearch("dl.djb", filters, {
6792
+ enabled: true,
6793
+ keepPreviousData: true
6794
+ }),
6795
+ dashboardData = _Digit$Hooks$fsm$useS.data,
6796
+ isLoading = _Digit$Hooks$fsm$useS.isLoading;
6968
6797
  const sourceData = useMemo(() => {
6969
6798
  return (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.surveyors) || [];
6970
6799
  }, [dashboardData]);
@@ -6973,8 +6802,7 @@ const AssignEkyc = () => {
6973
6802
  var _owner$roles, _owner$roles$map, _item$additionalDetai, _item$auditDetails, _item$auditDetails2;
6974
6803
  const owner = (item === null || item === void 0 ? void 0 : item.owner) || {};
6975
6804
  const roleCodes = (owner === null || owner === void 0 ? void 0 : (_owner$roles = owner.roles) === null || _owner$roles === void 0 ? void 0 : (_owner$roles$map = _owner$roles.map(role => role.code)) === null || _owner$roles$map === void 0 ? void 0 : _owner$roles$map.join(", ")) || "";
6976
- return {
6977
- ...item,
6805
+ return _extends({}, item, {
6978
6806
  id: (item === null || item === void 0 ? void 0 : item.id) || "",
6979
6807
  surveyorName: (item === null || item === void 0 ? void 0 : item.name) || (owner === null || owner === void 0 ? void 0 : owner.name) || "",
6980
6808
  mobileNo: (item === null || item === void 0 ? void 0 : item.mobileNo) || (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "",
@@ -6989,16 +6817,14 @@ const AssignEkyc = () => {
6989
6817
  serviceType: (item === null || item === void 0 ? void 0 : (_item$additionalDetai = item.additionalDetails) === null || _item$additionalDetai === void 0 ? void 0 : _item$additionalDetai.serviceType) || "",
6990
6818
  createdTime: (item === null || item === void 0 ? void 0 : (_item$auditDetails = item.auditDetails) === null || _item$auditDetails === void 0 ? void 0 : _item$auditDetails.createdTime) || 0,
6991
6819
  lastModifiedTime: (item === null || item === void 0 ? void 0 : (_item$auditDetails2 = item.auditDetails) === null || _item$auditDetails2 === void 0 ? void 0 : _item$auditDetails2.lastModifiedTime) || 0
6992
- };
6820
+ });
6993
6821
  });
6994
6822
  }, [sourceData]);
6995
6823
  const totalRecords = (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.totalRecords) || (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.totalCount) || 0;
6996
6824
  const SearchFormFields = useCallback(_ref => {
6997
- let {
6998
- registerRef,
6999
- searchFormState,
7000
- controlSearchForm
7001
- } = _ref;
6825
+ let registerRef = _ref.registerRef,
6826
+ searchFormState = _ref.searchFormState,
6827
+ controlSearchForm = _ref.controlSearchForm;
7002
6828
  return /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
7003
6829
  registerRef,
7004
6830
  searchFormState,
@@ -7017,9 +6843,7 @@ const AssignEkyc = () => {
7017
6843
  data.hasOwnProperty("") && (data === null || data === void 0 ? true : delete data[""]);
7018
6844
  dispatch({
7019
6845
  action: "mutateTableForm",
7020
- data: {
7021
- ...tableOrderFormDefaultValues
7022
- }
6846
+ data: _extends({}, tableOrderFormDefaultValues)
7023
6847
  });
7024
6848
  dispatch({
7025
6849
  action: "mutateSearchForm",
@@ -7052,62 +6876,54 @@ const AssignEkyc = () => {
7052
6876
  const newLimit = Number(e.target.value);
7053
6877
  dispatch({
7054
6878
  action: "mutateTableForm",
7055
- data: {
7056
- ...formState.tableForm,
6879
+ data: _extends({}, formState.tableForm, {
7057
6880
  limit: newLimit,
7058
6881
  offset: 0
7059
- }
6882
+ })
7060
6883
  });
7061
6884
  };
7062
6885
  const onSortingByData = e => {
7063
6886
  if (e.length > 0) {
7064
- const [{
7065
- id,
7066
- desc
7067
- }] = e;
6887
+ const _e$ = e[0],
6888
+ id = _e$.id,
6889
+ desc = _e$.desc;
7068
6890
  const sortOrder = desc ? "DESC" : "ASC";
7069
6891
  const sortBy = id;
7070
6892
  if (!(formState.tableForm.sortBy === sortBy && formState.tableForm.sortOrder === sortOrder)) {
7071
6893
  dispatch({
7072
6894
  action: "mutateTableForm",
7073
- data: {
7074
- ...formState.tableForm,
6895
+ data: _extends({}, formState.tableForm, {
7075
6896
  sortBy: id,
7076
6897
  sortOrder: desc ? "DESC" : "ASC"
7077
- }
6898
+ })
7078
6899
  });
7079
6900
  }
7080
6901
  }
7081
6902
  };
7082
- const propsForInboxTable = SupervisorInboxTableConfig({
7083
- ...{
7084
- onPageSizeChange,
7085
- formState,
7086
- totalCount: totalRecords,
7087
- table: filteredData,
7088
- dispatch,
7089
- onSortingByData,
7090
- tenantId: "dl.djb",
7091
- inboxStyles: {
7092
- overflowX: "scroll",
7093
- overflowY: "hidden"
7094
- },
7095
- tableStyle: {
7096
- width: "70%"
7097
- }
6903
+ const propsForInboxTable = SupervisorInboxTableConfig(_extends({}, {
6904
+ onPageSizeChange,
6905
+ formState,
6906
+ totalCount: totalRecords,
6907
+ table: filteredData,
6908
+ dispatch,
6909
+ onSortingByData,
6910
+ tenantId: "dl.djb",
6911
+ inboxStyles: {
6912
+ overflowX: "scroll",
6913
+ overflowY: "hidden"
6914
+ },
6915
+ tableStyle: {
6916
+ width: "70%"
7098
6917
  }
7099
- });
6918
+ }));
7100
6919
  const isInboxLoading = isLoading;
7101
6920
  const onMobileSortOrderData = data => {
7102
- const {
7103
- sortOrder
7104
- } = data;
6921
+ const sortOrder = data.sortOrder;
7105
6922
  dispatch({
7106
6923
  action: "mutateTableForm",
7107
- data: {
7108
- ...formState.tableForm,
6924
+ data: _extends({}, formState.tableForm, {
7109
6925
  sortOrder
7110
- }
6926
+ })
7111
6927
  });
7112
6928
  };
7113
6929
  const onSortFormReset = setSortFormValue => {
@@ -7143,7 +6959,7 @@ const AssignEkyc = () => {
7143
6959
 
7144
6960
  const breadcrumb = (userType, listLabel, listPath, detailLabel) => [{
7145
6961
  label: listLabel,
7146
- path: `/digit-ui/${userType}/ekyc/${listPath}`
6962
+ path: "/digit-ui/" + userType + "/ekyc/" + listPath
7147
6963
  }, {
7148
6964
  label: detailLabel
7149
6965
  }];
@@ -7198,7 +7014,7 @@ const getEkycRoutes = (userType, t) => [{
7198
7014
  layout: "normal",
7199
7015
  breadcrumb: [{
7200
7016
  label: "EKYC_ASSIGN",
7201
- path: `/digit-ui/${userType}/ekyc/assign`
7017
+ path: "/digit-ui/" + userType + "/ekyc/assign"
7202
7018
  }]
7203
7019
  }, {
7204
7020
  path: ["/vendors/:vendorId", "/vendors"],
@@ -7219,12 +7035,9 @@ const getEkycRoutes = (userType, t) => [{
7219
7035
  const ekycRoutes = getEkycRoutes("employee");
7220
7036
 
7221
7037
  const EmployeeApp = _ref => {
7222
- let {
7223
- path
7224
- } = _ref;
7225
- const {
7226
- t
7227
- } = useTranslation();
7038
+ let path = _ref.path;
7039
+ const _useTranslation = useTranslation(),
7040
+ t = _useTranslation.t;
7228
7041
  const location = useLocation();
7229
7042
  sessionStorage.removeItem("revalidateddone");
7230
7043
  const getDynamicBreadcrumbs = () => {
@@ -7258,16 +7071,15 @@ const EmployeeApp = _ref => {
7258
7071
  matchedPath.split("/").filter(Boolean).forEach((segment, idx) => {
7259
7072
  if (segment.startsWith(":")) {
7260
7073
  const val = relativeSegments[idx];
7261
- crumbPath = crumbPath.replace(new RegExp(`\\/${segment}`, "g"), `/${val}`).replace(new RegExp(`(\\w+)${segment}`, "g"), `$1/${val}`).replace(new RegExp(segment, "g"), val);
7074
+ crumbPath = crumbPath.replace(new RegExp("\\/" + segment, "g"), "/" + val).replace(new RegExp("(\\w+)" + segment, "g"), "$1/" + val).replace(new RegExp(segment, "g"), val);
7262
7075
  }
7263
7076
  });
7264
7077
  }
7265
- crumbs.push({
7266
- label: t(crumb.label),
7267
- ...(crumbPath ? {
7268
- path: crumbPath
7269
- } : {})
7270
- });
7078
+ crumbs.push(_extends({
7079
+ label: t(crumb.label)
7080
+ }, crumbPath ? {
7081
+ path: crumbPath
7082
+ } : {}));
7271
7083
  });
7272
7084
  } else {
7273
7085
  crumbs.push({
@@ -7289,7 +7101,7 @@ const EmployeeApp = _ref => {
7289
7101
  }), /*#__PURE__*/React.createElement("div", {
7290
7102
  className: "employee-form"
7291
7103
  }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
7292
- path: `${path}/dashboard`,
7104
+ path: path + "/dashboard",
7293
7105
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7294
7106
  layoutClass: "normal"
7295
7107
  }, /*#__PURE__*/React.createElement(Dashboard, {
@@ -7299,7 +7111,7 @@ const EmployeeApp = _ref => {
7299
7111
  isInbox: true
7300
7112
  }))
7301
7113
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7302
- path: `${path}/inbox`,
7114
+ path: path + "/inbox",
7303
7115
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7304
7116
  layoutClass: "normal"
7305
7117
  }, /*#__PURE__*/React.createElement(Inbox, {
@@ -7309,45 +7121,45 @@ const EmployeeApp = _ref => {
7309
7121
  isInbox: true
7310
7122
  }))
7311
7123
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7312
- path: `${path}/assign/surveyor-details/:id`,
7124
+ path: path + "/assign/surveyor-details/:id",
7313
7125
  exact: true,
7314
7126
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7315
7127
  layoutClass: "action"
7316
7128
  }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
7317
7129
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7318
- path: formStepRoutes.map(route => `${path}/${route}`),
7130
+ path: formStepRoutes.map(route => path + "/" + route),
7319
7131
  component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
7320
7132
  layoutClass: "normal"
7321
7133
  }, /*#__PURE__*/React.createElement(EKYCForm, _extends({}, props, {
7322
7134
  path: path
7323
7135
  })))
7324
7136
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7325
- path: `${path}/review/:kno`,
7137
+ path: path + "/review/:kno",
7326
7138
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7327
7139
  layoutClass: "action"
7328
7140
  }, /*#__PURE__*/React.createElement(Review, null))
7329
7141
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7330
- path: `${path}/admin-dashboard`,
7142
+ path: path + "/admin-dashboard",
7331
7143
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7332
7144
  layoutClass: "normal"
7333
7145
  }, /*#__PURE__*/React.createElement(AdminDashboard, null))
7334
7146
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7335
- path: `${path}/vendors/:vendorId`,
7147
+ path: path + "/vendors/:vendorId",
7336
7148
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7337
7149
  layoutClass: "normal"
7338
7150
  }, /*#__PURE__*/React.createElement(VendorDetailsCard, null))
7339
7151
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7340
- path: [`${path}/supervisor-dashboard/:id`, `${path}/supervisor-dashboard`],
7152
+ path: [path + "/supervisor-dashboard/:id", path + "/supervisor-dashboard"],
7341
7153
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7342
7154
  layoutClass: "normal"
7343
7155
  }, /*#__PURE__*/React.createElement(SupervisorDetailsCard, null))
7344
7156
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7345
- path: [`${path}/surveyor-dashboard/:id`, `${path}/surveyor-dashboard`],
7157
+ path: [path + "/surveyor-dashboard/:id", path + "/surveyor-dashboard"],
7346
7158
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7347
7159
  layoutClass: "normal"
7348
7160
  }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
7349
7161
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
7350
- path: `${path}/work-order`,
7162
+ path: path + "/work-order",
7351
7163
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
7352
7164
  layoutClass: "normal"
7353
7165
  }, /*#__PURE__*/React.createElement(WorkOrder, null))
@@ -7491,56 +7303,66 @@ const PropertyInfoConfig = function (t, formData, uploadFile, buildingImage, bui
7491
7303
  };
7492
7304
 
7493
7305
  const PropertyInfo = _ref => {
7494
- let {
7495
- config,
7496
- onSelect,
7497
- formData
7498
- } = _ref;
7499
- const {
7500
- t
7501
- } = useTranslation();
7306
+ let config = _ref.config,
7307
+ onSelect = _ref.onSelect,
7308
+ formData = _ref.formData;
7309
+ const _useTranslation = useTranslation(),
7310
+ t = _useTranslation.t;
7502
7311
  const location = useLocation();
7503
7312
  const flowState = location.state || {};
7504
7313
  const tenantId = Digit.ULBService.getCurrentTenantId();
7505
7314
  const queryParams = new URLSearchParams(location.search);
7506
7315
  const urlKno = queryParams.get("kno");
7507
7316
  const searchKno = urlKno || (flowState === null || flowState === void 0 ? void 0 : flowState.kNumber) || (flowState === null || flowState === void 0 ? void 0 : flowState.kno) || (formData === null || formData === void 0 ? void 0 : formData.kNumber) || (formData === null || formData === void 0 ? void 0 : formData.kno) || sessionStorage.getItem("EKYC_K_NUMBER");
7508
- const {
7509
- isLoading,
7510
- data: searchData
7511
- } = Digit.Hooks.ekyc.useSearchConnection({
7512
- tenantId,
7513
- details: {
7514
- kno: searchKno,
7515
- fetchType: "PROPERTY"
7516
- }
7517
- }, {
7518
- enabled: !!searchKno,
7519
- cacheTime: 0
7520
- });
7317
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useSearchConnection({
7318
+ tenantId,
7319
+ details: {
7320
+ kno: searchKno,
7321
+ fetchType: "PROPERTY"
7322
+ }
7323
+ }, {
7324
+ enabled: !!searchKno,
7325
+ cacheTime: 0
7326
+ }),
7327
+ isLoading = _Digit$Hooks$ekyc$use.isLoading,
7328
+ searchData = _Digit$Hooks$ekyc$use.data;
7521
7329
  const updateMutation = Digit.Hooks.ekyc.useEkycUpdate(tenantId);
7522
7330
  const savedData = (formData === null || formData === void 0 ? void 0 : formData.propertyDetails) || {};
7523
- const [buildingImage, setBuildingImage] = useState(null);
7524
- const [buildingImageId, setBuildingImageId] = useState(savedData.buildingImageId || null);
7525
- const [toast, setToast] = useState(null);
7526
- const [isDataLoaded, setIsDataLoaded] = useState(false);
7527
- const [canSubmit, setCanSubmit] = useState(false);
7528
- const [defaultValues, setDefaultValues] = useState(() => ({
7529
- pidNumber: savedData.pidNumber || "",
7530
- propertyType: savedData.propertyType ? {
7531
- name: savedData.propertyType
7532
- } : null,
7533
- subPropertyCategory: savedData.subPropertyCategory ? {
7534
- name: savedData.subPropertyCategory
7535
- } : null,
7536
- noOfFloors: savedData.noOfFloors || "",
7537
- floorNo: savedData.floorNo || "",
7538
- noOfRooms: savedData.noOfRooms || "",
7539
- noOfBeds: savedData.noOfBeds || "",
7540
- dwellingUnits: savedData.dwellingUnits || "",
7541
- buildingImage: savedData.buildingImageId ? "Uploaded" : null
7542
- }));
7543
- const [localFormData, setLocalFormData] = useState(defaultValues);
7331
+ const _useState = useState(null),
7332
+ buildingImage = _useState[0],
7333
+ setBuildingImage = _useState[1];
7334
+ const _useState2 = useState(savedData.buildingImageId || null),
7335
+ buildingImageId = _useState2[0],
7336
+ setBuildingImageId = _useState2[1];
7337
+ const _useState3 = useState(null),
7338
+ toast = _useState3[0],
7339
+ setToast = _useState3[1];
7340
+ const _useState4 = useState(false),
7341
+ isDataLoaded = _useState4[0],
7342
+ setIsDataLoaded = _useState4[1];
7343
+ const _useState5 = useState(false),
7344
+ canSubmit = _useState5[0],
7345
+ setCanSubmit = _useState5[1];
7346
+ const _useState6 = useState(() => ({
7347
+ pidNumber: savedData.pidNumber || "",
7348
+ propertyType: savedData.propertyType ? {
7349
+ name: savedData.propertyType
7350
+ } : null,
7351
+ subPropertyCategory: savedData.subPropertyCategory ? {
7352
+ name: savedData.subPropertyCategory
7353
+ } : null,
7354
+ noOfFloors: savedData.noOfFloors || "",
7355
+ floorNo: savedData.floorNo || "",
7356
+ noOfRooms: savedData.noOfRooms || "",
7357
+ noOfBeds: savedData.noOfBeds || "",
7358
+ dwellingUnits: savedData.dwellingUnits || "",
7359
+ buildingImage: savedData.buildingImageId ? "Uploaded" : null
7360
+ })),
7361
+ defaultValues = _useState6[0],
7362
+ setDefaultValues = _useState6[1];
7363
+ const _useState7 = useState(defaultValues),
7364
+ localFormData = _useState7[0],
7365
+ setLocalFormData = _useState7[1];
7544
7366
  const extractApplicationData = searchData => {
7545
7367
  if (!searchData) return null;
7546
7368
  const reviewWrapper = (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReviewInfo) || (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReview) || searchData;
@@ -7646,10 +7468,7 @@ const PropertyInfo = _ref => {
7646
7468
  var _data$propertyType, _localFormData$proper;
7647
7469
  const propertyTypeChanged = ((data === null || data === void 0 ? void 0 : (_data$propertyType = data.propertyType) === null || _data$propertyType === void 0 ? void 0 : _data$propertyType.name) || (data === null || data === void 0 ? void 0 : data.propertyType)) !== ((localFormData === null || localFormData === void 0 ? void 0 : (_localFormData$proper = localFormData.propertyType) === null || _localFormData$proper === void 0 ? void 0 : _localFormData$proper.name) || (localFormData === null || localFormData === void 0 ? void 0 : localFormData.propertyType));
7648
7470
  if (propertyTypeChanged) {
7649
- setLocalFormData(prev => ({
7650
- ...prev,
7651
- ...data
7652
- }));
7471
+ setLocalFormData(prev => _extends({}, prev, data));
7653
7472
  }
7654
7473
  const propTypeVal = data === null || data === void 0 ? void 0 : data.propertyType;
7655
7474
  const subPropCatVal = data === null || data === void 0 ? void 0 : data.subPropertyCategory;
@@ -7683,12 +7502,11 @@ const PropertyInfo = _ref => {
7683
7502
  buildingImageId: buildingImageId
7684
7503
  };
7685
7504
  const _temp2 = _catch(function () {
7686
- return Promise.resolve(updateMutation.mutateAsync({
7505
+ return Promise.resolve(updateMutation.mutateAsync(_extends({
7687
7506
  RequestInfo: {},
7688
7507
  updateType: "PROPERTY",
7689
- kno: searchKno,
7690
- ...submitData
7691
- })).then(function () {
7508
+ kno: searchKno
7509
+ }, submitData))).then(function () {
7692
7510
  setToast({
7693
7511
  type: "success",
7694
7512
  message: t("Property details updated successfully!")
@@ -7714,8 +7532,7 @@ const PropertyInfo = _ref => {
7714
7532
  key: isDataLoaded ? "loaded" : "loading",
7715
7533
  isDisabled: !canSubmit,
7716
7534
  label: t("ES_COMMON_CONTINUE"),
7717
- config: Config.map(item => ({
7718
- ...item,
7535
+ config: Config.map(item => _extends({}, item, {
7719
7536
  isCollapsible: true,
7720
7537
  isDefaultOpen: true
7721
7538
  })),
@@ -7744,7 +7561,7 @@ const MeterDetailsConfig = function (t, formData, uploadPhoto, meterPhoto, meter
7744
7561
  for (let y = 1998; y <= 2026; y++) {
7745
7562
  for (let m = 1; m <= 12; m++) {
7746
7563
  monthYearOptions.push({
7747
- name: `${m}/${y}`
7564
+ name: m + "/" + y
7748
7565
  });
7749
7566
  }
7750
7567
  }
@@ -8001,77 +7818,87 @@ const MeterDetailsConfig = function (t, formData, uploadPhoto, meterPhoto, meter
8001
7818
  };
8002
7819
 
8003
7820
  const MeterDetails = _ref => {
8004
- let {
8005
- config,
8006
- onSelect,
8007
- formData
8008
- } = _ref;
8009
- const {
8010
- t
8011
- } = useTranslation();
7821
+ let config = _ref.config,
7822
+ onSelect = _ref.onSelect,
7823
+ formData = _ref.formData;
7824
+ const _useTranslation = useTranslation(),
7825
+ t = _useTranslation.t;
8012
7826
  const location = useLocation();
8013
7827
  const flowState = location.state || {};
8014
7828
  const tenantId = Digit.ULBService.getCurrentTenantId();
8015
7829
  const queryParams = new URLSearchParams(location.search);
8016
7830
  const urlKno = queryParams.get("kno");
8017
7831
  const searchKno = urlKno || (flowState === null || flowState === void 0 ? void 0 : flowState.kNumber) || (flowState === null || flowState === void 0 ? void 0 : flowState.kno) || (formData === null || formData === void 0 ? void 0 : formData.kNumber) || (formData === null || formData === void 0 ? void 0 : formData.kno) || sessionStorage.getItem("EKYC_K_NUMBER");
8018
- const {
8019
- isLoading,
8020
- data: searchData
8021
- } = Digit.Hooks.ekyc.useSearchConnection({
8022
- tenantId,
8023
- details: {
8024
- kno: searchKno,
8025
- fetchType: "METER"
8026
- }
8027
- }, {
8028
- enabled: !!searchKno,
8029
- cacheTime: 0
8030
- });
7832
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useSearchConnection({
7833
+ tenantId,
7834
+ details: {
7835
+ kno: searchKno,
7836
+ fetchType: "METER"
7837
+ }
7838
+ }, {
7839
+ enabled: !!searchKno,
7840
+ cacheTime: 0
7841
+ }),
7842
+ isLoading = _Digit$Hooks$ekyc$use.isLoading,
7843
+ searchData = _Digit$Hooks$ekyc$use.data;
8031
7844
  const updateMutation = Digit.Hooks.ekyc.useEkycUpdate(tenantId);
8032
7845
  const savedData = (formData === null || formData === void 0 ? void 0 : formData.meterDetails) || {};
8033
- const [meterPhoto, setMeterPhoto] = useState(null);
8034
- const [meterPhotoId, setMeterPhotoId] = useState(savedData.meterPhotoId || null);
8035
- const [toast, setToast] = useState(null);
8036
- const [isDataLoaded, setIsDataLoaded] = useState(false);
8037
- const [canSubmit, setCanSubmit] = useState(false);
8038
- const [defaultValues, setDefaultValues] = useState(() => ({
8039
- connectionCategory: savedData.connectionCategory || "",
8040
- saType: savedData.saType || "",
8041
- status: savedData.status || "",
8042
- mrCode: savedData.mrCode || "",
8043
- areaCode: savedData.areaCode || "",
8044
- mrKey: savedData.mrKey || "",
8045
- meterNumber: savedData.meterNumber || "",
8046
- meterMaker: savedData.meterMaker || "",
8047
- meterStatus: savedData.meterStatus ? {
8048
- name: savedData.meterStatus
8049
- } : null,
8050
- meterCondition: savedData.meterCondition ? {
8051
- name: savedData.meterCondition
8052
- } : null,
8053
- meterLocation: savedData.meterLocation ? {
8054
- name: savedData.meterLocation
8055
- } : null,
8056
- lastBillReceived: savedData.lastBillReceived ? {
8057
- name: savedData.lastBillReceived
8058
- } : null,
8059
- billMonthYear: savedData.billMonthYear ? {
8060
- name: savedData.billMonthYear
8061
- } : null,
8062
- reason: savedData.reason || "",
8063
- accessToMeter: savedData.accessToMeter ? {
8064
- name: savedData.accessToMeter
8065
- } : null,
8066
- sewerConnection: savedData.sewerConnection ? {
8067
- name: savedData.sewerConnection
8068
- } : null,
8069
- septicTank: savedData.septicTank ? {
8070
- name: savedData.septicTank
8071
- } : null,
8072
- meterPhoto: savedData.meterPhotoId ? "Uploaded" : null
8073
- }));
8074
- const [localFormData, setLocalFormData] = useState(defaultValues);
7846
+ const _useState = useState(null),
7847
+ meterPhoto = _useState[0],
7848
+ setMeterPhoto = _useState[1];
7849
+ const _useState2 = useState(savedData.meterPhotoId || null),
7850
+ meterPhotoId = _useState2[0],
7851
+ setMeterPhotoId = _useState2[1];
7852
+ const _useState3 = useState(null),
7853
+ toast = _useState3[0],
7854
+ setToast = _useState3[1];
7855
+ const _useState4 = useState(false),
7856
+ isDataLoaded = _useState4[0],
7857
+ setIsDataLoaded = _useState4[1];
7858
+ const _useState5 = useState(false),
7859
+ canSubmit = _useState5[0],
7860
+ setCanSubmit = _useState5[1];
7861
+ const _useState6 = useState(() => ({
7862
+ connectionCategory: savedData.connectionCategory || "",
7863
+ saType: savedData.saType || "",
7864
+ status: savedData.status || "",
7865
+ mrCode: savedData.mrCode || "",
7866
+ areaCode: savedData.areaCode || "",
7867
+ mrKey: savedData.mrKey || "",
7868
+ meterNumber: savedData.meterNumber || "",
7869
+ meterMaker: savedData.meterMaker || "",
7870
+ meterStatus: savedData.meterStatus ? {
7871
+ name: savedData.meterStatus
7872
+ } : null,
7873
+ meterCondition: savedData.meterCondition ? {
7874
+ name: savedData.meterCondition
7875
+ } : null,
7876
+ meterLocation: savedData.meterLocation ? {
7877
+ name: savedData.meterLocation
7878
+ } : null,
7879
+ lastBillReceived: savedData.lastBillReceived ? {
7880
+ name: savedData.lastBillReceived
7881
+ } : null,
7882
+ billMonthYear: savedData.billMonthYear ? {
7883
+ name: savedData.billMonthYear
7884
+ } : null,
7885
+ reason: savedData.reason || "",
7886
+ accessToMeter: savedData.accessToMeter ? {
7887
+ name: savedData.accessToMeter
7888
+ } : null,
7889
+ sewerConnection: savedData.sewerConnection ? {
7890
+ name: savedData.sewerConnection
7891
+ } : null,
7892
+ septicTank: savedData.septicTank ? {
7893
+ name: savedData.septicTank
7894
+ } : null,
7895
+ meterPhoto: savedData.meterPhotoId ? "Uploaded" : null
7896
+ })),
7897
+ defaultValues = _useState6[0],
7898
+ setDefaultValues = _useState6[1];
7899
+ const _useState7 = useState(defaultValues),
7900
+ localFormData = _useState7[0],
7901
+ setLocalFormData = _useState7[1];
8075
7902
  const extractApplicationData = searchData => {
8076
7903
  if (!searchData) return null;
8077
7904
  const reviewWrapper = (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReviewInfo) || (searchData === null || searchData === void 0 ? void 0 : searchData.applicationReview) || searchData;
@@ -8142,7 +7969,7 @@ const MeterDetails = _ref => {
8142
7969
  const mon = parseInt(parsedParts[0], 10);
8143
7970
  const yr = parseInt(parsedParts[1], 10);
8144
7971
  billMonYr = {
8145
- name: `${mon}/${yr}`
7972
+ name: mon + "/" + yr
8146
7973
  };
8147
7974
  } else {
8148
7975
  billMonYr = {
@@ -8262,10 +8089,7 @@ const MeterDetails = _ref => {
8262
8089
  const lastBillReceivedChanged = ((data === null || data === void 0 ? void 0 : (_data$lastBillReceive = data.lastBillReceived) === null || _data$lastBillReceive === void 0 ? void 0 : _data$lastBillReceive.name) || (data === null || data === void 0 ? void 0 : data.lastBillReceived)) !== ((localFormData === null || localFormData === void 0 ? void 0 : (_localFormData$lastBi = localFormData.lastBillReceived) === null || _localFormData$lastBi === void 0 ? void 0 : _localFormData$lastBi.name) || (localFormData === null || localFormData === void 0 ? void 0 : localFormData.lastBillReceived));
8263
8090
  const sewerConnectionChanged = ((data === null || data === void 0 ? void 0 : (_data$sewerConnection = data.sewerConnection) === null || _data$sewerConnection === void 0 ? void 0 : _data$sewerConnection.name) || (data === null || data === void 0 ? void 0 : data.sewerConnection)) !== ((localFormData === null || localFormData === void 0 ? void 0 : (_localFormData$sewerC = localFormData.sewerConnection) === null || _localFormData$sewerC === void 0 ? void 0 : _localFormData$sewerC.name) || (localFormData === null || localFormData === void 0 ? void 0 : localFormData.sewerConnection));
8264
8091
  if (meterStatusChanged || lastBillReceivedChanged || sewerConnectionChanged) {
8265
- setLocalFormData(prev => ({
8266
- ...prev,
8267
- ...data
8268
- }));
8092
+ setLocalFormData(prev => _extends({}, prev, data));
8269
8093
  }
8270
8094
  const connCatVal = data === null || data === void 0 ? void 0 : data.connectionCategory;
8271
8095
  const mStatusVal = data === null || data === void 0 ? void 0 : data.meterStatus;
@@ -8314,12 +8138,11 @@ const MeterDetails = _ref => {
8314
8138
  meterPhotoId: meterPhotoId
8315
8139
  };
8316
8140
  const _temp2 = _catch(function () {
8317
- return Promise.resolve(updateMutation.mutateAsync({
8141
+ return Promise.resolve(updateMutation.mutateAsync(_extends({
8318
8142
  RequestInfo: {},
8319
8143
  updateType: "METER",
8320
- kno: searchKno,
8321
- ...submitData
8322
- })).then(function () {
8144
+ kno: searchKno
8145
+ }, submitData))).then(function () {
8323
8146
  setToast({
8324
8147
  type: "success",
8325
8148
  message: t("Meter details updated successfully!")
@@ -8345,8 +8168,7 @@ const MeterDetails = _ref => {
8345
8168
  key: isDataLoaded ? "loaded" : "loading",
8346
8169
  isDisabled: !canSubmit,
8347
8170
  label: t("ES_COMMON_CONTINUE"),
8348
- config: Config.map(item => ({
8349
- ...item,
8171
+ config: Config.map(item => _extends({}, item, {
8350
8172
  isCollapsible: true,
8351
8173
  isDefaultOpen: true
8352
8174
  })),
@@ -8364,9 +8186,7 @@ const MeterDetails = _ref => {
8364
8186
 
8365
8187
  const Inbox$1 = _ref => {
8366
8188
  var _formState$tableForm3, _formState$tableForm4, _formState$searchForm3, _formState$searchForm4, _dashboardData$dashbo;
8367
- let {
8368
- parentRoute
8369
- } = _ref;
8189
+ let parentRoute = _ref.parentRoute;
8370
8190
  const tenantId = Digit.ULBService.getCurrentTenantId();
8371
8191
  const location = useLocation();
8372
8192
  const formInitValue = {
@@ -8379,7 +8199,9 @@ const Inbox$1 = _ref => {
8379
8199
  sortOrder: "DESC"
8380
8200
  }
8381
8201
  };
8382
- const [formState, dispatch] = useReducer(formReducer, formInitValue);
8202
+ const _useReducer = useReducer(formReducer, formInitValue),
8203
+ formState = _useReducer[0],
8204
+ dispatch = _useReducer[1];
8383
8205
  const queryParams = useMemo(() => {
8384
8206
  var _formState$tableForm, _formState$tableForm2;
8385
8207
  return {
@@ -8391,20 +8213,17 @@ const Inbox$1 = _ref => {
8391
8213
  }, [tenantId, formState === null || formState === void 0 ? void 0 : (_formState$tableForm3 = formState.tableForm) === null || _formState$tableForm3 === void 0 ? void 0 : _formState$tableForm3.offset, formState === null || formState === void 0 ? void 0 : (_formState$tableForm4 = formState.tableForm) === null || _formState$tableForm4 === void 0 ? void 0 : _formState$tableForm4.limit, formState === null || formState === void 0 ? void 0 : formState.searchForm]);
8392
8214
  const filters = useMemo(() => {
8393
8215
  const searchForm = (formState === null || formState === void 0 ? void 0 : formState.searchForm) || {};
8394
- return {
8395
- ...searchForm,
8396
- ...(searchForm.kNumber && {
8397
- kno: searchForm.kNumber
8398
- })
8399
- };
8216
+ return _extends({}, searchForm, searchForm.kNumber && {
8217
+ kno: searchForm.kNumber
8218
+ });
8400
8219
  }, [formState === null || formState === void 0 ? void 0 : formState.searchForm]);
8401
- const {
8402
- isLoading,
8403
- data: dashboardData = {}
8404
- } = Digit.Hooks.ekyc.useEkycApplicationList(filters, queryParams, {
8405
- enabled: !!tenantId,
8406
- keepPreviousData: true
8407
- });
8220
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycApplicationList(filters, queryParams, {
8221
+ enabled: !!tenantId,
8222
+ keepPreviousData: true
8223
+ }),
8224
+ isLoading = _Digit$Hooks$ekyc$use.isLoading,
8225
+ _Digit$Hooks$ekyc$use2 = _Digit$Hooks$ekyc$use.data,
8226
+ dashboardData = _Digit$Hooks$ekyc$use2 === void 0 ? {} : _Digit$Hooks$ekyc$use2;
8408
8227
  const searchDetails = useMemo(() => {
8409
8228
  var _formState$searchForm, _formState$searchForm2;
8410
8229
  return {
@@ -8413,16 +8232,15 @@ const Inbox$1 = _ref => {
8413
8232
  };
8414
8233
  }, [formState === null || formState === void 0 ? void 0 : (_formState$searchForm3 = formState.searchForm) === null || _formState$searchForm3 === void 0 ? void 0 : _formState$searchForm3.kNumber, formState === null || formState === void 0 ? void 0 : (_formState$searchForm4 = formState.searchForm) === null || _formState$searchForm4 === void 0 ? void 0 : _formState$searchForm4.kName]);
8415
8234
  const isSearchActive = !!(searchDetails.kno || searchDetails.name);
8416
- const {
8417
- isLoading: isSearchLoading,
8418
- data: searchData
8419
- } = Digit.Hooks.ekyc.useSearchConnection({
8420
- tenantId,
8421
- details: searchDetails
8422
- }, {
8423
- enabled: !!tenantId && !!searchDetails.kno,
8424
- keepPreviousData: true
8425
- });
8235
+ const _Digit$Hooks$ekyc$use3 = Digit.Hooks.ekyc.useSearchConnection({
8236
+ tenantId,
8237
+ details: searchDetails
8238
+ }, {
8239
+ enabled: !!tenantId && !!searchDetails.kno,
8240
+ keepPreviousData: true
8241
+ }),
8242
+ isSearchLoading = _Digit$Hooks$ekyc$use3.isLoading,
8243
+ searchData = _Digit$Hooks$ekyc$use3.data;
8426
8244
  const sourceData = useMemo(() => {
8427
8245
  if (isSearchActive) {
8428
8246
  if (!searchData) return [];
@@ -8432,11 +8250,12 @@ const Inbox$1 = _ref => {
8432
8250
  }, [isSearchActive, searchData, dashboardData]);
8433
8251
  const filteredData = useMemo(() => {
8434
8252
  return (sourceData || []).map(item => {
8253
+ var _item$sla;
8435
8254
  const isSearchItem = !!item.connectionDetails;
8436
8255
  if (isSearchItem) {
8437
8256
  var _item$propertyInfo, _item$propertyInfo2, _item$propertyInfo3, _item$connectionDetai, _item$connectionDetai2, _item$connectionDetai3;
8438
8257
  const searchDetails = item.connectionDetails || {};
8439
- const fullName = searchDetails.firstName || searchDetails.middleName || searchDetails.lastName ? `${searchDetails.firstName || ""} ${searchDetails.middleName || ""} ${searchDetails.lastName || ""}`.trim().replace(/\s+/g, " ") : searchDetails.consumerName || "";
8258
+ const fullName = searchDetails.firstName || searchDetails.middleName || searchDetails.lastName ? ((searchDetails.firstName || "") + " " + (searchDetails.middleName || "") + " " + (searchDetails.lastName || "")).trim().replace(/\s+/g, " ") : searchDetails.consumerName || "";
8440
8259
  return {
8441
8260
  applicationNo: ((_item$propertyInfo = item.propertyInfo) === null || _item$propertyInfo === void 0 ? void 0 : _item$propertyInfo.kno) || "",
8442
8261
  connectionNo: ((_item$propertyInfo2 = item.propertyInfo) === null || _item$propertyInfo2 === void 0 ? void 0 : _item$propertyInfo2.kno) || "",
@@ -8448,9 +8267,8 @@ const Inbox$1 = _ref => {
8448
8267
  sla: 0
8449
8268
  };
8450
8269
  }
8451
- const fullName = item.firstName || item.middleName || item.lastName ? `${item.firstName || ""} ${item.middleName || ""} ${item.lastName || ""}`.trim().replace(/\s+/g, " ") : item.consumerName || item.citizenName || "";
8452
- return {
8453
- ...item,
8270
+ const fullName = item.firstName || item.middleName || item.lastName ? ((item.firstName || "") + " " + (item.middleName || "") + " " + (item.lastName || "")).trim().replace(/\s+/g, " ") : item.consumerName || item.citizenName || "";
8271
+ return _extends({}, item, {
8454
8272
  applicationNo: item.kno || item.applicationNumber || "",
8455
8273
  connectionNo: item.connectionNo || "",
8456
8274
  owner: fullName,
@@ -8458,18 +8276,16 @@ const Inbox$1 = _ref => {
8458
8276
  citizenName: fullName,
8459
8277
  status: item.status || "",
8460
8278
  ekycStatus: (item.ekycStatus || item.ekycstatus || "NA").toUpperCase(),
8461
- sla: item.sla ?? 0
8462
- };
8279
+ sla: (_item$sla = item.sla) != null ? _item$sla : 0
8280
+ });
8463
8281
  });
8464
8282
  }, [sourceData]);
8465
8283
  const totalRecords = (dashboardData === null || dashboardData === void 0 ? void 0 : (_dashboardData$dashbo = dashboardData.dashboardInfo) === null || _dashboardData$dashbo === void 0 ? void 0 : _dashboardData$dashbo.totalRecords) || (dashboardData === null || dashboardData === void 0 ? void 0 : dashboardData.totalCount) || 0;
8466
8284
  const checkPathName = location.pathname.includes("ekyc/inbox");
8467
8285
  const SearchFormFields = useCallback(_ref2 => {
8468
- let {
8469
- registerRef,
8470
- searchFormState,
8471
- controlSearchForm
8472
- } = _ref2;
8286
+ let registerRef = _ref2.registerRef,
8287
+ searchFormState = _ref2.searchFormState,
8288
+ controlSearchForm = _ref2.controlSearchForm;
8473
8289
  return /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
8474
8290
  registerRef,
8475
8291
  searchFormState,
@@ -8488,9 +8304,7 @@ const Inbox$1 = _ref => {
8488
8304
  data.hasOwnProperty("") && (data === null || data === void 0 ? true : delete data[""]);
8489
8305
  dispatch({
8490
8306
  action: "mutateTableForm",
8491
- data: {
8492
- ...tableOrderFormDefaultValues
8493
- },
8307
+ data: _extends({}, tableOrderFormDefaultValues),
8494
8308
  checkPathName
8495
8309
  });
8496
8310
  dispatch({
@@ -8525,32 +8339,26 @@ const Inbox$1 = _ref => {
8525
8339
  const storageKey = payload.checkPathName ? "EKYC.INBOX" : "EKYC.SW.INBOX";
8526
8340
  switch (payload.action) {
8527
8341
  case "mutateSearchForm":
8528
- Digit.SessionStorage.set(storageKey, {
8529
- ...state,
8342
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
8530
8343
  searchForm: payload.data
8531
- });
8532
- return {
8533
- ...state,
8344
+ }));
8345
+ return _extends({}, state, {
8534
8346
  searchForm: payload.data
8535
- };
8347
+ });
8536
8348
  case "mutateFilterForm":
8537
- Digit.SessionStorage.set(storageKey, {
8538
- ...state,
8349
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
8539
8350
  filterForm: payload.data
8540
- });
8541
- return {
8542
- ...state,
8351
+ }));
8352
+ return _extends({}, state, {
8543
8353
  filterForm: payload.data
8544
- };
8354
+ });
8545
8355
  case "mutateTableForm":
8546
- Digit.SessionStorage.set(storageKey, {
8547
- ...state,
8356
+ Digit.SessionStorage.set(storageKey, _extends({}, state, {
8548
8357
  tableForm: payload.data
8549
- });
8550
- return {
8551
- ...state,
8358
+ }));
8359
+ return _extends({}, state, {
8552
8360
  tableForm: payload.data
8553
- };
8361
+ });
8554
8362
  default:
8555
8363
  return state;
8556
8364
  }
@@ -8559,65 +8367,57 @@ const Inbox$1 = _ref => {
8559
8367
  const newLimit = Number(e.target.value);
8560
8368
  dispatch({
8561
8369
  action: "mutateTableForm",
8562
- data: {
8563
- ...formState.tableForm,
8370
+ data: _extends({}, formState.tableForm, {
8564
8371
  limit: newLimit,
8565
8372
  offset: 0
8566
- },
8373
+ }),
8567
8374
  checkPathName
8568
8375
  });
8569
8376
  };
8570
8377
  const onSortingByData = e => {
8571
8378
  if (e.length > 0) {
8572
- const [{
8573
- id,
8574
- desc
8575
- }] = e;
8379
+ const _e$ = e[0],
8380
+ id = _e$.id,
8381
+ desc = _e$.desc;
8576
8382
  const sortOrder = desc ? "DESC" : "ASC";
8577
8383
  const sortBy = id;
8578
8384
  if (!(formState.tableForm.sortBy === sortBy && formState.tableForm.sortOrder === sortOrder)) {
8579
8385
  dispatch({
8580
8386
  action: "mutateTableForm",
8581
- data: {
8582
- ...formState.tableForm,
8387
+ data: _extends({}, formState.tableForm, {
8583
8388
  sortBy: id,
8584
8389
  sortOrder: desc ? "DESC" : "ASC"
8585
- },
8390
+ }),
8586
8391
  checkPathName
8587
8392
  });
8588
8393
  }
8589
8394
  }
8590
8395
  };
8591
- const propsForInboxTable = useInboxTableConfig({
8592
- ...{
8593
- parentRoute,
8594
- onPageSizeChange,
8595
- formState,
8596
- totalCount: totalRecords,
8597
- table: filteredData,
8598
- dispatch,
8599
- onSortingByData,
8600
- tenantId,
8601
- checkPathName,
8602
- inboxStyles: {
8603
- overflowX: "scroll",
8604
- overflowY: "hidden"
8605
- },
8606
- tableStyle: {
8607
- width: "70%"
8608
- }
8396
+ const propsForInboxTable = useInboxTableConfig(_extends({}, {
8397
+ parentRoute,
8398
+ onPageSizeChange,
8399
+ formState,
8400
+ totalCount: totalRecords,
8401
+ table: filteredData,
8402
+ dispatch,
8403
+ onSortingByData,
8404
+ tenantId,
8405
+ checkPathName,
8406
+ inboxStyles: {
8407
+ overflowX: "scroll",
8408
+ overflowY: "hidden"
8409
+ },
8410
+ tableStyle: {
8411
+ width: "70%"
8609
8412
  }
8610
- });
8413
+ }));
8611
8414
  const onMobileSortOrderData = data => {
8612
- const {
8613
- sortOrder
8614
- } = data;
8415
+ const sortOrder = data.sortOrder;
8615
8416
  dispatch({
8616
8417
  action: "mutateTableForm",
8617
- data: {
8618
- ...formState.tableForm,
8418
+ data: _extends({}, formState.tableForm, {
8619
8419
  sortOrder
8620
- }
8420
+ })
8621
8421
  });
8622
8422
  };
8623
8423
  const onSortFormReset = setSortFormValue => {
@@ -8651,21 +8451,25 @@ const Inbox$1 = _ref => {
8651
8451
  };
8652
8452
 
8653
8453
  const EkycStatus = () => {
8654
- const {
8655
- t
8656
- } = useTranslation();
8657
- const {
8658
- id
8659
- } = useParams();
8454
+ const _useTranslation = useTranslation(),
8455
+ t = _useTranslation.t;
8456
+ const _useParams = useParams(),
8457
+ id = _useParams.id;
8660
8458
  const history = useHistory();
8661
- const [formState, setFormState] = useState({
8662
- searchForm: {
8663
- kNumber: id && id !== ":id" ? id : ""
8664
- },
8665
- filterForm: {}
8666
- });
8667
- const [searchQuery, setSearchQuery] = useState(id && id !== ":id" ? id : "");
8668
- const [errorMsg, setErrorMsg] = useState("");
8459
+ const _useState = useState({
8460
+ searchForm: {
8461
+ kNumber: id && id !== ":id" ? id : ""
8462
+ },
8463
+ filterForm: {}
8464
+ }),
8465
+ formState = _useState[0],
8466
+ setFormState = _useState[1];
8467
+ const _useState2 = useState(id && id !== ":id" ? id : ""),
8468
+ searchQuery = _useState2[0],
8469
+ setSearchQuery = _useState2[1];
8470
+ const _useState3 = useState(""),
8471
+ errorMsg = _useState3[0],
8472
+ setErrorMsg = _useState3[1];
8669
8473
  const tenantId = Digit.ULBService.getCurrentTenantId();
8670
8474
  useEffect(() => {
8671
8475
  var _formState$searchForm;
@@ -8681,31 +8485,29 @@ const EkycStatus = () => {
8681
8485
  setSearchQuery(targetKNumber);
8682
8486
  }
8683
8487
  }, [id]);
8684
- const {
8685
- data: searchData,
8686
- isLoading: isReviewLoading
8687
- } = Digit.Hooks.ekyc.useEkycSearchReview({
8688
- kno: searchQuery,
8689
- fetchType: "REVIEW"
8690
- }, tenantId, {
8691
- enabled: !!searchQuery,
8692
- retry: false,
8693
- onError: err => {
8694
- setErrorMsg((err === null || err === void 0 ? void 0 : err.message) || t("EKYC_STATUS_NOT_FOUND", "eKYC Application not found."));
8695
- }
8696
- });
8697
- const {
8698
- data: connectionSearchData,
8699
- isLoading: isConnectionLoading
8700
- } = Digit.Hooks.ekyc.useSearchConnection({
8701
- tenantId,
8702
- details: {
8703
- kno: searchQuery
8704
- }
8705
- }, {
8706
- enabled: !!searchQuery,
8707
- retry: false
8708
- });
8488
+ const _Digit$Hooks$ekyc$use = Digit.Hooks.ekyc.useEkycSearchReview({
8489
+ kno: searchQuery,
8490
+ fetchType: "REVIEW"
8491
+ }, tenantId, {
8492
+ enabled: !!searchQuery,
8493
+ retry: false,
8494
+ onError: err => {
8495
+ setErrorMsg((err === null || err === void 0 ? void 0 : err.message) || t("EKYC_STATUS_NOT_FOUND", "eKYC Application not found."));
8496
+ }
8497
+ }),
8498
+ searchData = _Digit$Hooks$ekyc$use.data,
8499
+ isReviewLoading = _Digit$Hooks$ekyc$use.isLoading;
8500
+ const _Digit$Hooks$ekyc$use2 = Digit.Hooks.ekyc.useSearchConnection({
8501
+ tenantId,
8502
+ details: {
8503
+ kno: searchQuery
8504
+ }
8505
+ }, {
8506
+ enabled: !!searchQuery,
8507
+ retry: false
8508
+ }),
8509
+ connectionSearchData = _Digit$Hooks$ekyc$use2.data,
8510
+ isConnectionLoading = _Digit$Hooks$ekyc$use2.isLoading;
8709
8511
  const isLoading = isReviewLoading || isConnectionLoading;
8710
8512
  const onSearchFormSubmit = data => {
8711
8513
  var _data$kNumber;
@@ -8720,7 +8522,7 @@ const EkycStatus = () => {
8720
8522
  filterForm: {}
8721
8523
  });
8722
8524
  setSearchQuery(val);
8723
- history.push(`/digit-ui/citizen/ekyc/${val}`);
8525
+ history.push("/digit-ui/citizen/ekyc/" + val);
8724
8526
  };
8725
8527
  const searchFormDefaultValues = {
8726
8528
  kNumber: ""
@@ -8738,11 +8540,9 @@ const EkycStatus = () => {
8738
8540
  history.push("/digit-ui/citizen/ekyc/:id");
8739
8541
  };
8740
8542
  const SearchFormFields = useCallback(_ref => {
8741
- let {
8742
- registerRef,
8743
- searchFormState,
8744
- controlSearchForm
8745
- } = _ref;
8543
+ let registerRef = _ref.registerRef,
8544
+ searchFormState = _ref.searchFormState,
8545
+ controlSearchForm = _ref.controlSearchForm;
8746
8546
  return /*#__PURE__*/React.createElement(SearchFormFieldsComponents, {
8747
8547
  registerRef,
8748
8548
  searchFormState,
@@ -8827,7 +8627,7 @@ const EkycStatus = () => {
8827
8627
  }
8828
8628
  }
8829
8629
  const getStatusText = status => {
8830
- const key = `EKYC_STATUS_${status}`;
8630
+ const key = "EKYC_STATUS_" + status;
8831
8631
  const val = t(key);
8832
8632
  if (val === key) {
8833
8633
  if (status === "APPROVED") return "Approved";
@@ -8872,7 +8672,7 @@ const EkycStatus = () => {
8872
8672
  }, t("EKYC_CURRENT_STATUS", "Current Status")), /*#__PURE__*/React.createElement("div", {
8873
8673
  className: "ekyc-status-value-text"
8874
8674
  }, getStatusText(details.status))), /*#__PURE__*/React.createElement("span", {
8875
- className: `ekyc-status-badge ${details.status.toLowerCase()}`
8675
+ className: "ekyc-status-badge " + details.status.toLowerCase()
8876
8676
  }, details.status)), /*#__PURE__*/React.createElement("div", {
8877
8677
  className: "ekyc-status-details-section"
8878
8678
  }, /*#__PURE__*/React.createElement("h3", {
@@ -8898,23 +8698,17 @@ const EkycStatus = () => {
8898
8698
  }
8899
8699
  }, /*#__PURE__*/React.createElement(SubmitBar, {
8900
8700
  label: t("EKYC_VIEW_APPLICATION", "View Application"),
8901
- onSubmit: () => history.push(`/digit-ui/citizen/ekyc/status/${details.kno}`)
8701
+ onSubmit: () => history.push("/digit-ui/citizen/ekyc/status/" + details.kno)
8902
8702
  })))))));
8903
8703
  };
8904
8704
 
8905
8705
  const CitizenApp = () => {
8906
- const {
8907
- t
8908
- } = useTranslation();
8706
+ const _useTranslation = useTranslation(),
8707
+ t = _useTranslation.t;
8909
8708
  const location = useLocation();
8910
- const {
8911
- path
8912
- } = useRouteMatch();
8913
- const {
8914
- data: {
8915
- stateInfo
8916
- } = {}
8917
- } = Digit.Hooks.useStore.getInitData();
8709
+ const _useRouteMatch = useRouteMatch(),
8710
+ path = _useRouteMatch.path;
8711
+ const _Digit$Hooks$useStore = Digit.Hooks.useStore.getInitData();
8918
8712
  sessionStorage.removeItem("revalidateddone");
8919
8713
  const getDynamicBreadcrumbs = () => {
8920
8714
  const pathname = location.pathname;
@@ -8923,7 +8717,7 @@ const CitizenApp = () => {
8923
8717
  path: "/digit-ui/citizen"
8924
8718
  }, {
8925
8719
  label: t("EKYC_MODULE_NAME"),
8926
- path: `/digit-ui/citizen/ekyc`
8720
+ path: "/digit-ui/citizen/ekyc"
8927
8721
  }];
8928
8722
  if (pathname.includes("/create-kyc")) {
8929
8723
  crumbs.push({
@@ -8948,7 +8742,7 @@ const CitizenApp = () => {
8948
8742
  } else if (pathname.includes("/review")) {
8949
8743
  crumbs.push({
8950
8744
  label: t("EKYC_INBOX"),
8951
- path: `/digit-ui/citizen/ekyc/inbox`
8745
+ path: "/digit-ui/citizen/ekyc/inbox"
8952
8746
  });
8953
8747
  crumbs.push({
8954
8748
  label: t("EKYC_REVIEW")
@@ -8956,7 +8750,7 @@ const CitizenApp = () => {
8956
8750
  } else if (pathname.includes("/assign/surveyor-details")) {
8957
8751
  crumbs.push({
8958
8752
  label: t("EKYC_ASSIGN"),
8959
- path: `/digit-ui/citizen/ekyc/assign`
8753
+ path: "/digit-ui/citizen/ekyc/assign"
8960
8754
  });
8961
8755
  crumbs.push({
8962
8756
  label: t("EKYC_SURVEYOR_DETAILS")
@@ -9006,73 +8800,68 @@ const CitizenApp = () => {
9006
8800
  breadcrumbs: getDynamicBreadcrumbs()
9007
8801
  }), /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
9008
8802
  exact: true,
9009
- path: `${path}`
8803
+ path: "" + path
9010
8804
  }, /*#__PURE__*/React.createElement(Redirect, {
9011
8805
  to: "/digit-ui/citizen/ekyc-home"
9012
8806
  })), /*#__PURE__*/React.createElement(PrivateRoute, {
9013
- path: [`${path}/vendor-dashboard/:vendorId`, `${path}/vendor-dashboard`],
8807
+ path: [path + "/vendor-dashboard/:vendorId", path + "/vendor-dashboard"],
9014
8808
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9015
8809
  layoutClass: "normal"
9016
8810
  }, /*#__PURE__*/React.createElement(VendorDetailsCard, null))
9017
8811
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9018
- path: `${path}/inbox`,
8812
+ path: path + "/inbox",
9019
8813
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9020
8814
  layoutClass: "normal"
9021
8815
  }, /*#__PURE__*/React.createElement(Inbox$1, null))
9022
8816
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9023
- path: `${path}/aadhaar-verification`,
8817
+ path: path + "/aadhaar-verification",
9024
8818
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9025
8819
  layoutClass: "normal"
9026
8820
  }, /*#__PURE__*/React.createElement(AadhaarVerification, null))
9027
8821
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9028
- path: `${path}/property-info`,
8822
+ path: path + "/property-info",
9029
8823
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9030
8824
  layoutClass: "normal"
9031
8825
  }, /*#__PURE__*/React.createElement(PropertyInfo, null))
9032
8826
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9033
- path: `${path}/meter-details`,
8827
+ path: path + "/meter-details",
9034
8828
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9035
8829
  layoutClass: "normal"
9036
8830
  }, /*#__PURE__*/React.createElement(MeterDetails, null))
9037
8831
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9038
- path: `${path}/review`,
8832
+ path: path + "/review",
9039
8833
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9040
8834
  layoutClass: "action"
9041
8835
  }, /*#__PURE__*/React.createElement(Review, null))
9042
8836
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9043
- path: `${path}/assign`,
8837
+ path: path + "/assign",
9044
8838
  exact: true,
9045
8839
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9046
8840
  layoutClass: "normal"
9047
8841
  }, /*#__PURE__*/React.createElement(AssignEkyc, null))
9048
8842
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9049
- path: `${path}/assign/surveyor-details/:id`,
8843
+ path: path + "/assign/surveyor-details/:id",
9050
8844
  exact: true,
9051
8845
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9052
8846
  layoutClass: "action"
9053
8847
  }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9054
8848
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9055
- path: `${path}/surveyor-dashboard/:id`,
8849
+ path: path + "/surveyor-dashboard/:id",
9056
8850
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9057
- layoutClass: "normal"
9058
- }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9059
- }), /*#__PURE__*/React.createElement(PrivateRoute, {
9060
- path: `${path}/surveyor-dashboard`,
9061
- component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9062
- layoutClass: "normal"
8851
+ layoutClass: "action"
9063
8852
  }, /*#__PURE__*/React.createElement(SurveyorDetailsDashboard, null))
9064
8853
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9065
- path: `${path}/status/:applicationId`,
8854
+ path: path + "/status/:applicationId",
9066
8855
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9067
8856
  layoutClass: "normal"
9068
8857
  }, /*#__PURE__*/React.createElement(Review, null))
9069
8858
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9070
- path: [`${path}/supervisor-dashboard/:id`, `${path}/supervisor-dashboard`],
8859
+ path: [path + "/supervisor-dashboard/:id", path + "/supervisor-dashboard"],
9071
8860
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9072
8861
  layoutClass: "normal"
9073
8862
  }, /*#__PURE__*/React.createElement(SupervisorDetailsCard, null))
9074
8863
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
9075
- path: `${path}/:id`,
8864
+ path: path + "/:id",
9076
8865
  component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
9077
8866
  layoutClass: "normal"
9078
8867
  }, /*#__PURE__*/React.createElement(EkycStatus, null))
@@ -9080,27 +8869,23 @@ const CitizenApp = () => {
9080
8869
  };
9081
8870
 
9082
8871
  const EkycModule = _ref => {
9083
- let {
9084
- stateCode,
9085
- userType,
9086
- tenants
9087
- } = _ref;
9088
- const {
9089
- path,
9090
- url
9091
- } = useRouteMatch();
8872
+ let stateCode = _ref.stateCode,
8873
+ userType = _ref.userType,
8874
+ tenants = _ref.tenants;
8875
+ const _useRouteMatch = useRouteMatch(),
8876
+ path = _useRouteMatch.path,
8877
+ url = _useRouteMatch.url;
9092
8878
  const moduleCode = "EKYC";
9093
8879
  const language = Digit.StoreData.getCurrentLanguage();
9094
- const {
9095
- isLoading
9096
- } = Digit.Services.useStore({
9097
- stateCode,
9098
- moduleCode,
9099
- language
9100
- });
8880
+ const _Digit$Services$useSt = Digit.Services.useStore({
8881
+ stateCode,
8882
+ moduleCode,
8883
+ language
8884
+ }),
8885
+ isLoading = _Digit$Services$useSt.isLoading;
9101
8886
  Digit.SessionStorage.set("EKYC_TENANTS", tenants);
9102
8887
  useEffect(() => Digit.LocalizationService.getLocale({
9103
- modules: [`rainmaker-${Digit.ULBService.getCurrentTenantId()}`],
8888
+ modules: ["rainmaker-" + Digit.ULBService.getCurrentTenantId()],
9104
8889
  locale: Digit.StoreData.getCurrentLanguage(),
9105
8890
  tenantId: Digit.ULBService.getCurrentTenantId()
9106
8891
  }), []);
@@ -9120,9 +8905,8 @@ const EkycModule = _ref => {
9120
8905
  };
9121
8906
  const EkycLinks = _ref2 => {
9122
8907
  var _Digit$SessionStorage, _Digit$SessionStorage2;
9123
- const {
9124
- t
9125
- } = useTranslation();
8908
+ const _useTranslation = useTranslation(),
8909
+ t = _useTranslation.t;
9126
8910
  const propsForModuleCard = {
9127
8911
  links: []
9128
8912
  };
@@ -9131,40 +8915,40 @@ const EkycLinks = _ref2 => {
9131
8915
  if (roles.includes("EKYC_SURVEYOR")) {
9132
8916
  propsForModuleCard.links.push({
9133
8917
  label: t("SURVEYOR_DASHBOARD"),
9134
- link: `/digit-ui/citizen/ekyc/surveyor-dashboard`
8918
+ link: "/digit-ui/citizen/ekyc/surveyor-dashboard"
9135
8919
  });
9136
8920
  }
9137
8921
  if (roles.includes("EKYC_SUPERVISOR") || roles.includes("EKYC_VENDOR")) {
9138
8922
  propsForModuleCard.links.push({
9139
8923
  label: t("EKYC_INBOX"),
9140
- link: `/digit-ui/citizen/ekyc/inbox`
8924
+ link: "/digit-ui/citizen/ekyc/inbox"
9141
8925
  });
9142
8926
  }
9143
8927
  if (roles.includes("EKYC_SUPERVISOR")) {
9144
8928
  propsForModuleCard.links.push({
9145
8929
  label: t("EKYC_SUPERVISOR_DASHBOARD"),
9146
- link: `/digit-ui/citizen/ekyc/supervisor-dashboard`
8930
+ link: "/digit-ui/citizen/ekyc/supervisor-dashboard"
9147
8931
  }, {
9148
8932
  label: t("EKYC_ASSIGN"),
9149
- link: `/digit-ui/citizen/ekyc/assign`
8933
+ link: "/digit-ui/citizen/ekyc/assign"
9150
8934
  });
9151
8935
  }
9152
8936
  if (roles.includes("EKYC_VENDOR")) {
9153
8937
  propsForModuleCard.links.push({
9154
8938
  label: t("EKYC_VENDOR_DASHBOARD"),
9155
- link: `/digit-ui/citizen/ekyc/vendor-dashboard`
8939
+ link: "/digit-ui/citizen/ekyc/vendor-dashboard"
9156
8940
  });
9157
8941
  }
9158
8942
  if (roles.includes("EKYC_SUPERVISOR") || roles.includes("EKYC_VENDOR")) {
9159
8943
  propsForModuleCard.links.push({
9160
8944
  label: t("TITLE_VENDOR_MANAGEMENT"),
9161
- link: `/digit-ui/citizen/vendor/search-vendor`
8945
+ link: "/digit-ui/citizen/vendor/search-vendor"
9162
8946
  });
9163
8947
  }
9164
8948
  if (roles.length === 1 && roles.includes("CITIZEN")) {
9165
8949
  propsForModuleCard.links.push({
9166
8950
  label: t("EKYC_STATUS"),
9167
- link: `/digit-ui/citizen/ekyc/:id`
8951
+ link: "/digit-ui/citizen/ekyc/:id"
9168
8952
  });
9169
8953
  }
9170
8954
  const formattedLinks = propsForModuleCard.links.map(l => ({
@@ -9194,7 +8978,8 @@ const componentsToRegister = {
9194
8978
  };
9195
8979
  const initEkycComponents = () => {
9196
8980
  Object.entries(componentsToRegister).forEach(_ref3 => {
9197
- let [key, value] = _ref3;
8981
+ let key = _ref3[0],
8982
+ value = _ref3[1];
9198
8983
  Digit.ComponentRegistryService.setComponent(key, value);
9199
8984
  });
9200
8985
  };