@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.
@@ -13,7 +13,7 @@ import 'date-fns/esm';
13
13
  import { Link } from 'react-router-dom';
14
14
 
15
15
  function _extends() {
16
- _extends = Object.assign || function (target) {
16
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
17
17
  for (var i = 1; i < arguments.length; i++) {
18
18
  var source = arguments[i];
19
19
 
@@ -26,7 +26,6 @@ function _extends() {
26
26
 
27
27
  return target;
28
28
  };
29
-
30
29
  return _extends.apply(this, arguments);
31
30
  }
32
31
 
@@ -324,7 +323,8 @@ var Urls = {
324
323
  audit: "/fsm/v1/_audit",
325
324
  vehicleTripSearch: "/vehicle/trip/v1/_search",
326
325
  billingSlabSearch: "/fsm-calculator/v1/billingSlab/_search",
327
- vehilceUpdate: "/vehicle/trip/v1/_update"
326
+ vehilceUpdate: "/vehicle/trip/v1/_update",
327
+ vehicleTripCreate: "/vehicle/trip/v1/_create"
328
328
  },
329
329
  payment: {
330
330
  fetch_bill: "/billing-service/bill/v2/_fetchbill",
@@ -808,7 +808,7 @@ var getSetting = function getSetting(serviceName, moduleName) {
808
808
  });
809
809
  var responseSetting = {
810
810
  cacheTimeInSecs: serviceSetting.cacheTimeInSecs,
811
- debounceTimeInMS: serviceSetting.cacheTimeInSecs || 100
811
+ debounceTimeInMS: serviceSetting.debounceTimeInMS || 100
812
812
  };
813
813
 
814
814
  if (!moduleName) {
@@ -1844,6 +1844,22 @@ var getFSMTripNumberCriteria = function getFSMTripNumberCriteria(tenantId, modul
1844
1844
  };
1845
1845
  };
1846
1846
 
1847
+ var getFSMReceivedPaymentTypeCriteria = function getFSMReceivedPaymentTypeCriteria(tenantId, moduleCode, type) {
1848
+ return {
1849
+ type: type,
1850
+ details: {
1851
+ tenantId: tenantId,
1852
+ moduleDetails: [{
1853
+ moduleName: moduleCode,
1854
+ masterDetails: [{
1855
+ name: "ReceivedPaymentType",
1856
+ filter: null
1857
+ }]
1858
+ }]
1859
+ }
1860
+ };
1861
+ };
1862
+
1847
1863
  var GetEgovLocations = function GetEgovLocations(MdmsRes) {
1848
1864
  return MdmsRes["egov-location"].TenantBoundary[0].boundary.children.map(function (obj) {
1849
1865
  return {
@@ -2188,6 +2204,16 @@ var GetTripNumber = function GetTripNumber(MdmsRes) {
2188
2204
  });
2189
2205
  };
2190
2206
 
2207
+ var GetReceivedPaymentType = function GetReceivedPaymentType(MdmsRes) {
2208
+ return MdmsRes["FSM"].ReceivedPaymentType.filter(function (option) {
2209
+ return option.active;
2210
+ }).map(function (reasonDetails) {
2211
+ return _extends({}, reasonDetails, {
2212
+ i18nKey: "ES_ACTION_" + reasonDetails.code
2213
+ });
2214
+ });
2215
+ };
2216
+
2191
2217
  var getDssDashboard = function getDssDashboard(MdmsRes) {
2192
2218
  return MdmsRes["dss-dashboard"]["dashboard-config"];
2193
2219
  };
@@ -2354,6 +2380,9 @@ var transformResponse = function transformResponse(type, MdmsRes, moduleCode, te
2354
2380
  case "TripNumber":
2355
2381
  return GetTripNumber(MdmsRes);
2356
2382
 
2383
+ case "ReceivedPaymentType":
2384
+ return GetReceivedPaymentType(MdmsRes);
2385
+
2357
2386
  default:
2358
2387
  return MdmsRes;
2359
2388
  }
@@ -2657,6 +2686,9 @@ var MdmsService = {
2657
2686
  },
2658
2687
  getFSMTripNumber: function getFSMTripNumber(tenantId, moduleCode, type) {
2659
2688
  return MdmsService.getDataByCriteria(tenantId, getFSMTripNumberCriteria(tenantId, moduleCode, type), moduleCode);
2689
+ },
2690
+ getFSMReceivedPaymentType: function getFSMReceivedPaymentType(tenantId, moduleCode, type) {
2691
+ return MdmsService.getDataByCriteria(tenantId, getFSMReceivedPaymentTypeCriteria(tenantId, moduleCode, type), moduleCode);
2660
2692
  }
2661
2693
  };
2662
2694
 
@@ -3303,6 +3335,16 @@ var FSMService = {
3303
3335
  method: "POST",
3304
3336
  auth: true
3305
3337
  });
3338
+ },
3339
+ vehicleTripCreate: function vehicleTripCreate(details) {
3340
+ return Request({
3341
+ url: Urls.fsm.vehicleTripCreate,
3342
+ data: details,
3343
+ useCache: false,
3344
+ userService: true,
3345
+ method: "POST",
3346
+ auth: true
3347
+ });
3306
3348
  }
3307
3349
  };
3308
3350
 
@@ -36037,6 +36079,22 @@ var makeCommentsSubsidariesOfPreviousActions = function makeCommentsSubsidariesO
36037
36079
  }
36038
36080
  };
36039
36081
 
36082
+ var getAssignerDetails = function getAssignerDetails(instance, nextStep, moduleCode) {
36083
+ var assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36084
+
36085
+ if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE") {
36086
+ if (instance.state.applicationStatus === "CREATED") {
36087
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36088
+ } else {
36089
+ assigner = (nextStep === null || nextStep === void 0 ? void 0 : nextStep.assigner) || (instance === null || instance === void 0 ? void 0 : instance.assigner);
36090
+ }
36091
+ } else {
36092
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36093
+ }
36094
+
36095
+ return assigner;
36096
+ };
36097
+
36040
36098
  var WorkflowService = {
36041
36099
  init: function init(stateCode, businessServices) {
36042
36100
  return Request({
@@ -36165,6 +36223,10 @@ var WorkflowService = {
36165
36223
  return [].concat(acc, el.roles);
36166
36224
  }, []), _extends2));
36167
36225
  })) === null || _businessServiceRespo === void 0 ? void 0 : _businessServiceRespo[0];
