@egovernments/digit-ui-libraries 1.5.0-alpha.2 → 1.5.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -973,6 +973,8 @@ var LocalizationService = {
973
973
  locale: locale,
974
974
  tenantId: tenantId
975
975
  });
976
+ localStorage.setItem("Employee.locale", locale);
977
+ localStorage.setItem("Citizen.locale", locale);
976
978
  Digit.SessionStorage.set("locale", locale);
977
979
  i18next.changeLanguage(locale);
978
980
  },
@@ -34141,12 +34143,13 @@ var Download = {
34141
34143
  });
34142
34144
  },
34143
34145
  Excel: function Excel(data, filename) {
34146
+ var file = filename.substring(0, 30);
34144
34147
  var wb = XLSX.utils.book_new();
34145
34148
  var ws = null;
34146
34149
  ws = XLSX.utils.json_to_sheet(data);
34147
- wb.SheetNames.push(filename);
34148
- wb.Sheets[filename] = ws;
34149
- XLSX.writeFile(wb, filename + ".xlsx");
34150
+ wb.SheetNames.push(file);
34151
+ wb.Sheets[file] = ws;
34152
+ XLSX.writeFile(wb, file + ".xlsx");
34150
34153
  },
34151
34154
  PDF: function PDF(node, fileName, share, resolve) {
34152
34155
  if (resolve === void 0) {
@@ -34154,6 +34157,10 @@ var Download = {
34154
34157
  }
34155
34158
 
34156
34159
  var saveAs = function saveAs(uri, filename) {
34160
+ if (window.mSewaApp && window.mSewaApp.isMsewaApp()) {
34161
+ window.mSewaApp.downloadBase64File(uri, filename);
34162
+ }
34163
+
34157
34164
  var link = document.createElement("a");
34158
34165
 
34159
34166
  if (typeof link.download === "string") {
@@ -34210,6 +34217,10 @@ var Download = {
34210
34217
  }
34211
34218
 
34212
34219
  var saveAs = function saveAs(uri, filename) {
34220
+ if (window.mSewaApp && window.mSewaApp.isMsewaApp()) {
34221
+ window.mSewaApp.downloadBase64File(uri, filename);
34222
+ }
34223
+
34213
34224
  var link = document.createElement("a");
34214
34225
 
34215
34226
  if (typeof link.download === "string") {
@@ -37122,14 +37133,18 @@ var UrlShortener = function UrlShortener(fileStoreId) {
37122
37133
  });
37123
37134
  };
37124
37135
 
37136
+ var isMobileOrTablet = function isMobileOrTablet() {
37137
+ return /(android|iphone|ipad|mobile)/i.test(navigator.userAgent);
37138
+ };
37139
+
37125
37140
  var ShareFiles = {
37126
37141
  targetLink: function targetLink(target, shortUrl) {
37127
37142
  switch (target) {
37128
37143
  case "mail":
37129
- return window.open("mailto:?body=" + shortUrl, "_blank");
37144
+ return window.open("mailto:?body=" + encodeURIComponent(shortUrl), "_blank");
37130
37145
 
37131
37146
  case "whatsapp":
37132
- return window.open("https://web.whatsapp.com/send?text=" + shortUrl, "_blank");
37147
+ return window.open('https://' + (isMobileOrTablet() ? 'api' : 'web') + '.whatsapp.com/send?text=' + encodeURIComponent(shortUrl), "_blank");
37133
37148
 
37134
37149
  default:
37135
37150
  return window.open(shortUrl, "_blank");
@@ -37153,7 +37168,7 @@ var ShareFiles = {
37153
37168
  files: [pdfData],
37154
37169
  title: filename
37155
37170
  }) : Promise.resolve(ShareFiles.getShortener(tenantId, pdfData)).then(function (shortUrl) {
37156
- ShareFiles.targetLink(target, shortUrl);
37171
+ return ShareFiles.targetLink(target, shortUrl);
37157
37172
  });
37158
37173
  });
37159
37174
  } catch (e) {
@@ -37169,7 +37184,7 @@ var ShareFiles = {
37169
37184
  files: [imageData],
37170
37185
  title: filename
37171
37186
  }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37172
- ShareFiles.targetLink(target, shortUrl);
37187
+ return ShareFiles.targetLink(target, shortUrl);
37173
37188
  });
37174
37189
  });
37175
37190
  } catch (e) {
@@ -37185,7 +37200,7 @@ var ShareFiles = {
37185
37200
  files: [imageData],
37186
37201
  title: filename
37187
37202
  }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37188
- ShareFiles.targetLink(target, shortUrl);
37203
+ return ShareFiles.targetLink(target, shortUrl);
37189
37204
  });
37190
37205
  });
37191
37206
  } catch (e) {
@@ -37201,7 +37216,7 @@ var ShareFiles = {
37201
37216
  files: [imageData],
37202
37217
  title: filename
37203
37218
  }) : Promise.resolve(ShareFiles.getShortener(tenantId, imageData)).then(function (shortUrl) {
37204
- ShareFiles.targetLink(target, shortUrl);
37219
+ return ShareFiles.targetLink(target, shortUrl);
37205
37220
  });
37206
37221
  });
37207
37222
  } catch (e) {
@@ -37306,10 +37321,20 @@ var ULBService = {
37306
37321
  return tenant.code === tenantId;
37307
37322
  });
37308
37323
  },
37309
- getCitizenCurrentTenant: function getCitizenCurrentTenant() {
37324
+ getCitizenCurrentTenant: function getCitizenCurrentTenant(selectedCity) {
37310
37325
  var _Digit$SessionStorage, _Digit$UserService$ge, _Digit$UserService$ge2;
37311
37326
 
37312
- return ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
37327
+ if (selectedCity === void 0) {
37328
+ selectedCity = false;
37329
+ }
37330
+
37331
+ var homeCity = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
37332
+
37333
+ if (selectedCity) {
37334
+ return homeCity;
37335
+ }
37336
+
37337
+ return homeCity || ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.permanentCity) || ULBService.getStateId();
37313
37338
  },
37314
37339
  getUserUlbs: function getUserUlbs(userRole) {
37315
37340
  if (userRole === void 0) {
@@ -41325,7 +41350,7 @@ var PTSearch = {
41325
41350
  value: owner === null || owner === void 0 ? void 0 : owner.emailId
41326
41351
  }, {
41327
41352
  title: "PT_OWNERSHIP_INFO_CORR_ADDR",
41328
- value: owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress
41353
+ value: owner === null || owner === void 0 ? void 0 : owner.permanentAddress
41329
41354
  }]
41330
41355
  };
41331
41356
  })
@@ -42242,7 +42267,7 @@ var useTradeLicenseMDMS = function useTradeLicenseMDMS(tenantId, moduleCode, typ
42242
42267
  };
42243
42268
 
42244
42269
  var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42245
- var _data, _data$value, _data$value$owners, _data$value$owners$do, _data2, _data2$value, _data2$value$owners, _data2$value$owners$d, _data3, _data3$value, _data3$value$owners, _data3$value$owners$d;
42270
+ var _data, _data$value, _data$value$tradeLice, _data2, _data3, _data3$workflowDocs, _data4, _data4$value, _data4$value$owners, _data4$value$owners$d, _data5, _data5$value, _data5$value$owners, _data5$value$owners$d, _data6, _data6$value, _data6$value$owners, _data6$value$owners$d;
42246
42271
 
