@egovernments/digit-ui-libraries 1.4.0 → 1.5.0-beta.1

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.
@@ -4,11 +4,13 @@ import { useQuery, useQueryClient, useMutation, useQueries } from 'react-query';
4
4
  import Axios from 'axios';
5
5
  import { initReactI18next, useTranslation } from 'react-i18next';
6
6
  import ReactPostprocessor from 'i18next-react-postprocessor';
7
- import { format, toDate, addMonths, startOfYear, endOfYear } from 'date-fns';
7
+ import { format, toDate, addMonths, startOfYear, endOfYear, subYears, endOfToday } from 'date-fns';
8
8
  import html2canvas from 'html2canvas';
9
- import jsPDF from 'jspdf';
9
+ import 'jspdf';
10
10
  import XLSX from 'xlsx';
11
+ import domtoimage from 'dom-to-image';
11
12
  import 'date-fns/esm';
13
+ import { Link } from 'react-router-dom';
12
14
 
13
15
  function _extends() {
14
16
  _extends = Object.assign || function (target) {
@@ -217,7 +219,6 @@ var actionHandler = function actionHandler(action, id, fieldList) {
217
219
  var index = getIndex(id, fieldList);
218
220
 
219
221
  if (!action) {
220
- console.error("no action found");
221
222
  return;
222
223
  }
223
224
 
@@ -307,6 +308,7 @@ var Urls = {
307
308
  Authenticate: "/user/oauth/token",
308
309
  RegisterUser: "/user/citizen/_create",
309
310
  ChangePassword: "/user/password/nologin/_update",
311
+ ChangePassword1: "/user/password/_update",
310
312
  UserProfileUpdate: "/user/profile/_update",
311
313
  EmployeeSearch: "/egov-hrms/employees/_search",
312
314
  InboxSearch: "/inbox/v1/_search",
@@ -344,7 +346,9 @@ var Urls = {
344
346
  update: "/property-services/property/_update",
345
347
  pt_calculation_estimate: "/pt-calculator-v2/propertytax/v2/_estimate",
346
348
  assessment_create: "/property-services/assessment/_create",
347
- assessment_search: "/property-services/assessment/_search"
349
+ assessment_search: "/property-services/assessment/_search",
350
+ payment_search: "/collection-services/payments/PT/_search",
351
+ pt_calculate_mutation: "/pt-calculator-v2/propertytax/mutation/_calculate"
348
352
  },
349
353
  dss: {
350
354
  dashboardConfig: "/dashboard-analytics/dashboard/getDashboardConfig",
@@ -359,6 +363,7 @@ var Urls = {
359
363
  update: "/echallan-services/eChallan/v1/_update",
360
364
  download_pdf: "/egov-pdf/download/UC/mcollect-challan",
361
365
  receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt",
366
+ bill_download: "/egov-pdf/download/bills/consolidatedbill",
362
367
  count: "/echallan-services/eChallan/v1/_count"
363
368
  },
364
369
  hrms: {
@@ -402,9 +407,14 @@ var Urls = {
402
407
  search: "/egov-user-event/v1/events/_search",
403
408
  update: "/egov-user-event/v1/events/lat/_update",
404
409
  updateEvent: "/egov-user-event/v1/events/_update",
410
+ updateEventCDG: "/egov-user-event/v1/events/lat/_update",
405
411
  count: "/egov-user-event/v1/events/notifications/_count",
406
412
  create: "/egov-user-event/v1/events/_create"
407
413
  },
414
+ ws: {
415
+ water_search: "/ws-services/wc/_search",
416
+ sewarage_search: "/sw-services/swc/_search"
417
+ },
408
418
  engagement: {
409
419
  document: {
410
420
  search: "/egov-document-uploader/egov-du/document/_search",
@@ -521,20 +531,26 @@ Axios.interceptors.response.use(function (res) {
521
531
  });
522
532
 
523
533
  var requestInfo = function requestInfo() {
534
+ var _Digit$UserService$ge;
535
+
524
536
  return {
525
- authToken: Digit.UserService.getUser().access_token
537
+ authToken: ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.access_token) || null
526
538
  };
527
539
  };
528
540
 
529
541
  var authHeaders = function authHeaders() {
542
+ var _Digit$UserService$ge2;
543
+
530
544
  return {
531
- "auth-token": Digit.UserService.getUser().access_token
545
+ "auth-token": ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token) || null
532
546
  };
533
547
  };
534
548
 
535
549
  var userServiceData = function userServiceData() {
550
+ var _Digit$UserService$ge3;
551
+
536
552
  return {
537
- userInfo: Digit.UserService.getUser().info
553
+ userInfo: (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.info
538
554
  };
539
555
  };
540
556
 
@@ -621,10 +637,6 @@ var Request = function Request(_ref) {
621
637
  apiId: "Rainmaker"
622
638
  };
623
639
 
624
- if (noRequestInfo) {
625
- delete data.RequestInfo;
626
- }
627
-
628
640
  if (auth) {
629
641
  data.RequestInfo = _extends({}, data.RequestInfo, requestInfo());
630
642
  }
@@ -638,11 +650,15 @@ var Request = function Request(_ref) {
638
650
  msgId: ts + "|" + Digit.StoreData.getCurrentLanguage()
639
651
  });
640
652
  }
653
+
654
+ if (noRequestInfo) {
655
+ delete data.RequestInfo;
656
+ }
641
657
  }
642
658
 
643
659
  var headers1 = {
644
660
  "Content-Type": "application/json",
645
- Accept: (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "*/*" : "application/pdf"
661
+ Accept: (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "application/pdf,application/json" : "application/pdf"
646
662
  };
647
663
  if (authHeader) headers = _extends({}, headers, authHeaders());
648
664
  if (userDownload) headers = _extends({}, headers, headers1);
@@ -668,6 +684,8 @@ var Request = function Request(_ref) {
668
684
 
669
685
  var _temp4 = function () {
670
686
  if (multipartFormData) {
687
+ var _Digit$UserService$ge4;
688
+
671
689
  return Promise.resolve(Axios({
672
690
  method: method,
673
691
  url: _url,
@@ -675,7 +693,7 @@ var Request = function Request(_ref) {
675
693
  params: params,
676
694
  headers: {
677
695
  "Content-Type": "multipart/form-data",
678
- "auth-token": Digit.UserService.getUser().access_token
696
+ "auth-token": ((_Digit$UserService$ge4 = Digit.UserService.getUser()) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.access_token) || null
679
697
  }
680
698
  })).then(function (multipartFormDataRes) {
681
699
  _exit2 = true;
@@ -1563,6 +1581,20 @@ var getRentalDetailsCategoryCriteria = function getRentalDetailsCategoryCriteria
1563
1581
  };
1564
1582
  };
1565
1583
 
1584
+ var getChargeSlabsCategoryCriteria = function getChargeSlabsCategoryCriteria(tenantId, moduleCode) {
1585
+ return {
1586
+ details: {
1587
+ tenantId: tenantId,
1588
+ moduleDetails: [{
1589
+ moduleName: moduleCode,
1590
+ masterDetails: [{
1591
+ name: "ChargeSlabs"
1592
+ }]
1593
+ }]
1594
+ }
1595
+ };
1596
+ };
1597
+
1566
1598
  var getGenderTypeList = function getGenderTypeList(tenantId, moduleCode, type) {
1567
1599
  return {
1568
1600
  type: type,
@@ -1762,6 +1794,54 @@ var getTradeTypeRoleCriteria = function getTradeTypeRoleCriteria(tenantId, modul
1762
1794
  };
1763
1795
  };
1764
1796
 
1797
+ var getFSTPORejectionReasonCriteria = function getFSTPORejectionReasonCriteria(tenantId, moduleCode, type) {
1798
+ return {
1799
+ type: type,
1800
+ details: {
1801
+ tenantId: tenantId,
1802
+ moduleDetails: [{
1803
+ moduleName: moduleCode,
1804
+ masterDetails: [{
1805
+ name: "FSTPORejectionReason",
1806
+ filter: null
1807
+ }]
1808
+ }]
1809
+ }
1810
+ };
1811
+ };
1812
+
1813
+ var getFSMPaymentTypeCriteria = function getFSMPaymentTypeCriteria(tenantId, moduleCode, type) {
1814
+ return {
1815
+ type: type,
1816
+ details: {
1817
+ tenantId: tenantId,
1818
+ moduleDetails: [{
1819
+ moduleName: moduleCode,
1820
+ masterDetails: [{
1821
+ name: "PaymentType",
1822
+ filter: null
1823
+ }]
1824
+ }]
1825
+ }
1826
+ };
1827
+ };
1828
+
1829
+ var getFSMTripNumberCriteria = function getFSMTripNumberCriteria(tenantId, moduleCode, type) {
1830
+ return {
1831
+ type: type,
1832
+ details: {
1833
+ tenantId: tenantId,
1834
+ moduleDetails: [{
1835
+ moduleName: moduleCode,
1836
+ masterDetails: [{
1837
+ name: "TripNumber",
1838
+ filter: null
1839
+ }]
1840
+ }]
1841
+ }
1842
+ };
1843
+ };
1844
+
1765
1845
  var GetEgovLocations = function GetEgovLocations(MdmsRes) {
1766
1846
  return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map(function (obj) {
1767
1847
  return {
@@ -2004,6 +2084,14 @@ var getRentalDetailsCategory = function getRentalDetailsCategory(MdmsRes) {
2004
2084
  });
2005
2085
  };
2006
2086
 
2087
+ var getChargeSlabsCategory = function getChargeSlabsCategory(MdmsRes) {
2088
+ MdmsRes["PropertyTax"].ChargeSlabs.filter(function (category) {
2089
+ return category.active;
2090
+ }).map(function (ChargeSlabsInfo) {
2091
+ return _extends({}, ChargeSlabsInfo);
2092
+ });
2093
+ };
2094
+
2007
2095
  var getGenderType = function getGenderType(MdmsRes) {
2008
2096
  return MdmsRes["common-masters"].GenderType.filter(function (GenderType) {
2009
2097
  return GenderType.active;
@@ -2060,7 +2148,45 @@ var GetMCollectApplicationStatus = function GetMCollectApplicationStatus(MdmsRes
2060
2148
  });
2061
2149
  };
2062
2150
 
2063
- var getDssDashboard = function getDssDashboard() {
2151
+ var getFSMGenderType = function getFSMGenderType(MdmsRes) {
2152
+ return MdmsRes["common-masters"].GenderType.map(function (genderDetails) {
2153
+ return _extends({}, genderDetails, {
2154
+ i18nKey: "COMMON_GENDER_" + genderDetails.code
2155
+ });
2156
+ });
2157
+ };
2158
+
2159
+ var GetFSTPORejectionReason = function GetFSTPORejectionReason(MdmsRes) {
2160
+ return MdmsRes["Vehicle"].FSTPORejectionReason.filter(function (reason) {
2161
+ return reason.active;
2162
+ }).map(function (reasonDetails) {
2163
+ return _extends({}, reasonDetails, {
2164
+ i18nKey: "ES_ACTION_REASON_" + reasonDetails.code
2165
+ });
2166
+ });
2167
+ };
2168
+
2169
+ var GetPaymentType = function GetPaymentType(MdmsRes) {
2170
+ return MdmsRes["FSM"].PaymentType.filter(function (option) {
2171
+ return option.active;
2172
+ }).map(function (reasonDetails) {
2173
+ return _extends({}, reasonDetails, {
2174
+ i18nKey: "ES_ACTION_" + reasonDetails.code
2175
+ });
2176
+ });
2177
+ };
2178
+
2179
+ var GetTripNumber = function GetTripNumber(MdmsRes) {
2180
+ return MdmsRes["FSM"].TripNumber.filter(function (option) {
2181
+ return option.active;
2182
+ }).map(function (reasonDetails) {
2183
+ return _extends({}, reasonDetails, {
2184
+ i18nKey: "ES_ACTION_TRIP_" + reasonDetails.code
2185
+ });
2186
+ });
2187
+ };
2188
+
2189
+ var getDssDashboard = function getDssDashboard(MdmsRes) {
2064
2190
  return MdmsRes["dss-dashboard"]["dashboard-config"];
2065
2191
  };
2066
2192
 
@@ -2181,8 +2307,11 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2181
2307
  case "RentalDeatils":
2182
2308
  return getRentalDetailsCategory(MdmsRes);
2183
2309
 
2310
+ case "ChargeSlabs":
2311
+ return getChargeSlabsCategory(MdmsRes);
2312
+
2184
2313
  case "DssDashboard":
2185
- return getDssDashboard();
2314
+ return getDssDashboard(MdmsRes);
2186
2315
 
2187
2316
  case "BusinessService":
2188
2317
  return GetMCollectBusinessService(MdmsRes);
@@ -2211,6 +2340,18 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2211
2340
  case "CheckList":
2212
2341
  return GetChecklist(MdmsRes);
2213
2342
 
2343
+ case "FSMGenderType":
2344
+ return getFSMGenderType(MdmsRes);
2345
+
2346
+ case "FSTPORejectionReason":
2347
+ return GetFSTPORejectionReason(MdmsRes);
2348
+
2349
+ case "PaymentType":
2350
+ return GetPaymentType(MdmsRes);
2351
+
2352
+ case "TripNumber":
2353
+ return GetTripNumber(MdmsRes);
2354
+
2214
2355
  default:
2215
2356
  return MdmsRes;
2216
2357
  }
@@ -2440,6 +2581,9 @@ var MdmsService = {
2440
2581
  getRentalDetails: function getRentalDetails(tenantId, moduleCode) {
2441
2582
  return MdmsService.getDataByCriteria(tenantId, getRentalDetailsCategoryCriteria(tenantId, moduleCode), moduleCode);
2442
2583
  },
2584
+ getChargeSlabs: function getChargeSlabs(tenantId, moduleCode) {
2585
+ return MdmsService.getDataByCriteria(tenantId, getChargeSlabsCategoryCriteria(tenantId, moduleCode), moduleCode);
2586
+ },
2443
2587
  getDssDashboard: function getDssDashboard(tenantId, moduleCode) {
2444
2588
  return MdmsService.getDataByCriteria(tenantId, getDssDashboardCriteria(tenantId, moduleCode), moduleCode);
2445
2589
  },
@@ -2499,6 +2643,18 @@ var MdmsService = {
2499
2643
  },
2500
2644
  getTradeTypeRoleTypes: function getTradeTypeRoleTypes(tenantId, moduleCode, type) {
2501
2645
  return MdmsService.getDataByCriteria(tenantId, getTradeTypeRoleCriteria(tenantId, moduleCode, type), moduleCode);
2646
+ },
2647
+ getFSMGenderType: function getFSMGenderType(tenantId, moduleCode, type) {
2648
+ return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode);
2649
+ },
2650
+ getFSTPORejectionReason: function getFSTPORejectionReason(tenantId, moduleCode, type) {
2651
+ return MdmsService.getDataByCriteria(tenantId, getFSTPORejectionReasonCriteria(tenantId, moduleCode, type), moduleCode);
2652
+ },
2653
+ getFSMPaymentType: function getFSMPaymentType(tenantId, moduleCode, type) {
2654
+ return MdmsService.getDataByCriteria(tenantId, getFSMPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode);
2655
+ },
2656
+ getFSMTripNumber: function getFSMTripNumber(tenantId, moduleCode, type) {
2657
+ return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode);
2502
2658
  }
2503
2659
  };
2504
2660
 
@@ -2574,7 +2730,7 @@ var StoreService = {
2574
2730
  digitInitData: function (stateCode, enabledModules) {
2575
2731
  try {
2576
2732
  return Promise.resolve(MdmsService.init(stateCode)).then(function (_ref) {
2577
- var _MdmsRes$tenant, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
2733
+ var _MdmsRes$tenant, _MdmsRes$tenant$citym, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
2578
2734
 
2579
2735
  var MdmsRes = _ref.MdmsRes;
2580
2736
  var stateInfo = MdmsRes["common-masters"].StateInfo[0];
@@ -2594,10 +2750,12 @@ var StoreService = {
2594
2750
  bannerUrl: stateInfo.bannerUrl
2595
2751
  },
2596
2752
  localizationModules: stateInfo.localizationModules,
2597
- modules: MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant = MdmsRes.tenant) === null || _MdmsRes$tenant === void 0 ? void 0 : _MdmsRes$tenant.citymodule.filter(function (module) {
2598
- return module.active;
2753
+ modules: MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant = MdmsRes.tenant) === null || _MdmsRes$tenant === void 0 ? void 0 : (_MdmsRes$tenant$citym = _MdmsRes$tenant.citymodule.filter(function (module) {
2754
+ return module === null || module === void 0 ? void 0 : module.active;
2599
2755
  }).filter(function (module) {
2600
- return enabledModules.includes(module.code);
2756
+ return enabledModules === null || enabledModules === void 0 ? void 0 : enabledModules.includes(module === null || module === void 0 ? void 0 : module.code);
2757
+ })) === null || _MdmsRes$tenant$citym === void 0 ? void 0 : _MdmsRes$tenant$citym.sort(function (x, y) {
2758
+ return (x === null || x === void 0 ? void 0 : x.order) - (y === null || y === void 0 ? void 0 : y.order);
2601
2759
  })
2602
2760
  };
2603
2761
  initData.selectedLanguage = Digit.SessionStorage.get("locale") || initData.languages[0].value;
@@ -2609,11 +2767,7 @@ var StoreService = {
2609
2767
  return item.code === ele.code;
2610
2768
  }) ? unique : [].concat(unique, [ele]);
2611
2769
  }, []);
2612
- initData.tenants = MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant2 = MdmsRes.tenant) === null || _MdmsRes$tenant2 === void 0 ? void 0 : _MdmsRes$tenant2.tenants.filter(function (item) {
2613
- return !!moduleTenants.find(function (mt) {
2614
- return mt.code === item.code;
2615
- });
2616
- }).map(function (tenant) {
2770
+ initData.tenants = MdmsRes === null || MdmsRes === void 0 ? void 0 : (_MdmsRes$tenant2 = MdmsRes.tenant) === null || _MdmsRes$tenant2 === void 0 ? void 0 : _MdmsRes$tenant2.tenants.map(function (tenant) {
2617
2771
  return _extends({
2618
2772
  i18nKey: "TENANT_TENANTS_" + tenant.code.replace(".", "_").toUpperCase()
2619
2773
  }, tenant);
@@ -2751,7 +2905,7 @@ var initI18n = function initI18n(callback) {
2751
2905
  var UploadServices = {
2752
2906
  Filestorage: function (module, filedata, tenantId) {
2753
2907
  try {
2754
- var _window, _window$globalConfigs;
2908
+ var _window, _window$globalConfigs, _Digit$UserService$ge;
2755
2909
 
2756
2910
  var formData = new FormData();
2757
2911
  formData.append("file", filedata, filedata.name);
@@ -2761,7 +2915,10 @@ var UploadServices = {
2761
2915
  var config = {
2762
2916
  method: "post",
2763
2917
  url: "" + Urls.FileStore + tenantInfo,
2764
- data: formData
2918
+ data: formData,
2919
+ headers: {
2920
+ "auth-token": Digit.UserService.getUser() ? (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.access_token : null
2921
+ }
2765
2922
  };
2766
2923
  return Promise.resolve(Axios(config));
2767
2924
  } catch (e) {
@@ -2770,6 +2927,8 @@ var UploadServices = {
2770
2927
  },
2771
2928
  MultipleFilesStorage: function (module, filesData, tenantId) {
2772
2929
  try {
2930
+ var _window2, _window2$globalConfig;
2931
+
2773
2932
  var formData = new FormData();
2774
2933
  var filesArray = Array.from(filesData);
2775
2934
  filesArray === null || filesArray === void 0 ? void 0 : filesArray.forEach(function (fileData, index) {
@@ -2777,12 +2936,14 @@ var UploadServices = {
2777
2936
  });
2778
2937
  formData.append("tenantId", tenantId);
2779
2938
  formData.append("module", module);
2939
+ var tenantInfo = (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
2780
2940
  var config = {
2781
2941
  method: "post",
2782
- url: Urls.FileStore,
2942
+ url: "" + Urls.FileStore + tenantInfo,
2783
2943
  data: formData,
2784
2944
  headers: {
2785
- 'Content-Type': 'multipart/form-data'
2945
+ 'Content-Type': 'multipart/form-data',
2946
+ "auth-token": Digit.UserService.getUser().access_token
2786
2947
  }
2787
2948
  };
2788
2949
  return Promise.resolve(Axios(config));
@@ -2792,9 +2953,12 @@ var UploadServices = {
2792
2953
  },
2793
2954
  Filefetch: function (filesArray, tenantId) {
2794
2955
  try {
2956
+ var _window3, _window3$globalConfig;
2957
+
2958
+ var tenantInfo = (_window3 = window) !== null && _window3 !== void 0 && (_window3$globalConfig = _window3.globalConfigs) !== null && _window3$globalConfig !== void 0 && _window3$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
2795
2959
  var config = {
2796
2960
  method: "get",
2797
- url: Urls.FileFetch,
2961
+ url: "" + Urls.FileFetch + tenantInfo,
2798
2962
  params: {
2799
2963
  tenantId: tenantId,
2800
2964
  fileStoreIds: filesArray === null || filesArray === void 0 ? void 0 : filesArray.join(",")
@@ -3129,7 +3293,7 @@ var FSMService = {
3129
3293
  });
3130
3294
  },
3131
3295
  vehicleUpdate: function vehicleUpdate(details) {
3132
- Request({
3296
+ return Request({
3133
3297
  url: Urls.fsm.vehilceUpdate,
3134
3298
  data: details,
3135
3299
  useCache: false,
@@ -3316,7 +3480,7 @@ var ConvertTimestampToDate = function ConvertTimestampToDate(timestamp, dateForm
3316
3480
  return timestamp ? format(toDate(timestamp), dateFormat) : null;
3317
3481
  };
3318
3482
  var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
3319
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
3483
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
3320
3484
  return "NA";
3321
3485
  }
3322
3486
 
@@ -3328,11 +3492,26 @@ var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
3328
3492
  day = (day > 9 ? "" : "0") + day;
3329
3493
  return day + "/" + month + "/" + year;
3330
3494
  };
3495
+ var ConvertEpochToTimeInHours = function ConvertEpochToTimeInHours(dateEpoch) {
3496
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
3497
+ return "NA";
3498
+ }
3499
+
3500
+ var dateFromApi = new Date(dateEpoch);
3501
+ var hour = dateFromApi.getHours();
3502
+ var min = dateFromApi.getMinutes();
3503
+ var period = hour > 12 ? "PM" : "AM";
3504
+ hour = hour > 12 ? hour - 12 : hour;
3505
+ hour = (hour > 9 ? "" : "0") + hour;
3506
+ min = (min > 9 ? "" : "0") + min;
3507
+ return hour + ":" + min + " " + period;
3508
+ };
3331
3509
 
3332
3510
  var dateUtils = {
3333
3511
  __proto__: null,
3334
3512
  ConvertTimestampToDate: ConvertTimestampToDate,
3335
- ConvertEpochToDate: ConvertEpochToDate
3513
+ ConvertEpochToDate: ConvertEpochToDate,
3514
+ ConvertEpochToTimeInHours: ConvertEpochToTimeInHours
3336
3515
  };
3337
3516
 
3338
3517
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -33908,6 +34087,22 @@ var reactDom = createCommonjsModule(function (module) {
33908
34087
  }
33909
34088
  });
33910
34089
 
34090
+ var changeClasses = function changeClasses(class1, class2) {
34091
+ var elements = document.getElementsByClassName(class1);
34092
+ Array.prototype.map.call(elements, function (testElement) {
34093
+ testElement.classList.add(class2);
34094
+ testElement.classList.remove(class1);
34095
+ });
34096
+ };
34097
+
34098
+ var revertCss = function revertCss() {
34099
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34100
+ };
34101
+
34102
+ var applyCss = function applyCss() {
34103
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34104
+ };
34105
+
33911
34106
  var Download = {
33912
34107
  Image: function Image(node, fileName, share, resolve) {
33913
34108
  if (resolve === void 0) {
@@ -33950,36 +34145,105 @@ var Download = {
33950
34145
  wb.Sheets[filename] = ws;
33951
34146
  XLSX.writeFile(wb, filename + ".xlsx");
33952
34147
  },
33953
- PDF: function PDF(node, fileName, share) {
33954
- var getPDF = function getPDF(canvas) {
33955
- var width = canvas.width;
33956
- var height = canvas.height;
33957
- var o = width > height ? "l" : "p";
33958
- var format = "a4";
33959
- return new jsPDF(o, "mm", format);
34148
+ PDF: function PDF(node, fileName, share, resolve) {
34149
+ if (resolve === void 0) {
34150
+ resolve = null;
34151
+ }
34152
+
34153
+ var saveAs = function saveAs(uri, filename) {
34154
+ var link = document.createElement("a");
34155
+
34156
+ if (typeof link.download === "string") {
34157
+ link.href = uri;
34158
+ link.download = filename;
34159
+ document.body.appendChild(link);
34160
+ link.click();
34161
+ document.body.removeChild(link);
34162
+ } else {
34163
+ window.open(uri);
34164
+ }
33960
34165
  };
33961
34166
 
34167
+ var dataURItoBlob = function dataURItoBlob(dataURI) {
34168
+ var binary = atob(dataURI.split(',')[1]);
34169
+ var array = [];
34170
+
34171
+ for (var i = 0; i < binary.length; i++) {
34172
+ array.push(binary.charCodeAt(i));
34173
+ }
34174
+
34175
+ return new Blob([new Uint8Array(array)], {
34176
+ type: 'image/jpeg'
34177
+ });
34178
+ };
34179
+
34180
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34181
+ applyCss();
33962
34182
  var element = reactDom.findDOMNode(node.current);
33963
- return html2canvas(element, {
33964
- scrollY: -window.scrollY,
33965
- scrollX: 0,
33966
- useCORS: true,
33967
- scale: 1.5,
33968
- windowWidth: document.documentElement.offsetWidth,
33969
- windowHeight: document.documentElement.offsetHeight
33970
- }).then(function (canvas) {
33971
- var pdf = getPDF(canvas);
33972
- var jpegImage = canvas.toDataURL("image/jpeg");
33973
- var imgProps = pdf.getImageProperties(jpegImage);
33974
- var pageHeight = 295;
33975
- var pdfWidth = imgProps.width * pageHeight / imgProps.height;
33976
- var pdfHeight = imgProps.height * pdfWidth / imgProps.width;
33977
- var x = (pdf.internal.pageSize.width - pdfWidth) / 2;
33978
- var position = 5;
33979
- pdf.addImage(jpegImage, "JPEG", x, position, pdfWidth, pdfHeight, "a", "FAST");
33980
- return share ? new File([pdf.output("blob")], fileName + ".pdf", {
33981
- type: "application/pdf"
33982
- }) : pdf.save(fileName + ".pdf");
34183
+ return domtoimage.toJpeg(element, {
34184
+ quality: 1,
34185
+ bgcolor: 'white',
34186
+ filter: function filter(node) {
34187
+ var _node$className, _node$className$inclu;
34188
+
34189
+ return !(node !== null && node !== void 0 && (_node$className = node.className) !== null && _node$className !== void 0 && (_node$className$inclu = _node$className.includes) !== null && _node$className$inclu !== void 0 && _node$className$inclu.call(_node$className, "divToBeHidden"));
34190
+ },
34191
+ style: {
34192
+ margin: '25px'
34193
+ }
34194
+ }).then(function (dataUrl) {
34195
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34196
+ revertCss();
34197
+ var blobData = dataURItoBlob(dataUrl);
34198
+ revertCss();
34199
+ return share ? resolve(new File([blobData], fileName + ".jpeg", {
34200
+ type: "image/jpeg"
34201
+ })) : saveAs(dataUrl, fileName + ".jpeg");
34202
+ });
34203
+ },
34204
+ IndividualChartImage: function IndividualChartImage(node, fileName, share, resolve) {
34205
+ if (resolve === void 0) {
34206
+ resolve = null;
34207
+ }
34208
+
34209
+ var saveAs = function saveAs(uri, filename) {
34210
+ var link = document.createElement("a");
34211
+
34212
+ if (typeof link.download === "string") {
34213
+ link.href = uri;
34214
+ link.download = filename;
34215
+ document.body.appendChild(link);
34216
+ link.click();
34217
+ document.body.removeChild(link);
34218
+ } else {
34219
+ window.open(uri);
34220
+ }
34221
+ };
34222
+
34223
+ var dataURItoBlob = function dataURItoBlob(dataURI) {
34224
+ var binary = atob(dataURI.split(',')[1]);
34225
+ var array = [];
34226
+
34227
+ for (var i = 0; i < binary.length; i++) {
34228
+ array.push(binary.charCodeAt(i));
34229
+ }
34230
+
34231
+ return new Blob([new Uint8Array(array)], {
34232
+ type: 'image/jpeg'
34233
+ });
34234
+ };
34235
+
34236
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34237
+ var element = reactDom.findDOMNode(node.current);
34238
+ return domtoimage.toJpeg(element, {
34239
+ quality: 1,
34240
+ bgcolor: 'white'
34241
+ }).then(function (dataUrl) {
34242
+ var blobData = dataURItoBlob(dataUrl);
34243
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34244
+ return share ? resolve(new File([blobData], fileName + ".jpeg", {
34245
+ type: "image/jpeg"
34246
+ })) : saveAs(dataUrl, fileName + ".jpeg");
33983
34247
  });
33984
34248
  }
33985
34249
  };
@@ -34300,6 +34564,19 @@ function _catch(body, recover) {
34300
34564
 
34301
34565
  return result;
34302
34566
  }
34567
+ function _finallyRethrows(body, finalizer) {
34568
+ try {
34569
+ var result = body();
34570
+ } catch (e) {
34571
+ return finalizer(true, e);
34572
+ }
34573
+
34574
+ if (result && result.then) {
34575
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
34576
+ }
34577
+
34578
+ return finalizer(false, result);
34579
+ }
34303
34580
 
34304
34581
  function listCacheClear() {
34305
34582
  this.__data__ = [];
@@ -35326,8 +35603,8 @@ function initCloneArray(array) {
35326
35603
 
35327
35604
  var _initCloneArray = initCloneArray;
35328
35605
 
35329
- var Uint8Array = _root.Uint8Array;
35330
- var _Uint8Array = Uint8Array;
35606
+ var Uint8Array$1 = _root.Uint8Array;
35607
+ var _Uint8Array = Uint8Array$1;
35331
35608
 
35332
35609
  function cloneArrayBuffer(arrayBuffer) {
35333
35610
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
@@ -35615,6 +35892,7 @@ var cloneDeep_1 = cloneDeep;
35615
35892
 
35616
35893
  var getThumbnails = function getThumbnails(ids, tenantId) {
35617
35894
  try {
35895
+ tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : tenantId;
35618
35896
  return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
35619
35897
  if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
35620
35898
  return {
@@ -35719,7 +35997,8 @@ var WorkflowService = {
35719
35997
  var tenantId = _ref.tenantId,
35720
35998
  id = _ref.id,
35721
35999
  moduleCode = _ref.moduleCode,
35722
- role = _ref.role;
36000
+ role = _ref.role,
36001
+ getTripData = _ref.getTripData;
35723
36002
 
35724
36003
  try {
35725
36004
  return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, id)).then(function (workflow) {
@@ -35733,13 +36012,13 @@ var WorkflowService = {
35733
36012
 
35734
36013
  var _exit = false;
35735
36014
 
35736
- function _temp8(_result2) {
36015
+ function _temp14(_result2) {
35737
36016
  return _exit ? _result2 : {};
35738
36017
  }
35739
36018
 
35740
36019
  var businessServiceResponse = _Digit$WorkflowServic === null || _Digit$WorkflowServic === void 0 ? void 0 : (_Digit$WorkflowServic2 = _Digit$WorkflowServic.BusinessServices[0]) === null || _Digit$WorkflowServic2 === void 0 ? void 0 : _Digit$WorkflowServic2.states;
35741
36020
 
35742
- var _temp7 = function () {
36021
+ var _temp13 = function () {
35743
36022
  if (workflow && workflow.ProcessInstances) {
35744
36023
  var _processInstances$, _businessServiceRespo;
35745
36024
 
@@ -35767,7 +36046,7 @@ var WorkflowService = {
35767
36046
  });
35768
36047
 
35769
36048
  if (currentState && currentState !== null && currentState !== void 0 && currentState.isStateUpdatable) {
35770
- if (moduleCode === "FSM" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
36049
+ if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
35771
36050
  action: "EDIT",
35772
36051
  state: currentState
35773
36052
  });
@@ -35820,7 +36099,36 @@ var WorkflowService = {
35820
36099
  return function () {
35821
36100
  if (processInstances.length > 0) {
35822
36101
  return Promise.resolve(makeCommentsSubsidariesOfPreviousActions(processInstances)).then(function (TLEnrichedWithWorflowData) {
35823
- var _workflow$ProcessInst, _workflow$ProcessInst2;
36102
+ function _temp12() {
36103
+ var _workflow$ProcessInst, _workflow$ProcessInst2;
36104
+
36105
+ var nextActions = actionRolePair;
36106
+
36107
+ if (role !== "CITIZEN" && moduleCode === "PGR") {
36108
+ var _timeline;
36109
+
36110
+ var onlyPendingForAssignmentStatusArray = (_timeline = timeline) === null || _timeline === void 0 ? void 0 : _timeline.filter(function (e) {
36111
+ return (e === null || e === void 0 ? void 0 : e.status) === "PENDINGFORASSIGNMENT";
36112
+ });
36113
+ var duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1);
36114
+ timeline.push(_extends({}, duplicateCheckpointOfPendingForAssignment, {
36115
+ status: "COMPLAINT_FILED"
36116
+ }));
36117
+ }
36118
+
36119
+ if (timeline[timeline.length - 1].status !== "CREATED" && (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE")) timeline.push({
36120
+ status: "CREATED"
36121
+ });
36122
+ var details = {
36123
+ timeline: timeline,
36124
+ nextActions: nextActions,
36125
+ actionState: actionState,
36126
+ applicationBusinessService: workflow === null || workflow === void 0 ? void 0 : (_workflow$ProcessInst = workflow.ProcessInstances) === null || _workflow$ProcessInst === void 0 ? void 0 : (_workflow$ProcessInst2 = _workflow$ProcessInst[0]) === null || _workflow$ProcessInst2 === void 0 ? void 0 : _workflow$ProcessInst2.businessService,
36127
+ processInstances: applicationProcessInstance
36128
+ };
36129
+ _exit = true;
36130
+ return details;
36131
+ }
35824
36132
 
35825
36133
  var timeline = TLEnrichedWithWorflowData.map(function (instance, ind) {
35826
36134
  var _instance$thumbnailsT, _instance$thumbnailsT2;
@@ -35858,40 +36166,148 @@ var WorkflowService = {
35858
36166
  };
35859
36167
  return checkPoint;
35860
36168
  });
35861
- var nextActions = actionRolePair;
35862
36169
 
35863
- if (role !== "CITIZEN" && moduleCode === "PGR") {
35864
- var onlyPendingForAssignmentStatusArray = timeline === null || timeline === void 0 ? void 0 : timeline.filter(function (e) {
35865
- return (e === null || e === void 0 ? void 0 : e.status) === "PENDINGFORASSIGNMENT";
35866
- });
35867
- var duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1);
35868
- timeline.push(_extends({}, duplicateCheckpointOfPendingForAssignment, {
35869
- status: "COMPLAINT_FILED"
35870
- }));
35871
- }
36170
+ var _temp11 = function () {
36171
+ if (getTripData) {
36172
+ var _temp15 = _catch(function () {
36173
+ var filters = {
36174
+ businessService: 'FSM_VEHICLE_TRIP',
36175
+ refernceNos: id
36176
+ };
36177
+ return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
36178
+ var _temp9 = function () {
36179
+ if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) {
36180
+ var _temp16 = function _temp16() {
36181
+ var tripTimeline = [];
36182
+ var disposalInProgressPosition = timeline.findIndex(function (data) {
36183
+ return data.status === "DISPOSAL_IN_PROGRESS";
36184
+ });
36185
+
36186
+ if (disposalInProgressPosition !== -1) {
36187
+ var _timeline2;
36188
+
36189
+ timeline[disposalInProgressPosition].numberOfTrips = _numberOfTrips;
36190
+
36191
+ (_timeline2 = timeline).splice.apply(_timeline2, [disposalInProgressPosition + 1, 0].concat(_waitingForDisposedAction));
36192
+
36193
+ tripTimeline = _disposedAction;
36194
+ } else {
36195
+ tripTimeline = _disposedAction.concat(_waitingForDisposedAction);
36196
+ }
36197
+
36198
+ var feedbackPosition = timeline.findIndex(function (data) {
36199
+ return data.status === "CITIZEN_FEEDBACK_PENDING";
36200
+ });
36201
+
36202
+ if (feedbackPosition !== -1) {
36203
+ var _timeline3;
36204
+
36205
+ (_timeline3 = timeline).splice.apply(_timeline3, [feedbackPosition + 1, 0].concat(tripTimeline));
36206
+ } else {
36207
+ timeline = tripTimeline.concat(timeline);
36208
+ }
36209
+ };
36210
+
36211
+ var _numberOfTrips = tripSearchResp.vehicleTrip.length;
36212
+ var cretaedTime = 0;
36213
+ var lastModifiedTime = 0;
36214
+ var waitingForDisposedCount = 0;
36215
+ var disposedCount = 0;
36216
+ var _waitingForDisposedAction = [];
36217
+ var _disposedAction = [];
36218
+
36219
+ var _temp17 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36220
+ return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo)).then(function (resp) {
36221
+ var _resp$ProcessInstance;
36222
+
36223
+ resp === null || resp === void 0 ? void 0 : (_resp$ProcessInstance = resp.ProcessInstances) === null || _resp$ProcessInstance === void 0 ? void 0 : _resp$ProcessInstance.map(function (instance, ind) {
36224
+ if (instance.state.applicationStatus === "WAITING_FOR_DISPOSAL") {
36225
+ var _instance$thumbnailsT3, _instance$thumbnailsT4;
36226
+
36227
+ waitingForDisposedCount++;
36228
+ cretaedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime);
36229
+ lastModifiedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime);
36230
+ _waitingForDisposedAction = [{
36231
+ performedAction: instance.action,
36232
+ status: instance.state.applicationStatus,
36233
+ state: instance.state.state,
36234
+ assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36235
+ rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36236
+ thumbnailsToShow: {
36237
+ thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT3 = instance.thumbnailsToShow) === null || _instance$thumbnailsT3 === void 0 ? void 0 : _instance$thumbnailsT3.thumbs,
36238
+ fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT4 = instance.thumbnailsToShow) === null || _instance$thumbnailsT4 === void 0 ? void 0 : _instance$thumbnailsT4.images
36239
+ },
36240
+ assignes: instance.assignes,
36241
+ caption: instance.assignes ? instance.assignes.map(function (assignee) {
36242
+ return {
36243
+ name: assignee.name,
36244
+ mobileNumber: assignee.mobileNumber
36245
+ };
36246
+ }) : null,
36247
+ auditDetails: {
36248
+ created: cretaedTime,
36249
+ lastModified: lastModifiedTime
36250
+ },
36251
+ numberOfTrips: _numberOfTrips
36252
+ }];
36253
+ }
36254
+
36255
+ if (instance.state.applicationStatus === "DISPOSED") {
36256
+ var _instance$thumbnailsT5, _instance$thumbnailsT6;
36257
+
36258
+ disposedCount++;
36259
+ cretaedTime = instance.auditDetails.createdTime > cretaedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime) : cretaedTime;
36260
+ lastModifiedTime = instance.auditDetails.lastModifiedTime > lastModifiedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime) : lastModifiedTime;
36261
+ _disposedAction = [{
36262
+ performedAction: instance.action,
36263
+ status: instance.state.applicationStatus,
36264
+ state: instance.state.state,
36265
+ assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36266
+ rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36267
+ thumbnailsToShow: {
36268
+ thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT5 = instance.thumbnailsToShow) === null || _instance$thumbnailsT5 === void 0 ? void 0 : _instance$thumbnailsT5.thumbs,
36269
+ fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT6 = instance.thumbnailsToShow) === null || _instance$thumbnailsT6 === void 0 ? void 0 : _instance$thumbnailsT6.images
36270
+ },
36271
+ assignes: instance.assignes,
36272
+ caption: instance.assignes ? instance.assignes.map(function (assignee) {
36273
+ return {
36274
+ name: assignee.name,
36275
+ mobileNumber: assignee.mobileNumber
36276
+ };
36277
+ }) : null,
36278
+ auditDetails: {
36279
+ created: cretaedTime,
36280
+ lastModified: lastModifiedTime
36281
+ },
36282
+ numberOfTrips: disposedCount
36283
+ }];
36284
+ }
36285
+ });
36286
+ });
36287
+ });
36288
+
36289
+ return _temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17);
36290
+ }
36291
+ }();
36292
+
36293
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
36294
+ });
36295
+ }, function () {});
36296
+
36297
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
36298
+ }
36299
+ }();
35872
36300
 
35873
- if (timeline[timeline.length - 1].status !== "CREATED" && moduleCode === "FSM") timeline.push({
35874
- status: "CREATED"
35875
- });
35876
- var details = {
35877
- timeline: timeline,
35878
- nextActions: nextActions,
35879
- actionState: actionState,
35880
- applicationBusinessService: workflow === null || workflow === void 0 ? void 0 : (_workflow$ProcessInst = workflow.ProcessInstances) === null || _workflow$ProcessInst === void 0 ? void 0 : (_workflow$ProcessInst2 = _workflow$ProcessInst[0]) === null || _workflow$ProcessInst2 === void 0 ? void 0 : _workflow$ProcessInst2.businessService,
35881
- processInstances: applicationProcessInstance
35882
- };
35883
- _exit = true;
35884
- return details;
36301
+ return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
35885
36302
  });
35886
36303
  }
35887
36304
  }();
35888
36305
  } else {
35889
- console.warn("error fetching workflow services");
35890
36306
  throw new Error("error fetching workflow services");
35891
36307
  }
35892
36308
  }();
35893
36309
 
35894
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
36310
+ return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
35895
36311
  });
35896
36312
  });
35897
36313
  } catch (e) {
@@ -35988,6 +36404,7 @@ var Complaint = {
35988
36404
  documentUid: "",
35989
36405
  additionalDetails: {}
35990
36406
  }] : null;
36407
+ if (!uploadedDocument) complaintDetails.workflow.verificationDocuments = [];
35991
36408
  return Promise.resolve(Digit.PGRService.update(complaintDetails, tenantId));
35992
36409
  } catch (e) {
35993
36410
  return Promise.reject(e);
@@ -36047,19 +36464,22 @@ var UserService = {
36047
36464
  try {
36048
36465
  var userType = UserService.getType();
36049
36466
 
36050
- var _temp2 = _catch(function () {
36051
- return Promise.resolve(UserService.logoutUser()).then(function () {
36052
- window.localStorage.clear();
36053
- window.sessionStorage.clear();
36467
+ var _temp2 = _finallyRethrows(function () {
36468
+ return _catch(function () {
36469
+ return Promise.resolve(UserService.logoutUser()).then(function () {});
36470
+ }, function () {});
36471
+ }, function (_wasThrown, _result) {
36472
+ window.localStorage.clear();
36473
+ window.sessionStorage.clear();
36054
36474
 
36055
- if (userType === "citizen") {
36056
- window.location.replace("/digit-ui/citizen");
36057
- } else {
36058
- window.location.replace("/digit-ui/employee/user/language-selection");
36059
- }
36060
- });
36061
- }, function (e) {
36062
- console.error(e);
36475
+ if (userType === "citizen") {
36476
+ window.location.replace("/digit-ui/citizen");
36477
+ } else {
36478
+ window.location.replace("/digit-ui/employee/user/language-selection");
36479
+ }
36480
+
36481
+ if (_wasThrown) throw _result;
36482
+ return _result;
36063
36483
  });
36064
36484
 
36065
36485
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -36132,8 +36552,9 @@ var UserService = {
36132
36552
  changePassword: function changePassword(details, stateCode) {
36133
36553
  return ServiceRequest({
36134
36554
  serviceName: "changePassword",
36135
- url: Urls.ChangePassword,
36555
+ url: Urls.ChangePassword1,
36136
36556
  data: _extends({}, details),
36557
+ auth: true,
36137
36558
  params: {
36138
36559
  tenantId: stateCode
36139
36560
  }
@@ -36188,13 +36609,15 @@ var PTService = {
36188
36609
  },
36189
36610
  fetchPaymentDetails: function fetchPaymentDetails(_ref2) {
36190
36611
  var tenantId = _ref2.tenantId,
36191
- consumerCodes = _ref2.consumerCodes;
36612
+ consumerCodes = _ref2.consumerCodes,
36613
+ _ref2$auth = _ref2.auth,
36614
+ auth = _ref2$auth === void 0 ? true : _ref2$auth;
36192
36615
  return Request({
36193
36616
  url: Urls.pt.fetch_payment_details,
36194
36617
  useCache: false,
36195
36618
  method: "POST",
36196
- auth: true,
36197
- userService: true,
36619
+ auth: auth === false ? auth : true,
36620
+ userService: auth === false ? auth : true,
36198
36621
  params: {
36199
36622
  tenantId: tenantId,
36200
36623
  consumerCode: consumerCodes,
@@ -36265,6 +36688,53 @@ var PTService = {
36265
36688
  tenantId: tenantId
36266
36689
  }, filters)
36267
36690
  });
36691
+ },
36692
+ paymentsearch: function paymentsearch(_ref4) {
36693
+ var tenantId = _ref4.tenantId,
36694
+ filters = _ref4.filters,
36695
+ auth = _ref4.auth;
36696
+ return Request({
36697
+ url: Urls.pt.payment_search,
36698
+ useCache: false,
36699
+ method: "POST",
36700
+ auth: auth === false ? auth : true,
36701
+ userService: auth === false ? auth : true,
36702
+ params: _extends({
36703
+ tenantId: tenantId
36704
+ }, filters)
36705
+ });
36706
+ },
36707
+ ptCalculateMutation: function ptCalculateMutation(details, tenantId) {
36708
+ return Request({
36709
+ url: Urls.pt.pt_calculate_mutation,
36710
+ data: details,
36711
+ useCache: false,
36712
+ userService: true,
36713
+ method: "POST",
36714
+ params: {
36715
+ tenantId: tenantId
36716
+ },
36717
+ auth: true
36718
+ });
36719
+ }
36720
+ };
36721
+
36722
+ var WSService = {
36723
+ search: function search(_ref) {
36724
+ var tenantId = _ref.tenantId,
36725
+ filters = _ref.filters,
36726
+ businessService = _ref.businessService;
36727
+ return Request({
36728
+ url: businessService === "WS" ? Urls.ws.water_search : Urls.ws.sewarage_search,
36729
+ useCache: false,
36730
+ method: "POST",
36731
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true,
36732
+ userService: filters !== null && filters !== void 0 && filters.locality ? false : true,
36733
+ setTimeParam: false,
36734
+ params: _extends({
36735
+ tenantId: tenantId
36736
+ }, filters)
36737
+ });
36268
36738
  }
36269
36739
  };
36270
36740
 
@@ -36591,8 +37061,10 @@ var Events = {
36591
37061
  });
36592
37062
  },
36593
37063
  Update: function Update(data) {
37064
+ var _window, _window$globalConfigs;
37065
+
36594
37066
  return Request({
36595
- url: Urls.events.updateEvent,
37067
+ url: (_window = window) !== null && _window !== void 0 && (_window$globalConfigs = _window.globalConfigs) !== null && _window$globalConfigs !== void 0 && _window$globalConfigs.getConfig("ENABLE_SINGLEINSTANCE") ? Urls.events.updateEventCDG : Urls.events.updateEvent,
36596
37068
  useCache: false,
36597
37069
  method: "POST",
36598
37070
  auth: true,
@@ -36664,7 +37136,7 @@ var ShareFiles = {
36664
37136
  try {
36665
37137
  return Promise.resolve(UploadServices.Filestorage("DSS", data, tenantId)).then(function (fileUploadId) {
36666
37138
  return Promise.resolve(UploadServices.Filefetch([fileUploadId.data.files[0].fileStoreId], fileUploadId.data.files[0].tenantId)).then(function (fileUrl) {
36667
- return UrlShortener(fileUrl.data[fileUploadId.data.files[0].fileStoreId].split(",")[0]);
37139
+ return UrlShortener(Digit.Utils.getFileUrl(fileUrl.data[fileUploadId.data.files[0].fileStoreId]));
36668
37140
  });
36669
37141
  });
36670
37142
  } catch (e) {
@@ -36700,6 +37172,38 @@ var ShareFiles = {
36700
37172
  } catch (e) {
36701
37173
  return Promise.reject(e);
36702
37174
  }
37175
+ },
37176
+ IndividualChartImage: function (tenantId, node, filename, target) {
37177
+ try {
37178
+ return Promise.resolve(new Promise(function (resolve) {
37179
+ return Download.IndividualChartImage(node, filename, true, resolve);
37180
+ })).then(function (imageData) {
37181
+ return !target && navigator.share ? navigator.share({
37182
+ files: [imageData],
37183
+ title: filename
37184
+ }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37185
+ ShareFiles.targetLink(target, shortUrl);
37186
+ });
37187
+ });
37188
+ } catch (e) {
37189
+ return Promise.reject(e);
37190
+ }
37191
+ },
37192
+ DownloadImage: function (tenantId, node, filename, target) {
37193
+ try {
37194
+ return Promise.resolve(new Promise(function (resolve) {
37195
+ return Download.PDF(node, filename, true, resolve);
37196
+ })).then(function (imageData) {
37197
+ return !target && navigator.share ? navigator.share({
37198
+ files: [imageData],
37199
+ title: filename
37200
+ }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37201
+ ShareFiles.targetLink(target, shortUrl);
37202
+ });
37203
+ });
37204
+ } catch (e) {
37205
+ return Promise.reject(e);
37206
+ }
36703
37207
  }
36704
37208
  };
36705
37209
 
@@ -36770,7 +37274,7 @@ var GetServiceDefinitions = {
36770
37274
 
36771
37275
  var ULBService = {
36772
37276
  getCurrentTenantId: function getCurrentTenantId() {
36773
- var _user$info, _user$info2, _user$info3;
37277
+ var _user$info, _user$info2, _user$info3, _window;
36774
37278
 
36775
37279
  var user = UserService.getUser();
36776
37280
 
@@ -36784,13 +37288,13 @@ var ULBService = {
36784
37288
  }
36785
37289
  }
36786
37290
 
36787
- var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.type) === "EMPLOYEE" && user !== null && user !== void 0 && (_user$info2 = user.info) !== null && _user$info2 !== void 0 && _user$info2.tenantId ? user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.tenantId : globalConfigs.getConfig("STATE_LEVEL_TENANT_ID");
37291
+ var tenantId = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.type) === "EMPLOYEE" && user !== null && user !== void 0 && (_user$info2 = user.info) !== null && _user$info2 !== void 0 && _user$info2.tenantId ? user === null || user === void 0 ? void 0 : (_user$info3 = user.info) === null || _user$info3 === void 0 ? void 0 : _user$info3.tenantId : (_window = window) === null || _window === void 0 ? void 0 : _window.globalConfigs.getConfig("STATE_LEVEL_TENANT_ID");
36788
37292
  return tenantId;
36789
37293
  },
36790
37294
  getStateId: function getStateId() {
36791
- var _window, _window$globalConfigs;
37295
+ var _window2, _window2$globalConfig;
36792
37296
 
36793
- return (_window = window) === null || _window === void 0 ? void 0 : (_window$globalConfigs = _window.globalConfigs) === null || _window$globalConfigs === void 0 ? void 0 : _window$globalConfigs.getConfig("STATE_LEVEL_TENANT_ID");
37297
+ return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$globalConfig = _window2.globalConfigs) === null || _window2$globalConfig === void 0 ? void 0 : _window2$globalConfig.getConfig("STATE_LEVEL_TENANT_ID");
36794
37298
  },
36795
37299
  getCurrentUlb: function getCurrentUlb() {
36796
37300
  var initData = StoreService.getInitData();
@@ -36798,6 +37302,98 @@ var ULBService = {
36798
37302
  return initData.tenants.find(function (tenant) {
36799
37303
  return tenant.code === tenantId;
36800
37304
  });
37305
+ },
37306
+ getCitizenCurrentTenant: function getCitizenCurrentTenant(selectedCity) {
37307
+ var _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2;
37308
+
37309
+ if (selectedCity === void 0) {
37310
+ selectedCity = false;
37311
+ }
37312
+
37313
+ var homeCity = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
37314
+
37315
+ if (selectedCity) {
37316
+ return homeCity;
37317
+ }
37318
+
37319
+ return homeCity || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
37320
+ },
37321
+ getUserUlbs: function getUserUlbs(userRole) {
37322
+ if (userRole === void 0) {
37323
+ userRole = "";
37324
+ }
37325
+
37326
+ var stringReplaceAll = function stringReplaceAll(str, searcher, replaceWith) {
37327
+ if (str === void 0) {
37328
+ str = "";
37329
+ }
37330
+
37331
+ if (searcher === void 0) {
37332
+ searcher = "";
37333
+ }
37334
+
37335
+ if (replaceWith === void 0) {
37336
+ replaceWith = "";
37337
+ }
37338
+
37339
+ if (searcher == "") return str;
37340
+
37341
+ while ((_str = str) !== null && _str !== void 0 && _str.includes(searcher)) {
37342
+ var _str, _str2;
37343
+
37344
+ str = (_str2 = str) === null || _str2 === void 0 ? void 0 : _str2.replace(searcher, replaceWith);
37345
+ }
37346
+
37347
+ return str;
37348
+ };
37349
+
37350
+ var userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject");
37351
+ var teantsArray = [],
37352
+ filteredArray = [];
37353
+
37354
+ if (userRole === "") {
37355
+ var _userloggedValues$inf, _userloggedValues$inf2;
37356
+
37357
+ userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf = userloggedValues.info) === null || _userloggedValues$inf === void 0 ? void 0 : (_userloggedValues$inf2 = _userloggedValues$inf.roles) === null || _userloggedValues$inf2 === void 0 ? void 0 : _userloggedValues$inf2.forEach(function (role) {
37358
+ return teantsArray.push(role.tenantId);
37359
+ });
37360
+ var unique = teantsArray.filter(function (item, i, ar) {
37361
+ return ar.indexOf(item) === i;
37362
+ });
37363
+ unique === null || unique === void 0 ? void 0 : unique.forEach(function (uniCode) {
37364
+ var _stringReplaceAll;
37365
+
37366
+ filteredArray.push({
37367
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll === void 0 ? void 0 : _stringReplaceAll.toUpperCase()),
37368
+ value: uniCode,
37369
+ code: uniCode,
37370
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37371
+ });
37372
+ });
37373
+ return filteredArray;
37374
+ } else {
37375
+ var _userloggedValues$inf3, _userloggedValues$inf4;
37376
+
37377
+ userloggedValues === null || userloggedValues === void 0 ? void 0 : (_userloggedValues$inf3 = userloggedValues.info) === null || _userloggedValues$inf3 === void 0 ? void 0 : (_userloggedValues$inf4 = _userloggedValues$inf3.roles) === null || _userloggedValues$inf4 === void 0 ? void 0 : _userloggedValues$inf4.forEach(function (role) {
37378
+ if (userRole === role.code) teantsArray.push(role.tenantId);
37379
+ });
37380
+
37381
+ var _unique = teantsArray.filter(function (item, i, ar) {
37382
+ return ar.indexOf(item) === i;
37383
+ });
37384
+
37385
+ _unique === null || _unique === void 0 ? void 0 : _unique.forEach(function (uniCode) {
37386
+ var _stringReplaceAll2;
37387
+
37388
+ filteredArray.push({
37389
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll2 = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll2 === void 0 ? void 0 : _stringReplaceAll2.toUpperCase()),
37390
+ value: uniCode,
37391
+ code: uniCode,
37392
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37393
+ });
37394
+ });
37395
+ return filteredArray;
37396
+ }
36801
37397
  }
36802
37398
  };
36803
37399
 
@@ -36883,7 +37479,9 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
36883
37479
  _ref$role = _ref.role,
36884
37480
  role = _ref$role === void 0 ? "CITIZEN" : _ref$role,
36885
37481
  getStaleData = _ref.getStaleData,
36886
- config = _ref.config;
37482
+ config = _ref.config,
37483
+ _ref$getTripData = _ref.getTripData,
37484
+ getTripData = _ref$getTripData === void 0 ? false : _ref$getTripData;
36887
37485
  var queryClient = useQueryClient();
36888
37486
  var staleDataConfig = {
36889
37487
  staleTime: Infinity
@@ -36894,7 +37492,8 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
36894
37492
  tenantId: tenantId,
36895
37493
  id: id,
36896
37494
  moduleCode: moduleCode,
36897
- role: role
37495
+ role: role,
37496
+ getTripData: getTripData
36898
37497
  });
36899
37498
  }, getStaleData ? _extends({}, staleDataConfig, config) : config),
36900
37499
  isLoading = _useQuery.isLoading,
@@ -36936,9 +37535,7 @@ var useSessionStorage = function useSessionStorage(key, initialValue) {
36936
37535
  var valueToStore = value instanceof Function ? value(storedValue) : value;
36937
37536
  setStoredValue(valueToStore);
36938
37537
  Digit.SessionStorage.set(key, valueToStore);
36939
- } catch (err) {
36940
- console.error(err);
36941
- }
37538
+ } catch (err) {}
36942
37539
  };
36943
37540
 
36944
37541
  var clearValue = function clearValue() {
@@ -36959,16 +37556,20 @@ var useQueryParams = function useQueryParams() {
36959
37556
  return params;
36960
37557
  };
36961
37558
 
36962
- var useOnClickOutside = function useOnClickOutside(ref, handler, isActive) {
37559
+ var useOnClickOutside = function useOnClickOutside(ref, handler, isActive, eventParam) {
37560
+ if (eventParam === void 0) {
37561
+ eventParam = false;
37562
+ }
37563
+
36963
37564
  useEffect$1(function () {
36964
37565
  if (isActive) {
36965
- document.addEventListener("click", handleClickOutSide, false);
37566
+ document.addEventListener("click", handleClickOutSide, eventParam);
36966
37567
  } else {
36967
- document.removeEventListener("click", handleClickOutSide, false);
37568
+ document.removeEventListener("click", handleClickOutSide, eventParam);
36968
37569
  }
36969
37570
 
36970
37571
  return function () {
36971
- document.removeEventListener("click", handleClickOutSide, false);
37572
+ document.removeEventListener("click", handleClickOutSide, eventParam);
36972
37573
  };
36973
37574
  }, [isActive]);
36974
37575
 
@@ -37054,7 +37655,6 @@ var useFetchBillsForBuissnessService = function useFetchBillsForBuissnessService
37054
37655
  return Digit.PaymentService.fetchBill(_tenantId, params);
37055
37656
  }, _extends({
37056
37657
  retry: function retry(count, err) {
37057
- console.error(err, "inside the payment hook");
37058
37658
  return false;
37059
37659
  }
37060
37660
  }, config)),
@@ -37083,10 +37683,56 @@ var useFetchPayment = function useFetchPayment(_ref4, config) {
37083
37683
 
37084
37684
  var fetchBill = function fetchBill() {
37085
37685
  try {
37086
- return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37087
- consumerCode: consumerCode,
37088
- businessService: businessService
37089
- }));
37686
+ if (businessService !== null && businessService !== void 0 && businessService.includes("PT")) {
37687
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37688
+ consumerCode: consumerCode,
37689
+ businessService: businessService
37690
+ })).then(function (fetchedBill) {
37691
+ var _fetchedBill$Bill, _fetchedBill$Bill$, _fetchedBill$Bill$$bi, _fetchedBill$Bill$$bi2, _fetchedBill$Bill3, _fetchedBill$Bill3$, _fetchedBill$Bill3$$b;
37692
+
37693
+ var billdetail = (fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill = fetchedBill.Bill) === null || _fetchedBill$Bill === void 0 ? void 0 : (_fetchedBill$Bill$ = _fetchedBill$Bill[0]) === null || _fetchedBill$Bill$ === void 0 ? void 0 : (_fetchedBill$Bill$$bi = _fetchedBill$Bill$.billDetails) === null || _fetchedBill$Bill$$bi === void 0 ? void 0 : (_fetchedBill$Bill$$bi2 = _fetchedBill$Bill$$bi.sort(function (a, b) {
37694
+ return b.fromPeriod - a.fromPeriod;
37695
+ })) === null || _fetchedBill$Bill$$bi2 === void 0 ? void 0 : _fetchedBill$Bill$$bi2[0]) || {};
37696
+ fetchedBill.Bill[0].billDetails = fetchedBill.Bill[0].billDetails.map(function (ele) {
37697
+ var _fetchedBill$Bill2, _fetchedBill$Bill2$;
37698
+
37699
+ return _extends({}, ele, {
37700
+ currentBillNo: fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill2 = fetchedBill.Bill) === null || _fetchedBill$Bill2 === void 0 ? void 0 : (_fetchedBill$Bill2$ = _fetchedBill$Bill2[0]) === null || _fetchedBill$Bill2$ === void 0 ? void 0 : _fetchedBill$Bill2$.billNumber,
37701
+ currentExpiryDate: billdetail === null || billdetail === void 0 ? void 0 : billdetail.expiryDate
37702
+ });
37703
+ });
37704
+
37705
+ if (fetchedBill && (fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill3 = fetchedBill.Bill) === null || _fetchedBill$Bill3 === void 0 ? void 0 : (_fetchedBill$Bill3$ = _fetchedBill$Bill3[0]) === null || _fetchedBill$Bill3$ === void 0 ? void 0 : (_fetchedBill$Bill3$$b = _fetchedBill$Bill3$.billDetails) === null || _fetchedBill$Bill3$$b === void 0 ? void 0 : _fetchedBill$Bill3$$b.length) > 1) {
37706
+ var _fetchedBill$Bill4, _fetchedBill$Bill4$, _fetchedBill$Bill4$$b;
37707
+
37708
+ fetchedBill === null || fetchedBill === void 0 ? void 0 : (_fetchedBill$Bill4 = fetchedBill.Bill) === null || _fetchedBill$Bill4 === void 0 ? void 0 : (_fetchedBill$Bill4$ = _fetchedBill$Bill4[0]) === null || _fetchedBill$Bill4$ === void 0 ? void 0 : (_fetchedBill$Bill4$$b = _fetchedBill$Bill4$.billDetails) === null || _fetchedBill$Bill4$$b === void 0 ? void 0 : _fetchedBill$Bill4$$b.map(function (billdet) {
37709
+ try {
37710
+ return Promise.resolve(Digit.PaymentService.searchBill(tenantId, {
37711
+ consumerCode: consumerCode,
37712
+ fromPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.fromPeriod,
37713
+ toPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.toPeriod,
37714
+ service: businessService,
37715
+ retrieveOldest: true
37716
+ })).then(function (searchBill) {
37717
+ var _searchBill$Bill, _searchBill$Bill$, _searchBill$Bill$$bil, _searchBill$Bill$$bil2, _searchBill$Bill2, _searchBill$Bill2$;
37718
+
37719
+ billdet.expiryDate = searchBill === null || searchBill === void 0 ? void 0 : (_searchBill$Bill = searchBill.Bill) === null || _searchBill$Bill === void 0 ? void 0 : (_searchBill$Bill$ = _searchBill$Bill[0]) === null || _searchBill$Bill$ === void 0 ? void 0 : (_searchBill$Bill$$bil = _searchBill$Bill$.billDetails) === null || _searchBill$Bill$$bil === void 0 ? void 0 : (_searchBill$Bill$$bil2 = _searchBill$Bill$$bil[0]) === null || _searchBill$Bill$$bil2 === void 0 ? void 0 : _searchBill$Bill$$bil2.expiryDate;
37720
+ billdet.billNumber = searchBill === null || searchBill === void 0 ? void 0 : (_searchBill$Bill2 = searchBill.Bill) === null || _searchBill$Bill2 === void 0 ? void 0 : (_searchBill$Bill2$ = _searchBill$Bill2[0]) === null || _searchBill$Bill2$ === void 0 ? void 0 : _searchBill$Bill2$.billNumber;
37721
+ });
37722
+ } catch (e) {
37723
+ return Promise.reject(e);
37724
+ }
37725
+ });
37726
+ }
37727
+
37728
+ return fetchedBill;
37729
+ });
37730
+ } else {
37731
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37732
+ consumerCode: consumerCode,
37733
+ businessService: businessService
37734
+ }));
37735
+ }
37090
37736
  } catch (e) {
37091
37737
  return Promise.reject(e);
37092
37738
  }
@@ -37276,6 +37922,20 @@ var refObj = function refObj(tenantId, filters) {
37276
37922
  key: "consumerCode",
37277
37923
  label: "UC_CHALLAN_NO"
37278
37924
  },
37925
+ ws: {
37926
+ searchFn: function searchFn() {
37927
+ return advtApplications(tenantId, filters);
37928
+ },
37929
+ key: "consumerCode",
37930
+ label: "WS_MYCONNECTIONS_CONSUMER_NO"
37931
+ },
37932
+ sw: {
37933
+ searchFn: function searchFn() {
37934
+ return advtApplications(tenantId, filters);
37935
+ },
37936
+ key: "consumerCode",
37937
+ label: "WS_MYCONNECTIONS_CONSUMER_NO"
37938
+ },
37279
37939
  TL: {
37280
37940
  searchFn: function searchFn() {
37281
37941
  return tlApplications(tenantId, filters);
@@ -37736,12 +38396,11 @@ var defaultRawSearchHandler = function defaultRawSearchHandler(_ref2, searchKey,
37736
38396
  };
37737
38397
 
37738
38398
  var defaultCatchSearch = function defaultCatchSearch(Err) {
37739
- var _Err$response, _Err$response$data, _Err$response$data$Er, _Err$response2;
38399
+ var _Err$response, _Err$response$data, _Err$response$data$Er;
37740
38400
 
37741
38401
  if (Err !== null && Err !== void 0 && (_Err$response = Err.response) !== null && _Err$response !== void 0 && (_Err$response$data = _Err$response.data) !== null && _Err$response$data !== void 0 && (_Err$response$data$Er = _Err$response$data.Errors) !== null && _Err$response$data$Er !== void 0 && _Err$response$data$Er.some(function (e) {
37742
38402
  return e.code === "EG_PT_INVALID_SEARCH" && e.message === " Search is not allowed on empty Criteria, Atleast one criteria should be provided with tenantId for EMPLOYEE";
37743
38403
  })) return [];
37744
- console.error(Err === null || Err === void 0 ? void 0 : (_Err$response2 = Err.response) === null || _Err$response2 === void 0 ? void 0 : _Err$response2.data, " this is error");
37745
38404
  throw Err;
37746
38405
  };
37747
38406
 
@@ -37973,11 +38632,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
37973
38632
  ddr: data.modules.find(function (e) {
37974
38633
  return e.module === module;
37975
38634
  }).tenants.map(function (tenant) {
38635
+ var _tenant$code, _tenant$code$toUpperC, _tenant$code$toUpperC2, _data$tenants$filter, _data$tenants$filter$, _data$tenants$filter$2, _data$tenants$filter$3;
38636
+
37976
38637
  return _extends({}, tenant, {
37977
- ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
37978
- ddrKey: t("DDR_" + data.tenants.filter(function (t) {
38638
+ ulbKey: t("TENANT_TENANTS_" + (tenant === null || tenant === void 0 ? void 0 : (_tenant$code = tenant.code) === null || _tenant$code === void 0 ? void 0 : (_tenant$code$toUpperC = _tenant$code.toUpperCase) === null || _tenant$code$toUpperC === void 0 ? void 0 : (_tenant$code$toUpperC2 = _tenant$code$toUpperC.call(_tenant$code)) === null || _tenant$code$toUpperC2 === void 0 ? void 0 : _tenant$code$toUpperC2.replace(".", "_"))),
38639
+ ddrKey: t("DDR_" + ((_data$tenants$filter = data.tenants.filter(function (t) {
37979
38640
  return t.code === tenant.code;
37980
- })[0].city.districtTenantCode.toUpperCase().replace(".", "_"))
38641
+ })) === null || _data$tenants$filter === void 0 ? void 0 : (_data$tenants$filter$ = _data$tenants$filter[0].city) === null || _data$tenants$filter$ === void 0 ? void 0 : (_data$tenants$filter$2 = _data$tenants$filter$.districtTenantCode) === null || _data$tenants$filter$2 === void 0 ? void 0 : (_data$tenants$filter$3 = _data$tenants$filter$2.toUpperCase) === null || _data$tenants$filter$3 === void 0 ? void 0 : _data$tenants$filter$3.call(_data$tenants$filter$2).replace(".", "_")))
37981
38642
  });
37982
38643
  }).filter(function (item, i, arr) {
37983
38644
  return i === arr.findIndex(function (t) {
@@ -37987,11 +38648,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
37987
38648
  ulb: data.modules.find(function (e) {
37988
38649
  return e.module === module;
37989
38650
  }).tenants.map(function (tenant) {
38651
+ var _tenant$code2, _tenant$code2$toUpper, _tenant$code2$toUpper2, _data$tenants$filter2, _data$tenants$filter3, _data$tenants$filter4, _data$tenants$filter5;
38652
+
37990
38653
  return _extends({}, tenant, {
37991
- ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
37992
- ddrKey: t("DDR_" + data.tenants.filter(function (t) {
38654
+ ulbKey: t("TENANT_TENANTS_" + (tenant === null || tenant === void 0 ? void 0 : (_tenant$code2 = tenant.code) === null || _tenant$code2 === void 0 ? void 0 : (_tenant$code2$toUpper = _tenant$code2.toUpperCase) === null || _tenant$code2$toUpper === void 0 ? void 0 : (_tenant$code2$toUpper2 = _tenant$code2$toUpper.call(_tenant$code2)) === null || _tenant$code2$toUpper2 === void 0 ? void 0 : _tenant$code2$toUpper2.replace(".", "_"))),
38655
+ ddrKey: t("DDR_" + ((_data$tenants$filter2 = data.tenants.filter(function (t) {
37993
38656
  return t.code === tenant.code;
37994
- })[0].city.districtTenantCode.toUpperCase().replace(".", "_"))
38657
+ })) === null || _data$tenants$filter2 === void 0 ? void 0 : (_data$tenants$filter3 = _data$tenants$filter2[0].city) === null || _data$tenants$filter3 === void 0 ? void 0 : (_data$tenants$filter4 = _data$tenants$filter3.districtTenantCode) === null || _data$tenants$filter4 === void 0 ? void 0 : (_data$tenants$filter5 = _data$tenants$filter4.toUpperCase) === null || _data$tenants$filter5 === void 0 ? void 0 : _data$tenants$filter5.call(_data$tenants$filter4).replace(".", "_")))
37995
38658
  });
37996
38659
  })
37997
38660
  };
@@ -38099,7 +38762,10 @@ var fetchImageLinksFromFilestoreIds = function fetchImageLinksFromFilestoreIds(f
38099
38762
  };
38100
38763
 
38101
38764
  var getTransformedLocale = function getTransformedLocale(label) {
38765
+ var _label;
38766
+
38102
38767
  if (typeof label === "number") return label;
38768
+ label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
38103
38769
  return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
38104
38770
  };
38105
38771
 
@@ -38581,7 +39247,6 @@ var fetchComplaintDetails = function fetchComplaintDetails(tenantId, id) {
38581
39247
  }) : null;
38582
39248
  return ids ? Promise.resolve(getThumbnails$1(ids, service.tenantId)).then(_temp2) : _temp2(null);
38583
39249
  } else {
38584
- console.error("error fetching complaint details or service defs");
38585
39250
  return {};
38586
39251
  }
38587
39252
  });
@@ -39042,18 +39707,18 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39042
39707
  var userRoles = userInfo.info.roles.map(function (roleData) {
39043
39708
  return roleData.code;
39044
39709
  });
39045
- var workflowOrder = ["CREATED", "PENDING_APPL_FEE_PAYMENT", "ASSING_DSO", "PENDING_DSO_APPROVAL", "DSO_REJECTED", "DSO_INPROGRESS", "REJECTED", "CANCELED", "COMPLETED", "CITIZEN_FEEDBACK_PENDING"];
39710
+ var workflowOrder = ["CREATED", "PENDING_APPL_FEE_PAYMENT", "ASSING_DSO", "PENDING_DSO_APPROVAL", "DSO_REJECTED", "DSO_INPROGRESS", "REJECTED", "CANCELED", "COMPLETED", "CITIZEN_FEEDBACK_PENDING", "DISPOSAL_IN_PROGRESS"];
39046
39711
  var DSO = Digit.UserService.hasAccess(["FSM_DSO"]);
39047
39712
  var allowedStatusForDSO = ["PENDING_DSO_APPROVAL", "DSO_INPROGRESS", "COMPLETED", "DSO_REJECTED"];
39048
39713
  var tenantId = Digit.ULBService.getCurrentTenantId();
39049
39714
 
39050
39715
  var fetch = function fetch() {
39051
39716
  try {
39052
- return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM")).then(function (WorkflowService) {
39717
+ return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM,FSM_POST_PAY_SERVICE")).then(function (WorkflowService) {
39053
39718
  return workflowOrder.map(function (status) {
39054
- var _WorkflowService$Busi;
39719
+ var _getStates;
39055
39720
 
39056
- return (_WorkflowService$Busi = WorkflowService.BusinessServices[0].states) === null || _WorkflowService$Busi === void 0 ? void 0 : _WorkflowService$Busi.filter(function (workflowDetails) {
39721
+ return (_getStates = getStates(WorkflowService.BusinessServices)) === null || _getStates === void 0 ? void 0 : _getStates.filter(function (workflowDetails) {
39057
39722
  return status === (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.state);
39058
39723
  })[0];
39059
39724
  });
@@ -39063,6 +39728,14 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39063
39728
  }
39064
39729
  };
39065
39730
 
39731
+ var getStates = function getStates(businessServices) {
39732
+ var states = [];
39733
+ businessServices.map(function (data) {
39734
+ states = states.concat(data.states);
39735
+ });
39736
+ return states;
39737
+ };
39738
+
39066
39739
  var roleWiseSelect = function roleWiseSelect(WorkflowService) {
39067
39740
  var response = WorkflowService.filter(function (state) {
39068
39741
  return state.applicationStatus;
@@ -39086,9 +39759,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39086
39759
  return {
39087
39760
  name: t("CS_COMMON_FSM_" + state.applicationStatus),
39088
39761
  code: state.applicationStatus,
39089
- id: (_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
39762
+ id: ((_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
39090
39763
  return e.applicationstatus === state.applicationStatus;
39091
- })) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid,
39764
+ })) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid) || state.uuid,
39092
39765
  roles: roles
39093
39766
  };
39094
39767
  });
@@ -39107,9 +39780,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39107
39780
  return {
39108
39781
  name: t("CS_COMMON_FSM_" + state.applicationStatus),
39109
39782
  code: state.applicationStatus,
39110
- id: (_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
39783
+ id: ((_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
39111
39784
  return e.applicationstatus === state.applicationStatus;
39112
- })) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid,
39785
+ })) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid) || state.uuid,
39113
39786
  roles: roles
39114
39787
  };
39115
39788
  });
@@ -39240,6 +39913,30 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
39240
39913
  });
39241
39914
  };
39242
39915
 
39916
+ var useGenderDetails = function useGenderDetails() {
39917
+ return useQuery("FSM_GENDER_DETAILS", function () {
39918
+ return MdmsService.getFSMGenderType(tenantId, moduleCode, type);
39919
+ }, config);
39920
+ };
39921
+
39922
+ var useFSTPORejectionReason = function useFSTPORejectionReason() {
39923
+ return useQuery("FSM_FSTPO_REJECTION", function () {
39924
+ return MdmsService.getFSTPORejectionReason(tenantId, moduleCode, type);
39925
+ }, queryConfig);
39926
+ };
39927
+
39928
+ var usePaymentType = function usePaymentType() {
39929
+ return useQuery("FSM_PAYMENT_TYPE", function () {
39930
+ return MdmsService.getFSMPaymentType(tenantId, moduleCode, type);
39931
+ }, queryConfig);
39932
+ };
39933
+
39934
+ var useTripNumber = function useTripNumber() {
39935
+ return useQuery("FSM_TRIP_NUMBER", function () {
39936
+ return MdmsService.getFSMTripNumber(tenantId, moduleCode, type);
39937
+ }, queryConfig);
39938
+ };
39939
+
39243
39940
  switch (type) {
39244
39941
  case "SanitationType":
39245
39942
  return useSanitationType();
@@ -39282,6 +39979,21 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
39282
39979
 
39283
39980
  case "PostFieldsConfig":
39284
39981
  return usePostFieldsConfig();
39982
+
39983
+ case "FSMGenderType":
39984
+ return useGenderDetails();
39985
+
39986
+ case "FSTPORejectionReason":
39987
+ return useFSTPORejectionReason();
39988
+
39989
+ case "PaymentType":
39990
+ return usePaymentType();
39991
+
39992
+ case "TripNumber":
39993
+ return useTripNumber();
39994
+
39995
+ default:
39996
+ return null;
39285
39997
  }
39286
39998
  };
