@egovernments/digit-ui-libraries 1.5.2 → 1.5.5-fsm.1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ require('date-fns/esm');
16
16
  var reactRouterDom = require('react-router-dom');
17
17
 
18
18
  function _extends() {
19
- _extends = Object.assign || function (target) {
19
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
20
20
  for (var i = 1; i < arguments.length; i++) {
21
21
  var source = arguments[i];
22
22
 
@@ -29,7 +29,6 @@ function _extends() {
29
29
 
30
30
  return target;
31
31
  };
32
-
33
32
  return _extends.apply(this, arguments);
34
33
  }
35
34
 
@@ -327,7 +326,8 @@ var Urls = {
327
326
  audit: "/fsm/v1/_audit",
328
327
  vehicleTripSearch: "/vehicle/trip/v1/_search",
329
328
  billingSlabSearch: "/fsm-calculator/v1/billingSlab/_search",
330
- vehilceUpdate: "/vehicle/trip/v1/_update"
329
+ vehilceUpdate: "/vehicle/trip/v1/_update",
330
+ vehicleTripCreate: "/vehicle/trip/v1/_create"
331
331
  },
332
332
  payment: {
333
333
  fetch_bill: "/billing-service/bill/v2/_fetchbill",
@@ -811,7 +811,7 @@ var getSetting = function getSetting(serviceName, moduleName) {
811
811
  });
812
812
  var responseSetting = {
813
813
  cacheTimeInSecs: serviceSetting.cacheTimeInSecs,
814
- debounceTimeInMS: serviceSetting.cacheTimeInSecs || 100
814
+ debounceTimeInMS: serviceSetting.debounceTimeInMS || 100
815
815
  };
816
816
 
817
817
  if (!moduleName) {
@@ -1847,6 +1847,22 @@ var getFSMTripNumberCriteria = function getFSMTripNumberCriteria(tenantId, modul
1847
1847
  };
1848
1848
  };
1849
1849
 
1850
+ var getFSMReceivedPaymentTypeCriteria = function getFSMReceivedPaymentTypeCriteria(tenantId, moduleCode, type) {
1851
+ return {
1852
+ type: type,
1853
+ details: {
1854
+ tenantId: tenantId,
1855
+ moduleDetails: [{
1856
+ moduleName: moduleCode,
1857
+ masterDetails: [{
1858
+ name: "ReceivedPaymentType",
1859
+ filter: null
1860
+ }]
1861
+ }]
1862
+ }
1863
+ };
1864
+ };
1865
+
1850
1866
  var GetEgovLocations = function GetEgovLocations(MdmsRes) {
1851
1867
  return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map(function (obj) {
1852
1868
  return {
@@ -2191,6 +2207,16 @@ var GetTripNumber = function GetTripNumber(MdmsRes) {
2191
2207
  });
2192
2208
  };
2193
2209
 
2210
+ var GetReceivedPaymentType = function GetReceivedPaymentType(MdmsRes) {
2211
+ return MdmsRes["FSM"].ReceivedPaymentType.filter(function (option) {
2212
+ return option.active;
2213
+ }).map(function (reasonDetails) {
2214
+ return _extends({}, reasonDetails, {
2215
+ i18nKey: "ES_ACTION_" + reasonDetails.code
2216
+ });
2217
+ });
2218
+ };
2219
+
2194
2220
  var getDssDashboard = function getDssDashboard(MdmsRes) {
2195
2221
  return MdmsRes["dss-dashboard"]["dashboard-config"];
2196
2222
  };
@@ -2357,6 +2383,9 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2357
2383
  case "TripNumber":
2358
2384
  return GetTripNumber(MdmsRes);
2359
2385
 
2386
+ case "ReceivedPaymentType":
2387
+ return GetReceivedPaymentType(MdmsRes);
2388
+
2360
2389
  default:
2361
2390
  return MdmsRes;
2362
2391
  }
@@ -2660,6 +2689,9 @@ var MdmsService = {
2660
2689
  },
2661
2690
  getFSMTripNumber: function getFSMTripNumber(tenantId, moduleCode, type) {
2662
2691
  return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode);
2692
+ },
2693
+ getFSMReceivedPaymentType: function getFSMReceivedPaymentType(tenantId, moduleCode, type) {
2694
+ return MdmsService.getDataByCriteria(tenantId, getFSMReceivedPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode);
2663
2695
  }
2664
2696
  };
2665
2697
 
@@ -3306,6 +3338,16 @@ var FSMService = {
3306
3338
  method: "POST",
3307
3339
  auth: true
3308
3340
  });
3341
+ },
3342
+ vehicleTripCreate: function vehicleTripCreate(details) {
3343
+ return Request({
3344
+ url: Urls.fsm.vehicleTripCreate,
3345
+ data: details,
3346
+ useCache: false,
3347
+ userService: true,
3348
+ method: "POST",
3349
+ auth: true
3350
+ });
3309
3351
  }
3310
3352
  };
3311
3353
 
@@ -36040,6 +36082,22 @@ var makeCommentsSubsidariesOfPreviousActions = function makeCommentsSubsidariesO
36040
36082
  }
36041
36083
  };
36042
36084
 
36085
+ var getAssignerDetails = function getAssignerDetails(instance, nextStep, moduleCode) {
36086
+ var assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36087
+
36088
+ if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE") {
36089
+ if (instance.state.applicationStatus === "CREATED") {
36090
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36091
+ } else {
36092
+ assigner = (nextStep === null || nextStep === void 0 ? void 0 : nextStep.assigner) || (instance === null || instance === void 0 ? void 0 : instance.assigner);
36093
+ }
36094
+ } else {
36095
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36096
+ }
36097
+
36098
+ return assigner;
36099
+ };
36100
+
36043
36101
  var WorkflowService = {
36044
36102
  init: function init(stateCode, businessServices) {
36045
36103
  return Request({
@@ -36168,6 +36226,10 @@ var WorkflowService = {
36168
36226
  return [].concat(acc, el.roles);
36169
36227
  }, []), _extends2));
36170
36228
  })) === null || _businessServiceRespo === void 0 ? void 0 : _businessServiceRespo[0];