42247
42272
  if (data1 === void 0) {
42248
42273
  data1 = {};
@@ -42251,10 +42276,15 @@ var useTLDocumentSearch = function useTLDocumentSearch(data1, config) {
42251
42276
  var client = reactQuery.useQueryClient();
42252
42277
  var tenantId = Digit.ULBService.getCurrentTenantId();
42253
42278
  var tenant = Digit.ULBService.getStateId();
42254
- var filesArray = [];
42255
- if ((_data = data1) !== null && _data !== void 0 && (_data$value = _data.value) !== null && _data$value !== void 0 && (_data$value$owners = _data$value.owners) !== null && _data$value$owners !== void 0 && (_data$value$owners$do = _data$value$owners.documents["OwnerPhotoProof"]) !== null && _data$value$owners$do !== void 0 && _data$value$owners$do.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
42256
- if ((_data2 = data1) !== null && _data2 !== void 0 && (_data2$value = _data2.value) !== null && _data2$value !== void 0 && (_data2$value$owners = _data2$value.owners) !== null && _data2$value$owners !== void 0 && (_data2$value$owners$d = _data2$value$owners.documents["ProofOfIdentity"]) !== null && _data2$value$owners$d !== void 0 && _data2$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
42257
- if ((_data3 = data1) !== null && _data3 !== void 0 && (_data3$value = _data3.value) !== null && _data3$value !== void 0 && (_data3$value$owners = _data3$value.owners) !== null && _data3$value$owners !== void 0 && (_data3$value$owners$d = _data3$value$owners.documents["ProofOfOwnership"]) !== null && _data3$value$owners$d !== void 0 && _data3$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
42279
+ var filesArray = window.location.href.includes("/tl/tradelicence/application/") ? (_data = data1) === null || _data === void 0 ? void 0 : (_data$value = _data.value) === null || _data$value === void 0 ? void 0 : (_data$value$tradeLice = _data$value.tradeLicenseDetail) === null || _data$value$tradeLice === void 0 ? void 0 : _data$value$tradeLice.applicationDocuments.map(function (ob) {
42280
+ return ob === null || ob === void 0 ? void 0 : ob.fileStoreId;
42281
+ }) : [];
42282
+ if ((_data2 = data1) !== null && _data2 !== void 0 && _data2.workflowDocs) filesArray = (_data3 = data1) === null || _data3 === void 0 ? void 0 : (_data3$workflowDocs = _data3.workflowDocs) === null || _data3$workflowDocs === void 0 ? void 0 : _data3$workflowDocs.map(function (ob) {
42283
+ return ob === null || ob === void 0 ? void 0 : ob.fileStoreId;
42284
+ });
42285
+ if ((_data4 = data1) !== null && _data4 !== void 0 && (_data4$value = _data4.value) !== null && _data4$value !== void 0 && (_data4$value$owners = _data4$value.owners) !== null && _data4$value$owners !== void 0 && (_data4$value$owners$d = _data4$value$owners.documents["OwnerPhotoProof"]) !== null && _data4$value$owners$d !== void 0 && _data4$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["OwnerPhotoProof"].fileStoreId);
42286
+ if ((_data5 = data1) !== null && _data5 !== void 0 && (_data5$value = _data5.value) !== null && _data5$value !== void 0 && (_data5$value$owners = _data5$value.owners) !== null && _data5$value$owners !== void 0 && (_data5$value$owners$d = _data5$value$owners.documents["ProofOfIdentity"]) !== null && _data5$value$owners$d !== void 0 && _data5$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfIdentity"].fileStoreId);
42287
+ if ((_data6 = data1) !== null && _data6 !== void 0 && (_data6$value = _data6.value) !== null && _data6$value !== void 0 && (_data6$value$owners = _data6$value.owners) !== null && _data6$value$owners !== void 0 && (_data6$value$owners$d = _data6$value$owners.documents["ProofOfOwnership"]) !== null && _data6$value$owners$d !== void 0 && _data6$value$owners$d.fileStoreId) filesArray.push(data1.value.owners.documents["ProofOfOwnership"].fileStoreId);
42258
42288
 
42259
42289
  var _useQuery = reactQuery.useQuery(["tlDocuments-" + 1, filesArray], function () {
42260
42290
  return Digit.UploadServices.Filefetch(filesArray, tenant);
@@ -42475,6 +42505,10 @@ var convertEpochToDate = function convertEpochToDate(dateEpoch) {
42475
42505
  }
42476
42506
  };
42477
42507
 
42508
+ var getAddress = function getAddress(address, t) {
42509
+ return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId)) + ", " + t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId)) + (address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? ", " + address.pincode : " ");
42510
+ };
42511
+
42478
42512
  var TLSearch = {
42479
42513
  all: function (tenantId, filters) {
42480
42514
  if (filters === void 0) {
@@ -42532,68 +42566,14 @@ var TLSearch = {
42532
42566
 
42533
42567
  function _temp3(propertyDetails) {
42534
42568
  function _temp2() {
42535
- var _propertyDetails$Prop, _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _propertyDetails$Prop39, _propertyDetails$Prop40, _propertyDetails$Prop41, _propertyDetails$Prop42, _propertyDetails$Prop43, _propertyDetails$Prop44, _propertyDetails$Prop45, _propertyDetails$Prop46, _propertyDetails$Prop47, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens31, _response$tradeLicens32, _response$tradeLicens47, _response$tradeLicens48, _response$tradeLicens49, _response$tradeLicens50, _response$tradeLicens53, _response$tradeLicens54, _response$tradeLicens57, _response$tradeLicens58, _propertyDetails$Prop48, _propertyDetails$Prop49, _response$tradeLicens59;
42569
+ var _response$tradeLicens2, _response$tradeLicens3, _response$tradeLicens4, _response$tradeLicens5, _response$tradeLicens6, _response$tradeLicens7, _response$tradeLicens8, _response$tradeLicens9, _response$tradeLicens10, _response$tradeLicens11, _response$tradeLicens12, _response$tradeLicens13, _response$tradeLicens14, _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop10, _response$tradeLicens15, _response$tradeLicens16, _response$tradeLicens17, _response$tradeLicens18, _response$tradeLicens19, _response$tradeLicens20, _response$tradeLicens21, _response$tradeLicens22, _response$tradeLicens23, _response$tradeLicens24, _response$tradeLicens25, _response$tradeLicens26, _response$tradeLicens27, _response$tradeLicens28, _response$tradeLicens29, _response$tradeLicens30, _response$tradeLicens31, _response$tradeLicens32, _response$tradeLicens47, _response$tradeLicens48, _response$tradeLicens49, _response$tradeLicens50, _response$tradeLicens53, _response$tradeLicens54, _response$tradeLicens57, _response$tradeLicens58, _propertyDetails$Prop11, _propertyDetails$Prop12, _response$tradeLicens59;
42536
42570
 
42537
42571
  var propertyAddress = "";
42538
42572
 
42539
- if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop = propertyDetails.Properties) !== null && _propertyDetails$Prop !== void 0 && _propertyDetails$Prop.length) {
42540
- var _propertyDetails$Prop2, _propertyDetails$Prop3, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop14, _propertyDetails$Prop15, _propertyDetails$Prop21, _propertyDetails$Prop22, _propertyDetails$Prop23, _propertyDetails$Prop29, _propertyDetails$Prop30, _propertyDetails$Prop35, _propertyDetails$Prop36;
42541
-
42542
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop2 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop2 !== void 0 && (_propertyDetails$Prop3 = _propertyDetails$Prop2.address) !== null && _propertyDetails$Prop3 !== void 0 && _propertyDetails$Prop3.doorNo) {
42543
- var _propertyDetails$Prop4, _propertyDetails$Prop5, _propertyDetails$Prop6, _propertyDetails$Prop7;
42544
-
42545
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4.address) === null || _propertyDetails$Prop5 === void 0 ? void 0 : _propertyDetails$Prop5.doorNo;
42546
-
42547
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop6 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop6 !== void 0 && (_propertyDetails$Prop7 = _propertyDetails$Prop6.address) !== null && _propertyDetails$Prop7 !== void 0 && _propertyDetails$Prop7.street) {
42548
- propertyAddress += ", ";
42549
- }
42550
- }
42551
-
42552
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop8 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop8 !== void 0 && (_propertyDetails$Prop9 = _propertyDetails$Prop8.address) !== null && _propertyDetails$Prop9 !== void 0 && _propertyDetails$Prop9.street) {
42553
- var _propertyDetails$Prop10, _propertyDetails$Prop11, _propertyDetails$Prop12, _propertyDetails$Prop13;
42554
-
42555
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop10 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop10 === void 0 ? void 0 : (_propertyDetails$Prop11 = _propertyDetails$Prop10.address) === null || _propertyDetails$Prop11 === void 0 ? void 0 : _propertyDetails$Prop11.street;
42573
+ if (propertyDetails && propertyDetails !== null && propertyDetails !== void 0 && propertyDetails.Properties.length) {
42574
+ var _propertyDetails$Prop;
42556
42575
 
42557
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop12 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop12 !== void 0 && (_propertyDetails$Prop13 = _propertyDetails$Prop12.address) !== null && _propertyDetails$Prop13 !== void 0 && _propertyDetails$Prop13.landmark) {
42558
- propertyAddress += ", ";
42559
- }
42560
- }
42561
-
42562
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop14 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop14 !== void 0 && (_propertyDetails$Prop15 = _propertyDetails$Prop14.address) !== null && _propertyDetails$Prop15 !== void 0 && _propertyDetails$Prop15.landmark) {
42563
- var _propertyDetails$Prop16, _propertyDetails$Prop17, _propertyDetails$Prop18, _propertyDetails$Prop19, _propertyDetails$Prop20;
42564
-
42565
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop16 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop16 === void 0 ? void 0 : (_propertyDetails$Prop17 = _propertyDetails$Prop16.address) === null || _propertyDetails$Prop17 === void 0 ? void 0 : _propertyDetails$Prop17.landmark;
42566
-
42567
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop18 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop18 !== void 0 && (_propertyDetails$Prop19 = _propertyDetails$Prop18.address) !== null && _propertyDetails$Prop19 !== void 0 && (_propertyDetails$Prop20 = _propertyDetails$Prop19.locality) !== null && _propertyDetails$Prop20 !== void 0 && _propertyDetails$Prop20.name) {
42568
- propertyAddress += ", ";
42569
- }
42570
- }
42571
-
42572
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop21 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop21 !== void 0 && (_propertyDetails$Prop22 = _propertyDetails$Prop21.address) !== null && _propertyDetails$Prop22 !== void 0 && (_propertyDetails$Prop23 = _propertyDetails$Prop22.locality) !== null && _propertyDetails$Prop23 !== void 0 && _propertyDetails$Prop23.name) {
42573
- var _propertyDetails$Prop24, _propertyDetails$Prop25, _propertyDetails$Prop26, _propertyDetails$Prop27, _propertyDetails$Prop28;
42574
-
42575
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop24 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop24 === void 0 ? void 0 : (_propertyDetails$Prop25 = _propertyDetails$Prop24.address) === null || _propertyDetails$Prop25 === void 0 ? void 0 : (_propertyDetails$Prop26 = _propertyDetails$Prop25.locality) === null || _propertyDetails$Prop26 === void 0 ? void 0 : _propertyDetails$Prop26.name;
42576
-
42577
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop27 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop27 !== void 0 && (_propertyDetails$Prop28 = _propertyDetails$Prop27.address) !== null && _propertyDetails$Prop28 !== void 0 && _propertyDetails$Prop28.city) {
42578
- propertyAddress += ", ";
42579
- }
42580
- }
42581
-
42582
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop29 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop29 !== void 0 && (_propertyDetails$Prop30 = _propertyDetails$Prop29.address) !== null && _propertyDetails$Prop30 !== void 0 && _propertyDetails$Prop30.city) {
42583
- var _propertyDetails$Prop31, _propertyDetails$Prop32, _propertyDetails$Prop33, _propertyDetails$Prop34;
42584
-
42585
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop31 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop31 === void 0 ? void 0 : (_propertyDetails$Prop32 = _propertyDetails$Prop31.address) === null || _propertyDetails$Prop32 === void 0 ? void 0 : _propertyDetails$Prop32.city;
42586
-
42587
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop33 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop33 !== void 0 && (_propertyDetails$Prop34 = _propertyDetails$Prop33.address) !== null && _propertyDetails$Prop34 !== void 0 && _propertyDetails$Prop34.pincode) {
42588
- propertyAddress += ", ";
42589
- }
42590
- }
42591
-
42592
- if (propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop35 = propertyDetails.Properties[0]) !== null && _propertyDetails$Prop35 !== void 0 && (_propertyDetails$Prop36 = _propertyDetails$Prop35.address) !== null && _propertyDetails$Prop36 !== void 0 && _propertyDetails$Prop36.pincode) {
42593
- var _propertyDetails$Prop37, _propertyDetails$Prop38;
42594
-
42595
- propertyAddress += propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop37 = propertyDetails.Properties[0]) === null || _propertyDetails$Prop37 === void 0 ? void 0 : (_propertyDetails$Prop38 = _propertyDetails$Prop37.address) === null || _propertyDetails$Prop38 === void 0 ? void 0 : _propertyDetails$Prop38.pincode;
42596
- }
42576
+ propertyAddress = getAddress(propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties[0]) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop.address, t);
42597
42577
  }
42598
42578
 
42599
42579
  var employeeResponse = [];