36226
+ var action_newVehicle = [{
36227
+ action: "READY_FOR_DISPOSAL",
36228
+ roles: "FSM_EMP_FSTPO,FSM_EMP_FSTPO"
36229
+ }];
36168
36230
  var actionRolePair = nextActions === null || nextActions === void 0 ? void 0 : nextActions.map(function (action) {
36169
36231
  var _action$state, _action$state$actions;
36170
36232
 
@@ -36181,7 +36243,7 @@ var WorkflowService = {
36181
36243
  function _temp18() {
36182
36244
  var _workflow$ProcessInst, _workflow$ProcessInst2;
36183
36245
 
36184
- var nextActions = actionRolePair;
36246
+ var nextActions = location.pathname.includes("new-vehicle-entry") ? action_newVehicle : actionRolePair;
36185
36247
 
36186
36248
  if (role !== "CITIZEN" && moduleCode === "PGR") {
36187
36249
  var _timeline;
@@ -36216,7 +36278,7 @@ var WorkflowService = {
36216
36278
  performedAction: instance.action,
36217
36279
  status: instance.state.applicationStatus,
36218
36280
  state: instance.state.state,
36219
- assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36281
+ assigner: getAssignerDetails(instance, TLEnrichedWithWorflowData[ind - 1], moduleCode),
36220
36282
  rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36221
36283
  wfComment: instance === null || instance === void 0 ? void 0 : instance.wfComments.map(function (e) {
36222
36284
  return e === null || e === void 0 ? void 0 : e.comment;
@@ -36250,7 +36312,7 @@ var WorkflowService = {
36250
36312
  if (getTripData) {
36251
36313
  var _temp21 = _catch(function () {
36252
36314
  var filters = {
36253
- businessService: 'FSM_VEHICLE_TRIP',
36315
+ businessService: "FSM_VEHICLE_TRIP",
36254
36316
  refernceNos: id
36255
36317
  };
36256
36318
  return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
@@ -41080,6 +41142,12 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
41080
41142
  }, queryConfig);
41081
41143
  };
41082
41144
 
41145
+ var useReceivedPaymentType = function useReceivedPaymentType() {
41146
+ return useQuery("FSM_RECEIVED_PAYMENT_TYPE", function () {
41147
+ return MdmsService.getFSMReceivedPaymentType(tenantId, moduleCode, type);
41148
+ }, queryConfig);
41149
+ };
41150
+
41083
41151
  switch (type) {
41084
41152
  case "SanitationType":
41085
41153
  return useSanitationType();
@@ -41135,6 +41203,9 @@ var useMDMS$1 = function useMDMS(tenantId, moduleCode, type, config, payload) {
41135
41203
  case "TripNumber":
41136
41204
  return useTripNumber();
41137
41205
 
41206
+ case "ReceivedPaymentType":
41207
+ return useReceivedPaymentType();
41208
+
41138
41209
  default:
41139
41210
  return null;
41140
41211
  }
@@ -41252,6 +41323,8 @@ var Search = {
41252
41323
  var dsoDetails = {};
41253
41324
  var vehicle = {};
41254
41325
  return Promise.resolve(Search.application(tenantId, filter)).then(function (response) {
41326
+ var _response$additionalD;
41327
+
41255
41328
  function _temp4() {
41256
41329
  function _temp2() {
41257
41330
  var slumName = slumLabel ? slumLabel.i18nKey : "N/A";
@@ -41372,6 +41445,9 @@ var Search = {
41372
41445
  }, {
41373
41446
  title: "ES_APPLICATION_DETAILS_POSSIBLE_SERVICE_DATE",
41374
41447
  value: displayServiceDate(response === null || response === void 0 ? void 0 : response.possibleServiceDate) || "N/A"
41448
+ }, {
41449
+ title: "ES_APPLICATION_DETAILS_AMOUNT_RECEIVED",
41450
+ value: receivedPayment || "N/A"
41375
41451
  }]
41376
41452
  }];
41377
41453
 
@@ -41457,6 +41533,8 @@ var Search = {
41457
41533
  return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
41458
41534
  }
41459
41535
 
41536
+ var receivedPayment = response === null || response === void 0 ? void 0 : (_response$additionalD = response.additionalDetails) === null || _response$additionalD === void 0 ? void 0 : _response$additionalD.receivedPayment;
41537
+
41460
41538
  var _temp3 = function () {
41461
41539
  if (response !== null && response !== void 0 && response.dsoId) {
41462
41540
  var dsoFilters = {
@@ -41588,6 +41666,12 @@ var useVehicleUpdate = function useVehicleUpdate() {
41588
41666
  });
41589
41667
  };
41590
41668
 
41669
+ var useVehicleTripCreate = function useVehicleTripCreate() {
41670
+ return useMutation(function (details) {
41671
+ return FSMService.vehicleTripCreate(details);
41672
+ });
41673
+ };
41674
+
41591
41675
  var useFSMInbox = function useFSMInbox(tenantId, filters, config, overRideUUID) {
41592
41676
  var _filters$applicationS, _filters$locality, _filters$uuid;
41593
41677
 
@@ -44427,7 +44511,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44427
44511
  }
44428
44512
 
44429
44513
  var useReceiptsBusinessServices = function useReceiptsBusinessServices() {
44430
- var _data$;
44514
+ var _data;
44431
44515
 
44432
44516
  var _useQuery = useQuery(["RECEIPTS_SERVICES", tenantId], function () {
44433
44517
  return MdmsService.getReceiptKey(tenantId, 'common-masters');
@@ -44436,7 +44520,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44436
44520
  error = _useQuery.error,
44437
44521
  data = _useQuery.data;
44438
44522
 
44439
- if (!isLoading && data && data["common-masters"] && (_data$ = data["common-masters"]) !== null && _data$ !== void 0 && _data$.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44523
+ if (!isLoading && data && data["common-masters"] && (_data = data["common-masters"]) !== null && _data !== void 0 && _data.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44440
44524
  data["common-masters"].uiCommonPay = data["common-masters"].uiCommonPay.filter(function (unit) {
44441
44525
  return unit.cancelReceipt;
44442
44526
  }) || [];
@@ -44459,7 +44543,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44459
44543
  };
44460
44544
 
44461
44545
  var useCancelReceiptReason = function useCancelReceiptReason() {
44462
- var _data$2;
44546
+ var _data2;
44463
44547
 
44464
44548
  var _useQuery2 = useQuery(["RECEIPTS_CANCEL_REASON", tenantId], function () {
44465
44549
  return MdmsService.getCancelReceiptReason(tenantId, 'common-masters');
@@ -44468,7 +44552,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44468
44552
  error = _useQuery2.error,
44469
44553
  data = _useQuery2.data;
44470
44554
 
44471
- 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)) {
44555
+ if (!isLoading && data && data["common-masters"] && (_data2 = data["common-masters"]) !== null && _data2 !== void 0 && _data2.CancelReceiptReason && Array.isArray(data["common-masters"].CancelReceiptReason)) {
44472
44556
  data["common-masters"].CancelReceiptReason = data["common-masters"].CancelReceiptReason.filter(function (unit) {
44473
44557
  return unit.active;
44474
44558
  }) || [];
@@ -44491,7 +44575,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44491
44575
  };
44492
44576
 
44493
44577
  var useCancelReceiptStatus = function useCancelReceiptStatus() {
44494
- var _data$3;
44578
+ var _data3;
44495
44579
 
44496
44580
  var _useQuery3 = useQuery(["RECEIPTS_CANCEL_STATUS", tenantId], function () {
44497
44581
  return MdmsService.getReceiptStatus(tenantId, 'common-masters');
@@ -44500,7 +44584,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44500
44584
  error = _useQuery3.error,
44501
44585
  data = _useQuery3.data;
44502
44586
 
44503
- 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)) {
44587
+ if (!isLoading && data && data["common-masters"] && (_data3 = data["common-masters"]) !== null && _data3 !== void 0 && _data3.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44504
44588
  data["common-masters"].ReceiptStatus = data["common-masters"].ReceiptStatus.filter(function (unit) {
44505
44589
  return unit.active;
44506
44590
  }) || [];
@@ -44523,7 +44607,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44523
44607
  };
44524
44608
 
44525
44609
  var useCancelReceiptReasonAndStatus = function useCancelReceiptReasonAndStatus() {
44526
- var _data$4;
44610
+ var _data4;
44527
44611
 
44528
44612
  var _useQuery4 = useQuery(["RECEIPTS_CANCEL_REASON_STATUS", tenantId], function () {
44529
44613
  return MdmsService.getCancelReceiptReasonAndStatus(tenantId, 'common-masters');
@@ -44532,8 +44616,8 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44532
44616
  error = _useQuery4.error,
44533
44617
  data = _useQuery4.data;
44534
44618
 
44535
- 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)) {
44536
- var _data$5;
44619
+ if (!isLoading && data && data["common-masters"] && (_data4 = data["common-masters"]) !== null && _data4 !== void 0 && _data4.uiCommonPay && Array.isArray(data["common-masters"].uiCommonPay)) {
44620
+ var _data5;
44537
44621
 
44538
44622
  data["common-masters"].uiCommonPay = data["common-masters"].uiCommonPay.filter(function (unit) {
44539
44623
  return unit.cancelReceipt;
@@ -44545,7 +44629,7 @@ var useReceiptsMDMS = function useReceiptsMDMS(tenantId, type, config) {
44545
44629
  };
44546
44630
  })) || [];
44547
44631
 
44548
- if ((_data$5 = data["common-masters"]) !== null && _data$5 !== void 0 && _data$5.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44632
+ if ((_data5 = data["common-masters"]) !== null && _data5 !== void 0 && _data5.ReceiptStatus && Array.isArray(data["common-masters"].ReceiptStatus)) {
44549
44633
  data["common-masters"].ReceiptStatus = data["common-masters"].ReceiptStatus.filter(function (unit) {
44550
44634
  return unit.active;
44551
44635
  }) || [];
@@ -44646,6 +44730,34 @@ var SearchMdmsTypes = {
44646
44730
  }
44647
44731
  });
44648
44732
  },
44733
+ useBPAREGServiceTypes: function useBPAREGServiceTypes(tenantId) {
44734
+ return useQuery([tenantId, "BPAREG_MDMS_SERVICE_STATUS"], function () {
44735
+ return MdmsService.getDataByCriteria(tenantId, {
44736
+ details: {
44737
+ tenantId: tenantId,
44738
+ moduleDetails: [{
44739
+ moduleName: "StakeholderRegistraition",
44740
+ masterDetails: [{
44741
+ name: "TradeTypetoRoleMapping"
44742
+ }]
44743
+ }]
44744
+ }
44745
+ }, "StakeholderRegistraition");
44746
+ }, {
44747
+ select: function select(data) {
44748
+ var _data$StakeholderRegi, _data$StakeholderRegi2;
44749
+
44750
+ 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) {
44751
+ var _type$tradeType, _type$tradeType2;
44752
+
44753
+ return {
44754
+ code: (_type$tradeType = type.tradeType) === null || _type$tradeType === void 0 ? void 0 : _type$tradeType.split(".")[0],
44755
+ i18nKey: "TRADELICENSE_TRADETYPE_" + ((_type$tradeType2 = type.tradeType) === null || _type$tradeType2 === void 0 ? void 0 : _type$tradeType2.split(".")[0])
44756
+ };
44757
+ }));
44758
+ }
44759
+ });
44760
+ },
44649
44761
  useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
44650
44762
  return useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
44651
44763
  return MdmsService.getDataByCriteria(tenantId, {
@@ -45187,502 +45299,624 @@ var OBPSService = {
45187
45299
  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
45188
45300
  };
45189
45301
  return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
45190
- function _temp4() {
45191
- 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;
45302
+ function _temp8() {
45303
+ function _temp6() {
45304
+ function _temp4() {
45305
+ 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;
45306
+
45307
+ if ((collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.length) > 0) {
45308
+ collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.map(function (ob) {
45309
+ var _ob$paymentDetails, _ob$paymentDetails$, _ob$paymentDetails$$b, _ob$paymentDetails$$b2, _ob$paymentDetails$$b3;
45310
+
45311
+ 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) {
45312
+ collectionBillArray.push({
45313
+ title: (bill === null || bill === void 0 ? void 0 : bill.taxHeadCode) + "_DETAILS",
45314
+ value: "",
45315
+ isSubTitle: true
45316
+ }, {
45317
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
45318
+ value: "\u20B9" + (bill === null || bill === void 0 ? void 0 : bill.amount)
45319
+ }, {
45320
+ title: "BPA_STATUS_LABEL",
45321
+ value: "Paid"
45322
+ });
45323
+ totalAmount = totalAmount + parseInt(bill === null || bill === void 0 ? void 0 : bill.amount);
45324
+ });
45325
+ });
45326
+ }
45192
45327
 
45193
- function ConvertEpochToValidityDate(dateEpoch) {
45194
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45195
- return "NA";
45196
- }
45328
+ if (((_fetchBillRes = fetchBillRes) === null || _fetchBillRes === void 0 ? void 0 : (_fetchBillRes$Bill = _fetchBillRes.Bill) === null || _fetchBillRes$Bill === void 0 ? void 0 : _fetchBillRes$Bill.length) > 0) {
45329
+ var _fetchBillRes2, _fetchBillRes2$Bill, _fetchBillRes2$Bill$, _fetchBillRes2$Bill$$, _fetchBillRes2$Bill$$2, _fetchBillRes2$Bill$$3, _fetchBillRes2$Bill$$4, _fetchBillRes3, _fetchBillRes3$Bill, _fetchBillRes3$Bill$;
45330
+
45331
+ collectionBillArray.push({
45332
+ 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",
45333
+ value: "",
45334
+ isSubTitle: true
45335
+ }, {
45336
+ title: "BPA_SANC_FEE_LABEL",
45337
+ 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)
45338
+ }, {
45339
+ title: "BPA_STATUS_LABEL",
45340
+ value: "Unpaid"
45341
+ });
45342
+ }
45197
45343
 
45198
- var dateFromApi = new Date(dateEpoch);
45199
- var month = dateFromApi.getMonth() + 1;
45200
- var day = dateFromApi.getDate();
45201
- var year = dateFromApi.getFullYear() - 3;
45202
- month = (month > 9 ? "" : "0") + month;
45203
- day = (day > 9 ? "" : "0") + day;
45204
- return day + "/" + month + "/" + year;
45205
- }
45344
+ totalAmount > 0 && collectionBillArray.push({
45345
+ title: "BPA_TOT_AMT_PAID",
45346
+ value: "\u20B9" + totalAmount
45347
+ });
45348
+ var billDetails = {
45349
+ title: "BPA_FEE_DETAILS_LABEL",
45350
+ isFeeDetails: true,
45351
+ additionalDetails: {
45352
+ inspectionReport: [],
45353
+ values: [].concat(collectionBillArray)
45354
+ }
45355
+ };
45206
45356
 
45207
- 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) {
45208
- var _fiData$docs2;
45357
+ function ConvertEpochToValidityDate(dateEpoch) {
45358
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45359
+ return "NA";
45360
+ }
45209
45361
 
45210
- fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45211
- var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45362
+ var dateFromApi = new Date(dateEpoch);
45363
+ var month = dateFromApi.getMonth() + 1;
45364
+ var day = dateFromApi.getDate();
45365
+ var year = dateFromApi.getFullYear() - 3;
45366
+ month = (month > 9 ? "" : "0") + month;
45367
+ day = (day > 9 ? "" : "0") + day;
45368
+ return day + "/" + month + "/" + year;
45369
+ }
45212
45370
 
45213
- 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];
45214
- });
45215
- });
45216
- var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45217
- var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45371
+ 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) {
45372
+ var _fiData$docs2;
45218
45373
 
45219
- return {
45220
- title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45221
- values: [{
45222
- title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45223
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45224
- isNotTranslated: true
45225
- }, {
45226
- title: "BPA_NOC_STATUS",
45227
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45228
- field: "STATUS"
45229
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45230
- title: "BPA_SUDMITTED_ON_LABEL",
45231
- value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? 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",
45232
- isNotTranslated: true
45233
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45234
- title: "BPA_APPROVAL_NUMBER_LABEL",
45235
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45236
- isNotTranslated: true
45237
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45238
- title: "BPA_APPROVED_REJECTED_ON_LABEL",
45239
- 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" ? 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",
45240
- isNotTranslated: true
45241
- }],
45242
- additionalDetails: {
45243
- data: nocDetails,
45244
- noc: [{
45245
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45246
- values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45247
- var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45374
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45375
+ var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45248
45376
 
45249
- return {
45250
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45251
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45252
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45253
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45254
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45255
- 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] : ""
45256
- };
45257
- })
45258
- }]
45259
- }
45260
- };
45261
- });
45262
- var inspectionReport = [];
45263
- var checklist = [];
45264
- 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) {
45265
- return ob.docs && ob.docs.length > 0;
45266
- }).map(function (ob, ind) {
45267
- var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45268
-
45269
- checklist = [];
45270
- inspectionReport.push({
45271
- title: "BPA_FI_REPORT",
45272
- asSectionHeader: true,
45273
- values: [{
45274
- title: "BPA_FI_DATE_LABEL",
45275
- 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
45276
- }, {
45277
- title: "BPA_FI_TIME_LABEL",
45278
- value: ob.time
45279
- }]
45280
- });
45281
- ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45282
- checklist.push({
45283
- title: q.question,
45284
- value: q.value
45285
- });
45286
- checklist.push({
45287
- title: "BPA_ENTER_REMARKS",
45288
- value: q.remarks
45377
+ 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];
45378
+ });
45289
45379
  });
45290
- });
45291
- inspectionReport.push({
45292
- title: "BPA_CHECK_LIST_DETAILS",
45293
- asSectionHeader: true,
45294
- values: checklist
45295
- });
45296
- inspectionReport.push({
45297
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45298
- asSectionHeader: true,
45299
- additionalDetails: {
45300
- obpsDocuments: [{
45301
- title: "",
45302
- values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45303
- var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45380
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45381
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45304
45382
 
45305
- return {
45306
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45307
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45308
- documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45309
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45310
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45311
- 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] : ""
45312
- };
45313
- })
45383
+ return {
45384
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45385
+ values: [{
45386
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45387
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45388
+ isNotTranslated: true
45389
+ }, {
45390
+ title: "BPA_NOC_STATUS",
45391
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45392
+ field: "STATUS"
45393
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45394
+ title: "BPA_SUDMITTED_ON_LABEL",
45395
+ value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? 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",
45396
+ isNotTranslated: true
45397
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45398
+ title: "BPA_APPROVAL_NUMBER_LABEL",
45399
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45400
+ isNotTranslated: true
45401
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45402
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
45403
+ 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" ? 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",
45404
+ isNotTranslated: true
45405
+ }],
45406
+ additionalDetails: {
45407
+ data: nocDetails,
45408
+ noc: [{
45409
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45410
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45411
+ var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45412
+
45413
+ return {
45414
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45415
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45416
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45417
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45418
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45419
+ 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] : ""
45420
+ };
45421
+ })
45422
+ }]
45423
+ }
45424
+ };
45425
+ });
45426
+ var inspectionReport = [];
45427
+ var checklist = [];
45428
+ 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) {
45429
+ return ob.docs && ob.docs.length > 0;
45430
+ }).map(function (ob, ind) {
45431
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45432
+
45433
+ checklist = [];
45434
+ inspectionReport.push({
45435
+ title: "BPA_FI_REPORT",
45436
+ asSectionHeader: true,
45437
+ values: [{
45438
+ title: "BPA_FI_DATE_LABEL",
45439
+ 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
45440
+ }, {
45441
+ title: "BPA_FI_TIME_LABEL",
45442
+ value: ob.time
45443
+ }]
45444
+ });
45445
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45446
+ checklist.push({
45447
+ title: q.question,
45448
+ value: q.value
45449
+ });
45450
+ checklist.push({
45451
+ title: "BPA_ENTER_REMARKS",
45452
+ value: q.remarks
45453
+ });
45454
+ });
45455
+ inspectionReport.push({
45456
+ title: "BPA_CHECK_LIST_DETAILS",
45457
+ asSectionHeader: true,
45458
+ values: checklist
45459
+ });
45460
+ inspectionReport.push({
45461
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45462
+ asSectionHeader: true,
45463
+ additionalDetails: {
45464
+ obpsDocuments: [{
45465
+ title: "",
45466
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45467
+ var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45468
+
45469
+ return {
45470
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45471
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45472
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45473
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45474
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45475
+ 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] : ""
45476
+ };
45477
+ })
45478
+ }]
45479
+ }
45480
+ });
45481
+ });
45482
+ var details = [];
45483
+ var applicationDetailsInfo = {
45484
+ title: " ",
45485
+ isCommon: true,
45486
+ values: [{
45487
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45488
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45314
45489
  }]
45490
+ };
45491
+ var envCitizenName = window.location.href.includes("/employee") ? "employee" : "citizen";
45492
+
45493
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45494
+ 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;
45495
+
45496
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45497
+ title: "BPA_PERMIT_APP_NUMBER",
45498
+ 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),
45499
+ 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,
45500
+ isLink: true
45501
+ }]);
45502
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45503
+ title: "BPA_PERMIT_VALIDITY",
45504
+ 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) + " - " + 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"
45505
+ }]);
45315
45506
  }
