@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.
package/dist/index.js CHANGED
@@ -9,9 +9,11 @@ var reactI18next = require('react-i18next');
9
9
  var ReactPostprocessor = _interopDefault(require('i18next-react-postprocessor'));
10
10
  var dateFns = require('date-fns');
11
11
  var html2canvas = _interopDefault(require('html2canvas'));
12
- var jsPDF = _interopDefault(require('jspdf'));
12
+ require('jspdf');
13
13
  var XLSX = _interopDefault(require('xlsx'));
14
+ var domtoimage = _interopDefault(require('dom-to-image'));
14
15
  require('date-fns/esm');
16
+ var reactRouterDom = require('react-router-dom');
15
17
 
16
18
  function _extends() {
17
19
  _extends = Object.assign || function (target) {
@@ -220,7 +222,6 @@ var actionHandler = function actionHandler(action, id, fieldList) {
220
222
  var index = getIndex(id, fieldList);
221
223
 
222
224
  if (!action) {
223
- console.error("no action found");
224
225
  return;
225
226
  }
226
227
 
@@ -310,6 +311,7 @@ var Urls = {
310
311
  Authenticate: "/user/oauth/token",
311
312
  RegisterUser: "/user/citizen/_create",
312
313
  ChangePassword: "/user/password/nologin/_update",
314
+ ChangePassword1: "/user/password/_update",
313
315
  UserProfileUpdate: "/user/profile/_update",
314
316
  EmployeeSearch: "/egov-hrms/employees/_search",
315
317
  InboxSearch: "/inbox/v1/_search",
@@ -347,7 +349,9 @@ var Urls = {
347
349
  update: "/property-services/property/_update",
348
350
  pt_calculation_estimate: "/pt-calculator-v2/propertytax/v2/_estimate",
349
351
  assessment_create: "/property-services/assessment/_create",
350
- assessment_search: "/property-services/assessment/_search"
352
+ assessment_search: "/property-services/assessment/_search",
353
+ payment_search: "/collection-services/payments/PT/_search",
354
+ pt_calculate_mutation: "/pt-calculator-v2/propertytax/mutation/_calculate"
351
355
  },
352
356
  dss: {
353
357
  dashboardConfig: "/dashboard-analytics/dashboard/getDashboardConfig",
@@ -362,6 +366,7 @@ var Urls = {
362
366
  update: "/echallan-services/eChallan/v1/_update",
363
367
  download_pdf: "/egov-pdf/download/UC/mcollect-challan",
364
368
  receipt_download: "/egov-pdf/download/PAYMENT/consolidatedreceipt",
369
+ bill_download: "/egov-pdf/download/bills/consolidatedbill",
365
370
  count: "/echallan-services/eChallan/v1/_count"
366
371
  },
367
372
  hrms: {
@@ -405,9 +410,14 @@ var Urls = {
405
410
  search: "/egov-user-event/v1/events/_search",
406
411
  update: "/egov-user-event/v1/events/lat/_update",
407
412
  updateEvent: "/egov-user-event/v1/events/_update",
413
+ updateEventCDG: "/egov-user-event/v1/events/lat/_update",
408
414
  count: "/egov-user-event/v1/events/notifications/_count",
409
415
  create: "/egov-user-event/v1/events/_create"
410
416
  },
417
+ ws: {
418
+ water_search: "/ws-services/wc/_search",
419
+ sewarage_search: "/sw-services/swc/_search"
420
+ },
411
421
  engagement: {
412
422
  document: {
413
423
  search: "/egov-document-uploader/egov-du/document/_search",
@@ -524,20 +534,26 @@ Axios.interceptors.response.use(function (res) {
524
534
  });
525
535
 
526
536
  var requestInfo = function requestInfo() {
537
+ var _Digit$UserService$ge;
538
+
527
539
  return {
528
- authToken: Digit.UserService.getUser().access_token
540
+ authToken: ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.access_token) || null
529
541
  };
530
542
  };
531
543
 
532
544
  var authHeaders = function authHeaders() {
545
+ var _Digit$UserService$ge2;
546
+
533
547
  return {
534
- "auth-token": Digit.UserService.getUser().access_token
548
+ "auth-token": ((_Digit$UserService$ge2 = Digit.UserService.getUser()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.access_token) || null
535
549
  };
536
550
  };
537
551
 
538
552
  var userServiceData = function userServiceData() {
553
+ var _Digit$UserService$ge3;
554
+
539
555
  return {
540
- userInfo: Digit.UserService.getUser().info
556
+ userInfo: (_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : _Digit$UserService$ge3.info
541
557
  };
542
558
  };
543
559
 
@@ -624,10 +640,6 @@ var Request = function Request(_ref) {
624
640
  apiId: "Rainmaker"
625
641
  };
626
642
 
627
- if (noRequestInfo) {
628
- delete data.RequestInfo;
629
- }
630
-
631
643
  if (auth) {
632
644
  data.RequestInfo = _extends({}, data.RequestInfo, requestInfo());
633
645
  }
@@ -641,11 +653,15 @@ var Request = function Request(_ref) {
641
653
  msgId: ts + "|" + Digit.StoreData.getCurrentLanguage()
642
654
  });
643
655
  }
656
+
657
+ if (noRequestInfo) {
658
+ delete data.RequestInfo;
659
+ }
644
660
  }
645
661
 
646
662
  var headers1 = {
647
663
  "Content-Type": "application/json",
648
- Accept: (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "*/*" : "application/pdf"
664
+ 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"
649
665
  };
650
666
  if (authHeader) headers = _extends({}, headers, authHeaders());
651
667
  if (userDownload) headers = _extends({}, headers, headers1);
@@ -671,6 +687,8 @@ var Request = function Request(_ref) {
671
687
 
672
688
  var _temp4 = function () {
673
689
  if (multipartFormData) {
690
+ var _Digit$UserService$ge4;
691
+
674
692
  return Promise.resolve(Axios({
675
693
  method: method,
676
694
  url: _url,
@@ -678,7 +696,7 @@ var Request = function Request(_ref) {
678
696
  params: params,
679
697
  headers: {
680
698
  "Content-Type": "multipart/form-data",
681
- "auth-token": Digit.UserService.getUser().access_token
699
+ "auth-token": ((_Digit$UserService$ge4 = Digit.UserService.getUser()) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.access_token) || null
682
700
  }
683
701
  })).then(function (multipartFormDataRes) {
684
702
  _exit2 = true;
@@ -1566,6 +1584,20 @@ var getRentalDetailsCategoryCriteria = function getRentalDetailsCategoryCriteria
1566
1584
  };
1567
1585
  };
1568
1586
 
1587
+ var getChargeSlabsCategoryCriteria = function getChargeSlabsCategoryCriteria(tenantId, moduleCode) {
1588
+ return {
1589
+ details: {
1590
+ tenantId: tenantId,
1591
+ moduleDetails: [{
1592
+ moduleName: moduleCode,
1593
+ masterDetails: [{
1594
+ name: "ChargeSlabs"
1595
+ }]
1596
+ }]
1597
+ }
1598
+ };
1599
+ };
1600
+
1569
1601
  var getGenderTypeList = function getGenderTypeList(tenantId, moduleCode, type) {
1570
1602
  return {
1571
1603
  type: type,
@@ -1765,6 +1797,54 @@ var getTradeTypeRoleCriteria = function getTradeTypeRoleCriteria(tenantId, modul
1765
1797
  };
1766
1798
  };
1767
1799
 
1800
+ var getFSTPORejectionReasonCriteria = function getFSTPORejectionReasonCriteria(tenantId, moduleCode, type) {
1801
+ return {
1802
+ type: type,
1803
+ details: {
1804
+ tenantId: tenantId,
1805
+ moduleDetails: [{
1806
+ moduleName: moduleCode,
1807
+ masterDetails: [{
1808
+ name: "FSTPORejectionReason",
1809
+ filter: null
1810
+ }]
1811
+ }]
1812
+ }
1813
+ };
1814
+ };
1815
+
1816
+ var getFSMPaymentTypeCriteria = function getFSMPaymentTypeCriteria(tenantId, moduleCode, type) {
1817
+ return {
1818
+ type: type,
1819
+ details: {
1820
+ tenantId: tenantId,
1821
+ moduleDetails: [{
1822
+ moduleName: moduleCode,
1823
+ masterDetails: [{
1824
+ name: "PaymentType",
1825
+ filter: null
1826
+ }]
1827
+ }]
1828
+ }
1829
+ };
1830
+ };
1831
+
1832
+ var getFSMTripNumberCriteria = function getFSMTripNumberCriteria(tenantId, moduleCode, type) {
1833
+ return {
1834
+ type: type,
1835
+ details: {
1836
+ tenantId: tenantId,
1837
+ moduleDetails: [{
1838
+ moduleName: moduleCode,
1839
+ masterDetails: [{
1840
+ name: "TripNumber",
1841
+ filter: null
1842
+ }]
1843
+ }]
1844
+ }
1845
+ };
1846
+ };
1847
+
1768
1848
  var GetEgovLocations = function GetEgovLocations(MdmsRes) {
1769
1849
  return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map(function (obj) {
1770
1850
  return {
@@ -2007,6 +2087,14 @@ var getRentalDetailsCategory = function getRentalDetailsCategory(MdmsRes) {
2007
2087
  });
2008
2088
  };
2009
2089
 
2090
+ var getChargeSlabsCategory = function getChargeSlabsCategory(MdmsRes) {
2091
+ MdmsRes["PropertyTax"].ChargeSlabs.filter(function (category) {
2092
+ return category.active;
2093
+ }).map(function (ChargeSlabsInfo) {
2094
+ return _extends({}, ChargeSlabsInfo);
2095
+ });
2096
+ };
2097
+
2010
2098
  var getGenderType = function getGenderType(MdmsRes) {
2011
2099
  return MdmsRes["common-masters"].GenderType.filter(function (GenderType) {
2012
2100
  return GenderType.active;
@@ -2063,7 +2151,45 @@ var GetMCollectApplicationStatus = function GetMCollectApplicationStatus(MdmsRes
2063
2151
  });
2064
2152
  };
2065
2153
 
2066
- var getDssDashboard = function getDssDashboard() {
2154
+ var getFSMGenderType = function getFSMGenderType(MdmsRes) {
2155
+ return MdmsRes["common-masters"].GenderType.map(function (genderDetails) {
2156
+ return _extends({}, genderDetails, {
2157
+ i18nKey: "COMMON_GENDER_" + genderDetails.code
2158
+ });
2159
+ });
2160
+ };
2161
+
2162
+ var GetFSTPORejectionReason = function GetFSTPORejectionReason(MdmsRes) {
2163
+ return MdmsRes["Vehicle"].FSTPORejectionReason.filter(function (reason) {
2164
+ return reason.active;
2165
+ }).map(function (reasonDetails) {
2166
+ return _extends({}, reasonDetails, {
2167
+ i18nKey: "ES_ACTION_REASON_" + reasonDetails.code
2168
+ });
2169
+ });
2170
+ };
2171
+
2172
+ var GetPaymentType = function GetPaymentType(MdmsRes) {
2173
+ return MdmsRes["FSM"].PaymentType.filter(function (option) {
2174
+ return option.active;
2175
+ }).map(function (reasonDetails) {
2176
+ return _extends({}, reasonDetails, {
2177
+ i18nKey: "ES_ACTION_" + reasonDetails.code
2178
+ });
2179
+ });
2180
+ };
2181
+
2182
+ var GetTripNumber = function GetTripNumber(MdmsRes) {
2183
+ return MdmsRes["FSM"].TripNumber.filter(function (option) {
2184
+ return option.active;
2185
+ }).map(function (reasonDetails) {
2186
+ return _extends({}, reasonDetails, {
2187
+ i18nKey: "ES_ACTION_TRIP_" + reasonDetails.code
2188
+ });
2189
+ });
2190
+ };
2191
+
2192
+ var getDssDashboard = function getDssDashboard(MdmsRes) {
2067
2193
  return MdmsRes["dss-dashboard"]["dashboard-config"];
2068
2194
  };
2069
2195
 
@@ -2184,8 +2310,11 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2184
2310
  case "RentalDeatils":
2185
2311
  return getRentalDetailsCategory(MdmsRes);
2186
2312
 
2313
+ case "ChargeSlabs":
2314
+ return getChargeSlabsCategory(MdmsRes);
2315
+
2187
2316
  case "DssDashboard":
2188
- return getDssDashboard();
2317
+ return getDssDashboard(MdmsRes);
2189
2318
 
2190
2319
  case "BusinessService":
2191
2320
  return GetMCollectBusinessService(MdmsRes);
@@ -2214,6 +2343,18 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2214
2343
  case "CheckList":
2215
2344
  return GetChecklist(MdmsRes);
2216
2345
 
2346
+ case "FSMGenderType":
2347
+ return getFSMGenderType(MdmsRes);
2348
+
2349
+ case "FSTPORejectionReason":
2350
+ return GetFSTPORejectionReason(MdmsRes);
2351
+
2352
+ case "PaymentType":
2353
+ return GetPaymentType(MdmsRes);
2354
+
2355
+ case "TripNumber":
2356
+ return GetTripNumber(MdmsRes);
2357
+
2217
2358
  default:
2218
2359
  return MdmsRes;
2219
2360
  }
@@ -2443,6 +2584,9 @@ var MdmsService = {
2443
2584
  getRentalDetails: function getRentalDetails(tenantId, moduleCode) {
2444
2585
  return MdmsService.getDataByCriteria(tenantId, getRentalDetailsCategoryCriteria(tenantId, moduleCode), moduleCode);
2445
2586
  },
2587
+ getChargeSlabs: function getChargeSlabs(tenantId, moduleCode) {
2588
+ return MdmsService.getDataByCriteria(tenantId, getChargeSlabsCategoryCriteria(tenantId, moduleCode), moduleCode);
2589
+ },
2446
2590
  getDssDashboard: function getDssDashboard(tenantId, moduleCode) {
2447
2591
  return MdmsService.getDataByCriteria(tenantId, getDssDashboardCriteria(tenantId, moduleCode), moduleCode);
2448
2592
  },
@@ -2502,6 +2646,18 @@ var MdmsService = {
2502
2646
  },
2503
2647
  getTradeTypeRoleTypes: function getTradeTypeRoleTypes(tenantId, moduleCode, type) {
2504
2648
  return MdmsService.getDataByCriteria(tenantId, getTradeTypeRoleCriteria(tenantId, moduleCode, type), moduleCode);
2649
+ },
2650
+ getFSMGenderType: function getFSMGenderType(tenantId, moduleCode, type) {
2651
+ return MdmsService.getDataByCriteria(tenantId, getGenderTypeList(tenantId, moduleCode, type), moduleCode);
2652
+ },
2653
+ getFSTPORejectionReason: function getFSTPORejectionReason(tenantId, moduleCode, type) {
2654
+ return MdmsService.getDataByCriteria(tenantId, getFSTPORejectionReasonCriteria(tenantId, moduleCode, type), moduleCode);
2655
+ },
2656
+ getFSMPaymentType: function getFSMPaymentType(tenantId, moduleCode, type) {
2657
+ return MdmsService.getDataByCriteria(tenantId, getFSMPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode);
2658
+ },
2659
+ getFSMTripNumber: function getFSMTripNumber(tenantId, moduleCode, type) {
2660
+ return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode);
2505
2661
  }
2506
2662
  };
2507
2663
 
@@ -2577,7 +2733,7 @@ var StoreService = {
2577
2733
  digitInitData: function (stateCode, enabledModules) {
2578
2734
  try {
2579
2735
  return Promise.resolve(MdmsService.init(stateCode)).then(function (_ref) {
2580
- var _MdmsRes$tenant, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
2736
+ var _MdmsRes$tenant, _MdmsRes$tenant$citym, _MdmsRes$DIGITUI, _MdmsRes$tenant2;
2581
2737
 
2582
2738
  var MdmsRes = _ref.MdmsRes;
2583
2739
  var stateInfo = MdmsRes["common-masters"].StateInfo[0];
@@ -2597,10 +2753,12 @@ var StoreService = {
2597
2753
  bannerUrl: stateInfo.bannerUrl
2598
2754
  },
2599
2755
  localizationModules: stateInfo.localizationModules,
2600
- 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) {
2601
- return module.active;
2756
+ 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) {
2757
+ return module === null || module === void 0 ? void 0 : module.active;
2602
2758
  }).filter(function (module) {
2603
- return enabledModules.includes(module.code);
2759
+ return enabledModules === null || enabledModules === void 0 ? void 0 : enabledModules.includes(module === null || module === void 0 ? void 0 : module.code);
2760
+ })) === null || _MdmsRes$tenant$citym === void 0 ? void 0 : _MdmsRes$tenant$citym.sort(function (x, y) {
2761
+ return (x === null || x === void 0 ? void 0 : x.order) - (y === null || y === void 0 ? void 0 : y.order);
2604
2762
  })
2605
2763
  };
2606
2764
  initData.selectedLanguage = Digit.SessionStorage.get("locale") || initData.languages[0].value;
@@ -2612,11 +2770,7 @@ var StoreService = {
2612
2770
  return item.code === ele.code;
2613
2771
  }) ? unique : [].concat(unique, [ele]);
2614
2772
  }, []);
2615
- 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) {
2616
- return !!moduleTenants.find(function (mt) {
2617
- return mt.code === item.code;
2618
- });
2619
- }).map(function (tenant) {
2773
+ 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) {
2620
2774
  return _extends({
2621
2775
  i18nKey: "TENANT_TENANTS_" + tenant.code.replace(".", "_").toUpperCase()
2622
2776
  }, tenant);
@@ -2754,7 +2908,7 @@ var initI18n = function initI18n(callback) {
2754
2908
  var UploadServices = {
2755
2909
  Filestorage: function (module, filedata, tenantId) {
2756
2910
  try {
2757
- var _window, _window$globalConfigs;
2911
+ var _window, _window$globalConfigs, _Digit$UserService$ge;
2758
2912
 
2759
2913
  var formData = new FormData();
2760
2914
  formData.append("file", filedata, filedata.name);
@@ -2764,7 +2918,10 @@ var UploadServices = {
2764
2918
  var config = {
2765
2919
  method: "post",
2766
2920
  url: "" + Urls.FileStore + tenantInfo,
2767
- data: formData
2921
+ data: formData,
2922
+ headers: {
2923
+ "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
2924
+ }
2768
2925
  };
2769
2926
  return Promise.resolve(Axios(config));
2770
2927
  } catch (e) {
@@ -2773,6 +2930,8 @@ var UploadServices = {
2773
2930
  },
2774
2931
  MultipleFilesStorage: function (module, filesData, tenantId) {
2775
2932
  try {
2933
+ var _window2, _window2$globalConfig;
2934
+
2776
2935
  var formData = new FormData();
2777
2936
  var filesArray = Array.from(filesData);
2778
2937
  filesArray === null || filesArray === void 0 ? void 0 : filesArray.forEach(function (fileData, index) {
@@ -2780,12 +2939,14 @@ var UploadServices = {
2780
2939
  });
2781
2940
  formData.append("tenantId", tenantId);
2782
2941
  formData.append("module", module);
2942
+ var tenantInfo = (_window2 = window) !== null && _window2 !== void 0 && (_window2$globalConfig = _window2.globalConfigs) !== null && _window2$globalConfig !== void 0 && _window2$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
2783
2943
  var config = {
2784
2944
  method: "post",
2785
- url: Urls.FileStore,
2945
+ url: "" + Urls.FileStore + tenantInfo,
2786
2946
  data: formData,
2787
2947
  headers: {
2788
- 'Content-Type': 'multipart/form-data'
2948
+ 'Content-Type': 'multipart/form-data',
2949
+ "auth-token": Digit.UserService.getUser().access_token
2789
2950
  }
2790
2951
  };
2791
2952
  return Promise.resolve(Axios(config));
@@ -2795,9 +2956,12 @@ var UploadServices = {
2795
2956
  },
2796
2957
  Filefetch: function (filesArray, tenantId) {
2797
2958
  try {
2959
+ var _window3, _window3$globalConfig;
2960
+
2961
+ var tenantInfo = (_window3 = window) !== null && _window3 !== void 0 && (_window3$globalConfig = _window3.globalConfigs) !== null && _window3$globalConfig !== void 0 && _window3$globalConfig.getConfig("ENABLE_SINGLEINSTANCE") ? "?tenantId=" + tenantId : "";
2798
2962
  var config = {
2799
2963
  method: "get",
2800
- url: Urls.FileFetch,
2964
+ url: "" + Urls.FileFetch + tenantInfo,
2801
2965
  params: {
2802
2966
  tenantId: tenantId,
2803
2967
  fileStoreIds: filesArray === null || filesArray === void 0 ? void 0 : filesArray.join(",")
@@ -3132,7 +3296,7 @@ var FSMService = {
3132
3296
  });
3133
3297
  },
3134
3298
  vehicleUpdate: function vehicleUpdate(details) {
3135
- Request({
3299
+ return Request({
3136
3300
  url: Urls.fsm.vehilceUpdate,
3137
3301
  data: details,
3138
3302
  useCache: false,
@@ -3319,7 +3483,7 @@ var ConvertTimestampToDate = function ConvertTimestampToDate(timestamp, dateForm
3319
3483
  return timestamp ? dateFns.format(dateFns.toDate(timestamp), dateFormat) : null;
3320
3484
  };
3321
3485
  var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
3322
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
3486
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
3323
3487
  return "NA";
3324
3488
  }
3325
3489
 
@@ -3331,11 +3495,26 @@ var ConvertEpochToDate = function ConvertEpochToDate(dateEpoch) {
3331
3495
  day = (day > 9 ? "" : "0") + day;
3332
3496
  return day + "/" + month + "/" + year;
3333
3497
  };
3498
+ var ConvertEpochToTimeInHours = function ConvertEpochToTimeInHours(dateEpoch) {
3499
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
3500
+ return "NA";
3501
+ }
3502
+
3503
+ var dateFromApi = new Date(dateEpoch);
3504
+ var hour = dateFromApi.getHours();
3505
+ var min = dateFromApi.getMinutes();
3506
+ var period = hour > 12 ? "PM" : "AM";
3507
+ hour = hour > 12 ? hour - 12 : hour;
3508
+ hour = (hour > 9 ? "" : "0") + hour;
3509
+ min = (min > 9 ? "" : "0") + min;
3510
+ return hour + ":" + min + " " + period;
3511
+ };
3334
3512
 
3335
3513
  var dateUtils = {
3336
3514
  __proto__: null,
3337
3515
  ConvertTimestampToDate: ConvertTimestampToDate,
3338
- ConvertEpochToDate: ConvertEpochToDate
3516
+ ConvertEpochToDate: ConvertEpochToDate,
3517
+ ConvertEpochToTimeInHours: ConvertEpochToTimeInHours
3339
3518
  };
3340
3519
 
3341
3520
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -33911,6 +34090,22 @@ var reactDom = createCommonjsModule(function (module) {
33911
34090
  }
33912
34091
  });
33913
34092
 
34093
+ var changeClasses = function changeClasses(class1, class2) {
34094
+ var elements = document.getElementsByClassName(class1);
34095
+ Array.prototype.map.call(elements, function (testElement) {
34096
+ testElement.classList.add(class2);
34097
+ testElement.classList.remove(class1);
34098
+ });
34099
+ };
34100
+
34101
+ var revertCss = function revertCss() {
34102
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34103
+ };
34104
+
34105
+ var applyCss = function applyCss() {
34106
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34107
+ };
34108
+
33914
34109
  var Download = {
33915
34110
  Image: function Image(node, fileName, share, resolve) {
33916
34111
  if (resolve === void 0) {
@@ -33953,36 +34148,105 @@ var Download = {
33953
34148
  wb.Sheets[filename] = ws;
33954
34149
  XLSX.writeFile(wb, filename + ".xlsx");
33955
34150
  },
33956
- PDF: function PDF(node, fileName, share) {
33957
- var getPDF = function getPDF(canvas) {
33958
- var width = canvas.width;
33959
- var height = canvas.height;
33960
- var o = width > height ? "l" : "p";
33961
- var format = "a4";
33962
- return new jsPDF(o, "mm", format);
34151
+ PDF: function PDF(node, fileName, share, resolve) {
34152
+ if (resolve === void 0) {
34153
+ resolve = null;
34154
+ }
34155
+
34156
+ var saveAs = function saveAs(uri, filename) {
34157
+ var link = document.createElement("a");
34158
+
34159
+ if (typeof link.download === "string") {
34160
+ link.href = uri;
34161
+ link.download = filename;
34162
+ document.body.appendChild(link);
34163
+ link.click();
34164
+ document.body.removeChild(link);
34165
+ } else {
34166
+ window.open(uri);
34167
+ }
33963
34168
  };
33964
34169
 
34170
+ var dataURItoBlob = function dataURItoBlob(dataURI) {
34171
+ var binary = atob(dataURI.split(',')[1]);
34172
+ var array = [];
34173
+
34174
+ for (var i = 0; i < binary.length; i++) {
34175
+ array.push(binary.charCodeAt(i));
34176
+ }
34177
+
34178
+ return new Blob([new Uint8Array(array)], {
34179
+ type: 'image/jpeg'
34180
+ });
34181
+ };
34182
+
34183
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34184
+ applyCss();
33965
34185
  var element = reactDom.findDOMNode(node.current);
33966
- return html2canvas(element, {
33967
- scrollY: -window.scrollY,
33968
- scrollX: 0,
33969
- useCORS: true,
33970
- scale: 1.5,
33971
- windowWidth: document.documentElement.offsetWidth,
33972
- windowHeight: document.documentElement.offsetHeight
33973
- }).then(function (canvas) {
33974
- var pdf = getPDF(canvas);
33975
- var jpegImage = canvas.toDataURL("image/jpeg");
33976
- var imgProps = pdf.getImageProperties(jpegImage);
33977
- var pageHeight = 295;
33978
- var pdfWidth = imgProps.width * pageHeight / imgProps.height;
33979
- var pdfHeight = imgProps.height * pdfWidth / imgProps.width;
33980
- var x = (pdf.internal.pageSize.width - pdfWidth) / 2;
33981
- var position = 5;
33982
- pdf.addImage(jpegImage, "JPEG", x, position, pdfWidth, pdfHeight, "a", "FAST");
33983
- return share ? new File([pdf.output("blob")], fileName + ".pdf", {
33984
- type: "application/pdf"
33985
- }) : pdf.save(fileName + ".pdf");
34186
+ return domtoimage.toJpeg(element, {
34187
+ quality: 1,
34188
+ bgcolor: 'white',
34189
+ filter: function filter(node) {
34190
+ var _node$className, _node$className$inclu;
34191
+
34192
+ 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"));
34193
+ },
34194
+ style: {
34195
+ margin: '25px'
34196
+ }
34197
+ }).then(function (dataUrl) {
34198
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34199
+ revertCss();
34200
+ var blobData = dataURItoBlob(dataUrl);
34201
+ revertCss();
34202
+ return share ? resolve(new File([blobData], fileName + ".jpeg", {
34203
+ type: "image/jpeg"
34204
+ })) : saveAs(dataUrl, fileName + ".jpeg");
34205
+ });
34206
+ },
34207
+ IndividualChartImage: function IndividualChartImage(node, fileName, share, resolve) {
34208
+ if (resolve === void 0) {
34209
+ resolve = null;
34210
+ }
34211
+
34212
+ var saveAs = function saveAs(uri, filename) {
34213
+ var link = document.createElement("a");
34214
+
34215
+ if (typeof link.download === "string") {
34216
+ link.href = uri;
34217
+ link.download = filename;
34218
+ document.body.appendChild(link);
34219
+ link.click();
34220
+ document.body.removeChild(link);
34221
+ } else {
34222
+ window.open(uri);
34223
+ }
34224
+ };
34225
+
34226
+ var dataURItoBlob = function dataURItoBlob(dataURI) {
34227
+ var binary = atob(dataURI.split(',')[1]);
34228
+ var array = [];
34229
+
34230
+ for (var i = 0; i < binary.length; i++) {
34231
+ array.push(binary.charCodeAt(i));
34232
+ }
34233
+
34234
+ return new Blob([new Uint8Array(array)], {
34235
+ type: 'image/jpeg'
34236
+ });
34237
+ };
34238
+
34239
+ changeClasses('dss-white-pre-line', "dss-white-pre-temp");
34240
+ var element = reactDom.findDOMNode(node.current);
34241
+ return domtoimage.toJpeg(element, {
34242
+ quality: 1,
34243
+ bgcolor: 'white'
34244
+ }).then(function (dataUrl) {
34245
+ var blobData = dataURItoBlob(dataUrl);
34246
+ changeClasses("dss-white-pre-temp", 'dss-white-pre-line');
34247
+ return share ? resolve(new File([blobData], fileName + ".jpeg", {
34248
+ type: "image/jpeg"
34249
+ })) : saveAs(dataUrl, fileName + ".jpeg");
33986
34250
  });
33987
34251
  }
33988
34252
  };
@@ -34303,6 +34567,19 @@ function _catch(body, recover) {
34303
34567
 
34304
34568
  return result;
34305
34569
  }
34570
+ function _finallyRethrows(body, finalizer) {
34571
+ try {
34572
+ var result = body();
34573
+ } catch (e) {
34574
+ return finalizer(true, e);
34575
+ }
34576
+
34577
+ if (result && result.then) {
34578
+ return result.then(finalizer.bind(null, false), finalizer.bind(null, true));
34579
+ }
34580
+
34581
+ return finalizer(false, result);
34582
+ }
34306
34583
 
34307
34584
  function listCacheClear() {
34308
34585
  this.__data__ = [];
@@ -35329,8 +35606,8 @@ function initCloneArray(array) {
35329
35606
 
35330
35607
  var _initCloneArray = initCloneArray;
35331
35608
 
35332
- var Uint8Array = _root.Uint8Array;
35333
- var _Uint8Array = Uint8Array;
35609
+ var Uint8Array$1 = _root.Uint8Array;
35610
+ var _Uint8Array = Uint8Array$1;
35334
35611
 
35335
35612
  function cloneArrayBuffer(arrayBuffer) {
35336
35613
  var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
@@ -35618,6 +35895,7 @@ var cloneDeep_1 = cloneDeep;
35618
35895
 
35619
35896
  var getThumbnails = function getThumbnails(ids, tenantId) {
35620
35897
  try {
35898
+ tenantId = window.location.href.includes("/obps/") ? Digit.ULBService.getStateId() : tenantId;
35621
35899
  return Promise.resolve(Digit.UploadServices.Filefetch(ids, tenantId)).then(function (res) {
35622
35900
  if (res.data.fileStoreIds && res.data.fileStoreIds.length !== 0) {
35623
35901
  return {
@@ -35722,7 +36000,8 @@ var WorkflowService = {
35722
36000
  var tenantId = _ref.tenantId,
35723
36001
  id = _ref.id,
35724
36002
  moduleCode = _ref.moduleCode,
35725
- role = _ref.role;
36003
+ role = _ref.role,
36004
+ getTripData = _ref.getTripData;
35726
36005
 
35727
36006
  try {
35728
36007
  return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, id)).then(function (workflow) {
@@ -35736,13 +36015,13 @@ var WorkflowService = {
35736
36015
 
35737
36016
  var _exit = false;
35738
36017
 
35739
- function _temp8(_result2) {
36018
+ function _temp14(_result2) {
35740
36019
  return _exit ? _result2 : {};
35741
36020
  }
35742
36021
 
35743
36022
  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;
35744
36023
 
35745
- var _temp7 = function () {
36024
+ var _temp13 = function () {
35746
36025
  if (workflow && workflow.ProcessInstances) {
35747
36026
  var _processInstances$, _businessServiceRespo;
35748
36027
 
@@ -35770,7 +36049,7 @@ var WorkflowService = {
35770
36049
  });
35771
36050
 
35772
36051
  if (currentState && currentState !== null && currentState !== void 0 && currentState.isStateUpdatable) {
35773
- if (moduleCode === "FSM" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
36052
+ if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE" || moduleCode === "FSM_VEHICLE_TRIP" || moduleCode === "PGR" || moduleCode === "OBPS") null;else nextActions.push({
35774
36053
  action: "EDIT",
35775
36054
  state: currentState
35776
36055
  });
@@ -35823,7 +36102,36 @@ var WorkflowService = {
35823
36102
  return function () {
35824
36103
  if (processInstances.length > 0) {
35825
36104
  return Promise.resolve(makeCommentsSubsidariesOfPreviousActions(processInstances)).then(function (TLEnrichedWithWorflowData) {
35826
- var _workflow$ProcessInst, _workflow$ProcessInst2;
36105
+ function _temp12() {
36106
+ var _workflow$ProcessInst, _workflow$ProcessInst2;
36107
+
36108
+ var nextActions = actionRolePair;
36109
+
36110
+ if (role !== "CITIZEN" && moduleCode === "PGR") {
36111
+ var _timeline;
36112
+
36113
+ var onlyPendingForAssignmentStatusArray = (_timeline = timeline) === null || _timeline === void 0 ? void 0 : _timeline.filter(function (e) {
36114
+ return (e === null || e === void 0 ? void 0 : e.status) === "PENDINGFORASSIGNMENT";
36115
+ });
36116
+ var duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1);
36117
+ timeline.push(_extends({}, duplicateCheckpointOfPendingForAssignment, {
36118
+ status: "COMPLAINT_FILED"
36119
+ }));
36120
+ }
36121
+
36122
+ if (timeline[timeline.length - 1].status !== "CREATED" && (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE")) timeline.push({
36123
+ status: "CREATED"
36124
+ });
36125
+ var details = {
36126
+ timeline: timeline,
36127
+ nextActions: nextActions,
36128
+ actionState: actionState,
36129
+ 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,
36130
+ processInstances: applicationProcessInstance
36131
+ };
36132
+ _exit = true;
36133
+ return details;
36134
+ }
35827
36135
 
35828
36136
  var timeline = TLEnrichedWithWorflowData.map(function (instance, ind) {
35829
36137
  var _instance$thumbnailsT, _instance$thumbnailsT2;
@@ -35861,40 +36169,148 @@ var WorkflowService = {
35861
36169
  };
35862
36170
  return checkPoint;
35863
36171
  });
35864
- var nextActions = actionRolePair;
35865
36172
 
35866
- if (role !== "CITIZEN" && moduleCode === "PGR") {
35867
- var onlyPendingForAssignmentStatusArray = timeline === null || timeline === void 0 ? void 0 : timeline.filter(function (e) {
35868
- return (e === null || e === void 0 ? void 0 : e.status) === "PENDINGFORASSIGNMENT";
35869
- });
35870
- var duplicateCheckpointOfPendingForAssignment = onlyPendingForAssignmentStatusArray.at(-1);
35871
- timeline.push(_extends({}, duplicateCheckpointOfPendingForAssignment, {
35872
- status: "COMPLAINT_FILED"
35873
- }));
35874
- }
36173
+ var _temp11 = function () {
36174
+ if (getTripData) {
36175
+ var _temp15 = _catch(function () {
36176
+ var filters = {
36177
+ businessService: 'FSM_VEHICLE_TRIP',
36178
+ refernceNos: id
36179
+ };
36180
+ return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
36181
+ var _temp9 = function () {
36182
+ if (tripSearchResp && tripSearchResp.vehicleTrip && tripSearchResp.vehicleTrip.length) {
36183
+ var _temp16 = function _temp16() {
36184
+ var tripTimeline = [];
36185
+ var disposalInProgressPosition = timeline.findIndex(function (data) {
36186
+ return data.status === "DISPOSAL_IN_PROGRESS";
36187
+ });
36188
+
36189
+ if (disposalInProgressPosition !== -1) {
36190
+ var _timeline2;
36191
+
36192
+ timeline[disposalInProgressPosition].numberOfTrips = _numberOfTrips;
36193
+
36194
+ (_timeline2 = timeline).splice.apply(_timeline2, [disposalInProgressPosition + 1, 0].concat(_waitingForDisposedAction));
36195
+
36196
+ tripTimeline = _disposedAction;
36197
+ } else {
36198
+ tripTimeline = _disposedAction.concat(_waitingForDisposedAction);
36199
+ }
36200
+
36201
+ var feedbackPosition = timeline.findIndex(function (data) {
36202
+ return data.status === "CITIZEN_FEEDBACK_PENDING";
36203
+ });
36204
+
36205
+ if (feedbackPosition !== -1) {
36206
+ var _timeline3;
36207
+
36208
+ (_timeline3 = timeline).splice.apply(_timeline3, [feedbackPosition + 1, 0].concat(tripTimeline));
36209
+ } else {
36210
+ timeline = tripTimeline.concat(timeline);
36211
+ }
36212
+ };
36213
+
36214
+ var _numberOfTrips = tripSearchResp.vehicleTrip.length;
36215
+ var cretaedTime = 0;
36216
+ var lastModifiedTime = 0;
36217
+ var waitingForDisposedCount = 0;
36218
+ var disposedCount = 0;
36219
+ var _waitingForDisposedAction = [];
36220
+ var _disposedAction = [];
36221
+
36222
+ var _temp17 = _forOf(tripSearchResp.vehicleTrip, function (data) {
36223
+ return Promise.resolve(Digit.WorkflowService.getByBusinessId(tenantId, data.applicationNo)).then(function (resp) {
36224
+ var _resp$ProcessInstance;
36225
+
36226
+ resp === null || resp === void 0 ? void 0 : (_resp$ProcessInstance = resp.ProcessInstances) === null || _resp$ProcessInstance === void 0 ? void 0 : _resp$ProcessInstance.map(function (instance, ind) {
36227
+ if (instance.state.applicationStatus === "WAITING_FOR_DISPOSAL") {
36228
+ var _instance$thumbnailsT3, _instance$thumbnailsT4;
36229
+
36230
+ waitingForDisposedCount++;
36231
+ cretaedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime);
36232
+ lastModifiedTime = Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime);
36233
+ _waitingForDisposedAction = [{
36234
+ performedAction: instance.action,
36235
+ status: instance.state.applicationStatus,
36236
+ state: instance.state.state,
36237
+ assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36238
+ rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36239
+ thumbnailsToShow: {
36240
+ thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT3 = instance.thumbnailsToShow) === null || _instance$thumbnailsT3 === void 0 ? void 0 : _instance$thumbnailsT3.thumbs,
36241
+ fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT4 = instance.thumbnailsToShow) === null || _instance$thumbnailsT4 === void 0 ? void 0 : _instance$thumbnailsT4.images
36242
+ },
36243
+ assignes: instance.assignes,
36244
+ caption: instance.assignes ? instance.assignes.map(function (assignee) {
36245
+ return {
36246
+ name: assignee.name,
36247
+ mobileNumber: assignee.mobileNumber
36248
+ };
36249
+ }) : null,
36250
+ auditDetails: {
36251
+ created: cretaedTime,
36252
+ lastModified: lastModifiedTime
36253
+ },
36254
+ numberOfTrips: _numberOfTrips
36255
+ }];
36256
+ }
36257
+
36258
+ if (instance.state.applicationStatus === "DISPOSED") {
36259
+ var _instance$thumbnailsT5, _instance$thumbnailsT6;
36260
+
36261
+ disposedCount++;
36262
+ cretaedTime = instance.auditDetails.createdTime > cretaedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.createdTime) : cretaedTime;
36263
+ lastModifiedTime = instance.auditDetails.lastModifiedTime > lastModifiedTime ? Digit.DateUtils.ConvertEpochToDate(instance.auditDetails.lastModifiedTime) : lastModifiedTime;
36264
+ _disposedAction = [{
36265
+ performedAction: instance.action,
36266
+ status: instance.state.applicationStatus,
36267
+ state: instance.state.state,
36268
+ assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36269
+ rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36270
+ thumbnailsToShow: {
36271
+ thumbs: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT5 = instance.thumbnailsToShow) === null || _instance$thumbnailsT5 === void 0 ? void 0 : _instance$thumbnailsT5.thumbs,
36272
+ fullImage: instance === null || instance === void 0 ? void 0 : (_instance$thumbnailsT6 = instance.thumbnailsToShow) === null || _instance$thumbnailsT6 === void 0 ? void 0 : _instance$thumbnailsT6.images
36273
+ },
36274
+ assignes: instance.assignes,
36275
+ caption: instance.assignes ? instance.assignes.map(function (assignee) {
36276
+ return {
36277
+ name: assignee.name,
36278
+ mobileNumber: assignee.mobileNumber
36279
+ };
36280
+ }) : null,
36281
+ auditDetails: {
36282
+ created: cretaedTime,
36283
+ lastModified: lastModifiedTime
36284
+ },
36285
+ numberOfTrips: disposedCount
36286
+ }];
36287
+ }
36288
+ });
36289
+ });
36290
+ });
36291
+
36292
+ return _temp17 && _temp17.then ? _temp17.then(_temp16) : _temp16(_temp17);
36293
+ }
36294
+ }();
36295
+
36296
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
36297
+ });
36298
+ }, function () {});
36299
+
36300
+ if (_temp15 && _temp15.then) return _temp15.then(function () {});
36301
+ }
36302
+ }();
35875
36303
 
35876
- if (timeline[timeline.length - 1].status !== "CREATED" && moduleCode === "FSM") timeline.push({
35877
- status: "CREATED"
35878
- });
35879
- var details = {
35880
- timeline: timeline,
35881
- nextActions: nextActions,
35882
- actionState: actionState,
35883
- 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,
35884
- processInstances: applicationProcessInstance
35885
- };
35886
- _exit = true;
35887
- return details;
36304
+ return _temp11 && _temp11.then ? _temp11.then(_temp12) : _temp12(_temp11);
35888
36305
  });
35889
36306
  }
35890
36307
  }();
35891
36308
  } else {
35892
- console.warn("error fetching workflow services");
35893
36309
  throw new Error("error fetching workflow services");
35894
36310
  }
35895
36311
  }();
35896
36312
 
35897
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
36313
+ return _temp13 && _temp13.then ? _temp13.then(_temp14) : _temp14(_temp13);
35898
36314
  });
35899
36315
  });
35900
36316
  } catch (e) {
@@ -35991,6 +36407,7 @@ var Complaint = {
35991
36407
  documentUid: "",
35992
36408
  additionalDetails: {}
35993
36409
  }] : null;
36410
+ if (!uploadedDocument) complaintDetails.workflow.verificationDocuments = [];
35994
36411
  return Promise.resolve(Digit.PGRService.update(complaintDetails, tenantId));
35995
36412
  } catch (e) {
35996
36413
  return Promise.reject(e);
@@ -36050,19 +36467,22 @@ var UserService = {
36050
36467
  try {
36051
36468
  var userType = UserService.getType();
36052
36469
 
36053
- var _temp2 = _catch(function () {
36054
- return Promise.resolve(UserService.logoutUser()).then(function () {
36055
- window.localStorage.clear();
36056
- window.sessionStorage.clear();
36470
+ var _temp2 = _finallyRethrows(function () {
36471
+ return _catch(function () {
36472
+ return Promise.resolve(UserService.logoutUser()).then(function () {});
36473
+ }, function () {});
36474
+ }, function (_wasThrown, _result) {
36475
+ window.localStorage.clear();
36476
+ window.sessionStorage.clear();
36057
36477
 
36058
- if (userType === "citizen") {
36059
- window.location.replace("/digit-ui/citizen");
36060
- } else {
36061
- window.location.replace("/digit-ui/employee/user/language-selection");
36062
- }
36063
- });
36064
- }, function (e) {
36065
- console.error(e);
36478
+ if (userType === "citizen") {
36479
+ window.location.replace("/digit-ui/citizen");
36480
+ } else {
36481
+ window.location.replace("/digit-ui/employee/user/language-selection");
36482
+ }
36483
+
36484
+ if (_wasThrown) throw _result;
36485
+ return _result;
36066
36486
  });
36067
36487
 
36068
36488
  return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
@@ -36135,8 +36555,9 @@ var UserService = {
36135
36555
  changePassword: function changePassword(details, stateCode) {
36136
36556
  return ServiceRequest({
36137
36557
  serviceName: "changePassword",
36138
- url: Urls.ChangePassword,
36558
+ url: Urls.ChangePassword1,
36139
36559
  data: _extends({}, details),
36560
+ auth: true,
36140
36561
  params: {
36141
36562
  tenantId: stateCode
36142
36563
  }
@@ -36191,13 +36612,15 @@ var PTService = {
36191
36612
  },
36192
36613
  fetchPaymentDetails: function fetchPaymentDetails(_ref2) {
36193
36614
  var tenantId = _ref2.tenantId,
36194
- consumerCodes = _ref2.consumerCodes;
36615
+ consumerCodes = _ref2.consumerCodes,
36616
+ _ref2$auth = _ref2.auth,
36617
+ auth = _ref2$auth === void 0 ? true : _ref2$auth;
36195
36618
  return Request({
36196
36619
  url: Urls.pt.fetch_payment_details,
36197
36620
  useCache: false,
36198
36621
  method: "POST",
36199
- auth: true,
36200
- userService: true,
36622
+ auth: auth === false ? auth : true,
36623
+ userService: auth === false ? auth : true,
36201
36624
  params: {
36202
36625
  tenantId: tenantId,
36203
36626
  consumerCode: consumerCodes,
@@ -36268,6 +36691,53 @@ var PTService = {
36268
36691
  tenantId: tenantId
36269
36692
  }, filters)
36270
36693
  });
36694
+ },
36695
+ paymentsearch: function paymentsearch(_ref4) {
36696
+ var tenantId = _ref4.tenantId,
36697
+ filters = _ref4.filters,
36698
+ auth = _ref4.auth;
36699
+ return Request({
36700
+ url: Urls.pt.payment_search,
36701
+ useCache: false,
36702
+ method: "POST",
36703
+ auth: auth === false ? auth : true,
36704
+ userService: auth === false ? auth : true,
36705
+ params: _extends({
36706
+ tenantId: tenantId
36707
+ }, filters)
36708
+ });
36709
+ },
36710
+ ptCalculateMutation: function ptCalculateMutation(details, tenantId) {
36711
+ return Request({
36712
+ url: Urls.pt.pt_calculate_mutation,
36713
+ data: details,
36714
+ useCache: false,
36715
+ userService: true,
36716
+ method: "POST",
36717
+ params: {
36718
+ tenantId: tenantId
36719
+ },
36720
+ auth: true
36721
+ });
36722
+ }
36723
+ };
36724
+
36725
+ var WSService = {
36726
+ search: function search(_ref) {
36727
+ var tenantId = _ref.tenantId,
36728
+ filters = _ref.filters,
36729
+ businessService = _ref.businessService;
36730
+ return Request({
36731
+ url: businessService === "WS" ? Urls.ws.water_search : Urls.ws.sewarage_search,
36732
+ useCache: false,
36733
+ method: "POST",
36734
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true,
36735
+ userService: filters !== null && filters !== void 0 && filters.locality ? false : true,
36736
+ setTimeParam: false,
36737
+ params: _extends({
36738
+ tenantId: tenantId
36739
+ }, filters)
36740
+ });
36271
36741
  }
36272
36742
  };
36273
36743
 
@@ -36594,8 +37064,10 @@ var Events = {
36594
37064
  });
36595
37065
  },
36596
37066
  Update: function Update(data) {
37067
+ var _window, _window$globalConfigs;
37068
+
36597
37069
  return Request({
36598
- url: Urls.events.updateEvent,
37070
+ 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,
36599
37071
  useCache: false,
36600
37072
  method: "POST",
36601
37073
  auth: true,
@@ -36667,7 +37139,7 @@ var ShareFiles = {
36667
37139
  try {
36668
37140
  return Promise.resolve(UploadServices.Filestorage("DSS", data, tenantId)).then(function (fileUploadId) {
36669
37141
  return Promise.resolve(UploadServices.Filefetch([fileUploadId.data.files[0].fileStoreId], fileUploadId.data.files[0].tenantId)).then(function (fileUrl) {
36670
- return UrlShortener(fileUrl.data[fileUploadId.data.files[0].fileStoreId].split(",")[0]);
37142
+ return UrlShortener(Digit.Utils.getFileUrl(fileUrl.data[fileUploadId.data.files[0].fileStoreId]));
36671
37143
  });
36672
37144
  });
36673
37145
  } catch (e) {
@@ -36703,6 +37175,38 @@ var ShareFiles = {
36703
37175
  } catch (e) {
36704
37176
  return Promise.reject(e);
36705
37177
  }
37178
+ },
37179
+ IndividualChartImage: function (tenantId, node, filename, target) {
37180
+ try {
37181
+ return Promise.resolve(new Promise(function (resolve) {
37182
+ return Download.IndividualChartImage(node, filename, true, resolve);
37183
+ })).then(function (imageData) {
37184
+ return !target && navigator.share ? navigator.share({
37185
+ files: [imageData],
37186
+ title: filename
37187
+ }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37188
+ ShareFiles.targetLink(target, shortUrl);
37189
+ });
37190
+ });
37191
+ } catch (e) {
37192
+ return Promise.reject(e);
37193
+ }
37194
+ },
37195
+ DownloadImage: function (tenantId, node, filename, target) {
37196
+ try {
37197
+ return Promise.resolve(new Promise(function (resolve) {
37198
+ return Download.PDF(node, filename, true, resolve);
37199
+ })).then(function (imageData) {
37200
+ return !target && navigator.share ? navigator.share({
37201
+ files: [imageData],
37202
+ title: filename
37203
+ }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37204
+ ShareFiles.targetLink(target, shortUrl);
37205
+ });
37206
+ });
37207
+ } catch (e) {
37208
+ return Promise.reject(e);
37209
+ }
36706
37210
  }
36707
37211
  };
36708
37212
 
@@ -36773,7 +37277,7 @@ var GetServiceDefinitions = {
36773
37277
 
36774
37278
  var ULBService = {
36775
37279
  getCurrentTenantId: function getCurrentTenantId() {
36776
- var _user$info, _user$info2, _user$info3;
37280
+ var _user$info, _user$info2, _user$info3, _window;
36777
37281
 
36778
37282
  var user = UserService.getUser();
36779
37283
 
@@ -36787,13 +37291,13 @@ var ULBService = {
36787
37291
  }
36788
37292
  }
36789
37293
 
36790
- 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");
37294
+ 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");
36791
37295
  return tenantId;
36792
37296
  },
36793
37297
  getStateId: function getStateId() {
36794
- var _window, _window$globalConfigs;
37298
+ var _window2, _window2$globalConfig;
36795
37299
 
36796
- 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");
37300
+ 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");
36797
37301
  },
36798
37302
  getCurrentUlb: function getCurrentUlb() {
36799
37303
  var initData = StoreService.getInitData();
@@ -36801,6 +37305,98 @@ var ULBService = {
36801
37305
  return initData.tenants.find(function (tenant) {
36802
37306
  return tenant.code === tenantId;
36803
37307
  });
37308
+ },
37309
+ getCitizenCurrentTenant: function getCitizenCurrentTenant(selectedCity) {
37310
+ var _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2;
37311
+
37312
+ if (selectedCity === void 0) {
37313
+ selectedCity = false;
37314
+ }
37315
+
37316
+ var homeCity = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
37317
+
37318
+ if (selectedCity) {
37319
+ return homeCity;
37320
+ }
37321
+
37322
+ 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();
37323
+ },
37324
+ getUserUlbs: function getUserUlbs(userRole) {
37325
+ if (userRole === void 0) {
37326
+ userRole = "";
37327
+ }
37328
+
37329
+ var stringReplaceAll = function stringReplaceAll(str, searcher, replaceWith) {
37330
+ if (str === void 0) {
37331
+ str = "";
37332
+ }
37333
+
37334
+ if (searcher === void 0) {
37335
+ searcher = "";
37336
+ }
37337
+
37338
+ if (replaceWith === void 0) {
37339
+ replaceWith = "";
37340
+ }
37341
+
37342
+ if (searcher == "") return str;
37343
+
37344
+ while ((_str = str) !== null && _str !== void 0 && _str.includes(searcher)) {
37345
+ var _str, _str2;
37346
+
37347
+ str = (_str2 = str) === null || _str2 === void 0 ? void 0 : _str2.replace(searcher, replaceWith);
37348
+ }
37349
+
37350
+ return str;
37351
+ };
37352
+
37353
+ var userloggedValues = Digit.SessionStorage.get("citizen.userRequestObject");
37354
+ var teantsArray = [],
37355
+ filteredArray = [];
37356
+
37357
+ if (userRole === "") {
37358
+ var _userloggedValues$inf, _userloggedValues$inf2;
37359
+
37360
+ 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) {
37361
+ return teantsArray.push(role.tenantId);
37362
+ });
37363
+ var unique = teantsArray.filter(function (item, i, ar) {
37364
+ return ar.indexOf(item) === i;
37365
+ });
37366
+ unique === null || unique === void 0 ? void 0 : unique.forEach(function (uniCode) {
37367
+ var _stringReplaceAll;
37368
+
37369
+ filteredArray.push({
37370
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll === void 0 ? void 0 : _stringReplaceAll.toUpperCase()),
37371
+ value: uniCode,
37372
+ code: uniCode,
37373
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37374
+ });
37375
+ });
37376
+ return filteredArray;
37377
+ } else {
37378
+ var _userloggedValues$inf3, _userloggedValues$inf4;
37379
+
37380
+ 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) {
37381
+ if (userRole === role.code) teantsArray.push(role.tenantId);
37382
+ });
37383
+
37384
+ var _unique = teantsArray.filter(function (item, i, ar) {
37385
+ return ar.indexOf(item) === i;
37386
+ });
37387
+
37388
+ _unique === null || _unique === void 0 ? void 0 : _unique.forEach(function (uniCode) {
37389
+ var _stringReplaceAll2;
37390
+
37391
+ filteredArray.push({
37392
+ i18nKey: "TENANT_TENANTS_" + ((_stringReplaceAll2 = stringReplaceAll(uniCode, ".", "_")) === null || _stringReplaceAll2 === void 0 ? void 0 : _stringReplaceAll2.toUpperCase()),
37393
+ value: uniCode,
37394
+ code: uniCode,
37395
+ name: uniCode.substring(uniCode.indexOf(".") + 1)
37396
+ });
37397
+ });
37398
+ return filteredArray;
37399
+ }
36804
37400
  }
36805
37401
  };
36806
37402
 
@@ -36886,7 +37482,9 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
36886
37482
  _ref$role = _ref.role,
36887
37483
  role = _ref$role === void 0 ? "CITIZEN" : _ref$role,
36888
37484
  getStaleData = _ref.getStaleData,
36889
- config = _ref.config;
37485
+ config = _ref.config,
37486
+ _ref$getTripData = _ref.getTripData,
37487
+ getTripData = _ref$getTripData === void 0 ? false : _ref$getTripData;
36890
37488
  var queryClient = reactQuery.useQueryClient();
36891
37489
  var staleDataConfig = {
36892
37490
  staleTime: Infinity
@@ -36897,7 +37495,8 @@ var useWorkflowDetails = function useWorkflowDetails(_ref) {
36897
37495
  tenantId: tenantId,
36898
37496
  id: id,
36899
37497
  moduleCode: moduleCode,
36900
- role: role
37498
+ role: role,
37499
+ getTripData: getTripData
36901
37500
  });
36902
37501
  }, getStaleData ? _extends({}, staleDataConfig, config) : config),
36903
37502
  isLoading = _useQuery.isLoading,
@@ -36939,9 +37538,7 @@ var useSessionStorage = function useSessionStorage(key, initialValue) {
36939
37538
  var valueToStore = value instanceof Function ? value(storedValue) : value;
36940
37539
  setStoredValue(valueToStore);
36941
37540
  Digit.SessionStorage.set(key, valueToStore);
36942
- } catch (err) {
36943
- console.error(err);
36944
- }
37541
+ } catch (err) {}
36945
37542
  };
36946
37543
 
36947
37544
  var clearValue = function clearValue() {
@@ -36962,16 +37559,20 @@ var useQueryParams = function useQueryParams() {
36962
37559
  return params;
36963
37560
  };
36964
37561
 
36965
- var useOnClickOutside = function useOnClickOutside(ref, handler, isActive) {
37562
+ var useOnClickOutside = function useOnClickOutside(ref, handler, isActive, eventParam) {
37563
+ if (eventParam === void 0) {
37564
+ eventParam = false;
37565
+ }
37566
+
36966
37567
  React.useEffect(function () {
36967
37568
  if (isActive) {
36968
- document.addEventListener("click", handleClickOutSide, false);
37569
+ document.addEventListener("click", handleClickOutSide, eventParam);
36969
37570
  } else {
36970
- document.removeEventListener("click", handleClickOutSide, false);
37571
+ document.removeEventListener("click", handleClickOutSide, eventParam);
36971
37572
  }
36972
37573
 
36973
37574
  return function () {
36974
- document.removeEventListener("click", handleClickOutSide, false);
37575
+ document.removeEventListener("click", handleClickOutSide, eventParam);
36975
37576
  };
36976
37577
  }, [isActive]);
36977
37578
 
@@ -37057,7 +37658,6 @@ var useFetchBillsForBuissnessService = function useFetchBillsForBuissnessService
37057
37658
  return Digit.PaymentService.fetchBill(_tenantId, params);
37058
37659
  }, _extends({
37059
37660
  retry: function retry(count, err) {
37060
- console.error(err, "inside the payment hook");
37061
37661
  return false;
37062
37662
  }
37063
37663
  }, config)),
@@ -37086,10 +37686,56 @@ var useFetchPayment = function useFetchPayment(_ref4, config) {
37086
37686
 
37087
37687
  var fetchBill = function fetchBill() {
37088
37688
  try {
37089
- return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37090
- consumerCode: consumerCode,
37091
- businessService: businessService
37092
- }));
37689
+ if (businessService !== null && businessService !== void 0 && businessService.includes("PT")) {
37690
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37691
+ consumerCode: consumerCode,
37692
+ businessService: businessService
37693
+ })).then(function (fetchedBill) {
37694
+ var _fetchedBill$Bill, _fetchedBill$Bill$, _fetchedBill$Bill$$bi, _fetchedBill$Bill$$bi2, _fetchedBill$Bill3, _fetchedBill$Bill3$, _fetchedBill$Bill3$$b;
37695
+
37696
+ 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) {
37697
+ return b.fromPeriod - a.fromPeriod;
37698
+ })) === null || _fetchedBill$Bill$$bi2 === void 0 ? void 0 : _fetchedBill$Bill$$bi2[0]) || {};
37699
+ fetchedBill.Bill[0].billDetails = fetchedBill.Bill[0].billDetails.map(function (ele) {
37700
+ var _fetchedBill$Bill2, _fetchedBill$Bill2$;
37701
+
37702
+ return _extends({}, ele, {
37703
+ 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,
37704
+ currentExpiryDate: billdetail === null || billdetail === void 0 ? void 0 : billdetail.expiryDate
37705
+ });
37706
+ });
37707
+
37708
+ 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) {
37709
+ var _fetchedBill$Bill4, _fetchedBill$Bill4$, _fetchedBill$Bill4$$b;
37710
+
37711
+ 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) {
37712
+ try {
37713
+ return Promise.resolve(Digit.PaymentService.searchBill(tenantId, {
37714
+ consumerCode: consumerCode,
37715
+ fromPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.fromPeriod,
37716
+ toPeriod: billdet === null || billdet === void 0 ? void 0 : billdet.toPeriod,
37717
+ service: businessService,
37718
+ retrieveOldest: true
37719
+ })).then(function (searchBill) {
37720
+ var _searchBill$Bill, _searchBill$Bill$, _searchBill$Bill$$bil, _searchBill$Bill$$bil2, _searchBill$Bill2, _searchBill$Bill2$;
37721
+
37722
+ 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;
37723
+ 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;
37724
+ });
37725
+ } catch (e) {
37726
+ return Promise.reject(e);
37727
+ }
37728
+ });
37729
+ }
37730
+
37731
+ return fetchedBill;
37732
+ });
37733
+ } else {
37734
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
37735
+ consumerCode: consumerCode,
37736
+ businessService: businessService
37737
+ }));
37738
+ }
37093
37739
  } catch (e) {
37094
37740
  return Promise.reject(e);
37095
37741
  }
@@ -37279,6 +37925,20 @@ var refObj = function refObj(tenantId, filters) {
37279
37925
  key: "consumerCode",
37280
37926
  label: "UC_CHALLAN_NO"
37281
37927
  },
37928
+ ws: {
37929
+ searchFn: function searchFn() {
37930
+ return advtApplications(tenantId, filters);
37931
+ },
37932
+ key: "consumerCode",
37933
+ label: "WS_MYCONNECTIONS_CONSUMER_NO"
37934
+ },
37935
+ sw: {
37936
+ searchFn: function searchFn() {
37937
+ return advtApplications(tenantId, filters);
37938
+ },
37939
+ key: "consumerCode",
37940
+ label: "WS_MYCONNECTIONS_CONSUMER_NO"
37941
+ },
37282
37942
  TL: {
37283
37943
  searchFn: function searchFn() {
37284
37944
  return tlApplications(tenantId, filters);
@@ -37739,12 +38399,11 @@ var defaultRawSearchHandler = function defaultRawSearchHandler(_ref2, searchKey,
37739
38399
  };
37740
38400
 
37741
38401
  var defaultCatchSearch = function defaultCatchSearch(Err) {
37742
- var _Err$response, _Err$response$data, _Err$response$data$Er, _Err$response2;
38402
+ var _Err$response, _Err$response$data, _Err$response$data$Er;
37743
38403
 
37744
38404
  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) {
37745
38405
  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";
37746
38406
  })) return [];
37747
- 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");
37748
38407
  throw Err;
37749
38408
  };
37750
38409
 
@@ -37976,11 +38635,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
37976
38635
  ddr: data.modules.find(function (e) {
37977
38636
  return e.module === module;
37978
38637
  }).tenants.map(function (tenant) {
38638
+ var _tenant$code, _tenant$code$toUpperC, _tenant$code$toUpperC2, _data$tenants$filter, _data$tenants$filter$, _data$tenants$filter$2, _data$tenants$filter$3;
38639
+
37979
38640
  return _extends({}, tenant, {
37980
- ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
37981
- ddrKey: t("DDR_" + data.tenants.filter(function (t) {
38641
+ 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(".", "_"))),
38642
+ ddrKey: t("DDR_" + ((_data$tenants$filter = data.tenants.filter(function (t) {
37982
38643
  return t.code === tenant.code;
37983
- })[0].city.districtTenantCode.toUpperCase().replace(".", "_"))
38644
+ })) === 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(".", "_")))
37984
38645
  });
37985
38646
  }).filter(function (item, i, arr) {
37986
38647
  return i === arr.findIndex(function (t) {
@@ -37990,11 +38651,13 @@ var useModuleTenants = function useModuleTenants(module, config) {
37990
38651
  ulb: data.modules.find(function (e) {
37991
38652
  return e.module === module;
37992
38653
  }).tenants.map(function (tenant) {
38654
+ var _tenant$code2, _tenant$code2$toUpper, _tenant$code2$toUpper2, _data$tenants$filter2, _data$tenants$filter3, _data$tenants$filter4, _data$tenants$filter5;
38655
+
37993
38656
  return _extends({}, tenant, {
37994
- ulbKey: t("TENANT_TENANTS_" + tenant.code.toUpperCase().replace(".", "_")),
37995
- ddrKey: t("DDR_" + data.tenants.filter(function (t) {
38657
+ 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(".", "_"))),
38658
+ ddrKey: t("DDR_" + ((_data$tenants$filter2 = data.tenants.filter(function (t) {
37996
38659
  return t.code === tenant.code;
37997
- })[0].city.districtTenantCode.toUpperCase().replace(".", "_"))
38660
+ })) === 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(".", "_")))
37998
38661
  });
37999
38662
  })
38000
38663
  };
@@ -38102,7 +38765,10 @@ var fetchImageLinksFromFilestoreIds = function fetchImageLinksFromFilestoreIds(f
38102
38765
  };
38103
38766
 
38104
38767
  var getTransformedLocale = function getTransformedLocale(label) {
38768
+ var _label;
38769
+
38105
38770
  if (typeof label === "number") return label;
38771
+ label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
38106
38772
  return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
38107
38773
  };
38108
38774
 
@@ -38584,7 +39250,6 @@ var fetchComplaintDetails = function fetchComplaintDetails(tenantId, id) {
38584
39250
  }) : null;
38585
39251
  return ids ? Promise.resolve(getThumbnails$1(ids, service.tenantId)).then(_temp2) : _temp2(null);
38586
39252
  } else {
38587
- console.error("error fetching complaint details or service defs");
38588
39253
  return {};
38589
39254
  }
38590
39255
  });
@@ -39045,18 +39710,18 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39045
39710
  var userRoles = userInfo.info.roles.map(function (roleData) {
39046
39711
  return roleData.code;
39047
39712
  });
39048
- var workflowOrder = ["CREATED", "PENDING_APPL_FEE_PAYMENT", "ASSING_DSO", "PENDING_DSO_APPROVAL", "DSO_REJECTED", "DSO_INPROGRESS", "REJECTED", "CANCELED", "COMPLETED", "CITIZEN_FEEDBACK_PENDING"];
39713
+ 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"];
39049
39714
  var DSO = Digit.UserService.hasAccess(["FSM_DSO"]);
39050
39715
  var allowedStatusForDSO = ["PENDING_DSO_APPROVAL", "DSO_INPROGRESS", "COMPLETED", "DSO_REJECTED"];
39051
39716
  var tenantId = Digit.ULBService.getCurrentTenantId();
39052
39717
 
39053
39718
  var fetch = function fetch() {
39054
39719
  try {
39055
- return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM")).then(function (WorkflowService) {
39720
+ return Promise.resolve(Digit.WorkflowService.init(tenantId, "FSM,FSM_POST_PAY_SERVICE")).then(function (WorkflowService) {
39056
39721
  return workflowOrder.map(function (status) {
39057
- var _WorkflowService$Busi;
39722
+ var _getStates;
39058
39723
 
39059
- return (_WorkflowService$Busi = WorkflowService.BusinessServices[0].states) === null || _WorkflowService$Busi === void 0 ? void 0 : _WorkflowService$Busi.filter(function (workflowDetails) {
39724
+ return (_getStates = getStates(WorkflowService.BusinessServices)) === null || _getStates === void 0 ? void 0 : _getStates.filter(function (workflowDetails) {
39060
39725
  return status === (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.state);
39061
39726
  })[0];
39062
39727
  });
@@ -39066,6 +39731,14 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39066
39731
  }
39067
39732
  };
39068
39733
 
39734
+ var getStates = function getStates(businessServices) {
39735
+ var states = [];
39736
+ businessServices.map(function (data) {
39737
+ states = states.concat(data.states);
39738
+ });
39739
+ return states;
39740
+ };
39741
+
39069
39742
  var roleWiseSelect = function roleWiseSelect(WorkflowService) {
39070
39743
  var response = WorkflowService.filter(function (state) {
39071
39744
  return state.applicationStatus;
@@ -39089,9 +39762,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39089
39762
  return {
39090
39763
  name: t("CS_COMMON_FSM_" + state.applicationStatus),
39091
39764
  code: state.applicationStatus,
39092
- id: (_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
39765
+ id: ((_statusMap = statusMap) === null || _statusMap === void 0 ? void 0 : (_statusMap$filter = _statusMap.filter(function (e) {
39093
39766
  return e.applicationstatus === state.applicationStatus;
39094
- })) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid,
39767
+ })) === null || _statusMap$filter === void 0 ? void 0 : (_statusMap$filter$ = _statusMap$filter[0]) === null || _statusMap$filter$ === void 0 ? void 0 : _statusMap$filter$.statusid) || state.uuid,
39095
39768
  roles: roles
39096
39769
  };
39097
39770
  });
@@ -39110,9 +39783,9 @@ var useApplicationStatus = function useApplicationStatus(select, isEnabled, stat
39110
39783
  return {
39111
39784
  name: t("CS_COMMON_FSM_" + state.applicationStatus),
39112
39785
  code: state.applicationStatus,
39113
- id: (_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
39786
+ id: ((_statusMap2 = statusMap) === null || _statusMap2 === void 0 ? void 0 : (_statusMap2$filter = _statusMap2.filter(function (e) {
39114
39787
  return e.applicationstatus === state.applicationStatus;
39115
- })) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid,
39788
+ })) === null || _statusMap2$filter === void 0 ? void 0 : (_statusMap2$filter$ = _statusMap2$filter[0]) === null || _statusMap2$filter$ === void 0 ? void 0 : _statusMap2$filter$.statusid) || state.uuid,
39116
39789
  roles: roles
39117
39790
  };
39118
39791
  });
@@ -39243,6 +39916,30 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
39243
39916
  });
39244
39917
  };
39245
39918
 
39919
+ var useGenderDetails = function useGenderDetails() {
39920
+ return reactQuery.useQuery("FSM_GENDER_DETAILS", function () {
39921
+ return MdmsService.getFSMGenderType(tenantId, moduleCode, type);
39922
+ }, config);
39923
+ };
39924
+
39925
+ var useFSTPORejectionReason = function useFSTPORejectionReason() {
39926
+ return reactQuery.useQuery("FSM_FSTPO_REJECTION", function () {
39927
+ return MdmsService.getFSTPORejectionReason(tenantId, moduleCode, type);
39928
+ }, queryConfig);
39929
+ };
39930
+
39931
+ var usePaymentType = function usePaymentType() {
39932
+ return reactQuery.useQuery("FSM_PAYMENT_TYPE", function () {
39933
+ return MdmsService.getFSMPaymentType(tenantId, moduleCode, type);
39934
+ }, queryConfig);
39935
+ };
39936
+
39937
+ var useTripNumber = function useTripNumber() {
39938
+ return reactQuery.useQuery("FSM_TRIP_NUMBER", function () {
39939
+ return MdmsService.getFSMTripNumber(tenantId, moduleCode, type);
39940
+ }, queryConfig);
39941
+ };
39942
+
39246
39943
  switch (type) {
39247
39944
  case "SanitationType":
39248
39945
  return useSanitationType();
@@ -39285,6 +39982,21 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
39285
39982
 
39286
39983
  case "PostFieldsConfig":
39287
39984
  return usePostFieldsConfig();
39985
+
39986
+ case "FSMGenderType":
39987
+ return useGenderDetails();
39988
+
39989
+ case "FSTPORejectionReason":
39990
+ return useFSTPORejectionReason();
39991
+
39992
+ case "PaymentType":
39993
+ return usePaymentType();
39994
+
39995
+ case "TripNumber":
39996
+ return useTripNumber();
39997
+
39998
+ default:
39999
+ return null;
39288
40000
  }
39289
40001
  };
39290
40002
 
@@ -39437,6 +40149,9 @@ var Search = {
39437
40149
  }, {
39438
40150
  title: "ES_APPLICATION_DETAILS_APPLICANT_MOBILE_NO",
39439
40151
  value: response === null || response === void 0 ? void 0 : (_response$citizen2 = response.citizen) === null || _response$citizen2 === void 0 ? void 0 : _response$citizen2.mobileNumber
40152
+ }, {
40153
+ title: "ES_FSM_PAYMENT_PREFERENCE",
40154
+ value: "ES_ACTION_" + (response === null || response === void 0 ? void 0 : response.paymentPreference)
39440
40155
  }]
39441
40156
  }, {
39442
40157
  title: "ES_APPLICATION_DETAILS_PROPERTY_DETAILS",
@@ -39508,20 +40223,31 @@ var Search = {
39508
40223
  values: [{
39509
40224
  title: "ES_APPLICATION_DETAILS_ASSIGNED_DSO",
39510
40225
  value: ((_dsoDetails = dsoDetails) === null || _dsoDetails === void 0 ? void 0 : _dsoDetails.displayName) || "N/A"
39511
- }, {
39512
- title: "ES_APPLICATION_DETAILS_VEHICLE_MAKE",
39513
- value: vehicleMake || "N/A"
39514
40226
  }, {
39515
40227
  title: "ES_APPLICATION_DETAILS_VEHICLE_NO",
39516
40228
  value: ((_vehicle2 = vehicle) === null || _vehicle2 === void 0 ? void 0 : _vehicle2.registrationNumber) || "N/A"
39517
40229
  }, {
39518
40230
  title: "ES_APPLICATION_DETAILS_VEHICLE_CAPACITY",
39519
- value: vehicleCapacity || "N/A"
40231
+ value: (response === null || response === void 0 ? void 0 : response.vehicleCapacity) || "N/A"
39520
40232
  }, {
39521
40233
  title: "ES_APPLICATION_DETAILS_POSSIBLE_SERVICE_DATE",
39522
40234
  value: displayServiceDate(response === null || response === void 0 ? void 0 : response.possibleServiceDate) || "N/A"
39523
40235
  }]
39524
40236
  }];
40237
+
40238
+ if (userType !== "CITIZEN" && userType !== "DSO") {
40239
+ employeeResponse.map(function (data) {
40240
+ if (data.title === "ES_TITLE_APPLICANT_DETAILS" || data.title === "Applicant Details") {
40241
+ var _response$citizen3;
40242
+
40243
+ data.values.push({
40244
+ title: "COMMON_APPLICANT_GENDER",
40245
+ value: response === null || response === void 0 ? void 0 : (_response$citizen3 = response.citizen) === null || _response$citizen3 === void 0 ? void 0 : _response$citizen3.gender
40246
+ });
40247
+ }
40248
+ });
40249
+ }
40250
+
39525
40251
  if (userType !== "CITIZEN") return {
39526
40252
  tenantId: response.tenantId,
39527
40253
  applicationDetails: employeeResponse,
@@ -39551,6 +40277,7 @@ var Search = {
39551
40277
  });
39552
40278
  }
39553
40279
 
40280
+ var paymentPreference = response === null || response === void 0 ? void 0 : response.paymentPreference;
39554
40281
  var slumLabel = "";
39555
40282
 
39556
40283
  var _temp = function () {
@@ -39691,9 +40418,9 @@ var useSearchAll = function useSearchAll(tenantId, filters, queryFn, config) {
39691
40418
  var defaultSelect = function defaultSelect(data) {
39692
40419
  return {
39693
40420
  data: {
39694
- table: data.fsm
40421
+ table: data.fsm ? data.fsm : [data]
39695
40422
  },
39696
- totalCount: data.totalCount
40423
+ totalCount: data.totalCount ? data.totalCount : 1
39697
40424
  };
39698
40425
  };
39699
40426
 
@@ -39741,12 +40468,12 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39741
40468
  var _filters = {
39742
40469
  tenantId: tenantId,
39743
40470
  processSearchCriteria: _extends({
39744
- businessService: ["FSM"]
40471
+ businessService: ["FSM", "FSM_POST_PAY_SERVICE"]
39745
40472
  }, (filters === null || filters === void 0 ? void 0 : (_filters$applicationS = filters.applicationStatus) === null || _filters$applicationS === void 0 ? void 0 : _filters$applicationS.length) > 0 ? {
39746
- status: filters.applicationStatus.map(function (status) {
39747
- return status === null || status === void 0 ? void 0 : status.id;
39748
- })
39749
- } : {}),
40473
+ status: getIds(filters.applicationStatus)
40474
+ } : {}, {
40475
+ moduleName: "fsm"
40476
+ }),
39750
40477
  moduleSearchCriteria: _extends({}, mobileNumber ? {
39751
40478
  mobileNumber: mobileNumber
39752
40479
  } : {}, applicationNos ? {
@@ -39768,30 +40495,10 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39768
40495
  filters: _filters,
39769
40496
  config: _extends({
39770
40497
  select: function select(data) {
39771
- var _data$items;
39772
-
39773
40498
  return {
39774
40499
  totalCount: data.totalCount,
39775
40500
  statuses: data.statusMap,
39776
- table: data === null || data === void 0 ? void 0 : (_data$items = data.items) === null || _data$items === void 0 ? void 0 : _data$items.map(function (application) {
39777
- var _application$ProcessI, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$ProcessI5, _application$ProcessI6;
39778
-
39779
- return {
39780
- tenantId: application.businessObject.tenantId,
39781
- totalCount: application.businessObject.totalCount,
39782
- applicationNo: application.businessObject.applicationNo,
39783
- createdTime: new Date(application.businessObject.auditDetails.createdTime),
39784
- locality: application.businessObject.address.locality.code,
39785
- status: application.businessObject.applicationStatus,
39786
- citizen: {
39787
- 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,
39788
- 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
39789
- },
39790
- propertyUsage: application.businessObject.propertyUsage,
39791
- sla: Math.round(((_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000)) || "-",
39792
- mathsla: (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla
39793
- };
39794
- })
40501
+ table: tableData(data)
39795
40502
  };
39796
40503
  }
39797
40504
  }, config)
@@ -39811,6 +40518,43 @@ var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID)
39811
40518
  return _extends({}, appList);
39812
40519
  };
39813
40520
 
40521
+ var getIds = function getIds(status) {
40522
+ var ids = [];
40523
+ status === null || status === void 0 ? void 0 : status.map(function (data) {
40524
+ var temp = data.id.split(',');
40525
+ ids.push.apply(ids, temp);
40526
+ });
40527
+ return ids;
40528
+ };
40529
+
40530
+ var tableData = function tableData(data) {
40531
+ var result = [];
40532
+
40533
+ if (data && data.items && data.items.length) {
40534
+ data.items.map(function (application) {
40535
+ 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;
40536
+
40537
+ result.push({
40538
+ tenantId: (application === null || application === void 0 ? void 0 : (_application$business = application.businessObject) === null || _application$business === void 0 ? void 0 : _application$business.tenantId) || '',
40539
+ totalCount: (application === null || application === void 0 ? void 0 : (_application$business2 = application.businessObject) === null || _application$business2 === void 0 ? void 0 : _application$business2.totalCount) || '',
40540
+ applicationNo: (application === null || application === void 0 ? void 0 : (_application$business3 = application.businessObject) === null || _application$business3 === void 0 ? void 0 : _application$business3.applicationNo) || '',
40541
+ 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(),
40542
+ 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) || '',
40543
+ status: (application === null || application === void 0 ? void 0 : (_application$business9 = application.businessObject) === null || _application$business9 === void 0 ? void 0 : _application$business9.applicationStatus) || '',
40544
+ citizen: {
40545
+ 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) || '',
40546
+ 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) || ''
40547
+ },
40548
+ propertyUsage: (application === null || application === void 0 ? void 0 : (_application$business10 = application.businessObject) === null || _application$business10 === void 0 ? void 0 : _application$business10.propertyUsage) || '',
40549
+ 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)) || "-",
40550
+ mathsla: (application === null || application === void 0 ? void 0 : (_application$ProcessI6 = application.ProcessInstance) === null || _application$ProcessI6 === void 0 ? void 0 : _application$ProcessI6.businesssServiceSla) || ''
40551
+ });
40552
+ });
40553
+ }
40554
+
40555
+ return result;
40556
+ };
40557
+
39814
40558
  var useApplicationUpdate = function useApplicationUpdate(tenantId) {
39815
40559
  return reactQuery.useMutation(function (details) {
39816
40560
  return FSMService.update(details, tenantId);
@@ -39874,11 +40618,11 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
39874
40618
  };
39875
40619
 
39876
40620
  var defaultSelect = function defaultSelect(data) {
39877
- data.Properties[0].units = data.Properties[0].units || [];
39878
- data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
40621
+ if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units || [];
40622
+ if (data.Properties.length > 0) data.Properties[0].units = data.Properties[0].units.filter(function (unit) {
39879
40623
  return unit.active;
39880
40624
  });
39881
- data.Properties[0].owners = data.Properties[0].owners || [];
40625
+ if (data.Properties.length > 0) data.Properties[0].owners = data.Properties[0].owners || [];
39882
40626
 
39883
40627
  if (searchedFrom == "myPropertyCitizen") {
39884
40628
  data.Properties.map(function (property) {
@@ -39898,18 +40642,108 @@ var usePropertySearch = function usePropertySearch(_ref, config) {
39898
40642
  }, config)),
39899
40643
  isLoading = _useQuery.isLoading,
39900
40644
  error = _useQuery.error,
39901
- data = _useQuery.data;
40645
+ data = _useQuery.data,
40646
+ isSuccess = _useQuery.isSuccess;
39902
40647
 
39903
40648
  return {
39904
40649
  isLoading: isLoading,
39905
40650
  error: error,
39906
40651
  data: data,
40652
+ isSuccess: isSuccess,
39907
40653
  revalidate: function revalidate() {
39908
40654
  return client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
39909
40655
  }
39910
40656
  };
39911
40657
  };
39912
40658
 
40659
+ var usePropertySearchWithDue = function usePropertySearchWithDue(_ref) {
40660
+ var _data$ConsumerCodes;
40661
+
40662
+ var tenantId = _ref.tenantId,
40663
+ filters = _ref.filters,
40664
+ _ref$auth = _ref.auth,
40665
+ auth = _ref$auth === void 0 ? true : _ref$auth,
40666
+ configs = _ref.configs;
40667
+ var client = reactQuery.useQueryClient();
40668
+
40669
+ var defaultSelect = function defaultSelect(data) {
40670
+ var consumerCodes = [];
40671
+ var formattedData = {};
40672
+ data.Properties.map(function (property) {
40673
+ var _property$units, _property$owners, _property$owners2, _property$tenantId, _property$tenantId$re, _property$address, _property$address$loc;
40674
+
40675
+ property.status == "ACTIVE" && consumerCodes.push(property.propertyId);
40676
+ 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) {
40677
+ return unit.active;
40678
+ });
40679
+ 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) {
40680
+ 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";
40681
+ });
40682
+ formattedData[property.propertyId] = {
40683
+ propertyId: property === null || property === void 0 ? void 0 : property.propertyId,
40684
+ name: property === null || property === void 0 ? void 0 : (_property$owners2 = property.owners) === null || _property$owners2 === void 0 ? void 0 : _property$owners2[0].name,
40685
+ status: property === null || property === void 0 ? void 0 : property.status,
40686
+ due: false,
40687
+ 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),
40688
+ owners: property === null || property === void 0 ? void 0 : property.owners,
40689
+ documents: property === null || property === void 0 ? void 0 : property.documents
40690
+ };
40691
+ });
40692
+ data["ConsumerCodes"] = consumerCodes;
40693
+ data["FormattedData"] = formattedData;
40694
+ return data;
40695
+ };
40696
+
40697
+ var _useQuery = reactQuery.useQuery(["propertySearchList", tenantId, filters, auth], function () {
40698
+ return configs.enabled && Digit.PTService.search({
40699
+ tenantId: tenantId,
40700
+ filters: filters,
40701
+ auth: auth
40702
+ });
40703
+ }, _extends({}, configs, {
40704
+ select: defaultSelect
40705
+ })),
40706
+ isLoading = _useQuery.isLoading,
40707
+ error = _useQuery.error,
40708
+ data = _useQuery.data;
40709
+
40710
+ var consumerCodes = (data === null || data === void 0 ? void 0 : (_data$ConsumerCodes = data.ConsumerCodes) === null || _data$ConsumerCodes === void 0 ? void 0 : _data$ConsumerCodes.join(",")) || "";
40711
+
40712
+ var _useQuery2 = reactQuery.useQuery(["propertySearchBillList", tenantId, filters, data, auth, consumerCodes], function () {
40713
+ return configs.enabled && data && Digit.PTService.fetchPaymentDetails({
40714
+ tenantId: tenantId,
40715
+ consumerCodes: consumerCodes,
40716
+ auth: auth
40717
+ });
40718
+ }, _extends({}, configs, {
40719
+ select: function select(billResp) {
40720
+ var _billResp$Bill;
40721
+
40722
+ 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) {
40723
+ curr[acc === null || acc === void 0 ? void 0 : acc.consumerCode] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
40724
+ data["FormattedData"][acc === null || acc === void 0 ? void 0 : acc.consumerCode]["due"] = acc === null || acc === void 0 ? void 0 : acc.totalAmount;
40725
+ return curr;
40726
+ }, {})) || {};
40727
+ return billResp;
40728
+ }
40729
+ })),
40730
+ billLoading = _useQuery2.isLoading,
40731
+ billData = _useQuery2.data,
40732
+ isSuccess = _useQuery2.isSuccess;
40733
+
40734
+ return {
40735
+ isLoading: isLoading || billLoading,
40736
+ error: error,
40737
+ data: data,
40738
+ billData: billData,
40739
+ isSuccess: isSuccess,
40740
+ revalidate: function revalidate() {
40741
+ client.invalidateQueries(["propertySearchBillList", tenantId, filters, auth]);
40742
+ client.invalidateQueries(["propertySearchList", tenantId, filters, auth]);
40743
+ }
40744
+ };
40745
+ };
40746
+
39913
40747
  var usePropertyPayment = function usePropertyPayment(_ref) {
39914
40748
  var tenantId = _ref.tenantId,
39915
40749
  consumerCodes = _ref.consumerCodes;
@@ -40146,6 +40980,12 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
40146
40980
  }, config);