@@ -42693,16 +42673,16 @@ var TLSearch = {
42693
42673
  title: "PT_DETAILS",
42694
42674
  values: [{
42695
42675
  title: "TL_PROPERTY_ID",
42696
- value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop39 = propertyDetails.Properties) === null || _propertyDetails$Prop39 === void 0 ? void 0 : (_propertyDetails$Prop40 = _propertyDetails$Prop39[0]) === null || _propertyDetails$Prop40 === void 0 ? void 0 : _propertyDetails$Prop40.propertyId) || "NA"
42676
+ value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop2 = propertyDetails.Properties) === null || _propertyDetails$Prop2 === void 0 ? void 0 : (_propertyDetails$Prop3 = _propertyDetails$Prop2[0]) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3.propertyId) || "NA"
42697
42677
  }, {
42698
42678
  title: "PT_OWNER_NAME",
42699
- value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop41 = propertyDetails.Properties) === null || _propertyDetails$Prop41 === void 0 ? void 0 : (_propertyDetails$Prop42 = _propertyDetails$Prop41[0]) === null || _propertyDetails$Prop42 === void 0 ? void 0 : (_propertyDetails$Prop43 = _propertyDetails$Prop42.owners[0]) === null || _propertyDetails$Prop43 === void 0 ? void 0 : _propertyDetails$Prop43.name) || "NA"
42679
+ value: (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop4 = propertyDetails.Properties) === null || _propertyDetails$Prop4 === void 0 ? void 0 : (_propertyDetails$Prop5 = _propertyDetails$Prop4[0]) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5.owners[0]) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6.name) || "NA"
42700
42680
  }, {
42701
42681
  title: "PROPERTY_ADDRESS",
42702
42682
  value: propertyAddress || "NA"
42703
42683
  }, {
42704
42684
  title: "TL_VIEW_PROPERTY_DETAIL",
42705
- to: "/digit-ui/employee/commonpt/view-property?propertyId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop44 = propertyDetails.Properties) === null || _propertyDetails$Prop44 === void 0 ? void 0 : (_propertyDetails$Prop45 = _propertyDetails$Prop44[0]) === null || _propertyDetails$Prop45 === void 0 ? void 0 : _propertyDetails$Prop45.propertyId) + "&tenantId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop46 = propertyDetails.Properties) === null || _propertyDetails$Prop46 === void 0 ? void 0 : (_propertyDetails$Prop47 = _propertyDetails$Prop46[0]) === null || _propertyDetails$Prop47 === void 0 ? void 0 : _propertyDetails$Prop47.tenantId),
42685
+ to: "/digit-ui/employee/commonpt/view-property?propertyId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop7 = propertyDetails.Properties) === null || _propertyDetails$Prop7 === void 0 ? void 0 : (_propertyDetails$Prop8 = _propertyDetails$Prop7[0]) === null || _propertyDetails$Prop8 === void 0 ? void 0 : _propertyDetails$Prop8.propertyId) + "&tenantId=" + (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop9 = propertyDetails.Properties) === null || _propertyDetails$Prop9 === void 0 ? void 0 : (_propertyDetails$Prop10 = _propertyDetails$Prop9[0]) === null || _propertyDetails$Prop10 === void 0 ? void 0 : _propertyDetails$Prop10.tenantId) + "&from=TL_APPLICATION_DETAILS_LABEL",
42706
42686
  value: "",
42707
42687
  isLink: true
42708
42688
  }]
@@ -42846,8 +42826,8 @@ var TLSearch = {
42846
42826
  response && employeeResponse.push(tradedetails);
42847
42827
  (response === null || response === void 0 ? void 0 : (_response$tradeLicens57 = response.tradeLicenseDetail) === null || _response$tradeLicens57 === void 0 ? void 0 : _response$tradeLicens57.tradeUnits) && employeeResponse.push(tradeUnits);
42848
42828
  (response === null || response === void 0 ? void 0 : (_response$tradeLicens58 = response.tradeLicenseDetail) === null || _response$tradeLicens58 === void 0 ? void 0 : _response$tradeLicens58.accessories) && employeeResponse.push(accessories);
42849
- (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop48 = propertyDetails.Properties) === null || _propertyDetails$Prop48 === void 0 ? void 0 : _propertyDetails$Prop48.length) > 0 && employeeResponse.push(PropertyDetail);
42850
- response && !((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop49 = propertyDetails.Properties) === null || _propertyDetails$Prop49 === void 0 ? void 0 : _propertyDetails$Prop49.length) > 0) && employeeResponse.push(tradeAddress);
42829
+ (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop11 = propertyDetails.Properties) === null || _propertyDetails$Prop11 === void 0 ? void 0 : _propertyDetails$Prop11.length) > 0 && employeeResponse.push(PropertyDetail);
42830
+ response && !((propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop12 = propertyDetails.Properties) === null || _propertyDetails$Prop12 === void 0 ? void 0 : _propertyDetails$Prop12.length) > 0) && employeeResponse.push(tradeAddress);
42851
42831
  (response === null || response === void 0 ? void 0 : (_response$tradeLicens59 = response.tradeLicenseDetail) === null || _response$tradeLicens59 === void 0 ? void 0 : _response$tradeLicens59.owners) && employeeResponse.push(owners);