45316
- });
45317
- });
45318
- var details = [];
45319
- var applicationDetailsInfo = {
45320
- title: " ",
45321
- isCommon: true,
45322
- values: [{
45323
- title: "BPA_APPLICATION_NUMBER_LABEL",
45324
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45325
- }]
45326
- };
45327
-
45328
- if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45329
- var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45330
-
45331
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45332
- title: "BPA_PERMIT_APP_NUMBER",
45333
- 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),
45334
- 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,
45335
- isLink: true
45336
- }]);
45337
- }
45338
-
45339
- var permitcondn = [];
45340
- (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) {
45341
- permitcondn.push({
45342
- title: index + 1 + ". " + ob,
45343
- value: ""
45344
- });
45345
- }));
45346
- var PermitConditions = {
45347
- title: "BPA_PERMIT_CONDITIONS",
45348
- isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45349
- isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45350
- additionalDetails: {
45351
- inspectionReport: [],
45352
- permit: [].concat(permitcondn)
45353
- }
45354
- };
45355
- if (permitcondn.length == 0) PermitConditions = {};
45356
45507
 
45357
- if (riskType == "LOW" && permitcondn.length > 0) {
45358
- permitcondn = [];
45359
- PermitConditions = {};
45360
- }
45361
-
45362
- if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45363
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45364
-
45365
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45366
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45367
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45368
- });
45369
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45370
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45371
- 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) + " - " + 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"
45372
- });
45373
- }
45508
+ var permitcondn = [];
45509
+ (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) {
45510
+ permitcondn.push({
45511
+ title: index + 1 + ". " + ob,
45512
+ value: ""
45513
+ });
45514
+ }));
45515
+ var PermitConditions = {
45516
+ title: "BPA_PERMIT_CONDITIONS",
45517
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45518
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45519
+ additionalDetails: {
45520
+ inspectionReport: [],
45521
+ permit: [].concat(permitcondn)
45522
+ }
45523
+ };
45524
+ if (permitcondn.length == 0) PermitConditions = {};
45374
45525
 