40147
40981
  };
40148
40982
 
40983
+ var useChargeSlabs = function useChargeSlabs() {
40984
+ return reactQuery.useQuery("PT_RENTAL_DETAILS", function () {
40985
+ return MdmsService.getChargeSlabs(tenantId, moduleCode);
40986
+ }, config);
40987
+ };
40988
+
40149
40989
  var useFloorList = function useFloorList() {
40150
40990
  return reactQuery.useQuery("PT_FLOOR_LIST", function () {
40151
40991
  return MdmsService.getFloorList(tenantId, moduleCode);
@@ -40192,6 +41032,9 @@ var usePropertyMDMS = function usePropertyMDMS(tenantId, moduleCode, type, confi
40192
41032
  case "MapConfig":
40193
41033
  return useMapConfig();
40194
41034
 
41035
+ case "ChargeSlabs":
41036
+ return useChargeSlabs();
41037
+
40195
41038
  default:
40196
41039
  return _default();
40197
41040
  }
@@ -40213,6 +41056,37 @@ var usePropertyAPI = function usePropertyAPI(tenantId, type) {
40213
41056
  }
40214
41057
  };
40215
41058
 
41059
+ var usePropertyCreateNUpdateAPI = function usePropertyCreateNUpdateAPI(tenantId, update) {
41060
+ if (update === void 0) {
41061
+ update = false;
41062
+ }
41063
+
41064
+ var mutation = reactQuery.useMutation(function (data) {
41065
+ try {
41066
+ return Promise.resolve(PTService.create(data, tenantId)).then(function (createdProp) {
41067
+ var _temp2 = function () {
41068
+ var _createdProp$Response;
41069
+
41070
+ 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") {
41071
+ var _temp3 = function () {
41072
+ if (update) {
41073
+ return Promise.resolve(PTService.update(createdProp === null || createdProp === void 0 ? void 0 : createdProp.Properties[0], tenantId)).then(function () {});
41074
+ }
41075
+ }();
41076
+
41077
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
41078
+ }
41079
+ }();
41080
+
41081
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
41082
+ });
41083
+ } catch (e) {
41084
+ return Promise.reject(e);
41085
+ }
41086
+ });
41087
+ return mutation;
41088
+ };
41089
+
40216
41090
  var usePropertyDocumentSearch = function usePropertyDocumentSearch(_ref, config) {
40217
41091
  var _property$documents;
40218
41092
 
@@ -40260,6 +41134,102 @@ var getPropertyTypeLocale$1 = function getPropertyTypeLocale(value) {
40260
41134
  var getPropertySubtypeLocale$1 = function getPropertySubtypeLocale(value) {
40261
41135
  return "PROPERTYTAX_BILLING_SLAB_" + value;
40262
41136
  };
41137
+ var stringReplaceAll$1 = function stringReplaceAll(str, searcher, replaceWith) {
41138
+ if (str === void 0) {
41139
+ str = "";
41140
+ }
41141
+
41142
+ if (searcher === void 0) {
41143
+ searcher = "";
41144
+ }
41145
+
41146
+ if (replaceWith === void 0) {
41147
+ replaceWith = "";
41148
+ }
41149
+
41150
+ if (searcher === "") return str;
41151
+
41152
+ while (str.includes(searcher)) {
41153
+ str = str.replace(searcher, replaceWith);
41154
+ }
41155
+
41156
+ return str;
41157
+ };
41158
+ var checkForNotNull = function checkForNotNull(value) {
41159
+ if (value === void 0) {
41160
+ value = "";
41161
+ }
41162
+
41163
+ return value && value != null && value != undefined && value != "" ? true : false;
41164
+ };
41165
+ var convertDotValues = function convertDotValues(value) {
41166
+ if (value === void 0) {
41167
+ value = "";
41168
+ }
41169
+
41170
+ return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$1(value, ".", "_")) || "NA";
41171
+ };
41172
+ var convertToLocale = function convertToLocale(value, key) {
41173
+ if (value === void 0) {
41174
+ value = "";
41175
+ }
41176
+
41177
+ if (key === void 0) {
41178
+ key = "";
41179
+ }
41180
+
41181
+ var convertedValue = convertDotValues(value);
41182
+
41183
+ if (convertedValue === "NA") {
41184
+ return "PT_NA";
41185
+ }
41186
+
41187
+ return key + "_" + convertedValue;
41188
+ };
41189
+ var getMohallaLocale = function getMohallaLocale(value, tenantId) {
41190
+ if (value === void 0) {
41191
+ value = "";
41192
+ }
41193
+
41194
+ if (tenantId === void 0) {
41195
+ tenantId = "";
41196
+ }
41197
+
41198
+ var convertedValue = convertDotValues(tenantId);
41199
+
41200
+ if (convertedValue === "NA" || !checkForNotNull(value)) {
41201
+ return "PT_NA";
41202
+ }
41203
+
41204
+ convertedValue = convertedValue.toUpperCase();
41205
+ return convertToLocale(value, convertedValue + "_REVENUE");
41206
+ };
41207
+ var getCityLocale = function getCityLocale(value) {
41208
+ if (value === void 0) {
41209
+ value = "";
41210
+ }
41211
+
41212
+ var convertedValue = convertDotValues(value);
41213
+
41214
+ if (convertedValue === "NA" || !checkForNotNull(value)) {
41215
+ return "PT_NA";
41216
+ }
41217
+
41218
+ convertedValue = convertedValue.toUpperCase();
41219
+ return convertToLocale(convertedValue, "TENANT_TENANTS");
41220
+ };
41221
+
41222
+ var pt = {
41223
+ __proto__: null,
41224
+ getPropertyTypeLocale: getPropertyTypeLocale$1,
41225
+ getPropertySubtypeLocale: getPropertySubtypeLocale$1,
41226
+ stringReplaceAll: stringReplaceAll$1,
41227
+ checkForNotNull: checkForNotNull,
41228
+ convertDotValues: convertDotValues,
41229
+ convertToLocale: convertToLocale,
41230
+ getMohallaLocale: getMohallaLocale,
41231
+ getCityLocale: getCityLocale
41232
+ };
40263
41233
 
40264
41234
  var PTSearch = {
40265
41235
  all: function (tenantId, filters) {
@@ -40276,6 +41246,112 @@ var PTSearch = {
40276
41246
  return Promise.reject(e);
40277
41247
  }
40278
41248
  },
41249
+ genericPropertyDetails: function (t, tenantId, propertyIds) {
41250
+ try {
41251
+ var filters = {
41252
+ propertyIds: propertyIds
41253
+ };
41254
+ return Promise.resolve(PTSearch.application(tenantId, filters)).then(function (property) {
41255
+ 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;
41256
+
41257
+ var addressDetails = {
41258
+ title: "PT_PROPERTY_ADDRESS_SUB_HEADER",
41259
+ asSectionHeader: true,
41260
+ values: [{
41261
+ title: "PT_PROPERTY_ADDRESS_PINCODE",
41262
+ value: property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.pincode
41263
+ }, {
41264
+ title: "PT_PROPERTY_ADDRESS_CITY",
41265
+ value: property === null || property === void 0 ? void 0 : (_property$address2 = property.address) === null || _property$address2 === void 0 ? void 0 : _property$address2.city
41266
+ }, {
41267
+ title: "PT_PROPERTY_ADDRESS_MOHALLA",
41268
+ 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)
41269
+ }, {
41270
+ title: "PT_PROPERTY_ADDRESS_HOUSE_NO",
41271
+ value: property === null || property === void 0 ? void 0 : (_property$address4 = property.address) === null || _property$address4 === void 0 ? void 0 : _property$address4.doorNo
41272
+ }, {
41273
+ title: "PT_PROPERTY_ADDRESS_STREET_NAME",
41274
+ value: property === null || property === void 0 ? void 0 : (_property$address5 = property.address) === null || _property$address5 === void 0 ? void 0 : _property$address5.street
41275
+ }]
41276
+ };
41277
+ var assessmentDetails = {
41278
+ title: "PT_ASSESMENT_INFO_SUB_HEADER",
41279
+ values: [{
41280
+ title: "PT_ASSESMENT_INFO_TYPE_OF_BUILDING",
41281
+ value: getPropertyTypeLocale$1(property === null || property === void 0 ? void 0 : property.propertyType)
41282
+ }, {
41283
+ title: "PT_ASSESMENT_INFO_USAGE_TYPE",
41284
+ value: getPropertySubtypeLocale$1(property === null || property === void 0 ? void 0 : property.usageCategory)
41285
+ }, {
41286
+ title: "PT_ASSESMENT_INFO_PLOT_SIZE",
41287
+ value: property === null || property === void 0 ? void 0 : property.landArea
41288
+ }, {
41289
+ title: "PT_ASSESMENT_INFO_NO_OF_FLOOR",
41290
+ value: property === null || property === void 0 ? void 0 : property.noOfFloors
41291
+ }]
41292
+ };
41293
+ var propertyDetail = {
41294
+ title: "PT_DETAILS",
41295
+ values: [{
41296
+ title: "TL_PROPERTY_ID",
41297
+ value: (property === null || property === void 0 ? void 0 : property.propertyId) || "NA"
41298
+ }, {
41299
+ title: "PT_OWNER_NAME",
41300
+ value: (property === null || property === void 0 ? void 0 : (_property$owners$ = property.owners[0]) === null || _property$owners$ === void 0 ? void 0 : _property$owners$.name) || "NA"
41301
+ }, {
41302
+ title: "PT_SEARCHPROPERTY_TABEL_STATUS",
41303
+ value: Digit.Utils.locale.getTransformedLocale("WF_PT_" + (property === null || property === void 0 ? void 0 : property.status)) || "NA"
41304
+ }]
41305
+ };
41306
+ var ownerdetails = {
41307
+ title: "PT_OWNERSHIP_INFO_SUB_HEADER",
41308
+ additionalDetails: {
41309
+ owners: property === null || property === void 0 ? void 0 : (_property$owners = property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners.filter(function (owner) {
41310
+ return owner.status === "ACTIVE";
41311
+ }).map(function (owner, index) {
41312
+ return {
41313
+ status: owner.status,
41314
+ title: "ES_OWNER",
41315
+ values: [{
41316
+ title: "PT_OWNERSHIP_INFO_NAME",
41317
+ value: owner === null || owner === void 0 ? void 0 : owner.name
41318
+ }, {
41319
+ title: "PT_OWNERSHIP_INFO_GENDER",
41320
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
41321
+ }, {
41322
+ title: "PT_OWNERSHIP_INFO_MOBILE_NO",
41323
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
41324
+ }, {
41325
+ title: "PT_OWNERSHIP_INFO_USER_CATEGORY",
41326
+ value: "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) || "NA"
41327
+ }, {
41328
+ title: "PT_SEARCHPROPERTY_TABEL_GUARDIANNAME",
41329
+ value: owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName
41330
+ }, {
41331
+ title: "PT_FORM3_OWNERSHIP_TYPE",
41332
+ value: property === null || property === void 0 ? void 0 : property.ownershipCategory
41333
+ }, {
41334
+ title: "PT_OWNERSHIP_INFO_EMAIL_ID",
41335
+ value: owner === null || owner === void 0 ? void 0 : owner.emailId
41336
+ }, {
41337
+ title: "PT_OWNERSHIP_INFO_CORR_ADDR",
41338
+ value: owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress
41339
+ }]
41340
+ };
41341
+ })
41342
+ }
41343
+ };
41344
+ var applicationDetails = [propertyDetail, addressDetails, assessmentDetails, ownerdetails];
41345
+ return {
41346
+ tenantId: property === null || property === void 0 ? void 0 : property.tenantId,
41347
+ applicationDetails: applicationDetails,
41348
+ applicationData: property
41349
+ };
41350
+ });
41351
+ } catch (e) {
41352
+ return Promise.reject(e);
41353
+ }
41354
+ },
40279
41355
  application: function (tenantId, filters) {
40280
41356
  if (filters === void 0) {
40281
41357
  filters = {};
@@ -40591,7 +41667,82 @@ var usePTGenderMDMS = function usePTGenderMDMS(tenantId, moduleCode, type, confi
40591
41667
  switch (type) {
40592
41668
  case "GenderType":
40593
41669
  return usePTGenders();
41670
+
41671
+ default:
41672
+ return null;
41673
+ }
41674
+ };
41675
+
41676
+ var getOwnerForPayments = function getOwnerForPayments(propertyData, data) {
41677
+ var _data$Payments;
41678
+
41679
+ var newPayments = [];
41680
+ data && (data === null || data === void 0 ? void 0 : (_data$Payments = data.Payments) === null || _data$Payments === void 0 ? void 0 : _data$Payments.map(function (payment) {
41681
+ var _propertyData$filter$;
41682
+
41683
+ var owner = propertyData === null || propertyData === void 0 ? void 0 : (_propertyData$filter$ = propertyData.filter(function (ob) {
41684
+ var _payment$paymentDetai, _payment$paymentDetai2, _payment$paymentDetai3;
41685
+
41686
+ 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);
41687
+ })[0]) === null || _propertyData$filter$ === void 0 ? void 0 : _propertyData$filter$.owners;
41688
+ newPayments.push(_extends({}, payment, {
41689
+ owners: owner
41690
+ }));
41691
+ }));
41692
+ data ? data["Payments"] = [].concat(newPayments) : "";
41693
+ return data;
41694
+ };
41695
+
41696
+ var useMyPropertyPayments = function useMyPropertyPayments(_ref, config) {
41697
+ var _config;
41698
+
41699
+ var tenantId = _ref.tenantId,
41700
+ filters = _ref.filters;
41701
+
41702
+ if (config === void 0) {
41703
+ config = {};
41704
+ }
41705
+
41706
+ var client = reactQuery.useQueryClient();
41707
+ var paymentargs = tenantId ? {
41708
+ tenantId: tenantId,
41709
+ filters: filters
41710
+ } : {
41711
+ filters: filters
41712
+ };
41713
+
41714
+ var _useQuery = reactQuery.useQuery(["paymentpropertySearchList", tenantId, filters], function () {
41715
+ return Digit.PTService.paymentsearch(paymentargs);
41716
+ }, _extends({}, config)),
41717
+ isLoading = _useQuery.isLoading,
41718
+ error = _useQuery.error,
41719
+ data = _useQuery.data;
41720
+
41721
+ var updatedData = getOwnerForPayments((_config = config) === null || _config === void 0 ? void 0 : _config.propertyData, data);
41722
+ return {
41723
+ isLoading: isLoading,
41724
+ error: error,
41725
+ data: data,
41726
+ revalidate: function revalidate() {
41727
+ return client.invalidateQueries(["paymentpropertySearchList", tenantId, filters]);
41728
+ }
41729
+ };
41730
+ };
41731
+
41732
+ var useGenericViewProperty = function useGenericViewProperty(t, tenantId, propertyIds, config, userType) {
41733
+ if (config === void 0) {
41734
+ config = {};
40594
41735
  }
41736
+
41737
+ var defaultSelect = function defaultSelect(data) {
41738
+ return _extends({}, data);
41739
+ };
41740
+
41741
+ return reactQuery.useQuery(["VIEW_GENERIC_PROPERTY", propertyIds, tenantId], function () {
41742
+ return PTSearch.genericPropertyDetails(t, tenantId, propertyIds);
41743
+ }, _extends({
41744
+ select: defaultSelect
41745
+ }, config));
40595
41746
  };
40596
41747
 
40597
41748
  var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
@@ -40601,9 +41752,18 @@ var useDssMDMS = function useDssMDMS(tenantId, moduleCode, type, config) {
40601
41752
  }, config);
40602
41753
  };
40603
41754
 
41755
+ var _default = function _default() {
41756
+ return reactQuery.useQuery([tenantId, moduleCode, type], function () {
41757
+ return MdmsService.getMultipleTypes(tenantId, moduleCode, type);
41758
+ }, config);
41759
+ };
41760
+
40604
41761
  switch (type) {
40605
41762
  case "DssDashboard":
40606
41763
  return useDssDashboard();
41764
+
41765
+ default:
41766
+ return _default();
40607
41767
  }
40608
41768
  };
40609
41769
 
@@ -40665,6 +41825,29 @@ var getRequest = function getRequest(type, code, requestDate, filters) {
40665
41825
  };
40666
41826
  };