42852
42832
  return {
42853
42833
  tenantId: response.tenantId,
@@ -43883,7 +43863,7 @@ var OBPSService = {
43883
43863
  isEmployee: true
43884
43864
  })).then(function (paymentRes) {
43885
43865
  return Promise.resolve(MdmsService.getMultipleTypes(License === null || License === void 0 ? void 0 : License.tenantId, "StakeholderRegistraition", ["TradeTypetoRoleMapping"])).then(function (mdmsRes) {
43886
- var _License$tradeLicense, _License$tradeLicense2, _mdmsRes$StakeholderR, _mdmsRes$StakeholderR2, _License$tradeLicense8, _License$tradeLicense9, _License$tradeLicense10, _License$tradeLicense11, _License$tradeLicense12, _License$tradeLicense13, _License$tradeLicense14, _License$tradeLicense15, _License$tradeLicense16, _License$tradeLicense17, _License$tradeLicense18, _License$tradeLicense19, _License$tradeLicense20, _License$tradeLicense21, _License$tradeLicense22, _License$tradeLicense23, _License$tradeLicense24, _License$tradeLicense25, _License$tradeLicense26, _License$tradeLicense27, _License$tradeLicense28, _License$tradeLicense29, _License$tradeLicense30, _License$tradeLicense31, _License$tradeLicense32, _License$tradeLicense33, _License$tradeLicense34, _License$tradeLicense35, _License$tradeLicense36, _License$tradeLicense37, _License$tradeLicense38, _License$tradeLicense39, _License$tradeLicense40, _License$tradeLicense41, _License$tradeLicense42, _License$tradeLicense43, _paymentRes$Payments, _paymentRes$Payments2, _paymentRes$Payments3, _paymentRes$Payments4, _paymentRes$Payments5, _ref;
43866
+ var _License$tradeLicense, _License$tradeLicense2, _mdmsRes$StakeholderR, _mdmsRes$StakeholderR2, _License$tradeLicense8, _License$tradeLicense9;
43887
43867
 
43888
43868
  if (License !== null && License !== void 0 && (_License$tradeLicense = License.tradeLicenseDetail) !== null && _License$tradeLicense !== void 0 && (_License$tradeLicense2 = _License$tradeLicense.applicationDocuments) !== null && _License$tradeLicense2 !== void 0 && _License$tradeLicense2.length && (mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$StakeholderR = mdmsRes.StakeholderRegistraition) === null || _mdmsRes$StakeholderR === void 0 ? void 0 : (_mdmsRes$StakeholderR2 = _mdmsRes$StakeholderR.TradeTypetoRoleMapping) === null || _mdmsRes$StakeholderR2 === void 0 ? void 0 : _mdmsRes$StakeholderR2.length) > 0) {
43889
43869
  var _mdmsRes$StakeholderR3, _mdmsRes$StakeholderR4;
@@ -43905,103 +43885,111 @@ var OBPSService = {
43905
43885
  });
43906
43886
  }
43907
43887
 
43908
- var details = [{
43909
- title: " ",
43910
- values: [{
43911
- title: "BPA_APPLICATION_NUMBER_LABEL",
43912
- value: (License === null || License === void 0 ? void 0 : License.applicationNumber) || "NA"
43913
- }]
43914
- }, License !== null && License !== void 0 && (_License$tradeLicense8 = License.tradeLicenseDetail) !== null && _License$tradeLicense8 !== void 0 && (_License$tradeLicense9 = _License$tradeLicense8.tradeUnits) !== null && _License$tradeLicense9 !== void 0 && (_License$tradeLicense10 = _License$tradeLicense9[0]) !== null && _License$tradeLicense10 !== void 0 && _License$tradeLicense10.tradeType.includes("ARCHITECT") ? {
43915
- title: "BPA_LICENSE_DETAILS_LABEL",
43916
- asSectionHeader: true,
43917
- values: [{
43918
- title: "BPA_LICENSE_TYPE",
43919
- value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense11 = License.tradeLicenseDetail) === null || _License$tradeLicense11 === void 0 ? void 0 : (_License$tradeLicense12 = _License$tradeLicense11.tradeUnits) === null || _License$tradeLicense12 === void 0 ? void 0 : (_License$tradeLicense13 = _License$tradeLicense12[0]) === null || _License$tradeLicense13 === void 0 ? void 0 : (_License$tradeLicense14 = _License$tradeLicense13.tradeType) === null || _License$tradeLicense14 === void 0 ? void 0 : _License$tradeLicense14.split(".")[0]) || "NA"
43920
- }, {
43921
- title: "BPA_COUNCIL_OF_ARCH_NO_LABEL",
43922
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense15 = License.tradeLicenseDetail) === null || _License$tradeLicense15 === void 0 ? void 0 : (_License$tradeLicense16 = _License$tradeLicense15.additionalDetail) === null || _License$tradeLicense16 === void 0 ? void 0 : _License$tradeLicense16.counsilForArchNo) || "NA"
43923
- }]
43924
- } : {
43925
- title: "BPA_LICENSE_DETAILS_LABEL",
43926
- asSectionHeader: true,
43927
- values: [{
43928
- title: "BPA_LICENSE_TYPE",
43929
- value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense17 = License.tradeLicenseDetail) === null || _License$tradeLicense17 === void 0 ? void 0 : (_License$tradeLicense18 = _License$tradeLicense17.tradeUnits) === null || _License$tradeLicense18 === void 0 ? void 0 : (_License$tradeLicense19 = _License$tradeLicense18[0]) === null || _License$tradeLicense19 === void 0 ? void 0 : (_License$tradeLicense20 = _License$tradeLicense19.tradeType) === null || _License$tradeLicense20 === void 0 ? void 0 : _License$tradeLicense20.split(".")[0]) || "NA"
43930
- }]
43931
- }, {
43932
- title: "BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO",
43933
- asSectionHeader: true,
43934
- values: [{
43935
- title: "BPA_APPLICANT_NAME_LABEL",
43936
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense21 = License.tradeLicenseDetail) === null || _License$tradeLicense21 === void 0 ? void 0 : (_License$tradeLicense22 = _License$tradeLicense21.owners) === null || _License$tradeLicense22 === void 0 ? void 0 : (_License$tradeLicense23 = _License$tradeLicense22[0]) === null || _License$tradeLicense23 === void 0 ? void 0 : _License$tradeLicense23.name) || "NA"
43937
- }, {
43938
- title: "BPA_APPLICANT_GENDER_LABEL",
43939
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense24 = License.tradeLicenseDetail) === null || _License$tradeLicense24 === void 0 ? void 0 : (_License$tradeLicense25 = _License$tradeLicense24.owners) === null || _License$tradeLicense25 === void 0 ? void 0 : (_License$tradeLicense26 = _License$tradeLicense25[0]) === null || _License$tradeLicense26 === void 0 ? void 0 : _License$tradeLicense26.gender) || "NA"
43940
- }, {
43941
- title: "BPA_OWNER_MOBILE_NO_LABEL",
43942
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense27 = License.tradeLicenseDetail) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27.owners) === null || _License$tradeLicense28 === void 0 ? void 0 : (_License$tradeLicense29 = _License$tradeLicense28[0]) === null || _License$tradeLicense29 === void 0 ? void 0 : _License$tradeLicense29.mobileNumber) || "NA"
43888
+ var appDocumentFileStoreIds = License === null || License === void 0 ? void 0 : (_License$tradeLicense8 = License.tradeLicenseDetail) === null || _License$tradeLicense8 === void 0 ? void 0 : (_License$tradeLicense9 = _License$tradeLicense8.applicationDocuments) === null || _License$tradeLicense9 === void 0 ? void 0 : _License$tradeLicense9.map(function (appDoc) {
43889
+ return appDoc === null || appDoc === void 0 ? void 0 : appDoc.fileStoreId;
43890
+ });
43891
+ return Promise.resolve(UploadServices.Filefetch(appDocumentFileStoreIds, Digit.ULBService.getStateId())).then(function (fileDetails) {
43892
+ var _License$tradeLicense10, _License$tradeLicense11, _License$tradeLicense12, _License$tradeLicense13, _License$tradeLicense14, _License$tradeLicense15, _License$tradeLicense16, _License$tradeLicense17, _License$tradeLicense18, _License$tradeLicense19, _License$tradeLicense20, _License$tradeLicense21, _License$tradeLicense22, _License$tradeLicense23, _License$tradeLicense24, _License$tradeLicense25, _License$tradeLicense26, _License$tradeLicense27, _License$tradeLicense28, _License$tradeLicense29, _License$tradeLicense30, _License$tradeLicense31, _License$tradeLicense32, _License$tradeLicense33, _License$tradeLicense34, _License$tradeLicense35, _License$tradeLicense36, _License$tradeLicense37, _License$tradeLicense38, _License$tradeLicense39, _License$tradeLicense40, _License$tradeLicense41, _License$tradeLicense42, _License$tradeLicense43, _License$tradeLicense44, _License$tradeLicense45, _paymentRes$Payments, _paymentRes$Payments2, _paymentRes$Payments3, _paymentRes$Payments4, _paymentRes$Payments5, _ref;
43893
+
43894
+ var details = [{
43895
+ title: " ",
43896
+ values: [{
43897
+ title: "BPA_APPLICATION_NUMBER_LABEL",
43898
+ value: (License === null || License === void 0 ? void 0 : License.applicationNumber) || "NA"
43899
+ }]
43900
+ }, License !== null && License !== void 0 && (_License$tradeLicense10 = License.tradeLicenseDetail) !== null && _License$tradeLicense10 !== void 0 && (_License$tradeLicense11 = _License$tradeLicense10.tradeUnits) !== null && _License$tradeLicense11 !== void 0 && (_License$tradeLicense12 = _License$tradeLicense11[0]) !== null && _License$tradeLicense12 !== void 0 && _License$tradeLicense12.tradeType.includes("ARCHITECT") ? {
43901
+ title: "BPA_LICENSE_DETAILS_LABEL",
43902
+ asSectionHeader: true,
43903
+ values: [{
43904
+ title: "BPA_LICENSE_TYPE",
43905
+ value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense13 = License.tradeLicenseDetail) === null || _License$tradeLicense13 === void 0 ? void 0 : (_License$tradeLicense14 = _License$tradeLicense13.tradeUnits) === null || _License$tradeLicense14 === void 0 ? void 0 : (_License$tradeLicense15 = _License$tradeLicense14[0]) === null || _License$tradeLicense15 === void 0 ? void 0 : (_License$tradeLicense16 = _License$tradeLicense15.tradeType) === null || _License$tradeLicense16 === void 0 ? void 0 : _License$tradeLicense16.split(".")[0]) || "NA"
43906
+ }, {
43907
+ title: "BPA_COUNCIL_OF_ARCH_NO_LABEL",
43908
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense17 = License.tradeLicenseDetail) === null || _License$tradeLicense17 === void 0 ? void 0 : (_License$tradeLicense18 = _License$tradeLicense17.additionalDetail) === null || _License$tradeLicense18 === void 0 ? void 0 : _License$tradeLicense18.counsilForArchNo) || "NA"
43909
+ }]
43910
+ } : {
43911
+ title: "BPA_LICENSE_DETAILS_LABEL",
43912
+ asSectionHeader: true,
43913
+ values: [{
43914
+ title: "BPA_LICENSE_TYPE",
43915
+ value: "TRADELICENSE_TRADETYPE_" + (License === null || License === void 0 ? void 0 : (_License$tradeLicense19 = License.tradeLicenseDetail) === null || _License$tradeLicense19 === void 0 ? void 0 : (_License$tradeLicense20 = _License$tradeLicense19.tradeUnits) === null || _License$tradeLicense20 === void 0 ? void 0 : (_License$tradeLicense21 = _License$tradeLicense20[0]) === null || _License$tradeLicense21 === void 0 ? void 0 : (_License$tradeLicense22 = _License$tradeLicense21.tradeType) === null || _License$tradeLicense22 === void 0 ? void 0 : _License$tradeLicense22.split(".")[0]) || "NA"
43916
+ }]
43943
43917
  }, {
43944
- title: "BPA_APPLICANT_EMAIL_LABEL",
43945
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense30 = License.tradeLicenseDetail) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30.owners) === null || _License$tradeLicense31 === void 0 ? void 0 : (_License$tradeLicense32 = _License$tradeLicense31[0]) === null || _License$tradeLicense32 === void 0 ? void 0 : _License$tradeLicense32.emailId) || "NA"
43918
+ title: "BPA_LICENSEE_DETAILS_HEADER_OWNER_INFO",
43919
+ asSectionHeader: true,
43920
+ values: [{
43921
+ title: "BPA_APPLICANT_NAME_LABEL",
43922
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense23 = License.tradeLicenseDetail) === null || _License$tradeLicense23 === void 0 ? void 0 : (_License$tradeLicense24 = _License$tradeLicense23.owners) === null || _License$tradeLicense24 === void 0 ? void 0 : (_License$tradeLicense25 = _License$tradeLicense24[0]) === null || _License$tradeLicense25 === void 0 ? void 0 : _License$tradeLicense25.name) || "NA"
43923
+ }, {
43924
+ title: "BPA_APPLICANT_GENDER_LABEL",
43925
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense26 = License.tradeLicenseDetail) === null || _License$tradeLicense26 === void 0 ? void 0 : (_License$tradeLicense27 = _License$tradeLicense26.owners) === null || _License$tradeLicense27 === void 0 ? void 0 : (_License$tradeLicense28 = _License$tradeLicense27[0]) === null || _License$tradeLicense28 === void 0 ? void 0 : _License$tradeLicense28.gender) || "NA"
43926
+ }, {
43927
+ title: "BPA_OWNER_MOBILE_NO_LABEL",
43928
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense29 = License.tradeLicenseDetail) === null || _License$tradeLicense29 === void 0 ? void 0 : (_License$tradeLicense30 = _License$tradeLicense29.owners) === null || _License$tradeLicense30 === void 0 ? void 0 : (_License$tradeLicense31 = _License$tradeLicense30[0]) === null || _License$tradeLicense31 === void 0 ? void 0 : _License$tradeLicense31.mobileNumber) || "NA"
43929
+ }, {
43930
+ title: "BPA_APPLICANT_EMAIL_LABEL",
43931
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense32 = License.tradeLicenseDetail) === null || _License$tradeLicense32 === void 0 ? void 0 : (_License$tradeLicense33 = _License$tradeLicense32.owners) === null || _License$tradeLicense33 === void 0 ? void 0 : (_License$tradeLicense34 = _License$tradeLicense33[0]) === null || _License$tradeLicense34 === void 0 ? void 0 : _License$tradeLicense34.emailId) || "NA"
43932
+ }, {
43933
+ title: "BPA_APPLICANT_PAN_NO",
43934
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense35 = License.tradeLicenseDetail) === null || _License$tradeLicense35 === void 0 ? void 0 : (_License$tradeLicense36 = _License$tradeLicense35.owners) === null || _License$tradeLicense36 === void 0 ? void 0 : (_License$tradeLicense37 = _License$tradeLicense36[0]) === null || _License$tradeLicense37 === void 0 ? void 0 : _License$tradeLicense37.pan) || "NA"
43935
+ }]
43946
43936
  }, {
43947
- title: "BPA_APPLICANT_PAN_NO",
43948
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense33 = License.tradeLicenseDetail) === null || _License$tradeLicense33 === void 0 ? void 0 : (_License$tradeLicense34 = _License$tradeLicense33.owners) === null || _License$tradeLicense34 === void 0 ? void 0 : (_License$tradeLicense35 = _License$tradeLicense34[0]) === null || _License$tradeLicense35 === void 0 ? void 0 : _License$tradeLicense35.pan) || "NA"
43949
- }]
43950
- }, {
43951
- title: "BPA_PERMANANT_ADDRESS_LABEL",
43952
- asSectionHeader: true,
43953
- values: [{
43954
43937
  title: "BPA_PERMANANT_ADDRESS_LABEL",
43955
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense36 = License.tradeLicenseDetail) === null || _License$tradeLicense36 === void 0 ? void 0 : (_License$tradeLicense37 = _License$tradeLicense36.owners) === null || _License$tradeLicense37 === void 0 ? void 0 : (_License$tradeLicense38 = _License$tradeLicense37[0]) === null || _License$tradeLicense38 === void 0 ? void 0 : _License$tradeLicense38.permanentAddress) || "NA"
43956
- }]
43957
- }, {
43958
- title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43959
- asSectionHeader: true,
43960
- values: [{
43961
- title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43962
- value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense39 = License.tradeLicenseDetail) === null || _License$tradeLicense39 === void 0 ? void 0 : (_License$tradeLicense40 = _License$tradeLicense39.owners) === null || _License$tradeLicense40 === void 0 ? void 0 : (_License$tradeLicense41 = _License$tradeLicense40[0]) === null || _License$tradeLicense41 === void 0 ? void 0 : _License$tradeLicense41.correspondenceAddress) || "NA"
43963
- }]
43964
- }, {
43965
- title: "BPA_DOCUMENT_DETAILS_LABEL",
43966
- asSectionHeader: true,
43967
- additionalDetails: {
43968
- documents: [{
43969
- title: "",
43970
- values: License === null || License === void 0 ? void 0 : (_License$tradeLicense42 = License.tradeLicenseDetail) === null || _License$tradeLicense42 === void 0 ? void 0 : (_License$tradeLicense43 = _License$tradeLicense42.applicationDocuments) === null || _License$tradeLicense43 === void 0 ? void 0 : _License$tradeLicense43.map(function (doc) {
43971
- var _doc$documentType;
43972
-
43973
- return {
43974
- title: "BPAREG_HEADER_" + (doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll('.', '_')),
43975
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
43976
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
43977
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
43978
- id: doc === null || doc === void 0 ? void 0 : doc.id,
43979
- docInfo: doc === null || doc === void 0 ? void 0 : doc.info
43980
- };
43981
- })
43938
+ asSectionHeader: true,
43939
+ values: [{
43940
+ title: "BPA_PERMANANT_ADDRESS_LABEL",
43941
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense38 = License.tradeLicenseDetail) === null || _License$tradeLicense38 === void 0 ? void 0 : (_License$tradeLicense39 = _License$tradeLicense38.owners) === null || _License$tradeLicense39 === void 0 ? void 0 : (_License$tradeLicense40 = _License$tradeLicense39[0]) === null || _License$tradeLicense40 === void 0 ? void 0 : _License$tradeLicense40.permanentAddress) || "NA"
43982
43942
  }]
43983
- }
43984
- }, (paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments = paymentRes.Payments) === null || _paymentRes$Payments === void 0 ? void 0 : _paymentRes$Payments.length) > 0 && {
43985
- title: "BPA_FEE_DETAILS_LABEL",
43986
- additionalDetails: {
43987
- inspectionReport: [],
43943
+ }, {
43944
+ title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43945
+ asSectionHeader: true,
43988
43946
  values: [{
43989
- title: "BPAREG_FEES",
43990
- value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments2 = paymentRes.Payments) === null || _paymentRes$Payments2 === void 0 ? void 0 : (_paymentRes$Payments3 = _paymentRes$Payments2[0]) === null || _paymentRes$Payments3 === void 0 ? void 0 : _paymentRes$Payments3.totalAmountPaid)
43991
- }, (_ref = {
43992
- title: "BPA_STATUS_LABEL",
43993
- isTransLate: true,
43994
- isStatus: true,
43995
- value: paymentRes !== null && paymentRes !== void 0 && (_paymentRes$Payments4 = paymentRes.Payments) !== null && _paymentRes$Payments4 !== void 0 && (_paymentRes$Payments5 = _paymentRes$Payments4[0]) !== null && _paymentRes$Payments5 !== void 0 && _paymentRes$Payments5.totalAmountPaid ? "WF_BPA_PAID" : "NA"
43996
- }, _ref["isTransLate"] = true, _ref)]
43997
- }
43998
- }];
43999
- return {
44000
- applicationData: License,
44001
- applicationDetails: details,
44002
- tenantId: License === null || License === void 0 ? void 0 : License.tenantId,
44003
- payments: (paymentRes === null || paymentRes === void 0 ? void 0 : paymentRes.Payments) || []
44004
- };
43947
+ title: "BPA_APPLICANT_CORRESPONDENCE_ADDRESS_LABEL",
43948
+ value: (License === null || License === void 0 ? void 0 : (_License$tradeLicense41 = License.tradeLicenseDetail) === null || _License$tradeLicense41 === void 0 ? void 0 : (_License$tradeLicense42 = _License$tradeLicense41.owners) === null || _License$tradeLicense42 === void 0 ? void 0 : (_License$tradeLicense43 = _License$tradeLicense42[0]) === null || _License$tradeLicense43 === void 0 ? void 0 : _License$tradeLicense43.correspondenceAddress) || "NA"
43949
+ }]
43950
+ }, {
43951
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
43952
+ asSectionHeader: true,
43953
+ additionalDetails: {
43954
+ documentsWithUrl: [{
43955
+ title: "",
43956
+ values: License === null || License === void 0 ? void 0 : (_License$tradeLicense44 = License.tradeLicenseDetail) === null || _License$tradeLicense44 === void 0 ? void 0 : (_License$tradeLicense45 = _License$tradeLicense44.applicationDocuments) === null || _License$tradeLicense45 === void 0 ? void 0 : _License$tradeLicense45.map(function (doc) {
43957
+ var _doc$documentType, _fileDetails$data$doc;
43958
+
43959
+ return {
43960
+ title: "BPAREG_HEADER_" + (doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll('.', '_')),
43961
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
43962
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
43963
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
43964
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
43965
+ docInfo: doc === null || doc === void 0 ? void 0 : doc.info,
43966
+ url: fileDetails !== null && fileDetails !== void 0 && fileDetails.data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$data$doc = fileDetails.data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails$data$doc === void 0 ? void 0 : _fileDetails$data$doc.split(',')[0] : ""
43967
+ };
43968
+ })
43969
+ }]
43970
+ }
43971
+ }, (paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments = paymentRes.Payments) === null || _paymentRes$Payments === void 0 ? void 0 : _paymentRes$Payments.length) > 0 && {
43972
+ title: "BPA_FEE_DETAILS_LABEL",
43973
+ additionalDetails: {
43974
+ inspectionReport: [],
43975
+ values: [{
43976
+ title: "BPAREG_FEES",
43977
+ value: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", paymentRes === null || paymentRes === void 0 ? void 0 : (_paymentRes$Payments2 = paymentRes.Payments) === null || _paymentRes$Payments2 === void 0 ? void 0 : (_paymentRes$Payments3 = _paymentRes$Payments2[0]) === null || _paymentRes$Payments3 === void 0 ? void 0 : _paymentRes$Payments3.totalAmountPaid)
43978
+ }, (_ref = {
43979
+ title: "BPA_STATUS_LABEL",
43980
+ isTransLate: true,
43981
+ isStatus: true,
43982
+ value: paymentRes !== null && paymentRes !== void 0 && (_paymentRes$Payments4 = paymentRes.Payments) !== null && _paymentRes$Payments4 !== void 0 && (_paymentRes$Payments5 = _paymentRes$Payments4[0]) !== null && _paymentRes$Payments5 !== void 0 && _paymentRes$Payments5.totalAmountPaid ? "WF_BPA_PAID" : "NA"
43983
+ }, _ref["isTransLate"] = true, _ref)]
43984
+ }
43985
+ }];
43986
+ return {
43987
+ applicationData: License,
43988
+ applicationDetails: details,
43989
+ tenantId: License === null || License === void 0 ? void 0 : License.tenantId,
43990
+ payments: (paymentRes === null || paymentRes === void 0 ? void 0 : paymentRes.Payments) || []
43991
+ };
43992
+ });
44005
43993
  });