45375
- var basicDetails = {
45376
- title: "BPA_BASIC_DETAILS_TITLE",
45377
- asSectionHeader: true,
45378
- isInsert: true,
45379
- isCommon: true,
45380
- values: [{
45381
- title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45382
- value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? 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') : ''
45383
- }, {
45384
- title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45385
- value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45386
- }, {
45387
- title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45388
- value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45389
- }, {
45390
- title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45391
- 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
45392
- }, {
45393
- title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45394
- value: "WF_BPA_" + riskType,
45395
- isInsert: true
45396
- }, {
45397
- title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45398
- 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
45399
- }]
45400
- };
45401
- var plotDetails = {
45402
- title: "BPA_PLOT_DETAILS_TITLE",
45403
- asSectionHeader: true,
45404
- isCommon: true,
45405
- values: [{
45406
- title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45407
- 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),
45408
- isNotTranslated: true,
45409
- isUnit: "BPA_SQ_FT_LABEL"
45410
- }, {
45411
- title: "BPA_PLOT_NUMBER_LABEL",
45412
- 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",
45413
- isNotTranslated: true
45414
- }, {
45415
- title: "BPA_KHATHA_NUMBER_LABEL",
45416
- 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",
45417
- isNotTranslated: true
45418
- }, {
45419
- title: "BPA_HOLDING_NUMBER_LABEL",
45420
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45421
- isNotTranslated: true
45422
- }, {
45423
- title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45424
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45425
- isNotTranslated: true
45426
- }]
45427
- };
45428
- var scrutinyDetails = {
45429
- title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45430
- isScrutinyDetails: true,
45431
- isBackGroundColor: true,
45432
- additionalDetails: {
45433
- values: [{
45434
- title: "BPA_EDCR_DETAILS",
45435
- value: " ",
45436
- isHeader: true
45437
- }, {
45438
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45439
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45440
- }],
45441
- scruntinyDetails: [{
45442
- title: "BPA_UPLOADED_PLAN_DIAGRAM",
45443
- value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45444
- text: "BPA_UPLOADED_PLAN_DXF"
45445
- }, {
45446
- title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45447
- value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45448
- text: "BPA_SCRUTINY_REPORT_PDF"
45449
- }]
45450
- }
45451
- };
45452
- var buildingExtractionDetails = {
45453
- title: "",
45454
- isScrutinyDetails: true,
45455
- isBackGroundColor: true,
45456
- additionalDetails: {
45457
- values: [{
45458
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45459
- value: " ",
45460
- isHeader: true
45461
- }, {
45462
- title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45463
- 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,
45464
- isUnit: "BPA_SQ_MTRS_LABEL"
45465
- }, {
45466
- title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45467
- 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"
45468
- }, {
45469
- title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45470
- 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,
45471
- isUnit: "BPA_MTRS_LABEL"
45472
- }],
45473
- scruntinyDetails: []
45474
- }
45475
- };
45476
- var demolitionAreaDetails = {
45477
- title: "",
45478
- isScrutinyDetails: true,
45479
- isBackGroundColor: true,
45480
- additionalDetails: {
45481
- values: [{
45482
- title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45483
- value: " ",
45484
- isHeader: true
45485
- }, {
45486
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45487
- 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,
45488
- isUnit: "BPA_SQ_MTRS_LABEL"
45489
- }],
45490
- scruntinyDetails: []
45491
- }
45492
- };
45493
- var subOccupancyTableDetails = {
45494
- title: "",
45495
- isSubOccupancyTable: true,
45496
- isTitleRepeat: true,
45497
- additionalDetails: {
45498
- values: [{
45499
- title: "BPA_OCC_SUBOCC_HEADER",
45500
- value: " ",
45501
- isHeader: true
45502
- }],
45503
- subOccupancyTableDetails: [{
45504
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45505
- value: edcr
45506
- }, {
45507
- title: "NO_REPEAT",
45508
- value: ""
45509
- }]
45510
- }
45511
- };
45512
- var addressDetails = {
45513
- title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45514
- asSectionHeader: true,
45515
- isCommon: true,
45516
- values: [{
45517
- title: "BPA_DETAILS_PIN_LABEL",
45518
- 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
45519
- }, {
45520
- title: "BPA_CITY_LABEL",
45521
- 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
45522
- }, {
45523
- title: "BPA_LOC_MOHALLA_LABEL",
45524
- 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
45525
- }, {
45526
- title: "BPA_DETAILS_SRT_NAME_LABEL",
45527
- 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
45528
- }, {
45529
- title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45530
- 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
45531
- }]
45532
- };
45533
- 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;
45526
+ if (riskType == "LOW" && permitcondn.length > 0) {
45527
+ permitcondn = [];
45528
+ PermitConditions = {};
45529
+ }
45534
45530
 