39287
39999
 
@@ -39434,6 +40146,9 @@ var Search = {
39434
40146
  }, {
39435
40147
  title: "ES_APPLICATION_DETAILS_APPLICANT_MOBILE_NO",
39436
40148
  value: response === null || response === void 0 ? void 0 : (_response$citizen2 = response.citizen) === null || _response$citizen2 === void 0 ? void 0 : _response$citizen2.mobileNumber
40149
+ }, {
40150
+ title: "ES_FSM_PAYMENT_PREFERENCE",
40151
+ value: "ES_ACTION_" + (response === null || response === void 0 ? void 0 : response.paymentPreference)
39437
40152
  }]
39438
40153
  }, {
39439
40154
  title: "ES_APPLICATION_DETAILS_PROPERTY_DETAILS",
@@ -39505,20 +40220,31 @@ var Search = {
39505
40220
  values: [{
39506
40221
  title: "ES_APPLICATION_DETAILS_ASSIGNED_DSO",
39507
40222
  value: ((_dsoDetails = dsoDetails) === null || _dsoDetails === void 0 ? void 0 : _dsoDetails.displayName) || "N/A"
39508
- }, {
39509
- title: "ES_APPLICATION_DETAILS_VEHICLE_MAKE",
39510
- value: vehicleMake || "N/A"
39511
40223
  }, {
39512
40224
  title: "ES_APPLICATION_DETAILS_VEHICLE_NO",
39513
40225
  value: ((_vehicle2 = vehicle) === null || _vehicle2 === void 0 ? void 0 : _vehicle2.registrationNumber) || "N/A"
39514
40226
  }, {
39515
40227
  title: "ES_APPLICATION_DETAILS_VEHICLE_CAPACITY",
39516
- value: vehicleCapacity || "N/A"
40228
+ value: (response === null || response === void 0 ? void 0 : response.vehicleCapacity) || "N/A"
39517
40229
  }, {
39518
40230
  title: "ES_APPLICATION_DETAILS_POSSIBLE_SERVICE_DATE",
39519
40231
  value: displayServiceDate(response === null || response === void 0 ? void 0 : response.possibleServiceDate) || "N/A"
39520
40232
  }]
39521
40233
  }];