36229
+ var action_newVehicle = [{
36230
+ action: "READY_FOR_DISPOSAL",
36231
+ roles: "FSM_EMP_FSTPO,FSM_EMP_FSTPO"
36232
+ }];
36171
36233
  var actionRolePair = nextActions === null || nextActions === void 0 ? void 0 : nextActions.map(function (action) {
36172
36234
  var _action$state, _action$state$actions;
36173
36235
 
@@ -36184,7 +36246,7 @@ var WorkflowService = {
36184
36246
  function _temp18() {
36185
36247
  var _workflow$ProcessInst, _workflow$ProcessInst2;
36186
36248
 
36187
- var nextActions = actionRolePair;
36249
+ var nextActions = location.pathname.includes("new-vehicle-entry") ? action_newVehicle : actionRolePair;
36188
36250
 
36189
36251
  if (role !== "CITIZEN" && moduleCode === "PGR") {
36190
36252
  var _timeline;
@@ -36219,7 +36281,7 @@ var WorkflowService = {
36219
36281
  performedAction: instance.action,
36220
36282
  status: instance.state.applicationStatus,
36221
36283
  state: instance.state.state,
36222
- assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36284
+ assigner: getAssignerDetails(instance, TLEnrichedWithWorflowData[ind - 1], moduleCode),
36223
36285
  rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36224
36286
  wfComment: instance === null || instance === void 0 ? void 0 : instance.wfComments.map(function (e) {
36225
36287
  return e === null || e === void 0 ? void 0 : e.comment;
@@ -36253,7 +36315,7 @@ var WorkflowService = {
36253
36315
  if (getTripData) {
36254
36316
  var _temp21 = _catch(function () {
36255
36317
  var filters = {
36256
- businessService: 'FSM_VEHICLE_TRIP',
36318
+ businessService: "FSM_VEHICLE_TRIP",
36257
36319
  refernceNos: id
36258
36320
  };
36259
36321
  return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
@@ -41083,6 +41145,12 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
41083
41145
  }, queryConfig);
41084
41146
  };
41085
41147
 
41148
+ var useReceivedPaymentType = function useReceivedPaymentType() {
41149
+ return reactQuery.useQuery("FSM_RECEIVED_PAYMENT_TYPE", function () {
41150
+ return MdmsService.getFSMReceivedPaymentType(tenantId, moduleCode, type);
41151
+ }, queryConfig);
41152
+ };
41153
+
41086
41154
  switch (type) {
41087
41155
  case "SanitationType":
41088
41156
  return useSanitationType();
@@ -41138,6 +41206,9 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
41138
41206
  case "TripNumber":
41139
41207
  return useTripNumber();
41140
41208
 
41209
+ case "ReceivedPaymentType":
41210
+ return useReceivedPaymentType();
41211
+
41141
41212
  default:
41142
41213
  return null;
41143
41214
  }
@@ -41255,6 +41326,8 @@ var Search = {
41255
41326
  var dsoDetails = {};
41256
41327
  var vehicle = {};
41257
41328
  return Promise.resolve(Search.application(tenantId, filter)).then(function (response) {
41329
+ var _response$additionalD;
41330
+
41258
41331
  function _temp4() {
41259
41332
  function _temp2() {
41260
41333
  var slumName = slumLabel ? slumLabel.i18nKey : "N/A";
@@ -41375,6 +41448,9 @@ var Search = {
41375
41448
  }, {
41376
41449
  title: "ES_APPLICATION_DETAILS_POSSIBLE_SERVICE_DATE",
41377
41450
  value: displayServiceDate(response === null || response === void 0 ? void 0 : response.possibleServiceDate) || "N/A"
41451
+ }, {
41452
+ title: "ES_APPLICATION_DETAILS_AMOUNT_RECEIVED",
41453
+ value: receivedPayment || "N/A"
41378
41454
  }]
41379
41455
  }];
41380
41456
 
@@ -41460,6 +41536,8 @@ var Search = {
41460
41536
  return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
41461
41537
  }
41462
41538
 
41539
+ var receivedPayment = response === null || response === void 0 ? void 0 : (_response$additionalD = response.additionalDetails) === null || _response$additionalD === void 0 ? void 0 : _response$additionalD.receivedPayment;
41540
+
41463
41541
  var _temp3 = function () {
41464
41542
  if (response !== null && response !== void 0 && response.dsoId) {
41465
41543
  var dsoFilters = {
@@ -41591,6 +41669,12 @@ var useVehicleUpdate = function useVehicleUpdate() {
41591
41669
  });
41592
41670
  };
41593
41671
 
41672
+ var useVehicleTripCreate = function useVehicleTripCreate() {
41673
+ return reactQuery.useMutation(function (details) {
41674
+ return FSMService.vehicleTripCreate(details);
41675
+ });
41676
+ };
41677
+
41594
41678
  var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID) {
41595
41679
  var _filters$applicationS, _filters$locality, _filters$uuid;
41596
41680
 
@@ -44430,7 +44514,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44430
44514
  }
44431
44515
 
44432
44516
  var useReceiptsBusinessServices = function useReceiptsBusinessServices() {
44433
- var _data$;
44517
+ var _data;
44434
44518
 
44435
44519
  var _useQuery = reactQuery.useQuery(["RECEIPTS_SERVICES", tenantId], function () {
44436
44520
  return MdmsService.getReceiptKey(tenantId, 'common-masters');
@@ -44439,7 +44523,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44439
44523
  error = _useQuery.error,
44440
44524
  data = _useQuery.data;
44441
44525
 
44442
- if (!isLoading && data && data["common-masters"] && (_data$ = data["common-masters"]) !== null && _data$ !== void 0 && _data$.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44526
+ if (!isLoading && data && data["common-masters"] && (_data = data["common-masters"]) !== null && _data !== void 0 && _data.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44443
44527
  data["common-masters"].uiCommonPay = data["common-masters"].uiCommonPay.filter(function (unit) {
44444
44528
  return unit.cancelReceipt;
44445
44529
  }) || [];
@@ -44462,7 +44546,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44462
44546
  };
44463
44547
 
44464
44548
  var useCancelReceiptReason = function useCancelReceiptReason() {
44465
- var _data$2;
44549
+ var _data2;
44466
44550
 
44467
44551
  var _useQuery2 = reactQuery.useQuery(["RECEIPTS_CANCEL_REASON", tenantId], function () {
44468
44552
  return MdmsService.getCancelReceiptReason(tenantId, 'common-masters');
@@ -44471,7 +44555,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44471
44555
  error = _useQuery2.error,
44472
44556
  data = _useQuery2.data;
44473
44557
 
44474
- if (!isLoading && data && data["common-masters"] && (_data$2 = data["common-masters"]) !== null && _data$2 !== void 0 && _data$2.CancelReceiptReason && Array.isArray(data["common-masters"].CancelReceiptReason)) {
44558
+ if (!isLoading && data && data["common-masters"] && (_data2 = data["common-masters"]) !== null && _data2 !== void 0 && _data2.CancelReceiptReason && Array.isArray(data["common-masters"].CancelReceiptReason)) {
44475
44559
  data["common-masters"].CancelReceiptReason = data["common-masters"].CancelReceiptReason.filter(function (unit) {
44476
44560
  return unit.active;
44477
44561
  }) || [];
@@ -44494,7 +44578,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44494
44578
  };
44495
44579
 
44496
44580
  var useCancelReceiptStatus = function useCancelReceiptStatus() {
44497
- var _data$3;
44581
+ var _data3;
44498
44582
 
44499
44583
  var _useQuery3 = reactQuery.useQuery(["RECEIPTS_CANCEL_STATUS", tenantId], function () {
44500
44584
  return MdmsService.getReceiptStatus(tenantId, 'common-masters');
@@ -44503,7 +44587,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44503
44587
  error = _useQuery3.error,
44504
44588
  data = _useQuery3.data;
44505
44589
 
44506
- if (!isLoading && data && data["common-masters"] && (_data$3 = data["common-masters"]) !== null && _data$3 !== void 0 && _data$3.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44590
+ if (!isLoading && data && data["common-masters"] && (_data3 = data["common-masters"]) !== null && _data3 !== void 0 && _data3.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44507
44591
  data["common-masters"].ReceiptStatus = data["common-masters"].ReceiptStatus.filter(function (unit) {
44508
44592
  return unit.active;
44509
44593
  }) || [];
@@ -44526,7 +44610,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44526
44610
  };
44527
44611
 
44528
44612
  var useCancelReceiptReasonAndStatus = function useCancelReceiptReasonAndStatus() {
44529
- var _data$4;
44613
+ var _data4;
44530
44614
 
44531
44615
  var _useQuery4 = reactQuery.useQuery(["RECEIPTS_CANCEL_REASON_STATUS", tenantId], function () {
44532
44616
  return MdmsService.getCancelReceiptReasonAndStatus(tenantId, 'common-masters');
@@ -44535,8 +44619,8 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44535
44619
  error = _useQuery4.error,
44536
44620
  data = _useQuery4.data;
44537
44621
 
44538
- if (!isLoading && data && data["common-masters"] && (_data$4 = data["common-masters"]) !== null && _data$4 !== void 0 && _data$4.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44539
- var _data$5;
44622
+ if (!isLoading && data && data["common-masters"] && (_data4 = data["common-masters"]) !== null && _data4 !== void 0 && _data4.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44623
+ var _data5;
44540
44624
 
44541
44625
  data["common-masters"].uiCommonPay = data["common-masters"].uiCommonPay.filter(function (unit) {
44542
44626
  return unit.cancelReceipt;
@@ -44548,7 +44632,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44548
44632
  };
44549
44633
  })) || [];
44550
44634
 
44551
- if ((_data$5 = data["common-masters"]) !== null && _data$5 !== void 0 && _data$5.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44635
+ if ((_data5 = data["common-masters"]) !== null && _data5 !== void 0 && _data5.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44552
44636
  data["common-masters"].ReceiptStatus = data["common-masters"].ReceiptStatus.filter(function (unit) {
44553
44637
  return unit.active;
44554
44638
  }) || [];
@@ -44649,6 +44733,34 @@ var SearchMdmsTypes = {
44649
44733
  }
44650
44734
  });
44651
44735
  },
44736
+ useBPAREGServiceTypes: function useBPAREGServiceTypes(tenantId) {
44737
+ return reactQuery.useQuery([tenantId, "BPAREG_MDMS_SERVICE_STATUS"], function () {
44738
+ return MdmsService.getDataByCriteria(tenantId, {
44739
+ details: {
44740
+ tenantId: tenantId,
44741
+ moduleDetails: [{
44742
+ moduleName: "StakeholderRegistraition",
44743
+ masterDetails: [{
44744
+ name: "TradeTypetoRoleMapping"
44745
+ }]
44746
+ }]
44747
+ }
44748
+ }, "StakeholderRegistraition");
44749
+ }, {
44750
+ select: function select(data) {
44751
+ var _data$StakeholderRegi, _data$StakeholderRegi2;
44752
+
44753
+ return [].concat(data === null || data === void 0 ? void 0 : (_data$StakeholderRegi = data.StakeholderRegistraition) === null || _data$StakeholderRegi === void 0 ? void 0 : (_data$StakeholderRegi2 = _data$StakeholderRegi.TradeTypetoRoleMapping) === null || _data$StakeholderRegi2 === void 0 ? void 0 : _data$StakeholderRegi2.map(function (type) {
44754
+ var _type$tradeType, _type$tradeType2;
44755
+
44756
+ return {
44757
+ code: (_type$tradeType = type.tradeType) === null || _type$tradeType === void 0 ? void 0 : _type$tradeType.split(".")[0],
44758
+ i18nKey: "TRADELICENSE_TRADETYPE_" + ((_type$tradeType2 = type.tradeType) === null || _type$tradeType2 === void 0 ? void 0 : _type$tradeType2.split(".")[0])
44759
+ };
44760
+ }));
44761
+ }
44762
+ });
44763
+ },
44652
44764
  useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
44653
44765
  return reactQuery.useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
44654
44766
  return MdmsService.getDataByCriteria(tenantId, {
@@ -45190,502 +45302,624 @@ var OBPSService = {
45190
45302
  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
45191
45303
  };
45192
45304
  return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
45193
- function _temp4() {
45194
- var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _BPA$additionalDetail6, _BPA$additionalDetail7, _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$additionalDetail11, _BPA$additionalDetail12, _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$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _BPA$additionalDetail18, _BPA$additionalDetail19, _details;
45305
+ function _temp8() {
45306
+ function _temp6() {
45307
+ function _temp4() {
45308
+ var _fetchBillRes, _fetchBillRes$Bill, _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _BPA$additionalDetail6, _BPA$additionalDetail7, _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$additionalDetail11, _BPA$additionalDetail12, _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$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _BPA$additionalDetail18, _BPA$additionalDetail19, _billDetails$addition, _billDetails$addition2, _details;
45309
+
45310
+ if ((collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.length) > 0) {
45311
+ collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.map(function (ob) {
45312
+ var _ob$paymentDetails, _ob$paymentDetails$, _ob$paymentDetails$$b, _ob$paymentDetails$$b2, _ob$paymentDetails$$b3;
45313
+
45314
+ ob === null || ob === void 0 ? void 0 : (_ob$paymentDetails = ob.paymentDetails) === null || _ob$paymentDetails === void 0 ? void 0 : (_ob$paymentDetails$ = _ob$paymentDetails[0]) === null || _ob$paymentDetails$ === void 0 ? void 0 : (_ob$paymentDetails$$b = _ob$paymentDetails$.bill) === null || _ob$paymentDetails$$b === void 0 ? void 0 : (_ob$paymentDetails$$b2 = _ob$paymentDetails$$b.billDetails) === null || _ob$paymentDetails$$b2 === void 0 ? void 0 : (_ob$paymentDetails$$b3 = _ob$paymentDetails$$b2[0]) === null || _ob$paymentDetails$$b3 === void 0 ? void 0 : _ob$paymentDetails$$b3.billAccountDetails.map(function (bill, index) {
45315
+ collectionBillArray.push({
45316
+ title: (bill === null || bill === void 0 ? void 0 : bill.taxHeadCode) + "_DETAILS",
45317
+ value: "",
45318
+ isSubTitle: true
45319
+ }, {
45320
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
45321
+ value: "\u20B9" + (bill === null || bill === void 0 ? void 0 : bill.amount)
45322
+ }, {
45323
+ title: "BPA_STATUS_LABEL",
45324
+ value: "Paid"
45325
+ });
45326
+ totalAmount = totalAmount + parseInt(bill === null || bill === void 0 ? void 0 : bill.amount);
45327
+ });
45328
+ });
45329
+ }
45195
45330
 
45196
- function ConvertEpochToValidityDate(dateEpoch) {
45197
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45198
- return "NA";
45199
- }
45331
+ if (((_fetchBillRes = fetchBillRes) === null || _fetchBillRes === void 0 ? void 0 : (_fetchBillRes$Bill = _fetchBillRes.Bill) === null || _fetchBillRes$Bill === void 0 ? void 0 : _fetchBillRes$Bill.length) > 0) {
45332
+ var _fetchBillRes2, _fetchBillRes2$Bill, _fetchBillRes2$Bill$, _fetchBillRes2$Bill$$, _fetchBillRes2$Bill$$2, _fetchBillRes2$Bill$$3, _fetchBillRes2$Bill$$4, _fetchBillRes3, _fetchBillRes3$Bill, _fetchBillRes3$Bill$;
45333
+
45334
+ collectionBillArray.push({
45335
+ title: ((_fetchBillRes2 = fetchBillRes) === null || _fetchBillRes2 === void 0 ? void 0 : (_fetchBillRes2$Bill = _fetchBillRes2.Bill) === null || _fetchBillRes2$Bill === void 0 ? void 0 : (_fetchBillRes2$Bill$ = _fetchBillRes2$Bill[0]) === null || _fetchBillRes2$Bill$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$ = _fetchBillRes2$Bill$.billDetails) === null || _fetchBillRes2$Bill$$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$2 = _fetchBillRes2$Bill$$[0]) === null || _fetchBillRes2$Bill$$2 === void 0 ? void 0 : (_fetchBillRes2$Bill$$3 = _fetchBillRes2$Bill$$2.billAccountDetails) === null || _fetchBillRes2$Bill$$3 === void 0 ? void 0 : (_fetchBillRes2$Bill$$4 = _fetchBillRes2$Bill$$3[0]) === null || _fetchBillRes2$Bill$$4 === void 0 ? void 0 : _fetchBillRes2$Bill$$4.taxHeadCode) + "_DETAILS" || "BPA_SANC_FEE_DETAILS",
45336
+ value: "",
45337
+ isSubTitle: true
45338
+ }, {
45339
+ title: "BPA_SANC_FEE_LABEL",
45340
+ value: "\u20B9" + ((_fetchBillRes3 = fetchBillRes) === null || _fetchBillRes3 === void 0 ? void 0 : (_fetchBillRes3$Bill = _fetchBillRes3.Bill) === null || _fetchBillRes3$Bill === void 0 ? void 0 : (_fetchBillRes3$Bill$ = _fetchBillRes3$Bill[0]) === null || _fetchBillRes3$Bill$ === void 0 ? void 0 : _fetchBillRes3$Bill$.totalAmount)
45341
+ }, {
45342
+ title: "BPA_STATUS_LABEL",
45343
+ value: "Unpaid"
45344
+ });
45345
+ }
45200
45346
 
45201
- var dateFromApi = new Date(dateEpoch);
45202
- var month = dateFromApi.getMonth() + 1;
45203
- var day = dateFromApi.getDate();
45204
- var year = dateFromApi.getFullYear() - 3;
45205
- month = (month > 9 ? "" : "0") + month;
45206
- day = (day > 9 ? "" : "0") + day;
45207
- return day + "/" + month + "/" + year;
45208
- }
45347
+ totalAmount > 0 && collectionBillArray.push({
45348
+ title: "BPA_TOT_AMT_PAID",
45349
+ value: "\u20B9" + totalAmount
45350
+ });
45351
+ var billDetails = {
45352
+ title: "BPA_FEE_DETAILS_LABEL",
45353
+ isFeeDetails: true,
45354
+ additionalDetails: {
45355
+ inspectionReport: [],
45356
+ values: [].concat(collectionBillArray)
45357
+ }
45358
+ };
45209
45359
 
45210
- BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail = BPA.additionalDetails) === null || _BPA$additionalDetail === void 0 ? void 0 : (_BPA$additionalDetail2 = _BPA$additionalDetail.fieldinspection_pending) === null || _BPA$additionalDetail2 === void 0 ? void 0 : _BPA$additionalDetail2.forEach(function (fiData) {
45211
- var _fiData$docs2;
45360
+ function ConvertEpochToValidityDate(dateEpoch) {
45361
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45362
+ return "NA";
45363
+ }
45212
45364
 
45213
- fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45214
- var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45365
+ var dateFromApi = new Date(dateEpoch);
45366
+ var month = dateFromApi.getMonth() + 1;
45367
+ var day = dateFromApi.getDate();
45368
+ var year = dateFromApi.getFullYear() - 3;
45369
+ month = (month > 9 ? "" : "0") + month;
45370
+ day = (day > 9 ? "" : "0") + day;
45371
+ return day + "/" + month + "/" + year;
45372
+ }
45215
45373
 
45216
- if ((_fileDetails3 = fileDetails) !== null && _fileDetails3 !== void 0 && _fileDetails3.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = (_fileDetails4 = fileDetails) === null || _fileDetails4 === void 0 ? void 0 : (_fileDetails4$data$fi = _fileDetails4.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails4$data$fi === void 0 ? void 0 : _fileDetails4$data$fi.split(',')[0];
45217
- });
45218
- });
45219
- var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45220
- var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45374
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail = BPA.additionalDetails) === null || _BPA$additionalDetail === void 0 ? void 0 : (_BPA$additionalDetail2 = _BPA$additionalDetail.fieldinspection_pending) === null || _BPA$additionalDetail2 === void 0 ? void 0 : _BPA$additionalDetail2.forEach(function (fiData) {
45375
+ var _fiData$docs2;
45221
45376
 
45222
- return {
45223
- title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45224
- values: [{
45225
- title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45226
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45227
- isNotTranslated: true
45228
- }, {
45229
- title: "BPA_NOC_STATUS",
45230
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45231
- field: "STATUS"
45232
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45233
- title: "BPA_SUDMITTED_ON_LABEL",
45234
- value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
45235
- isNotTranslated: true
45236
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45237
- title: "BPA_APPROVAL_NUMBER_LABEL",
45238
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45239
- isNotTranslated: true
45240
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45241
- title: "BPA_APPROVED_REJECTED_ON_LABEL",
45242
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
45243
- isNotTranslated: true
45244
- }],
45245
- additionalDetails: {
45246
- data: nocDetails,
45247
- noc: [{
45248
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45249
- values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45250
- var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45377
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45378
+ var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45251
45379
 
45252
- return {
45253
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45254
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45255
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45256
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45257
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45258
- url: (_fileDetails5 = fileDetails) !== null && _fileDetails5 !== void 0 && (_fileDetails5$data = _fileDetails5.data) !== null && _fileDetails5$data !== void 0 && _fileDetails5$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails6 = fileDetails) === null || _fileDetails6 === void 0 ? void 0 : (_fileDetails6$data = _fileDetails6.data) === null || _fileDetails6$data === void 0 ? void 0 : (_fileDetails6$data$do = _fileDetails6$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails6$data$do === void 0 ? void 0 : _fileDetails6$data$do.split(',')[0] : ""
45259
- };
45260
- })
45261
- }]
45262
- }
45263
- };
45264
- });
45265
- var inspectionReport = [];
45266
- var checklist = [];
45267
- BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : (_BPA$additionalDetail4 = _BPA$additionalDetail3.fieldinspection_pending) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.filter(function (ob) {
45268
- return ob.docs && ob.docs.length > 0;
45269
- }).map(function (ob, ind) {
45270
- var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45271
-
45272
- checklist = [];
45273
- inspectionReport.push({
45274
- title: "BPA_FI_REPORT",
45275
- asSectionHeader: true,
45276
- values: [{
45277
- title: "BPA_FI_DATE_LABEL",
45278
- value: ob.date.includes("-") ? ((_ob$date = ob.date) === null || _ob$date === void 0 ? void 0 : _ob$date.split("-")[2]) + "/" + ((_ob$date2 = ob.date) === null || _ob$date2 === void 0 ? void 0 : _ob$date2.split("-")[1]) + "/" + ((_ob$date3 = ob.date) === null || _ob$date3 === void 0 ? void 0 : _ob$date3.split("-")[0]) : ob.date
45279
- }, {
45280
- title: "BPA_FI_TIME_LABEL",
45281
- value: ob.time
45282
- }]
45283
- });
45284
- ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45285
- checklist.push({
45286
- title: q.question,
45287
- value: q.value
45288
- });
45289
- checklist.push({
45290
- title: "BPA_ENTER_REMARKS",
45291
- value: q.remarks
45380
+ if ((_fileDetails3 = fileDetails) !== null && _fileDetails3 !== void 0 && _fileDetails3.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = (_fileDetails4 = fileDetails) === null || _fileDetails4 === void 0 ? void 0 : (_fileDetails4$data$fi = _fileDetails4.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails4$data$fi === void 0 ? void 0 : _fileDetails4$data$fi.split(',')[0];
45381
+ });
45292
45382
  });
45293
- });
45294
- inspectionReport.push({
45295
- title: "BPA_CHECK_LIST_DETAILS",
45296
- asSectionHeader: true,
45297
- values: checklist
45298
- });
45299
- inspectionReport.push({
45300
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45301
- asSectionHeader: true,
45302
- additionalDetails: {
45303
- obpsDocuments: [{
45304
- title: "",
45305
- values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45306
- var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45383
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45384
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45307
45385
 
45308
- return {
45309
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45310
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45311
- documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45312
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45313
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45314
- url: (_fileDetails7 = fileDetails) !== null && _fileDetails7 !== void 0 && (_fileDetails7$data = _fileDetails7.data) !== null && _fileDetails7$data !== void 0 && _fileDetails7$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails8 = fileDetails) === null || _fileDetails8 === void 0 ? void 0 : (_fileDetails8$data = _fileDetails8.data) === null || _fileDetails8$data === void 0 ? void 0 : (_fileDetails8$data$do = _fileDetails8$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails8$data$do === void 0 ? void 0 : _fileDetails8$data$do.split(',')[0] : ""
45315
- };
45316
- })
45386
+ return {
45387
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45388
+ values: [{
45389
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45390
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45391
+ isNotTranslated: true
45392
+ }, {
45393
+ title: "BPA_NOC_STATUS",
45394
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45395
+ field: "STATUS"
45396
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45397
+ title: "BPA_SUDMITTED_ON_LABEL",
45398
+ value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
45399
+ isNotTranslated: true
45400
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45401
+ title: "BPA_APPROVAL_NUMBER_LABEL",
45402
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45403
+ isNotTranslated: true
45404
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45405
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
45406
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
45407
+ isNotTranslated: true
45408
+ }],
45409
+ additionalDetails: {
45410
+ data: nocDetails,
45411
+ noc: [{
45412
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45413
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45414
+ var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45415
+
45416
+ return {
45417
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45418
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45419
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45420
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45421
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45422
+ url: (_fileDetails5 = fileDetails) !== null && _fileDetails5 !== void 0 && (_fileDetails5$data = _fileDetails5.data) !== null && _fileDetails5$data !== void 0 && _fileDetails5$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails6 = fileDetails) === null || _fileDetails6 === void 0 ? void 0 : (_fileDetails6$data = _fileDetails6.data) === null || _fileDetails6$data === void 0 ? void 0 : (_fileDetails6$data$do = _fileDetails6$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails6$data$do === void 0 ? void 0 : _fileDetails6$data$do.split(',')[0] : ""
45423
+ };
45424
+ })
45425
+ }]
45426
+ }
45427
+ };
45428
+ });
45429
+ var inspectionReport = [];
45430
+ var checklist = [];
45431
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : (_BPA$additionalDetail4 = _BPA$additionalDetail3.fieldinspection_pending) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.filter(function (ob) {
45432
+ return ob.docs && ob.docs.length > 0;
45433
+ }).map(function (ob, ind) {
45434
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45435
+
45436
+ checklist = [];
45437
+ inspectionReport.push({
45438
+ title: "BPA_FI_REPORT",
45439
+ asSectionHeader: true,
45440
+ values: [{
45441
+ title: "BPA_FI_DATE_LABEL",
45442
+ value: ob.date.includes("-") ? ((_ob$date = ob.date) === null || _ob$date === void 0 ? void 0 : _ob$date.split("-")[2]) + "/" + ((_ob$date2 = ob.date) === null || _ob$date2 === void 0 ? void 0 : _ob$date2.split("-")[1]) + "/" + ((_ob$date3 = ob.date) === null || _ob$date3 === void 0 ? void 0 : _ob$date3.split("-")[0]) : ob.date
45443
+ }, {
45444
+ title: "BPA_FI_TIME_LABEL",
45445
+ value: ob.time
45446
+ }]
45447
+ });
45448
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45449
+ checklist.push({
45450
+ title: q.question,
45451
+ value: q.value
45452
+ });
45453
+ checklist.push({
45454
+ title: "BPA_ENTER_REMARKS",
45455
+ value: q.remarks
45456
+ });
45457
+ });
45458
+ inspectionReport.push({
45459
+ title: "BPA_CHECK_LIST_DETAILS",
45460
+ asSectionHeader: true,
45461
+ values: checklist
45462
+ });
45463
+ inspectionReport.push({
45464
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45465
+ asSectionHeader: true,
45466
+ additionalDetails: {
45467
+ obpsDocuments: [{
45468
+ title: "",
45469
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45470
+ var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45471
+
45472
+ return {
45473
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45474
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45475
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45476
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45477
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45478
+ url: (_fileDetails7 = fileDetails) !== null && _fileDetails7 !== void 0 && (_fileDetails7$data = _fileDetails7.data) !== null && _fileDetails7$data !== void 0 && _fileDetails7$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails8 = fileDetails) === null || _fileDetails8 === void 0 ? void 0 : (_fileDetails8$data = _fileDetails8.data) === null || _fileDetails8$data === void 0 ? void 0 : (_fileDetails8$data$do = _fileDetails8$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails8$data$do === void 0 ? void 0 : _fileDetails8$data$do.split(',')[0] : ""
45479
+ };
45480
+ })
45481
+ }]
45482
+ }
45483
+ });
45484
+ });
45485
+ var details = [];
45486
+ var applicationDetailsInfo = {
45487
+ title: " ",
45488
+ isCommon: true,
45489
+ values: [{
45490
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45491
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45317
45492
  }]
45493
+ };
45494
+ var envCitizenName = window.location.href.includes("/employee") ? "employee" : "citizen";
45495
+
45496
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45497
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$, _bpaResponse$BPA6, _bpaResponse$BPA6$, _bpaResponse$BPA6$$ad, _bpaResponse$BPA7, _bpaResponse$BPA7$, _bpaResponse$BPA7$$ad, _bpaResponse$BPA8, _bpaResponse$BPA8$, _bpaResponse$BPA8$$ad;
45498
+
45499
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45500
+ title: "BPA_PERMIT_APP_NUMBER",
45501
+ to: "/digit-ui/" + envCitizenName + "/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),
45502
+ 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$.approvalNo,
45503
+ isLink: true
45504
+ }]);
45505
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45506
+ title: "BPA_PERMIT_VALIDITY",
45507
+ value: bpaResponse !== null && bpaResponse !== void 0 && (_bpaResponse$BPA6 = bpaResponse.BPA) !== null && _bpaResponse$BPA6 !== void 0 && (_bpaResponse$BPA6$ = _bpaResponse$BPA6[0]) !== null && _bpaResponse$BPA6$ !== void 0 && (_bpaResponse$BPA6$$ad = _bpaResponse$BPA6$.additionalDetails) !== null && _bpaResponse$BPA6$$ad !== void 0 && _bpaResponse$BPA6$$ad.validityDate ? ConvertEpochToValidityDate(bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA7 = bpaResponse.BPA) === null || _bpaResponse$BPA7 === void 0 ? void 0 : (_bpaResponse$BPA7$ = _bpaResponse$BPA7[0]) === null || _bpaResponse$BPA7$ === void 0 ? void 0 : (_bpaResponse$BPA7$$ad = _bpaResponse$BPA7$.additionalDetails) === null || _bpaResponse$BPA7$$ad === void 0 ? void 0 : _bpaResponse$BPA7$$ad.validityDate) + " - " + dateFns.format(new Date(bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA8 = bpaResponse.BPA) === null || _bpaResponse$BPA8 === void 0 ? void 0 : (_bpaResponse$BPA8$ = _bpaResponse$BPA8[0]) === null || _bpaResponse$BPA8$ === void 0 ? void 0 : (_bpaResponse$BPA8$$ad = _bpaResponse$BPA8$.additionalDetails) === null || _bpaResponse$BPA8$$ad === void 0 ? void 0 : _bpaResponse$BPA8$$ad.validityDate), 'dd/MM/yyyy') : "NA"
45508
+ }]);
45318
45509
  }
45319
- });
45320
- });
45321
- var details = [];
45322
- var applicationDetailsInfo = {
45323
- title: " ",
45324
- isCommon: true,
45325
- values: [{
45326
- title: "BPA_APPLICATION_NUMBER_LABEL",
45327
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45328
- }]
45329
- };
45330
-
45331
- if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45332
- var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45333
-
45334
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45335
- title: "BPA_PERMIT_APP_NUMBER",
45336
- 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),
45337
- 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,
45338
- isLink: true
45339
- }]);
45340
- }
45341
-
45342
- var permitcondn = [];
45343
- (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail6 = BPA.additionalDetails) === null || _BPA$additionalDetail6 === void 0 ? void 0 : _BPA$additionalDetail6.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.pendingapproval.map(function (ob, index) {
45344
- permitcondn.push({
45345
- title: index + 1 + ". " + ob,
45346
- value: ""
45347
- });
45348
- }));
45349
- var PermitConditions = {
45350
- title: "BPA_PERMIT_CONDITIONS",
45351
- isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45352
- isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45353
- additionalDetails: {
45354
- inspectionReport: [],
45355
- permit: [].concat(permitcondn)
45356
- }
45357
- };
45358
- if (permitcondn.length == 0) PermitConditions = {};
45359
45510
 
