@egovernments/digit-ui-libraries 1.4.0-beta2 → 1.5.0-alpha.2

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