45535
- 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) {
45536
- var _BPA$landInfo8, _BPA$landInfo8$owners;
45531
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45532
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45537
45533
 
45538
- 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) {
45539
- if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45540
- });
45541
- }
45534
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45535
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45536
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45537
+ });
45538
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45539
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45540
+ 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) + " - " + 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"
45541
+ });
45542
+ }
45542
45543
 
45543
- var ownerDetails = {
45544
- title: "BPA_APPLICANT_DETAILS_HEADER",
45545
- isOwnerDetails: true,
45546
- additionalDetails: {
45547
- 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) {
45548
- return {
45549
- title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45544
+ var basicDetails = {
45545
+ title: "BPA_BASIC_DETAILS_TITLE",
45546
+ asSectionHeader: true,
45547
+ isInsert: true,
45548
+ isCommon: true,
45549
+ values: [{
45550
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45551
+ value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? 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') : ''
45552
+ }, {
45553
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45554
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45555
+ }, {
45556
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45557
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45558
+ }, {
45559
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45560
+ 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
45561
+ }, {
45562
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45563
+ value: "WF_BPA_" + riskType,
45564
+ isInsert: true
45565
+ }, {
45566
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45567
+ 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
45568
+ }]
45569
+ };
45570
+ var plotDetails = {
45571
+ title: "BPA_PLOT_DETAILS_TITLE",
45572
+ asSectionHeader: true,
45573
+ isCommon: true,
45574
+ values: [{
45575
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45576
+ 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),
45577
+ isNotTranslated: true,
45578
+ isUnit: "BPA_SQ_FT_LABEL"
45579
+ }, {
45580
+ title: "BPA_PLOT_NUMBER_LABEL",
45581
+ 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",
45582
+ isNotTranslated: true
45583
+ }, {
45584
+ title: "BPA_KHATHA_NUMBER_LABEL",
45585
+ 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",
45586
+ isNotTranslated: true
45587
+ }, {
45588
+ title: "BPA_HOLDING_NUMBER_LABEL",
45589
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45590
+ isNotTranslated: true
45591
+ }, {
45592
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45593
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45594
+ isNotTranslated: true
45595
+ }]
45596
+ };
45597
+ var scrutinyDetails = {
45598
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45599
+ isScrutinyDetails: true,
45600
+ isBackGroundColor: true,
45601
+ additionalDetails: {
45550
45602
  values: [{
45551
- title: "CORE_COMMON_NAME",
45552
- value: owner === null || owner === void 0 ? void 0 : owner.name
45603
+ title: "BPA_EDCR_DETAILS",
45604
+ value: " ",
45605
+ isHeader: true
45553
45606
  }, {
45554
- title: "BPA_APPLICANT_GENDER_LABEL",
45555
- value: owner === null || owner === void 0 ? void 0 : owner.gender
45607
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45608
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45609
+ }],
45610
+ scruntinyDetails: [{
45611
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
45612
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45613
+ text: "BPA_UPLOADED_PLAN_DXF"
45556
45614
  }, {
45557
- title: "CORE_COMMON_MOBILE_NUMBER",
45558
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45559
- }, {
45560
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
45561
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45562
- isNotTranslated: false
45615
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45616
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45617
+ text: "BPA_SCRUTINY_REPORT_PDF"
45563
45618
  }]
45564
- };
45565
- })
45566
- }
45567
- };
45568
- var documentDetails = {
45569
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45570
- asSectionHeader: true,
45571
- isDocumentDetails: true,
45572
- additionalDetails: {
45573
- obpsDocuments: [{
45619
+ }
45620
+ };
45621
+ var buildingExtractionDetails = {
45574
45622
  title: "",
45575
- values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45576
- var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45577
-
45578
- return {
45579
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45580
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45581
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45582
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45583
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45584
- 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] : ""
45585
- };
45586
- })
45587
- }]
45588
- }
45589
- };
45590
- var approvalChecks = [];
45591
- var approvalChecksDetails = {};
45592
-
45593
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45594
- var _mdmsRes$BPA2;
45623
+ isScrutinyDetails: true,
45624
+ isBackGroundColor: true,
45625
+ additionalDetails: {
45626
+ values: [{
45627
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45628
+ value: " ",
45629
+ isHeader: true
45630
+ }, {
45631
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45632
+ 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,
45633
+ isUnit: "BPA_SQ_MTRS_LABEL"
45634
+ }, {
45635
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45636
+ 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"
45637
+ }, {
45638
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45639
+ 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,
45640
+ isUnit: "BPA_MTRS_LABEL"
45641
+ }],
45642
+ scruntinyDetails: []
45643
+ }
45644
+ };
45645
+ var demolitionAreaDetails = {
45646
+ title: "",
45647
+ isScrutinyDetails: true,
45648
+ isBackGroundColor: true,
45649
+ additionalDetails: {
45650
+ values: [{
45651
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45652
+ value: " ",
45653
+ isHeader: true
45654
+ }, {
45655
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45656
+ 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,
45657
+ isUnit: "BPA_SQ_MTRS_LABEL"
45658
+ }],
45659
+ scruntinyDetails: []
45660
+ }
45661
+ };
45662
+ var subOccupancyTableDetails = {
45663
+ title: "",
45664
+ isSubOccupancyTable: true,
45665
+ isTitleRepeat: true,
45666
+ additionalDetails: {
45667
+ values: [{
45668
+ title: "BPA_OCC_SUBOCC_HEADER",
45669
+ value: " ",
45670
+ isHeader: true
45671
+ }],
45672
+ subOccupancyTableDetails: [{
45673
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45674
+ value: edcr
45675
+ }, {
45676
+ title: "NO_REPEAT",
45677
+ value: ""
45678
+ }]
45679
+ }
45680
+ };
45681
+ var addressDetails = {
45682
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45683
+ asSectionHeader: true,
45684
+ isCommon: true,
45685
+ values: [{
45686
+ title: "BPA_DETAILS_PIN_LABEL",
45687
+ 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
45688
+ }, {
45689
+ title: "BPA_CITY_LABEL",
45690
+ 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
45691
+ }, {
45692
+ title: "BPA_LOC_MOHALLA_LABEL",
45693
+ 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
45694
+ }, {
45695
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
45696
+ 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
45697
+ }, {
45698
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45699
+ 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
45700
+ }]
45701
+ };
45702
+ 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;
45595
45703
 