45360
- if (riskType == "LOW" && permitcondn.length > 0) {
45361
- permitcondn = [];
45362
- PermitConditions = {};
45363
- }
45364
-
45365
- if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45366
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45367
-
45368
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45369
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45370
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45371
- });
45372
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45373
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45374
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
45375
- });
45376
- }
45511
+ var permitcondn = [];
45512
+ (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail6 = BPA.additionalDetails) === null || _BPA$additionalDetail6 === void 0 ? void 0 : _BPA$additionalDetail6.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.pendingapproval.map(function (ob, index) {
45513
+ permitcondn.push({
45514
+ title: index + 1 + ". " + ob,
45515
+ value: ""
45516
+ });
45517
+ }));
45518
+ var PermitConditions = {
45519
+ title: "BPA_PERMIT_CONDITIONS",
45520
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45521
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45522
+ additionalDetails: {
45523
+ inspectionReport: [],
45524
+ permit: [].concat(permitcondn)
45525
+ }
45526
+ };
45527
+ if (permitcondn.length == 0) PermitConditions = {};
45377
45528
 
45378
- var basicDetails = {
45379
- title: "BPA_BASIC_DETAILS_TITLE",
45380
- asSectionHeader: true,
45381
- isInsert: true,
45382
- isCommon: true,
45383
- values: [{
45384
- title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45385
- value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
45386
- }, {
45387
- title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45388
- value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45389
- }, {
45390
- title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45391
- value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45392
- }, {
45393
- title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45394
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail3 = edcr.planDetail) === null || _edcr$planDetail3 === void 0 ? void 0 : (_edcr$planDetail3$pla = _edcr$planDetail3.planInformation) === null || _edcr$planDetail3$pla === void 0 ? void 0 : _edcr$planDetail3$pla.occupancy
45395
- }, {
45396
- title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45397
- value: "WF_BPA_" + riskType,
45398
- isInsert: true
45399
- }, {
45400
- title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45401
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail4 = edcr.planDetail) === null || _edcr$planDetail4 === void 0 ? void 0 : (_edcr$planDetail4$pla = _edcr$planDetail4.planInformation) === null || _edcr$planDetail4$pla === void 0 ? void 0 : _edcr$planDetail4$pla.applicantName
45402
- }]
45403
- };
45404
- var plotDetails = {
45405
- title: "BPA_PLOT_DETAILS_TITLE",
45406
- asSectionHeader: true,
45407
- isCommon: true,
45408
- values: [{
45409
- title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45410
- value: "" + (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail5 = edcr.planDetail) === null || _edcr$planDetail5 === void 0 ? void 0 : (_edcr$planDetail5$pla = _edcr$planDetail5.planInformation) === null || _edcr$planDetail5$pla === void 0 ? void 0 : _edcr$planDetail5$pla.plotArea),
45411
- isNotTranslated: true,
45412
- isUnit: "BPA_SQ_FT_LABEL"
45413
- }, {
45414
- title: "BPA_PLOT_NUMBER_LABEL",
45415
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail6 = edcr.planDetail) === null || _edcr$planDetail6 === void 0 ? void 0 : (_edcr$planDetail6$pla = _edcr$planDetail6.planInformation) === null || _edcr$planDetail6$pla === void 0 ? void 0 : _edcr$planDetail6$pla.plotNo) || "NA",
45416
- isNotTranslated: true
45417
- }, {
45418
- title: "BPA_KHATHA_NUMBER_LABEL",
45419
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail7 = edcr.planDetail) === null || _edcr$planDetail7 === void 0 ? void 0 : (_edcr$planDetail7$pla = _edcr$planDetail7.planInformation) === null || _edcr$planDetail7$pla === void 0 ? void 0 : _edcr$planDetail7$pla.khataNo) || "NA",
45420
- isNotTranslated: true
45421
- }, {
45422
- title: "BPA_HOLDING_NUMBER_LABEL",
45423
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45424
- isNotTranslated: true
45425
- }, {
45426
- title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45427
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45428
- isNotTranslated: true
45429
- }]
45430
- };
45431
- var scrutinyDetails = {
45432
- title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45433
- isScrutinyDetails: true,
45434
- isBackGroundColor: true,
45435
- additionalDetails: {
45436
- values: [{
45437
- title: "BPA_EDCR_DETAILS",
45438
- value: " ",
45439
- isHeader: true
45440
- }, {
45441
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45442
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45443
- }],
45444
- scruntinyDetails: [{
45445
- title: "BPA_UPLOADED_PLAN_DIAGRAM",
45446
- value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45447
- text: "BPA_UPLOADED_PLAN_DXF"
45448
- }, {
45449
- title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45450
- value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45451
- text: "BPA_SCRUTINY_REPORT_PDF"
45452
- }]
45453
- }
45454
- };
45455
- var buildingExtractionDetails = {
45456
- title: "",
45457
- isScrutinyDetails: true,
45458
- isBackGroundColor: true,
45459
- additionalDetails: {
45460
- values: [{
45461
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45462
- value: " ",
45463
- isHeader: true
45464
- }, {
45465
- title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45466
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail8 = edcr.planDetail) === null || _edcr$planDetail8 === void 0 ? void 0 : (_edcr$planDetail8$blo = _edcr$planDetail8.blocks) === null || _edcr$planDetail8$blo === void 0 ? void 0 : (_edcr$planDetail8$blo2 = _edcr$planDetail8$blo[0]) === null || _edcr$planDetail8$blo2 === void 0 ? void 0 : (_edcr$planDetail8$blo3 = _edcr$planDetail8$blo2.building) === null || _edcr$planDetail8$blo3 === void 0 ? void 0 : _edcr$planDetail8$blo3.totalBuitUpArea,
45467
- isUnit: "BPA_SQ_MTRS_LABEL"
45468
- }, {
45469
- title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45470
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail9 = edcr.planDetail) === null || _edcr$planDetail9 === void 0 ? void 0 : (_edcr$planDetail9$blo = _edcr$planDetail9.blocks) === null || _edcr$planDetail9$blo === void 0 ? void 0 : (_edcr$planDetail9$blo2 = _edcr$planDetail9$blo[0]) === null || _edcr$planDetail9$blo2 === void 0 ? void 0 : (_edcr$planDetail9$blo3 = _edcr$planDetail9$blo2.building) === null || _edcr$planDetail9$blo3 === void 0 ? void 0 : _edcr$planDetail9$blo3.totalFloors) || "NA"
45471
- }, {
45472
- title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45473
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail10 = edcr.planDetail) === null || _edcr$planDetail10 === void 0 ? void 0 : (_edcr$planDetail10$bl = _edcr$planDetail10.blocks) === null || _edcr$planDetail10$bl === void 0 ? void 0 : (_edcr$planDetail10$bl2 = _edcr$planDetail10$bl[0]) === null || _edcr$planDetail10$bl2 === void 0 ? void 0 : (_edcr$planDetail10$bl3 = _edcr$planDetail10$bl2.building) === null || _edcr$planDetail10$bl3 === void 0 ? void 0 : _edcr$planDetail10$bl3.declaredBuildingHeigh,
45474
- isUnit: "BPA_MTRS_LABEL"
45475
- }],
45476
- scruntinyDetails: []
45477
- }
45478
- };
45479
- var demolitionAreaDetails = {
45480
- title: "",
45481
- isScrutinyDetails: true,
45482
- isBackGroundColor: true,
45483
- additionalDetails: {
45484
- values: [{
45485
- title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45486
- value: " ",
45487
- isHeader: true
45488
- }, {
45489
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45490
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail11 = edcr.planDetail) === null || _edcr$planDetail11 === void 0 ? void 0 : (_edcr$planDetail11$pl = _edcr$planDetail11.planInformation) === null || _edcr$planDetail11$pl === void 0 ? void 0 : _edcr$planDetail11$pl.demolitionArea,
45491
- isUnit: "BPA_SQ_MTRS_LABEL"
45492
- }],
45493
- scruntinyDetails: []
45494
- }
45495
- };
45496
- var subOccupancyTableDetails = {
45497
- title: "",
45498
- isSubOccupancyTable: true,
45499
- isTitleRepeat: true,
45500
- additionalDetails: {
45501
- values: [{
45502
- title: "BPA_OCC_SUBOCC_HEADER",
45503
- value: " ",
45504
- isHeader: true
45505
- }],
45506
- subOccupancyTableDetails: [{
45507
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45508
- value: edcr
45509
- }, {
45510
- title: "NO_REPEAT",
45511
- value: ""
45512
- }]
45513
- }
45514
- };
45515
- var addressDetails = {
45516
- title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45517
- asSectionHeader: true,
45518
- isCommon: true,
45519
- values: [{
45520
- title: "BPA_DETAILS_PIN_LABEL",
45521
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo = BPA.landInfo) === null || _BPA$landInfo === void 0 ? void 0 : (_BPA$landInfo$address = _BPA$landInfo.address) === null || _BPA$landInfo$address === void 0 ? void 0 : _BPA$landInfo$address.pincode
45522
- }, {
45523
- title: "BPA_CITY_LABEL",
45524
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo2 = BPA.landInfo) === null || _BPA$landInfo2 === void 0 ? void 0 : (_BPA$landInfo2$addres = _BPA$landInfo2.address) === null || _BPA$landInfo2$addres === void 0 ? void 0 : _BPA$landInfo2$addres.city
45525
- }, {
45526
- title: "BPA_LOC_MOHALLA_LABEL",
45527
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo3 = BPA.landInfo) === null || _BPA$landInfo3 === void 0 ? void 0 : (_BPA$landInfo3$addres = _BPA$landInfo3.address) === null || _BPA$landInfo3$addres === void 0 ? void 0 : (_BPA$landInfo3$addres2 = _BPA$landInfo3$addres.locality) === null || _BPA$landInfo3$addres2 === void 0 ? void 0 : _BPA$landInfo3$addres2.name
45528
- }, {
45529
- title: "BPA_DETAILS_SRT_NAME_LABEL",
45530
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo4 = BPA.landInfo) === null || _BPA$landInfo4 === void 0 ? void 0 : (_BPA$landInfo4$addres = _BPA$landInfo4.address) === null || _BPA$landInfo4$addres === void 0 ? void 0 : _BPA$landInfo4$addres.street
45531
- }, {
45532
- title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45533
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo5 = BPA.landInfo) === null || _BPA$landInfo5 === void 0 ? void 0 : (_BPA$landInfo5$addres = _BPA$landInfo5.address) === null || _BPA$landInfo5$addres === void 0 ? void 0 : _BPA$landInfo5$addres.landmark
45534
- }]
45535
- };
45536
- var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
45529
+ if (riskType == "LOW" && permitcondn.length > 0) {
45530
+ permitcondn = [];
45531
+ PermitConditions = {};
45532
+ }
45537
45533
 