40234
+
40235
+ if (userType !== "CITIZEN" && userType !== "DSO") {
40236
+ employeeResponse.map(function (data) {
40237
+ if (data.title === "ES_TITLE_APPLICANT_DETAILS" || data.title === "Applicant Details") {
40238
+ var _response$citizen3;
40239
+
40240
+ data.values.push({
40241
+ title: "COMMON_APPLICANT_GENDER",
40242
+ value: response === null || response === void 0 ? void 0 : (_response$citizen3 = response.citizen) === null || _response$citizen3 === void 0 ? void 0 : _response$citizen3.gender
40243
+ });
40244
+ }
40245
+ });
40246
+ }
40247
+
39522
40248
  if (userType !== "CITIZEN") return {
39523
40249
  tenantId: response.tenantId,
39524
40250
  applicationDetails: employeeResponse,
@@ -39548,6 +40274,7 @@ var Search = {
39548
40274
  });
39549
40275
  }
39550
40276
 
40277
+ var paymentPreference = response === null || response === void 0 ? void 0 : response.paymentPreference;
39551
40278
  var slumLabel = "";
39552
40279
 
39553
40280
  var _temp = function () {
@@ -39688,9 +40415,9 @@ var useSearchAll = function useSearchAll(tenantId, filters, queryFn, config) {
39688
40415
  var defaultSelect = function defaultSelect(data) {
39689
40416
  return {
39690
40417
  data: {
39691
- table: data.fsm
40418
+ table: data.fsm ? data.fsm : [data]
39692
40419
  },
39693
- totalCount: data.totalCount
40420
+ totalCount: data.totalCount ? data.totalCount : 1
39694
40421
  };
39695
40422
  };
39696
40423
 
@@ -39738,12 +40465,12 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39738
40465
  var _filters = {
39739
40466
  tenantId: tenantId,
39740
40467
  processSearchCriteria: _extends({
39741
- businessService: ["FSM"]
40468
+ businessService: ["FSM", "FSM_POST_PAY_SERVICE"]
39742
40469
  }, (filters === null || filters === void 0 ? void 0 : (_filters$applicationS = filters.applicationStatus) === null || _filters$applicationS === void 0 ? void 0 : _filters$applicationS.length) > 0 ? {
39743
- status: filters.applicationStatus.map(function (status) {
39744
- return status === null || status === void 0 ? void 0 : status.id;
39745
- })
39746
- } : {}),
40470
+ status: getIds(filters.applicationStatus)
40471
+ } : {}, {
40472
+ moduleName: "fsm"
40473
+ }),
39747
40474
  moduleSearchCriteria: _extends({}, mobileNumber ? {
39748
40475
  mobileNumber: mobileNumber
39749
40476
  } : {}, applicationNos ? {
@@ -39765,30 +40492,10 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39765
40492
  filters: _filters,
39766
40493
  config: _extends({
39767
40494
  select: function select(data) {
39768
- var _data$items;
39769
-
39770
40495
  return {
39771
40496
  totalCount: data.totalCount,
39772
40497
  statuses: data.statusMap,
39773
- table: data === null || data === void 0 ? void 0 : (_data$items = data.items) === null || _data$items === void 0 ? void 0 : _data$items.map(function (application) {
39774
- var _application$ProcessI, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$ProcessI5, _application$ProcessI6;
39775
-
39776
- return {
39777
- tenantId: application.businessObject.tenantId,
39778
- totalCount: application.businessObject.totalCount,
39779
- applicationNo: application.businessObject.applicationNo,
39780
- createdTime: new Date(application.businessObject.auditDetails.createdTime),
39781
- locality: application.businessObject.address.locality.code,
39782
- status: application.businessObject.applicationStatus,
39783
- citizen: {
39784
- name: (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : (_application$ProcessI2 = _application$ProcessI.assigner) === null || _application$ProcessI2 === void 0 ? void 0 : _application$ProcessI2.name,
39785
- mobileNumber: (_application$ProcessI3 = application.ProcessInstance) === null || _application$ProcessI3 === void 0 ? void 0 : (_application$ProcessI4 = _application$ProcessI3.assigner) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.mobileNumber
39786
- },
39787
- propertyUsage: application.businessObject.propertyUsage,
39788
- sla: Math.round(((_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000)) || "-",
39789
- mathsla: (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla
39790
- };
39791
- })
40498
+ table: tableData(data)
39792
40499
  };
39793
40500
  }
39794
40501
  }, config)
@@ -39808,6 +40515,43 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39808
40515
  return _extends({}, appList);
39809
40516
  };
39810
40517
 
40518
+ var getIds = function getIds(status) {
40519
+ var ids = [];
40520
+ status === null || status === void 0 ? void 0 : status.map(function (data) {
40521
+ var temp = data.id.split(',');
40522
+ ids.push.apply(ids, temp);
40523
+ });
40524
+ return ids;
40525
+ };
40526
+
40527
+ var tableData = function tableData(data) {
40528
+ var result = [];
40529
+
40530
+ if (data && data.items && data.items.length) {
40531
+ data.items.map(function (application) {
40532
+ var _application$business, _application$business2, _application$business3, _application$business4, _application$business5, _application$business6, _application$business7, _application$business8, _application$business9, _application$ProcessI, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$business10, _application$ProcessI5, _application$ProcessI6;
40533
+
40534
+ result.push({
40535
+ tenantId: (application === null || application === void 0 ? void 0 : (_application$business = application.businessObject) === null || _application$business === void 0 ? void 0 : _application$business.tenantId) || '',
40536
+ totalCount: (application === null || application === void 0 ? void 0 : (_application$business2 = application.businessObject) === null || _application$business2 === void 0 ? void 0 : _application$business2.totalCount) || '',
40537
+ applicationNo: (application === null || application === void 0 ? void 0 : (_application$business3 = application.businessObject) === null || _application$business3 === void 0 ? void 0 : _application$business3.applicationNo) || '',
40538
+ createdTime: application !== null && application !== void 0 && (_application$business4 = application.businessObject) !== null && _application$business4 !== void 0 && (_application$business5 = _application$business4.auditDetails) !== null && _application$business5 !== void 0 && _application$business5.createdTime ? new Date(application.businessObject.auditDetails.createdTime) : new Date(),
40539
+ locality: (application === null || application === void 0 ? void 0 : (_application$business6 = application.businessObject) === null || _application$business6 === void 0 ? void 0 : (_application$business7 = _application$business6.address) === null || _application$business7 === void 0 ? void 0 : (_application$business8 = _application$business7.locality) === null || _application$business8 === void 0 ? void 0 : _application$business8.code) || '',
40540
+ status: (application === null || application === void 0 ? void 0 : (_application$business9 = application.businessObject) === null || _application$business9 === void 0 ? void 0 : _application$business9.applicationStatus) || '',
40541
+ citizen: {
40542
+ name: (application === null || application === void 0 ? void 0 : (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : (_application$ProcessI2 = _application$ProcessI.assigner) === null || _application$ProcessI2 === void 0 ? void 0 : _application$ProcessI2.name) || '',
40543
+ mobileNumber: (application === null || application === void 0 ? void 0 : (_application$ProcessI3 = application.ProcessInstance) === null || _application$ProcessI3 === void 0 ? void 0 : (_application$ProcessI4 = _application$ProcessI3.assigner) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.mobileNumber) || ''
40544
+ },
40545
+ propertyUsage: (application === null || application === void 0 ? void 0 : (_application$business10 = application.businessObject) === null || _application$business10 === void 0 ? void 0 : _application$business10.propertyUsage) || '',
40546
+ sla: Math.round((application === null || application === void 0 ? void 0 : (_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000)) || "-",
40547
+ mathsla: (application === null || application === void 0 ? void 0 : (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla) || ''
40548
+ });
40549
+ });
40550
+ }
40551
+
40552
+ return result;
40553
+ };
40554
+
39811
40555
  var useApplicationUpdate = function useApplicationUpdate(tenantId) {
39812
40556
  return useMutation(function (details) {
39813
40557
  return FSMService.update(details, tenantId);
@@ -39871,11 +40615,11 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
39871
40615
  };
39872
40616
 
39873
40617
  var defaultSelect = function defaultSelect(data) {
39874
- data.Properties[0].units = data.Properties[0].units || [];
39875
- data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
40618
+ if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units || [];
40619
+ if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
39876
40620
  return unit.active;
39877
40621
  });
39878
- data.Properties[0].owners = data.Properties[0].owners || [];
40622
+ if (data.Properties.length > 0) data.Properties[0].owners = data.Properties[0].owners || [];
39879
40623
 
39880
40624
  if (searchedFrom == "myPropertyCitizen") {
39881
40625
  data.Properties.map(function (property) {
@@ -39895,18 +40639,108 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
39895
40639
  }, config)),
39896
40640
  isLoading = _useQuery.isLoading,
39897
40641
  error = _useQuery.error,
39898
- data = _useQuery.data;
40642
+ data = _useQuery.data,
40643
+ isSuccess = _useQuery.isSuccess;
39899
40644
 
39900
40645
  return {
39901
40646
  isLoading: isLoading,
39902
40647
  error: error,
39903
40648
  data: data,
40649
+ isSuccess: isSuccess,
39904
40650
  revalidate: function revalidate() {
39905
40651
  return client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
39906
40652
  }
39907
40653
  };
39908
40654
  };
39909
40655
 
40656
+ var usePropertySearchWithDue = function usePropertySearchWithDue(_ref) {
40657
+ var _data$ConsumerCodes;
40658
+
40659
+ var tenantId = _ref.tenantId,
40660
+ filters = _ref.filters,
40661
+ _ref$auth = _ref.auth,
40662
+ auth = _ref$auth === void 0 ? true : _ref$auth,
40663
+ configs = _ref.configs;
40664
+ var client = useQueryClient();
40665
+
40666
+ var defaultSelect = function defaultSelect(data) {
40667
+ var consumerCodes = [];
40668
+ var formattedData = {};
40669
+ data.Properties.map(function (property) {
40670
+ var _property$units, _property$owners, _property$owners2, _property$tenantId, _property$tenantId$re, _property$address, _property$address$loc;
40671
+
40672
+ property.status == "ACTIVE" && consumerCodes.push(property.propertyId);
40673
+ property.units = property === null || property === void 0 ? void 0 : (_property$units = property.units) === null || _property$units === void 0 ? void 0 : _property$units.filter(function (unit) {
40674
+ return unit.active;
40675
+ });
40676
+ property.owners = property === null || property === void 0 ? void 0 : (_property$owners = property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners.filter(function (owner) {
40677
+ return owner.status === (property === null || property === void 0 ? void 0 : property.status) === "INWORKFLOW" && (property === null || property === void 0 ? void 0 : property.creationReason) === "MUTATION" ? "INACTIVE" : "ACTIVE";
40678
+ });
40679
+ formattedData[property.propertyId] = {
40680
+ propertyId: property === null || property === void 0 ? void 0 : property.propertyId,
40681
+ name: property === null || property === void 0 ? void 0 : (_property$owners2 = property.owners) === null || _property$owners2 === void 0 ? void 0 : _property$owners2[0].name,
40682
+ status: property === null || property === void 0 ? void 0 : property.status,
40683
+ due: false,
40684
+ locality: (property === null || property === void 0 ? void 0 : (_property$tenantId = property.tenantId) === null || _property$tenantId === void 0 ? void 0 : (_property$tenantId$re = _property$tenantId.replace(".", "_")) === null || _property$tenantId$re === void 0 ? void 0 : _property$tenantId$re.toUpperCase()) + "_REVENUE_" + (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : (_property$address$loc = _property$address.locality) === null || _property$address$loc === void 0 ? void 0 : _property$address$loc.code),
40685
+ owners: property === null || property === void 0 ? void 0 : property.owners,
40686
+ documents: property === null || property === void 0 ? void 0 : property.documents
40687
+ };
40688
+ });
40689
+ data["ConsumerCodes"] = consumerCodes;
40690
+ data["FormattedData"] = formattedData;
40691
+ return data;
40692
+ };
40693
+
40694
+ var _useQuery = useQuery(["propertySearchList", tenantId, filters, auth], function () {
40695
+ return configs.enabled && Digit.PTService.search({
40696
+ tenantId: tenantId,
40697
+ filters: filters,
40698
+ auth: auth
40699
+ });
40700
+ }, _extends({}, configs, {
40701
+ select: defaultSelect
40702
+ })),
40703
+ isLoading = _useQuery.isLoading,
40704
+ error = _useQuery.error,
40705
+ data = _useQuery.data;
40706
+
40707
+ var consumerCodes = (data === null || data === void 0 ? void 0 : (_data$ConsumerCodes = data.ConsumerCodes) === null || _data$ConsumerCodes === void 0 ? void 0 : _data$ConsumerCodes.join(",")) || "";
40708
+
40709
+ var _useQuery2 = useQuery(["propertySearchBillList", tenantId, filters, data, auth, consumerCodes], function () {
40710
+ return configs.enabled && data && Digit.PTService.fetchPaymentDetails({
40711
+ tenantId: tenantId,
40712
+ consumerCodes: consumerCodes,
40713
+ auth: auth
40714
+ });
40715
+ }, _extends({}, configs, {
40716
+ select: function select(billResp) {
40717
+ var _billResp$Bill;
40718
+
40719
+ data["Bill"] = (billResp === null || billResp === void 0 ? void 0 : (_billResp$Bill = billResp.Bill) === null || _billResp$Bill === void 0 ? void 0 : _billResp$Bill.reduce(function (curr, acc) {
40720
+ curr[acc === null || acc === void 0 ? void 0 : acc.consumerCode] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
40721
+ data["FormattedData"][acc === null || acc === void 0 ? void 0 : acc.consumerCode]["due"] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
40722
+ return curr;
40723
+ }, {})) || {};
40724
+ return billResp;
40725
+ }
40726
+ })),
40727
+ billLoading = _useQuery2.isLoading,
40728
+ billData = _useQuery2.data,
40729
+ isSuccess = _useQuery2.isSuccess;
40730
+
40731
+ return {
40732
+ isLoading: isLoading || billLoading,
40733
+ error: error,
40734
+ data: data,
40735
+ billData: billData,
40736
+ isSuccess: isSuccess,
40737
+ revalidate: function revalidate() {
40738
+ client.invalidateQueries(["propertySearchBillList", tenantId, filters, auth]);
40739
+ client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
40740
+ }
40741
+ };
40742
+ };
40743
+
39910
40744
  var usePropertyPayment = function usePropertyPayment(_ref) {
39911
40745
  var tenantId = _ref.tenantId,
39912
40746
  consumerCodes = _ref.consumerCodes;
@@ -40143,6 +40977,12 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
40143
40977
  }, config);
40144
40978
  };
40145
40979
 
40980
+ var useChargeSlabs = function useChargeSlabs() {
40981
+ return useQuery("PT_RENTAL_DETAILS", function () {
40982
+ return MdmsService.getChargeSlabs(tenantId, moduleCode);
40983
+ }, config);
40984
+ };
40985
+
40146
40986
  var useFloorList = function useFloorList() {
40147
40987
  return useQuery("PT_FLOOR_LIST", function () {
40148
40988
  return MdmsService.getFloorList(tenantId, moduleCode);
@@ -40189,6 +41029,9 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
40189
41029
  case "MapConfig":
40190
41030
  return useMapConfig();
40191
41031
 
41032
+ case "ChargeSlabs":
41033
+ return useChargeSlabs();
41034
+
40192
41035
  default:
40193
41036
  return _default();
40194
41037
  }
@@ -40210,6 +41053,37 @@ var usePropertyAPI = function usePropertyAPI(tenantId, type) {
40210
41053
  }
40211
41054
  };
40212
41055
 
41056
+ var usePropertyCreateNUpdateAPI = function usePropertyCreateNUpdateAPI(tenantId, update) {
41057
+ if (update === void 0) {
41058
+ update = false;
41059
+ }
41060
+
41061
+ var mutation = useMutation(function (data) {
41062
+ try {
41063
+ return Promise.resolve(PTService.create(data, tenantId)).then(function (createdProp) {
41064
+ var _temp2 = function () {
41065
+ var _createdProp$Response;
41066
+
41067
+ if (createdProp !== null && createdProp !== void 0 && createdProp.ResponseInfo && (createdProp === null || createdProp === void 0 ? void 0 : (_createdProp$Response = createdProp.ResponseInfo) === null || _createdProp$Response === void 0 ? void 0 : _createdProp$Response.status) === "successful") {
41068
+ var _temp3 = function () {
41069
+ if (update) {
41070
+ return Promise.resolve(PTService.update(createdProp === null || createdProp === void 0 ? void 0 : createdProp.Properties[0], tenantId)).then(function () {});
41071
+ }
41072
+ }();
41073
+
41074
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
41075
+ }
41076
+ }();
41077
+
41078
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
41079
+ });
41080
+ } catch (e) {
41081
+ return Promise.reject(e);
41082
+ }
41083
+ });
41084
+ return mutation;
41085
+ };
41086
+
40213
41087
  var usePropertyDocumentSearch = function usePropertyDocumentSearch(_ref, config) {
40214
41088
  var _property$documents;
40215
41089
 
@@ -40257,6 +41131,102 @@ var getPropertyTypeLocale$1 = function getPropertyTypeLocale(value) {
40257
41131
  var getPropertySubtypeLocale$1 = function getPropertySubtypeLocale(value) {
40258
41132
  return "PROPERTYTAX_BILLING_SLAB_" + value;
40259
41133
  };
41134
+ var stringReplaceAll$1 = function stringReplaceAll(str, searcher, replaceWith) {
41135
+ if (str === void 0) {
41136
+ str = "";
41137
+ }
41138
+
41139
+ if (searcher === void 0) {
41140
+ searcher = "";
41141
+ }
41142
+
41143
+ if (replaceWith === void 0) {
41144
+ replaceWith = "";
41145
+ }
41146
+
41147
+ if (searcher === "") return str;
41148
+
41149
+ while (str.includes(searcher)) {
41150
+ str = str.replace(searcher, replaceWith);
41151
+ }
41152
+
41153
+ return str;
41154
+ };
41155
+ var checkForNotNull = function checkForNotNull(value) {
41156
+ if (value === void 0) {
41157
+ value = "";
41158
+ }
41159
+
41160
+ return value && value != null && value != undefined && value != "" ? true : false;
41161
+ };
41162
+ var convertDotValues = function convertDotValues(value) {
41163
+ if (value === void 0) {
41164
+ value = "";
41165
+ }
41166
+
41167
+ return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$1(value, ".", "_")) || "NA";
41168
+ };
41169
+ var convertToLocale = function convertToLocale(value, key) {
41170
+ if (value === void 0) {
41171
+ value = "";
41172
+ }
41173
+
41174
+ if (key === void 0) {
41175
+ key = "";
41176
+ }
41177
+
41178
+ var convertedValue = convertDotValues(value);
41179
+
41180
+ if (convertedValue === "NA") {
41181
+ return "PT_NA";
41182
+ }
41183
+
41184
+ return key + "_" + convertedValue;
41185
+ };
41186
+ var getMohallaLocale = function getMohallaLocale(value, tenantId) {
41187
+ if (value === void 0) {
41188
+ value = "";
41189
+ }
41190
+
41191
+ if (tenantId === void 0) {
41192
+ tenantId = "";
41193
+ }
41194
+
41195
+ var convertedValue = convertDotValues(tenantId);
41196
+
41197
+ if (convertedValue === "NA" || !checkForNotNull(value)) {
41198
+ return "PT_NA";
41199
+ }
41200
+
41201
+ convertedValue = convertedValue.toUpperCase();
41202
+ return convertToLocale(value, convertedValue + "_REVENUE");
41203
+ };
41204
+ var getCityLocale = function getCityLocale(value) {
41205
+ if (value === void 0) {
41206
+ value = "";
41207
+ }
41208
+
41209
+ var convertedValue = convertDotValues(value);
41210
+
41211
+ if (convertedValue === "NA" || !checkForNotNull(value)) {
41212
+ return "PT_NA";
41213
+ }
41214
+
41215
+ convertedValue = convertedValue.toUpperCase();
41216
+ return convertToLocale(convertedValue, "TENANT_TENANTS");
41217
+ };
41218
+
41219
+ var pt = {
41220
+ __proto__: null,
41221
+ getPropertyTypeLocale: getPropertyTypeLocale$1,
41222
+ getPropertySubtypeLocale: getPropertySubtypeLocale$1,
41223
+ stringReplaceAll: stringReplaceAll$1,
41224
+ checkForNotNull: checkForNotNull,
41225
+ convertDotValues: convertDotValues,
41226
+ convertToLocale: convertToLocale,
41227
+ getMohallaLocale: getMohallaLocale,
41228
+ getCityLocale: getCityLocale
41229
+ };
40260
41230
 
40261
41231
  var PTSearch = {
40262
41232
  all: function (tenantId, filters) {
@@ -40273,6 +41243,112 @@ var PTSearch = {
40273
41243
  return Promise.reject(e);
40274
41244
  }
40275
41245
  },
41246
+ genericPropertyDetails: function (t, tenantId, propertyIds) {
41247
+ try {
41248
+ var filters = {
41249
+ propertyIds: propertyIds
41250
+ };
41251
+ return Promise.resolve(PTSearch.application(tenantId, filters)).then(function (property) {
41252
+ var _property$address, _property$address2, _property$tenantId, _property$tenantId$to, _property$tenantId$to2, _property$address3, _property$address3$lo, _property$address4, _property$address5, _property$owners$, _property$owners;
41253
+
41254
+ var addressDetails = {
41255
+ title: "PT_PROPERTY_ADDRESS_SUB_HEADER",
41256
+ asSectionHeader: true,
41257
+ values: [{
41258
+ title: "PT_PROPERTY_ADDRESS_PINCODE",
41259
+ value: property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.pincode
41260
+ }, {
41261
+ title: "PT_PROPERTY_ADDRESS_CITY",
41262
+ value: property === null || property === void 0 ? void 0 : (_property$address2 = property.address) === null || _property$address2 === void 0 ? void 0 : _property$address2.city
41263
+ }, {
41264
+ title: "PT_PROPERTY_ADDRESS_MOHALLA",
41265
+ value: (property === null || property === void 0 ? void 0 : (_property$tenantId = property.tenantId) === null || _property$tenantId === void 0 ? void 0 : (_property$tenantId$to = _property$tenantId.toUpperCase()) === null || _property$tenantId$to === void 0 ? void 0 : (_property$tenantId$to2 = _property$tenantId$to.split(".")) === null || _property$tenantId$to2 === void 0 ? void 0 : _property$tenantId$to2.join("_")) + "_REVENUE_" + (property === null || property === void 0 ? void 0 : (_property$address3 = property.address) === null || _property$address3 === void 0 ? void 0 : (_property$address3$lo = _property$address3.locality) === null || _property$address3$lo === void 0 ? void 0 : _property$address3$lo.code)
41266
+ }, {
41267
+ title: "PT_PROPERTY_ADDRESS_HOUSE_NO",
41268
+ value: property === null || property === void 0 ? void 0 : (_property$address4 = property.address) === null || _property$address4 === void 0 ? void 0 : _property$address4.doorNo
41269
+ }, {
41270
+ title: "PT_PROPERTY_ADDRESS_STREET_NAME",
41271
+ value: property === null || property === void 0 ? void 0 : (_property$address5 = property.address) === null || _property$address5 === void 0 ? void 0 : _property$address5.street
41272
+ }]
41273
+ };
41274
+ var assessmentDetails = {
41275
+ title: "PT_ASSESMENT_INFO_SUB_HEADER",
41276
+ values: [{
41277
+ title: "PT_ASSESMENT_INFO_TYPE_OF_BUILDING",
41278
+ value: getPropertyTypeLocale$1(property === null || property === void 0 ? void 0 : property.propertyType)
41279
+ }, {
41280
+ title: "PT_ASSESMENT_INFO_USAGE_TYPE",
41281
+ value: getPropertySubtypeLocale$1(property === null || property === void 0 ? void 0 : property.usageCategory)
41282
+ }, {
41283
+ title: "PT_ASSESMENT_INFO_PLOT_SIZE",
41284
+ value: property === null || property === void 0 ? void 0 : property.landArea
41285
+ }, {
41286
+ title: "PT_ASSESMENT_INFO_NO_OF_FLOOR",
41287
+ value: property === null || property === void 0 ? void 0 : property.noOfFloors
41288
+ }]
41289
+ };
41290
+ var propertyDetail = {
41291
+ title: "PT_DETAILS",
41292
+ values: [{
41293
+ title: "TL_PROPERTY_ID",
41294
+ value: (property === null || property === void 0 ? void 0 : property.propertyId) || "NA"
41295
+ }, {
41296
+ title: "PT_OWNER_NAME",
41297
+ value: (property === null || property === void 0 ? void 0 : (_property$owners$ = property.owners[0]) === null || _property$owners$ === void 0 ? void 0 : _property$owners$.name) || "NA"
41298
+ }, {
41299
+ title: "PT_SEARCHPROPERTY_TABEL_STATUS",
41300
+ value: Digit.Utils.locale.getTransformedLocale("WF_PT_" + (property === null || property === void 0 ? void 0 : property.status)) || "NA"
41301
+ }]
41302
+ };
41303
+ var ownerdetails = {
41304
+ title: "PT_OWNERSHIP_INFO_SUB_HEADER",
41305
+ additionalDetails: {
41306
+ owners: property === null || property === void 0 ? void 0 : (_property$owners = property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners.filter(function (owner) {
41307
+ return owner.status === "ACTIVE";
41308
+ }).map(function (owner, index) {
41309
+ return {
41310
+ status: owner.status,
41311
+ title: "ES_OWNER",
41312
+ values: [{
41313
+ title: "PT_OWNERSHIP_INFO_NAME",
41314
+ value: owner === null || owner === void 0 ? void 0 : owner.name
41315
+ }, {
41316
+ title: "PT_OWNERSHIP_INFO_GENDER",
41317
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
41318
+ }, {
41319
+ title: "PT_OWNERSHIP_INFO_MOBILE_NO",
41320
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
41321
+ }, {
41322
+ title: "PT_OWNERSHIP_INFO_USER_CATEGORY",
41323
+ value: "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) || "NA"
41324
+ }, {
41325
+ title: "PT_SEARCHPROPERTY_TABEL_GUARDIANNAME",
41326
+ value: owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName
41327
+ }, {
41328
+ title: "PT_FORM3_OWNERSHIP_TYPE",
41329
+ value: property === null || property === void 0 ? void 0 : property.ownershipCategory
41330
+ }, {
41331
+ title: "PT_OWNERSHIP_INFO_EMAIL_ID",
41332
+ value: owner === null || owner === void 0 ? void 0 : owner.emailId
41333
+ }, {
41334
+ title: "PT_OWNERSHIP_INFO_CORR_ADDR",
41335
+ value: owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress
41336
+ }]
41337
+ };
41338
+ })
41339
+ }
41340
+ };
41341
+ var applicationDetails = [propertyDetail, addressDetails, assessmentDetails, ownerdetails];
41342
+ return {
41343
+ tenantId: property === null || property === void 0 ? void 0 : property.tenantId,
41344
+ applicationDetails: applicationDetails,
41345
+ applicationData: property
41346
+ };
41347
+ });
41348
+ } catch (e) {
41349
+ return Promise.reject(e);
41350
+ }
41351
+ },
40276
41352
  application: function (tenantId, filters) {
40277
41353
  if (filters === void 0) {
40278
41354
  filters = {};
@@ -40588,7 +41664,82 @@ var usePTGenderMDMS = function usePTGenderMDMS(tenantId, moduleCode, type, confi
40588
41664
  switch (type) {
40589
41665
  case "GenderType":
40590
41666
  return usePTGenders();
41667
+
41668
+ default:
41669
+ return null;
41670
+ }
41671
+ };
41672
+
41673
+ var getOwnerForPayments = function getOwnerForPayments(propertyData, data) {
41674
+ var _data$Payments;
41675
+
41676
+ var newPayments = [];
41677
+ data && (data === null || data === void 0 ? void 0 : (_data$Payments = data.Payments) === null || _data$Payments === void 0 ? void 0 : _data$Payments.map(function (payment) {
41678
+ var _propertyData$filter$;
41679
+
41680
+ var owner = propertyData === null || propertyData === void 0 ? void 0 : (_propertyData$filter$ = propertyData.filter(function (ob) {
41681
+ var _payment$paymentDetai, _payment$paymentDetai2, _payment$paymentDetai3;
41682
+
41683
+ return ob.propertyId === (payment === null || payment === void 0 ? void 0 : (_payment$paymentDetai = payment.paymentDetails) === null || _payment$paymentDetai === void 0 ? void 0 : (_payment$paymentDetai2 = _payment$paymentDetai[0]) === null || _payment$paymentDetai2 === void 0 ? void 0 : (_payment$paymentDetai3 = _payment$paymentDetai2.bill) === null || _payment$paymentDetai3 === void 0 ? void 0 : _payment$paymentDetai3.consumerCode);
41684
+ })[0]) === null || _propertyData$filter$ === void 0 ? void 0 : _propertyData$filter$.owners;
41685
+ newPayments.push(_extends({}, payment, {
41686
+ owners: owner
41687
+ }));
41688
+ }));
41689
+ data ? data["Payments"] = [].concat(newPayments) : "";
41690
+ return data;
41691
+ };
41692
+
41693
+ var useMyPropertyPayments = function useMyPropertyPayments(_ref, config) {
41694
+ var _config;
41695
+
41696
+ var tenantId = _ref.tenantId,
41697
+ filters = _ref.filters;
41698
+
41699
+ if (config === void 0) {
41700
+ config = {};
41701
+ }
41702
+
41703
+ var client = useQueryClient();
41704
+ var paymentargs = tenantId ? {
41705
+ tenantId: tenantId,
41706
+ filters: filters
41707
+ } : {
41708
+ filters: filters
41709
+ };
41710
+
41711
+ var _useQuery = useQuery(["paymentpropertySearchList", tenantId, filters], function () {
41712
+ return Digit.PTService.paymentsearch(paymentargs);
41713
+ }, _extends({}, config)),
41714
+ isLoading = _useQuery.isLoading,
41715
+ error = _useQuery.error,
41716
+ data = _useQuery.data;
41717
+
41718
+ var updatedData = getOwnerForPayments((_config = config) === null || _config === void 0 ? void 0 : _config.propertyData, data);
41719
+ return {
41720
+ isLoading: isLoading,
41721
+ error: error,
41722
+ data: data,
41723
+ revalidate: function revalidate() {
41724
+ return client.invalidateQueries(["paymentpropertySearchList", tenantId, filters]);
41725
+ }
41726
+ };
41727
+ };
41728
+
41729
+ var useGenericViewProperty = function useGenericViewProperty(t, tenantId, propertyIds, config, userType) {
41730
+ if (config === void 0) {
41731
+ config = {};
40591
41732
  }
41733
+
41734
+ var defaultSelect = function defaultSelect(data) {
41735
+ return _extends({}, data);
41736
+ };
41737
+
41738
+ return useQuery(["VIEW_GENERIC_PROPERTY", propertyIds, tenantId], function () {
41739
+ return PTSearch.genericPropertyDetails(t, tenantId, propertyIds);
41740
+ }, _extends({
41741
+ select: defaultSelect
41742
+ }, config));
40592
41743
  };
40593
41744
 
40594
41745
  var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
@@ -40598,9 +41749,18 @@ var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
40598
41749
  }, config);
40599
41750
  };
40600
41751
 
41752
+ var _default = function _default() {
41753
+ return useQuery([tenantId, moduleCode, type], function () {
41754
+ return MdmsService.getMultipleTypes(tenantId, moduleCode, type);
41755
+ }, config);
41756
+ };
41757
+
40601
41758
  switch (type) {
40602
41759
  case "DssDashboard":
40603
41760
  return useDssDashboard();
41761
+
41762
+ default:
41763
+ return _default();
40604
41764
  }
40605
41765
  };
40606
41766
 
@@ -40662,6 +41822,29 @@ var getRequest = function getRequest(type, code, requestDate, filters) {
40662
41822
  };
40663
41823
  };
40664
41824
 
41825
+ var defaultSelect = function defaultSelect(data) {
41826
+ if (data !== null && data !== void 0 && data.responseData) {
41827
+ var _data$responseData;
41828
+
41829
+ if (data !== null && data !== void 0 && (_data$responseData = data.responseData) !== null && _data$responseData !== void 0 && _data$responseData.data) {
41830
+ var _data$responseData2, _data$responseData2$d, _data$responseData$da;
41831
+
41832
+ data.responseData.data = (data === null || data === void 0 ? void 0 : (_data$responseData2 = data.responseData) === null || _data$responseData2 === void 0 ? void 0 : (_data$responseData2$d = _data$responseData2.data) === null || _data$responseData2$d === void 0 ? void 0 : _data$responseData2$d.filter(function (col) {
41833
+ return col;
41834
+ })) || [];
41835
+ (_data$responseData$da = data.responseData.data) === null || _data$responseData$da === void 0 ? void 0 : _data$responseData$da.forEach(function (row) {
41836
+ if (row !== null && row !== void 0 && row.plots) {
41837
+ row.plots = (row === null || row === void 0 ? void 0 : row.plots.filter(function (col) {
41838
+ return col;
41839
+ })) || [];
41840
+ }
41841
+ });
41842
+ }
41843
+ }
41844
+
41845
+ return data;
41846
+ };
41847
+
40665
41848
  var useGetChart = function useGetChart(args) {
40666
41849
  var key = args.key,
40667
41850
  type = args.type,
@@ -40674,6 +41857,8 @@ var useGetChart = function useGetChart(args) {
40674
41857
  tenantId: tenantId
40675
41858
  }
40676
41859
  }));
41860
+ }, {
41861
+ select: defaultSelect
40677
41862
  });
40678
41863
  };
40679
41864
 
@@ -40700,6 +41885,9 @@ var useMCollectMDMS = function useMCollectMDMS(tenantId, moduleCode, type, filte
40700
41885
 
40701
41886
  case "applicationStatus":
40702
41887
  return useMCollectApplcationStatus();
41888
+
41889
+ default:
41890
+ return null;
40703
41891
  }
40704
41892
  };
40705
41893
 
@@ -40883,6 +42071,8 @@ var useTenants$4 = function useTenants() {
40883
42071
  return tenants;
40884
42072
  };
40885
42073
 
42074
+ var _excluded$2 = ["code", "value"];
42075
+
40886
42076
  var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, type, filter, config) {
40887
42077
  if (config === void 0) {
40888
42078
  config = {};
@@ -40912,6 +42102,104 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
40912
42102
  }, config);
40913
42103
  };