44006
43994
  });
44007
43995
  });
@@ -44012,16 +44000,27 @@ var OBPSService = {
44012
44000
  BPADetailsPage: function (tenantId, filters) {
44013
44001
  try {
44014
44002
  return Promise.resolve(OBPSService.BPASearch(tenantId, filters)).then(function (response) {
44015
- var _response$BPA, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA3, _response$BPA3$, _response$BPA3$$addit;
44003
+ var _response$BPA, _response$BPA$, _response$BPA$$docume, _response$BPA2, _response$BPA2$, _response$BPA2$$addit, _response$BPA2$$addit2, _response$BPA3, _response$BPA4, _response$BPA4$, _response$BPA4$$addit, _response$BPA5, _response$BPA5$, _response$BPA5$$addit;
44016
44004
 
44017
- if (!(response !== null && response !== void 0 && (_response$BPA = response.BPA) !== null && _response$BPA !== void 0 && _response$BPA.length)) {
44005
+ var appDocumentFileStoreIds = response === null || response === void 0 ? void 0 : (_response$BPA = response.BPA) === null || _response$BPA === void 0 ? void 0 : (_response$BPA$ = _response$BPA[0]) === null || _response$BPA$ === void 0 ? void 0 : (_response$BPA$$docume = _response$BPA$.documents) === null || _response$BPA$$docume === void 0 ? void 0 : _response$BPA$$docume.map(function (docId) {
44006
+ return docId.fileStoreId;
44007
+ });
44008
+ response === null || response === void 0 ? void 0 : (_response$BPA2 = response.BPA) === null || _response$BPA2 === void 0 ? void 0 : (_response$BPA2$ = _response$BPA2[0]) === null || _response$BPA2$ === void 0 ? void 0 : (_response$BPA2$$addit = _response$BPA2$.additionalDetails) === null || _response$BPA2$$addit === void 0 ? void 0 : (_response$BPA2$$addit2 = _response$BPA2$$addit.fieldinspection_pending) === null || _response$BPA2$$addit2 === void 0 ? void 0 : _response$BPA2$$addit2.map(function (fiData) {
44009
+ var _fiData$docs;
44010
+
44011
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs = fiData.docs) === null || _fiData$docs === void 0 ? void 0 : _fiData$docs.map(function (fiDoc) {
44012
+ appDocumentFileStoreIds.push(fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId);
44013
+ });
44014
+ });
44015
+
44016
+ if (!(response !== null && response !== void 0 && (_response$BPA3 = response.BPA) !== null && _response$BPA3 !== void 0 && _response$BPA3.length)) {
44018
44017
  return;
44019
44018
  }
44020
44019
 
44021
- sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA2 = response.BPA) !== null && _response$BPA2 !== void 0 && (_response$BPA2$ = _response$BPA2[0]) !== null && _response$BPA2$ !== void 0 && (_response$BPA2$$addit = _response$BPA2$.additionalDetails) !== null && _response$BPA2$$addit !== void 0 && _response$BPA2$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA3 = response.BPA) === null || _response$BPA3 === void 0 ? void 0 : (_response$BPA3$ = _response$BPA3[0]) === null || _response$BPA3$ === void 0 ? void 0 : (_response$BPA3$$addit = _response$BPA3$.additionalDetails) === null || _response$BPA3$$addit === void 0 ? void 0 : _response$BPA3$$addit.typeOfArchitect : "ARCHITECT"));
44020
+ sessionStorage.setItem("BPA_ARCHITECT_NAME", JSON.stringify(response !== null && response !== void 0 && (_response$BPA4 = response.BPA) !== null && _response$BPA4 !== void 0 && (_response$BPA4$ = _response$BPA4[0]) !== null && _response$BPA4$ !== void 0 && (_response$BPA4$$addit = _response$BPA4$.additionalDetails) !== null && _response$BPA4$$addit !== void 0 && _response$BPA4$$addit.typeOfArchitect ? response === null || response === void 0 ? void 0 : (_response$BPA5 = response.BPA) === null || _response$BPA5 === void 0 ? void 0 : (_response$BPA5$ = _response$BPA5[0]) === null || _response$BPA5$ === void 0 ? void 0 : (_response$BPA5$$addit = _response$BPA5$.additionalDetails) === null || _response$BPA5$$addit === void 0 ? void 0 : _response$BPA5$$addit.typeOfArchitect : "ARCHITECT"));
44022
44021
 
44023
- var _response$BPA4 = response === null || response === void 0 ? void 0 : response.BPA,
44024
- BPA = _response$BPA4[0];
44022
+ var _response$BPA6 = response === null || response === void 0 ? void 0 : response.BPA,
44023
+ BPA = _response$BPA6[0];
44025
44024
 
44026
44025
  return Promise.resolve(OBPSService.scrutinyDetails(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
44027
44026
  edcrNumber: BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber
@@ -44048,491 +44047,511 @@ var OBPSService = {
44048
44047
  ocdcrNumber: BPA !== null && BPA !== void 0 && BPA.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA = bpaResponse.BPA) === null || _bpaResponse$BPA === void 0 ? void 0 : (_bpaResponse$BPA$ = _bpaResponse$BPA[0]) === null || _bpaResponse$BPA$ === void 0 ? void 0 : _bpaResponse$BPA$.edcrNumber,
44049
44048
  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
44050
44049
  };
44050
+ return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
44051
+ noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
44052
+ var _nocDetails$documents;
44051
44053
 
44052
- function ConvertEpochToValidityDate(dateEpoch) {
44053
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
44054
- return "NA";
44055
- }
44054
+ nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (nocDoc) {
44055
+ appDocumentFileStoreIds.push(nocDoc === null || nocDoc === void 0 ? void 0 : nocDoc.fileStoreId);
44056
+ });
44057
+ });
44058
+ return Promise.resolve(UploadServices.Filefetch(appDocumentFileStoreIds, Digit.ULBService.getStateId())).then(function (fileDetails) {
44059
+ 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;
44056
44060
 
44057
- var dateFromApi = new Date(dateEpoch);
44058
- var month = dateFromApi.getMonth() + 1;
44059
- var day = dateFromApi.getDate();
44060
- var year = dateFromApi.getFullYear() - 3;
44061
- month = (month > 9 ? "" : "0") + month;
44062
- day = (day > 9 ? "" : "0") + day;
44063
- return day + "/" + month + "/" + year;
44064
- }
44061
+ function ConvertEpochToValidityDate(dateEpoch) {
44062
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
44063
+ return "NA";
44064
+ }
44065
44065
 
44066
- return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
44067
- var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail9, _BPA$additionalDetail10, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail11, _BPA$additionalDetail12, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _details;
44066
+ var dateFromApi = new Date(dateEpoch);
44067
+ var month = dateFromApi.getMonth() + 1;
44068
+ var day = dateFromApi.getDate();
44069
+ var year = dateFromApi.getFullYear() - 3;
44070
+ month = (month > 9 ? "" : "0") + month;
44071
+ day = (day > 9 ? "" : "0") + day;
44072
+ return day + "/" + month + "/" + year;
44073
+ }
44068
44074
 