45596
- mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45597
- var _checklist$conditions;
45704
+ 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) {
45705
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
45598
45706
 
45599
- 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) {
45600
- approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45601
- }
45602
- });
45603
- approvalChecksDetails = {
45604
- title: "",
45605
- isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45606
- asSectionHeader: true,
45607
- isPermissions: true,
45608
- additionalDetails: {
45609
- permissions: approvalChecks
45707
+ 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) {
45708
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45709
+ });
45610
45710
  }
45611
- };
45612
- }
45613
45711
 
45614
- if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45615
- var val;
45616
- var i;
45617
- var FieldInspectionData = [];
45618
- 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) {
45619
- if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45620
- title: ob.title,
45621
- additionalDetails: {
45622
- inspectionReport: [],
45623
- values: ob.values
45624
- }
45625
- }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45626
- title: ob.title,
45627
- additionalDetails: {
45628
- isChecklist: true,
45629
- inspectionReport: [],
45630
- values: ob.values
45712
+ var ownerDetails = {
45713
+ title: "BPA_APPLICANT_DETAILS_HEADER",
45714
+ isOwnerDetails: true,
45715
+ additionalDetails: {
45716
+ 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) {
45717
+ return {
45718
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45719
+ values: [{
45720
+ title: "CORE_COMMON_NAME",
45721
+ value: owner === null || owner === void 0 ? void 0 : owner.name
45722
+ }, {
45723
+ title: "BPA_APPLICANT_GENDER_LABEL",
45724
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
45725
+ }, {
45726
+ title: "CORE_COMMON_MOBILE_NUMBER",
45727
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45728
+ }, {
45729
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
45730
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45731
+ isNotTranslated: false
45732
+ }]
45733
+ };
45734
+ })
45735
+ }
45736
+ };
45737
+ var documentDetails = {
45738
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45739
+ asSectionHeader: true,
45740
+ isDocumentDetails: true,
45741
+ additionalDetails: {
45742
+ obpsDocuments: [{
45743
+ title: "",
45744
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45745
+ var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45746
+
45747
+ return {
45748
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45749
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45750
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45751
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45752
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45753
+ 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] : ""
45754
+ };
45755
+ })
45756
+ }]
45757
+ }
45758
+ };
45759
+ var approvalChecks = [];
45760
+ var approvalChecksDetails = {};
45761
+
45762
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45763
+ var _mdmsRes$BPA2;
45764
+
45765
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45766
+ var _checklist$conditions;
45767
+
45768
+ 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) {
45769
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45770
+ }
45771
+ });
45772
+ approvalChecksDetails = {
45773
+ title: "",
45774
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45775
+ asSectionHeader: true,
45776
+ isPermissions: true,
45777
+ additionalDetails: {
45778
+ permissions: approvalChecks
45779
+ }
45780
+ };
45631
45781
  }
45632
- }]);else {
45633
- var _ob$additionalDetails, _ob$additionalDetails2;
45634
45782
 
45635
- 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);
45636
- improvedDoc.map(function (ob) {
45637
- ob["isNotDuplicate"] = true;
45638
- });
45639
- improvedDoc.map(function (ob, index) {
45640
- val = ob.documentType;
45641
- if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45642
- if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45783
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45784
+ var val;
45785
+ var i;
45786
+ var FieldInspectionData = [];
45787
+ 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) {
45788
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45789
+ title: ob.title,
45790
+ additionalDetails: {
45791
+ inspectionReport: [],
45792
+ values: ob.values
45793
+ }
45794
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45795
+ title: ob.title,
45796
+ additionalDetails: {
45797
+ isChecklist: true,
45798
+ inspectionReport: [],
45799
+ values: ob.values
45800
+ }
45801
+ }]);else {
45802
+ var _ob$additionalDetails, _ob$additionalDetails2;
45803
+
45804
+ 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);
45805
+ improvedDoc.map(function (ob) {
45806
+ ob["isNotDuplicate"] = true;
45807
+ });
45808
+ improvedDoc.map(function (ob, index) {
45809
+ val = ob.documentType;
45810
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45811
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45812
+ }
45813
+ });
45814
+ FieldInspectionData = [].concat(FieldInspectionData, [{
45815
+ title: ob.title,
45816
+ additionalDetails: {
45817
+ FIdocuments: [],
45818
+ "documents": [{
45819
+ values: improvedDoc
45820
+ }]
45821
+ }
45822
+ }]);
45643
45823
  }
45644
45824
  });
45645
- FieldInspectionData = [].concat(FieldInspectionData, [{
45646
- title: ob.title,
45825
+ var fiReports = {
45826
+ title: "",
45827
+ isFieldInspection: true,
45828
+ 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,
45647
45829
  additionalDetails: {
45648
- FIdocuments: [],
45649
- "documents": [{
45650
- values: improvedDoc
45651
- }]
45830
+ values: [],
45831
+ 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
45652
45832
  }
45653
- }]);
45654
- }
45655
- });
45656
- var fiReports = {
45657
- title: "",
45658
- isFieldInspection: true,
45659
- 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,
45660
- additionalDetails: {
45661
- values: [],
45662
- 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
45833
+ };
45834
+
45835
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45836
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45837
+ } else {
45838
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45839
+ }
45840
+
45841
+ 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) {
45842
+ details.push(billDetails);
45843
+ }
45844
+
45845
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45846
+ return data;
45847
+ });
45848
+ return {
45849
+ applicationData: BPA,
45850
+ applicationDetails: bpaFilterDetails,
45851
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45852
+ edcrDetails: edcr,
45853
+ nocData: noc,
45854
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45855
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45856
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45857
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status,
45858
+ collectionBillDetails: collectionBillDetails
45859
+ };
45663
45860
  }
45664
- };
45665
45861
 
45666
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45667
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45668
- } else {
45669
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45862
+ var i = 0;
45863
+
45864
+ var _temp3 = _for(function () {
45865
+ var _appBusinessService;
45866
+
45867
+ return i < ((_appBusinessService = appBusinessService) === null || _appBusinessService === void 0 ? void 0 : _appBusinessService.length);
45868
+ }, function () {
45869
+ return i++;
45870
+ }, function () {
45871
+ return Promise.resolve(Digit.PaymentService.recieptSearch(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, appBusinessService[i], {
45872
+ consumerCodes: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45873
+ isEmployee: true
45874
+ })).then(function (collectionres) {
45875
+ var _collectionres$Paymen, _collectionres$Paymen3;
45876
+
45877
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen = collectionres.Payments) === null || _collectionres$Paymen === void 0 ? void 0 : _collectionres$Paymen.length) > 0) {
45878
+ var _collectionres$Paymen2;
45879
+
45880
+ collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen2 = collectionres.Payments) === null || _collectionres$Paymen2 === void 0 ? void 0 : _collectionres$Paymen2.map(function (res) {
45881
+ var _res$paymentDetails;
45882
+
45883
+ res === null || res === void 0 ? void 0 : (_res$paymentDetails = res.paymentDetails) === null || _res$paymentDetails === void 0 ? void 0 : _res$paymentDetails.map(function (resData) {
45884
+ if ((resData === null || resData === void 0 ? void 0 : resData.businessService) == appBusinessService[i]) {
45885
+ collectionBillRes.push(res);
45886
+ }
45887
+ });
45888
+ });
45889
+ }
45890
+
45891
+ 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);
45892
+ });
45893
+ });
45894
+
45895
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45670
45896
  }
45671
45897
 