40914
42104
 
42105
+ var useTradeOwnershipSubType = function useTradeOwnershipSubType() {
42106
+ return useQuery("TL_TRADE_OWNERSHIP_CATEGORY", function () {
42107
+ return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
42108
+ }, _extends({
42109
+ select: function select(data) {
42110
+ var _data$commonMasters = data["common-masters"];
42111
+ _data$commonMasters = _data$commonMasters === void 0 ? {} : _data$commonMasters;
42112
+ var categoryData = _data$commonMasters.OwnerShipCategory;
42113
+ var filteredSubtypesData = categoryData.filter(function (e) {
42114
+ return e.code.includes(filter.keyToSearchOwnershipSubtype);
42115
+ }).map(function (e) {
42116
+ return _extends({}, e, {
42117
+ i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_" + e.code.replaceAll(".", "_")
42118
+ });
42119
+ });
42120
+ return filteredSubtypesData;
42121
+ }
42122
+ }, config));
42123
+ };
42124
+
42125
+ var useOwnerTypeWithSubtypes = function useOwnerTypeWithSubtypes() {
42126
+ return useQuery("TL_TRADE_OWNERSSHIP_TYPE", function () {
42127
+ return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
42128
+ }, _extends({
42129
+ select: function select(data) {
42130
+ var _data$commonMasters2 = data["common-masters"];
42131
+ _data$commonMasters2 = _data$commonMasters2 === void 0 ? {} : _data$commonMasters2;
42132
+ var categoryData = _data$commonMasters2.OwnerShipCategory;
42133
+ var OwnerShipCategory = {};
42134
+ var ownerShipdropDown = [];
42135
+
42136
+ function getDropdwonForProperty(ownerShipdropDown) {
42137
+ if ((filter === null || filter === void 0 ? void 0 : filter.userType) === "employee") {
42138
+ var _ownerShipdropDown$fi;
42139
+
42140
+ var arr = ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : (_ownerShipdropDown$fi = ownerShipdropDown.filter(function (e) {
42141
+ return e.code.split(".").length <= 2;
42142
+ })) === null || _ownerShipdropDown$fi === void 0 ? void 0 : _ownerShipdropDown$fi.map(function (ownerShipDetails) {
42143
+ return _extends({}, ownerShipDetails, {
42144
+ i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_INDIVIDUAL_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
42145
+ });
42146
+ });
42147
+ var finalArr = arr.filter(function (data) {
42148
+ return data.code.includes("INDIVIDUAL") || data.code.includes("OTHER");
42149
+ });
42150
+ return finalArr;
42151
+ }
42152
+
42153
+ var res = ownerShipdropDown !== null && ownerShipdropDown !== void 0 && ownerShipdropDown.length ? ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : ownerShipdropDown.map(function (ownerShipDetails) {
42154
+ return _extends({}, ownerShipDetails, {
42155
+ i18nKey: "PT_OWNERSHIP_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
42156
+ });
42157
+ }).reduce(function (acc, ownerShipDetails) {
42158
+ if (ownerShipDetails.code.includes("INDIVIDUAL")) {
42159
+ return [].concat(acc, [ownerShipDetails]);
42160
+ } else if (ownerShipDetails.code.includes("OTHER")) {
42161
+ var code = ownerShipDetails.code,
42162
+ value = ownerShipDetails.value,
42163
+ everythingElse = _objectWithoutPropertiesLoose(ownerShipDetails, _excluded$2);
42164
+
42165
+ var mutatedOwnershipDetails = _extends({
42166
+ code: code.split(".")[0],
42167
+ value: value.split(".")[0]
42168
+ }, everythingElse);
42169
+
42170
+ return [].concat(acc, [mutatedOwnershipDetails]);
42171
+ } else {
42172
+ return acc;
42173
+ }
42174
+ }, []) : null;
42175
+ return res;
42176
+ }
42177
+
42178
+ function formDropdown(category) {
42179
+ var name = category.name,
42180
+ code = category.code;
42181
+ return {
42182
+ label: name,
42183
+ value: code,
42184
+ code: code
42185
+ };
42186
+ }
42187
+
42188
+ categoryData.length > 0 ? categoryData === null || categoryData === void 0 ? void 0 : categoryData.map(function (category) {
42189
+ OwnerShipCategory[category.code] = category;
42190
+ }) : null;
42191
+
42192
+ if (OwnerShipCategory) {
42193
+ Object.keys(OwnerShipCategory).forEach(function (category) {
42194
+ ownerShipdropDown.push(formDropdown(OwnerShipCategory[category]));
42195
+ });
42196
+ }
42197
+
42198
+ return getDropdwonForProperty(ownerShipdropDown);
42199
+ }
42200
+ }, config));
42201
+ };
42202
+
40915
42203
  var useTLAccessoriesType = function useTLAccessoriesType() {
40916
42204
  return useQuery("TL_TRADE_ACCESSORY_CATEGORY", function () {
40917
42205
  return MdmsService.getTLAccessoriesType(tenantId, moduleCode, type);
@@ -40943,18 +42231,26 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
40943
42231
  case "TLOwnerShipCategory":
40944
42232
  return useTradeOwnerShipCategory();
40945
42233
 
42234
+ case "TLOwnerTypeWithSubtypes":
42235
+ return useOwnerTypeWithSubtypes();
42236
+
40946
42237
  case "AccessoryCategory":
40947
42238
  return useTLAccessoriesType();
40948
42239
 
40949
42240
  case "FinancialYear":
40950
42241
  return useTLFinancialYear();
40951
42242
 
42243
+ case "TradeOwnershipSubType":
42244
+ return useTradeOwnershipSubType();
42245
+
40952
42246
  default:
40953
42247
  return _default();
40954
42248
  }
40955
42249
  };
40956
42250
 
40957
42251
  var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42252
+ var _data, _data$value, _data$value$owners, _data$value$owners$do, _data2, _data2$value, _data2$value$owners, _data2$value$owners$d, _data3, _data3$value, _data3$value$owners, _data3$value$owners$d;
42253
+
40958
42254
  if (data1 === void 0) {
40959
42255
  data1 = {};
40960
42256
  }
@@ -40962,7 +42258,10 @@ var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
40962
42258
  var client = useQueryClient();
40963
42259
  var tenantId = Digit.ULBService.getCurrentTenantId();
40964
42260
  var tenant = Digit.ULBService.getStateId();
40965
- var filesArray = [data1.value.owners.documents["OwnerPhotoProof"].fileStoreId, data1.value.owners.documents["ProofOfIdentity"].fileStoreId, data1.value.owners.documents["ProofOfOwnership"].fileStoreId];
42261
+ var filesArray = [];
42262
+ if ((_data = data1) !== null && _data !== void 0 && (_data$value = _data.value) !== null && _data$value !== void 0 && (_data$value$owners = _data$value.owners) !== null && _data$value$owners !== void 0 && (_data$value$owners$do = _data$value$owners.documents["OwnerPhotoProof"]) !== null && _data$value$owners$do !== void 0 && _data$value$owners$do.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
42263
+ if ((_data2 = data1) !== null && _data2 !== void 0 && (_data2$value = _data2.value) !== null && _data2$value !== void 0 && (_data2$value$owners = _data2$value.owners) !== null && _data2$value$owners !== void 0 && (_data2$value$owners$d = _data2$value$owners.documents["ProofOfIdentity"]) !== null && _data2$value$owners$d !== void 0 && _data2$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
42264
+ if ((_data3 = data1) !== null && _data3 !== void 0 && (_data3$value = _data3.value) !== null && _data3$value !== void 0 && (_data3$value$owners = _data3$value.owners) !== null && _data3$value$owners !== void 0 && (_data3$value$owners$d = _data3$value$owners.documents["ProofOfOwnership"]) !== null && _data3$value$owners$d !== void 0 && _data3$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
40966
42265
 
40967
42266
  var _useQuery = useQuery(["tlDocuments-" + 1, filesArray], function () {
40968
42267
  return Digit.UploadServices.Filefetch(filesArray, tenant);
@@ -41046,38 +42345,42 @@ var useTradeLicenseSearch = function useTradeLicenseSearch(_ref, config) {
41046
42345
  };
41047
42346
  };
41048
42347
 
42348
+ var mapWfBybusinessId$1 = function mapWfBybusinessId(workflowData) {
42349
+ return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
42350
+ acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
42351
+ return acc;
42352
+ }, {});
42353
+ };
42354
+
42355
+ var combineResponse = function combineResponse(applications, workflowData, totalCount) {
42356
+ var workflowInstances = mapWfBybusinessId$1(workflowData);
42357
+ return applications.map(function (application) {
42358
+ var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
42359
+
42360
+ return _extends({}, application, {
42361
+ appAssignee: (_workflowInstances$ap = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap === void 0 ? void 0 : (_workflowInstances$ap2 = _workflowInstances$ap.assignes) === null || _workflowInstances$ap2 === void 0 ? void 0 : (_workflowInstances$ap3 = _workflowInstances$ap2[0]) === null || _workflowInstances$ap3 === void 0 ? void 0 : _workflowInstances$ap3.name,
42362
+ SLA: (_workflowInstances$ap4 = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap4 === void 0 ? void 0 : _workflowInstances$ap4.businesssServiceSla,
42363
+ appState: (_workflowInstances$ap5 = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap5 === void 0 ? void 0 : (_workflowInstances$ap6 = _workflowInstances$ap5.state) === null || _workflowInstances$ap6 === void 0 ? void 0 : _workflowInstances$ap6.state,
42364
+ Count: totalCount
42365
+ });
42366
+ });
42367
+ };
42368
+
41049
42369
  var useTLSearch = function useTLSearch(params, config) {
41050
42370
  return function () {
41051
42371
  try {
41052
42372
  return Promise.resolve(Digit.TLService.search(params, config)).then(function (data) {
41053
- var UpdatedData = [];
41054
- return function () {
41055
- if (data && data !== null && data !== void 0 && data.Licenses && Array.isArray(data.Licenses) && data.Licenses.length > 0) {
41056
- var _data$Licenses;
42373
+ var _data$Licenses, _data$Licenses$;
41057
42374
 
41058
- return Promise.resolve(Promise.all((_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses.map(function (service) {
41059
- try {
41060
- return Promise.resolve(Digit.WorkflowService.getDetailsById({
41061
- tenantId: service.tenantId,
41062
- id: service.applicationNumber,
41063
- moduleCode: "TL",
41064
- role: "CITIZEN"
41065
- }).then(function (workflowdata) {
41066
- return workflowdata;
41067
- })).then(function (workflowdata) {
41068
- var res = Object.assign({}, service, {
41069
- SLA: workflowdata === null || workflowdata === void 0 ? void 0 : workflowdata.processInstances[0].businesssServiceSla
41070
- });
41071
- return res;
41072
- });
41073
- } catch (e) {
41074
- return Promise.reject(e);
41075
- }
41076
- }))).then(function (_Promise$all) {
41077
- return UpdatedData = _Promise$all;
41078
- });
41079
- }
41080
- }();
42375
+ var tenant = data === null || data === void 0 ? void 0 : (_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : (_data$Licenses$ = _data$Licenses[0]) === null || _data$Licenses$ === void 0 ? void 0 : _data$Licenses$.tenantId;
42376
+ var businessIds = data === null || data === void 0 ? void 0 : data.Licenses.map(function (application) {
42377
+ return application.applicationNumber;
42378
+ });
42379
+ return Promise.resolve(Digit.WorkflowService.getAllApplication(tenant, {
42380
+ businessIds: businessIds.join()
42381
+ })).then(function (workflowRes) {
42382
+ return combineResponse(data === null || data === void 0 ? void 0 : data.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, data === null || data === void 0 ? void 0 : data.Count);
42383
+ });
41081
42384
  });
41082
42385
  } catch (e) {
41083
42386
  return Promise.reject(e);
@@ -41096,17 +42399,18 @@ var useTLSearchApplication = function useTLSearchApplication(params, config, t)
41096
42399
  staleTime: Infinity,
41097
42400
  select: function select(data) {
41098
42401
  return data.map(function (i) {
41099
- var _i$tradeLicenseDetail, _i$tradeLicenseDetail2;
42402
+ var _i$tradeLicenseDetail, _i$tradeLicenseDetail2, _i$tradeLicenseDetail3, _i$tradeLicenseDetail4, _i$tradeLicenseDetail5, _i$tradeLicenseDetail6, _i$tradeLicenseDetail7;
41100
42403
 
41101
42404
  return {
41102
42405
  TL_COMMON_TABLE_COL_APP_NO: i.applicationNumber,
41103
42406
  TL_APPLICATION_CATEGORY: "ACTION_TEST_TRADE_LICENSE",
41104
- TL_COMMON_TABLE_COL_OWN_NAME: i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail === void 0 ? void 0 : (_i$tradeLicenseDetail2 = _i$tradeLicenseDetail.owners) === null || _i$tradeLicenseDetail2 === void 0 ? void 0 : _i$tradeLicenseDetail2.map(function (ele, index) {
42407
+ TL_COMMON_TABLE_COL_OWN_NAME: i !== null && i !== void 0 && (_i$tradeLicenseDetail = i.tradeLicenseDetail) !== null && _i$tradeLicenseDetail !== void 0 && _i$tradeLicenseDetail.subOwnerShipCategory.includes("INSTITUTION") ? i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail2 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail2 === void 0 ? void 0 : (_i$tradeLicenseDetail3 = _i$tradeLicenseDetail2.institution) === null || _i$tradeLicenseDetail3 === void 0 ? void 0 : _i$tradeLicenseDetail3.name : i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail4 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail4 === void 0 ? void 0 : (_i$tradeLicenseDetail5 = _i$tradeLicenseDetail4.owners) === null || _i$tradeLicenseDetail5 === void 0 ? void 0 : _i$tradeLicenseDetail5.map(function (ele, index) {
41105
42408
  return index == 0 ? multiownername = ele.name : multiownername = multiownername + " , " + ele.name;
41106
42409
  }),
41107
42410
  TL_COMMON_TABLE_COL_STATUS: "WF_NEWTL_" + (i === null || i === void 0 ? void 0 : i.status),
41108
42411
  TL_COMMON_TABLE_COL_SLA_NAME: Math.round((i === null || i === void 0 ? void 0 : i.SLA) / (1000 * 60 * 60 * 24)) + " " + t("TL_SLA_DAYS"),
41109
42412
  TL_COMMON_TABLE_COL_TRD_NAME: i === null || i === void 0 ? void 0 : i.tradeName,
42413
+ TL_INSTITUTION_TYPE_LABEL: i !== null && i !== void 0 && (_i$tradeLicenseDetail6 = i.tradeLicenseDetail) !== null && _i$tradeLicenseDetail6 !== void 0 && _i$tradeLicenseDetail6.subOwnerShipCategory.includes("INSTITUTION") ? "TL_" + (i === null || i === void 0 ? void 0 : (_i$tradeLicenseDetail7 = i.tradeLicenseDetail) === null || _i$tradeLicenseDetail7 === void 0 ? void 0 : _i$tradeLicenseDetail7.subOwnerShipCategory) : null,
41110
42414
  raw: i
41111
42415
  };
41112
42416
  });
@@ -41142,7 +42446,7 @@ var useTLPaymentHistory = function useTLPaymentHistory(tenantId, id, config) {
41142
42446
  }, _extends({}, config));
41143
42447
  };
41144
42448
 
41145
- var stringReplaceAll$1 = function stringReplaceAll(str, searcher, replaceWith) {
42449
+ var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
41146
42450
  if (str === void 0) {
41147
42451
  str = "";
41148
42452
  }
@@ -41231,217 +42535,362 @@ var TLSearch = {
41231
42535
  applicationNumber: applicationNumber
41232
42536
  };
41233
42537
  return Promise.resolve(TLSearch.application(tenantId, filter)).then(function (response) {
41234
- function _temp2() {
41235
- var _response$tradeLicens, _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens33, _response$tradeLicens34, _response$tradeLicens37, _response$tradeLicens38, _response$tradeLicens39;
42538
+ var _response$tradeLicens60, _response$tradeLicens61, _response$tradeLicens62, _response$tradeLicens63;
41236
42539
 
41237
- var employeeResponse = [];
41238
- var tradedetails = {
41239
- title: "TL_COMMON_TR_DETAILS",
41240
- asSectionHeader: true,
41241
- values: [{
41242
- title: "TL_FINANCIAL_YEAR_LABEL",
41243
- value: response !== null && response !== void 0 && response.financialYear ? "FY" + (response === null || response === void 0 ? void 0 : response.financialYear) : "NA"
41244
- }, {
41245
- title: "TL_NEW_TRADE_DETAILS_LIC_TYPE_LABEL",
41246
- value: response !== null && response !== void 0 && response.licenseType ? "TRADELICENSE_LICENSETYPE_" + (response === null || response === void 0 ? void 0 : response.licenseType) : "NA"
41247
- }, {
41248
- title: "TL_COMMON_TABLE_COL_TRD_NAME",
41249
- value: response === null || response === void 0 ? void 0 : response.tradeName
41250
- }, {
41251
- title: "TL_NEW_TRADE_DETAILS_STRUCT_TYPE_LABEL",
41252
- value: response !== null && response !== void 0 && (_response$tradeLicens = response.tradeLicenseDetail) !== null && _response$tradeLicens !== void 0 && _response$tradeLicens.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens2 = response.tradeLicenseDetail) === null || _response$tradeLicens2 === void 0 ? void 0 : (_response$tradeLicens3 = _response$tradeLicens2.structureType) === null || _response$tradeLicens3 === void 0 ? void 0 : _response$tradeLicens3.split('.')[0]) : "NA"
41253
- }, {
41254
- title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
41255
- value: response !== null && response !== void 0 && (_response$tradeLicens4 = response.tradeLicenseDetail) !== null && _response$tradeLicens4 !== void 0 && _response$tradeLicens4.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + stringReplaceAll$1(response === null || response === void 0 ? void 0 : (_response$tradeLicens5 = response.tradeLicenseDetail) === null || _response$tradeLicens5 === void 0 ? void 0 : _response$tradeLicens5.structureType, ".", "_") : "NA"
41256
- }, {
41257
- title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
41258
- value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
41259
- }, {
41260
- title: "TL_NEW_GST_NUMBER_LABEL",
41261
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : (_response$tradeLicens7 = _response$tradeLicens6.additionalDetail) === null || _response$tradeLicens7 === void 0 ? void 0 : _response$tradeLicens7.gstNo) || "NA"
41262
- }, {
41263
- title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
41264
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens8 = response.tradeLicenseDetail) === null || _response$tradeLicens8 === void 0 ? void 0 : _response$tradeLicens8.operationalArea) || "NA"
41265
- }, {
41266
- title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
41267
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.noOfEmployees) || "NA"
41268
- }]
41269
- };
41270
- var tradeUnits = {
41271
- title: "TL_TRADE_UNITS_HEADER",
41272
- additionalDetails: {
41273
- units: response === null || response === void 0 ? void 0 : (_response$tradeLicens10 = response.tradeLicenseDetail) === null || _response$tradeLicens10 === void 0 ? void 0 : (_response$tradeLicens11 = _response$tradeLicens10.tradeUnits) === null || _response$tradeLicens11 === void 0 ? void 0 : _response$tradeLicens11.map(function (unit, index) {
41274
- var _unit$tradeType, _unit$tradeType2;
41275
-
41276
- var tradeSubType = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
41277
- tradeSubType = stringReplaceAll$1(tradeSubType, "-", "_");
41278
- return {
41279
- title: "TL_UNIT_HEADER",
41280
- values: [{
41281
- title: "TRADELICENSE_TRADECATEGORY_LABEL",
41282
- value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType = unit.tradeType) === null || _unit$tradeType === void 0 ? void 0 : _unit$tradeType.split('.')[0]) : "NA"
41283
- }, {
41284
- title: "TRADELICENSE_TRADETYPE_LABEL",
41285
- value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType2 = unit.tradeType) === null || _unit$tradeType2 === void 0 ? void 0 : _unit$tradeType2.split('.')[1]) : "NA"
41286
- }, {
41287
- title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
41288
- value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
41289
- }, {
41290
- title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
41291
- value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
41292
- }, {
41293
- title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
41294
- value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
41295
- }]
41296
- };
41297
- })
41298
- }
41299
- };
41300
- var accessories = {
41301
- title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
41302
- additionalDetails: {
41303
- accessories: response === null || response === void 0 ? void 0 : (_response$tradeLicens12 = response.tradeLicenseDetail) === null || _response$tradeLicens12 === void 0 ? void 0 : (_response$tradeLicens13 = _response$tradeLicens12.accessories) === null || _response$tradeLicens13 === void 0 ? void 0 : _response$tradeLicens13.map(function (unit, index) {
41304
- var accessoryCategory = "NA";
41305
-
41306
- if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
41307
- accessoryCategory = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
41308
- accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$1(accessoryCategory, "-", "_");
42540
+ function _temp3(propertyDetails) {
42541
+ function _temp2() {
42542
+ var _propertyDetails$Prop, _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _propertyDetails$Prop39, _propertyDetails$Prop40, _propertyDetails$Prop41, _propertyDetails$Prop42, _propertyDetails$Prop43, _propertyDetails$Prop44, _propertyDetails$Prop45, _propertyDetails$Prop46, _propertyDetails$Prop47, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens31, _response$tradeLicens32, _response$tradeLicens47, _response$tradeLicens48, _response$tradeLicens49, _response$tradeLicens50, _response$tradeLicens53, _response$tradeLicens54, _response$tradeLicens57, _response$tradeLicens58, _propertyDetails$Prop48, _propertyDetails$Prop49, _response$tradeLicens59;
42543
+
42544
+ var propertyAddress = "";
42545
+
42546
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop.length) {
42547
+ var _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop14, _propertyDetails$Prop15, _propertyDetails$Prop21, _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop29, _propertyDetails$Prop30, _propertyDetails$Prop35, _propertyDetails$Prop36;
42548
+
42549
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop2 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop2 !== void 0 && (_propertyDetails$Prop3 = _propertyDetails$Prop2.address) !== null && _propertyDetails$Prop3 !== void 0 && _propertyDetails$Prop3.doorNo) {
42550
+ var _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7;
42551
+
42552
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4.address) === null || _propertyDetails$Prop5 === void 0 ? void 0 : _propertyDetails$Prop5.doorNo;
42553
+
42554
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop6 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop6 !== void 0 && (_propertyDetails$Prop7 = _propertyDetails$Prop6.address) !== null && _propertyDetails$Prop7 !== void 0 && _propertyDetails$Prop7.street) {
42555
+ propertyAddress += ", ";
41309
42556
  }
42557
+ }
41310
42558
 
41311
- return {
41312
- title: "TL_ACCESSORY_LABEL",
41313
- values: [{
41314
- title: "TL_NEW_TRADE_DETAILS_ACC_LABEL",
41315
- value: accessoryCategory
41316
- }, {
41317
- title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
41318
- value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
41319
- }, {
41320
- title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
41321
- value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
41322
- }, {
41323
- title: "TL_ACCESSORY_COUNT_LABEL",
41324
- value: (unit === null || unit === void 0 ? void 0 : unit.count) || "NA"
41325
- }]
41326
- };
41327
- })
42559
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop8 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop8 !== void 0 && (_propertyDetails$Prop9 = _propertyDetails$Prop8.address) !== null && _propertyDetails$Prop9 !== void 0 && _propertyDetails$Prop9.street) {
42560
+ var _propertyDetails$Prop10, _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13;
42561
+
42562
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop10 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop10 === void 0 ? void 0 : (_propertyDetails$Prop11 = _propertyDetails$Prop10.address) === null || _propertyDetails$Prop11 === void 0 ? void 0 : _propertyDetails$Prop11.street;
42563
+
42564
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop12 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop12 !== void 0 && (_propertyDetails$Prop13 = _propertyDetails$Prop12.address) !== null && _propertyDetails$Prop13 !== void 0 && _propertyDetails$Prop13.landmark) {
42565
+ propertyAddress += ", ";
42566
+ }
42567
+ }
42568
+
42569
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop14 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop14 !== void 0 && (_propertyDetails$Prop15 = _propertyDetails$Prop14.address) !== null && _propertyDetails$Prop15 !== void 0 && _propertyDetails$Prop15.landmark) {
42570
+ var _propertyDetails$Prop16, _propertyDetails$Prop17, _propertyDetails$Prop18, _propertyDetails$Prop19, _propertyDetails$Prop20;
42571
+
42572
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop16 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop16 === void 0 ? void 0 : (_propertyDetails$Prop17 = _propertyDetails$Prop16.address) === null || _propertyDetails$Prop17 === void 0 ? void 0 : _propertyDetails$Prop17.landmark;
42573
+
42574
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop18 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop18 !== void 0 && (_propertyDetails$Prop19 = _propertyDetails$Prop18.address) !== null && _propertyDetails$Prop19 !== void 0 && (_propertyDetails$Prop20 = _propertyDetails$Prop19.locality) !== null && _propertyDetails$Prop20 !== void 0 && _propertyDetails$Prop20.name) {
42575
+ propertyAddress += ", ";
42576
+ }
42577
+ }
42578
+
42579
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop21 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop21 !== void 0 && (_propertyDetails$Prop22 = _propertyDetails$Prop21.address) !== null && _propertyDetails$Prop22 !== void 0 && (_propertyDetails$Prop23 = _propertyDetails$Prop22.locality) !== null && _propertyDetails$Prop23 !== void 0 && _propertyDetails$Prop23.name) {
42580
+ var _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26, _propertyDetails$Prop27, _propertyDetails$Prop28;
42581
+
42582
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop24 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop24 === void 0 ? void 0 : (_propertyDetails$Prop25 = _propertyDetails$Prop24.address) === null || _propertyDetails$Prop25 === void 0 ? void 0 : (_propertyDetails$Prop26 = _propertyDetails$Prop25.locality) === null || _propertyDetails$Prop26 === void 0 ? void 0 : _propertyDetails$Prop26.name;
42583
+
42584
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop27 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop27 !== void 0 && (_propertyDetails$Prop28 = _propertyDetails$Prop27.address) !== null && _propertyDetails$Prop28 !== void 0 && _propertyDetails$Prop28.city) {
42585
+ propertyAddress += ", ";
42586
+ }
42587
+ }
42588
+
42589
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop29 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop29 !== void 0 && (_propertyDetails$Prop30 = _propertyDetails$Prop29.address) !== null && _propertyDetails$Prop30 !== void 0 && _propertyDetails$Prop30.city) {
42590
+ var _propertyDetails$Prop31, _propertyDetails$Prop32, _propertyDetails$Prop33, _propertyDetails$Prop34;
42591
+
42592
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop31 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop31 === void 0 ? void 0 : (_propertyDetails$Prop32 = _propertyDetails$Prop31.address) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.city;
42593
+
42594
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop33 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop33 !== void 0 && (_propertyDetails$Prop34 = _propertyDetails$Prop33.address) !== null && _propertyDetails$Prop34 !== void 0 && _propertyDetails$Prop34.pincode) {
42595
+ propertyAddress += ", ";
42596
+ }
42597
+ }
42598
+
42599
+ if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop35 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop35 !== void 0 && (_propertyDetails$Prop36 = _propertyDetails$Prop35.address) !== null && _propertyDetails$Prop36 !== void 0 && _propertyDetails$Prop36.pincode) {
42600
+ var _propertyDetails$Prop37, _propertyDetails$Prop38;
42601
+
42602
+ propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : (_propertyDetails$Prop38 = _propertyDetails$Prop37.address) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.pincode;
42603
+ }
41328
42604
  }