40667
41827
 
41828
+ var defaultSelect = function defaultSelect(data) {
41829
+ if (data !== null && data !== void 0 && data.responseData) {
41830
+ var _data$responseData;
41831
+
41832
+ if (data !== null && data !== void 0 && (_data$responseData = data.responseData) !== null && _data$responseData !== void 0 && _data$responseData.data) {
41833
+ var _data$responseData2, _data$responseData2$d, _data$responseData$da;
41834
+
41835
+ 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) {
41836
+ return col;
41837
+ })) || [];
41838
+ (_data$responseData$da = data.responseData.data) === null || _data$responseData$da === void 0 ? void 0 : _data$responseData$da.forEach(function (row) {
41839
+ if (row !== null && row !== void 0 && row.plots) {
41840
+ row.plots = (row === null || row === void 0 ? void 0 : row.plots.filter(function (col) {
41841
+ return col;
41842
+ })) || [];
41843
+ }
41844
+ });
41845
+ }
41846
+ }
41847
+
41848
+ return data;
41849
+ };
41850
+
40668
41851
  var useGetChart = function useGetChart(args) {
40669
41852
  var key = args.key,
40670
41853
  type = args.type,
@@ -40677,6 +41860,8 @@ var useGetChart = function useGetChart(args) {
40677
41860
  tenantId: tenantId
40678
41861
  }
40679
41862
  }));