45672
- var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45673
- return data;
45674
- });
45675
- return {
45676
- applicationData: BPA,
45677
- applicationDetails: bpaFilterDetails,
45678
- tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45679
- edcrDetails: edcr,
45680
- nocData: noc,
45681
- comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45682
- businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45683
- applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45684
- applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
45685
- };
45898
+ var appBusinessService = [],
45899
+ collectionBillDetails = [],
45900
+ collectionBillArray = [],
45901
+ totalAmount = 0,
45902
+ collectionBillRes = [];
45903
+ 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"];
45904
+ var fetchBillRes = {};
45905
+
45906
+ var _temp5 = function () {
45907
+ var _appBusinessService2;
45908
+
45909
+ if ((_appBusinessService2 = appBusinessService) !== null && _appBusinessService2 !== void 0 && _appBusinessService2[1]) {
45910
+ return Promise.resolve(Digit.PaymentService.fetchBill(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
45911
+ consumerCode: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45912
+ businessService: appBusinessService[1]
45913
+ })).then(function (_Digit$PaymentService) {
45914
+ fetchBillRes = _Digit$PaymentService;
45915
+ });
45916
+ }
45917
+ }();
45918
+
45919
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
45686
45920
  }
45687
45921
 
45688
45922
  noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
@@ -45694,7 +45928,7 @@ var OBPSService = {
45694
45928
  });
45695
45929
  var fileDetails = {};
45696
45930
 
45697
- var _temp3 = function () {
45931
+ var _temp7 = function () {
45698
45932
  var _appDocumentFileStore;
45699
45933
 
45700
45934
  if (((_appDocumentFileStore = appDocumentFileStoreIds) === null || _appDocumentFileStore === void 0 ? void 0 : _appDocumentFileStore.length) > 0) {
@@ -45704,7 +45938,7 @@ var OBPSService = {
45704
45938
  }
45705
45939
  }();
45706
45940
 
45707
- return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45941
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
45708
45942
  });
45709
45943
  });
45710
45944
  });
@@ -45751,6 +45985,13 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45751
45985
  config = {};
45752
45986
  }
45753
45987
 
45988
+ if (window.location.href.includes("search/application")) {
45989
+ var _filters, _filters2;
45990
+
45991
+ if (!((_filters = filters) !== null && _filters !== void 0 && _filters.limit)) filters.limit = 10;
45992
+ if (!((_filters2 = filters) !== null && _filters2 !== void 0 && _filters2.offset)) filters.offset = 0;
45993
+ }
45994
+
45754
45995
  var client = useQueryClient();
45755
45996
  return _extends({}, useQuery(['BPA_SEARCH', tenantId, filters], function () {
45756
45997
  try {
@@ -45822,9 +46063,12 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45822
46063
  };
45823
46064
 
45824
46065
  var useOBPSSearch = function useOBPSSearch(selectedType, payload, tenantId, filters, params, config) {
46066
+ if (config === void 0) {
46067
+ config = {};
46068
+ }
45825
46069
 
45826
46070
  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")) {
45827
- return useEmpBPAREGSearch(tenantId, {}, params);
46071
+ return useEmpBPAREGSearch(tenantId, {}, params, config);
45828
46072
  } else {
45829
46073
  return useBPASearch(tenantId, filters);
45830
46074
  }
@@ -46203,7 +46447,7 @@ var useBPAInbox = function useBPAInbox(_ref) {
46203
46447
  tenantId = Digit.ULBService.getStateId();
46204
46448
  }
46205
46449
 
46206
- if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && window.location.href.includes("obps/inbox") && businessService) {
46450
+ if (applicationType === "BUILDING_OC_PLAN_SCRUTINY" && (window.location.href.includes("obps/inbox") || window.location.href.includes("obps/bpa/inbox")) && businessService) {
46207
46451
  businessService = "BPA_OC";
46208
46452
  }
46209
46453
 
@@ -46569,6 +46813,8 @@ var useBPAREGSearch = function useBPAREGSearch(tenantId, filters, params, config
46569
46813
  };
46570
46814
 
46571
46815
  var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationType(_ref) {
46816
+ var _userInfo$value;
46817
+
46572
46818
  var Applicationtype = _ref.Applicationtype,
46573
46819
  tenantId = _ref.tenantId;
46574
46820
 
@@ -46579,9 +46825,29 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46579
46825
  serviceTypes = _SearchMdmsTypes$useB.data,
46580
46826
  isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
46581
46827
 
46828
+ var _SearchMdmsTypes$useB2 = SearchMdmsTypes.useBPAREGServiceTypes(tenantId),
46829
+ BPAREGserviceTypes = _SearchMdmsTypes$useB2.data,
46830
+ isLoadingBPAREGServiceTypes = _SearchMdmsTypes$useB2.isLoading;
46831
+
46832
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46833
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46834
+ var userInformation = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value = userInfo.value) === null || _userInfo$value === void 0 ? void 0 : _userInfo$value.info;
46835
+ var uniqueBPAREGserviceTypes = useMemo(function () {
46836
+ var tradeTypes = BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.map(function (ob) {
46837
+ return ob === null || ob === void 0 ? void 0 : ob.code;
46838
+ });
46839
+ return BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.filter(function (_ref2, index) {
46840
+ var code = _ref2.code;
46841
+ return !tradeTypes.includes(code, index + 1);
46842
+ });
46843
+ }, [BPAREGserviceTypes, isLoadingBPAREGServiceTypes]);
46582
46844
  var ServiceTypes = useMemo(function () {
46845
+ var _userInformation$role, _userInformation$role2;
46846
+
46583
46847
  var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
46584
- return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
46848
+ 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) {
46849
+ return ob.code.includes("BPAREG_");
46850
+ })) === 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) {
46585
46851
  return e.applicationType.includes(Applicationtype);
46586
46852
  }).map(function (e) {
46587
46853
  return {
@@ -46589,11 +46855,48 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46589
46855
  i18nKey: e.i18nKey
46590
46856
  };
46591
46857
  });
46592
- }, [serviceTypes, isLoadingServiceTypes, Applicationtype]);
46858
+ }, [serviceTypes, isLoadingServiceTypes, uniqueBPAREGserviceTypes, Applicationtype]);
46593
46859
  var applicationTypesWithStakeholder = [].concat(applicationTypes ? applicationTypes : [], [{
46594
46860
  code: "BPA_STAKEHOLDER_REGISTRATION",
46595
46861
  i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
46596
46862
  }]);