44069
- var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
44070
- var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
44075
+ 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) {
44076
+ var _fiData$docs2;
44071
44077
 
44072
- return {
44073
- title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
44074
- values: [{
44075
- title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
44076
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
44077
- isNotTranslated: true
44078
- }, {
44079
- title: "BPA_NOC_STATUS",
44080
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
44081
- field: "STATUS"
44082
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
44083
- title: "BPA_SUDMITTED_ON_LABEL",
44084
- value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
44085
- isNotTranslated: true
44086
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44087
- title: "BPA_APPROVAL_NUMBER_LABEL",
44088
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
44089
- isNotTranslated: true
44090
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44091
- title: "BPA_APPROVED_REJECTED_ON_LABEL",
44092
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
44093
- isNotTranslated: true
44094
- }],
44095
- additionalDetails: {
44096
- data: nocDetails,
44097
- noc: [{
44098
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44099
- values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
44100
- var _doc$documentType2;
44078
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
44079
+ var _fileDetails$data$fiD;
44101
44080
 
44102
- return {
44103
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
44104
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44105
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44106
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44107
- id: doc === null || doc === void 0 ? void 0 : doc.id
44108
- };
44109
- })
44110
- }]
44111
- }
44112
- };
44113
- });
44114
- var inspectionReport = [];
44115
- var checklist = [];
44116
- 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.filter(function (ob) {
44117
- return ob.docs && ob.docs.length > 0;
44118
- }).map(function (ob, ind) {
44119
- var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
44120
-
44121
- checklist = [];
44122
- inspectionReport.push({
44123
- title: "BPA_FI_REPORT",
44124
- asSectionHeader: true,
44125
- values: [{
44126
- title: "BPA_FI_DATE_LABEL",
44127
- 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
44128
- }, {
44129
- title: "BPA_FI_TIME_LABEL",
44130
- value: ob.time
44131
- }]
44132
- });
44133
- ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
44134
- checklist.push({
44135
- title: q.question,
44136
- value: q.value
44137
- });
44138
- checklist.push({
44139
- title: "BPA_ENTER_REMARKS",
44140
- value: q.remarks
44081
+ if (fileDetails !== null && fileDetails !== void 0 && fileDetails.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$data$fiD = fileDetails.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails$data$fiD === void 0 ? void 0 : _fileDetails$data$fiD.split(',')[0];
44141
44082
  });
44142
44083
  });
44143
- inspectionReport.push({
44144
- title: "BPA_CHECK_LIST_DETAILS",
44145
- asSectionHeader: true,
44146
- values: checklist
44084
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
44085
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents2;
44086
+
44087
+ return {
44088
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
44089
+ values: [{
44090
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
44091
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
44092
+ isNotTranslated: true
44093
+ }, {
44094
+ title: "BPA_NOC_STATUS",
44095
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
44096
+ field: "STATUS"
44097
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
44098
+ title: "BPA_SUDMITTED_ON_LABEL",
44099
+ value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
44100
+ isNotTranslated: true
44101
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44102
+ title: "BPA_APPROVAL_NUMBER_LABEL",
44103
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
44104
+ isNotTranslated: true
44105
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
44106
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
44107
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? dateFns.format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
44108
+ isNotTranslated: true
44109
+ }],
44110
+ additionalDetails: {
44111
+ data: nocDetails,
44112
+ noc: [{
44113
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
44114
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents2 = nocDetails.documents) === null || _nocDetails$documents2 === void 0 ? void 0 : _nocDetails$documents2.map(function (doc) {
44115
+ var _doc$documentType2, _fileDetails$data, _fileDetails$data2, _fileDetails$data2$do;
44116
+
44117
+ return {
44118
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
44119
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44120
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44121
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44122
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
44123
+ url: fileDetails !== null && fileDetails !== void 0 && (_fileDetails$data = fileDetails.data) !== null && _fileDetails$data !== void 0 && _fileDetails$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$data2 = fileDetails.data) === null || _fileDetails$data2 === void 0 ? void 0 : (_fileDetails$data2$do = _fileDetails$data2[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails$data2$do === void 0 ? void 0 : _fileDetails$data2$do.split(',')[0] : ""
44124
+ };
44125
+ })
44126
+ }]
44127
+ }
44128
+ };
44147
44129
  });
44148
- inspectionReport.push({
44149
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44150
- asSectionHeader: true,
44151
- additionalDetails: {
44152
- obpsDocuments: [{
44153
- title: "",
44154
- values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
44155
- var _doc$documentType3;
44156
-
44157
- return {
44158
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
44159
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44160
- documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
44161
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44162
- id: doc === null || doc === void 0 ? void 0 : doc.id
44163
- };
44164
- })
44130
+ var inspectionReport = [];
44131
+ var checklist = [];
44132
+ 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) {
44133
+ return ob.docs && ob.docs.length > 0;
44134
+ }).map(function (ob, ind) {
44135
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
44136
+
44137
+ checklist = [];
44138
+ inspectionReport.push({
44139
+ title: "BPA_FI_REPORT",
44140
+ asSectionHeader: true,
44141
+ values: [{
44142
+ title: "BPA_FI_DATE_LABEL",
44143
+ 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
44144
+ }, {
44145
+ title: "BPA_FI_TIME_LABEL",
44146
+ value: ob.time
44165
44147
  }]
44166
- }
44148
+ });
44149
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
44150
+ checklist.push({
44151
+ title: q.question,
44152
+ value: q.value
44153
+ });
44154
+ checklist.push({
44155
+ title: "BPA_ENTER_REMARKS",
44156
+ value: q.remarks
44157
+ });
44158
+ });
44159
+ inspectionReport.push({
44160
+ title: "BPA_CHECK_LIST_DETAILS",
44161
+ asSectionHeader: true,
44162
+ values: checklist
44163
+ });
44164
+ inspectionReport.push({
44165
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
44166
+ asSectionHeader: true,
44167
+ additionalDetails: {
44168
+ obpsDocuments: [{
44169
+ title: "",
44170
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
44171
+ var _doc$documentType3, _fileDetails$data3, _fileDetails$data4, _fileDetails$data4$do;
44172
+
44173
+ return {
44174
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
44175
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44176
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
44177
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44178
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
44179
+ url: fileDetails !== null && fileDetails !== void 0 && (_fileDetails$data3 = fileDetails.data) !== null && _fileDetails$data3 !== void 0 && _fileDetails$data3[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$data4 = fileDetails.data) === null || _fileDetails$data4 === void 0 ? void 0 : (_fileDetails$data4$do = _fileDetails$data4[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails$data4$do === void 0 ? void 0 : _fileDetails$data4$do.split(',')[0] : ""
44180
+ };
44181
+ })
44182
+ }]
44183
+ }
44184
+ });
44167
44185
  });
44168
- });
44169
- var details = [];
44170
- var applicationDetailsInfo = {
44171
- title: " ",
44172
- isCommon: true,
44173
- values: [{
44174
- title: "BPA_APPLICATION_NUMBER_LABEL",
44175
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
44176
- }]
44177
- };
44178
-
44179
- if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
44180
- var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
44186
+ var details = [];
44187
+ var applicationDetailsInfo = {
44188
+ title: " ",
44189
+ isCommon: true,
44190
+ values: [{
44191
+ title: "BPA_APPLICATION_NUMBER_LABEL",
44192
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
44193
+ }]
44194
+ };
44181
44195
 
44182
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
44183
- title: "BPA_PERMIT_APP_NUMBER",
44184
- 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),
44185
- 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,
44186
- isLink: true
44187
- }]);
44188
- }
44196
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
44197
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
44189
44198
 
44190
- var permitcondn = [];
44191
- (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : _BPA$additionalDetail3.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail4 = BPA.additionalDetails) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval.map(function (ob, index) {
44192
- permitcondn.push({
44193
- title: index + 1 + ". " + ob,
44194
- value: ""
44195
- });
44196
- }));
44197
- var PermitConditions = {
44198
- title: "BPA_PERMIT_CONDITIONS",
44199
- isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
44200
- isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
44201
- additionalDetails: {
44202
- inspectionReport: [],
44203
- permit: [].concat(permitcondn)
44199
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
44200
+ title: "BPA_PERMIT_APP_NUMBER",
44201
+ 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),
44202
+ 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,
44203
+ isLink: true
44204
+ }]);
44204
44205
  }
44205
- };
44206
- if (permitcondn.length == 0) PermitConditions = {};
44207
44206
 
44208
- if (riskType == "LOW" && permitcondn.length > 0) {
44209
- permitcondn = [];
44210
- PermitConditions = {};
44211
- }
44207
+ var permitcondn = [];
44208
+ (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) {
44209
+ permitcondn.push({
44210
+ title: index + 1 + ". " + ob,
44211
+ value: ""
44212
+ });
44213
+ }));
44214
+ var PermitConditions = {
44215
+ title: "BPA_PERMIT_CONDITIONS",
44216
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
44217
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
44218
+ additionalDetails: {
44219
+ inspectionReport: [],
44220
+ permit: [].concat(permitcondn)
44221
+ }
44222
+ };
44223
+ if (permitcondn.length == 0) PermitConditions = {};
44212
44224
 