41863
+ }, {
41864
+ select: defaultSelect
40680
41865
  });
40681
41866
  };
40682
41867
 
@@ -40703,6 +41888,9 @@ var useMCollectMDMS = function useMCollectMDMS(tenantId, moduleCode, type, filte
40703
41888
 
40704
41889
  case "applicationStatus":
40705
41890
  return useMCollectApplcationStatus();
41891
+
41892
+ default:
41893
+ return null;
40706
41894
  }
40707
41895
  };
40708
41896
 
@@ -40886,6 +42074,8 @@ var useTenants$4 = function useTenants() {
40886
42074
  return tenants;
40887
42075
  };
40888
42076
 
42077
+ var _excluded$2 = ["code", "value"];
42078
+
40889
42079
  var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, type, filter, config) {
40890
42080
  if (config === void 0) {
40891
42081
  config = {};
@@ -40915,6 +42105,104 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
40915
42105
  }, config);
40916
42106
  };
40917
42107
 
42108
+ var useTradeOwnershipSubType = function useTradeOwnershipSubType() {
42109
+ return reactQuery.useQuery("TL_TRADE_OWNERSHIP_CATEGORY", function () {
42110
+ return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
42111
+ }, _extends({
42112
+ select: function select(data) {
42113
+ var _data$commonMasters = data["common-masters"];
42114
+ _data$commonMasters = _data$commonMasters === void 0 ? {} : _data$commonMasters;
42115
+ var categoryData = _data$commonMasters.OwnerShipCategory;
42116
+ var filteredSubtypesData = categoryData.filter(function (e) {
42117
+ return e.code.includes(filter.keyToSearchOwnershipSubtype);
42118
+ }).map(function (e) {
42119
+ return _extends({}, e, {
42120
+ i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_" + e.code.replaceAll(".", "_")
42121
+ });
42122
+ });
42123
+ return filteredSubtypesData;
42124
+ }
42125
+ }, config));
42126
+ };
42127
+
42128
+ var useOwnerTypeWithSubtypes = function useOwnerTypeWithSubtypes() {
42129
+ return reactQuery.useQuery("TL_TRADE_OWNERSSHIP_TYPE", function () {
42130
+ return MdmsService.GetTradeOwnerShipCategory(tenantId, moduleCode, type);
42131
+ }, _extends({
42132
+ select: function select(data) {
42133
+ var _data$commonMasters2 = data["common-masters"];
42134
+ _data$commonMasters2 = _data$commonMasters2 === void 0 ? {} : _data$commonMasters2;
42135
+ var categoryData = _data$commonMasters2.OwnerShipCategory;
42136
+ var OwnerShipCategory = {};
42137
+ var ownerShipdropDown = [];
42138
+
42139
+ function getDropdwonForProperty(ownerShipdropDown) {
42140
+ if ((filter === null || filter === void 0 ? void 0 : filter.userType) === "employee") {
42141
+ var _ownerShipdropDown$fi;
42142
+
42143
+ var arr = ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : (_ownerShipdropDown$fi = ownerShipdropDown.filter(function (e) {
42144
+ return e.code.split(".").length <= 2;
42145
+ })) === null || _ownerShipdropDown$fi === void 0 ? void 0 : _ownerShipdropDown$fi.map(function (ownerShipDetails) {
42146
+ return _extends({}, ownerShipDetails, {
42147
+ i18nKey: "COMMON_MASTERS_OWNERSHIPCATEGORY_INDIVIDUAL_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
42148
+ });
42149
+ });
42150
+ var finalArr = arr.filter(function (data) {
42151
+ return data.code.includes("INDIVIDUAL") || data.code.includes("OTHER");
42152
+ });
42153
+ return finalArr;
42154
+ }
42155
+
42156
+ var res = ownerShipdropDown !== null && ownerShipdropDown !== void 0 && ownerShipdropDown.length ? ownerShipdropDown === null || ownerShipdropDown === void 0 ? void 0 : ownerShipdropDown.map(function (ownerShipDetails) {
42157
+ return _extends({}, ownerShipDetails, {
42158
+ i18nKey: "PT_OWNERSHIP_" + (ownerShipDetails.value.split(".")[1] ? ownerShipDetails.value.split(".")[1] : ownerShipDetails.value.split(".")[0])
42159
+ });
42160
+ }).reduce(function (acc, ownerShipDetails) {
42161
+ if (ownerShipDetails.code.includes("INDIVIDUAL")) {
42162
+ return [].concat(acc, [ownerShipDetails]);
42163
+ } else if (ownerShipDetails.code.includes("OTHER")) {
42164
+ var code = ownerShipDetails.code,
42165
+ value = ownerShipDetails.value,
42166
+ everythingElse = _objectWithoutPropertiesLoose(ownerShipDetails, _excluded$2);
42167
+
42168
+ var mutatedOwnershipDetails = _extends({
42169
+ code: code.split(".")[0],
42170
+ value: value.split(".")[0]
42171
+ }, everythingElse);
42172
+
42173
+ return [].concat(acc, [mutatedOwnershipDetails]);
42174
+ } else {
42175
+ return acc;
42176
+ }
42177
+ }, []) : null;
42178
+ return res;
42179
+ }
42180
+
42181
+ function formDropdown(category) {
42182
+ var name = category.name,
42183
+ code = category.code;
42184
+ return {
42185
+ label: name,
42186
+ value: code,
42187
+ code: code
42188
+ };
42189
+ }
42190
+
42191
+ categoryData.length > 0 ? categoryData === null || categoryData === void 0 ? void 0 : categoryData.map(function (category) {
42192
+ OwnerShipCategory[category.code] = category;
42193
+ }) : null;
42194
+
42195
+ if (OwnerShipCategory) {
42196
+ Object.keys(OwnerShipCategory).forEach(function (category) {
42197
+ ownerShipdropDown.push(formDropdown(OwnerShipCategory[category]));
42198
+ });
42199
+ }
42200
+
42201
+ return getDropdwonForProperty(ownerShipdropDown);
42202
+ }
42203
+ }, config));
42204
+ };
42205
+
40918
42206
  var useTLAccessoriesType = function useTLAccessoriesType() {
40919
42207
  return reactQuery.useQuery("TL_TRADE_ACCESSORY_CATEGORY", function () {
40920
42208
  return MdmsService.getTLAccessoriesType(tenantId, moduleCode, type);
@@ -40946,18 +42234,26 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
40946
42234
  case "TLOwnerShipCategory":
40947
42235
  return useTradeOwnerShipCategory();
40948
42236
 
42237
+ case "TLOwnerTypeWithSubtypes":
42238
+ return useOwnerTypeWithSubtypes();
42239
+
40949
42240
  case "AccessoryCategory":
40950
42241
  return useTLAccessoriesType();
40951
42242
 
40952
42243
  case "FinancialYear":
40953
42244
  return useTLFinancialYear();
40954
42245
 
42246
+ case "TradeOwnershipSubType":
42247
+ return useTradeOwnershipSubType();
42248
+
40955
42249
  default:
40956
42250
  return _default();
40957
42251
  }
40958
42252
  };
40959
42253
 
40960
42254
  var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42255
+ 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;
42256
+
40961
42257
  if (data1 === void 0) {
40962
42258
  data1 = {};
40963
42259
  }
@@ -40965,7 +42261,10 @@ var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
40965
42261
  var client = reactQuery.useQueryClient();
40966
42262
  var tenantId = Digit.ULBService.getCurrentTenantId();
40967
42263
  var tenant = Digit.ULBService.getStateId();
40968
- var filesArray = [data1.value.owners.documents["OwnerPhotoProof"].fileStoreId, data1.value.owners.documents["ProofOfIdentity"].fileStoreId, data1.value.owners.documents["ProofOfOwnership"].fileStoreId];
42264
+ var filesArray = [];
42265
+ 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);
42266
+ 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);
42267
+ 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);
40969
42268
 