46863
+
46864
+ var showHidingLinksForStakeholder = function showHidingLinksForStakeholder(roles) {
46865
+ var _roles;
46866
+
46867
+ if (roles === void 0) {
46868
+ roles = [];
46869
+ }
46870
+
46871
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46872
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46873
+ var checkedRoles = [];
46874
+ var rolearray = (_roles = roles) === null || _roles === void 0 ? void 0 : _roles.map(function (role) {
46875
+ var _userInfo$value2, _userInfo$value2$info, _userInfo$value2$info2;
46876
+
46877
+ 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) {
46878
+ if (item.code === role.code && item.tenantId === role.tenantId) {
46879
+ checkedRoles.push(item);
46880
+ }
46881
+ });
46882
+ });
46883
+ return checkedRoles === null || checkedRoles === void 0 ? void 0 : checkedRoles.length;
46884
+ };
46885
+
46886
+ var stateCode = Digit.ULBService.getStateId();
46887
+ var stakeholderEmployeeRoles = [{
46888
+ code: "BPAREG_DOC_VERIFIER",
46889
+ tenantId: stateCode
46890
+ }, {
46891
+ code: "BPAREG_APPROVER",
46892
+ tenantId: stateCode
46893
+ }];
46894
+ var checkingForStakeholderRoles = showHidingLinksForStakeholder(stakeholderEmployeeRoles);
46895
+
46896
+ if (!checkingForStakeholderRoles && (applicationTypesWithStakeholder === null || applicationTypesWithStakeholder === void 0 ? void 0 : applicationTypesWithStakeholder.length) > 0) {
46897
+ applicationTypesWithStakeholder.pop();
46898
+ }
46899
+
46597
46900
  var filteredapplicationTypes = useMemo(function () {
46598
46901
  return applicationTypesWithStakeholder.filter(function (curr) {
46599
46902
  var temp = 0;
@@ -47231,6 +47534,8 @@ var useNOCDetails = function useNOCDetails(t, tenantId, applicationNumber, confi
47231
47534
  };
47232
47535
 
47233
47536
  var useNOCInbox = function useNOCInbox(_ref) {
47537
+ var _businessServiceArray, _user$info2;
47538
+
47234
47539
  var tenantId = _ref.tenantId,
47235
47540
  filters = _ref.filters,
47236
47541
  _ref$config = _ref.config,
@@ -47249,17 +47554,51 @@ var useNOCInbox = function useNOCInbox(_ref) {
47249
47554
  limit = tableForm.limit,
47250
47555
  offset = tableForm.offset,
47251
47556
  sortOrder = tableForm.sortOrder;
47557
+ var user = Digit.UserService.getUser();
47558
+
47559
+ var businessServiceList = function businessServiceList() {
47560
+ var _user$info;
47561
+
47562
+ var availableBusinessServices = [{
47563
+ code: "FIRE_NOC_SRV",
47564
+ active: true,
47565
+ roles: ["FIRE_NOC_APPROVER"],
47566
+ i18nKey: "WF_FIRE_NOC_FIRE_NOC_SRV"
47567
+ }, {
47568
+ code: "AIRPORT_NOC_SRV",
47569
+ active: true,
47570
+ roles: ["AIRPORT_AUTHORITY_APPROVER"],
47571
+ i18nKey: "WF_FIRE_NOC_AIRPORT_NOC_SRV"
47572
+ }];
47573
+ var newAvailableBusinessServices = [],
47574
+ loggedInUserRoles = (user === null || user === void 0 ? void 0 : (_user$info = user.info) === null || _user$info === void 0 ? void 0 : _user$info.roles) || [];
47575
+ availableBusinessServices.map(function (_ref2, index) {
47576
+ var roles = _ref2.roles;
47577
+ roles.map(function (role) {
47578
+ loggedInUserRoles.map(function (el) {
47579
+ var _availableBusinessSer;
47580
+
47581
+ if (el.code === role) newAvailableBusinessServices.push(availableBusinessServices === null || availableBusinessServices === void 0 ? void 0 : (_availableBusinessSer = availableBusinessServices[index]) === null || _availableBusinessSer === void 0 ? void 0 : _availableBusinessSer.code);
47582
+ });
47583
+ });
47584
+ });
47585
+ return newAvailableBusinessServices;
47586
+ };
47587
+
47588
+ if (!((_businessServiceArray = businessServiceArray) !== null && _businessServiceArray !== void 0 && _businessServiceArray.length) && !businessService) {
47589
+ businessServiceArray = businessServiceList();
47590
+ }
47591
+
47252
47592
  var _filters = {
47253
47593
  tenantId: tenantId,
47254
47594
  processSearchCriteria: _extends({
47595
+ 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 : "",
47255
47596
  moduleName: "noc-services",
47256
47597
  businessService: businessService !== null && businessService !== void 0 && businessService.code ? [businessService === null || businessService === void 0 ? void 0 : businessService.code] : businessServiceArray
47257
47598
  }, (applicationStatus === null || applicationStatus === void 0 ? void 0 : applicationStatus.length) > 0 ? {
47258
47599
  status: applicationStatus
47259
47600
  } : {}),
47260
- moduleSearchCriteria: _extends({
47261
- assignee: assignee
47262
- }, sourceRefId ? {
47601
+ moduleSearchCriteria: _extends({}, sourceRefId ? {
47263
47602
  sourceRefId: sourceRefId
47264
47603
  } : {}, applicationNo ? {
47265
47604
  applicationNo: applicationNo
@@ -47283,7 +47622,7 @@ var useNOCInbox = function useNOCInbox(_ref) {
47283
47622
  return {
47284
47623
  statuses: data.statusMap,
47285
47624
  table: data === null || data === void 0 ? void 0 : data.items.map(function (application) {
47286
- var _application$business, _application$business2, _application$ProcessI, _application$business3, _application$business4, _application$business5, _application$business6, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4;
47625
+ var _application$business, _application$business2, _application$ProcessI, _application$business3, _application$business4, _application$business5, _application$business6, _application$ProcessI2, _application$ProcessI3, _application$ProcessI4, _application$ProcessI5;
47287
47626
 
47288
47627
  return {
47289
47628
  applicationId: application.businessObject.applicationNo,
@@ -47291,9 +47630,9 @@ var useNOCInbox = function useNOCInbox(_ref) {
47291
47630
  businessService: application === null || application === void 0 ? void 0 : (_application$ProcessI = application.ProcessInstance) === null || _application$ProcessI === void 0 ? void 0 : _application$ProcessI.businessService,
47292
47631
  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("_")),
47293
47632
  status: "WF_" + application.businessObject.additionalDetails.workflowCode + "_" + application.businessObject.applicationStatus,
47294
- 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,
47633
+ 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) || "-",
47295
47634
  source: application.businessObject.source,
47296
- sla: Math.round(((_application$ProcessI4 = application.ProcessInstance) === null || _application$ProcessI4 === void 0 ? void 0 : _application$ProcessI4.businesssServiceSla) / (24 * 60 * 60 * 1000))
47635
+ sla: Math.round(((_application$ProcessI5 = application.ProcessInstance) === null || _application$ProcessI5 === void 0 ? void 0 : _application$ProcessI5.businesssServiceSla) / (24 * 60 * 60 * 1000))
47297
47636
  };
47298
47637
  }),
47299
47638
  totalCount: data.totalCount
@@ -47615,7 +47954,8 @@ var fsm = {
47615
47954
  useVehiclesSearch: useVehiclesSearch,
47616
47955
  useConfig: useConfig,
47617
47956
  useSlum: useSlum,
47618
- usePaymentHistory: usePaymentHistory
47957
+ usePaymentHistory: usePaymentHistory,
47958
+ useVehicleTripCreate: useVehicleTripCreate
47619
47959
  };
47620
47960
  var pt$1 = {
47621
47961
  usePropertySearch: usePropertySearch,
@@ -47993,7 +48333,7 @@ var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
47993
48333
  replaceWith = "";
47994
48334
  }
47995
48335
 
47996
- if (searcher == "") return str;
48336
+ if (searcher === "") return str;
47997
48337
 
47998
48338
  while (str.includes(searcher)) {
47999
48339
  str = str.replace(searcher, replaceWith);
@@ -48072,7 +48412,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
48072
48412
  }
48073
48413
 
48074
48414
  if (key === void 0) {
48075
- key = '';
48415
+ key = "";
48076
48416
  }
48077
48417
 
48078
48418
  return dropdownValues.map(function (ele) {
@@ -48092,6 +48432,23 @@ var getTransformedLocale$1 = function getTransformedLocale(label) {
48092
48432
  label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
48093
48433
  return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
48094
48434
  };
48435
+ var sortDropdownNames = function sortDropdownNames(options, optionkey, t) {
48436
+ var _options;
48437
+
48438
+ if (options === void 0) {
48439
+ options = [];
48440
+ }
48441
+
48442
+ if (optionkey === void 0) {
48443
+ optionkey = "i18nKey";
48444
+ }
48445
+
48446
+ return (_options = options) === null || _options === void 0 ? void 0 : _options.sort(function (a, b) {
48447
+ var _t, _t$localeCompare;
48448
+
48449
+ 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]));
48450
+ });
48451
+ };
48095
48452
 
48096
48453
  var locale = {
48097
48454
  __proto__: null,
@@ -48104,7 +48461,8 @@ var locale = {
48104
48461
  getMohallaLocale: getMohallaLocale$1,
48105
48462
  getCityLocale: getCityLocale$1,
48106
48463
  convertToLocaleData: convertToLocaleData,
48107
- getTransformedLocale: getTransformedLocale$1
48464
+ getTransformedLocale: getTransformedLocale$1,
48465
+ sortDropdownNames: sortDropdownNames
48108
48466
  };
48109
48467
 
48110
48468
  var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
@@ -48799,7 +49157,7 @@ var NOCAccess = function NOCAccess() {
48799
49157
  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) {
48800
49158
  return roleData.code;
48801
49159
  });
48802
- 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"];
49160
+ var NOC_ROLES = ["FIRE_NOC_APPROVER"];
48803
49161
  var NOC_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
48804
49162
  return NOC_ROLES.includes(role);
48805
49163
  });