44213
- if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
44214
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail6, _BPA$additionalDetail7, _BPA$additionalDetail8;
44225
+ if (riskType == "LOW" && permitcondn.length > 0) {
44226
+ permitcondn = [];
44227
+ PermitConditions = {};
44228
+ }
44215
44229
 
44216
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
44217
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
44218
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
44219
- });
44220
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
44221
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
44222
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail6 = BPA.additionalDetails) !== null && _BPA$additionalDetail6 !== void 0 && _BPA$additionalDetail6.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.validityDate) + " - " + dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail8 = BPA.additionalDetails) === null || _BPA$additionalDetail8 === void 0 ? void 0 : _BPA$additionalDetail8.validityDate), 'dd/MM/yyyy') : "NA"
44223
- });
44224
- }
44230
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
44231
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
44225
44232
 
44226
- var basicDetails = {
44227
- title: "BPA_BASIC_DETAILS_TITLE",
44228
- asSectionHeader: true,
44229
- isInsert: true,
44230
- isCommon: true,
44231
- values: [{
44232
- title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
44233
- value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
44234
- }, {
44235
- title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
44236
- value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
44237
- }, {
44238
- title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
44239
- value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
44240
- }, {
44241
- title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
44242
- 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
44243
- }, {
44244
- title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
44245
- value: "WF_BPA_" + riskType,
44246
- isInsert: true
44247
- }, {
44248
- title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
44249
- 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
44250
- }]
44251
- };
44252
- var plotDetails = {
44253
- title: "BPA_PLOT_DETAILS_TITLE",
44254
- asSectionHeader: true,
44255
- isCommon: true,
44256
- values: [{
44257
- title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
44258
- 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),
44259
- isNotTranslated: true,
44260
- isUnit: "BPA_SQ_FT_LABEL"
44261
- }, {
44262
- title: "BPA_PLOT_NUMBER_LABEL",
44263
- 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",
44264
- isNotTranslated: true
44265
- }, {
44266
- title: "BPA_KHATHA_NUMBER_LABEL",
44267
- 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",
44268
- isNotTranslated: true
44269
- }, {
44270
- title: "BPA_HOLDING_NUMBER_LABEL",
44271
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.holdingNo) || "NA",
44272
- isNotTranslated: true
44273
- }, {
44274
- title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
44275
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.registrationDetails) || "NA",
44276
- isNotTranslated: true
44277
- }]
44278
- };
44279
- var scrutinyDetails = {
44280
- title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
44281
- isScrutinyDetails: true,
44282
- isBackGroundColor: true,
44283
- additionalDetails: {
44233
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
44234
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
44235
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
44236
+ });
44237
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
44238
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
44239
+ value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
44240
+ });
44241
+ }
44242
+
44243
+ var basicDetails = {
44244
+ title: "BPA_BASIC_DETAILS_TITLE",
44245
+ asSectionHeader: true,
44246
+ isInsert: true,
44247
+ isCommon: true,
44284
44248
  values: [{
44285
- title: "BPA_EDCR_DETAILS",
44286
- value: " ",
44287
- isHeader: true
44249
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
44250
+ value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? dateFns.format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
44251
+ }, {
44252
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
44253
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
44288
44254
  }, {
44289
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
44290
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
44291
- }],
44292
- scruntinyDetails: [{
44293
- title: "BPA_UPLOADED_PLAN_DIAGRAM",
44294
- value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
44295
- text: "BPA_UPLOADED_PLAN_DXF"
44255
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
44256
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
44296
44257
  }, {
44297
- title: "BPA_SCRUNTINY_REPORT_OUTPUT",
44298
- value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
44299
- text: "BPA_SCRUTINY_REPORT_PDF"
44258
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
44259
+ 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
44260
+ }, {
44261
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
44262
+ value: "WF_BPA_" + riskType,
44263
+ isInsert: true
44264
+ }, {
44265
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
44266
+ 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
44300
44267
  }]
44301
- }
44302
- };
44303
- var buildingExtractionDetails = {
44304
- title: "",
44305
- isScrutinyDetails: true,
44306
- isBackGroundColor: true,
44307
- additionalDetails: {
44268
+ };
44269
+ var plotDetails = {
44270
+ title: "BPA_PLOT_DETAILS_TITLE",
44271
+ asSectionHeader: true,
44272
+ isCommon: true,
44308
44273
  values: [{
44309
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
44310
- value: " ",
44311
- isHeader: true
44274
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
44275
+ 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),
44276
+ isNotTranslated: true,
44277
+ isUnit: "BPA_SQ_FT_LABEL"
44312
44278
  }, {
44313
- title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
44314
- 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,
44315
- isUnit: "BPA_SQ_MTRS_LABEL"
44279
+ title: "BPA_PLOT_NUMBER_LABEL",
44280
+ 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",
44281
+ isNotTranslated: true
44316
44282
  }, {
44317
- title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
44318
- 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"
44283
+ title: "BPA_KHATHA_NUMBER_LABEL",
44284
+ 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",
44285
+ isNotTranslated: true
44319
44286
  }, {
44320
- title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
44321
- 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,
44322
- isUnit: "BPA_MTRS_LABEL"
44323
- }],
44324
- scruntinyDetails: []
44325
- }
44326
- };
44327
- var demolitionAreaDetails = {
44328
- title: "",
44329
- isScrutinyDetails: true,
44330
- isBackGroundColor: true,
44331
- additionalDetails: {
44332
- values: [{
44333
- title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
44334
- value: " ",
44335
- isHeader: true
44287
+ title: "BPA_HOLDING_NUMBER_LABEL",
44288
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
44289
+ isNotTranslated: true
44336
44290
  }, {
44337
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44338
- 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,
44339
- isUnit: "BPA_SQ_MTRS_LABEL"
44340
- }],
44341
- scruntinyDetails: []
44342
- }
44343
- };
44344
- var subOccupancyTableDetails = {
44345
- title: "",
44346
- isSubOccupancyTable: true,
44347
- isTitleRepeat: true,
44348
- additionalDetails: {
44291
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
44292
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
44293
+ isNotTranslated: true
44294
+ }]
44295
+ };
44296
+ var scrutinyDetails = {
44297
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
44298
+ isScrutinyDetails: true,
44299
+ isBackGroundColor: true,
44300
+ additionalDetails: {
44301
+ values: [{
44302
+ title: "BPA_EDCR_DETAILS",
44303
+ value: " ",
44304
+ isHeader: true
44305
+ }, {
44306
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
44307
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
44308
+ }],
44309
+ scruntinyDetails: [{
44310
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
44311
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
44312
+ text: "BPA_UPLOADED_PLAN_DXF"
44313
+ }, {
44314
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
44315
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
44316
+ text: "BPA_SCRUTINY_REPORT_PDF"
44317
+ }]
44318
+ }
44319
+ };
44320
+ var buildingExtractionDetails = {
44321
+ title: "",
44322
+ isScrutinyDetails: true,
44323
+ isBackGroundColor: true,
44324
+ additionalDetails: {
44325
+ values: [{
44326
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
44327
+ value: " ",
44328
+ isHeader: true
44329
+ }, {
44330
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
44331
+ 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,
44332
+ isUnit: "BPA_SQ_MTRS_LABEL"
44333
+ }, {
44334
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
44335
+ 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"
44336
+ }, {
44337
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
44338
+ 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,
44339
+ isUnit: "BPA_MTRS_LABEL"
44340
+ }],
44341
+ scruntinyDetails: []
44342
+ }
44343
+ };
44344
+ var demolitionAreaDetails = {
44345
+ title: "",
44346
+ isScrutinyDetails: true,
44347
+ isBackGroundColor: true,
44348
+ additionalDetails: {
44349
+ values: [{
44350
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
44351
+ value: " ",
44352
+ isHeader: true
44353
+ }, {
44354
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44355
+ 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,
44356
+ isUnit: "BPA_SQ_MTRS_LABEL"
44357
+ }],
44358
+ scruntinyDetails: []
44359
+ }
44360
+ };
44361
+ var subOccupancyTableDetails = {
44362
+ title: "",
44363
+ isSubOccupancyTable: true,
44364
+ isTitleRepeat: true,
44365
+ additionalDetails: {
44366
+ values: [{
44367
+ title: "BPA_OCC_SUBOCC_HEADER",
44368
+ value: " ",
44369
+ isHeader: true
44370
+ }],
44371
+ subOccupancyTableDetails: [{
44372
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44373
+ value: edcr
44374
+ }, {
44375
+ title: "NO_REPEAT",
44376
+ value: ""
44377
+ }]
44378
+ }
44379
+ };
44380
+ var addressDetails = {
44381
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
44382
+ asSectionHeader: true,
44383
+ isCommon: true,
44349
44384
  values: [{
44350
- title: "BPA_OCC_SUBOCC_HEADER",
44351
- value: " ",
44352
- isHeader: true
44353
- }],
44354
- subOccupancyTableDetails: [{
44355
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
44356
- value: edcr
44385
+ title: "BPA_DETAILS_PIN_LABEL",
44386
+ 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
44357
44387
  }, {
44358
- title: "NO_REPEAT",
44359
- value: ""
44388
+ title: "BPA_CITY_LABEL",
44389
+ 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
44390
+ }, {
44391
+ title: "BPA_LOC_MOHALLA_LABEL",
44392
+ 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
44393
+ }, {
44394
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
44395
+ 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
44396
+ }, {
44397
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
44398
+ 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
44360
44399
  }]
44361
- }
44362
- };
44363
- var addressDetails = {
44364
- title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
44365
- asSectionHeader: true,
44366
- isCommon: true,
44367
- values: [{
44368
- title: "BPA_DETAILS_PIN_LABEL",
44369
- 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
44370
- }, {
44371
- title: "BPA_CITY_LABEL",
44372
- 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
44373
- }, {
44374
- title: "BPA_LOC_MOHALLA_LABEL",
44375
- 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
44376
- }, {
44377
- title: "BPA_DETAILS_SRT_NAME_LABEL",
44378
- 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
44379
- }, {
44380
- title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
44381
- 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
44382
- }]
44383
- };
44384
- 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;
44385
-
44386
- 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) {
44387
- var _BPA$landInfo8, _BPA$landInfo8$owners;
44400
+ };
44401
+ 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;
44388
44402
 
44389
- 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) {
44390
- if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
44391
- });
44392
- }
44403
+ 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) {
44404
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
44393
44405
 
44394
- var ownerDetails = {
44395
- title: "BPA_APPLICANT_DETAILS_HEADER",
44396
- isOwnerDetails: true,
44397
- additionalDetails: {
44398
- 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) {
44399
- return {
44400
- title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
44401
- values: [{
44402
- title: "CORE_COMMON_NAME",
44403
- value: owner === null || owner === void 0 ? void 0 : owner.name
44404
- }, {
44405
- title: "BPA_APPLICANT_GENDER_LABEL",
44406
- value: owner === null || owner === void 0 ? void 0 : owner.gender
44407
- }, {
44408
- title: "CORE_COMMON_MOBILE_NUMBER",
44409
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
44410
- }, {
44411
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
44412
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
44413
- isNotTranslated: false
44414
- }]
44415
- };
44416
- })
44406
+ 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) {
44407
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
44408
+ });
44417
44409
  }