40970
42269
  var _useQuery = reactQuery.useQuery(["tlDocuments-" + 1, filesArray], function () {
40971
42270
  return Digit.UploadServices.Filefetch(filesArray, tenant);
@@ -41049,38 +42348,42 @@ var useTradeLicenseSearch = function useTradeLicenseSearch(_ref, config) {
41049
42348
  };
41050
42349
  };
41051
42350
 
42351
+ var mapWfBybusinessId$1 = function mapWfBybusinessId(workflowData) {
42352
+ return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
42353
+ acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
42354
+ return acc;
42355
+ }, {});
42356
+ };
42357
+
42358
+ var combineResponse = function combineResponse(applications, workflowData, totalCount) {
42359
+ var workflowInstances = mapWfBybusinessId$1(workflowData);
42360
+ return applications.map(function (application) {
42361
+ var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
42362
+
42363
+ return _extends({}, application, {
42364
+ 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,
42365
+ SLA: (_workflowInstances$ap4 = workflowInstances[application === null || application === void 0 ? void 0 : application.applicationNumber]) === null || _workflowInstances$ap4 === void 0 ? void 0 : _workflowInstances$ap4.businesssServiceSla,
42366
+ 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,
42367
+ Count: totalCount
42368
+ });
42369
+ });
42370
+ };
42371
+
41052
42372
  var useTLSearch = function useTLSearch(params, config) {
41053
42373
  return function () {
41054
42374
  try {
41055
42375
  return Promise.resolve(Digit.TLService.search(params, config)).then(function (data) {
41056
- var UpdatedData = [];
41057
- return function () {
41058
- if (data && data !== null && data !== void 0 && data.Licenses && Array.isArray(data.Licenses) && data.Licenses.length > 0) {
41059
- var _data$Licenses;
42376
+ var _data$Licenses, _data$Licenses$;
41060
42377
 
41061
- return Promise.resolve(Promise.all((_data$Licenses = data.Licenses) === null || _data$Licenses === void 0 ? void 0 : _data$Licenses.map(function (service) {
41062
- try {
41063
- return Promise.resolve(Digit.WorkflowService.getDetailsById({
41064
- tenantId: service.tenantId,
41065
- id: service.applicationNumber,
41066
- moduleCode: "TL",
41067
- role: "CITIZEN"
41068
- }).then(function (workflowdata) {
41069
- return workflowdata;
41070
- })).then(function (workflowdata) {
41071
- var res = Object.assign({}, service, {
41072
- SLA: workflowdata === null || workflowdata === void 0 ? void 0 : workflowdata.processInstances[0].businesssServiceSla
41073
- });
41074
- return res;
41075
- });
41076
- } catch (e) {
41077
- return Promise.reject(e);
41078
- }
41079
- }))).then(function (_Promise$all) {
41080
- return UpdatedData = _Promise$all;
41081
- });
41082
- }
41083
- }();
42378
+ 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;
42379
+ var businessIds = data === null || data === void 0 ? void 0 : data.Licenses.map(function (application) {
42380
+ return application.applicationNumber;
42381
+ });
42382
+ return Promise.resolve(Digit.WorkflowService.getAllApplication(tenant, {
42383
+ businessIds: businessIds.join()
42384
+ })).then(function (workflowRes) {
42385
+ 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);
42386
+ });
41084
42387
  });
41085
42388
  } catch (e) {
41086
42389
  return Promise.reject(e);
@@ -41099,17 +42402,18 @@ var useTLSearchApplication = function useTLSearchApplication(params, config, t)
41099
42402
  staleTime: Infinity,
41100
42403
  select: function select(data) {
41101
42404
  return data.map(function (i) {
41102
- var _i$tradeLicenseDetail, _i$tradeLicenseDetail2;
42405
+ var _i$tradeLicenseDetail, _i$tradeLicenseDetail2, _i$tradeLicenseDetail3, _i$tradeLicenseDetail4, _i$tradeLicenseDetail5, _i$tradeLicenseDetail6, _i$tradeLicenseDetail7;
41103
42406
 
41104
42407
  return {
41105
42408
  TL_COMMON_TABLE_COL_APP_NO: i.applicationNumber,
41106
42409
  TL_APPLICATION_CATEGORY: "ACTION_TEST_TRADE_LICENSE",
41107
- 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) {
42410
+ 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) {
41108
42411
  return index == 0 ? multiownername = ele.name : multiownername = multiownername + " , " + ele.name;
41109
42412
  }),
41110
42413
  TL_COMMON_TABLE_COL_STATUS: "WF_NEWTL_" + (i === null || i === void 0 ? void 0 : i.status),
41111
42414
  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"),
41112
42415
  TL_COMMON_TABLE_COL_TRD_NAME: i === null || i === void 0 ? void 0 : i.tradeName,
42416
+ 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,
41113
42417
  raw: i
41114
42418
  };
41115
42419
  });
@@ -41145,7 +42449,7 @@ var useTLPaymentHistory = function useTLPaymentHistory(tenantId, id, config) {
41145
42449
  }, _extends({}, config));
41146
42450
  };
41147
42451
 
41148
- var stringReplaceAll$1 = function stringReplaceAll(str, searcher, replaceWith) {
42452
+ var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
41149
42453
  if (str === void 0) {
41150
42454
  str = "";
41151
42455
  }
@@ -41234,217 +42538,362 @@ var TLSearch = {
41234
42538
  applicationNumber: applicationNumber
41235
42539
  };
41236
42540
  return Promise.resolve(TLSearch.application(tenantId, filter)).then(function (response) {
41237
- function _temp2() {
41238
- 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;
42541
+ var _response$tradeLicens60, _response$tradeLicens61, _response$tradeLicens62, _response$tradeLicens63;
41239
42542
 
41240
- var employeeResponse = [];
41241
- var tradedetails = {
41242
- title: "TL_COMMON_TR_DETAILS",
41243
- asSectionHeader: true,
41244
- values: [{
41245
- title: "TL_FINANCIAL_YEAR_LABEL",
41246
- value: response !== null && response !== void 0 && response.financialYear ? "FY" + (response === null || response === void 0 ? void 0 : response.financialYear) : "NA"
41247
- }, {
41248
- title: "TL_NEW_TRADE_DETAILS_LIC_TYPE_LABEL",
41249
- value: response !== null && response !== void 0 && response.licenseType ? "TRADELICENSE_LICENSETYPE_" + (response === null || response === void 0 ? void 0 : response.licenseType) : "NA"
41250
- }, {
41251
- title: "TL_COMMON_TABLE_COL_TRD_NAME",
41252
- value: response === null || response === void 0 ? void 0 : response.tradeName
41253
- }, {
41254
- title: "TL_NEW_TRADE_DETAILS_STRUCT_TYPE_LABEL",
41255
- 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"
41256
- }, {
41257
- title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
41258
- 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"
41259
- }, {
41260
- title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
41261
- value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
41262
- }, {
41263
- title: "TL_NEW_GST_NUMBER_LABEL",
41264
- 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"
41265
- }, {
41266
- title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
41267
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens8 = response.tradeLicenseDetail) === null || _response$tradeLicens8 === void 0 ? void 0 : _response$tradeLicens8.operationalArea) || "NA"
41268
- }, {
41269
- title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
41270
- value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.noOfEmployees) || "NA"
41271
- }]
41272
- };
41273
- var tradeUnits = {
41274
- title: "TL_TRADE_UNITS_HEADER",
41275
- additionalDetails: {
41276
- 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) {
41277
- var _unit$tradeType, _unit$tradeType2;
41278
-
41279
- var tradeSubType = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
41280
- tradeSubType = stringReplaceAll$1(tradeSubType, "-", "_");
41281
- return {
41282
- title: "TL_UNIT_HEADER",
41283
- values: [{
41284
- title: "TRADELICENSE_TRADECATEGORY_LABEL",
41285
- 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"
41286
- }, {
41287
- title: "TRADELICENSE_TRADETYPE_LABEL",
41288
- 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"
41289
- }, {
41290
- title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
41291
- value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
41292
- }, {
41293
- title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
41294
- value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
41295
- }, {
41296
- title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
41297
- value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
41298
- }]
41299
- };
41300
- })
41301
- }
41302
- };
41303
- var accessories = {
41304
- title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
41305
- additionalDetails: {
41306
- 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) {
41307
- var accessoryCategory = "NA";
41308
-
41309
- if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
41310
- accessoryCategory = stringReplaceAll$1(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
41311
- accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$1(accessoryCategory, "-", "_");
42543
+ function _temp3(propertyDetails) {
42544
+ function _temp2() {
42545
+ 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;
42546
+
42547
+ var propertyAddress = "";
42548
+
42549
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop.length) {
42550
+ 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;
42551
+
42552
+ 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) {
42553
+ var _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7;
42554
+
42555
+ 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;
42556
+
42557
+ 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) {
42558
+ propertyAddress += ", ";
41312
42559
  }
42560
+ }
41313
42561
 
41314
- return {
41315
- title: "TL_ACCESSORY_LABEL",
41316
- values: [{
41317
- title: "TL_NEW_TRADE_DETAILS_ACC_LABEL",
41318
- value: accessoryCategory
41319
- }, {
41320
- title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
41321
- value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
41322
- }, {
41323
- title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
41324
- value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
41325
- }, {
41326
- title: "TL_ACCESSORY_COUNT_LABEL",
41327
- value: (unit === null || unit === void 0 ? void 0 : unit.count) || "NA"
41328
- }]
41329
- };
41330
- })
42562
+ 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) {
42563
+ var _propertyDetails$Prop10, _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13;
42564
+
42565
+ 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;
42566
+
42567
+ 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) {
42568
+ propertyAddress += ", ";
42569
+ }
42570
+ }
42571
+
42572
+ 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) {
42573
+ var _propertyDetails$Prop16, _propertyDetails$Prop17, _propertyDetails$Prop18, _propertyDetails$Prop19, _propertyDetails$Prop20;
42574
+
42575
+ 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;
42576
+
42577
+ 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) {
42578
+ propertyAddress += ", ";
42579
+ }
42580
+ }
42581
+
42582
+ 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) {
42583
+ var _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26, _propertyDetails$Prop27, _propertyDetails$Prop28;
42584
+
42585
+ 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;
42586
+
42587
+ 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) {
42588
+ propertyAddress += ", ";
42589
+ }
42590
+ }
42591
+
42592
+ 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) {
42593
+ var _propertyDetails$Prop31, _propertyDetails$Prop32, _propertyDetails$Prop33, _propertyDetails$Prop34;
42594
+
42595
+ 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;
42596
+
42597
+ 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) {
42598
+ propertyAddress += ", ";
42599
+ }
42600
+ }
42601
+
42602
+ 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) {
42603
+ var _propertyDetails$Prop37, _propertyDetails$Prop38;
42604
+
42605
+ 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;
42606
+ }
41331
42607
  }
41332
- };
41333
- 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);
41334
- 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);
41335
- var tradeAddress = {
41336
- title: "TL_CHECK_ADDRESS",
41337
- values: [{
41338
- title: "CORE_COMMON_PINCODE",
41339
- 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"
41340
- }, {
41341
- title: "MYCITY_CODE_LABEL",
41342
- 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"
41343
- }, {
41344
- title: "TL_LOCALIZATION_LOCALITY",
41345
- value: stringReplaceAll$1(cityOfApp === null || cityOfApp === void 0 ? void 0 : cityOfApp.toUpperCase(), ".", "_") + "_REVENUE_" + localityCode
41346
- }, {
41347
- title: "TL_LOCALIZATION_BUILDING_NO",
41348
- 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"
41349
- }, {
41350
- title: "TL_LOCALIZATION_STREET_NAME",
41351
- 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"
41352
- }]
41353
- };
41354
- 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;
41355
- var owners = {
41356
- title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
41357
- additionalDetails: {
41358
- 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) {
41359
- var _response$tradeLicens31, _response$tradeLicens32;
41360
-
41361
- 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";
41362
- return {
41363
- title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
41364
- values: [{
41365
- title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
41366
- value: subOwnerShipCategory
41367
- }, {
41368
- title: "TL_OWNER_S_NAME_LABEL",
41369
- value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
41370
- }, {
41371
- title: "TL_OWNER_S_MOBILE_NUM_LABEL",
41372
- value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
41373
- }, {
41374
- title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
41375
- value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
41376
- }, {
41377
- title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
41378
- value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
41379
- }, {
41380
- title: "TL_OWNER_SPECIAL_CATEGORY",
41381
- value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
41382
- }, {
41383
- title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
41384
- value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
41385
- }]
41386
- };
41387
- }),
41388
- documents: [{
41389
- title: "PT_COMMON_DOCS",
41390
- 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) {
42608
+
42609
+ var employeeResponse = [];
42610
+ var tradedetails = {
42611
+ title: "TL_COMMON_TR_DETAILS",
42612
+ asSectionHeader: true,
42613
+ values: [{
42614
+ title: "TL_FINANCIAL_YEAR_LABEL",
42615
+ value: response !== null && response !== void 0 && response.financialYear ? "FY" + (response === null || response === void 0 ? void 0 : response.financialYear) : "NA"
42616
+ }, {
42617
+ title: "TL_NEW_TRADE_DETAILS_LIC_TYPE_LABEL",
42618
+ value: response !== null && response !== void 0 && response.licenseType ? "TRADELICENSE_LICENSETYPE_" + (response === null || response === void 0 ? void 0 : response.licenseType) : "NA"
42619
+ }, {
42620
+ title: "TL_COMMON_TABLE_COL_TRD_NAME",
42621
+ value: response === null || response === void 0 ? void 0 : response.tradeName
42622
+ }, {
42623
+ title: "TL_NEW_TRADE_DETAILS_STRUCT_TYPE_LABEL",
42624
+ 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"
42625
+ }, {
42626
+ title: "TL_NEW_TRADE_DETAILS_STRUCT_SUB_TYPE_LABEL",
42627
+ 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"
42628
+ }, {
42629
+ title: "TL_NEW_TRADE_DETAILS_TRADE_COMM_DATE_LABEL",
42630
+ value: response !== null && response !== void 0 && response.commencementDate ? convertEpochToDate(response === null || response === void 0 ? void 0 : response.commencementDate) : "NA"
42631
+ }, {
42632
+ title: "TL_NEW_GST_NUMBER_LABEL",
42633
+ 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"
42634
+ }, {
42635
+ title: "TL_NEW_OPERATIONAL_SQ_FT_AREA_LABEL",
42636
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens9 = response.tradeLicenseDetail) === null || _response$tradeLicens9 === void 0 ? void 0 : _response$tradeLicens9.operationalArea) || "NA"
42637
+ }, {
42638
+ title: "TL_NEW_NUMBER_OF_EMPLOYEES_LABEL",
42639
+ value: (response === null || response === void 0 ? void 0 : (_response$tradeLicens10 = response.tradeLicenseDetail) === null || _response$tradeLicens10 === void 0 ? void 0 : _response$tradeLicens10.noOfEmployees) || "NA"
42640
+ }]
42641
+ };
42642
+ var tradeUnits = {
42643
+ title: "TL_TRADE_UNITS_HEADER",
42644
+ additionalDetails: {
42645
+ 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) {
42646
+ var _unit$tradeType, _unit$tradeType2;
42647
+
42648
+ var tradeSubType = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.tradeType, ".", "_");
42649
+ tradeSubType = stringReplaceAll$2(tradeSubType, "-", "_");
41391
42650
  return {
41392
- title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
41393
- documentType: document === null || document === void 0 ? void 0 : document.documentType,
41394
- documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
41395
- fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42651
+ title: "TL_UNIT_HEADER",
42652
+ values: [{
42653
+ title: "TRADELICENSE_TRADECATEGORY_LABEL",
42654
+ 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"
42655
+ }, {
42656
+ title: "TRADELICENSE_TRADETYPE_LABEL",
42657
+ 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"
42658
+ }, {
42659
+ title: "TL_NEW_TRADE_SUB_TYPE_LABEL",
42660
+ value: tradeSubType ? "TRADELICENSE_TRADETYPE_" + tradeSubType : "NA"
42661
+ }, {
42662
+ title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
42663
+ value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
42664
+ }, {
42665
+ title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
42666
+ value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
42667
+ }]
41396
42668
  };
41397
42669
  })
41398
- }]
41399
- }
41400
- };
42670
+ }
42671
+ };
42672
+ var accessories = {
42673
+ title: "TL_NEW_TRADE_DETAILS_HEADER_ACC",
42674
+ additionalDetails: {
42675
+ 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) {
42676
+ var accessoryCategory = "NA";
41401
42677
 
41402
- if ((response === null || response === void 0 ? void 0 : response.workflowCode) == "NewTL" && (response === null || response === void 0 ? void 0 : response.status) !== "APPROVED") {
41403
- var _response$tradeLicens35, _response$tradeLicens36;
42678
+ if (unit !== null && unit !== void 0 && unit.accessoryCategory) {
42679
+ accessoryCategory = stringReplaceAll$2(unit === null || unit === void 0 ? void 0 : unit.accessoryCategory, ".", "_");
42680
+ accessoryCategory = "TRADELICENSE_ACCESSORIESCATEGORY_" + stringReplaceAll$2(accessoryCategory, "-", "_");
42681
+ }
41404
42682
 
41405
- var details = {
41406
- title: "",
42683
+ return {
42684
+ title: "TL_ACCESSORY_LABEL",
42685
+ values: [{
42686
+ title: "TL_NEW_TRADE_DETAILS_ACC_LABEL",
42687
+ value: accessoryCategory
42688
+ }, {
42689
+ title: "TL_NEW_TRADE_DETAILS_UOM_UOM_PLACEHOLDER",
42690
+ value: (unit === null || unit === void 0 ? void 0 : unit.uom) || "NA"
42691
+ }, {
42692
+ title: "TL_NEW_TRADE_DETAILS_UOM_VALUE_LABEL",
42693
+ value: (unit === null || unit === void 0 ? void 0 : unit.uomValue) || "NA"
42694
+ }, {
42695
+ title: "TL_ACCESSORY_COUNT_LABEL",
42696
+ value: (unit === null || unit === void 0 ? void 0 : unit.count) || "NA"
42697
+ }]
42698
+ };
42699
+ })
42700
+ }
42701
+ };
42702
+ var PropertyDetail = {
42703
+ title: "PT_DETAILS",
41407
42704
  values: [{
41408
- title: "TL_COMMON_TABLE_COL_APP_NO",
41409
- value: (response === null || response === void 0 ? void 0 : response.applicationNumber) || "NA"
42705
+ title: "TL_PROPERTY_ID",
42706
+ 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"
42707
+ }, {
42708
+ title: "PT_OWNER_NAME",
42709
+ 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"
41410
42710
  }, {
41411
- title: "TL_APPLICATION_CHALLAN_LABEL",
41412
- 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"
42711
+ title: "PROPERTY_ADDRESS",
42712
+ value: propertyAddress || "NA"
42713
+ }, {
42714
+ title: "TL_VIEW_PROPERTY_DETAIL",
42715
+ 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),
42716
+ value: "",
42717
+ isLink: true
41413
42718
  }]