45538
- if ((BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo7 = BPA.landInfo) === null || _BPA$landInfo7 === void 0 ? void 0 : (_BPA$landInfo7$owners = _BPA$landInfo7.owners) === null || _BPA$landInfo7$owners === void 0 ? void 0 : _BPA$landInfo7$owners.length) > 0) {
45539
- var _BPA$landInfo8, _BPA$landInfo8$owners;
45534
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45535
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45540
45536
 
45541
- BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo8 = BPA.landInfo) === null || _BPA$landInfo8 === void 0 ? void 0 : (_BPA$landInfo8$owners = _BPA$landInfo8.owners) === null || _BPA$landInfo8$owners === void 0 ? void 0 : _BPA$landInfo8$owners.forEach(function (ownerD) {
45542
- if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45543
- });
45544
- }
45537
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45538
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45539
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45540
+ });
45541
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45542
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45543
+ value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
45544
+ });
45545
+ }
45545
45546
 
45546
- var ownerDetails = {
45547
- title: "BPA_APPLICANT_DETAILS_HEADER",
45548
- isOwnerDetails: true,
45549
- additionalDetails: {
45550
- owners: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo9 = BPA.landInfo) === null || _BPA$landInfo9 === void 0 ? void 0 : (_BPA$landInfo9$owners = _BPA$landInfo9.owners) === null || _BPA$landInfo9$owners === void 0 ? void 0 : _BPA$landInfo9$owners.map(function (owner, index) {
45551
- return {
45552
- title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45547
+ var basicDetails = {
45548
+ title: "BPA_BASIC_DETAILS_TITLE",
45549
+ asSectionHeader: true,
45550
+ isInsert: true,
45551
+ isCommon: true,
45552
+ values: [{
45553
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45554
+ value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
45555
+ }, {
45556
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45557
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45558
+ }, {
45559
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45560
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45561
+ }, {
45562
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45563
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail3 = edcr.planDetail) === null || _edcr$planDetail3 === void 0 ? void 0 : (_edcr$planDetail3$pla = _edcr$planDetail3.planInformation) === null || _edcr$planDetail3$pla === void 0 ? void 0 : _edcr$planDetail3$pla.occupancy
45564
+ }, {
45565
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45566
+ value: "WF_BPA_" + riskType,
45567
+ isInsert: true
45568
+ }, {
45569
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45570
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail4 = edcr.planDetail) === null || _edcr$planDetail4 === void 0 ? void 0 : (_edcr$planDetail4$pla = _edcr$planDetail4.planInformation) === null || _edcr$planDetail4$pla === void 0 ? void 0 : _edcr$planDetail4$pla.applicantName
45571
+ }]
45572
+ };
45573
+ var plotDetails = {
45574
+ title: "BPA_PLOT_DETAILS_TITLE",
45575
+ asSectionHeader: true,
45576
+ isCommon: true,
45577
+ values: [{
45578
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45579
+ value: "" + (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail5 = edcr.planDetail) === null || _edcr$planDetail5 === void 0 ? void 0 : (_edcr$planDetail5$pla = _edcr$planDetail5.planInformation) === null || _edcr$planDetail5$pla === void 0 ? void 0 : _edcr$planDetail5$pla.plotArea),
45580
+ isNotTranslated: true,
45581
+ isUnit: "BPA_SQ_FT_LABEL"
45582
+ }, {
45583
+ title: "BPA_PLOT_NUMBER_LABEL",
45584
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail6 = edcr.planDetail) === null || _edcr$planDetail6 === void 0 ? void 0 : (_edcr$planDetail6$pla = _edcr$planDetail6.planInformation) === null || _edcr$planDetail6$pla === void 0 ? void 0 : _edcr$planDetail6$pla.plotNo) || "NA",
45585
+ isNotTranslated: true
45586
+ }, {
45587
+ title: "BPA_KHATHA_NUMBER_LABEL",
45588
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail7 = edcr.planDetail) === null || _edcr$planDetail7 === void 0 ? void 0 : (_edcr$planDetail7$pla = _edcr$planDetail7.planInformation) === null || _edcr$planDetail7$pla === void 0 ? void 0 : _edcr$planDetail7$pla.khataNo) || "NA",
45589
+ isNotTranslated: true
45590
+ }, {
45591
+ title: "BPA_HOLDING_NUMBER_LABEL",
45592
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45593
+ isNotTranslated: true
45594
+ }, {
45595
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45596
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45597
+ isNotTranslated: true
45598
+ }]
45599
+ };
45600
+ var scrutinyDetails = {
45601
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45602
+ isScrutinyDetails: true,
45603
+ isBackGroundColor: true,
45604
+ additionalDetails: {
45553
45605
  values: [{
45554
- title: "CORE_COMMON_NAME",
45555
- value: owner === null || owner === void 0 ? void 0 : owner.name
45606
+ title: "BPA_EDCR_DETAILS",
45607
+ value: " ",
45608
+ isHeader: true
45556
45609
  }, {
45557
- title: "BPA_APPLICANT_GENDER_LABEL",
45558
- value: owner === null || owner === void 0 ? void 0 : owner.gender
45610
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45611
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45612
+ }],
45613
+ scruntinyDetails: [{
45614
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
45615
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45616
+ text: "BPA_UPLOADED_PLAN_DXF"
45559
45617
  }, {
45560
- title: "CORE_COMMON_MOBILE_NUMBER",
45561
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45562
- }, {
45563
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
45564
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45565
- isNotTranslated: false
45618
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45619
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45620
+ text: "BPA_SCRUTINY_REPORT_PDF"
45566
45621
  }]
45567
- };
45568
- })
45569
- }
45570
- };
45571
- var documentDetails = {
45572
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45573
- asSectionHeader: true,
45574
- isDocumentDetails: true,
45575
- additionalDetails: {
45576
- obpsDocuments: [{
45622
+ }
45623
+ };
45624
+ var buildingExtractionDetails = {
45577
45625
  title: "",
45578
- values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45579
- var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45580
-
45581
- return {
45582
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45583
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45584
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45585
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45586
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45587
- url: (_fileDetails9 = fileDetails) !== null && _fileDetails9 !== void 0 && (_fileDetails9$data = _fileDetails9.data) !== null && _fileDetails9$data !== void 0 && _fileDetails9$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails10 = fileDetails) === null || _fileDetails10 === void 0 ? void 0 : (_fileDetails10$data = _fileDetails10.data) === null || _fileDetails10$data === void 0 ? void 0 : (_fileDetails10$data$d = _fileDetails10$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails10$data$d === void 0 ? void 0 : _fileDetails10$data$d.split(',')[0] : ""
45588
- };
45589
- })
45590
- }]
45591
- }
45592
- };
45593
- var approvalChecks = [];
45594
- var approvalChecksDetails = {};
45595
-
45596
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45597
- var _mdmsRes$BPA2;
45626
+ isScrutinyDetails: true,
45627
+ isBackGroundColor: true,
45628
+ additionalDetails: {
45629
+ values: [{
45630
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45631
+ value: " ",
45632
+ isHeader: true
45633
+ }, {
45634
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45635
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail8 = edcr.planDetail) === null || _edcr$planDetail8 === void 0 ? void 0 : (_edcr$planDetail8$blo = _edcr$planDetail8.blocks) === null || _edcr$planDetail8$blo === void 0 ? void 0 : (_edcr$planDetail8$blo2 = _edcr$planDetail8$blo[0]) === null || _edcr$planDetail8$blo2 === void 0 ? void 0 : (_edcr$planDetail8$blo3 = _edcr$planDetail8$blo2.building) === null || _edcr$planDetail8$blo3 === void 0 ? void 0 : _edcr$planDetail8$blo3.totalBuitUpArea,
45636
+ isUnit: "BPA_SQ_MTRS_LABEL"
45637
+ }, {
45638
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45639
+ value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail9 = edcr.planDetail) === null || _edcr$planDetail9 === void 0 ? void 0 : (_edcr$planDetail9$blo = _edcr$planDetail9.blocks) === null || _edcr$planDetail9$blo === void 0 ? void 0 : (_edcr$planDetail9$blo2 = _edcr$planDetail9$blo[0]) === null || _edcr$planDetail9$blo2 === void 0 ? void 0 : (_edcr$planDetail9$blo3 = _edcr$planDetail9$blo2.building) === null || _edcr$planDetail9$blo3 === void 0 ? void 0 : _edcr$planDetail9$blo3.totalFloors) || "NA"
45640
+ }, {
45641
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45642
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail10 = edcr.planDetail) === null || _edcr$planDetail10 === void 0 ? void 0 : (_edcr$planDetail10$bl = _edcr$planDetail10.blocks) === null || _edcr$planDetail10$bl === void 0 ? void 0 : (_edcr$planDetail10$bl2 = _edcr$planDetail10$bl[0]) === null || _edcr$planDetail10$bl2 === void 0 ? void 0 : (_edcr$planDetail10$bl3 = _edcr$planDetail10$bl2.building) === null || _edcr$planDetail10$bl3 === void 0 ? void 0 : _edcr$planDetail10$bl3.declaredBuildingHeigh,
45643
+ isUnit: "BPA_MTRS_LABEL"
45644
+ }],
45645
+ scruntinyDetails: []
45646
+ }
45647
+ };
45648
+ var demolitionAreaDetails = {
45649
+ title: "",
45650
+ isScrutinyDetails: true,
45651
+ isBackGroundColor: true,
45652
+ additionalDetails: {
45653
+ values: [{
45654
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45655
+ value: " ",
45656
+ isHeader: true
45657
+ }, {
45658
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45659
+ value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail11 = edcr.planDetail) === null || _edcr$planDetail11 === void 0 ? void 0 : (_edcr$planDetail11$pl = _edcr$planDetail11.planInformation) === null || _edcr$planDetail11$pl === void 0 ? void 0 : _edcr$planDetail11$pl.demolitionArea,
45660
+ isUnit: "BPA_SQ_MTRS_LABEL"
45661
+ }],
45662
+ scruntinyDetails: []
45663
+ }
45664
+ };
45665
+ var subOccupancyTableDetails = {
45666
+ title: "",
45667
+ isSubOccupancyTable: true,
45668
+ isTitleRepeat: true,
45669
+ additionalDetails: {
45670
+ values: [{
45671
+ title: "BPA_OCC_SUBOCC_HEADER",
45672
+ value: " ",
45673
+ isHeader: true
45674
+ }],
45675
+ subOccupancyTableDetails: [{
45676
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45677
+ value: edcr
45678
+ }, {
45679
+ title: "NO_REPEAT",
45680
+ value: ""
45681
+ }]
45682
+ }
45683
+ };
45684
+ var addressDetails = {
45685
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45686
+ asSectionHeader: true,
45687
+ isCommon: true,
45688
+ values: [{
45689
+ title: "BPA_DETAILS_PIN_LABEL",
45690
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo = BPA.landInfo) === null || _BPA$landInfo === void 0 ? void 0 : (_BPA$landInfo$address = _BPA$landInfo.address) === null || _BPA$landInfo$address === void 0 ? void 0 : _BPA$landInfo$address.pincode
45691
+ }, {
45692
+ title: "BPA_CITY_LABEL",
45693
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo2 = BPA.landInfo) === null || _BPA$landInfo2 === void 0 ? void 0 : (_BPA$landInfo2$addres = _BPA$landInfo2.address) === null || _BPA$landInfo2$addres === void 0 ? void 0 : _BPA$landInfo2$addres.city
45694
+ }, {
45695
+ title: "BPA_LOC_MOHALLA_LABEL",
45696
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo3 = BPA.landInfo) === null || _BPA$landInfo3 === void 0 ? void 0 : (_BPA$landInfo3$addres = _BPA$landInfo3.address) === null || _BPA$landInfo3$addres === void 0 ? void 0 : (_BPA$landInfo3$addres2 = _BPA$landInfo3$addres.locality) === null || _BPA$landInfo3$addres2 === void 0 ? void 0 : _BPA$landInfo3$addres2.name
45697
+ }, {
45698
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
45699
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo4 = BPA.landInfo) === null || _BPA$landInfo4 === void 0 ? void 0 : (_BPA$landInfo4$addres = _BPA$landInfo4.address) === null || _BPA$landInfo4$addres === void 0 ? void 0 : _BPA$landInfo4$addres.street
45700
+ }, {
45701
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45702
+ value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo5 = BPA.landInfo) === null || _BPA$landInfo5 === void 0 ? void 0 : (_BPA$landInfo5$addres = _BPA$landInfo5.address) === null || _BPA$landInfo5$addres === void 0 ? void 0 : _BPA$landInfo5$addres.landmark
45703
+ }]
45704
+ };
45705
+ var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
45598
45706
 