41329
- };
41330
- var cityOfApp = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens14 = response.tradeLicenseDetail) === null || _response$tradeLicens14 === void 0 ? void 0 : (_response$tradeLicens15 = _response$tradeLicens14.address) === null || _response$tradeLicens15 === void 0 ? void 0 : _response$tradeLicens15.city);
41331
- var localityCode = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens16 = response.tradeLicenseDetail) === null || _response$tradeLicens16 === void 0 ? void 0 : (_response$tradeLicens17 = _response$tradeLicens16.address) === null || _response$tradeLicens17 === void 0 ? void 0 : (_response$tradeLicens18 = _response$tradeLicens17.locality) === null || _response$tradeLicens18 === void 0 ? void 0 : _response$tradeLicens18.code);
41332
- var tradeAddress = {
41333
- title: "TL_CHECK_ADDRESS",
41334
- values: [{
41335
- title: "CORE_COMMON_PINCODE",
41336
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens19 = response.tradeLicenseDetail) === null || _response$tradeLicens19 === void 0 ? void 0 : (_response$tradeLicens20 = _response$tradeLicens19.address) === null || _response$tradeLicens20 === void 0 ? void 0 : _response$tradeLicens20.pincode) || "NA"
41337
- }, {
41338
- title: "MYCITY_CODE_LABEL",
41339
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens21 = response.tradeLicenseDetail) === null || _response$tradeLicens21 === void 0 ? void 0 : (_response$tradeLicens22 = _response$tradeLicens21.address) === null || _response$tradeLicens22 === void 0 ? void 0 : _response$tradeLicens22.city) || "NA"
41340
- }, {
41341
- title: "TL_LOCALIZATION_LOCALITY",
41342
- value: stringReplaceAll$1(cityOfApp === null || cityOfApp === void 0 ? void 0 : cityOfApp.toUpperCase(), ".", "_") + "_REVENUE_" + localityCode
41343
- }, {
41344
- title: "TL_LOCALIZATION_BUILDING_NO",
41345
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens23 = response.tradeLicenseDetail) === null || _response$tradeLicens23 === void 0 ? void 0 : (_response$tradeLicens24 = _response$tradeLicens23.address) === null || _response$tradeLicens24 === void 0 ? void 0 : _response$tradeLicens24.doorNo) || "NA"
41346
- }, {
41347
- title: "TL_LOCALIZATION_STREET_NAME",
41348
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens25 = response.tradeLicenseDetail) === null || _response$tradeLicens25 === void 0 ? void 0 : (_response$tradeLicens26 = _response$tradeLicens25.address) === null || _response$tradeLicens26 === void 0 ? void 0 : _response$tradeLicens26.street) || "NA"
41349
- }]
41350
- };
41351
- var checkOwnerLength = (response === null || response === void 0 ? void 0 : (_response$tradeLicens27 = response.tradeLicenseDetail) === null || _response$tradeLicens27 === void 0 ? void 0 : (_response$tradeLicens28 = _response$tradeLicens27.owners) === null || _response$tradeLicens28 === void 0 ? void 0 : _response$tradeLicens28.length) || 1;
41352
- var owners = {
41353
- title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
41354
- additionalDetails: {
41355
- owners: response === null || response === void 0 ? void 0 : (_response$tradeLicens29 = response.tradeLicenseDetail) === null || _response$tradeLicens29 === void 0 ? void 0 : (_response$tradeLicens30 = _response$tradeLicens29.owners) === null || _response$tradeLicens30 === void 0 ? void 0 : _response$tradeLicens30.map(function (owner, index) {
41356
- var _response$tradeLicens31, _response$tradeLicens32;
41357
-
41358
- var subOwnerShipCategory = response !== null && response !== void 0 && (_response$tradeLicens31 = response.tradeLicenseDetail) !== null && _response$tradeLicens31 !== void 0 && _response$tradeLicens31.subOwnerShipCategory ? "COMMON_MASTERS_OWNERSHIPCATEGORY_" + stringReplaceAll$1(response === null || response === void 0 ? void 0 : (_response$tradeLicens32 = response.tradeLicenseDetail) === null || _response$tradeLicens32 === void 0 ? void 0 : _response$tradeLicens32.subOwnerShipCategory, ".", "_") : "NA";
41359
- return {
41360
- title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
41361
- values: [{
41362
- title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
41363
- value: subOwnerShipCategory
41364
- }, {
41365
- title: "TL_OWNER_S_NAME_LABEL",
41366
- value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
41367
- }, {
41368
- title: "TL_OWNER_S_MOBILE_NUM_LABEL",
41369
- value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
41370
- }, {
41371
- title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
41372
- value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
41373
- }, {
41374
- title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
41375
- value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
41376
- }, {
41377
- title: "TL_OWNER_SPECIAL_CATEGORY",
41378
- value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
41379
- }, {
41380
- title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
41381
- value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
41382
- }]
41383
- };
41384
- }),
41385
- documents: [{
41386
- title: "PT_COMMON_DOCS",
41387
- values: response === null || response === void 0 ? void 0 : (_response$tradeLicens33 = response.tradeLicenseDetail) === null || _response$tradeLicens33 === void 0 ? void 0 : (_response$tradeLicens34 = _response$tradeLicens33.applicationDocuments) === null || _response$tradeLicens34 === void 0 ? void 0 : _response$tradeLicens34.map(function (document) {
42605
+
42606
+ var employeeResponse = [];
42607
+ var tradedetails = {
42608
+ title: "TL_COMMON_TR_DETAILS",
42609
+ asSectionHeader: true,
42610
+ values: [{
42611
+ title: "TL_FINANCIAL_YEAR_LABEL",
42612
+ value: response !== null && response !== void 0 && response.financialYear ? "FY" + (response === null || response === void 0 ? void 0 : response.financialYear) : "NA"
42613
+ }, {
42614
+ title: "TL_NEW_TRADE_DETAILS_LIC_TYPE_LABEL",
42615
+ value: response !== null && response !== void 0 && response.licenseType ? "TRADELICENSE_LICENSETYPE_" + (response === null || response === void 0 ? void 0 : response.licenseType) : "NA"
42616
+ }, {
42617
+ title: "TL_COMMON_TABLE_COL_TRD_NAME",
42618
+ value: response === null || response === void 0 ? void 0 : response.tradeName
42619
+ }, {
42620
+ title: "TL_NEW_TRADE_DETAILS_STRUCT_TYPE_LABEL",
42621
+ value: response !== null && response !== void 0 && (_response$tradeLicens2 = response.tradeLicenseDetail) !== null && _response$tradeLicens2 !== void 0 && _response$tradeLicens2.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens3 = response.tradeLicenseDetail) === null || _response$tradeLicens3 === void 0 ? void 0 : (_response$tradeLicens4 = _response$tradeLicens3.structureType) === null || _response$tradeLicens4 === void 0 ? void 0 : _response$tradeLicens4.split(".")[0]) : "NA"
42622
+ }, {
42623
+ title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
42624
+ value: response !== null && response !== void 0 && (_response$tradeLicens5 = response.tradeLicenseDetail) !== null && _response$tradeLicens5 !== void 0 && _response$tradeLicens5.structureType ? "COMMON_MASTERS_STRUCTURETYPE_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens6 = response.tradeLicenseDetail) === null || _response$tradeLicens6 === void 0 ? void 0 : _response$tradeLicens6.structureType, ".", "_") : "NA"
42625
+ }, {
42626
+ title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
42627
+ value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
42628
+ }, {
42629
+ title: "TL_NEW_GST_NUMBER_LABEL",
42630
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens7 = response.tradeLicenseDetail) === null || _response$tradeLicens7 === void 0 ? void 0 : (_response$tradeLicens8 = _response$tradeLicens7.additionalDetail) === null || _response$tradeLicens8 === void 0 ? void 0 : _response$tradeLicens8.gstNo) || "NA"
42631
+ }, {
42632
+ title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
42633
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.operationalArea) || "NA"
42634
+ }, {
42635
+ title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
42636
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens10 = response.tradeLicenseDetail) === null || _response$tradeLicens10 === void 0 ? void 0 : _response$tradeLicens10.noOfEmployees) || "NA"
42637
+ }]
42638
+ };
42639
+ var tradeUnits = {
42640
+ title: "TL_TRADE_UNITS_HEADER",
42641
+ additionalDetails: {
42642
+ units: response === null || response === void 0 ? void 0 : (_response$tradeLicens11 = response.tradeLicenseDetail) === null || _response$tradeLicens11 === void 0 ? void 0 : (_response$tradeLicens12 = _response$tradeLicens11.tradeUnits) === null || _response$tradeLicens12 === void 0 ? void 0 : _response$tradeLicens12.map(function (unit, index) {
42643
+ var _unit$tradeType, _unit$tradeType2;
42644
+
42645
+ var tradeSubType = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
42646
+ tradeSubType = stringReplaceAll$2(tradeSubType, "-", "_");
41388
42647
  return {
41389
- title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
41390
- documentType: document === null || document === void 0 ? void 0 : document.documentType,
41391
- documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
41392
- fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42648
+ title: "TL_UNIT_HEADER",
42649
+ values: [{
42650
+ title: "TRADELICENSE_TRADECATEGORY_LABEL",
42651
+ value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType = unit.tradeType) === null || _unit$tradeType === void 0 ? void 0 : _unit$tradeType.split(".")[0]) : "NA"
42652
+ }, {
42653
+ title: "TRADELICENSE_TRADETYPE_LABEL",
42654
+ value: unit !== null && unit !== void 0 && unit.tradeType ? "TRADELICENSE_TRADETYPE_" + (unit === null || unit === void 0 ? void 0 : (_unit$tradeType2 = unit.tradeType) === null || _unit$tradeType2 === void 0 ? void 0 : _unit$tradeType2.split(".")[1]) : "NA"
42655
+ }, {
42656
+ title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
42657
+ value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
42658
+ }, {
42659
+ title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
42660
+ value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
42661
+ }, {
42662
+ title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
42663
+ value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
42664
+ }]
41393
42665
  };
41394
42666
  })
41395
- }]
41396
- }
41397
- };
42667
+ }
42668
+ };
42669
+ var accessories = {
42670
+ title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
42671
+ additionalDetails: {
42672
+ accessories: response === null || response === void 0 ? void 0 : (_response$tradeLicens13 = response.tradeLicenseDetail) === null || _response$tradeLicens13 === void 0 ? void 0 : (_response$tradeLicens14 = _response$tradeLicens13.accessories) === null || _response$tradeLicens14 === void 0 ? void 0 : _response$tradeLicens14.map(function (unit, index) {
42673
+ var accessoryCategory = "NA";
41398
42674
 
41399
- if ((response === null || response === void 0 ? void 0 : response.workflowCode) == "NewTL" && (response === null || response === void 0 ? void 0 : response.status) !== "APPROVED") {
41400
- var _response$tradeLicens35, _response$tradeLicens36;
42675
+ if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
42676
+ accessoryCategory = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
42677
+ accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$2(accessoryCategory, "-", "_");
42678
+ }
41401
42679
 
41402
- var details = {
41403
- title: "",
42680
+ return {
42681
+ title: "TL_ACCESSORY_LABEL",
42682
+ values: [{
42683
+ title: "TL_NEW_TRADE_DETAILS_ACC_LABEL",
42684
+ value: accessoryCategory
42685
+ }, {
42686
+ title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
42687
+ value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
42688
+ }, {
42689
+ title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
42690
+ value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
42691
+ }, {
42692
+ title: "TL_ACCESSORY_COUNT_LABEL",
42693
+ value: (unit === null || unit === void 0 ? void 0 : unit.count) || "NA"
42694
+ }]
42695
+ };
42696
+ })
42697
+ }
42698
+ };
42699
+ var PropertyDetail = {
42700
+ title: "PT_DETAILS",
41404
42701
  values: [{
41405
- title: "TL_COMMON_TABLE_COL_APP_NO",
41406
- value: (response === null || response === void 0 ? void 0 : response.applicationNumber) || "NA"
42702
+ title: "TL_PROPERTY_ID",
42703
+ value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties) === null || _propertyDetails$Prop39 === void 0 ? void 0 : (_propertyDetails$Prop40 = _propertyDetails$Prop39[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId) || "NA"
42704
+ }, {
42705
+ title: "PT_OWNER_NAME",
42706
+ value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties) === null || _propertyDetails$Prop41 === void 0 ? void 0 : (_propertyDetails$Prop42 = _propertyDetails$Prop41[0]) === null || _propertyDetails$Prop42 === void 0 ? void 0 : (_propertyDetails$Prop43 = _propertyDetails$Prop42.owners[0]) === null || _propertyDetails$Prop43 === void 0 ? void 0 : _propertyDetails$Prop43.name) || "NA"
41407
42707
  }, {
41408
- title: "TL_APPLICATION_CHALLAN_LABEL",
41409
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens35 = response.tradeLicenseDetail) === null || _response$tradeLicens35 === void 0 ? void 0 : _response$tradeLicens35.channel) && "TL_CHANNEL_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens36 = response.tradeLicenseDetail) === null || _response$tradeLicens36 === void 0 ? void 0 : _response$tradeLicens36.channel) || "NA"
42708
+ title: "PROPERTY_ADDRESS",
42709
+ value: propertyAddress || "NA"
42710
+ }, {
42711
+ title: "TL_VIEW_PROPERTY_DETAIL",
42712
+ to: "/digit-ui/employee/commonpt/view-property?propertyId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop44 = propertyDetails.Properties) === null || _propertyDetails$Prop44 === void 0 ? void 0 : (_propertyDetails$Prop45 = _propertyDetails$Prop44[0]) === null || _propertyDetails$Prop45 === void 0 ? void 0 : _propertyDetails$Prop45.propertyId) + "&tenantId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop46 = propertyDetails.Properties) === null || _propertyDetails$Prop46 === void 0 ? void 0 : (_propertyDetails$Prop47 = _propertyDetails$Prop46[0]) === null || _propertyDetails$Prop47 === void 0 ? void 0 : _propertyDetails$Prop47.tenantId),
42713
+ value: "",
42714
+ isLink: true
41410
42715
  }]