41414
42719
  };
41415
- response && employeeResponse.push(details);
41416
- }
42720
+ 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);
42721
+ 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);
42722
+ var tradeAddress = {
42723
+ title: "TL_CHECK_ADDRESS",
42724
+ values: [{
42725
+ title: "CORE_COMMON_PINCODE",
42726
+ 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"
42727
+ }, {
42728
+ title: "MYCITY_CODE_LABEL",
42729
+ 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"
42730
+ }, {
42731
+ title: "TL_LOCALIZATION_LOCALITY",
42732
+ value: stringReplaceAll$2(cityOfApp === null || cityOfApp === void 0 ? void 0 : cityOfApp.toUpperCase(), ".", "_") + "_REVENUE_" + localityCode
42733
+ }, {
42734
+ title: "TL_LOCALIZATION_BUILDING_NO",
42735
+ 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"
42736
+ }, {
42737
+ title: "TL_LOCALIZATION_STREET_NAME",
42738
+ 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"
42739
+ }]
42740
+ };
42741
+ 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;
42742
+ var owners = response !== null && response !== void 0 && (_response$tradeLicens30 = response.tradeLicenseDetail) !== null && _response$tradeLicens30 !== void 0 && _response$tradeLicens30.subOwnerShipCategory.includes("INSTITUTIONAL") ? {
42743
+ title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
42744
+ additionalDetails: {
42745
+ 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) {
42746
+ 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;
41417
42747
 
41418
- response && employeeResponse.push(tradedetails);
41419
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens37 = response.tradeLicenseDetail) === null || _response$tradeLicens37 === void 0 ? void 0 : _response$tradeLicens37.tradeUnits) && employeeResponse.push(tradeUnits);
41420
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens38 = response.tradeLicenseDetail) === null || _response$tradeLicens38 === void 0 ? void 0 : _response$tradeLicens38.accessories) && employeeResponse.push(accessories);
41421
- response && employeeResponse.push(tradeAddress);
41422
- (response === null || response === void 0 ? void 0 : (_response$tradeLicens39 = response.tradeLicenseDetail) === null || _response$tradeLicens39 === void 0 ? void 0 : _response$tradeLicens39.owners) && employeeResponse.push(owners);
41423
- return {
41424
- tenantId: response.tenantId,
41425
- applicationDetails: employeeResponse,
41426
- additionalDetails: response === null || response === void 0 ? void 0 : response.additionalDetails,
41427
- applicationData: response,
41428
- numOfApplications: numOfApplications
41429
- };
41430
- }
42748
+ 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";
42749
+ return {
42750
+ title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
42751
+ values: [{
42752
+ title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
42753
+ value: subOwnerShipCategory
42754
+ }, {
42755
+ title: "TL_INSTITUTION_NAME_LABEL",
42756
+ 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"
42757
+ }, {
42758
+ title: "TL_NEW_OWNER_DESIG_LABEL",
42759
+ 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"
42760
+ }, {
42761
+ title: "TL_TELEPHONE_NUMBER_LABEL",
42762
+ 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"
42763
+ }, {
42764
+ title: "TL_OWNER_S_MOBILE_NUM_LABEL",
42765
+ value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
42766
+ }, {
42767
+ title: "TL_NEW_OWNER_DETAILS_NAME_LABEL",
42768
+ 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"
42769
+ }, {
42770
+ title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
42771
+ 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"
42772
+ }]
42773
+ };
42774
+ }),
42775
+ documents: [{
42776
+ title: "PT_COMMON_DOCS",
42777
+ 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) {
42778
+ return {
42779
+ title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
42780
+ documentType: document === null || document === void 0 ? void 0 : document.documentType,
42781
+ documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
42782
+ fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42783
+ };
42784
+ })
42785
+ }]
42786
+ }
42787
+ } : {
42788
+ title: "ES_NEW_APPLICATION_OWNERSHIP_DETAILS",
42789
+ additionalDetails: {
42790
+ 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) {
42791
+ var _response$tradeLicens51, _response$tradeLicens52;
41431
42792
 
41432
- var numOfApplications = [];
42793
+ 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";
42794
+ return {
42795
+ title: Number(checkOwnerLength) > 1 ? "TL_PAYMENT_PAID_BY_PLACEHOLDER" : "",
42796
+ values: [{
42797
+ title: "TL_NEW_OWNER_DETAILS_OWNERSHIP_TYPE_LABEL",
42798
+ value: subOwnerShipCategory
42799
+ }, {
42800
+ title: "TL_OWNER_S_NAME_LABEL",
42801
+ value: (owner === null || owner === void 0 ? void 0 : owner.name) || "NA"
42802
+ }, {
42803
+ title: "TL_OWNER_S_MOBILE_NUM_LABEL",
42804
+ value: (owner === null || owner === void 0 ? void 0 : owner.mobileNumber) || "NA"
42805
+ }, {
42806
+ title: "TL_GUARDIAN_S_NAME_LABEL",
42807
+ value: (owner === null || owner === void 0 ? void 0 : owner.fatherOrHusbandName) || "NA"
42808
+ }, {
42809
+ title: "TL_RELATIONSHIP_WITH_GUARDIAN_LABEL",
42810
+ value: (owner === null || owner === void 0 ? void 0 : owner.relationship) || "NA"
42811
+ }, {
42812
+ title: "TL_NEW_OWNER_DETAILS_GENDER_LABEL",
42813
+ value: (owner === null || owner === void 0 ? void 0 : owner.gender) || "NA"
42814
+ }, {
42815
+ title: "TL_NEW_OWNER_DETAILS_EMAIL_LABEL",
42816
+ value: (owner === null || owner === void 0 ? void 0 : owner.emailId) || "NA"
42817
+ }, {
42818
+ title: "TL_OWNER_SPECIAL_CATEGORY",
42819
+ value: owner !== null && owner !== void 0 && owner.ownerType ? "COMMON_MASTERS_OWNERTYPE_" + (owner === null || owner === void 0 ? void 0 : owner.ownerType) : "NA"
42820
+ }, {
42821
+ title: "TL_NEW_OWNER_DETAILS_ADDR_LABEL",
42822
+ value: (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) || "NA"
42823
+ }]
42824
+ };
42825
+ }),
42826
+ documents: [{
42827
+ title: "PT_COMMON_DOCS",
42828
+ 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) {
42829
+ return {
42830
+ title: "TL_NEW_" + (document === null || document === void 0 ? void 0 : document.documentType.replace(".", "_")),
42831
+ documentType: document === null || document === void 0 ? void 0 : document.documentType,
42832
+ documentUid: document === null || document === void 0 ? void 0 : document.documentUid,
42833
+ fileStoreId: document === null || document === void 0 ? void 0 : document.fileStoreId
42834
+ };
42835
+ })
42836
+ }]
42837
+ }
42838
+ };
41433
42839
 
41434
- var _temp = function () {
41435
- if (response !== null && response !== void 0 && response.licenseNumber) {
41436
- var licenseNumbers = response === null || response === void 0 ? void 0 : response.licenseNumber;
41437
- var filters = {
41438
- licenseNumbers: licenseNumbers,
41439
- offset: 0
42840
+ if ((response === null || response === void 0 ? void 0 : response.workflowCode) == "NewTL" && (response === null || response === void 0 ? void 0 : response.status) !== "APPROVED") {
42841
+ var _response$tradeLicens55, _response$tradeLicens56;
42842
+
42843
+ var details = {
42844
+ title: "",
42845
+ values: [{
42846
+ title: "TL_COMMON_TABLE_COL_APP_NO",
42847
+ value: (response === null || response === void 0 ? void 0 : response.applicationNumber) || "NA"
42848
+ }, {
42849
+ title: "TL_APPLICATION_CHALLAN_LABEL",
42850
+ 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"
42851
+ }]
42852
+ };
42853
+ response && employeeResponse.push(details);
42854
+ }
42855
+
42856
+ response && employeeResponse.push(tradedetails);
42857
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens57 = response.tradeLicenseDetail) === null || _response$tradeLicens57 === void 0 ? void 0 : _response$tradeLicens57.tradeUnits) && employeeResponse.push(tradeUnits);
42858
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens58 = response.tradeLicenseDetail) === null || _response$tradeLicens58 === void 0 ? void 0 : _response$tradeLicens58.accessories) && employeeResponse.push(accessories);
42859
+ (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);
42860
+ 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);
42861
+ (response === null || response === void 0 ? void 0 : (_response$tradeLicens59 = response.tradeLicenseDetail) === null || _response$tradeLicens59 === void 0 ? void 0 : _response$tradeLicens59.owners) && employeeResponse.push(owners);
42862
+ return {
42863
+ tenantId: response.tenantId,
42864
+ applicationDetails: employeeResponse,
42865
+ additionalDetails: response === null || response === void 0 ? void 0 : response.additionalDetails,
42866
+ applicationData: response,
42867
+ numOfApplications: numOfApplications
41440
42868
  };
41441
- return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
41442
- numOfApplications = _TLSearch$numberOfApp;
41443
- });
41444
42869
  }
41445
- }();
41446
42870
 
41447
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
42871
+ var numOfApplications = [];
42872
+
42873
+ var _temp = function () {
42874
+ if (response !== null && response !== void 0 && response.licenseNumber) {
42875
+ var licenseNumbers = response === null || response === void 0 ? void 0 : response.licenseNumber;
42876
+ var filters = {
42877
+ licenseNumbers: licenseNumbers,
42878
+ offset: 0
42879
+ };
42880
+ return Promise.resolve(TLSearch.numberOfApplications(tenantId, filters)).then(function (_TLSearch$numberOfApp) {
42881
+ numOfApplications = _TLSearch$numberOfApp;
42882
+ });
42883
+ }
42884
+ }();
42885
+
42886
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
42887
+ }
42888
+
42889
+ 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;
42890
+
42891
+ return _response$tradeLicens ? Promise.resolve(Digit.PTService.search({
42892
+ tenantId: tenantId,
42893
+ filters: {
42894
+ 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
42895
+ }
42896
+ })).then(_temp3) : _temp3(_response$tradeLicens);
41448
42897
  });
41449
42898
  } catch (e) {
41450
42899
  return Promise.reject(e);
@@ -41520,6 +42969,9 @@ var useTLGenderMDMS = function useTLGenderMDMS(tenantId, moduleCode, type, confi
41520
42969
  switch (type) {
41521
42970
  case "GenderType":
41522
42971
  return useTLGenders();
42972
+
42973
+ default:
42974
+ return null;
41523
42975
  }
41524
42976
  };
41525
42977
 
@@ -41790,21 +43242,45 @@ var ReceiptsService = {
41790
43242
  }, filters, searchParams)
41791
43243
  });
41792
43244
  },
41793
- receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey) {
43245
+ receipt_download: function receipt_download(bussinessService, consumerCode, tenantId, pdfKey, receiptNumbers) {
43246
+ var newParam = {
43247
+ bussinessService: bussinessService,
43248
+ tenantId: tenantId
43249
+ };
43250
+
43251
+ if (receiptNumbers) {
43252
+ newParam['receiptNumbers'] = receiptNumbers;
43253
+ } else {
43254
+ newParam['consumerCode'] = consumerCode;
43255
+ }
43256
+
41794
43257
  return Request({
41795
- url: Urls.receipts.receipt_download,
43258
+ url: Urls.mcollect.receipt_download,
41796
43259
  data: {},
41797
43260
  useCache: true,
41798
43261
  method: "POST",
41799
- params: {
41800
- bussinessService: bussinessService,
41801
- consumerCode: consumerCode,
41802
- tenantId: tenantId,
41803
- pdfKey: pdfKey
41804
- },
43262
+ params: _extends({}, newParam),
43263
+ auth: window.location.href.includes("pt/property/my-payments") ? false : true,
43264
+ locale: true,
43265
+ userService: window.location.href.includes("pt/property/my-payments") ? false : true,
43266
+ userDownload: true
43267
+ });
43268
+ },
43269
+ bill_download: function bill_download(bussinessService, consumerCode, tenantId, pdfKey) {
43270
+ var newParam = {
43271
+ bussinessService: bussinessService,
43272
+ tenantId: tenantId,
43273
+ consumerCode: consumerCode
43274
+ };
43275
+ return Request({
43276
+ url: Urls.mcollect.bill_download,
43277
+ data: {},
43278
+ useCache: true,
43279
+ method: "POST",
43280
+ params: _extends({}, newParam),
41805
43281
  auth: true,
41806
- userService: true,
41807
43282
  locale: true,
43283
+ userService: true,
41808
43284
  userDownload: true
41809
43285
  });
41810
43286
  },
@@ -41823,7 +43299,7 @@ var ReceiptsService = {
41823
43299
  }
41824
43300
  };
41825
43301
 
41826
- var _excluded$2 = ["isLoading", "error", "data"];
43302
+ var _excluded$3 = ["isLoading", "error", "data"];
41827
43303
  var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filters, isupdated, config) {
41828
43304
  if (config === void 0) {
41829
43305
  config = {};
@@ -41838,7 +43314,7 @@ var useReceiptsSearch = function useReceiptsSearch(searchparams, tenantId, filte
41838
43314
  isLoading = _useQuery.isLoading,
41839
43315
  error = _useQuery.error,
41840
43316
  data = _useQuery.data,
41841
- rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$2);
43317
+ rest = _objectWithoutPropertiesLoose(_useQuery, _excluded$3);
41842
43318
 
41843
43319
  return _extends({
41844
43320
  isLoading: isLoading,
@@ -42009,6 +43485,9 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
42009
43485
 
42010
43486
  case "CancelReceiptReasonAndStatus":
42011
43487
  return useCancelReceiptReasonAndStatus();
43488
+
43489
+ default:
43490
+ return null;
42012
43491
  }
42013
43492
  };
42014
43493
 
@@ -42072,6 +43551,46 @@ var SearchMdmsTypes = {
42072
43551
  }
42073
43552
  });
42074
43553
  },
43554
+ useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
43555
+ return reactQuery.useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
43556
+ return MdmsService.getDataByCriteria(tenantId, {
43557
+ details: {
43558
+ tenantId: tenantId,
43559
+ moduleDetails: [{
43560
+ moduleName: "BPA",
43561
+ masterDetails: [{
43562
+ name: "BPAAppicationMapping"
43563
+ }]
43564
+ }]
43565
+ }
43566
+ }, "BPA");
43567
+ }, {
43568
+ select: function select(data) {
43569
+ var _data$BPA3, _data$BPA3$BPAAppicat;
43570
+
43571
+ 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) {
43572
+ var _currentObject$roles;
43573
+
43574
+ var flag = 0;
43575
+ currentObject === null || currentObject === void 0 ? void 0 : (_currentObject$roles = currentObject.roles) === null || _currentObject$roles === void 0 ? void 0 : _currentObject$roles.map(function (bpaRole) {
43576
+ var _Digit$UserService$ge, _Digit$UserService$ge2;
43577
+
43578
+ 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) {
43579
+ return (role === null || role === void 0 ? void 0 : role.code) === bpaRole;
43580
+ });
43581
+ if (found == true) flag = 1;
43582
+ });
43583
+ if (flag == 1) return true;else return false;
43584
+ }).map(function (type) {
43585
+ return {
43586
+ code: type.code,
43587
+ i18nKey: "BPA_SERVICETYPE_" + type.code,
43588
+ applicationType: type.applicationType
43589
+ };
43590
+ }));
43591
+ }
43592
+ });
43593
+ },
42075
43594
  getFormConfig: function getFormConfig(tenantId, config) {
42076
43595
  return reactQuery.useQuery([tenantId, "FORM_CONFIG"], function () {
42077
43596
  return MdmsService.getDataByCriteria(tenantId, {
@@ -42142,15 +43661,15 @@ var useMDMS$4 = function useMDMS(tenantId, moduleCode, type, config, payload) {
42142
43661
  }
42143
43662
  };
42144
43663
 
42145
- var mapWfBybusinessId$1 = function mapWfBybusinessId(workflowData) {
43664
+ var mapWfBybusinessId$2 = function mapWfBybusinessId(workflowData) {
42146
43665
  return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
42147
43666
  acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
42148
43667
  return acc;
42149
43668
  }, {});
42150
43669
  };
42151
43670
 
42152
- var combineResponse = function combineResponse(applications, workflowData, totalCount) {
42153
- var workflowInstances = mapWfBybusinessId$1(workflowData);
43671
+ var combineResponse$1 = function combineResponse(applications, workflowData, totalCount) {
43672
+ var workflowInstances = mapWfBybusinessId$2(workflowData);
42154
43673
  return applications.map(function (application) {
42155
43674
  var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5;
42156
43675
 
@@ -42169,7 +43688,6 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
42169
43688
 
42170
43689
  return reactQuery.useQuery(['BPA_REG_WORK_SEARCH', tenantId, filters, params], function () {
42171
43690
  try {
42172
- var userInfo = Digit.UserService.getUser();
42173
43691
  return Promise.resolve(Digit.OBPSService.BPAREGSearch(tenantId, filters, params)).then(function (response) {
42174
43692
  var businessIds = response === null || response === void 0 ? void 0 : response.Licenses.map(function (application) {
42175
43693
  return application.applicationNumber;
@@ -42177,7 +43695,7 @@ var useEmpBPAREGSearch = function useEmpBPAREGSearch(tenantId, filters, params,
42177
43695
  return Promise.resolve(Digit.WorkflowService.getAllApplication(Digit.ULBService.getStateId(), {
42178
43696
  businessIds: businessIds.join()
42179
43697
  })).then(function (workflowRes) {
42180
- 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);
43698
+ 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);
42181
43699
  });
42182
43700
  });
42183
43701
  } catch (e) {
@@ -42504,14 +44022,16 @@ var OBPSService = {
42504
44022
  BPADetailsPage: function (tenantId, filters) {
42505
44023
  try {
42506
44024
  return Promise.resolve(OBPSService.BPASearch(tenantId, filters)).then(function (response) {
42507
- var _response$BPA;
44025
+ var _response$BPA, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA3, _response$BPA3$, _response$BPA3$$addit;
42508
44026
 
42509
44027
  if (!(response !== null && response !== void 0 && (_response$BPA = response.BPA) !== null && _response$BPA !== void 0 && _response$BPA.length)) {
42510
44028
  return;
42511
44029
  }
42512
44030
 
42513
- var _response$BPA2 = response === null || response === void 0 ? void 0 : response.BPA,
42514
- BPA = _response$BPA2[0];
44031
+ 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"));
44032
+
44033
+ var _response$BPA4 = response === null || response === void 0 ? void 0 : response.BPA,
44034
+ BPA = _response$BPA4[0];
42515
44035
 
42516
44036
  return Promise.resolve(OBPSService.scrutinyDetails(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
42517
44037
  edcrNumber: BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber
@@ -42538,8 +44058,23 @@ var OBPSService = {
42538
44058
  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,
42539
44059
  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
42540
44060
  };
44061
+
44062
+ function ConvertEpochToValidityDate(dateEpoch) {
44063
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
44064
+ return "NA";
44065
+ }
44066
+
44067
+ var dateFromApi = new Date(dateEpoch);
44068
+ var month = dateFromApi.getMonth() + 1;
44069
+ var day = dateFromApi.getDate();
44070
+ var year = dateFromApi.getFullYear() - 3;
44071
+ month = (month > 9 ? "" : "0") + month;
44072
+ day = (day > 9 ? "" : "0") + day;
44073
+ return day + "/" + month + "/" + year;
44074
+ }
44075
+
42541
44076
  return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
42542
- 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;
44077
+ 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;
42543
44078
 
42544
44079
  var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
42545
44080
  var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
@@ -42650,6 +44185,18 @@ var OBPSService = {
42650
44185
  value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
42651
44186
  }]
42652
44187
  };
44188
+
44189
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
44190
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
44191
+
44192
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
44193
+ title: "BPA_PERMIT_APP_NUMBER",
44194
+ 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),
44195
+ 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,
44196
+ isLink: true
44197
+ }]);
44198
+ }
44199
+
42653
44200
  var permitcondn = [];
42654
44201
  (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) {
42655
44202
  permitcondn.push({
@@ -42674,7 +44221,7 @@ var OBPSService = {
42674
44221
  }
42675
44222
 
42676
44223
  if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
42677
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7;
44224
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7, _BPA$additionalDetail8;
42678
44225
 
42679
44226
  applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
42680
44227
  title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
@@ -42682,7 +44229,7 @@ var OBPSService = {
42682
44229
  });
42683
44230
  applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
42684
44231
  title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
42685
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : BPA.applicationDate), 'dd/MM/yyyy') + " - " + dateFns.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"
44232
+ 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) + " - " + dateFns.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"
42686
44233
  });
42687
44234
  }
42688
44235
 
@@ -42731,11 +44278,11 @@ var OBPSService = {
42731
44278
  isNotTranslated: true
42732
44279
  }, {
42733
44280
  title: "BPA_HOLDING_NUMBER_LABEL",
42734
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.holdingNo) || "NA",
44281
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.holdingNo) || "NA",
42735
44282
  isNotTranslated: true
42736
44283
  }, {
42737
44284
  title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
42738
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.registrationDetails) || "NA",
44285
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.registrationDetails) || "NA",
42739
44286
  isNotTranslated: true
42740
44287
  }]
42741
44288
  };
@@ -42928,7 +44475,7 @@ var OBPSService = {
42928
44475
  var val;
42929
44476
  var i;
42930
44477
  var FieldInspectionData = [];
42931
- 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) {
44478
+ 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) {
42932
44479
  if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
42933
44480
  title: ob.title,
42934
44481
  additionalDetails: {
@@ -42969,10 +44516,10 @@ var OBPSService = {
42969
44516
  var fiReports = {
42970
44517
  title: "",
42971
44518
  isFieldInspection: true,
42972
- 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,
44519
+ 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,
42973
44520
  additionalDetails: {
42974
44521
  values: [],
42975
- 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
44522
+ 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
42976
44523
  }
42977
44524
  };
42978
44525
 
@@ -43012,15 +44559,15 @@ var convertMillisecondsToDays = function convertMillisecondsToDays(milliseconds)
43012
44559
  return Math.round(milliseconds / (1000 * 60 * 60 * 24));
43013
44560
  };
43014
44561
 
43015
- var mapWfBybusinessId$2 = function mapWfBybusinessId(workflowData) {
44562
+ var mapWfBybusinessId$3 = function mapWfBybusinessId(workflowData) {
43016
44563
  return workflowData === null || workflowData === void 0 ? void 0 : workflowData.reduce(function (acc, item) {
43017
44564
  acc[item === null || item === void 0 ? void 0 : item.businessId] = item;
43018
44565
  return acc;
43019
44566
  }, {});
43020
44567
  };
43021
44568
 
43022
- var combineResponse$1 = function combineResponse(applications, workflowData) {
43023
- var workflowInstances = mapWfBybusinessId$2(workflowData);
44569
+ var combineResponse$2 = function combineResponse(applications, workflowData) {
44570
+ var workflowInstances = mapWfBybusinessId$3(workflowData);
43024
44571
  return applications.map(function (application) {
43025
44572
  var _workflowInstances$ap, _workflowInstances$ap2, _workflowInstances$ap3, _workflowInstances$ap4, _workflowInstances$ap5, _workflowInstances$ap6;
43026
44573
 
@@ -43051,7 +44598,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
43051
44598
  var _exit = false;
43052
44599
 
43053
44600
  function _temp5(_result3) {
43054
- return _exit ? _result3 : combineResponse$1(response === null || response === void 0 ? void 0 : response.BPA, processInstanceArray);
44601
+ return _exit ? _result3 : combineResponse$2(response === null || response === void 0 ? void 0 : response.BPA, processInstanceArray);
43055
44602
  }
43056
44603
 
43057
44604
  var tenantMap = {},
@@ -43088,8 +44635,7 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
43088
44635
  })).then(function (payload) {
43089
44636
  processInstanceArray = processInstanceArray.concat(payload.ProcessInstances);
43090
44637
  });
43091
- }, function (error) {
43092
- console.error(error);
44638
+ }, function () {
43093
44639
  var _temp = [];
43094
44640
  _exit = true;
43095
44641
  return _temp;
@@ -43303,13 +44849,13 @@ var useBPADetails = function useBPADetails(tenantId, filters, config) {
43303
44849
  }, config);
43304
44850
  };
43305
44851
 
43306
- var _excluded$3 = ["tenantId", "businessService"];
44852
+ var _excluded$4 = ["tenantId", "businessService"];
43307
44853
  var useBPAREGgetbill = function useBPAREGgetbill(_ref, config) {
43308
44854
  var _Digit$UserService$ge, _Digit$UserService$ge2;
43309
44855
 
43310
44856
  var tenantId = _ref.tenantId,
43311
44857
  businessService = _ref.businessService,
43312
- filters = _objectWithoutPropertiesLoose(_ref, _excluded$3);
44858
+ filters = _objectWithoutPropertiesLoose(_ref, _excluded$4);
43313
44859
 
43314
44860
  if (config === void 0) {
43315
44861
  config = {};
@@ -43467,6 +45013,10 @@ var useBPAInbox = function useBPAInbox(_ref) {
43467
45013
  tenantId = Digit.ULBService.getStateId();
43468
45014
  }
43469
45015
 
45016
+ if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && window.location.href.includes("obps/inbox") && businessService) {
45017
+ businessService = "BPA_OC";
45018
+ }
45019
+
43470
45020
  var _filters = {
43471
45021
  tenantId: tenantId,
43472
45022
  processSearchCriteria: _extends({
@@ -43488,10 +45038,8 @@ var useBPAInbox = function useBPAInbox(_ref) {
43488
45038
  sortOrder: sortOrder
43489
45039
  } : {}, sortBy ? {
43490
45040
  sortBy: sortBy
43491
- } : {}, (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
43492
- applicationType: applicationType.map(function (item) {
43493
- return item.code;
43494
- }).join(",")
45041
+ } : {}, applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.length) > 0 ? {
45042
+ applicationType: applicationType
43495
45043
  } : {}, (locality === null || locality === void 0 ? void 0 : locality.length) > 0 ? {
43496
45044
  locality: locality.map(function (item) {
43497
45045
  return item.code.split("_").pop();
@@ -43571,7 +45119,7 @@ var useEDCRInbox = function useEDCRInbox(_ref2) {
43571
45119
  } : {}, status ? {
43572
45120
  status: status
43573
45121
  } : {}, sortOrder ? {
43574
- sortBy: sortOrder
45122
+ orderBy: sortOrder
43575
45123
  } : {}, appliactionType ? {
43576
45124
  appliactionType: appliactionType
43577
45125
  } : {}, {
@@ -43668,9 +45216,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43668
45216
  tenantId: tenantId,
43669
45217
  processSearchCriteria: _extends({
43670
45218
  moduleName: moduleName ? moduleName : "bpa-services",
43671
- businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? businessService.map(function (o) {
43672
- return o.code;
43673
- }) : ["BPA_LOW", "BPA", "BPA_OC"]
45219
+ businessService: (businessService === null || businessService === void 0 ? void 0 : businessService.length) > 0 ? [businessService] : ["BPA_LOW", "BPA", "BPA_OC"]
43674
45220
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
43675
45221
  status: applicationStatus
43676
45222
  } : {}),
@@ -43678,7 +45224,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43678
45224
  assignee: assignee
43679
45225
  }, mobileNumber ? {
43680
45226
  mobileNumber: mobileNumber
43681
- } : {}, applicationType ? {
45227
+ } : {}, applicationType && applicationType.length > 0 ? {
43682
45228
  applicationType: applicationType
43683
45229
  } : {}, serviceType ? {
43684
45230
  serviceType: serviceType
@@ -43730,9 +45276,7 @@ var useArchitectInbox = function useArchitectInbox(_ref) {
43730
45276
  });
43731
45277
  });
43732
45278
  });
43733
- }, function (error) {
43734
- console.error("error", error);
43735
- });
45279
+ }, function () {});
43736
45280
 