45599
- mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45600
- var _checklist$conditions;
45707
+ if ((BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo7 = BPA.landInfo) === null || _BPA$landInfo7 === void 0 ? void 0 : (_BPA$landInfo7$owners = _BPA$landInfo7.owners) === null || _BPA$landInfo7$owners === void 0 ? void 0 : _BPA$landInfo7$owners.length) > 0) {
45708
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
45601
45709
 
45602
- if ((checklist === null || checklist === void 0 ? void 0 : checklist.RiskType) === riskType && (checklist === null || checklist === void 0 ? void 0 : checklist.applicationType) === (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType) && (checklist === null || checklist === void 0 ? void 0 : checklist.ServiceType) === (edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType) && (checklist === null || checklist === void 0 ? void 0 : checklist.WFState) === "PENDINGAPPROVAL" && (checklist === null || checklist === void 0 ? void 0 : (_checklist$conditions = checklist.conditions) === null || _checklist$conditions === void 0 ? void 0 : _checklist$conditions.length) > 0) {
45603
- approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45604
- }
45605
- });
45606
- approvalChecksDetails = {
45607
- title: "",
45608
- isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45609
- asSectionHeader: true,
45610
- isPermissions: true,
45611
- additionalDetails: {
45612
- permissions: approvalChecks
45710
+ BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo8 = BPA.landInfo) === null || _BPA$landInfo8 === void 0 ? void 0 : (_BPA$landInfo8$owners = _BPA$landInfo8.owners) === null || _BPA$landInfo8$owners === void 0 ? void 0 : _BPA$landInfo8$owners.forEach(function (ownerD) {
45711
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45712
+ });
45613
45713
  }