41411
42716
  };
41412
- response && employeeResponse.push(details);
41413
- }
42717
+ var cityOfApp = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens15 = response.tradeLicenseDetail) === null || _response$tradeLicens15 === void 0 ? void 0 : (_response$tradeLicens16 = _response$tradeLicens15.address) === null || _response$tradeLicens16 === void 0 ? void 0 : _response$tradeLicens16.city);
42718
+ var localityCode = cloneDeep_1(response === null || response === void 0 ? void 0 : (_response$tradeLicens17 = response.tradeLicenseDetail) === null || _response$tradeLicens17 === void 0 ? void 0 : (_response$tradeLicens18 = _response$tradeLicens17.address) === null || _response$tradeLicens18 === void 0 ? void 0 : (_response$tradeLicens19 = _response$tradeLicens18.locality) === null || _response$tradeLicens19 === void 0 ? void 0 : _response$tradeLicens19.code);
42719
+ var tradeAddress = {
42720
+ title: "TL_CHECK_ADDRESS",
42721
+ values: [{
42722
+ title: "CORE_COMMON_PINCODE",
42723
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens20 = response.tradeLicenseDetail) === null || _response$tradeLicens20 === void 0 ? void 0 : (_response$tradeLicens21 = _response$tradeLicens20.address) === null || _response$tradeLicens21 === void 0 ? void 0 : _response$tradeLicens21.pincode) || "NA"
42724
+ }, {
42725
+ title: "MYCITY_CODE_LABEL",
42726
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens22 = response.tradeLicenseDetail) === null || _response$tradeLicens22 === void 0 ? void 0 : (_response$tradeLicens23 = _response$tradeLicens22.address) === null || _response$tradeLicens23 === void 0 ? void 0 : _response$tradeLicens23.city) || "NA"
42727
+ }, {
42728
+ title: "TL_LOCALIZATION_LOCALITY",
42729
+ value: stringReplaceAll$2(cityOfApp === null || cityOfApp === void 0 ? void 0 : cityOfApp.toUpperCase(), ".", "_") + "_REVENUE_" + localityCode
42730
+ }, {
42731
+ title: "TL_LOCALIZATION_BUILDING_NO",
42732
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens24 = response.tradeLicenseDetail) === null || _response$tradeLicens24 === void 0 ? void 0 : (_response$tradeLicens25 = _response$tradeLicens24.address) === null || _response$tradeLicens25 === void 0 ? void 0 : _response$tradeLicens25.doorNo) || "NA"
42733
+ }, {
42734
+ title: "TL_LOCALIZATION_STREET_NAME",
42735
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens26 = response.tradeLicenseDetail) === null || _response$tradeLicens26 === void 0 ? void 0 : (_response$tradeLicens27 = _response$tradeLicens26.address) === null || _response$tradeLicens27 === void 0 ? void 0 : _response$tradeLicens27.street) || "NA"
42736
+ }]
42737
+ };
42738
+ var checkOwnerLength = (response === null || response === void 0 ? void 0 : (_response$tradeLicens28 = response.tradeLicenseDetail) === null || _response$tradeLicens28 === void 0 ? void 0 : (_response$tradeLicens29 = _response$tradeLicens28.owners) === null || _response$tradeLicens29 === void 0 ? void 0 : _response$tradeLicens29.length) || 1;
42739
+ var owners = response !== null && response !== void 0 && (_response$tradeLicens30 = response.tradeLicenseDetail) !== null && _response$tradeLicens30 !== void 0 && _response$tradeLicens30.subOwnerShipCategory.includes("INSTITUTIONAL") ? {
42740
+ title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
42741
+ additionalDetails: {
42742
+ owners: response === null || response === void 0 ? void 0 : (_response$tradeLicens31 = response.tradeLicenseDetail) === null || _response$tradeLicens31 === void 0 ? void 0 : (_response$tradeLicens32 = _response$tradeLicens31.owners) === null || _response$tradeLicens32 === void 0 ? void 0 : _response$tradeLicens32.map(function (owner, index) {
42743
+ var _response$tradeLicens33, _response$tradeLicens34, _response$tradeLicens35, _response$tradeLicens36, _response$tradeLicens37, _response$tradeLicens38, _response$tradeLicens39, _response$tradeLicens40, _response$tradeLicens41, _response$tradeLicens42, _response$tradeLicens43, _response$tradeLicens44, _response$tradeLicens45, _response$tradeLicens46;
41414
42744
 
41415
- response && employeeResponse.push(tradedetails);
41416
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens37 = response.tradeLicenseDetail) === null || _response$tradeLicens37 === void 0 ? void 0 : _response$tradeLicens37.tradeUnits) && employeeResponse.push(tradeUnits);
41417
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens38 = response.tradeLicenseDetail) === null || _response$tradeLicens38 === void 0 ? void 0 : _response$tradeLicens38.accessories) && employeeResponse.push(accessories);
41418
- response && employeeResponse.push(tradeAddress);
41419
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens39 = response.tradeLicenseDetail) === null || _response$tradeLicens39 === void 0 ? void 0 : _response$tradeLicens39.owners) && employeeResponse.push(owners);
41420
- return {
41421
- tenantId: response.tenantId,
41422
- applicationDetails: employeeResponse,
41423
- additionalDetails: response === null || response === void 0 ? void 0 : response.additionalDetails,
41424
- applicationData: response,
41425
- numOfApplications: numOfApplications
41426
- };
41427
- }
42745
+ var subOwnerShipCategory = response !== null && response !== void 0 && (_response$tradeLicens33 = response.tradeLicenseDetail) !== null && _response$tradeLicens33 !== void 0 && _response$tradeLicens33.subOwnerShipCategory ? "COMMON_MASTERS_OWNERSHIPCATEGORY_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens34 = response.tradeLicenseDetail) === null || _response$tradeLicens34 === void 0 ? void 0 : _response$tradeLicens34.subOwnerShipCategory, ".", "_") : "NA";
42746
+ return {
42747
+ title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
42748
+ values: [{
42749
+ title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
42750
+ value: subOwnerShipCategory
42751
+ }, {
42752
+ title: "TL_INSTITUTION_NAME_LABEL",
42753
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens35 = response.tradeLicenseDetail) === null || _response$tradeLicens35 === void 0 ? void 0 : (_response$tradeLicens36 = _response$tradeLicens35.institution) === null || _response$tradeLicens36 === void 0 ? void 0 : _response$tradeLicens36.instituionName) || "NA"
42754
+ }, {
42755
+ title: "TL_NEW_OWNER_DESIG_LABEL",
42756
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens37 = response.tradeLicenseDetail) === null || _response$tradeLicens37 === void 0 ? void 0 : (_response$tradeLicens38 = _response$tradeLicens37.institution) === null || _response$tradeLicens38 === void 0 ? void 0 : _response$tradeLicens38.designation) || "NA"
42757
+ }, {
42758
+ title: "TL_TELEPHONE_NUMBER_LABEL",
42759
+ value: response !== null && response !== void 0 && (_response$tradeLicens39 = response.tradeLicenseDetail) !== null && _response$tradeLicens39 !== void 0 && (_response$tradeLicens40 = _response$tradeLicens39.institution) !== null && _response$tradeLicens40 !== void 0 && _response$tradeLicens40.contactNo || (response === null || response === void 0 ? void 0 : (_response$tradeLicens41 = response.tradeLicenseDetail) === null || _response$tradeLicens41 === void 0 ? void 0 : (_response$tradeLicens42 = _response$tradeLicens41.institution) === null || _response$tradeLicens42 === void 0 ? void 0 : _response$tradeLicens42.contactNo) !== "" ? response === null || response === void 0 ? void 0 : (_response$tradeLicens43 = response.tradeLicenseDetail) === null || _response$tradeLicens43 === void 0 ? void 0 : (_response$tradeLicens44 = _response$tradeLicens43.institution) === null || _response$tradeLicens44 === void 0 ? void 0 : _response$tradeLicens44.contactNo : "NA"
42760
+ }, {
42761
+ title: "TL_OWNER_S_MOBILE_NUM_LABEL",
42762
+ value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
42763
+ }, {
42764
+ title: "TL_NEW_OWNER_DETAILS_NAME_LABEL",
42765
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens45 = response.tradeLicenseDetail) === null || _response$tradeLicens45 === void 0 ? void 0 : (_response$tradeLicens46 = _response$tradeLicens45.institution) === null || _response$tradeLicens46 === void 0 ? void 0 : _response$tradeLicens46.name) || "NA"
42766
+ }, {
42767
+ title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
42768
+ value: owner !== null && owner !== void 0 && owner.emailId || (owner === null || owner === void 0 ? void 0 : owner.emailId) !== "" ? owner === null || owner === void 0 ? void 0 : owner.emailId : "NA"
42769
+ }]
42770
+ };
42771
+ }),
42772
+ documents: [{
42773
+ title: "PT_COMMON_DOCS",
42774
+ values: response === null || response === void 0 ? void 0 : (_response$tradeLicens47 = response.tradeLicenseDetail) === null || _response$tradeLicens47 === void 0 ? void 0 : (_response$tradeLicens48 = _response$tradeLicens47.applicationDocuments) === null || _response$tradeLicens48 === void 0 ? void 0 : _response$tradeLicens48.map(function (document) {
42775
+ return {
42776
+ title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
42777
+ documentType: document === null || document === void 0 ? void 0 : document.documentType,
42778
+ documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
42779
+ fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42780
+ };
42781
+ })
42782
+ }]
42783
+ }
42784
+ } : {
42785
+ title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
42786
+ additionalDetails: {
42787
+ owners: response === null || response === void 0 ? void 0 : (_response$tradeLicens49 = response.tradeLicenseDetail) === null || _response$tradeLicens49 === void 0 ? void 0 : (_response$tradeLicens50 = _response$tradeLicens49.owners) === null || _response$tradeLicens50 === void 0 ? void 0 : _response$tradeLicens50.map(function (owner, index) {
42788
+ var _response$tradeLicens51, _response$tradeLicens52;
41428
42789
 
41429
- var numOfApplications = [];
42790
+ var subOwnerShipCategory = response !== null && response !== void 0 && (_response$tradeLicens51 = response.tradeLicenseDetail) !== null && _response$tradeLicens51 !== void 0 && _response$tradeLicens51.subOwnerShipCategory ? "COMMON_MASTERS_OWNERSHIPCATEGORY_" + stringReplaceAll$2(response === null || response === void 0 ? void 0 : (_response$tradeLicens52 = response.tradeLicenseDetail) === null || _response$tradeLicens52 === void 0 ? void 0 : _response$tradeLicens52.subOwnerShipCategory, ".", "_") : "NA";
42791
+ return {
42792
+ title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
42793
+ values: [{
42794
+ title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
42795
+ value: subOwnerShipCategory
42796
+ }, {
42797
+ title: "TL_OWNER_S_NAME_LABEL",
42798
+ value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
42799
+ }, {
42800
+ title: "TL_OWNER_S_MOBILE_NUM_LABEL",
42801
+ value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
42802
+ }, {
42803
+ title: "TL_GUARDIAN_S_NAME_LABEL",
42804
+ value: (owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName) || "NA"
42805
+ }, {
42806
+ title: "TL_RELATIONSHIP_WITH_GUARDIAN_LABEL",
42807
+ value: (owner === null || owner === void 0 ? void 0 : owner.relationship) || "NA"
42808
+ }, {
42809
+ title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
42810
+ value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
42811
+ }, {
42812
+ title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
42813
+ value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
42814
+ }, {
42815
+ title: "TL_OWNER_SPECIAL_CATEGORY",
42816
+ value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
42817
+ }, {
42818
+ title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
42819
+ value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
42820
+ }]
42821
+ };
42822
+ }),
42823
+ documents: [{
42824
+ title: "PT_COMMON_DOCS",
42825
+ values: response === null || response === void 0 ? void 0 : (_response$tradeLicens53 = response.tradeLicenseDetail) === null || _response$tradeLicens53 === void 0 ? void 0 : (_response$tradeLicens54 = _response$tradeLicens53.applicationDocuments) === null || _response$tradeLicens54 === void 0 ? void 0 : _response$tradeLicens54.map(function (document) {
42826
+ return {
42827
+ title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
42828
+ documentType: document === null || document === void 0 ? void 0 : document.documentType,
42829
+ documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
42830
+ fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42831
+ };
42832
+ })
42833
+ }]
42834
+ }
42835
+ };
41430
42836
 
41431
- var _temp = function () {
41432
- if (response !== null && response !== void 0 && response.licenseNumber) {
41433
- var licenseNumbers = response === null || response === void 0 ? void 0 : response.licenseNumber;
41434
- var filters = {
41435
- licenseNumbers: licenseNumbers,
41436
- offset: 0
42837
+ if ((response === null || response === void 0 ? void 0 : response.workflowCode) == "NewTL" && (response === null || response === void 0 ? void 0 : response.status) !== "APPROVED") {
42838
+ var _response$tradeLicens55, _response$tradeLicens56;
42839
+
42840
+ var details = {
42841
+ title: "",
42842
+ values: [{
42843
+ title: "TL_COMMON_TABLE_COL_APP_NO",
42844
+ value: (response === null || response === void 0 ? void 0 : response.applicationNumber) || "NA"
42845
+ }, {
42846
+ title: "TL_APPLICATION_CHALLAN_LABEL",
42847
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens55 = response.tradeLicenseDetail) === null || _response$tradeLicens55 === void 0 ? void 0 : _response$tradeLicens55.channel) && "TL_CHANNEL_" + (response === null || response === void 0 ? void 0 : (_response$tradeLicens56 = response.tradeLicenseDetail) === null || _response$tradeLicens56 === void 0 ? void 0 : _response$tradeLicens56.channel) || "NA"
42848
+ }]
42849
+ };
42850
+ response && employeeResponse.push(details);
42851
+ }
42852
+
42853
+ response && employeeResponse.push(tradedetails);
42854
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens57 = response.tradeLicenseDetail) === null || _response$tradeLicens57 === void 0 ? void 0 : _response$tradeLicens57.tradeUnits) && employeeResponse.push(tradeUnits);
42855
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens58 = response.tradeLicenseDetail) === null || _response$tradeLicens58 === void 0 ? void 0 : _response$tradeLicens58.accessories) && employeeResponse.push(accessories);
42856
+ (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop48 = propertyDetails.Properties) === null || _propertyDetails$Prop48 === void 0 ? void 0 : _propertyDetails$Prop48.length) > 0 && employeeResponse.push(PropertyDetail);
42857
+ response && !((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop49 = propertyDetails.Properties) === null || _propertyDetails$Prop49 === void 0 ? void 0 : _propertyDetails$Prop49.length) > 0) && employeeResponse.push(tradeAddress);
42858
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens59 = response.tradeLicenseDetail) === null || _response$tradeLicens59 === void 0 ? void 0 : _response$tradeLicens59.owners) && employeeResponse.push(owners);
42859
+ return {
42860
+ tenantId: response.tenantId,
42861
+ applicationDetails: employeeResponse,
42862
+ additionalDetails: response === null || response === void 0 ? void 0 : response.additionalDetails,
42863
+ applicationData: response,
42864
+ numOfApplications: numOfApplications
41437
42865
  };
41438
- return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
41439
- numOfApplications = _TLSearch$numberOfApp;
41440
- });
41441
42866
  }
41442
- }();
41443
42867
 
41444
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
42868
+ var numOfApplications = [];
42869
+
42870
+ var _temp = function () {
42871
+ if (response !== null && response !== void 0 && response.licenseNumber) {
42872
+ var licenseNumbers = response === null || response === void 0 ? void 0 : response.licenseNumber;
42873
+ var filters = {
42874
+ licenseNumbers: licenseNumbers,
42875
+ offset: 0
42876
+ };
42877
+ return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
42878
+ numOfApplications = _TLSearch$numberOfApp;
42879
+ });
42880
+ }
42881
+ }();
42882
+
42883
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
42884
+ }
42885
+
42886
+ var _response$tradeLicens = response === null || response === void 0 ? void 0 : (_response$tradeLicens60 = response.tradeLicenseDetail) === null || _response$tradeLicens60 === void 0 ? void 0 : (_response$tradeLicens61 = _response$tradeLicens60.additionalDetail) === null || _response$tradeLicens61 === void 0 ? void 0 : _response$tradeLicens61.propertyId;
42887
+
42888
+ return _response$tradeLicens ? Promise.resolve(Digit.PTService.search({
42889
+ tenantId: tenantId,
42890
+ filters: {
42891
+ propertyIds: response === null || response === void 0 ? void 0 : (_response$tradeLicens62 = response.tradeLicenseDetail) === null || _response$tradeLicens62 === void 0 ? void 0 : (_response$tradeLicens63 = _response$tradeLicens62.additionalDetail) === null || _response$tradeLicens63 === void 0 ? void 0 : _response$tradeLicens63.propertyId
42892
+ }
42893
+ })).then(_temp3) : _temp3(_response$tradeLicens);
41445
42894
  });
41446
42895
  } catch (e) {
41447
42896
  return Promise.reject(e);
@@ -41517,6 +42966,9 @@ var useTLGenderMDMS = function useTLGenderMDMS(tenantId, moduleCode, type, confi
41517
42966
  switch (type) {
41518
42967
  case "GenderType":
41519
42968
  return useTLGenders();
42969
+
42970
+ default:
42971
+ return null;
41520
42972
  }
41521
42973
  };
41522
42974
 
@@ -41787,21 +43239,45 @@ var ReceiptsService = {
41787
43239
  }, filters, searchParams)
41788
43240
  });
41789
43241
  },
41790
- receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey) {
43242
+ receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey, receiptNumbers) {
43243
+ var newParam = {
43244
+ bussinessService: bussinessService,
43245
+ tenantId: tenantId
43246
+ };
43247
+
43248
+ if (receiptNumbers) {
43249
+ newParam['receiptNumbers'] = receiptNumbers;
43250
+ } else {
43251
+ newParam['consumerCode'] = consumerCode;
43252
+ }
43253
+
41791
43254
  return Request({
41792
- url: Urls.receipts.receipt_download,
43255
+ url: Urls.mcollect.receipt_download,
41793
43256
  data: {},
41794
43257
  useCache: true,
41795
43258
  method: "POST",
41796
- params: {
41797
- bussinessService: bussinessService,
41798
- consumerCode: consumerCode,
41799
- tenantId: tenantId,
41800
- pdfKey: pdfKey
41801
- },
43259
+ params: _extends({}, newParam),
43260
+ auth: window.location.href.includes("pt/property/my-payments") ? false : true,
43261
+ locale: true,
43262
+ userService: window.location.href.includes("pt/property/my-payments") ? false : true,
43263
+ userDownload: true
43264
+ });
43265
+ },
43266
+ bill_download: function bill_download(bussinessService, consumerCode, tenantId, pdfKey) {
43267
+ var newParam = {
43268
+ bussinessService: bussinessService,
43269
+ tenantId: tenantId,
43270
+ consumerCode: consumerCode
43271
+ };
43272
+ return Request({
43273
+ url: Urls.mcollect.bill_download,
43274
+ data: {},
43275
+ useCache: true,
43276
+ method: "POST",
43277
+ params: _extends({}, newParam),
41802
43278
  auth: true,
41803
- userService: true,
41804
43279
  locale: true,
43280
+ userService: true,
41805
43281
  userDownload: true
41806
43282
  });
41807
43283
  },
@@ -41820,7 +43296,7 @@ var ReceiptsService = {
41820
43296
  }
41821
43297
  };
41822
43298
 
41823
- var _excluded$2 = ["isLoading", "error", "data"];
43299
+ var _excluded$3 = ["isLoading", "error", "data"];
41824
43300
  var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filters, isupdated, config) {
41825
43301
  if (config === void 0) {
41826
43302
  config = {};
@@ -41835,7 +43311,7 @@ var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filte
41835
43311
  isLoading = _useQuery.isLoading,
41836
43312
  error = _useQuery.error,
41837
43313
  data = _useQuery.data,
41838
- rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$2);
43314
+ rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$3);
41839
43315
 
41840
43316
  return _extends({
41841
43317
  isLoading: isLoading,
@@ -42006,6 +43482,9 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
42006
43482
 
42007
43483
  case "CancelReceiptReasonAndStatus":
42008
43484
  return useCancelReceiptReasonAndStatus();
43485
+
43486
+ default:
43487
+ return null;
42009
43488
  }
42010
43489
  };
42011
43490
 
@@ -42069,6 +43548,46 @@ var SearchMdmsTypes = {
42069
43548
  }
42070
43549
  });
42071
43550
  },
43551
+ useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
43552
+ return useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
43553
+ return MdmsService.getDataByCriteria(tenantId, {
43554
+ details: {
43555
+ tenantId: tenantId,
43556
+ moduleDetails: [{
43557
+ moduleName: "BPA",
43558
+ masterDetails: [{
43559
+ name: "BPAAppicationMapping"
43560
+ }]
43561
+ }]
43562
+ }
43563
+ }, "BPA");
43564
+ }, {
43565
+ select: function select(data) {
43566
+ var _data$BPA3, _data$BPA3$BPAAppicat;
43567
+
43568
+ return [].concat(data === null || data === void 0 ? void 0 : (_data$BPA3 = data.BPA) === null || _data$BPA3 === void 0 ? void 0 : (_data$BPA3$BPAAppicat = _data$BPA3.BPAAppicationMapping) === null || _data$BPA3$BPAAppicat === void 0 ? void 0 : _data$BPA3$BPAAppicat.filter(function (currentObject) {
43569
+ var _currentObject$roles;
43570
+
43571
+ var flag = 0;
43572
+ currentObject === null || currentObject === void 0 ? void 0 : (_currentObject$roles = currentObject.roles) === null || _currentObject$roles === void 0 ? void 0 : _currentObject$roles.map(function (bpaRole) {
43573
+ var _Digit$UserService$ge, _Digit$UserService$ge2;
43574
+
43575
+ var found = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.roles.some(function (role) {
43576
+ return (role === null || role === void 0 ? void 0 : role.code) === bpaRole;
43577
+ });
43578
+ if (found == true) flag = 1;
43579
+ });
43580
+ if (flag == 1) return true;else return false;
43581
+ }).map(function (type) {
43582
+ return {
43583
+ code: type.code,
43584
+ i18nKey: "BPA_SERVICETYPE_" + type.code,
43585
+ applicationType: type.applicationType
43586
+ };
43587
+ }));
43588
+ }
43589
+ });
43590
+ },
42072
43591
  getFormConfig: function getFormConfig(tenantId, config) {
42073
43592
  return useQuery([tenantId, "FORM_CONFIG"], function () {
42074
43593
  return MdmsService.getDataByCriteria(tenantId, {
@@ -42139,15 +43658,15 @@ var useMDMS$4 = function useMDMS(tenantId, moduleCode, type, config, payload) {
42139
43658
  }
42140
43659
  };
42141
43660
 
42142
- var mapWfBybusinessId$1 = function mapWfBybusinessId(workflowData) {
43661
+ var mapWfBybusinessId$2 = function mapWfBybusinessId(workflowData) {
42143
43662
  return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
42144
43663
  acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
42145
43664
  return acc;
42146
43665
  }, {});
42147
43666
  };
42148
43667
 
42149
- var combineResponse = function combineResponse(applications, workflowData, totalCount) {
42150
- var workflowInstances = mapWfBybusinessId$1(workflowData);
43668
+ var combineResponse$1 = function combineResponse(applications, workflowData, totalCount) {
43669
+ var workflowInstances = mapWfBybusinessId$2(workflowData);
42151
43670
  return applications.map(function (application) {
42152
43671
  var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5;
42153
43672
 
@@ -42166,7 +43685,6 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
42166
43685
 
42167
43686
  return useQuery(['BPA_REG_WORK_SEARCH', tenantId, filters, params], function () {
42168
43687
  try {
42169
- var userInfo = Digit.UserService.getUser();
42170
43688
  return Promise.resolve(Digit.OBPSService.BPAREGSearch(tenantId, filters, params)).then(function (response) {
42171
43689
  var businessIds = response === null || response === void 0 ? void 0 : response.Licenses.map(function (application) {
42172
43690
  return application.applicationNumber;
@@ -42174,7 +43692,7 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
42174
43692
  return Promise.resolve(Digit.WorkflowService.getAllApplication(Digit.ULBService.getStateId(), {
42175
43693
  businessIds: businessIds.join()
42176
43694
  })).then(function (workflowRes) {
42177
- return combineResponse(response === null || response === void 0 ? void 0 : response.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, response === null || response === void 0 ? void 0 : response.Count);
43695
+ return combineResponse$1(response === null || response === void 0 ? void 0 : response.Licenses, workflowRes === null || workflowRes === void 0 ? void 0 : workflowRes.ProcessInstances, response === null || response === void 0 ? void 0 : response.Count);
42178
43696
  });
42179
43697
  });
42180
43698
  } catch (e) {
@@ -42501,14 +44019,16 @@ var OBPSService = {
42501
44019
  BPADetailsPage: function (tenantId, filters) {
42502
44020
  try {
42503
44021
  return Promise.resolve(OBPSService.BPASearch(tenantId, filters)).then(function (response) {
42504
- var _response$BPA;
44022
+ var _response$BPA, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA3, _response$BPA3$, _response$BPA3$$addit;
42505
44023
 
42506
44024
  if (!(response !== null && response !== void 0 && (_response$BPA = response.BPA) !== null && _response$BPA !== void 0 && _response$BPA.length)) {
42507
44025
  return;
42508
44026
  }
42509
44027
 
42510
- var _response$BPA2 = response === null || response === void 0 ? void 0 : response.BPA,
42511
- BPA = _response$BPA2[0];
44028
+ sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA2 = response.BPA) !== null && _response$BPA2 !== void 0 && (_response$BPA2$ = _response$BPA2[0]) !== null && _response$BPA2$ !== void 0 && (_response$BPA2$$addit = _response$BPA2$.additionalDetails) !== null && _response$BPA2$$addit !== void 0 && _response$BPA2$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA3 = response.BPA) === null || _response$BPA3 === void 0 ? void 0 : (_response$BPA3$ = _response$BPA3[0]) === null || _response$BPA3$ === void 0 ? void 0 : (_response$BPA3$$addit = _response$BPA3$.additionalDetails) === null || _response$BPA3$$addit === void 0 ? void 0 : _response$BPA3$$addit.typeOfArchitect : "ARCHITECT"));
44029
+
44030
+ var _response$BPA4 = response === null || response === void 0 ? void 0 : response.BPA,
44031
+ BPA = _response$BPA4[0];
42512
44032
 
42513
44033
  return Promise.resolve(OBPSService.scrutinyDetails(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
42514
44034
  edcrNumber: BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber
@@ -42535,8 +44055,23 @@ var OBPSService = {
42535
44055
  ocdcrNumber: BPA !== null && BPA !== void 0 && BPA.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA = bpaResponse.BPA) === null || _bpaResponse$BPA === void 0 ? void 0 : (_bpaResponse$BPA$ = _bpaResponse$BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : _bpaResponse$BPA$.edcrNumber,
42536
44056
  edcrNumber: bpaResponse !== null && bpaResponse !== void 0 && (_bpaResponse$BPA2 = bpaResponse.BPA) !== null && _bpaResponse$BPA2 !== void 0 && (_bpaResponse$BPA2$ = _bpaResponse$BPA2[0]) !== null && _bpaResponse$BPA2$ !== void 0 && _bpaResponse$BPA2$.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA3 = bpaResponse.BPA) === null || _bpaResponse$BPA3 === void 0 ? void 0 : (_bpaResponse$BPA3$ = _bpaResponse$BPA3[0]) === null || _bpaResponse$BPA3$ === void 0 ? void 0 : _bpaResponse$BPA3$.edcrNumber
42537
44057
  };
44058
+
44059
+ function ConvertEpochToValidityDate(dateEpoch) {
44060
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
44061
+ return "NA";
44062
+ }
44063
+
44064
+ var dateFromApi = new Date(dateEpoch);
44065
+ var month = dateFromApi.getMonth() + 1;
44066
+ var day = dateFromApi.getDate();
44067
+ var year = dateFromApi.getFullYear() - 3;
44068
+ month = (month > 9 ? "" : "0") + month;
44069
+ day = (day > 9 ? "" : "0") + day;
44070
+ return day + "/" + month + "/" + year;
44071
+ }
44072
+
42538
44073
  return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
42539
- var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail8, _BPA$additionalDetail9, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail10, _BPA$additionalDetail11, _BPA$additionalDetail12, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _details;
44074
+ var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail9, _BPA$additionalDetail10, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail11, _BPA$additionalDetail12, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _details;
42540
44075
 
42541
44076
  var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
42542
44077
  var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
@@ -42647,6 +44182,18 @@ var OBPSService = {
42647
44182
  value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
42648
44183
  }]
42649
44184
  };
44185
+
44186
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
44187
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
44188
+
44189
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
44190
+ title: "BPA_PERMIT_APP_NUMBER",
44191
+ to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
44192
+ value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
44193
+ isLink: true
44194
+ }]);
44195
+ }
44196
+
42650
44197
  var permitcondn = [];
42651
44198
  (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : _BPA$additionalDetail3.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail4 = BPA.additionalDetails) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval.map(function (ob, index) {
42652
44199
  permitcondn.push({
@@ -42671,7 +44218,7 @@ var OBPSService = {
42671
44218
  }
42672
44219
 
42673
44220
  if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
42674
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7;
44221
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7, _BPA$additionalDetail8;
42675
44222
 
42676
44223
  applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
42677
44224
  title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
@@ -42679,7 +44226,7 @@ var OBPSService = {
42679
44226
  });
42680
44227
  applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
42681
44228
  title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
42682
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? format(new Date(BPA === null || BPA === void 0 ? void 0 : BPA.applicationDate), 'dd/MM/yyyy') + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.validityDate), 'dd/MM/yyyy') : "NA"
44229
+ value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.validityDate) + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.validityDate), 'dd/MM/yyyy') : "NA"
42683
44230
  });
42684
44231
  }
42685
44232
 
@@ -42728,11 +44275,11 @@ var OBPSService = {
42728
44275
  isNotTranslated: true
42729
44276
  }, {
42730
44277
  title: "BPA_HOLDING_NUMBER_LABEL",
42731
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.holdingNo) || "NA",
44278
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.holdingNo) || "NA",
42732
44279
  isNotTranslated: true
42733
44280
  }, {
42734
44281
  title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
42735
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.registrationDetails) || "NA",
44282
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.registrationDetails) || "NA",
42736
44283
  isNotTranslated: true
42737
44284
  }]
42738
44285
  };