43737
45281
  if (_temp3 && _temp3.then) return _temp3.then(function () {});
43738
45282
  }
@@ -43835,16 +45379,12 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
43835
45379
  var _SearchMdmsTypes$useA = SearchMdmsTypes.useApplicationTypes(tenantId),
43836
45380
  applicationTypes = _SearchMdmsTypes$useA.data;
43837
45381
 
43838
- var _SearchMdmsTypes$useS = SearchMdmsTypes.useServiceTypes(tenantId),
43839
- serviceTypes = _SearchMdmsTypes$useS.data,
43840
- isLoadingServiceTypes = _SearchMdmsTypes$useS.isLoading;
45382
+ var _SearchMdmsTypes$useB = SearchMdmsTypes.useBPAServiceTypes(tenantId),
45383
+ serviceTypes = _SearchMdmsTypes$useB.data,
45384
+ isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
43841
45385
 
43842
45386
  var ServiceTypes = React.useMemo(function () {
43843
- var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : [], [{
43844
- applicationType: ["BPA_STAKEHOLDER_REGISTRATION"],
43845
- code: "BPA_STAKEHOLDER_REGISTRATION",
43846
- i18nKey: "BPA_SERVICETYPE_BPA_STAKEHOLDER_REGISTRATION"
43847
- }]);
45387
+ var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
43848
45388
  return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
43849
45389
  return e.applicationType.includes(Applicationtype);
43850
45390
  }).map(function (e) {
@@ -43858,8 +45398,20 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
43858
45398
  code: "BPA_STAKEHOLDER_REGISTRATION",
43859
45399
  i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
43860
45400
  }]);
45401
+ var filteredapplicationTypes = React.useMemo(function () {
45402
+ return applicationTypesWithStakeholder.filter(function (curr) {
45403
+ var temp = 0;
45404
+ serviceTypes === null || serviceTypes === void 0 ? void 0 : serviceTypes.map(function (ob) {
45405
+ var found = ob && (ob === null || ob === void 0 ? void 0 : ob.applicationType) && (ob === null || ob === void 0 ? void 0 : ob.applicationType.some(function (ap) {
45406
+ return ap === curr.code;
45407
+ }));
45408
+ if (found) temp = 1;
45409
+ });
45410
+ if (temp == 1) return true;else return false;
45411
+ });
45412
+ }, [serviceTypes, applicationTypesWithStakeholder]);
43861
45413
  return {
43862
- applicationTypes: applicationTypesWithStakeholder,
45414
+ applicationTypes: filteredapplicationTypes,
43863
45415
  ServiceTypes: ServiceTypes
43864
45416
  };
43865
45417
  };
@@ -43869,23 +45421,21 @@ var useBusinessServiceBasedOnServiceType = function useBusinessServiceBasedOnSer
43869
45421
  var configData = {
43870
45422
  BUILDING_PLAN_SCRUTINY: [{
43871
45423
  code: "BPA_LOW",
43872
- i18nKey: "WF_BPA_LOW"
45424
+ i18nKey: "WF_BPA_LOW_LABEL"
43873
45425
  }, {
43874
45426
  code: "BPA",
43875
- i18nKey: "WF_BPA"
45427
+ i18nKey: "WF_BPA_LABEL"
43876
45428
  }],
43877
45429
  BUILDING_OC_PLAN_SCRUTINY: [{
45430
+ code: "BPA_OC_LOW",
45431
+ i18nKey: "WF_BPA_LOW_LABEL"
45432
+ }, {
43878
45433
  code: "BPA_OC",
43879
- i18nKey: "WF_BPA_OC"
45434
+ i18nKey: "WF_BPA_LABEL"
43880
45435
  }]
43881
45436
  };
43882
- var selectedBusinessServicesObjectin2dArray = applicationType === null || applicationType === void 0 ? void 0 : applicationType.map(function (type) {
43883
- return configData[type.code];
43884
- });
43885
- var selectedBusinessServices = (selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.length) > 0 ? selectedBusinessServicesObjectin2dArray === null || selectedBusinessServicesObjectin2dArray === void 0 ? void 0 : selectedBusinessServicesObjectin2dArray.reduce(function (acc, curr) {
43886
- return [].concat(acc, curr);
43887
- }, []) : null;
43888
- return selectedBusinessServices;
45437
+ var selectedBusinessServicesObjectin2dArray = configData[applicationType];
45438
+ return selectedBusinessServicesObjectin2dArray;
43889
45439
  };
43890
45440
 
43891
45441
  var useBusinessServiceData = function useBusinessServiceData(tenantId, businessServices, config) {
@@ -43950,7 +45500,7 @@ var useBPATaxDocuments = function useBPATaxDocuments(stateId, formData, PrevStat
43950
45500
  };
43951
45501
  };
43952
45502
 