45614
- };
45615
- }
45616
45714
 
45617
- if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45618
- var val;
45619
- var i;
45620
- var FieldInspectionData = [];
45621
- inspectionReport && (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$additionalDetail15 = _BPA$additionalDetail14[0]) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.questions.length) > 0 && inspectionReport.map(function (ob, index) {
45622
- if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45623
- title: ob.title,
45624
- additionalDetails: {
45625
- inspectionReport: [],
45626
- values: ob.values
45627
- }
45628
- }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45629
- title: ob.title,
45630
- additionalDetails: {
45631
- isChecklist: true,
45632
- inspectionReport: [],
45633
- values: ob.values
45715
+ var ownerDetails = {
45716
+ title: "BPA_APPLICANT_DETAILS_HEADER",
45717
+ isOwnerDetails: true,
45718
+ additionalDetails: {
45719
+ owners: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo9 = BPA.landInfo) === null || _BPA$landInfo9 === void 0 ? void 0 : (_BPA$landInfo9$owners = _BPA$landInfo9.owners) === null || _BPA$landInfo9$owners === void 0 ? void 0 : _BPA$landInfo9$owners.map(function (owner, index) {
45720
+ return {
45721
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45722
+ values: [{
45723
+ title: "CORE_COMMON_NAME",
45724
+ value: owner === null || owner === void 0 ? void 0 : owner.name
45725
+ }, {
45726
+ title: "BPA_APPLICANT_GENDER_LABEL",
45727
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
45728
+ }, {
45729
+ title: "CORE_COMMON_MOBILE_NUMBER",
45730
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45731
+ }, {
45732
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
45733
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45734
+ isNotTranslated: false
45735
+ }]
45736
+ };
45737
+ })
45738
+ }
45739
+ };
45740
+ var documentDetails = {
45741
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45742
+ asSectionHeader: true,
45743
+ isDocumentDetails: true,
45744
+ additionalDetails: {
45745
+ obpsDocuments: [{
45746
+ title: "",
45747
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45748
+ var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45749
+
45750
+ return {
45751
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45752
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45753
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45754
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45755
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45756
+ url: (_fileDetails9 = fileDetails) !== null && _fileDetails9 !== void 0 && (_fileDetails9$data = _fileDetails9.data) !== null && _fileDetails9$data !== void 0 && _fileDetails9$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails10 = fileDetails) === null || _fileDetails10 === void 0 ? void 0 : (_fileDetails10$data = _fileDetails10.data) === null || _fileDetails10$data === void 0 ? void 0 : (_fileDetails10$data$d = _fileDetails10$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails10$data$d === void 0 ? void 0 : _fileDetails10$data$d.split(',')[0] : ""
45757
+ };
45758
+ })
45759
+ }]
45760
+ }
45761
+ };
45762
+ var approvalChecks = [];
45763
+ var approvalChecksDetails = {};
45764
+
45765
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45766
+ var _mdmsRes$BPA2;
45767
+
45768
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45769
+ var _checklist$conditions;
45770
+
45771
+ if ((checklist === null || checklist === void 0 ? void 0 : checklist.RiskType) === riskType && (checklist === null || checklist === void 0 ? void 0 : checklist.applicationType) === (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType) && (checklist === null || checklist === void 0 ? void 0 : checklist.ServiceType) === (edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType) && (checklist === null || checklist === void 0 ? void 0 : checklist.WFState) === "PENDINGAPPROVAL" && (checklist === null || checklist === void 0 ? void 0 : (_checklist$conditions = checklist.conditions) === null || _checklist$conditions === void 0 ? void 0 : _checklist$conditions.length) > 0) {
45772
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45773
+ }
45774
+ });
45775
+ approvalChecksDetails = {
45776
+ title: "",
45777
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45778
+ asSectionHeader: true,
45779
+ isPermissions: true,
45780
+ additionalDetails: {
45781
+ permissions: approvalChecks
45782
+ }
45783
+ };
45634
45784
  }
45635
- }]);else {
45636
- var _ob$additionalDetails, _ob$additionalDetails2;
45637
45785
 
45638
- var improvedDoc = [].concat((_ob$additionalDetails = ob.additionalDetails.obpsDocuments) === null || _ob$additionalDetails === void 0 ? void 0 : (_ob$additionalDetails2 = _ob$additionalDetails[0]) === null || _ob$additionalDetails2 === void 0 ? void 0 : _ob$additionalDetails2.values);
45639
- improvedDoc.map(function (ob) {
45640
- ob["isNotDuplicate"] = true;
45641
- });
45642
- improvedDoc.map(function (ob, index) {
45643
- val = ob.documentType;
45644
- if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45645
- if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45786
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45787
+ var val;
45788
+ var i;
45789
+ var FieldInspectionData = [];
45790
+ inspectionReport && (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$additionalDetail15 = _BPA$additionalDetail14[0]) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.questions.length) > 0 && inspectionReport.map(function (ob, index) {
45791
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45792
+ title: ob.title,
45793
+ additionalDetails: {
45794
+ inspectionReport: [],
45795
+ values: ob.values
45796
+ }
45797
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45798
+ title: ob.title,
45799
+ additionalDetails: {
45800
+ isChecklist: true,
45801
+ inspectionReport: [],
45802
+ values: ob.values
45803
+ }
45804
+ }]);else {
45805
+ var _ob$additionalDetails, _ob$additionalDetails2;
45806
+
45807
+ var improvedDoc = [].concat((_ob$additionalDetails = ob.additionalDetails.obpsDocuments) === null || _ob$additionalDetails === void 0 ? void 0 : (_ob$additionalDetails2 = _ob$additionalDetails[0]) === null || _ob$additionalDetails2 === void 0 ? void 0 : _ob$additionalDetails2.values);
45808
+ improvedDoc.map(function (ob) {
45809
+ ob["isNotDuplicate"] = true;
45810
+ });
45811
+ improvedDoc.map(function (ob, index) {
45812
+ val = ob.documentType;
45813
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45814
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45815
+ }
45816
+ });
45817
+ FieldInspectionData = [].concat(FieldInspectionData, [{
45818
+ title: ob.title,
45819
+ additionalDetails: {
45820
+ FIdocuments: [],
45821
+ "documents": [{
45822
+ values: improvedDoc
45823
+ }]
45824
+ }
45825
+ }]);
45646
45826
  }