@@ -42925,7 +44472,7 @@ var OBPSService = {
42925
44472
  var val;
42926
44473
  var i;
42927
44474
  var FieldInspectionData = [];
42928
- inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : (_BPA$additionalDetail11 = _BPA$additionalDetail10.fieldinspection_pending) === null || _BPA$additionalDetail11 === void 0 ? void 0 : (_BPA$additionalDetail12 = _BPA$additionalDetail11[0]) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.questions.length) > 0 && inspectionReport.map(function (ob, index) {
44475
+ inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : (_BPA$additionalDetail12 = _BPA$additionalDetail11.fieldinspection_pending) === null || _BPA$additionalDetail12 === void 0 ? void 0 : (_BPA$additionalDetail13 = _BPA$additionalDetail12[0]) === null || _BPA$additionalDetail13 === void 0 ? void 0 : _BPA$additionalDetail13.questions.length) > 0 && inspectionReport.map(function (ob, index) {
42929
44476
  if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
42930
44477
  title: ob.title,
42931
44478
  additionalDetails: {
@@ -42966,10 +44513,10 @@ var OBPSService = {
42966
44513
  var fiReports = {
42967
44514
  title: "",
42968
44515
  isFieldInspection: true,
42969
- isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail13 = BPA.additionalDetails) === null || _BPA$additionalDetail13 === void 0 ? void 0 : (_BPA$additionalDetail14 = _BPA$additionalDetail13.fieldinspection_pending) === null || _BPA$additionalDetail14 === void 0 ? void 0 : _BPA$additionalDetail14.length) > 0 ? false : true,
44516
+ isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail14 = BPA.additionalDetails) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14.fieldinspection_pending) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.length) > 0 ? false : true,
42970
44517
  additionalDetails: {
42971
44518
  values: [],
42972
- fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail15 = BPA.additionalDetails) === null || _BPA$additionalDetail15 === void 0 ? void 0 : (_BPA$additionalDetail16 = _BPA$additionalDetail15.fieldinspection_pending) === null || _BPA$additionalDetail16 === void 0 ? void 0 : _BPA$additionalDetail16.length) > 0 ? true : false
44519
+ fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? true : false
42973
44520
  }
42974
44521
  };
42975
44522
 
@@ -43009,15 +44556,15 @@ var convertMillisecondsToDays = function convertMillisecondsToDays(milliseconds)
43009
44556
  return Math.round(milliseconds / (1000 * 60 * 60 * 24));
43010
44557
  };
43011
44558
 
43012
- var mapWfBybusinessId$2 = function mapWfBybusinessId(workflowData) {
44559
+ var mapWfBybusinessId$3 = function mapWfBybusinessId(workflowData) {
43013
44560
  return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
43014
44561
  acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
43015
44562
  return acc;
43016
44563
  }, {});
43017
44564
  };
43018
44565
 
43019
- var combineResponse$1 = function combineResponse(applications, workflowData) {
43020
- var workflowInstances = mapWfBybusinessId$2(workflowData);
44566
+ var combineResponse$2 = function combineResponse(applications, workflowData) {
44567
+ var workflowInstances = mapWfBybusinessId$3(workflowData);
43021
44568
  return applications.map(function (application) {
43022
44569
  var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
43023
44570
 
@@ -43048,7 +44595,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
43048
44595
  var _exit = false;
43049
44596
 
43050
44597
  function _temp5(_result3) {
43051
- return _exit ? _result3 : combineResponse$1(response === null || response === void 0 ? void 0 : response.BPA, processInstanceArray);
44598
+ return _exit ? _result3 : combineResponse$2(response === null || response === void 0 ? void 0 : response.BPA, processInstanceArray);
43052
44599
  }
43053
44600
 
43054
44601
  var tenantMap = {},
@@ -43085,8 +44632,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
43085
44632
  })).then(function (payload) {
43086
44633
  processInstanceArray = processInstanceArray.concat(payload.ProcessInstances);
43087
44634
  });
43088
- }, function (error) {
43089
- console.error(error);
44635
+ }, function () {
43090
44636
  var _temp = [];
43091
44637
  _exit = true;
43092
44638
  return _temp;
@@ -43300,13 +44846,13 @@ var useBPADetails = function useBPADetails(tenantId, filters, config) {
43300
44846
  }, config);
43301
44847
  };
43302
44848
 
43303
- var _excluded$3 = ["tenantId", "businessService"];
44849
+ var _excluded$4 = ["tenantId", "businessService"];
43304
44850
  var useBPAREGgetbill = function useBPAREGgetbill(_ref, config) {
43305
44851
  var _Digit$UserService$ge, _Digit$UserService$ge2;
43306
44852
 
43307
44853
  var tenantId = _ref.tenantId,
43308
44854
  businessService = _ref.businessService,
43309
- filters = _objectWithoutPropertiesLoose(_ref, _excluded$3);
44855
+ filters = _objectWithoutPropertiesLoose(_ref, _excluded$4);
43310
44856
 
43311
44857
  if (config === void 0) {
43312
44858
  config = {};
@@ -43464,6 +45010,10 @@ var useBPAInbox = function useBPAInbox(_ref) {
43464
45010
  tenantId = Digit.ULBService.getStateId();
43465
45011
  }
43466
45012
 
45013
+ if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && window.location.href.includes("obps/inbox") && businessService) {
45014
+ businessService = "BPA_OC";
45015
+ }
45016
+
43467
45017
  var _filters = {
43468
45018
  tenantId: tenantId,
43469
45019
  processSearchCriteria: _extends({
@@ -43485,10 +45035,8 @@ var useBPAInbox = function useBPAInbox(_ref) {
43485
45035
  sortOrder: sortOrder
43486
45036
  } : {}, sortBy ? {
43487
45037
  sortBy: sortBy
43488
- } : {}, (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
43489
- applicationType: applicationType.map(function (item) {
43490
- return item.code;
43491
- }).join(",")
45038
+ } : {}, applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
45039
+ applicationType: applicationType
43492
45040
  } : {}, (locality === null || locality === void 0 ? void 0 : locality.length) > 0 ? {
43493
45041
  locality: locality.map(function (item) {
43494
45042
  return item.code.split("_").pop();
@@ -43568,7 +45116,7 @@ var useEDCRInbox = function useEDCRInbox(_ref2) {
43568
45116
  } : {}, status ? {
43569
45117
  status: status
43570
45118
  } : {}, sortOrder ? {
43571
- sortBy: sortOrder
45119
+ orderBy: sortOrder
43572
45120
  } : {}, appliactionType ? {
43573
45121
  appliactionType: appliactionType
43574
45122
  } : {}, {
@@ -43665,9 +45213,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43665
45213
  tenantId: tenantId,
43666
45214
  processSearchCriteria: _extends({
43667
45215
  moduleName: moduleName ? moduleName : "bpa-services",
43668
- businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? businessService.map(function (o) {
43669
- return o.code;
43670
- }) : ["BPA_LOW", "BPA", "BPA_OC"]
45216
+ businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? [businessService] : ["BPA_LOW", "BPA", "BPA_OC"]
43671
45217
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
43672
45218
  status: applicationStatus
43673
45219
  } : {}),
@@ -43675,7 +45221,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43675
45221
  assignee: assignee
43676
45222
  }, mobileNumber ? {
43677
45223
  mobileNumber: mobileNumber
43678
- } : {}, applicationType ? {
45224
+ } : {}, applicationType && applicationType.length > 0 ? {
43679
45225
  applicationType: applicationType
43680
45226
  } : {}, serviceType ? {
43681
45227
  serviceType: serviceType
@@ -43727,9 +45273,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43727
45273
  });
43728
45274
  });
43729
45275
  });
43730
- }, function (error) {
43731
- console.error("error", error);
43732
- });
45276
+ }, function () {});
43733
45277
 
43734
45278
  if (_temp3 && _temp3.then) return _temp3.then(function () {});
43735
45279
  }
@@ -43832,16 +45376,12 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
43832
45376
  var _SearchMdmsTypes$useA = SearchMdmsTypes.useApplicationTypes(tenantId),
43833
45377
  applicationTypes = _SearchMdmsTypes$useA.data;
43834
45378
 
43835
- var _SearchMdmsTypes$useS = SearchMdmsTypes.useServiceTypes(tenantId),
43836
- serviceTypes = _SearchMdmsTypes$useS.data,
43837
- isLoadingServiceTypes = _SearchMdmsTypes$useS.isLoading;
45379
+ var _SearchMdmsTypes$useB = SearchMdmsTypes.useBPAServiceTypes(tenantId),
45380
+ serviceTypes = _SearchMdmsTypes$useB.data,
45381
+ isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
43838
45382
 
43839
45383
  var ServiceTypes = useMemo(function () {
43840
- var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : [], [{
43841
- applicationType: ["BPA_STAKEHOLDER_REGISTRATION"],
43842
- code: "BPA_STAKEHOLDER_REGISTRATION",
43843
- i18nKey: "BPA_SERVICETYPE_BPA_STAKEHOLDER_REGISTRATION"
43844
- }]);
45384
+ var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
43845
45385
  return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
43846
45386
  return e.applicationType.includes(Applicationtype);
43847
45387
  }).map(function (e) {
@@ -43855,8 +45395,20 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
43855
45395
  code: "BPA_STAKEHOLDER_REGISTRATION",
43856
45396
  i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
43857
45397
  }]);
45398
+ var filteredapplicationTypes = useMemo(function () {
45399
+ return applicationTypesWithStakeholder.filter(function (curr) {
45400
+ var temp = 0;
45401
+ serviceTypes === null || serviceTypes === void 0 ? void 0 : serviceTypes.map(function (ob) {
45402
+ var found = ob && (ob === null || ob === void 0 ? void 0 : ob.applicationType) && (ob === null || ob === void 0 ? void 0 : ob.applicationType.some(function (ap) {
45403
+ return ap === curr.code;
45404
+ }));
45405
+ if (found) temp = 1;
45406
+ });
45407
+ if (temp == 1) return true;else return false;
45408
+ });
45409
+ }, [serviceTypes, applicationTypesWithStakeholder]);
43858
45410
  return {
43859
- applicationTypes: applicationTypesWithStakeholder,
45411
+ applicationTypes: filteredapplicationTypes,
43860
45412
  ServiceTypes: ServiceTypes
43861
45413
  };
43862
45414
  };
@@ -43866,23 +45418,21 @@ var useBusinessServiceBasedOnServiceType = function useBusinessServiceBasedOnSer
43866
45418
  var configData = {
43867
45419
  BUILDING_PLAN_SCRUTINY: [{
43868
45420
  code: "BPA_LOW",
43869
- i18nKey: "WF_BPA_LOW"
45421
+ i18nKey: "WF_BPA_LOW_LABEL"
43870
45422
  }, {
43871
45423
  code: "BPA",
43872
- i18nKey: "WF_BPA"
45424
+ i18nKey: "WF_BPA_LABEL"
43873
45425
  }],
43874
45426
  BUILDING_OC_PLAN_SCRUTINY: [{
45427
+ code: "BPA_OC_LOW",
45428
+ i18nKey: "WF_BPA_LOW_LABEL"
45429
+ }, {
43875
45430
  code: "BPA_OC",
43876
- i18nKey: "WF_BPA_OC"
45431
+ i18nKey: "WF_BPA_LABEL"
43877
45432
  }]
43878
45433
  };
43879
- var selectedBusinessServicesObjectin2dArray = applicationType === null || applicationType === void 0 ? void 0 : applicationType.map(function (type) {
43880
- return configData[type.code];
43881
- });
43882
- var selectedBusinessServices = (selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.length) > 0 ? selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.reduce(function (acc, curr) {
43883
- return [].concat(acc, curr);
43884
- }, []) : null;
43885
- return selectedBusinessServices;
45434
+ var selectedBusinessServicesObjectin2dArray = configData[applicationType];
45435
+ return selectedBusinessServicesObjectin2dArray;
43886
45436
  };
43887
45437
 
43888
45438
  var useBusinessServiceData = function useBusinessServiceData(tenantId, businessServices, config) {
@@ -43947,7 +45497,7 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
43947
45497
  };
43948
45498
  };
43949
45499
 