44418
- };
44419
- var documentDetails = {
44420
- title: "BPA_DOCUMENT_DETAILS_LABEL",
44421
- asSectionHeader: true,
44422
- isDocumentDetails: true,
44423
- additionalDetails: {
44424
- obpsDocuments: [{
44425
- title: "",
44426
- values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
44427
- var _doc$documentType4;
44428
44410
 
44411
+ var ownerDetails = {
44412
+ title: "BPA_APPLICANT_DETAILS_HEADER",
44413
+ isOwnerDetails: true,
44414
+ additionalDetails: {
44415
+ 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) {
44429
44416
  return {
44430
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
44431
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44432
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44433
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44434
- id: doc === null || doc === void 0 ? void 0 : doc.id
44417
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
44418
+ values: [{
44419
+ title: "CORE_COMMON_NAME",
44420
+ value: owner === null || owner === void 0 ? void 0 : owner.name
44421
+ }, {
44422
+ title: "BPA_APPLICANT_GENDER_LABEL",
44423
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
44424
+ }, {
44425
+ title: "CORE_COMMON_MOBILE_NUMBER",
44426
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
44427
+ }, {
44428
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
44429
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
44430
+ isNotTranslated: false
44431
+ }]
44435
44432
  };
44436
44433
  })
44437
- }]
44438
- }
44439
- };
44440
- var approvalChecks = [];
44441
- var approvalChecksDetails = {};
44442
-
44443
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
44444
- var _mdmsRes$BPA2;
44445
-
44446
- mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
44447
- var _checklist$conditions;
44448
-
44449
- 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) {
44450
- approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
44451
44434
  }
44452
- });
44453
- approvalChecksDetails = {
44454
- title: "",
44455
- isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
44435
+ };
44436
+ var documentDetails = {
44437
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
44456
44438
  asSectionHeader: true,
44457
- isPermissions: true,
44439
+ isDocumentDetails: true,
44458
44440
  additionalDetails: {
44459
- permissions: approvalChecks
44441
+ obpsDocuments: [{
44442
+ title: "",
44443
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
44444
+ var _doc$documentType4, _fileDetails$data5, _fileDetails$data6, _fileDetails$data6$do;
44445
+
44446
+ return {
44447
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
44448
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
44449
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
44450
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
44451
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
44452
+ url: fileDetails !== null && fileDetails !== void 0 && (_fileDetails$data5 = fileDetails.data) !== null && _fileDetails$data5 !== void 0 && _fileDetails$data5[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? fileDetails === null || fileDetails === void 0 ? void 0 : (_fileDetails$data6 = fileDetails.data) === null || _fileDetails$data6 === void 0 ? void 0 : (_fileDetails$data6$do = _fileDetails$data6[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails$data6$do === void 0 ? void 0 : _fileDetails$data6$do.split(',')[0] : ""
44453
+ };
44454
+ })
44455
+ }]
44460
44456
  }
44461
44457
  };
44462
- }
44458
+ var approvalChecks = [];
44459
+ var approvalChecksDetails = {};
44463
44460
 
44464
- if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
44465
- var val;
44466
- var i;
44467
- var FieldInspectionData = [];
44468
- inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : (_BPA$additionalDetail12 = _BPA$additionalDetail11.fieldinspection_pending) === null || _BPA$additionalDetail12 === void 0 ? void 0 : (_BPA$additionalDetail13 = _BPA$additionalDetail12[0]) === null || _BPA$additionalDetail13 === void 0 ? void 0 : _BPA$additionalDetail13.questions.length) > 0 && inspectionReport.map(function (ob, index) {
44469
- if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
44470
- title: ob.title,
44471
- additionalDetails: {
44472
- inspectionReport: [],
44473
- values: ob.values
44474
- }
44475
- }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
44476
- title: ob.title,
44477
- additionalDetails: {
44478
- isChecklist: true,
44479
- inspectionReport: [],
44480
- values: ob.values
44481
- }
44482
- }]);else {
44483
- var _ob$additionalDetails, _ob$additionalDetails2;
44461
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
44462
+ var _mdmsRes$BPA2;
44484
44463
 
44485
- 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);
44486
- improvedDoc.map(function (ob) {
44487
- ob["isNotDuplicate"] = true;
44488
- });
44489
- improvedDoc.map(function (ob, index) {
44490
- val = ob.documentType;
44491
- if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
44492
- if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
44464
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
44465
+ var _checklist$conditions;
44466
+
44467
+ 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) {
44468
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
44493
44469
  }
44494
44470
  });
44495
- FieldInspectionData = [].concat(FieldInspectionData, [{
44496
- title: ob.title,
44471
+ approvalChecksDetails = {
44472
+ title: "",
44473
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
44474
+ asSectionHeader: true,
44475
+ isPermissions: true,
44497
44476
  additionalDetails: {
44498
- FIdocuments: [],
44499
- "documents": [{
44500
- values: improvedDoc
44501
- }]
44477
+ permissions: approvalChecks
44502
44478
  }
44503
- }]);
44504
- }
44505
- });
44506
- var fiReports = {
44507
- title: "",
44508
- isFieldInspection: true,
44509
- isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail14 = BPA.additionalDetails) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14.fieldinspection_pending) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.length) > 0 ? false : true,
44510
- additionalDetails: {
44511
- values: [],
44512
- fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? true : false
44479
+ };
44513
44480
  }
44514
- };
44515
44481
 
44516
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
44517
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
44518
- } else {
44519
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
44520
- }
44482
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
44483
+ var val;
44484
+ var i;
44485
+ var FieldInspectionData = [];
44486
+ 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) {
44487
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
44488
+ title: ob.title,
44489
+ additionalDetails: {
44490
+ inspectionReport: [],
44491
+ values: ob.values
44492
+ }
44493
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
44494
+ title: ob.title,
44495
+ additionalDetails: {
44496
+ isChecklist: true,
44497
+ inspectionReport: [],
44498
+ values: ob.values
44499
+ }
44500
+ }]);else {
44501
+ var _ob$additionalDetails, _ob$additionalDetails2;
44502
+
44503
+ 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);
44504
+ improvedDoc.map(function (ob) {
44505
+ ob["isNotDuplicate"] = true;
44506
+ });
44507
+ improvedDoc.map(function (ob, index) {
44508
+ val = ob.documentType;
44509
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
44510
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
44511
+ }
44512
+ });
44513
+ FieldInspectionData = [].concat(FieldInspectionData, [{
44514
+ title: ob.title,
44515
+ additionalDetails: {
44516
+ FIdocuments: [],
44517
+ "documents": [{
44518
+ values: improvedDoc
44519
+ }]
44520
+ }
44521
+ }]);
44522
+ }
44523
+ });
44524
+ var fiReports = {
44525
+ title: "",
44526
+ isFieldInspection: true,
44527
+ 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,
44528
+ additionalDetails: {
44529
+ values: [],
44530
+ 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
44531
+ }
44532
+ };
44533
+
44534
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
44535
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
44536
+ } else {
44537
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
44538
+ }
44521
44539
 
44522
- var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
44523
- return data;
44540
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
44541
+ return data;
44542
+ });
44543
+ return {
44544
+ applicationData: BPA,
44545
+ applicationDetails: bpaFilterDetails,
44546
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
44547
+ edcrDetails: edcr,
44548
+ nocData: noc,
44549
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
44550
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
44551
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
44552
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
44553
+ };
44524
44554
  });
44525
- return {
44526
- applicationData: BPA,
44527
- applicationDetails: bpaFilterDetails,
44528
- tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
44529
- edcrDetails: edcr,
44530
- nocData: noc,
44531
- comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
44532
- businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
44533
- applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
44534
- applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
44535
- };
44536
44555
  });
44537
44556
  });
44538
44557
  });
@@ -46164,7 +46183,7 @@ var getDate = function getDate(epochdate) {
46164
46183
  return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46165
46184
  };
46166
46185
 
46167
- var getAddress = function getAddress(address, t) {
46186
+ var getAddress$1 = function getAddress(address, t) {
46168
46187
  return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
46169
46188
  };
46170
46189
 
@@ -46181,7 +46200,7 @@ var combineResponse$4 = function combineResponse(WaterConnections, properties, b
46181
46200
  })[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
46182
46201
  return ow.name;
46183
46202
  }).join(","),
46184
- Address: getAddress(properties.filter(function (prop) {
46203
+ Address: getAddress$1(properties.filter(function (prop) {
46185
46204
  return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46186
46205
  })[0].address, t),
46187
46206
  AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$ = billData.filter(function (bill) {
@@ -46265,7 +46284,7 @@ var getDate$1 = function getDate(epochdate) {
46265
46284
  return epochdate ? new Date(epochdate).getDate() + "/" + (new Date(epochdate).getMonth() + 1) + "/" + new Date(epochdate).getFullYear().toString() : "NA";
46266
46285
  };
46267
46286
 
46268
- var getAddress$1 = function getAddress(address, t) {
46287
+ var getAddress$2 = function getAddress(address, t) {
46269
46288
  return (address !== null && address !== void 0 && address.doorNo ? (address === null || address === void 0 ? void 0 : address.doorNo) + ", " : "") + " " + (address !== null && address !== void 0 && address.street ? (address === null || address === void 0 ? void 0 : address.street) + ", " : "") + (address !== null && address !== void 0 && address.landmark ? (address === null || address === void 0 ? void 0 : address.landmark) + ", " : "") + t(address === null || address === void 0 ? void 0 : address.locality.code) + ", " + t(address === null || address === void 0 ? void 0 : address.city.code) + "," + (t(address === null || address === void 0 ? void 0 : address.pincode) ? "" + address.pincode : " ");
46270
46289
  };
46271
46290
 
@@ -46282,7 +46301,7 @@ var combineResponse$5 = function combineResponse(WaterConnections, properties, b
46282
46301
  })[0]) === null || _properties$filter$ === void 0 ? void 0 : (_properties$filter$$o = _properties$filter$.owners) === null || _properties$filter$$o === void 0 ? void 0 : _properties$filter$$o.map(function (ow) {
46283
46302
  return ow.name;
46284
46303
  }).join(","),
46285
- Address: getAddress$1(properties.filter(function (prop) {
46304
+ Address: getAddress$2(properties.filter(function (prop) {
46286
46305
  return prop.propertyId === (app === null || app === void 0 ? void 0 : app.propertyId);
46287
46306
  })[0].address, t),
46288
46307
  AmountDue: billData ? billData !== null && billData !== void 0 && (_billData$filter$0$bi = billData.filter(function (bill) {