45647
45827
  });
45648
- FieldInspectionData = [].concat(FieldInspectionData, [{
45649
- title: ob.title,
45828
+ var fiReports = {
45829
+ title: "",
45830
+ isFieldInspection: true,
45831
+ isNotAllowed: (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 ? false : true,
45650
45832
  additionalDetails: {
45651
- FIdocuments: [],
45652
- "documents": [{
45653
- values: improvedDoc
45654
- }]
45833
+ values: [],
45834
+ fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail18 = BPA.additionalDetails) === null || _BPA$additionalDetail18 === void 0 ? void 0 : (_BPA$additionalDetail19 = _BPA$additionalDetail18.fieldinspection_pending) === null || _BPA$additionalDetail19 === void 0 ? void 0 : _BPA$additionalDetail19.length) > 0 ? true : false
45655
45835
  }
45656
- }]);
45657
- }
45658
- });
45659
- var fiReports = {
45660
- title: "",
45661
- isFieldInspection: true,
45662
- isNotAllowed: (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 ? false : true,
45663
- additionalDetails: {
45664
- values: [],
45665
- fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail18 = BPA.additionalDetails) === null || _BPA$additionalDetail18 === void 0 ? void 0 : (_BPA$additionalDetail19 = _BPA$additionalDetail18.fieldinspection_pending) === null || _BPA$additionalDetail19 === void 0 ? void 0 : _BPA$additionalDetail19.length) > 0 ? true : false
45836
+ };
45837
+
45838
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45839
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45840
+ } else {
45841
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45842
+ }
45843
+
45844
+ if (billDetails !== null && billDetails !== void 0 && (_billDetails$addition = billDetails.additionalDetails) !== null && _billDetails$addition !== void 0 && (_billDetails$addition2 = _billDetails$addition.values) !== null && _billDetails$addition2 !== void 0 && _billDetails$addition2.length) {
45845
+ details.push(billDetails);
45846
+ }
45847
+
45848
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45849
+ return data;
45850
+ });
45851
+ return {
45852
+ applicationData: BPA,
45853
+ applicationDetails: bpaFilterDetails,
45854
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45855
+ edcrDetails: edcr,
45856
+ nocData: noc,
45857
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45858
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45859
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45860
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status,
45861
+ collectionBillDetails: collectionBillDetails
45862
+ };
45666
45863
  }
45667
- };
45668
45864
 
45669
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45670
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45671
- } else {
45672
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45865
+ var i = 0;
45866
+
45867
+ var _temp3 = _for(function () {
45868
+ var _appBusinessService;
45869
+
45870
+ return i < ((_appBusinessService = appBusinessService) === null || _appBusinessService === void 0 ? void 0 : _appBusinessService.length);
45871
+ }, function () {
45872
+ return i++;
45873
+ }, function () {
45874
+ return Promise.resolve(Digit.PaymentService.recieptSearch(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, appBusinessService[i], {
45875
+ consumerCodes: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45876
+ isEmployee: true
45877
+ })).then(function (collectionres) {
45878
+ var _collectionres$Paymen, _collectionres$Paymen3;
45879
+
45880
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen = collectionres.Payments) === null || _collectionres$Paymen === void 0 ? void 0 : _collectionres$Paymen.length) > 0) {
45881
+ var _collectionres$Paymen2;
45882
+
45883
+ collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen2 = collectionres.Payments) === null || _collectionres$Paymen2 === void 0 ? void 0 : _collectionres$Paymen2.map(function (res) {
45884
+ var _res$paymentDetails;
45885
+
45886
+ res === null || res === void 0 ? void 0 : (_res$paymentDetails = res.paymentDetails) === null || _res$paymentDetails === void 0 ? void 0 : _res$paymentDetails.map(function (resData) {
45887
+ if ((resData === null || resData === void 0 ? void 0 : resData.businessService) == appBusinessService[i]) {
45888
+ collectionBillRes.push(res);
45889
+ }
45890
+ });
45891
+ });
45892
+ }
45893
+
45894
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen3 = collectionres.Payments) === null || _collectionres$Paymen3 === void 0 ? void 0 : _collectionres$Paymen3.length) > 0) collectionBillDetails.push.apply(collectionBillDetails, collectionres === null || collectionres === void 0 ? void 0 : collectionres.Payments);
45895
+ });
45896
+ });
45897
+
45898
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45673
45899
  }
45674
45900
 
45675
- var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45676
- return data;
45677
- });
45678
- return {
45679
- applicationData: BPA,
45680
- applicationDetails: bpaFilterDetails,
45681
- tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45682
- edcrDetails: edcr,
45683
- nocData: noc,
45684
- comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45685
- businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45686
- applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45687
- applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
45688
- };
45901
+ var appBusinessService = [],
45902
+ collectionBillDetails = [],
45903
+ collectionBillArray = [],
45904
+ totalAmount = 0,
45905
+ collectionBillRes = [];
45906
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_LOW") appBusinessService = ["BPA.LOW_RISK_PERMIT_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA") appBusinessService = ["BPA.NC_APP_FEE", "BPA.NC_SAN_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_OC") appBusinessService = ["BPA.NC_OC_APP_FEE", "BPA.NC_OC_SAN_FEE"];
45907
+ var fetchBillRes = {};
45908
+
45909
+ var _temp5 = function () {
45910
+ var _appBusinessService2;
45911
+
45912
+ if ((_appBusinessService2 = appBusinessService) !== null && _appBusinessService2 !== void 0 && _appBusinessService2[1]) {
45913
+ return Promise.resolve(Digit.PaymentService.fetchBill(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
45914
+ consumerCode: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45915
+ businessService: appBusinessService[1]
45916
+ })).then(function (_Digit$PaymentService) {
45917
+ fetchBillRes = _Digit$PaymentService;
45918
+ });
45919
+ }
45920
+ }();
45921
+
45922
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
45689
45923
  }
45690
45924
 
45691
45925
  noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
@@ -45697,7 +45931,7 @@ var OBPSService = {
45697
45931
  });
45698
45932
  var fileDetails = {};
45699
45933
 
45700
- var _temp3 = function () {
45934
+ var _temp7 = function () {
45701
45935
  var _appDocumentFileStore;
45702
45936
 
45703
45937
  if (((_appDocumentFileStore = appDocumentFileStoreIds) === null || _appDocumentFileStore === void 0 ? void 0 : _appDocumentFileStore.length) > 0) {
@@ -45707,7 +45941,7 @@ var OBPSService = {
45707
45941
  }
45708
45942
  }();
45709
45943
 
45710
- return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45944
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
45711
45945
  });
45712
45946
  });
45713
45947
  });
@@ -45754,6 +45988,13 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45754
45988
  config = {};
45755
45989
  }
45756
45990
 
45991
+ if (window.location.href.includes("search/application")) {
45992
+ var _filters, _filters2;
45993
+
45994
+ if (!((_filters = filters) !== null && _filters !== void 0 && _filters.limit)) filters.limit = 10;
45995
+ if (!((_filters2 = filters) !== null && _filters2 !== void 0 && _filters2.offset)) filters.offset = 0;
45996
+ }
45997
+
45757
45998
  var client = reactQuery.useQueryClient();
45758
45999
  return _extends({}, reactQuery.useQuery(['BPA_SEARCH', tenantId, filters], function () {
45759
46000
  try {
@@ -45825,9 +46066,12 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45825
46066
  };
45826
46067
 
45827
46068
  var useOBPSSearch = function useOBPSSearch(selectedType, payload, tenantId, filters, params, config) {
46069
+ if (config === void 0) {
46070
+ config = {};
46071
+ }
45828
46072
 
45829
46073
  if (selectedType && selectedType.includes("STAKEHOLDER") || Object.keys(payload).length > 0 && payload !== null && payload !== void 0 && payload.applicationType && payload !== null && payload !== void 0 && payload.applicationType.includes("STAKEHOLDER")) {
45830
- return useEmpBPAREGSearch(tenantId, {}, params);
46074
+ return useEmpBPAREGSearch(tenantId, {}, params, config);
45831
46075
  } else {
45832
46076
  return useBPASearch(tenantId, filters);
45833
46077
  }
@@ -46206,7 +46450,7 @@ var useBPAInbox = function useBPAInbox(_ref) {
46206
46450
  tenantId = Digit.ULBService.getStateId();
46207
46451
  }
46208
46452
 
46209
- if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && window.location.href.includes("obps/inbox") && businessService) {
46453
+ if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && (window.location.href.includes("obps/inbox") || window.location.href.includes("obps/bpa/inbox")) && businessService) {
46210
46454
  businessService = "BPA_OC";
46211
46455
  }
46212
46456
 
@@ -46572,6 +46816,8 @@ var useBPAREGSearch = function useBPAREGSearch(tenantId, filters, params, config
46572
46816
  };
46573
46817
 
46574
46818
  var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationType(_ref) {
46819
+ var _userInfo$value;
46820
+
46575
46821
  var Applicationtype = _ref.Applicationtype,
46576
46822
  tenantId = _ref.tenantId;
46577
46823
 
@@ -46582,9 +46828,29 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46582
46828
  serviceTypes = _SearchMdmsTypes$useB.data,
46583
46829
  isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
46584
46830
 
46831
+ var _SearchMdmsTypes$useB2 = SearchMdmsTypes.useBPAREGServiceTypes(tenantId),
46832
+ BPAREGserviceTypes = _SearchMdmsTypes$useB2.data,
46833
+ isLoadingBPAREGServiceTypes = _SearchMdmsTypes$useB2.isLoading;
46834
+
46835
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46836
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46837
+ var userInformation = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value = userInfo.value) === null || _userInfo$value === void 0 ? void 0 : _userInfo$value.info;
46838
+ var uniqueBPAREGserviceTypes = React.useMemo(function () {
46839
+ var tradeTypes = BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.map(function (ob) {
46840
+ return ob === null || ob === void 0 ? void 0 : ob.code;
46841
+ });
46842
+ return BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.filter(function (_ref2, index) {
46843
+ var code = _ref2.code;
46844
+ return !tradeTypes.includes(code, index + 1);
46845
+ });
46846
+ }, [BPAREGserviceTypes, isLoadingBPAREGServiceTypes]);
46585
46847
  var ServiceTypes = React.useMemo(function () {
46848
+ var _userInformation$role, _userInformation$role2;
46849
+
46586
46850
  var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
46587
- return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
46851
+ if (Applicationtype === "BPA_STAKEHOLDER_REGISTRATION" && uniqueBPAREGserviceTypes && (userInformation === null || userInformation === void 0 ? void 0 : (_userInformation$role = userInformation.roles) === null || _userInformation$role === void 0 ? void 0 : (_userInformation$role2 = _userInformation$role.filter(function (ob) {
46852
+ return ob.code.includes("BPAREG_");
46853
+ })) === null || _userInformation$role2 === void 0 ? void 0 : _userInformation$role2.length) > 0) return [].concat(uniqueBPAREGserviceTypes);else return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
46588
46854
  return e.applicationType.includes(Applicationtype);
46589
46855
  }).map(function (e) {
46590
46856
  return {
@@ -46592,11 +46858,48 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46592
46858
  i18nKey: e.i18nKey
46593
46859
  };
46594
46860
  });
46595
- }, [serviceTypes, isLoadingServiceTypes, Applicationtype]);
46861
+ }, [serviceTypes, isLoadingServiceTypes, uniqueBPAREGserviceTypes, Applicationtype]);
46596
46862
  var applicationTypesWithStakeholder = [].concat(applicationTypes ? applicationTypes : [], [{
46597
46863
  code: "BPA_STAKEHOLDER_REGISTRATION",
46598
46864
  i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
46599
46865
  }]);