43950
- var combineResponse$2 = function combineResponse(data, users) {
45500
+ var combineResponse$3 = function combineResponse(data, users) {
43951
45501
  var _data$events;
43952
45502
 
43953
45503
  data.events = data === null || data === void 0 ? void 0 : (_data$events = data.events) === null || _data$events === void 0 ? void 0 : _data$events.map(function (event) {
@@ -43990,7 +45540,7 @@ var useInbox$2 = function useInbox(tenantId, data, filter, config) {
43990
45540
  return Promise.resolve(Digit.UserService.userSearch(null, {
43991
45541
  uuid: uuids
43992
45542
  }, {})).then(function (usersResponse) {
43993
- return combineResponse$2(eventData, usersResponse === null || usersResponse === void 0 ? void 0 : usersResponse.user);
45543
+ return combineResponse$3(eventData, usersResponse === null || usersResponse === void 0 ? void 0 : usersResponse.user);
43994
45544
  });
43995
45545
  });
43996
45546
  } catch (e) {
@@ -44220,11 +45770,13 @@ var Surveys = {
44220
45770
  showResults: function showResults(details) {
44221
45771
  return Request({
44222
45772
  url: Urls.engagement.surveys.showResults,
44223
- data: details,
44224
45773
  useCache: true,
44225
45774
  userService: true,
44226
45775
  method: "POST",
44227
- auth: true
45776
+ auth: true,
45777
+ params: {
45778
+ surveyId: details.surveyId
45779
+ }
44228
45780
  });
44229
45781
  }
44230
45782
  };
@@ -44380,7 +45932,7 @@ var NOCSearch = {
44380
45932
  return Promise.resolve(NOCSearch.application(tenantId, filter)).then(function (response) {
44381
45933
  function _temp4() {
44382
45934
  function _temp2() {
44383
- var _bpaResponse, _bpaResponse$, _edcrResponse, _edcrResponse2, _edcrResponse3;
45935
+ var _bpaResponse, _bpaResponse$, _bpaResponse2, _bpaResponse2$, _edcrResponse, _edcrResponse2, _edcrResponse3;
44384
45936
 
44385
45937
  var employeeResponse = [];
44386
45938
  var buildingDetails = {
@@ -44388,7 +45940,14 @@ var NOCSearch = {
44388
45940
  asSectionHeader: true,
44389
45941
  values: [{
44390
45942
  title: "NOC_APP_NO_LABEL",
44391
- value: ((_bpaResponse = bpaResponse) === null || _bpaResponse === void 0 ? void 0 : (_bpaResponse$ = _bpaResponse[0]) === null || _bpaResponse$ === void 0 ? void 0 : _bpaResponse$.applicationNo) || "NA"
45943
+ value: /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Link, {
45944
+ to: "/digit-ui/employee/obps/bpa/" + ((_bpaResponse = bpaResponse) === null || _bpaResponse === void 0 ? void 0 : (_bpaResponse$ = _bpaResponse[0]) === null || _bpaResponse$ === void 0 ? void 0 : _bpaResponse$.applicationNo)
45945
+ }, /*#__PURE__*/React.createElement("span", {
45946
+ className: "link",
45947
+ style: {
45948
+ color: "#F47738"
45949
+ }
45950
+ }, (_bpaResponse2 = bpaResponse) === null || _bpaResponse2 === void 0 ? void 0 : (_bpaResponse2$ = _bpaResponse2[0]) === null || _bpaResponse2$ === void 0 ? void 0 : _bpaResponse2$.applicationNo)))
44392
45951
  }, {
44393
45952
  title: "NOC_MODULE_SOURCE_LABEL",
44394
45953
  value: t(response === null || response === void 0 ? void 0 : response.source) || "NA"
@@ -44412,13 +45971,13 @@ var NOCSearch = {
44412
45971
  var edcrResponse = {};
44413
45972
 
44414
45973
  var _temp = function () {
44415
- var _bpaResponse2, _bpaResponse2$;
45974
+ var _bpaResponse3, _bpaResponse3$;
44416
45975
 
44417
- if ((_bpaResponse2 = bpaResponse) !== null && _bpaResponse2 !== void 0 && (_bpaResponse2$ = _bpaResponse2[0]) !== null && _bpaResponse2$ !== void 0 && _bpaResponse2$.edcrNumber) {
44418
- var _bpaResponse3, _bpaResponse3$;
45976
+ if ((_bpaResponse3 = bpaResponse) !== null && _bpaResponse3 !== void 0 && (_bpaResponse3$ = _bpaResponse3[0]) !== null && _bpaResponse3$ !== void 0 && _bpaResponse3$.edcrNumber) {
45977
+ var _bpaResponse4, _bpaResponse4$;
44419
45978
 
44420
45979
  var bpaFilter = {
44421
- edcrNumber: (_bpaResponse3 = bpaResponse) === null || _bpaResponse3 === void 0 ? void 0 : (_bpaResponse3$ = _bpaResponse3[0]) === null || _bpaResponse3$ === void 0 ? void 0 : _bpaResponse3$.edcrNumber
45980
+ edcrNumber: (_bpaResponse4 = bpaResponse) === null || _bpaResponse4 === void 0 ? void 0 : (_bpaResponse4$ = _bpaResponse4[0]) === null || _bpaResponse4$ === void 0 ? void 0 : _bpaResponse4$.edcrNumber
44422
45981
  };
44423
45982
  return Promise.resolve(NOCSearch.scrutinyDetails(tenantId, bpaFilter)).then(function (_NOCSearch$scrutinyDe) {
44424
45983
  edcrResponse = _NOCSearch$scrutinyDe;
@@ -44472,7 +46031,8 @@ var useNOCInbox = function useNOCInbox(_ref) {
44472
46031
  var businessService = filterForm.businessService,
44473
46032
  applicationStatus = filterForm.applicationStatus,
44474
46033
  locality = filterForm.locality,
44475
- assignee = filterForm.assignee;
46034
+ assignee = filterForm.assignee,
46035
+ businessServiceArray = filterForm.businessServiceArray;
44476
46036
  var sourceRefId = searchForm.sourceRefId,
44477
46037
  applicationNo = searchForm.applicationNo;
44478
46038
  var sortBy = tableForm.sortBy,
@@ -44483,7 +46043,7 @@ var useNOCInbox = function useNOCInbox(_ref) {
44483
46043
  tenantId: tenantId,
44484
46044
  processSearchCriteria: _extends({
44485
46045
  moduleName: "noc-services",
44486
- businessService: businessService ? [businessService.code] : ["FIRE_NOC_SRV", "FIRE_NOC_OFFLINE", "AIRPORT_NOC_OFFLINE", "AIRPORT_NOC_SRV"]
46046
+ businessService: businessService !== null && businessService !== void 0 && businessService.code ? [businessService === null || businessService === void 0 ? void 0 : businessService.code] : businessServiceArray
44487
46047
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
44488
46048
  status: applicationStatus
44489
46049
  } : {}),
@@ -44533,6 +46093,279 @@ var useNOCInbox = function useNOCInbox(_ref) {
44533
46093
  });
44534
46094
  };
44535
46095
 
46096
+ var useNOCSearchApplication = function useNOCSearchApplication(tenantId, filters, config) {
46097
+ if (config === void 0) {
46098
+ config = {};
46099
+ }
46100
+
46101
+ return useQuery(["APPLICATION_SEARCH", "NOC_SEARCH", tenantId].concat(Object.entries(filters)), function () {
46102
+ return NOCSearch.all(tenantId, filters);
46103
+ }, config);
46104
+ };
46105
+
46106
+ var WSSearchMdmsTypes = {
46107
+ useWSServicesMasters: function useWSServicesMasters(tenantId) {
46108
+ return useQuery([tenantId, "WS_WS_SERVICES_MASTERS"], function () {
46109
+ return MdmsService.getDataByCriteria(tenantId, {
46110
+ details: {
46111
+ tenantId: tenantId,
46112
+ moduleDetails: [{
46113
+ moduleName: "ws-services-masters",
46114
+ masterDetails: [{
46115
+ name: "Documents"
46116
+ }]
46117
+ }]
46118
+ }
46119
+ }, "ws-services-masters");
46120
+ }, {
46121
+ select: function select(data) {
46122
+ var _data$wsServicesMas, _data$wsServicesMas$D;
46123
+
46124
+ data === null || data === void 0 ? void 0 : (_data$wsServicesMas = data["ws-services-masters"]) === null || _data$wsServicesMas === void 0 ? void 0 : (_data$wsServicesMas$D = _data$wsServicesMas.Documents) === null || _data$wsServicesMas$D === void 0 ? void 0 : _data$wsServicesMas$D.forEach(function (type) {
46125
+ type.code = type.code;
46126
+ type.i18nKey = type.code ? type.code.replaceAll('.', '_') : "";
46127
+ type.dropdownData.forEach(function (value) {
46128
+ value.i18nKey = value.code ? value.code.replaceAll('.', '_') : "";
46129
+ });
46130
+ });
46131
+ return data !== null && data !== void 0 && data["ws-services-masters"] ? data === null || data === void 0 ? void 0 : data["ws-services-masters"] : [];
46132
+ }
46133
+ });
46134
+ },
46135
+ useWSServicesCalculation: function useWSServicesCalculation(tenantId) {
46136
+ return useQuery([tenantId, "WS_WS_SERVICES_CALCULATION"], function () {
46137
+ return MdmsService.getDataByCriteria(tenantId, {
46138
+ details: {
46139
+ tenantId: tenantId,
46140
+ moduleDetails: [{
46141
+ moduleName: "ws-services-calculation",
46142
+ masterDetails: [{
46143
+ name: "PipeSize"
46144
+ }]
46145
+ }]
46146
+ }
46147
+ }, "ws-services-calculation");
46148
+ }, {
46149
+ select: function select(data) {
46150
+ var _data$wsServicesCal, _data$wsServicesCal$P;
46151
+
46152
+ data === null || data === void 0 ? void 0 : (_data$wsServicesCal = data["ws-services-calculation"]) === null || _data$wsServicesCal === void 0 ? void 0 : (_data$wsServicesCal$P = _data$wsServicesCal.PipeSize) === null || _data$wsServicesCal$P === void 0 ? void 0 : _data$wsServicesCal$P.forEach(function (type) {
46153
+ type.i18nKey = type.size ? type.size + " Inches" : "";
46154
+ });
46155
+ return data !== null && data !== void 0 && data["ws-services-calculation"] ? data === null || data === void 0 ? void 0 : data["ws-services-calculation"] : [];
46156
+ }
46157
+ });
46158
+ }
46159
+ };
46160
+
46161
+ var usewsTenants = function usewsTenants() {
46162
+ var tenantInfo = Digit.SessionStorage.get("WS_TENANTS");
46163
+
46164
+ var _useState = useState$1(tenantInfo ? tenantInfo : null),
46165
+ tenants = _useState[0];
46166
+
46167
+ return tenants;
46168
+ };
46169
+
46170
+ var getDate = function getDate(epochdate) {
46171
+ return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46172
+ };
46173
+
46174
+ var getAddress = function getAddress(address, t) {
46175
+ return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
46176
+ };
46177
+
46178
+ var combineResponse$4 = function combineResponse(WaterConnections, properties, billData, t) {
46179
+ if (WaterConnections && properties) return WaterConnections.map(function (app) {
46180
+ var _properties$filter$, _properties$filter$$o, _billData$filter$, _billData$filter$$bil, _billData$filter$$bil2, _billData$filter$2, _billData$filter$2$bi, _billData$filter$2$bi2, _billData$filter$3, _billData$filter$3$bi, _billData$filter$3$bi2;
46181
+
46182
+ return {
46183
+ ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
46184
+ ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
46185
+ return owner === null || owner === void 0 ? void 0 : owner.name;
46186
+ }).join(",") : (_properties$filter$ = properties.filter(function (prop) {
46187
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46188
+ })[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
46189
+ return ow.name;
46190
+ }).join(","),
46191
+ Address: getAddress(properties.filter(function (prop) {
46192
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46193
+ })[0].address, t),
46194
+ AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$ = billData.filter(function (bill) {
46195
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46196
+ })[0]) !== null && _billData$filter$ !== void 0 && (_billData$filter$$bil = _billData$filter$.billDetails) !== null && _billData$filter$$bil !== void 0 && (_billData$filter$$bil2 = _billData$filter$$bil[0]) !== null && _billData$filter$$bil2 !== void 0 && _billData$filter$$bil2.amount ? billData === null || billData === void 0 ? void 0 : (_billData$filter$2 = billData.filter(function (bill) {
46197
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46198
+ })[0]) === null || _billData$filter$2 === void 0 ? void 0 : (_billData$filter$2$bi = _billData$filter$2.billDetails) === null || _billData$filter$2$bi === void 0 ? void 0 : (_billData$filter$2$bi2 = _billData$filter$2$bi[0]) === null || _billData$filter$2$bi2 === void 0 ? void 0 : _billData$filter$2$bi2.amount : "NA" : "NA",
46199
+ DueDate: billData ? getDate(billData === null || billData === void 0 ? void 0 : (_billData$filter$3 = billData.filter(function (bill) {
46200
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46201
+ })[0]) === null || _billData$filter$3 === void 0 ? void 0 : (_billData$filter$3$bi = _billData$filter$3.billDetails) === null || _billData$filter$3$bi === void 0 ? void 0 : (_billData$filter$3$bi2 = _billData$filter$3$bi[0]) === null || _billData$filter$3$bi2 === void 0 ? void 0 : _billData$filter$3$bi2.expiryDate) : "NA"
46202
+ };
46203
+ });else return undefined;
46204
+ };
46205
+
46206
+ var useWaterSearch = function useWaterSearch(_ref, config) {
46207
+ var _response$data, _response$data$WaterC, _response$data2, _response$data2$Sewer, _response$data3, _properties$data, _billData$data;
46208
+
46209
+ var tenantId = _ref.tenantId,
46210
+ _ref$filters = _ref.filters,
46211
+ filters = _ref$filters === void 0 ? {} : _ref$filters,
46212
+ _ref$BusinessService = _ref.BusinessService,
46213
+ BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
46214
+ t = _ref.t;
46215
+
46216
+ if (config === void 0) {
46217
+ config = {};
46218
+ }
46219
+
46220
+ var response = useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
46221
+ try {
46222
+ return Promise.resolve(WSService.search({
46223
+ tenantId: tenantId,
46224
+ filters: _extends({}, filters),
46225
+ businessService: BusinessService
46226
+ }));
46227
+ } catch (e) {
46228
+ return Promise.reject(e);
46229
+ }
46230
+ }, config);
46231
+ var propertyids = "";
46232
+ var consumercodes = "";
46233
+ if (BusinessService === "WS") response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$WaterC = _response$data.WaterConnection) === null || _response$data$WaterC === void 0 ? void 0 : _response$data$WaterC.forEach(function (item) {
46234
+ propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
46235
+ consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
46236
+ });else response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$Sewer = _response$data2.SewerageConnections) === null || _response$data2$Sewer === void 0 ? void 0 : _response$data2$Sewer.forEach(function (item) {
46237
+ propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
46238
+ consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
46239
+ });
46240
+ var propertyfilter = {
46241
+ propertyIds: propertyids.substring(0, propertyids.length - 1)
46242
+ };
46243
+ if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
46244
+ config = {
46245
+ enabled: propertyids !== "" ? true : false
46246
+ };
46247
+ var properties = useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
46248
+ try {
46249
+ return Promise.resolve(PTService.search({
46250
+ tenantId: tenantId,
46251
+ filters: propertyfilter,
46252
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true
46253
+ }));
46254
+ } catch (e) {
46255
+ return Promise.reject(e);
46256
+ }
46257
+ }, config);
46258
+ var billData = useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
46259
+ try {
46260
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
46261
+ businessService: BusinessService,
46262
+ consumerCode: consumercodes.substring(0, propertyids.length - 1)
46263
+ }));
46264
+ } catch (e) {
46265
+ return Promise.reject(e);
46266
+ }
46267
+ }, config);
46268
+ return combineResponse$4(response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : _response$data3.WaterConnection, properties === null || properties === void 0 ? void 0 : (_properties$data = properties.data) === null || _properties$data === void 0 ? void 0 : _properties$data.Properties, billData === null || billData === void 0 ? void 0 : (_billData$data = billData.data) === null || _billData$data === void 0 ? void 0 : _billData$data.Bill, t);
46269
+ };
46270
+
46271
+ var getDate$1 = function getDate(epochdate) {
46272
+ return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46273
+ };
46274
+
46275
+ var getAddress$1 = function getAddress(address, t) {
46276
+ return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
46277
+ };
46278
+
46279
+ var combineResponse$5 = function combineResponse(WaterConnections, properties, billData, t) {
46280
+ if (WaterConnections && properties) return WaterConnections.map(function (app) {
46281
+ var _properties$filter$, _properties$filter$$o, _billData$filter$0$bi, _billData$filter$0$bi2, _billData$filter$0$bi3, _billData$filter$0$bi4, _billData$filter$0$bi5, _billData$filter$0$bi6;
46282
+
46283
+ return {
46284
+ ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
46285
+ ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
46286
+ return owner === null || owner === void 0 ? void 0 : owner.name;
46287
+ }).join(",") : (_properties$filter$ = properties.filter(function (prop) {
46288
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46289
+ })[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
46290
+ return ow.name;
46291
+ }).join(","),
46292
+ Address: getAddress$1(properties.filter(function (prop) {
46293
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46294
+ })[0].address, t),
46295
+ AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$0$bi = billData.filter(function (bill) {
46296
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46297
+ })[0].billDetails) !== null && _billData$filter$0$bi !== void 0 && (_billData$filter$0$bi2 = _billData$filter$0$bi[0]) !== null && _billData$filter$0$bi2 !== void 0 && _billData$filter$0$bi2.amount ? billData === null || billData === void 0 ? void 0 : (_billData$filter$0$bi3 = billData.filter(function (bill) {
46298
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46299
+ })[0].billDetails) === null || _billData$filter$0$bi3 === void 0 ? void 0 : (_billData$filter$0$bi4 = _billData$filter$0$bi3[0]) === null || _billData$filter$0$bi4 === void 0 ? void 0 : _billData$filter$0$bi4.amount : "NA" : "NA",
46300
+ DueDate: billData ? getDate$1(billData === null || billData === void 0 ? void 0 : (_billData$filter$0$bi5 = billData.filter(function (bill) {
46301
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46302
+ })[0].billDetails) === null || _billData$filter$0$bi5 === void 0 ? void 0 : (_billData$filter$0$bi6 = _billData$filter$0$bi5[0]) === null || _billData$filter$0$bi6 === void 0 ? void 0 : _billData$filter$0$bi6.expiryDate) : "NA"
46303
+ };
46304
+ });else return undefined;
46305
+ };
46306
+
46307
+ var useSewarageSearch = function useSewarageSearch(_ref, config) {
46308
+ var _response$data, _response$data$Sewera, _response$data2, _properties$data, _billData$data;
46309
+
46310
+ var tenantId = _ref.tenantId,
46311
+ _ref$filters = _ref.filters,
46312
+ filters = _ref$filters === void 0 ? {} : _ref$filters,
46313
+ _ref$BusinessService = _ref.BusinessService,
46314
+ BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
46315
+ t = _ref.t;
46316
+
46317
+ if (config === void 0) {
46318
+ config = {};
46319
+ }
46320
+
46321
+ var response = useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
46322
+ try {
46323
+ return Promise.resolve(WSService.search({
46324
+ tenantId: tenantId,
46325
+ filters: _extends({}, filters),
46326
+ businessService: BusinessService
46327
+ }));
46328
+ } catch (e) {
46329
+ return Promise.reject(e);
46330
+ }
46331
+ }, config);
46332
+ var propertyids = "";
46333
+ var consumercodes = "";
46334
+ response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$Sewera = _response$data.SewerageConnections) === null || _response$data$Sewera === void 0 ? void 0 : _response$data$Sewera.forEach(function (item) {
46335
+ propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
46336
+ consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
46337
+ });
46338
+ var propertyfilter = {
46339
+ propertyIds: propertyids.substring(0, propertyids.length - 1)
46340
+ };
46341
+ if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
46342
+ config = {
46343
+ enabled: propertyids !== "" ? true : false
46344
+ };
46345
+ var properties = useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
46346
+ try {
46347
+ return Promise.resolve(PTService.search({
46348
+ tenantId: tenantId,
46349
+ filters: propertyfilter,
46350
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true
46351
+ }));
46352
+ } catch (e) {
46353
+ return Promise.reject(e);
46354
+ }
46355
+ }, config);
46356
+ var billData = useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
46357
+ try {
46358
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
46359
+ businessService: BusinessService,
46360
+ consumerCode: consumercodes.substring(0, propertyids.length - 2)
46361
+ }));
46362
+ } catch (e) {
46363
+ return Promise.reject(e);
46364
+ }
46365
+ }, config);
46366
+ return combineResponse$5(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2.SewerageConnections, properties === null || properties === void 0 ? void 0 : (_properties$data = properties.data) === null || _properties$data === void 0 ? void 0 : _properties$data.Properties, billData === null || billData === void 0 ? void 0 : (_billData$data = billData.data) === null || _billData$data === void 0 ? void 0 : _billData$data.Bill, t);
46367
+ };
46368
+
44536
46369
  var pgr = {
44537
46370
  useComplaintDetails: useComplaintDetails,
44538
46371
  useComplaintsList: useComplaintsList,
@@ -44574,11 +46407,13 @@ var fsm = {
44574
46407
  useSlum: useSlum,
44575
46408
  usePaymentHistory: usePaymentHistory
44576
46409
  };
44577
- var pt = {
46410
+ var pt$1 = {
44578
46411
  usePropertySearch: usePropertySearch,
44579
46412
  usePropertyPayment: usePropertyPayment,
44580
46413
  usePropertyMDMS: usePropertyMDMS,
46414
+ usePropertySearchWithDue: usePropertySearchWithDue,
44581
46415
  usePropertyAPI: usePropertyAPI,
46416
+ usePropertyCreateNUpdateAPI: usePropertyCreateNUpdateAPI,
44582
46417
  usePropertyDocumentSearch: usePropertyDocumentSearch,
44583
46418
  useTenants: useTenants$3,
44584
46419
  useApplicationDetail: useApplicationDetail$1,
@@ -44587,7 +46422,9 @@ var pt = {
44587
46422
  usePropertyAssessment: usePropertyAssessment,
44588
46423
  usePtCalculationEstimate: usePtCalculationEstimate,
44589
46424
  useGenderMDMS: useGenderMDMS,
44590
- usePTGenderMDMS: usePTGenderMDMS
46425
+ usePTGenderMDMS: usePTGenderMDMS,
46426
+ useMyPropertyPayments: useMyPropertyPayments,
46427
+ useGenericViewProperty: useGenericViewProperty
44591
46428
  };
44592
46429
  var dss = {
44593
46430
  useMDMS: useDssMDMS,
@@ -44691,7 +46528,14 @@ var survey = {
44691
46528
  var noc = {
44692
46529
  useNOCDetails: useNOCDetails,
44693
46530
  useNOCApplicationActions: useNOCApplicationActions,
44694
- useInbox: useNOCInbox
46531
+ useInbox: useNOCInbox,
46532
+ useNOCSearchApplication: useNOCSearchApplication
46533
+ };
46534
+ var ws = {
46535
+ WSSearchMdmsTypes: WSSearchMdmsTypes,
46536
+ usewsTenants: usewsTenants,
46537
+ useWaterSearch: useWaterSearch,
46538
+ useSewarageSearch: useSewarageSearch
44695
46539
  };
44696
46540
  var Hooks = {
44697
46541
  useSessionStorage: useSessionStorage,
@@ -44723,7 +46567,7 @@ var Hooks = {
44723
46567
  useInbox: useTLInbox,
44724
46568
  pgr: pgr,
44725
46569
  fsm: fsm,
44726
- pt: pt,
46570
+ pt: pt$1,
44727
46571
  dss: dss,
44728
46572
  mcollect: mcollect,
44729
46573
  hrms: hrms,
@@ -44733,7 +46577,8 @@ var Hooks = {
44733
46577
  events: events,
44734
46578
  engagement: engagement,
44735
46579
  survey: survey,
44736
- noc: noc
46580
+ noc: noc,
46581
+ ws: ws
44737
46582
  };
44738
46583
 
44739
46584
  var checkWebview = function checkWebview() {
@@ -44750,7 +46595,6 @@ var mobileCheck = function mobileCheck() {
44750
46595
  if (/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0, 4))) check = true;
44751
46596
  })(navigator.userAgent || navigator.vendor || window.opera);
44752
46597
 
44753
- console.debug("check", check);
44754
46598
  return check;
44755
46599
  };
44756
46600
 
@@ -44759,7 +46603,7 @@ var BrowserUtil = {
44759
46603
  isMobile: mobileCheck
44760
46604
  };
44761
46605
 
44762
- function getDate(timestamp) {
46606
+ function getDate$2(timestamp) {
44763
46607
  var dt = timestamp ? new Date(timestamp) : new Date();
44764
46608
  var dd = dt.getDate();
44765
46609
  var mm = dt.getMonth() + 1;
@@ -44780,7 +46624,7 @@ var monthNames = ["Jan", "Feb", "March", "Apr", "May", "June", "July", "Aug", "S
44780
46624
 
44781
46625
  var date = {
44782
46626
  __proto__: null,
44783
- getDate: getDate,
46627
+ getDate: getDate$2,
44784
46628
  monthNames: monthNames
44785
46629
  };
44786
46630
 
@@ -44789,12 +46633,15 @@ var amountFormatter = function amountFormatter(value, denomination) {
44789
46633
  currency: "INR"
44790
46634
  });
44791
46635
 
46636
+ var _useTranslation = useTranslation(),
46637
+ t = _useTranslation.t;
46638
+
44792
46639
  switch (denomination) {
44793
46640
  case "Lac":
44794
- return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + " Lac";
46641
+ return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + " " + t("ES_DSS_LAC");
44795
46642
 
44796
46643
  case "Cr":
44797
- return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + " Cr";
46644
+ return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + " " + t("ES_DSS_CR");
44798
46645
 
44799
46646
  case "Unit":
44800
46647
  return "\u20B9 " + currencyFormatter.format((value === null || value === void 0 ? void 0 : value.toFixed(2)) || 0);
@@ -44815,6 +46662,9 @@ var formatter = function formatter(value, symbol, unit, commaSeparated) {
44815
46662
  case "amount":
44816
46663
  return amountFormatter(value, unit);
44817
46664
 
46665
+ case "Amount":
46666
+ return amountFormatter(value, unit);
46667
+
44818
46668
  case "number":
44819
46669
  if (!commaSeparated) {
44820
46670
  return parseInt(value);
@@ -44860,12 +46710,57 @@ var getInitialRange = function getInitialRange() {
44860
46710
  duration: duration
44861
46711
  };
44862
46712
  };
46713
+ var getDefaultFinacialYear = function getDefaultFinacialYear() {
46714
+ var currDate = new Date().getMonth();
46715
+
46716
+ if (currDate < 3) {
46717
+ return {
46718
+ startDate: subYears(addMonths(startOfYear(new Date()), 3), 1),
46719
+ endDate: endOfToday(new Date())
46720
+ };
46721
+ } else {
46722
+ return {
46723
+ startDate: addMonths(startOfYear(new Date()), 3),
46724
+ endDate: endOfToday(new Date())
46725
+ };
46726
+ }
46727
+ };
46728
+ var getCurrentModuleName = function getCurrentModuleName() {
46729
+ var allPaths = window.location.pathname.split('/');
46730
+ return allPaths[allPaths.length - 1];
46731
+ };
46732
+ var checkSelected = function checkSelected(e, selectedDDRs) {
46733
+ if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
46734
+ return true;
46735
+ } else if (selectedDDRs.find(function (ddr) {
46736
+ return ddr.ddrKey == e.ddrKey;
46737
+ })) {
46738
+ return true;
46739
+ } else {
46740
+ return false;
46741
+ }
46742
+ };
46743
+ var getCitiesAvailable = function getCitiesAvailable(e, selectedDDRs) {
46744
+ if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
46745
+ return true;
46746
+ } else if (selectedDDRs.find(function (ddr) {
46747
+ return ddr == e.ddrKey;
46748
+ })) {
46749
+ return true;
46750
+ } else {
46751
+ return false;
46752
+ }
46753
+ };
44863
46754
 
44864
46755
  var dss$1 = {
44865
46756
  __proto__: null,
44866
46757
  formatter: formatter,
44867
46758
  getDuration: getDuration,
44868
- getInitialRange: getInitialRange
46759
+ getInitialRange: getInitialRange,
46760
+ getDefaultFinacialYear: getDefaultFinacialYear,
46761
+ getCurrentModuleName: getCurrentModuleName,
46762
+ checkSelected: checkSelected,
46763
+ getCitiesAvailable: getCitiesAvailable
44869
46764
  };
44870
46765
 
44871
46766
  var getLocalityCode = function getLocalityCode(locality, tenantId) {
@@ -44874,7 +46769,7 @@ var getLocalityCode = function getLocalityCode(locality, tenantId) {
44874
46769
  var getRevenueLocalityCode = function getRevenueLocalityCode(locality, tenantId) {
44875
46770
  if (typeof locality === "string") return locality.includes("_") ? locality : tenantId.replace(".", "_").toUpperCase() + "_REVENUE_" + locality;else if (locality.code) return locality.code.includes("_") ? locality : tenantId.replace(".", "_").toUpperCase() + "_REVENUE_" + locality.code;
44876
46771
  };
44877
- var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
46772
+ var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
44878
46773
  if (str === void 0) {
44879
46774
  str = "";
44880
46775
  }
@@ -44895,21 +46790,21 @@ var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
44895
46790
 
44896
46791
  return str;
44897
46792
  };
44898
- var checkForNotNull = function checkForNotNull(value) {
46793
+ var checkForNotNull$1 = function checkForNotNull(value) {
44899
46794
  if (value === void 0) {
44900
46795
  value = "";
44901
46796
  }
44902
46797
 
44903
46798
  return value && value != null && value != undefined && value != "" ? true : false;
44904
46799
  };
44905
- var convertDotValues = function convertDotValues(value) {
46800
+ var convertDotValues$1 = function convertDotValues(value) {
44906
46801
  if (value === void 0) {
44907
46802
  value = "";
44908
46803
  }
44909
46804
 
44910
- return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$2(value, ".", "_")) || "NA";
46805
+ return checkForNotNull$1(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$3(value, ".", "_")) || "NA";
44911
46806
  };
44912
- var convertToLocale = function convertToLocale(value, key) {
46807
+ var convertToLocale$1 = function convertToLocale(value, key) {
44913
46808
  var _convertDotValues;
44914
46809
 
44915
46810
  if (value === void 0) {
@@ -44920,7 +46815,7 @@ var convertToLocale = function convertToLocale(value, key) {
44920
46815
  key = "";
44921
46816
  }
44922
46817
 
44923
- var convertedValue = (_convertDotValues = convertDotValues(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
46818
+ var convertedValue = (_convertDotValues = convertDotValues$1(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
44924
46819
 
44925
46820
  if (convertedValue == "NA") {
44926
46821
  return "COMMON_NA";
@@ -44928,7 +46823,7 @@ var convertToLocale = function convertToLocale(value, key) {
44928
46823
 
44929
46824
  return key + "_" + convertedValue;
44930
46825
  };
44931
- var getMohallaLocale = function getMohallaLocale(value, tenantId) {
46826
+ var getMohallaLocale$1 = function getMohallaLocale(value, tenantId) {
44932
46827
  if (value === void 0) {
44933
46828
  value = "";
44934
46829
  }
@@ -44937,28 +46832,28 @@ var getMohallaLocale = function getMohallaLocale(value, tenantId) {
44937
46832
  tenantId = "";
44938
46833
  }
44939
46834
 
44940
- var convertedValue = convertDotValues(tenantId);
46835
+ var convertedValue = convertDotValues$1(tenantId);
44941
46836
 
44942
- if (convertedValue == "NA" || !checkForNotNull(value)) {
46837
+ if (convertedValue == "NA" || !checkForNotNull$1(value)) {
44943
46838
  return "COMMON_NA";
44944
46839
  }
44945
46840
 
44946
46841
  convertedValue = convertedValue.toUpperCase();
44947
- return convertToLocale(value, convertedValue + "_REVENUE");
46842
+ return convertToLocale$1(value, convertedValue + "_REVENUE");
44948
46843
  };
44949
- var getCityLocale = function getCityLocale(value) {
46844
+ var getCityLocale$1 = function getCityLocale(value) {
44950
46845
  if (value === void 0) {
44951
46846
  value = "";
44952
46847
  }
44953
46848
 
44954
- var convertedValue = convertDotValues(value);
46849
+ var convertedValue = convertDotValues$1(value);
44955
46850
 
44956
- if (convertedValue == "NA" || !checkForNotNull(value)) {
46851
+ if (convertedValue == "NA" || !checkForNotNull$1(value)) {
44957
46852
  return "COMMON_NA";
44958
46853
  }
44959
46854
 
44960
46855
  convertedValue = convertedValue.toUpperCase();
44961
- return convertToLocale(convertedValue, "TENANT_TENANTS");
46856
+ return convertToLocale$1(convertedValue, "TENANT_TENANTS");
44962
46857
  };
44963
46858
  var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44964
46859
  if (dropdownValues === void 0) {
@@ -44970,7 +46865,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44970
46865
  }
44971
46866
 
44972
46867
  return dropdownValues.map(function (ele) {
44973
- ele["i18text"] = convertToLocale(ele.code, key);
46868
+ ele["i18text"] = convertToLocale$1(ele.code, key);
44974
46869
 
44975
46870
  if (t) {
44976
46871
  ele["i18text"] = t(ele["i18text"]);
@@ -44979,18 +46874,26 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44979
46874
  return ele;
44980
46875
  });
44981
46876
  };
46877
+ var getTransformedLocale$1 = function getTransformedLocale(label) {
46878
+ var _label;
46879
+
46880
+ if (typeof label === "number") return label;
46881
+ label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
46882
+ return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
46883
+ };
44982
46884
 
44983
46885
  var locale = {
44984
46886
  __proto__: null,
44985
46887
  getLocalityCode: getLocalityCode,
44986
46888
  getRevenueLocalityCode: getRevenueLocalityCode,
44987
- stringReplaceAll: stringReplaceAll$2,
44988
- checkForNotNull: checkForNotNull,
44989
- convertDotValues: convertDotValues,
44990
- convertToLocale: convertToLocale,
44991
- getMohallaLocale: getMohallaLocale,
44992
- getCityLocale: getCityLocale,
44993
- convertToLocaleData: convertToLocaleData
46889
+ stringReplaceAll: stringReplaceAll$3,
46890
+ checkForNotNull: checkForNotNull$1,
46891
+ convertDotValues: convertDotValues$1,
46892
+ convertToLocale: convertToLocale$1,
46893
+ getMohallaLocale: getMohallaLocale$1,
46894
+ getCityLocale: getCityLocale$1,
46895
+ convertToLocaleData: convertToLocaleData,
46896
+ getTransformedLocale: getTransformedLocale$1
44994
46897
  };
44995
46898
 
44996
46899
  var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
@@ -45076,7 +46979,6 @@ function getBase64Image(tenantId) {
45076
46979
  ctx.drawImage(img, 0, 0);
45077
46980
  return canvas.toDataURL("image/png");
45078
46981
  } catch (e) {
45079
- console.error("asd", e);
45080
46982
  return "";
45081
46983
  }
45082
46984
  }
@@ -45399,20 +47301,46 @@ var downloadPdf = function downloadPdf(blob, fileName) {
45399
47301
  }
45400
47302
  };
45401
47303
 
45402
- var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey) {
47304
+ var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey, tenantId, receiptNumber) {
45403
47305
  if (pdfKey === void 0) {
45404
47306
  pdfKey = "consolidatedreceipt";
45405
47307
  }
45406
47308
 
47309
+ if (receiptNumber === void 0) {
47310
+ receiptNumber = null;
47311
+ }
47312
+
47313
+ try {
47314
+ if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
47315
+ return Promise.resolve(Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey, receiptNumber)).then(function (response) {
47316
+ var responseStatus = parseInt(response.status, 10);
47317
+
47318
+ if (responseStatus === 201 || responseStatus === 200) {
47319
+ var filename = receiptNumber ? "receiptNumber-" + receiptNumber + ".pdf" : "consumer-" + consumerCode + ".pdf";
47320
+ downloadPdf(new Blob([response.data], {
47321
+ type: "application/pdf"
47322
+ }), filename);
47323
+ }
47324
+ });
47325
+ } catch (e) {
47326
+ return Promise.reject(e);
47327
+ }
47328
+ };
47329
+ var downloadBill = function downloadBill(consumerCode, businessService, pdfKey, tenantId) {
47330
+ if (pdfKey === void 0) {
47331
+ pdfKey = "consolidatedbill";
47332
+ }
47333
+
45407
47334
  try {
45408
- var tenantId = Digit.ULBService.getCurrentTenantId();
45409
- return Promise.resolve(Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey)).then(function (response) {
47335
+ if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
47336
+ return Promise.resolve(Digit.ReceiptsService.bill_download(businessService, consumerCode, tenantId, pdfKey)).then(function (response) {
45410
47337
  var responseStatus = parseInt(response.status, 10);
45411
47338
 
45412
47339
  if (responseStatus === 201 || responseStatus === 200) {
47340
+ var filename = consumerCode ? "consumerCode-" + consumerCode + ".pdf" : "consumer-" + consumerCode + ".pdf";
45413
47341
  downloadPdf(new Blob([response.data], {
45414
47342
  type: "application/pdf"
45415
- }), "consumer-" + consumerCode + ".pdf");
47343
+ }), filename);
45416
47344
  }
45417
47345
  });
45418
47346
  } catch (e) {
@@ -45583,6 +47511,12 @@ var getPattern = function getPattern(type) {
45583
47511
  }
45584
47512
  };
45585
47513
 
47514
+ var getUnique$1 = function getUnique(arr) {
47515
+ return arr.filter(function (value, index, self) {
47516
+ return self.indexOf(value) === index;
47517
+ });
47518
+ };
47519
+
45586
47520
  var getStaticMapUrl = function getStaticMapUrl(latitude, longitude) {
45587
47521
  var _globalConfigs;
45588
47522
 
@@ -45609,19 +47543,21 @@ var routeSubscription = function routeSubscription(pathname) {
45609
47543
  };
45610
47544
 
45611
47545
  var didEmployeeHasRole = function didEmployeeHasRole(role) {
45612
- var _userInfo$info;
47546
+ var _userInfo$info, _userInfo$info$roles;
45613
47547
 
45614
47548
  var tenantId = Digit.ULBService.getCurrentTenantId();
45615
47549
  var userInfo = Digit.UserService.getUser();
45616
- var rolearray = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : _userInfo$info.roles.filter(function (item) {
47550
+ var rolearray = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info = userInfo.info) === null || _userInfo$info === void 0 ? void 0 : (_userInfo$info$roles = _userInfo$info.roles) === null || _userInfo$info$roles === void 0 ? void 0 : _userInfo$info$roles.filter(function (item) {
45617
47551
  if (item.code == role && item.tenantId === tenantId) return true;
45618
47552
  });
45619
47553
  return rolearray === null || rolearray === void 0 ? void 0 : rolearray.length;
45620
47554
  };
45621
47555
 
45622
47556
  var pgrAccess = function pgrAccess() {
47557
+ var _userInfo$info2, _userInfo$info2$roles;
47558
+
45623
47559
  var userInfo = Digit.UserService.getUser();
45624
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47560
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info2 = userInfo.info) === null || _userInfo$info2 === void 0 ? void 0 : (_userInfo$info2$roles = _userInfo$info2.roles) === null || _userInfo$info2$roles === void 0 ? void 0 : _userInfo$info2$roles.map(function (roleData) {
45625
47561
  return roleData.code;
45626
47562
  });
45627
47563
  var pgrRoles = ["PGR_LME", "PGR-ADMIN", "CSR", "CEMP", "FEMP", "DGRO", "ULB Operator", "GRO", "GO", "RO", "GA"];
@@ -45632,8 +47568,10 @@ var pgrAccess = function pgrAccess() {
45632
47568
  };
45633
47569
 
45634
47570
  var fsmAccess = function fsmAccess() {
47571
+ var _userInfo$info3, _userInfo$info3$roles;
47572
+
45635
47573
  var userInfo = Digit.UserService.getUser();
45636
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47574
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info3 = userInfo.info) === null || _userInfo$info3 === void 0 ? void 0 : (_userInfo$info3$roles = _userInfo$info3.roles) === null || _userInfo$info3$roles === void 0 ? void 0 : _userInfo$info3$roles.map(function (roleData) {
45637
47575
  return roleData.code;
45638
47576
  });
45639
47577
  var fsmRoles = ["FSM_CREATOR_EMP", "FSM_EDITOR_EMP", "FSM_VIEW_EMP", "FSM_REPORT_VIEWER", "FSM_DASHBOARD_VIEWER", "FSM_ADMIN", "FSM_DSO", "FSM_DRIVER", "FSM_EMP_FSTPO", "FSM_COLLECTOR"];
@@ -45644,8 +47582,10 @@ var fsmAccess = function fsmAccess() {
45644
47582
  };
45645
47583
 
45646
47584
  var NOCAccess = function NOCAccess() {
47585
+ var _userInfo$info4, _userInfo$info4$roles;
47586
+
45647
47587
  var userInfo = Digit.UserService.getUser();
45648
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47588
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : (_userInfo$info4$roles = _userInfo$info4.roles) === null || _userInfo$info4$roles === void 0 ? void 0 : _userInfo$info4$roles.map(function (roleData) {
45649
47589
  return roleData.code;
45650
47590
  });
45651
47591
  var NOC_ROLES = ["NOC_CEMP", "NOC_DOC_VERIFIER", "NOC_FIELD_INSPECTOR", "NOC_APPROVER", "BPA_NOC_VERIFIER", "AIRPORT_AUTHORITY_APPROVER", "FIRE_NOC_APPROVER", "NOC_DEPT_APPROVER"];
@@ -45656,8 +47596,10 @@ var NOCAccess = function NOCAccess() {
45656
47596
  };
45657
47597
 
45658
47598
  var BPAREGAccess = function BPAREGAccess() {
47599
+ var _userInfo$info5, _userInfo$info5$roles;
47600
+
45659
47601
  var userInfo = Digit.UserService.getUser();
45660
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47602
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info5 = userInfo.info) === null || _userInfo$info5 === void 0 ? void 0 : (_userInfo$info5$roles = _userInfo$info5.roles) === null || _userInfo$info5$roles === void 0 ? void 0 : _userInfo$info5$roles.map(function (roleData) {
45661
47603
  return roleData.code;
45662
47604
  });
45663
47605
  var BPAREG_ROLES = ["BPAREG_APPROVER", "BPAREG_DOC_VERIFIER"];
@@ -45668,8 +47610,10 @@ var BPAREGAccess = function BPAREGAccess() {
45668
47610
  };
45669
47611
 
45670
47612
  var BPAAccess = function BPAAccess() {
47613
+ var _userInfo$info6, _userInfo$info6$roles;
47614
+
45671
47615
  var userInfo = Digit.UserService.getUser();
45672
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47616
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info6 = userInfo.info) === null || _userInfo$info6 === void 0 ? void 0 : (_userInfo$info6$roles = _userInfo$info6.roles) === null || _userInfo$info6$roles === void 0 ? void 0 : _userInfo$info6$roles.map(function (roleData) {
45673
47617
  return roleData.code;
45674
47618
  });
45675
47619
  var BPA_ROLES = ["BPA_VERIFIER", "CEMP", "BPA_APPROVER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "AIRPORT_AUTHORITY_APPROVER", "FIRE_NOC_APPROVER", "NOC_DEPT_APPROVER", "BPA_NOC_VERIFIER", "BPA_TOWNPLANNER", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_SUPERVISOR", "BPA_DOC_VERIFIER", "EMPLOYEE"];
@@ -45680,8 +47624,10 @@ var BPAAccess = function BPAAccess() {
45680
47624
  };
45681
47625
 
45682
47626
  var ptAccess = function ptAccess() {
47627
+ var _userInfo$info7, _userInfo$info7$roles;
47628
+
45683
47629
  var userInfo = Digit.UserService.getUser();
45684
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47630
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info7 = userInfo.info) === null || _userInfo$info7 === void 0 ? void 0 : (_userInfo$info7$roles = _userInfo$info7.roles) === null || _userInfo$info7$roles === void 0 ? void 0 : _userInfo$info7$roles.map(function (roleData) {
45685
47631
  return roleData.code;
45686
47632
  });
45687
47633
  var ptRoles = ["PT_APPROVER", "PT_CEMP", "PT_DOC_VERIFIER", "PT_FIELD_INSPECTOR"];
@@ -45692,8 +47638,10 @@ var ptAccess = function ptAccess() {
45692
47638
  };
45693
47639
 
45694
47640
  var tlAccess = function tlAccess() {
47641
+ var _userInfo$info8, _userInfo$info8$roles;
47642
+
45695
47643
  var userInfo = Digit.UserService.getUser();
45696
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47644
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info8 = userInfo.info) === null || _userInfo$info8 === void 0 ? void 0 : (_userInfo$info8$roles = _userInfo$info8.roles) === null || _userInfo$info8$roles === void 0 ? void 0 : _userInfo$info8$roles.map(function (roleData) {
45697
47645
  return roleData.code;
45698
47646
  });
45699
47647
  var tlRoles = ["TL_CEMP", "TL_APPROVER", "TL_FIELD_INSPECTOR", "TL_DOC_VERIFIER"];
@@ -45704,8 +47652,10 @@ var tlAccess = function tlAccess() {
45704
47652
  };
45705
47653
 
45706
47654
  var mCollectAccess = function mCollectAccess() {
47655
+ var _userInfo$info9, _userInfo$info9$roles;
47656
+
45707
47657
  var userInfo = Digit.UserService.getUser();
45708
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47658
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info9 = userInfo.info) === null || _userInfo$info9 === void 0 ? void 0 : (_userInfo$info9$roles = _userInfo$info9.roles) === null || _userInfo$info9$roles === void 0 ? void 0 : _userInfo$info9$roles.map(function (roleData) {
45709
47659
  return roleData.code;
45710
47660
  });
45711
47661
  var mCollectRoles = ["UC_EMP"];
@@ -45716,8 +47666,10 @@ var mCollectAccess = function mCollectAccess() {
45716
47666
  };
45717
47667
 
45718
47668
  var receiptsAccess = function receiptsAccess() {
47669
+ var _userInfo$info10, _userInfo$info10$role;
47670
+
45719
47671
  var userInfo = Digit.UserService.getUser();
45720
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47672
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info10 = userInfo.info) === null || _userInfo$info10 === void 0 ? void 0 : (_userInfo$info10$role = _userInfo$info10.roles) === null || _userInfo$info10$role === void 0 ? void 0 : _userInfo$info10$role.map(function (roleData) {
45721
47673
  return roleData.code;
45722
47674
  });
45723
47675
  var receiptsRoles = ["CR_PT"];
@@ -45730,8 +47682,10 @@ var receiptsAccess = function receiptsAccess() {
45730
47682
  var hrmsRoles = ["HRMS_ADMIN"];
45731
47683
 
45732
47684
  var hrmsAccess = function hrmsAccess() {
47685
+ var _userInfo$info11, _userInfo$info11$role;
47686
+
45733
47687
  var userInfo = Digit.UserService.getUser();
45734
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47688
+ var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info11 = userInfo.info) === null || _userInfo$info11 === void 0 ? void 0 : (_userInfo$info11$role = _userInfo$info11.roles) === null || _userInfo$info11$role === void 0 ? void 0 : _userInfo$info11$role.map(function (roleData) {
45735
47689
  return roleData.code;
45736
47690
  });
45737
47691
  var HRMS_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
@@ -45743,6 +47697,7 @@ var hrmsAccess = function hrmsAccess() {
45743
47697
  var Utils = {
45744
47698
  pdf: PDFUtil,
45745
47699
  downloadReceipt: downloadReceipt,
47700
+ downloadBill: downloadBill,
45746
47701
  downloadPDFFromLink: downloadPDFFromLink,
45747
47702
  getFileUrl: getFileUrl,
45748
47703
  getFileTypeFromFileStoreURL: getFileTypeFromFileStoreURL,
@@ -45759,6 +47714,7 @@ var Utils = {
45759
47714
  BPAAccess: BPAAccess,
45760
47715
  dss: dss$1,
45761
47716
  obps: obps$1,
47717
+ pt: pt,
45762
47718
  ptAccess: ptAccess,
45763
47719
  NOCAccess: NOCAccess,
45764
47720
  mCollectAccess: mCollectAccess,
@@ -45767,6 +47723,7 @@ var Utils = {
45767
47723
  hrmsAccess: hrmsAccess,
45768
47724
  getPattern: getPattern,
45769
47725
  hrmsRoles: hrmsRoles,
47726
+ getUnique: getUnique$1,
45770
47727
  tlAccess: tlAccess
45771
47728
  };
45772
47729
 
@@ -45830,7 +47787,6 @@ var SubformRegistry = function SubformRegistry(registry) {
45830
47787
  var element = middlewares.filter(function (e) {
45831
47788
  return Object.keys(e)[0] === preceedingName;
45832
47789
  })[0] || null;
45833
- if (!element) console.error("no middleware with " + preceedingName + " found in " + key + " subForm ");
45834
47790
  }
45835
47791
  };
45836
47792
 
@@ -45899,6 +47855,7 @@ var initLibraries = function initLibraries() {
45899
47855
  setupLibraries("ComponentRegistryService", ComponentRegistryService);
45900
47856
  setupLibraries("StoreData", StoreData);
45901
47857
  setupLibraries("EventsServices", Events);
47858
+ setupLibraries("WSService", WSService);
45902
47859
  setupLibraries("InboxGeneral", InboxGeneral);
45903
47860
  setupLibraries("ShareFiles", ShareFiles);
45904
47861
  setupLibraries("Contexts", Contexts);