43953
- var combineResponse$2 = function combineResponse(data, users) {
45503
+ var combineResponse$3 = function combineResponse(data, users) {
43954
45504
  var _data$events;
43955
45505
 
43956
45506
  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) {
@@ -43993,7 +45543,7 @@ var useInbox$2 = function useInbox(tenantId, data, filter, config) {
43993
45543
  return Promise.resolve(Digit.UserService.userSearch(null, {
43994
45544
  uuid: uuids
43995
45545
  }, {})).then(function (usersResponse) {
43996
- return combineResponse$2(eventData, usersResponse === null || usersResponse === void 0 ? void 0 : usersResponse.user);
45546
+ return combineResponse$3(eventData, usersResponse === null || usersResponse === void 0 ? void 0 : usersResponse.user);
43997
45547
  });
43998
45548
  });
43999
45549
  } catch (e) {
@@ -44223,11 +45773,13 @@ var Surveys = {
44223
45773
  showResults: function showResults(details) {
44224
45774
  return Request({
44225
45775
  url: Urls.engagement.surveys.showResults,
44226
- data: details,
44227
45776
  useCache: true,
44228
45777
  userService: true,
44229
45778
  method: "POST",
44230
- auth: true
45779
+ auth: true,
45780
+ params: {
45781
+ surveyId: details.surveyId
45782
+ }
44231
45783
  });
44232
45784
  }
44233
45785
  };
@@ -44383,7 +45935,7 @@ var NOCSearch = {
44383
45935
  return Promise.resolve(NOCSearch.application(tenantId, filter)).then(function (response) {
44384
45936
  function _temp4() {
44385
45937
  function _temp2() {
44386
- var _bpaResponse, _bpaResponse$, _edcrResponse, _edcrResponse2, _edcrResponse3;
45938
+ var _bpaResponse, _bpaResponse$, _bpaResponse2, _bpaResponse2$, _edcrResponse, _edcrResponse2, _edcrResponse3;
44387
45939
 
44388
45940
  var employeeResponse = [];
44389
45941
  var buildingDetails = {
@@ -44391,7 +45943,14 @@ var NOCSearch = {
44391
45943
  asSectionHeader: true,
44392
45944
  values: [{
44393
45945
  title: "NOC_APP_NO_LABEL",
44394
- value: ((_bpaResponse = bpaResponse) === null || _bpaResponse === void 0 ? void 0 : (_bpaResponse$ = _bpaResponse[0]) === null || _bpaResponse$ === void 0 ? void 0 : _bpaResponse$.applicationNo) || "NA"
45946
+ value: /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
45947
+ 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)
45948
+ }, /*#__PURE__*/React__default.createElement("span", {
45949
+ className: "link",
45950
+ style: {
45951
+ color: "#F47738"
45952
+ }
45953
+ }, (_bpaResponse2 = bpaResponse) === null || _bpaResponse2 === void 0 ? void 0 : (_bpaResponse2$ = _bpaResponse2[0]) === null || _bpaResponse2$ === void 0 ? void 0 : _bpaResponse2$.applicationNo)))
44395
45954
  }, {
44396
45955
  title: "NOC_MODULE_SOURCE_LABEL",
44397
45956
  value: t(response === null || response === void 0 ? void 0 : response.source) || "NA"
@@ -44415,13 +45974,13 @@ var NOCSearch = {
44415
45974
  var edcrResponse = {};
44416
45975
 
44417
45976
  var _temp = function () {
44418
- var _bpaResponse2, _bpaResponse2$;
45977
+ var _bpaResponse3, _bpaResponse3$;
44419
45978
 
44420
- if ((_bpaResponse2 = bpaResponse) !== null && _bpaResponse2 !== void 0 && (_bpaResponse2$ = _bpaResponse2[0]) !== null && _bpaResponse2$ !== void 0 && _bpaResponse2$.edcrNumber) {
44421
- var _bpaResponse3, _bpaResponse3$;
45979
+ if ((_bpaResponse3 = bpaResponse) !== null && _bpaResponse3 !== void 0 && (_bpaResponse3$ = _bpaResponse3[0]) !== null && _bpaResponse3$ !== void 0 && _bpaResponse3$.edcrNumber) {
45980
+ var _bpaResponse4, _bpaResponse4$;
44422
45981
 
44423
45982
  var bpaFilter = {
44424
- edcrNumber: (_bpaResponse3 = bpaResponse) === null || _bpaResponse3 === void 0 ? void 0 : (_bpaResponse3$ = _bpaResponse3[0]) === null || _bpaResponse3$ === void 0 ? void 0 : _bpaResponse3$.edcrNumber
45983
+ edcrNumber: (_bpaResponse4 = bpaResponse) === null || _bpaResponse4 === void 0 ? void 0 : (_bpaResponse4$ = _bpaResponse4[0]) === null || _bpaResponse4$ === void 0 ? void 0 : _bpaResponse4$.edcrNumber
44425
45984
  };
44426
45985
  return Promise.resolve(NOCSearch.scrutinyDetails(tenantId, bpaFilter)).then(function (_NOCSearch$scrutinyDe) {
44427
45986
  edcrResponse = _NOCSearch$scrutinyDe;
@@ -44475,7 +46034,8 @@ var useNOCInbox = function useNOCInbox(_ref) {
44475
46034
  var businessService = filterForm.businessService,
44476
46035
  applicationStatus = filterForm.applicationStatus,
44477
46036
  locality = filterForm.locality,
44478
- assignee = filterForm.assignee;
46037
+ assignee = filterForm.assignee,
46038
+ businessServiceArray = filterForm.businessServiceArray;
44479
46039
  var sourceRefId = searchForm.sourceRefId,
44480
46040
  applicationNo = searchForm.applicationNo;
44481
46041
  var sortBy = tableForm.sortBy,
@@ -44486,7 +46046,7 @@ var useNOCInbox = function useNOCInbox(_ref) {
44486
46046
  tenantId: tenantId,
44487
46047
  processSearchCriteria: _extends({
44488
46048
  moduleName: "noc-services",
44489
- businessService: businessService ? [businessService.code] : ["FIRE_NOC_SRV", "FIRE_NOC_OFFLINE", "AIRPORT_NOC_OFFLINE", "AIRPORT_NOC_SRV"]
46049
+ businessService: businessService !== null && businessService !== void 0 && businessService.code ? [businessService === null || businessService === void 0 ? void 0 : businessService.code] : businessServiceArray
44490
46050
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
44491
46051
  status: applicationStatus
44492
46052
  } : {}),
@@ -44536,6 +46096,279 @@ var useNOCInbox = function useNOCInbox(_ref) {
44536
46096
  });
44537
46097
  };
44538
46098
 
46099
+ var useNOCSearchApplication = function useNOCSearchApplication(tenantId, filters, config) {
46100
+ if (config === void 0) {
46101
+ config = {};
46102
+ }
46103
+
46104
+ return reactQuery.useQuery(["APPLICATION_SEARCH", "NOC_SEARCH", tenantId].concat(Object.entries(filters)), function () {
46105
+ return NOCSearch.all(tenantId, filters);
46106
+ }, config);
46107
+ };
46108
+
46109
+ var WSSearchMdmsTypes = {
46110
+ useWSServicesMasters: function useWSServicesMasters(tenantId) {
46111
+ return reactQuery.useQuery([tenantId, "WS_WS_SERVICES_MASTERS"], function () {
46112
+ return MdmsService.getDataByCriteria(tenantId, {
46113
+ details: {
46114
+ tenantId: tenantId,
46115
+ moduleDetails: [{
46116
+ moduleName: "ws-services-masters",
46117
+ masterDetails: [{
46118
+ name: "Documents"
46119
+ }]
46120
+ }]
46121
+ }
46122
+ }, "ws-services-masters");
46123
+ }, {
46124
+ select: function select(data) {
46125
+ var _data$wsServicesMas, _data$wsServicesMas$D;
46126
+
46127
+ 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) {
46128
+ type.code = type.code;
46129
+ type.i18nKey = type.code ? type.code.replaceAll('.', '_') : "";
46130
+ type.dropdownData.forEach(function (value) {
46131
+ value.i18nKey = value.code ? value.code.replaceAll('.', '_') : "";
46132
+ });
46133
+ });
46134
+ return data !== null && data !== void 0 && data["ws-services-masters"] ? data === null || data === void 0 ? void 0 : data["ws-services-masters"] : [];
46135
+ }
46136
+ });
46137
+ },
46138
+ useWSServicesCalculation: function useWSServicesCalculation(tenantId) {
46139
+ return reactQuery.useQuery([tenantId, "WS_WS_SERVICES_CALCULATION"], function () {
46140
+ return MdmsService.getDataByCriteria(tenantId, {
46141
+ details: {
46142
+ tenantId: tenantId,
46143
+ moduleDetails: [{
46144
+ moduleName: "ws-services-calculation",
46145
+ masterDetails: [{
46146
+ name: "PipeSize"
46147
+ }]
46148
+ }]
46149
+ }
46150
+ }, "ws-services-calculation");
46151
+ }, {
46152
+ select: function select(data) {
46153
+ var _data$wsServicesCal, _data$wsServicesCal$P;
46154
+
46155
+ 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) {
46156
+ type.i18nKey = type.size ? type.size + " Inches" : "";
46157
+ });
46158
+ return data !== null && data !== void 0 && data["ws-services-calculation"] ? data === null || data === void 0 ? void 0 : data["ws-services-calculation"] : [];
46159
+ }
46160
+ });
46161
+ }
46162
+ };
46163
+
46164
+ var usewsTenants = function usewsTenants() {
46165
+ var tenantInfo = Digit.SessionStorage.get("WS_TENANTS");
46166
+
46167
+ var _useState = React.useState(tenantInfo ? tenantInfo : null),
46168
+ tenants = _useState[0];
46169
+
46170
+ return tenants;
46171
+ };
46172
+
46173
+ var getDate = function getDate(epochdate) {
46174
+ return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46175
+ };
46176
+
46177
+ var getAddress = function getAddress(address, t) {
46178
+ 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 : " ");
46179
+ };
46180
+
46181
+ var combineResponse$4 = function combineResponse(WaterConnections, properties, billData, t) {
46182
+ if (WaterConnections && properties) return WaterConnections.map(function (app) {
46183
+ 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;
46184
+
46185
+ return {
46186
+ ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
46187
+ ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
46188
+ return owner === null || owner === void 0 ? void 0 : owner.name;
46189
+ }).join(",") : (_properties$filter$ = properties.filter(function (prop) {
46190
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46191
+ })[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) {
46192
+ return ow.name;
46193
+ }).join(","),
46194
+ Address: getAddress(properties.filter(function (prop) {
46195
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46196
+ })[0].address, t),
46197
+ AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$ = billData.filter(function (bill) {
46198
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46199
+ })[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) {
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$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",
46202
+ DueDate: billData ? getDate(billData === null || billData === void 0 ? void 0 : (_billData$filter$3 = billData.filter(function (bill) {
46203
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46204
+ })[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"
46205
+ };
46206
+ });else return undefined;
46207
+ };
46208
+
46209
+ var useWaterSearch = function useWaterSearch(_ref, config) {
46210
+ var _response$data, _response$data$WaterC, _response$data2, _response$data2$Sewer, _response$data3, _properties$data, _billData$data;
46211
+
46212
+ var tenantId = _ref.tenantId,
46213
+ _ref$filters = _ref.filters,
46214
+ filters = _ref$filters === void 0 ? {} : _ref$filters,
46215
+ _ref$BusinessService = _ref.BusinessService,
46216
+ BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
46217
+ t = _ref.t;
46218
+
46219
+ if (config === void 0) {
46220
+ config = {};
46221
+ }
46222
+
46223
+ var response = reactQuery.useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
46224
+ try {
46225
+ return Promise.resolve(WSService.search({
46226
+ tenantId: tenantId,
46227
+ filters: _extends({}, filters),
46228
+ businessService: BusinessService
46229
+ }));
46230
+ } catch (e) {
46231
+ return Promise.reject(e);
46232
+ }
46233
+ }, config);
46234
+ var propertyids = "";
46235
+ var consumercodes = "";
46236
+ 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) {
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
+ });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) {
46240
+ propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
46241
+ consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
46242
+ });
46243
+ var propertyfilter = {
46244
+ propertyIds: propertyids.substring(0, propertyids.length - 1)
46245
+ };
46246
+ if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
46247
+ config = {
46248
+ enabled: propertyids !== "" ? true : false
46249
+ };
46250
+ var properties = reactQuery.useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
46251
+ try {
46252
+ return Promise.resolve(PTService.search({
46253
+ tenantId: tenantId,
46254
+ filters: propertyfilter,
46255
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true
46256
+ }));
46257
+ } catch (e) {
46258
+ return Promise.reject(e);
46259
+ }
46260
+ }, config);
46261
+ var billData = reactQuery.useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
46262
+ try {
46263
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
46264
+ businessService: BusinessService,
46265
+ consumerCode: consumercodes.substring(0, propertyids.length - 1)
46266
+ }));
46267
+ } catch (e) {
46268
+ return Promise.reject(e);
46269
+ }
46270
+ }, config);
46271
+ 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);
46272
+ };
46273
+
46274
+ var getDate$1 = function getDate(epochdate) {
46275
+ return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46276
+ };
46277
+
46278
+ var getAddress$1 = function getAddress(address, t) {
46279
+ 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 : " ");
46280
+ };
46281
+
46282
+ var combineResponse$5 = function combineResponse(WaterConnections, properties, billData, t) {
46283
+ if (WaterConnections && properties) return WaterConnections.map(function (app) {
46284
+ 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;
46285
+
46286
+ return {
46287
+ ConsumerNumber: app === null || app === void 0 ? void 0 : app.connectionNo,
46288
+ ConsumerName: app !== null && app !== void 0 && app.connectionHolders ? app === null || app === void 0 ? void 0 : app.connectionHolders.map(function (owner) {
46289
+ return owner === null || owner === void 0 ? void 0 : owner.name;
46290
+ }).join(",") : (_properties$filter$ = properties.filter(function (prop) {
46291
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46292
+ })[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) {
46293
+ return ow.name;
46294
+ }).join(","),
46295
+ Address: getAddress$1(properties.filter(function (prop) {
46296
+ return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46297
+ })[0].address, t),
46298
+ AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$0$bi = billData.filter(function (bill) {
46299
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46300
+ })[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) {
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$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",
46303
+ DueDate: billData ? getDate$1(billData === null || billData === void 0 ? void 0 : (_billData$filter$0$bi5 = billData.filter(function (bill) {
46304
+ return (bill === null || bill === void 0 ? void 0 : bill.consumerCode) === (app === null || app === void 0 ? void 0 : app.connectionNo);
46305
+ })[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"
46306
+ };
46307
+ });else return undefined;
46308
+ };
46309
+
46310
+ var useSewarageSearch = function useSewarageSearch(_ref, config) {
46311
+ var _response$data, _response$data$Sewera, _response$data2, _properties$data, _billData$data;
46312
+
46313
+ var tenantId = _ref.tenantId,
46314
+ _ref$filters = _ref.filters,
46315
+ filters = _ref$filters === void 0 ? {} : _ref$filters,
46316
+ _ref$BusinessService = _ref.BusinessService,
46317
+ BusinessService = _ref$BusinessService === void 0 ? "WS" : _ref$BusinessService,
46318
+ t = _ref.t;
46319
+
46320
+ if (config === void 0) {
46321
+ config = {};
46322
+ }
46323
+
46324
+ var response = reactQuery.useQuery(['WS_SEARCH', tenantId, filters, BusinessService], function () {
46325
+ try {
46326
+ return Promise.resolve(WSService.search({
46327
+ tenantId: tenantId,
46328
+ filters: _extends({}, filters),
46329
+ businessService: BusinessService
46330
+ }));
46331
+ } catch (e) {
46332
+ return Promise.reject(e);
46333
+ }
46334
+ }, config);
46335
+ var propertyids = "";
46336
+ var consumercodes = "";
46337
+ 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) {
46338
+ propertyids = propertyids + (item === null || item === void 0 ? void 0 : item.propertyId) + ",";
46339
+ consumercodes = consumercodes + (item === null || item === void 0 ? void 0 : item.connectionNo) + ",";
46340
+ });
46341
+ var propertyfilter = {
46342
+ propertyIds: propertyids.substring(0, propertyids.length - 1)
46343
+ };
46344
+ if (propertyids !== "" && filters !== null && filters !== void 0 && filters.locality) propertyfilter.locality = filters === null || filters === void 0 ? void 0 : filters.locality;
46345
+ config = {
46346
+ enabled: propertyids !== "" ? true : false
46347
+ };
46348
+ var properties = reactQuery.useQuery(['WSP_SEARCH', tenantId, propertyfilter, BusinessService], function () {
46349
+ try {
46350
+ return Promise.resolve(PTService.search({
46351
+ tenantId: tenantId,
46352
+ filters: propertyfilter,
46353
+ auth: filters !== null && filters !== void 0 && filters.locality ? false : true
46354
+ }));
46355
+ } catch (e) {
46356
+ return Promise.reject(e);
46357
+ }
46358
+ }, config);
46359
+ var billData = reactQuery.useQuery(['BILL_SEARCH', tenantId, consumercodes, BusinessService], function () {
46360
+ try {
46361
+ return Promise.resolve(Digit.PaymentService.fetchBill(tenantId, {
46362
+ businessService: BusinessService,
46363
+ consumerCode: consumercodes.substring(0, propertyids.length - 2)
46364
+ }));
46365
+ } catch (e) {
46366
+ return Promise.reject(e);
46367
+ }
46368
+ }, config);
46369
+ 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);
46370
+ };
46371
+
44539
46372
  var pgr = {
44540
46373
  useComplaintDetails: useComplaintDetails,
44541
46374
  useComplaintsList: useComplaintsList,
@@ -44577,11 +46410,13 @@ var fsm = {
44577
46410
  useSlum: useSlum,
44578
46411
  usePaymentHistory: usePaymentHistory
44579
46412
  };
44580
- var pt = {
46413
+ var pt$1 = {
44581
46414
  usePropertySearch: usePropertySearch,
44582
46415
  usePropertyPayment: usePropertyPayment,
44583
46416
  usePropertyMDMS: usePropertyMDMS,
46417
+ usePropertySearchWithDue: usePropertySearchWithDue,
44584
46418
  usePropertyAPI: usePropertyAPI,
46419
+ usePropertyCreateNUpdateAPI: usePropertyCreateNUpdateAPI,
44585
46420
  usePropertyDocumentSearch: usePropertyDocumentSearch,
44586
46421
  useTenants: useTenants$3,
44587
46422
  useApplicationDetail: useApplicationDetail$1,
@@ -44590,7 +46425,9 @@ var pt = {
44590
46425
  usePropertyAssessment: usePropertyAssessment,
44591
46426
  usePtCalculationEstimate: usePtCalculationEstimate,
44592
46427
  useGenderMDMS: useGenderMDMS,
44593
- usePTGenderMDMS: usePTGenderMDMS
46428
+ usePTGenderMDMS: usePTGenderMDMS,
46429
+ useMyPropertyPayments: useMyPropertyPayments,
46430
+ useGenericViewProperty: useGenericViewProperty
44594
46431
  };
44595
46432
  var dss = {
44596
46433
  useMDMS: useDssMDMS,
@@ -44694,7 +46531,14 @@ var survey = {
44694
46531
  var noc = {
44695
46532
  useNOCDetails: useNOCDetails,
44696
46533
  useNOCApplicationActions: useNOCApplicationActions,
44697
- useInbox: useNOCInbox
46534
+ useInbox: useNOCInbox,
46535
+ useNOCSearchApplication: useNOCSearchApplication
46536
+ };
46537
+ var ws = {
46538
+ WSSearchMdmsTypes: WSSearchMdmsTypes,
46539
+ usewsTenants: usewsTenants,
46540
+ useWaterSearch: useWaterSearch,
46541
+ useSewarageSearch: useSewarageSearch
44698
46542
  };
44699
46543
  var Hooks = {
44700
46544
  useSessionStorage: useSessionStorage,
@@ -44726,7 +46570,7 @@ var Hooks = {
44726
46570
  useInbox: useTLInbox,
44727
46571
  pgr: pgr,
44728
46572
  fsm: fsm,
44729
- pt: pt,
46573
+ pt: pt$1,
44730
46574
  dss: dss,
44731
46575
  mcollect: mcollect,
44732
46576
  hrms: hrms,
@@ -44736,7 +46580,8 @@ var Hooks = {
44736
46580
  events: events,
44737
46581
  engagement: engagement,
44738
46582
  survey: survey,
44739
- noc: noc
46583
+ noc: noc,
46584
+ ws: ws
44740
46585
  };
44741
46586
 
44742
46587
  var checkWebview = function checkWebview() {
@@ -44753,7 +46598,6 @@ var mobileCheck = function mobileCheck() {
44753
46598
  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;
44754
46599
  })(navigator.userAgent || navigator.vendor || window.opera);
44755
46600
 
44756
- console.debug("check", check);
44757
46601
  return check;
44758
46602
  };
44759
46603
 
@@ -44762,7 +46606,7 @@ var BrowserUtil = {
44762
46606
  isMobile: mobileCheck
44763
46607
  };
44764
46608
 
44765
- function getDate(timestamp) {
46609
+ function getDate$2(timestamp) {
44766
46610
  var dt = timestamp ? new Date(timestamp) : new Date();
44767
46611
  var dd = dt.getDate();
44768
46612
  var mm = dt.getMonth() + 1;
@@ -44783,7 +46627,7 @@ var monthNames = ["Jan", "Feb", "March", "Apr", "May", "June", "July", "Aug", "S
44783
46627
 
44784
46628
  var date = {
44785
46629
  __proto__: null,
44786
- getDate: getDate,
46630
+ getDate: getDate$2,
44787
46631
  monthNames: monthNames
44788
46632
  };
44789
46633
 
@@ -44792,12 +46636,15 @@ var amountFormatter = function amountFormatter(value, denomination) {
44792
46636
  currency: "INR"
44793
46637
  });
44794
46638
 
46639
+ var _useTranslation = reactI18next.useTranslation(),
46640
+ t = _useTranslation.t;
46641
+
44795
46642
  switch (denomination) {
44796
46643
  case "Lac":
44797
- return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + " Lac";
46644
+ return "\u20B9 " + currencyFormatter.format((value / 100000).toFixed(2) || 0) + " " + t("ES_DSS_LAC");
44798
46645
 
44799
46646
  case "Cr":
44800
- return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + " Cr";
46647
+ return "\u20B9 " + currencyFormatter.format((value / 10000000).toFixed(2) || 0) + " " + t("ES_DSS_CR");
44801
46648
 
44802
46649
  case "Unit":
44803
46650
  return "\u20B9 " + currencyFormatter.format((value === null || value === void 0 ? void 0 : value.toFixed(2)) || 0);
@@ -44818,6 +46665,9 @@ var formatter = function formatter(value, symbol, unit, commaSeparated) {
44818
46665
  case "amount":
44819
46666
  return amountFormatter(value, unit);
44820
46667
 
46668
+ case "Amount":
46669
+ return amountFormatter(value, unit);
46670
+
44821
46671
  case "number":
44822
46672
  if (!commaSeparated) {
44823
46673
  return parseInt(value);
@@ -44863,12 +46713,57 @@ var getInitialRange = function getInitialRange() {
44863
46713
  duration: duration
44864
46714
  };
44865
46715
  };
46716
+ var getDefaultFinacialYear = function getDefaultFinacialYear() {
46717
+ var currDate = new Date().getMonth();
46718
+
46719
+ if (currDate < 3) {
46720
+ return {
46721
+ startDate: dateFns.subYears(dateFns.addMonths(dateFns.startOfYear(new Date()), 3), 1),
46722
+ endDate: dateFns.endOfToday(new Date())
46723
+ };
46724
+ } else {
46725
+ return {
46726
+ startDate: dateFns.addMonths(dateFns.startOfYear(new Date()), 3),
46727
+ endDate: dateFns.endOfToday(new Date())
46728
+ };
46729
+ }
46730
+ };
46731
+ var getCurrentModuleName = function getCurrentModuleName() {
46732
+ var allPaths = window.location.pathname.split('/');
46733
+ return allPaths[allPaths.length - 1];
46734
+ };
46735
+ var checkSelected = function checkSelected(e, selectedDDRs) {
46736
+ if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
46737
+ return true;
46738
+ } else if (selectedDDRs.find(function (ddr) {
46739
+ return ddr.ddrKey == e.ddrKey;
46740
+ })) {
46741
+ return true;
46742
+ } else {
46743
+ return false;
46744
+ }
46745
+ };
46746
+ var getCitiesAvailable = function getCitiesAvailable(e, selectedDDRs) {
46747
+ if (!selectedDDRs || (selectedDDRs === null || selectedDDRs === void 0 ? void 0 : selectedDDRs.length) == 0) {
46748
+ return true;
46749
+ } else if (selectedDDRs.find(function (ddr) {
46750
+ return ddr == e.ddrKey;
46751
+ })) {
46752
+ return true;
46753
+ } else {
46754
+ return false;
46755
+ }
46756
+ };
44866
46757
 
44867
46758
  var dss$1 = {
44868
46759
  __proto__: null,
44869
46760
  formatter: formatter,
44870
46761
  getDuration: getDuration,
44871
- getInitialRange: getInitialRange
46762
+ getInitialRange: getInitialRange,
46763
+ getDefaultFinacialYear: getDefaultFinacialYear,
46764
+ getCurrentModuleName: getCurrentModuleName,
46765
+ checkSelected: checkSelected,
46766
+ getCitiesAvailable: getCitiesAvailable
44872
46767
  };
44873
46768
 
44874
46769
  var getLocalityCode = function getLocalityCode(locality, tenantId) {
@@ -44877,7 +46772,7 @@ var getLocalityCode = function getLocalityCode(locality, tenantId) {
44877
46772
  var getRevenueLocalityCode = function getRevenueLocalityCode(locality, tenantId) {
44878
46773
  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;
44879
46774
  };
44880
- var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
46775
+ var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
44881
46776
  if (str === void 0) {
44882
46777
  str = "";
44883
46778
  }
@@ -44898,21 +46793,21 @@ var stringReplaceAll$2 = function stringReplaceAll(str, searcher, replaceWith) {
44898
46793
 
44899
46794
  return str;
44900
46795
  };
44901
- var checkForNotNull = function checkForNotNull(value) {
46796
+ var checkForNotNull$1 = function checkForNotNull(value) {
44902
46797
  if (value === void 0) {
44903
46798
  value = "";
44904
46799
  }
44905
46800
 
44906
46801
  return value && value != null && value != undefined && value != "" ? true : false;
44907
46802
  };
44908
- var convertDotValues = function convertDotValues(value) {
46803
+ var convertDotValues$1 = function convertDotValues(value) {
44909
46804
  if (value === void 0) {
44910
46805
  value = "";
44911
46806
  }
44912
46807
 
44913
- return checkForNotNull(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$2(value, ".", "_")) || "NA";
46808
+ return checkForNotNull$1(value) && (value.replaceAll && value.replaceAll(".", "_") || value.replace && stringReplaceAll$3(value, ".", "_")) || "NA";
44914
46809
  };
44915
- var convertToLocale = function convertToLocale(value, key) {
46810
+ var convertToLocale$1 = function convertToLocale(value, key) {
44916
46811
  var _convertDotValues;
44917
46812
 
44918
46813
  if (value === void 0) {
@@ -44923,7 +46818,7 @@ var convertToLocale = function convertToLocale(value, key) {
44923
46818
  key = "";
44924
46819
  }
44925
46820
 
44926
- var convertedValue = (_convertDotValues = convertDotValues(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
46821
+ var convertedValue = (_convertDotValues = convertDotValues$1(value)) === null || _convertDotValues === void 0 ? void 0 : _convertDotValues.toUpperCase();
44927
46822
 
44928
46823
  if (convertedValue == "NA") {
44929
46824
  return "COMMON_NA";
@@ -44931,7 +46826,7 @@ var convertToLocale = function convertToLocale(value, key) {
44931
46826
 
44932
46827
  return key + "_" + convertedValue;
44933
46828
  };
44934
- var getMohallaLocale = function getMohallaLocale(value, tenantId) {
46829
+ var getMohallaLocale$1 = function getMohallaLocale(value, tenantId) {
44935
46830
  if (value === void 0) {
44936
46831
  value = "";
44937
46832
  }
@@ -44940,28 +46835,28 @@ var getMohallaLocale = function getMohallaLocale(value, tenantId) {
44940
46835
  tenantId = "";
44941
46836
  }
44942
46837
 
44943
- var convertedValue = convertDotValues(tenantId);
46838
+ var convertedValue = convertDotValues$1(tenantId);
44944
46839
 
44945
- if (convertedValue == "NA" || !checkForNotNull(value)) {
46840
+ if (convertedValue == "NA" || !checkForNotNull$1(value)) {
44946
46841
  return "COMMON_NA";
44947
46842
  }
44948
46843
 
44949
46844
  convertedValue = convertedValue.toUpperCase();
44950
- return convertToLocale(value, convertedValue + "_REVENUE");
46845
+ return convertToLocale$1(value, convertedValue + "_REVENUE");
44951
46846
  };
44952
- var getCityLocale = function getCityLocale(value) {
46847
+ var getCityLocale$1 = function getCityLocale(value) {
44953
46848
  if (value === void 0) {
44954
46849
  value = "";
44955
46850
  }
44956
46851
 
44957
- var convertedValue = convertDotValues(value);
46852
+ var convertedValue = convertDotValues$1(value);
44958
46853
 
44959
- if (convertedValue == "NA" || !checkForNotNull(value)) {
46854
+ if (convertedValue == "NA" || !checkForNotNull$1(value)) {
44960
46855
  return "COMMON_NA";
44961
46856
  }
44962
46857
 
44963
46858
  convertedValue = convertedValue.toUpperCase();
44964
- return convertToLocale(convertedValue, "TENANT_TENANTS");
46859
+ return convertToLocale$1(convertedValue, "TENANT_TENANTS");
44965
46860
  };
44966
46861
  var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44967
46862
  if (dropdownValues === void 0) {
@@ -44973,7 +46868,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44973
46868
  }
44974
46869
 
44975
46870
  return dropdownValues.map(function (ele) {
44976
- ele["i18text"] = convertToLocale(ele.code, key);
46871
+ ele["i18text"] = convertToLocale$1(ele.code, key);
44977
46872
 
44978
46873
  if (t) {
44979
46874
  ele["i18text"] = t(ele["i18text"]);
@@ -44982,18 +46877,26 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
44982
46877
  return ele;
44983
46878
  });
44984
46879
  };
46880
+ var getTransformedLocale$1 = function getTransformedLocale(label) {
46881
+ var _label;
46882
+
46883
+ if (typeof label === "number") return label;
46884
+ label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
46885
+ return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
46886
+ };
44985
46887
 
44986
46888
  var locale = {
44987
46889
  __proto__: null,
44988
46890
  getLocalityCode: getLocalityCode,
44989
46891
  getRevenueLocalityCode: getRevenueLocalityCode,
44990
- stringReplaceAll: stringReplaceAll$2,
44991
- checkForNotNull: checkForNotNull,
44992
- convertDotValues: convertDotValues,
44993
- convertToLocale: convertToLocale,
44994
- getMohallaLocale: getMohallaLocale,
44995
- getCityLocale: getCityLocale,
44996
- convertToLocaleData: convertToLocaleData
46892
+ stringReplaceAll: stringReplaceAll$3,
46893
+ checkForNotNull: checkForNotNull$1,
46894
+ convertDotValues: convertDotValues$1,
46895
+ convertToLocale: convertToLocale$1,
46896
+ getMohallaLocale: getMohallaLocale$1,
46897
+ getCityLocale: getCityLocale$1,
46898
+ convertToLocaleData: convertToLocaleData,
46899
+ getTransformedLocale: getTransformedLocale$1
44997
46900
  };
44998
46901
 
44999
46902
  var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
@@ -45079,7 +46982,6 @@ function getBase64Image(tenantId) {
45079
46982
  ctx.drawImage(img, 0, 0);
45080
46983
  return canvas.toDataURL("image/png");
45081
46984
  } catch (e) {
45082
- console.error("asd", e);
45083
46985
  return "";
45084
46986
  }
45085
46987
  }
@@ -45402,20 +47304,46 @@ var downloadPdf = function downloadPdf(blob, fileName) {
45402
47304
  }
45403
47305
  };
45404
47306
 
45405
- var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey) {
47307
+ var downloadReceipt = function downloadReceipt(consumerCode, businessService, pdfKey, tenantId, receiptNumber) {
45406
47308
  if (pdfKey === void 0) {
45407
47309
  pdfKey = "consolidatedreceipt";
45408
47310
  }
45409
47311
 
47312
+ if (receiptNumber === void 0) {
47313
+ receiptNumber = null;
47314
+ }
47315
+
47316
+ try {
47317
+ if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
47318
+ return Promise.resolve(Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey, receiptNumber)).then(function (response) {
47319
+ var responseStatus = parseInt(response.status, 10);
47320
+
47321
+ if (responseStatus === 201 || responseStatus === 200) {
47322
+ var filename = receiptNumber ? "receiptNumber-" + receiptNumber + ".pdf" : "consumer-" + consumerCode + ".pdf";
47323
+ downloadPdf(new Blob([response.data], {
47324
+ type: "application/pdf"
47325
+ }), filename);
47326
+ }
47327
+ });
47328
+ } catch (e) {
47329
+ return Promise.reject(e);
47330
+ }
47331
+ };
47332
+ var downloadBill = function downloadBill(consumerCode, businessService, pdfKey, tenantId) {
47333
+ if (pdfKey === void 0) {
47334
+ pdfKey = "consolidatedbill";
47335
+ }
47336
+
45410
47337
  try {
45411
- var tenantId = Digit.ULBService.getCurrentTenantId();
45412
- return Promise.resolve(Digit.ReceiptsService.receipt_download(businessService, consumerCode, tenantId, pdfKey)).then(function (response) {
47338
+ if (tenantId === undefined) tenantId = Digit.ULBService.getCurrentTenantId();
47339
+ return Promise.resolve(Digit.ReceiptsService.bill_download(businessService, consumerCode, tenantId, pdfKey)).then(function (response) {
45413
47340
  var responseStatus = parseInt(response.status, 10);
45414
47341
 
45415
47342
  if (responseStatus === 201 || responseStatus === 200) {
47343
+ var filename = consumerCode ? "consumerCode-" + consumerCode + ".pdf" : "consumer-" + consumerCode + ".pdf";
45416
47344
  downloadPdf(new Blob([response.data], {
45417
47345
  type: "application/pdf"
45418
- }), "consumer-" + consumerCode + ".pdf");
47346
+ }), filename);
45419
47347
  }
45420
47348
  });
45421
47349
  } catch (e) {
@@ -45586,6 +47514,12 @@ var getPattern = function getPattern(type) {
45586
47514
  }
45587
47515
  };
45588
47516
 
47517
+ var getUnique$1 = function getUnique(arr) {
47518
+ return arr.filter(function (value, index, self) {
47519
+ return self.indexOf(value) === index;
47520
+ });
47521
+ };
47522
+
45589
47523
  var getStaticMapUrl = function getStaticMapUrl(latitude, longitude) {
45590
47524
  var _globalConfigs;
45591
47525
 
@@ -45612,19 +47546,21 @@ var routeSubscription = function routeSubscription(pathname) {
45612
47546
  };
45613
47547
 
45614
47548
  var didEmployeeHasRole = function didEmployeeHasRole(role) {
45615
- var _userInfo$info;
47549
+ var _userInfo$info, _userInfo$info$roles;
45616
47550
 
45617
47551
  var tenantId = Digit.ULBService.getCurrentTenantId();
45618
47552
  var userInfo = Digit.UserService.getUser();
45619
- 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) {
47553
+ 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) {
45620
47554
  if (item.code == role && item.tenantId === tenantId) return true;
45621
47555
  });
45622
47556
  return rolearray === null || rolearray === void 0 ? void 0 : rolearray.length;
45623
47557
  };
45624
47558
 
45625
47559
  var pgrAccess = function pgrAccess() {
47560
+ var _userInfo$info2, _userInfo$info2$roles;
47561
+
45626
47562
  var userInfo = Digit.UserService.getUser();
45627
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47563
+ 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) {
45628
47564
  return roleData.code;
45629
47565
  });
45630
47566
  var pgrRoles = ["PGR_LME", "PGR-ADMIN", "CSR", "CEMP", "FEMP", "DGRO", "ULB Operator", "GRO", "GO", "RO", "GA"];
@@ -45635,8 +47571,10 @@ var pgrAccess = function pgrAccess() {
45635
47571
  };
45636
47572
 
45637
47573
  var fsmAccess = function fsmAccess() {
47574
+ var _userInfo$info3, _userInfo$info3$roles;
47575
+
45638
47576
  var userInfo = Digit.UserService.getUser();
45639
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47577
+ 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) {
45640
47578
  return roleData.code;
45641
47579
  });
45642
47580
  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"];
@@ -45647,8 +47585,10 @@ var fsmAccess = function fsmAccess() {
45647
47585
  };
45648
47586
 
45649
47587
  var NOCAccess = function NOCAccess() {
47588
+ var _userInfo$info4, _userInfo$info4$roles;
47589
+
45650
47590
  var userInfo = Digit.UserService.getUser();
45651
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47591
+ 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) {
45652
47592
  return roleData.code;
45653
47593
  });
45654
47594
  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"];
@@ -45659,8 +47599,10 @@ var NOCAccess = function NOCAccess() {
45659
47599
  };
45660
47600
 
45661
47601
  var BPAREGAccess = function BPAREGAccess() {
47602
+ var _userInfo$info5, _userInfo$info5$roles;
47603
+
45662
47604
  var userInfo = Digit.UserService.getUser();
45663
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47605
+ 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) {
45664
47606
  return roleData.code;
45665
47607
  });
45666
47608
  var BPAREG_ROLES = ["BPAREG_APPROVER", "BPAREG_DOC_VERIFIER"];
@@ -45671,8 +47613,10 @@ var BPAREGAccess = function BPAREGAccess() {
45671
47613
  };
45672
47614
 
45673
47615
  var BPAAccess = function BPAAccess() {
47616
+ var _userInfo$info6, _userInfo$info6$roles;
47617
+
45674
47618
  var userInfo = Digit.UserService.getUser();
45675
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47619
+ 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) {
45676
47620
  return roleData.code;
45677
47621
  });
45678
47622
  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"];
@@ -45683,8 +47627,10 @@ var BPAAccess = function BPAAccess() {
45683
47627
  };
45684
47628
 
45685
47629
  var ptAccess = function ptAccess() {
47630
+ var _userInfo$info7, _userInfo$info7$roles;
47631
+
45686
47632
  var userInfo = Digit.UserService.getUser();
45687
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47633
+ 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) {
45688
47634
  return roleData.code;
45689
47635
  });
45690
47636
  var ptRoles = ["PT_APPROVER", "PT_CEMP", "PT_DOC_VERIFIER", "PT_FIELD_INSPECTOR"];
@@ -45695,8 +47641,10 @@ var ptAccess = function ptAccess() {
45695
47641
  };
45696
47642
 
45697
47643
  var tlAccess = function tlAccess() {
47644
+ var _userInfo$info8, _userInfo$info8$roles;
47645
+
45698
47646
  var userInfo = Digit.UserService.getUser();
45699
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47647
+ 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) {
45700
47648
  return roleData.code;
45701
47649
  });
45702
47650
  var tlRoles = ["TL_CEMP", "TL_APPROVER", "TL_FIELD_INSPECTOR", "TL_DOC_VERIFIER"];
@@ -45707,8 +47655,10 @@ var tlAccess = function tlAccess() {
45707
47655
  };
45708
47656
 
45709
47657
  var mCollectAccess = function mCollectAccess() {
47658
+ var _userInfo$info9, _userInfo$info9$roles;
47659
+
45710
47660
  var userInfo = Digit.UserService.getUser();
45711
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47661
+ 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) {
45712
47662
  return roleData.code;
45713
47663
  });
45714
47664
  var mCollectRoles = ["UC_EMP"];
@@ -45719,8 +47669,10 @@ var mCollectAccess = function mCollectAccess() {
45719
47669
  };
45720
47670
 
45721
47671
  var receiptsAccess = function receiptsAccess() {
47672
+ var _userInfo$info10, _userInfo$info10$role;
47673
+
45722
47674
  var userInfo = Digit.UserService.getUser();
45723
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47675
+ 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) {
45724
47676
  return roleData.code;
45725
47677
  });
45726
47678
  var receiptsRoles = ["CR_PT"];
@@ -45733,8 +47685,10 @@ var receiptsAccess = function receiptsAccess() {
45733
47685
  var hrmsRoles = ["HRMS_ADMIN"];
45734
47686
 
45735
47687
  var hrmsAccess = function hrmsAccess() {
47688
+ var _userInfo$info11, _userInfo$info11$role;
47689
+
45736
47690
  var userInfo = Digit.UserService.getUser();
45737
- var userRoles = userInfo === null || userInfo === void 0 ? void 0 : userInfo.info.roles.map(function (roleData) {
47691
+ 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) {
45738
47692
  return roleData.code;
45739
47693
  });
45740
47694
  var HRMS_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
@@ -45746,6 +47700,7 @@ var hrmsAccess = function hrmsAccess() {
45746
47700
  var Utils = {
45747
47701
  pdf: PDFUtil,
45748
47702
  downloadReceipt: downloadReceipt,
47703
+ downloadBill: downloadBill,
45749
47704
  downloadPDFFromLink: downloadPDFFromLink,
45750
47705
  getFileUrl: getFileUrl,
45751
47706
  getFileTypeFromFileStoreURL: getFileTypeFromFileStoreURL,
@@ -45762,6 +47717,7 @@ var Utils = {
45762
47717
  BPAAccess: BPAAccess,
45763
47718
  dss: dss$1,
45764
47719
  obps: obps$1,
47720
+ pt: pt,
45765
47721
  ptAccess: ptAccess,
45766
47722
  NOCAccess: NOCAccess,
45767
47723
  mCollectAccess: mCollectAccess,
@@ -45770,6 +47726,7 @@ var Utils = {
45770
47726
  hrmsAccess: hrmsAccess,
45771
47727
  getPattern: getPattern,
45772
47728
  hrmsRoles: hrmsRoles,
47729
+ getUnique: getUnique$1,
45773
47730
  tlAccess: tlAccess
45774
47731
  };
45775
47732
 
@@ -45833,7 +47790,6 @@ var SubformRegistry = function SubformRegistry(registry) {
45833
47790
  var element = middlewares.filter(function (e) {
45834
47791
  return Object.keys(e)[0] === preceedingName;
45835
47792
  })[0] || null;
45836
- if (!element) console.error("no middleware with " + preceedingName + " found in " + key + " subForm ");
45837
47793
  }
45838
47794
  };
45839
47795
 
@@ -45902,6 +47858,7 @@ var initLibraries = function initLibraries() {
45902
47858
  setupLibraries("ComponentRegistryService", ComponentRegistryService);
45903
47859
  setupLibraries("StoreData", StoreData);
45904
47860
  setupLibraries("EventsServices", Events);
47861
+ setupLibraries("WSService", WSService);
45905
47862
  setupLibraries("InboxGeneral", InboxGeneral);
45906
47863
  setupLibraries("ShareFiles", ShareFiles);
45907
47864
  setupLibraries("Contexts", Contexts);