46866
+
46867
+ var showHidingLinksForStakeholder = function showHidingLinksForStakeholder(roles) {
46868
+ var _roles;
46869
+
46870
+ if (roles === void 0) {
46871
+ roles = [];
46872
+ }
46873
+
46874
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46875
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46876
+ var checkedRoles = [];
46877
+ var rolearray = (_roles = roles) === null || _roles === void 0 ? void 0 : _roles.map(function (role) {
46878
+ var _userInfo$value2, _userInfo$value2$info, _userInfo$value2$info2;
46879
+
46880
+ userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value2 = userInfo.value) === null || _userInfo$value2 === void 0 ? void 0 : (_userInfo$value2$info = _userInfo$value2.info) === null || _userInfo$value2$info === void 0 ? void 0 : (_userInfo$value2$info2 = _userInfo$value2$info.roles) === null || _userInfo$value2$info2 === void 0 ? void 0 : _userInfo$value2$info2.map(function (item) {
46881
+ if (item.code === role.code && item.tenantId === role.tenantId) {
46882
+ checkedRoles.push(item);
46883
+ }
46884
+ });
46885
+ });
46886
+ return checkedRoles === null || checkedRoles === void 0 ? void 0 : checkedRoles.length;
46887
+ };
46888
+
46889
+ var stateCode = Digit.ULBService.getStateId();
46890
+ var stakeholderEmployeeRoles = [{
46891
+ code: "BPAREG_DOC_VERIFIER",
46892
+ tenantId: stateCode
46893
+ }, {
46894
+ code: "BPAREG_APPROVER",
46895
+ tenantId: stateCode
46896
+ }];
46897
+ var checkingForStakeholderRoles = showHidingLinksForStakeholder(stakeholderEmployeeRoles);
46898
+
46899
+ if (!checkingForStakeholderRoles && (applicationTypesWithStakeholder === null || applicationTypesWithStakeholder === void 0 ? void 0 : applicationTypesWithStakeholder.length) > 0) {
46900
+ applicationTypesWithStakeholder.pop();
46901
+ }
46902
+
46600
46903
  var filteredapplicationTypes = React.useMemo(function () {
46601
46904
  return applicationTypesWithStakeholder.filter(function (curr) {
46602
46905
  var temp = 0;
@@ -47234,6 +47537,8 @@ var useNOCDetails = function useNOCDetails(t, tenantId, applicationNumber, confi
47234
47537
  };
47235
47538
 
47236
47539
  var useNOCInbox = function useNOCInbox(_ref) {
47540
+ var _businessServiceArray, _user$info2;
47541
+
47237
47542
  var tenantId = _ref.tenantId,
47238
47543
  filters = _ref.filters,
47239
47544
  _ref$config = _ref.config,
@@ -47252,17 +47557,51 @@ var useNOCInbox = function useNOCInbox(_ref) {
47252
47557
  limit = tableForm.limit,
47253
47558
  offset = tableForm.offset,
47254
47559
  sortOrder = tableForm.sortOrder;
47560
+ var user = Digit.UserService.getUser();
47561
+
47562
+ var businessServiceList = function businessServiceList() {
47563
+ var _user$info;
47564
+
47565
+ var availableBusinessServices = [{
47566
+ code: "FIRE_NOC_SRV",
47567
+ active: true,
47568
+ roles: ["FIRE_NOC_APPROVER"],
47569
+ i18nKey: "WF_FIRE_NOC_FIRE_NOC_SRV"
47570
+ }, {
47571
+ code: "AIRPORT_NOC_SRV",
47572
+ active: true,
47573
+ roles: ["AIRPORT_AUTHORITY_APPROVER"],
47574
+ i18nKey: "WF_FIRE_NOC_AIRPORT_NOC_SRV"
47575
+ }];
47576
+ var newAvailableBusinessServices = [],
47577
+ loggedInUserRoles = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.roles) || [];
47578
+ availableBusinessServices.map(function (_ref2, index) {
47579
+ var roles = _ref2.roles;
47580
+ roles.map(function (role) {
47581
+ loggedInUserRoles.map(function (el) {
47582
+ var _availableBusinessSer;
47583
+
47584
+ if (el.code === role) newAvailableBusinessServices.push(availableBusinessServices === null || availableBusinessServices === void 0 ? void 0 : (_availableBusinessSer = availableBusinessServices[index]) === null || _availableBusinessSer === void 0 ? void 0 : _availableBusinessSer.code);
47585
+ });
47586
+ });
47587
+ });
47588
+ return newAvailableBusinessServices;
47589
+ };
47590
+
47591
+ if (!((_businessServiceArray = businessServiceArray) !== null && _businessServiceArray !== void 0 && _businessServiceArray.length) && !businessService) {
47592
+ businessServiceArray = businessServiceList();
47593
+ }
47594
+
47255
47595
  var _filters = {
47256
47596
  tenantId: tenantId,
47257
47597
  processSearchCriteria: _extends({
47598
+ assignee: assignee === "ASSIGNED_TO_ME" ? user === null || user === void 0 ? void 0 : (_user$info2 = user.info) === null || _user$info2 === void 0 ? void 0 : _user$info2.uuid : "",
47258
47599
  moduleName: "noc-services",
47259
47600
  businessService: businessService !== null && businessService !== void 0 && businessService.code ? [businessService === null || businessService === void 0 ? void 0 : businessService.code] : businessServiceArray
47260
47601
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
47261
47602
  status: applicationStatus
47262
47603
  } : {}),
47263
- moduleSearchCriteria: _extends({
47264
- assignee: assignee
47265
- }, sourceRefId ? {
47604
+ moduleSearchCriteria: _extends({}, sourceRefId ? {
47266
47605
  sourceRefId: sourceRefId
47267
47606
  } : {}, applicationNo ? {
47268
47607
  applicationNo: applicationNo
@@ -47286,7 +47625,7 @@ var useNOCInbox = function useNOCInbox(_ref) {
47286
47625
  return {
47287
47626
  statuses: data.statusMap,
47288
47627
  table: data === null || data === void 0 ? void 0 : data.items.map(function (application) {
47289
- var _application$business, _application$business2, _application$ProcessI, _application$business3, _application$business4, _application$business5, _application$business6, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4;
47628
+ var _application$business, _application$business2, _application$ProcessI, _application$business3, _application$business4, _application$business5, _application$business6, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$ProcessI5;
47290
47629
 
47291
47630
  return {
47292
47631
  applicationId: application.businessObject.applicationNo,
@@ -47294,9 +47633,9 @@ var useNOCInbox = function useNOCInbox(_ref) {
47294
47633
  businessService: application === null || application === void 0 ? void 0 : (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : _application$ProcessI.businessService,
47295
47634
  locality: "" + ((_application$business3 = application.businessObject) === null || _application$business3 === void 0 ? void 0 : (_application$business4 = _application$business3.tenantId) === null || _application$business4 === void 0 ? void 0 : (_application$business5 = _application$business4.toUpperCase()) === null || _application$business5 === void 0 ? void 0 : (_application$business6 = _application$business5.split(".")) === null || _application$business6 === void 0 ? void 0 : _application$business6.join("_")),
47296
47635
  status: "WF_" + application.businessObject.additionalDetails.workflowCode + "_" + application.businessObject.applicationStatus,
47297
- owner: (_application$ProcessI2 = application.ProcessInstance) === null || _application$ProcessI2 === void 0 ? void 0 : (_application$ProcessI3 = _application$ProcessI2.assigner) === null || _application$ProcessI3 === void 0 ? void 0 : _application$ProcessI3.name,
47636
+ owner: (application === null || application === void 0 ? void 0 : (_application$ProcessI2 = application.ProcessInstance) === null || _application$ProcessI2 === void 0 ? void 0 : (_application$ProcessI3 = _application$ProcessI2.assignes) === null || _application$ProcessI3 === void 0 ? void 0 : (_application$ProcessI4 = _application$ProcessI3[0]) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.name) || "-",
47298
47637
  source: application.businessObject.source,
47299
- sla: Math.round(((_application$ProcessI4 = application.ProcessInstance) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.businesssServiceSla) / (24 * 60 * 60 * 1000))
47638
+ sla: Math.round(((_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000))
47300
47639
  };
47301
47640
  }),
47302
47641
  totalCount: data.totalCount
@@ -47618,7 +47957,8 @@ var fsm = {
47618
47957
  useVehiclesSearch: useVehiclesSearch,
47619
47958
  useConfig: useConfig,
47620
47959
  useSlum: useSlum,
47621
- usePaymentHistory: usePaymentHistory
47960
+ usePaymentHistory: usePaymentHistory,
47961
+ useVehicleTripCreate: useVehicleTripCreate
47622
47962
  };
47623
47963
  var pt$1 = {
47624
47964
  usePropertySearch: usePropertySearch,
@@ -47996,7 +48336,7 @@ var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
47996
48336
  replaceWith = "";
47997
48337
  }
47998
48338
 
47999
- if (searcher == "") return str;
48339
+ if (searcher === "") return str;
48000
48340
 
48001
48341
  while (str.includes(searcher)) {
48002
48342
  str = str.replace(searcher, replaceWith);
@@ -48075,7 +48415,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
48075
48415
  }
48076
48416
 
48077
48417
  if (key === void 0) {
48078
- key = '';
48418
+ key = "";
48079
48419
  }
48080
48420
 
48081
48421
  return dropdownValues.map(function (ele) {
@@ -48095,6 +48435,23 @@ var getTransformedLocale$1 = function getTransformedLocale(label) {
48095
48435
  label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
48096
48436
  return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
48097
48437
  };
48438
+ var sortDropdownNames = function sortDropdownNames(options, optionkey, t) {
48439
+ var _options;
48440
+
48441
+ if (options === void 0) {
48442
+ options = [];
48443
+ }
48444
+
48445
+ if (optionkey === void 0) {
48446
+ optionkey = "i18nKey";
48447
+ }
48448
+
48449
+ return (_options = options) === null || _options === void 0 ? void 0 : _options.sort(function (a, b) {
48450
+ var _t, _t$localeCompare;
48451
+
48452
+ return (_t = t(a === null || a === void 0 ? void 0 : a[optionkey])) === null || _t === void 0 ? void 0 : (_t$localeCompare = _t.localeCompare) === null || _t$localeCompare === void 0 ? void 0 : _t$localeCompare.call(_t, t(b === null || b === void 0 ? void 0 : b[optionkey]));
48453
+ });
48454
+ };
48098
48455
 
48099
48456
  var locale = {
48100
48457
  __proto__: null,
@@ -48107,7 +48464,8 @@ var locale = {
48107
48464
  getMohallaLocale: getMohallaLocale$1,
48108
48465
  getCityLocale: getCityLocale$1,
48109
48466
  convertToLocaleData: convertToLocaleData,
48110
- getTransformedLocale: getTransformedLocale$1
48467
+ getTransformedLocale: getTransformedLocale$1,
48468
+ sortDropdownNames: sortDropdownNames
48111
48469
  };
48112
48470
 
48113
48471
  var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
@@ -48802,7 +49160,7 @@ var NOCAccess = function NOCAccess() {
48802
49160
  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) {
48803
49161
  return roleData.code;
48804
49162
  });
48805
- 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"];
49163
+ var NOC_ROLES = ["FIRE_NOC_APPROVER"];
48806
49164
  var NOC_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
48807
49165
  return NOC_ROLES.includes(role);
48808
49166
  });