@egovernments/digit-ui-libraries 1.5.2 → 1.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@ import 'date-fns/esm';
13
13
  import { Link } from 'react-router-dom';
14
14
 
15
15
  function _extends() {
16
- _extends = Object.assign || function (target) {
16
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
17
17
  for (var i = 1; i < arguments.length; i++) {
18
18
  var source = arguments[i];
19
19
 
@@ -26,7 +26,6 @@ function _extends() {
26
26
 
27
27
  return target;
28
28
  };
29
-
30
29
  return _extends.apply(this, arguments);
31
30
  }
32
31
 
@@ -45187,502 +45186,619 @@ var OBPSService = {
45187
45186
  edcrNumber: bpaResponse !== null && bpaResponse !== void 0 && (_bpaResponse$BPA2 = bpaResponse.BPA) !== null && _bpaResponse$BPA2 !== void 0 && (_bpaResponse$BPA2$ = _bpaResponse$BPA2[0]) !== null && _bpaResponse$BPA2$ !== void 0 && _bpaResponse$BPA2$.edcrNumber.includes("OCDCR") ? BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber : bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA3 = bpaResponse.BPA) === null || _bpaResponse$BPA3 === void 0 ? void 0 : (_bpaResponse$BPA3$ = _bpaResponse$BPA3[0]) === null || _bpaResponse$BPA3$ === void 0 ? void 0 : _bpaResponse$BPA3$.edcrNumber
45188
45187
  };
45189
45188
  return Promise.resolve(OBPSService.comparisionReport(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, _extends({}, comparisionRep))).then(function (comparisionReport) {
45190
- function _temp4() {
45191
- var _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _BPA$additionalDetail6, _BPA$additionalDetail7, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail11, _BPA$additionalDetail12, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _BPA$additionalDetail18, _BPA$additionalDetail19, _details;
45189
+ function _temp8() {
45190
+ function _temp6() {
45191
+ function _temp4() {
45192
+ var _fetchBillRes, _fetchBillRes$Bill, _BPA$additionalDetail, _BPA$additionalDetail2, _BPA$additionalDetail3, _BPA$additionalDetail4, _BPA$additionalDetail5, _BPA$additionalDetail6, _BPA$additionalDetail7, _permitcondn, _permitcondn2, _BPA$auditDetails, _BPA$auditDetails2, _edcr$planDetail3, _edcr$planDetail3$pla, _edcr$planDetail4, _edcr$planDetail4$pla, _edcr$planDetail5, _edcr$planDetail5$pla, _edcr$planDetail6, _edcr$planDetail6$pla, _edcr$planDetail7, _edcr$planDetail7$pla, _BPA$additionalDetail11, _BPA$additionalDetail12, _edcr$planDetail8, _edcr$planDetail8$blo, _edcr$planDetail8$blo2, _edcr$planDetail8$blo3, _edcr$planDetail9, _edcr$planDetail9$blo, _edcr$planDetail9$blo2, _edcr$planDetail9$blo3, _edcr$planDetail10, _edcr$planDetail10$bl, _edcr$planDetail10$bl2, _edcr$planDetail10$bl3, _edcr$planDetail11, _edcr$planDetail11$pl, _BPA$landInfo, _BPA$landInfo$address, _BPA$landInfo2, _BPA$landInfo2$addres, _BPA$landInfo3, _BPA$landInfo3$addres, _BPA$landInfo3$addres2, _BPA$landInfo4, _BPA$landInfo4$addres, _BPA$landInfo5, _BPA$landInfo5$addres, _BPA$landInfo6, _BPA$landInfo6$owners, _BPA$landInfo7, _BPA$landInfo7$owners, _BPA$landInfo9, _BPA$landInfo9$owners, _BPA$documents, _BPA$additionalDetail13, _BPA$additionalDetail14, _BPA$additionalDetail15, _BPA$additionalDetail16, _BPA$additionalDetail17, _BPA$additionalDetail18, _BPA$additionalDetail19, _billDetails$addition, _billDetails$addition2, _details;
45193
+
45194
+ if ((collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.length) > 0) {
45195
+ collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.map(function (ob) {
45196
+ var _ob$paymentDetails, _ob$paymentDetails$, _ob$paymentDetails$$b, _ob$paymentDetails$$b2, _ob$paymentDetails$$b3;
45197
+
45198
+ ob === null || ob === void 0 ? void 0 : (_ob$paymentDetails = ob.paymentDetails) === null || _ob$paymentDetails === void 0 ? void 0 : (_ob$paymentDetails$ = _ob$paymentDetails[0]) === null || _ob$paymentDetails$ === void 0 ? void 0 : (_ob$paymentDetails$$b = _ob$paymentDetails$.bill) === null || _ob$paymentDetails$$b === void 0 ? void 0 : (_ob$paymentDetails$$b2 = _ob$paymentDetails$$b.billDetails) === null || _ob$paymentDetails$$b2 === void 0 ? void 0 : (_ob$paymentDetails$$b3 = _ob$paymentDetails$$b2[0]) === null || _ob$paymentDetails$$b3 === void 0 ? void 0 : _ob$paymentDetails$$b3.billAccountDetails.map(function (bill, index) {
45199
+ collectionBillArray.push({
45200
+ title: (bill === null || bill === void 0 ? void 0 : bill.taxHeadCode) + "_DETAILS",
45201
+ value: "",
45202
+ isSubTitle: true
45203
+ }, {
45204
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
45205
+ value: "\u20B9" + (bill === null || bill === void 0 ? void 0 : bill.amount)
45206
+ }, {
45207
+ title: "BPA_STATUS_LABEL",
45208
+ value: "Paid"
45209
+ });
45210
+ totalAmount = totalAmount + parseInt(bill === null || bill === void 0 ? void 0 : bill.amount);
45211
+ });
45212
+ });
45213
+ }
45192
45214
 
45193
- function ConvertEpochToValidityDate(dateEpoch) {
45194
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45195
- return "NA";
45196
- }
45215
+ if (((_fetchBillRes = fetchBillRes) === null || _fetchBillRes === void 0 ? void 0 : (_fetchBillRes$Bill = _fetchBillRes.Bill) === null || _fetchBillRes$Bill === void 0 ? void 0 : _fetchBillRes$Bill.length) > 0) {
45216
+ var _fetchBillRes2, _fetchBillRes2$Bill, _fetchBillRes2$Bill$, _fetchBillRes2$Bill$$, _fetchBillRes2$Bill$$2, _fetchBillRes2$Bill$$3, _fetchBillRes2$Bill$$4, _fetchBillRes3, _fetchBillRes3$Bill, _fetchBillRes3$Bill$;
45217
+
45218
+ collectionBillArray.push({
45219
+ title: ((_fetchBillRes2 = fetchBillRes) === null || _fetchBillRes2 === void 0 ? void 0 : (_fetchBillRes2$Bill = _fetchBillRes2.Bill) === null || _fetchBillRes2$Bill === void 0 ? void 0 : (_fetchBillRes2$Bill$ = _fetchBillRes2$Bill[0]) === null || _fetchBillRes2$Bill$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$ = _fetchBillRes2$Bill$.billDetails) === null || _fetchBillRes2$Bill$$ === void 0 ? void 0 : (_fetchBillRes2$Bill$$2 = _fetchBillRes2$Bill$$[0]) === null || _fetchBillRes2$Bill$$2 === void 0 ? void 0 : (_fetchBillRes2$Bill$$3 = _fetchBillRes2$Bill$$2.billAccountDetails) === null || _fetchBillRes2$Bill$$3 === void 0 ? void 0 : (_fetchBillRes2$Bill$$4 = _fetchBillRes2$Bill$$3[0]) === null || _fetchBillRes2$Bill$$4 === void 0 ? void 0 : _fetchBillRes2$Bill$$4.taxHeadCode) + "_DETAILS" || "BPA_SANC_FEE_DETAILS",
45220
+ value: "",
45221
+ isSubTitle: true
45222
+ }, {
45223
+ title: "BPA_SANC_FEE_LABEL",
45224
+ value: "\u20B9" + ((_fetchBillRes3 = fetchBillRes) === null || _fetchBillRes3 === void 0 ? void 0 : (_fetchBillRes3$Bill = _fetchBillRes3.Bill) === null || _fetchBillRes3$Bill === void 0 ? void 0 : (_fetchBillRes3$Bill$ = _fetchBillRes3$Bill[0]) === null || _fetchBillRes3$Bill$ === void 0 ? void 0 : _fetchBillRes3$Bill$.totalAmount)
45225
+ }, {
45226
+ title: "BPA_STATUS_LABEL",
45227
+ value: "Unpaid"
45228
+ });
45229
+ }
45197
45230
 
45198
- var dateFromApi = new Date(dateEpoch);
45199
- var month = dateFromApi.getMonth() + 1;
45200
- var day = dateFromApi.getDate();
45201
- var year = dateFromApi.getFullYear() - 3;
45202
- month = (month > 9 ? "" : "0") + month;
45203
- day = (day > 9 ? "" : "0") + day;
45204
- return day + "/" + month + "/" + year;
45205
- }
45231
+ totalAmount > 0 && collectionBillArray.push({
45232
+ title: "BPA_TOT_AMT_PAID",
45233
+ value: "\u20B9" + totalAmount
45234
+ });
45235
+ var billDetails = {
45236
+ title: "BPA_FEE_DETAILS_LABEL",
45237
+ isFeeDetails: true,
45238
+ additionalDetails: {
45239
+ inspectionReport: [],
45240
+ values: [].concat(collectionBillArray)
45241
+ }
45242
+ };
45206
45243
 
45207
- BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail = BPA.additionalDetails) === null || _BPA$additionalDetail === void 0 ? void 0 : (_BPA$additionalDetail2 = _BPA$additionalDetail.fieldinspection_pending) === null || _BPA$additionalDetail2 === void 0 ? void 0 : _BPA$additionalDetail2.forEach(function (fiData) {
45208
- var _fiData$docs2;
45244
+ function ConvertEpochToValidityDate(dateEpoch) {
45245
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45246
+ return "NA";
45247
+ }
45209
45248
 
45210
- fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45211
- var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45249
+ var dateFromApi = new Date(dateEpoch);
45250
+ var month = dateFromApi.getMonth() + 1;
45251
+ var day = dateFromApi.getDate();
45252
+ var year = dateFromApi.getFullYear() - 3;
45253
+ month = (month > 9 ? "" : "0") + month;
45254
+ day = (day > 9 ? "" : "0") + day;
45255
+ return day + "/" + month + "/" + year;
45256
+ }
45212
45257
 
45213
- if ((_fileDetails3 = fileDetails) !== null && _fileDetails3 !== void 0 && _fileDetails3.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = (_fileDetails4 = fileDetails) === null || _fileDetails4 === void 0 ? void 0 : (_fileDetails4$data$fi = _fileDetails4.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails4$data$fi === void 0 ? void 0 : _fileDetails4$data$fi.split(',')[0];
45214
- });
45215
- });
45216
- var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45217
- var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45258
+ 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) {
45259
+ var _fiData$docs2;
45218
45260
 
45219
- return {
45220
- title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45221
- values: [{
45222
- title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45223
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45224
- isNotTranslated: true
45225
- }, {
45226
- title: "BPA_NOC_STATUS",
45227
- value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45228
- field: "STATUS"
45229
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45230
- title: "BPA_SUDMITTED_ON_LABEL",
45231
- value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
45232
- isNotTranslated: true
45233
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45234
- title: "BPA_APPROVAL_NUMBER_LABEL",
45235
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45236
- isNotTranslated: true
45237
- }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45238
- title: "BPA_APPROVED_REJECTED_ON_LABEL",
45239
- value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
45240
- isNotTranslated: true
45241
- }],
45242
- additionalDetails: {
45243
- data: nocDetails,
45244
- noc: [{
45245
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45246
- values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45247
- var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45261
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45262
+ var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45248
45263
 
45249
- return {
45250
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45251
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45252
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45253
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45254
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45255
- url: (_fileDetails5 = fileDetails) !== null && _fileDetails5 !== void 0 && (_fileDetails5$data = _fileDetails5.data) !== null && _fileDetails5$data !== void 0 && _fileDetails5$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails6 = fileDetails) === null || _fileDetails6 === void 0 ? void 0 : (_fileDetails6$data = _fileDetails6.data) === null || _fileDetails6$data === void 0 ? void 0 : (_fileDetails6$data$do = _fileDetails6$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails6$data$do === void 0 ? void 0 : _fileDetails6$data$do.split(',')[0] : ""
45256
- };
45257
- })
45258
- }]
45259
- }
45260
- };
45261
- });
45262
- var inspectionReport = [];
45263
- var checklist = [];
45264
- BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail3 = BPA.additionalDetails) === null || _BPA$additionalDetail3 === void 0 ? void 0 : (_BPA$additionalDetail4 = _BPA$additionalDetail3.fieldinspection_pending) === null || _BPA$additionalDetail4 === void 0 ? void 0 : _BPA$additionalDetail4.filter(function (ob) {
45265
- return ob.docs && ob.docs.length > 0;
45266
- }).map(function (ob, ind) {
45267
- var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45268
-
45269
- checklist = [];
45270
- inspectionReport.push({
45271
- title: "BPA_FI_REPORT",
45272
- asSectionHeader: true,
45273
- values: [{
45274
- title: "BPA_FI_DATE_LABEL",
45275
- value: ob.date.includes("-") ? ((_ob$date = ob.date) === null || _ob$date === void 0 ? void 0 : _ob$date.split("-")[2]) + "/" + ((_ob$date2 = ob.date) === null || _ob$date2 === void 0 ? void 0 : _ob$date2.split("-")[1]) + "/" + ((_ob$date3 = ob.date) === null || _ob$date3 === void 0 ? void 0 : _ob$date3.split("-")[0]) : ob.date
45276
- }, {
45277
- title: "BPA_FI_TIME_LABEL",
45278
- value: ob.time
45279
- }]
45280
- });
45281
- ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45282
- checklist.push({
45283
- title: q.question,
45284
- value: q.value
45285
- });
45286
- checklist.push({
45287
- title: "BPA_ENTER_REMARKS",
45288
- value: q.remarks
45264
+ if ((_fileDetails3 = fileDetails) !== null && _fileDetails3 !== void 0 && _fileDetails3.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) fiDoc.url = (_fileDetails4 = fileDetails) === null || _fileDetails4 === void 0 ? void 0 : (_fileDetails4$data$fi = _fileDetails4.data[fiDoc === null || fiDoc === void 0 ? void 0 : fiDoc.fileStoreId]) === null || _fileDetails4$data$fi === void 0 ? void 0 : _fileDetails4$data$fi.split(',')[0];
45265
+ });
45289
45266
  });
45290
- });
45291
- inspectionReport.push({
45292
- title: "BPA_CHECK_LIST_DETAILS",
45293
- asSectionHeader: true,
45294
- values: checklist
45295
- });
45296
- inspectionReport.push({
45297
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45298
- asSectionHeader: true,
45299
- additionalDetails: {
45300
- obpsDocuments: [{
45301
- title: "",
45302
- values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45303
- var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45267
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45268
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45304
45269
 
45305
- return {
45306
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45307
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45308
- documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45309
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45310
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45311
- url: (_fileDetails7 = fileDetails) !== null && _fileDetails7 !== void 0 && (_fileDetails7$data = _fileDetails7.data) !== null && _fileDetails7$data !== void 0 && _fileDetails7$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails8 = fileDetails) === null || _fileDetails8 === void 0 ? void 0 : (_fileDetails8$data = _fileDetails8.data) === null || _fileDetails8$data === void 0 ? void 0 : (_fileDetails8$data$do = _fileDetails8$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails8$data$do === void 0 ? void 0 : _fileDetails8$data$do.split(',')[0] : ""
45312
- };
45313
- })
45270
+ return {
45271
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45272
+ values: [{
45273
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45274
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45275
+ isNotTranslated: true
45276
+ }, {
45277
+ title: "BPA_NOC_STATUS",
45278
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45279
+ field: "STATUS"
45280
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45281
+ title: "BPA_SUDMITTED_ON_LABEL",
45282
+ value: nocDetails !== null && nocDetails !== void 0 && (_nocDetails$additiona2 = nocDetails.additionalDetails) !== null && _nocDetails$additiona2 !== void 0 && _nocDetails$additiona2.SubmittedOn ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona3 = nocDetails.additionalDetails) === null || _nocDetails$additiona3 === void 0 ? void 0 : _nocDetails$additiona3.SubmittedOn)), 'dd/MM/yyyy') : "NA",
45283
+ isNotTranslated: true
45284
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45285
+ title: "BPA_APPROVAL_NUMBER_LABEL",
45286
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45287
+ isNotTranslated: true
45288
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45289
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
45290
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "REJECTED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_APPROVED" || (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus) === "AUTO_REJECTED" ? format(new Date(Number(nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$auditDeta = nocDetails.auditDetails) === null || _nocDetails$auditDeta === void 0 ? void 0 : _nocDetails$auditDeta.lastModifiedTime)), 'dd/MM/yyyy') : "NA",
45291
+ isNotTranslated: true
45292
+ }],
45293
+ additionalDetails: {
45294
+ data: nocDetails,
45295
+ noc: [{
45296
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45297
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45298
+ var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45299
+
45300
+ return {
45301
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45302
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45303
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45304
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45305
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45306
+ url: (_fileDetails5 = fileDetails) !== null && _fileDetails5 !== void 0 && (_fileDetails5$data = _fileDetails5.data) !== null && _fileDetails5$data !== void 0 && _fileDetails5$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails6 = fileDetails) === null || _fileDetails6 === void 0 ? void 0 : (_fileDetails6$data = _fileDetails6.data) === null || _fileDetails6$data === void 0 ? void 0 : (_fileDetails6$data$do = _fileDetails6$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails6$data$do === void 0 ? void 0 : _fileDetails6$data$do.split(',')[0] : ""
45307
+ };
45308
+ })
45309
+ }]
45310
+ }
45311
+ };
45312
+ });
45313
+ var inspectionReport = [];
45314
+ var checklist = [];
45315
+ 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) {
45316
+ return ob.docs && ob.docs.length > 0;
45317
+ }).map(function (ob, ind) {
45318
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45319
+
45320
+ checklist = [];
45321
+ inspectionReport.push({
45322
+ title: "BPA_FI_REPORT",
45323
+ asSectionHeader: true,
45324
+ values: [{
45325
+ title: "BPA_FI_DATE_LABEL",
45326
+ 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
45327
+ }, {
45328
+ title: "BPA_FI_TIME_LABEL",
45329
+ value: ob.time
45330
+ }]
45331
+ });
45332
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45333
+ checklist.push({
45334
+ title: q.question,
45335
+ value: q.value
45336
+ });
45337
+ checklist.push({
45338
+ title: "BPA_ENTER_REMARKS",
45339
+ value: q.remarks
45340
+ });
45341
+ });
45342
+ inspectionReport.push({
45343
+ title: "BPA_CHECK_LIST_DETAILS",
45344
+ asSectionHeader: true,
45345
+ values: checklist
45346
+ });
45347
+ inspectionReport.push({
45348
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45349
+ asSectionHeader: true,
45350
+ additionalDetails: {
45351
+ obpsDocuments: [{
45352
+ title: "",
45353
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45354
+ var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45355
+
45356
+ return {
45357
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45358
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45359
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45360
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45361
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45362
+ url: (_fileDetails7 = fileDetails) !== null && _fileDetails7 !== void 0 && (_fileDetails7$data = _fileDetails7.data) !== null && _fileDetails7$data !== void 0 && _fileDetails7$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails8 = fileDetails) === null || _fileDetails8 === void 0 ? void 0 : (_fileDetails8$data = _fileDetails8.data) === null || _fileDetails8$data === void 0 ? void 0 : (_fileDetails8$data$do = _fileDetails8$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails8$data$do === void 0 ? void 0 : _fileDetails8$data$do.split(',')[0] : ""
45363
+ };
45364
+ })
45365
+ }]
45366
+ }
45367
+ });
45368
+ });
45369
+ var details = [];
45370
+ var applicationDetailsInfo = {
45371
+ title: " ",
45372
+ isCommon: true,
45373
+ values: [{
45374
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45375
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45314
45376
  }]
45315
- }
45316
- });
45317
- });
45318
- var details = [];
45319
- var applicationDetailsInfo = {
45320
- title: " ",
45321
- isCommon: true,
45322
- values: [{
45323
- title: "BPA_APPLICATION_NUMBER_LABEL",
45324
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45325
- }]
45326
- };
45327
-
45328
- if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45329
- var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45377
+ };
45330
45378
 
45331
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45332
- title: "BPA_PERMIT_APP_NUMBER",
45333
- to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
45334
- value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
45335
- isLink: true
45336
- }]);
45337
- }
45338
-
45339
- var permitcondn = [];
45340
- (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail5 = BPA.additionalDetails) === null || _BPA$additionalDetail5 === void 0 ? void 0 : _BPA$additionalDetail5.pendingapproval) && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail6 = BPA.additionalDetails) === null || _BPA$additionalDetail6 === void 0 ? void 0 : _BPA$additionalDetail6.pendingapproval.length) > 0 && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail7 = BPA.additionalDetails) === null || _BPA$additionalDetail7 === void 0 ? void 0 : _BPA$additionalDetail7.pendingapproval.map(function (ob, index) {
45341
- permitcondn.push({
45342
- title: index + 1 + ". " + ob,
45343
- value: ""
45344
- });
45345
- }));
45346
- var PermitConditions = {
45347
- title: "BPA_PERMIT_CONDITIONS",
45348
- isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45349
- isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45350
- additionalDetails: {
45351
- inspectionReport: [],
45352
- permit: [].concat(permitcondn)
45353
- }
45354
- };
45355
- if (permitcondn.length == 0) PermitConditions = {};
45379
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45380
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45356
45381
 
45357
- if (riskType == "LOW" && permitcondn.length > 0) {
45358
- permitcondn = [];
45359
- PermitConditions = {};
45360
- }
45361
-
45362
- if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45363
- var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45382
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45383
+ title: "BPA_PERMIT_APP_NUMBER",
45384
+ 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),
45385
+ 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,
45386
+ isLink: true
45387
+ }]);
45388
+ }
45364
45389
 
45365
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45366
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45367
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45368
- });
45369
- applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45370
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45371
- value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
45372
- });
45373
- }
45390
+ var permitcondn = [];
45391
+ (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) {
45392
+ permitcondn.push({
45393
+ title: index + 1 + ". " + ob,
45394
+ value: ""
45395
+ });
45396
+ }));
45397
+ var PermitConditions = {
45398
+ title: "BPA_PERMIT_CONDITIONS",
45399
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45400
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45401
+ additionalDetails: {
45402
+ inspectionReport: [],
45403
+ permit: [].concat(permitcondn)
45404
+ }
45405
+ };
45406
+ if (permitcondn.length == 0) PermitConditions = {};
45374
45407
 
45375
- var basicDetails = {
45376
- title: "BPA_BASIC_DETAILS_TITLE",
45377
- asSectionHeader: true,
45378
- isInsert: true,
45379
- isCommon: true,
45380
- values: [{
45381
- title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45382
- value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
45383
- }, {
45384
- title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45385
- value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45386
- }, {
45387
- title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45388
- value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45389
- }, {
45390
- title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45391
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail3 = edcr.planDetail) === null || _edcr$planDetail3 === void 0 ? void 0 : (_edcr$planDetail3$pla = _edcr$planDetail3.planInformation) === null || _edcr$planDetail3$pla === void 0 ? void 0 : _edcr$planDetail3$pla.occupancy
45392
- }, {
45393
- title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45394
- value: "WF_BPA_" + riskType,
45395
- isInsert: true
45396
- }, {
45397
- title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45398
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail4 = edcr.planDetail) === null || _edcr$planDetail4 === void 0 ? void 0 : (_edcr$planDetail4$pla = _edcr$planDetail4.planInformation) === null || _edcr$planDetail4$pla === void 0 ? void 0 : _edcr$planDetail4$pla.applicantName
45399
- }]
45400
- };
45401
- var plotDetails = {
45402
- title: "BPA_PLOT_DETAILS_TITLE",
45403
- asSectionHeader: true,
45404
- isCommon: true,
45405
- values: [{
45406
- title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45407
- value: "" + (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail5 = edcr.planDetail) === null || _edcr$planDetail5 === void 0 ? void 0 : (_edcr$planDetail5$pla = _edcr$planDetail5.planInformation) === null || _edcr$planDetail5$pla === void 0 ? void 0 : _edcr$planDetail5$pla.plotArea),
45408
- isNotTranslated: true,
45409
- isUnit: "BPA_SQ_FT_LABEL"
45410
- }, {
45411
- title: "BPA_PLOT_NUMBER_LABEL",
45412
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail6 = edcr.planDetail) === null || _edcr$planDetail6 === void 0 ? void 0 : (_edcr$planDetail6$pla = _edcr$planDetail6.planInformation) === null || _edcr$planDetail6$pla === void 0 ? void 0 : _edcr$planDetail6$pla.plotNo) || "NA",
45413
- isNotTranslated: true
45414
- }, {
45415
- title: "BPA_KHATHA_NUMBER_LABEL",
45416
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail7 = edcr.planDetail) === null || _edcr$planDetail7 === void 0 ? void 0 : (_edcr$planDetail7$pla = _edcr$planDetail7.planInformation) === null || _edcr$planDetail7$pla === void 0 ? void 0 : _edcr$planDetail7$pla.khataNo) || "NA",
45417
- isNotTranslated: true
45418
- }, {
45419
- title: "BPA_HOLDING_NUMBER_LABEL",
45420
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45421
- isNotTranslated: true
45422
- }, {
45423
- title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45424
- value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45425
- isNotTranslated: true
45426
- }]
45427
- };
45428
- var scrutinyDetails = {
45429
- title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45430
- isScrutinyDetails: true,
45431
- isBackGroundColor: true,
45432
- additionalDetails: {
45433
- values: [{
45434
- title: "BPA_EDCR_DETAILS",
45435
- value: " ",
45436
- isHeader: true
45437
- }, {
45438
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45439
- value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45440
- }],
45441
- scruntinyDetails: [{
45442
- title: "BPA_UPLOADED_PLAN_DIAGRAM",
45443
- value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45444
- text: "BPA_UPLOADED_PLAN_DXF"
45445
- }, {
45446
- title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45447
- value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45448
- text: "BPA_SCRUTINY_REPORT_PDF"
45449
- }]
45450
- }
45451
- };
45452
- var buildingExtractionDetails = {
45453
- title: "",
45454
- isScrutinyDetails: true,
45455
- isBackGroundColor: true,
45456
- additionalDetails: {
45457
- values: [{
45458
- title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45459
- value: " ",
45460
- isHeader: true
45461
- }, {
45462
- title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45463
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail8 = edcr.planDetail) === null || _edcr$planDetail8 === void 0 ? void 0 : (_edcr$planDetail8$blo = _edcr$planDetail8.blocks) === null || _edcr$planDetail8$blo === void 0 ? void 0 : (_edcr$planDetail8$blo2 = _edcr$planDetail8$blo[0]) === null || _edcr$planDetail8$blo2 === void 0 ? void 0 : (_edcr$planDetail8$blo3 = _edcr$planDetail8$blo2.building) === null || _edcr$planDetail8$blo3 === void 0 ? void 0 : _edcr$planDetail8$blo3.totalBuitUpArea,
45464
- isUnit: "BPA_SQ_MTRS_LABEL"
45465
- }, {
45466
- title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45467
- value: (edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail9 = edcr.planDetail) === null || _edcr$planDetail9 === void 0 ? void 0 : (_edcr$planDetail9$blo = _edcr$planDetail9.blocks) === null || _edcr$planDetail9$blo === void 0 ? void 0 : (_edcr$planDetail9$blo2 = _edcr$planDetail9$blo[0]) === null || _edcr$planDetail9$blo2 === void 0 ? void 0 : (_edcr$planDetail9$blo3 = _edcr$planDetail9$blo2.building) === null || _edcr$planDetail9$blo3 === void 0 ? void 0 : _edcr$planDetail9$blo3.totalFloors) || "NA"
45468
- }, {
45469
- title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45470
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail10 = edcr.planDetail) === null || _edcr$planDetail10 === void 0 ? void 0 : (_edcr$planDetail10$bl = _edcr$planDetail10.blocks) === null || _edcr$planDetail10$bl === void 0 ? void 0 : (_edcr$planDetail10$bl2 = _edcr$planDetail10$bl[0]) === null || _edcr$planDetail10$bl2 === void 0 ? void 0 : (_edcr$planDetail10$bl3 = _edcr$planDetail10$bl2.building) === null || _edcr$planDetail10$bl3 === void 0 ? void 0 : _edcr$planDetail10$bl3.declaredBuildingHeigh,
45471
- isUnit: "BPA_MTRS_LABEL"
45472
- }],
45473
- scruntinyDetails: []
45474
- }
45475
- };
45476
- var demolitionAreaDetails = {
45477
- title: "",
45478
- isScrutinyDetails: true,
45479
- isBackGroundColor: true,
45480
- additionalDetails: {
45481
- values: [{
45482
- title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45483
- value: " ",
45484
- isHeader: true
45485
- }, {
45486
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45487
- value: edcr === null || edcr === void 0 ? void 0 : (_edcr$planDetail11 = edcr.planDetail) === null || _edcr$planDetail11 === void 0 ? void 0 : (_edcr$planDetail11$pl = _edcr$planDetail11.planInformation) === null || _edcr$planDetail11$pl === void 0 ? void 0 : _edcr$planDetail11$pl.demolitionArea,
45488
- isUnit: "BPA_SQ_MTRS_LABEL"
45489
- }],
45490
- scruntinyDetails: []
45491
- }
45492
- };
45493
- var subOccupancyTableDetails = {
45494
- title: "",
45495
- isSubOccupancyTable: true,
45496
- isTitleRepeat: true,
45497
- additionalDetails: {
45498
- values: [{
45499
- title: "BPA_OCC_SUBOCC_HEADER",
45500
- value: " ",
45501
- isHeader: true
45502
- }],
45503
- subOccupancyTableDetails: [{
45504
- title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45505
- value: edcr
45506
- }, {
45507
- title: "NO_REPEAT",
45508
- value: ""
45509
- }]
45510
- }
45511
- };
45512
- var addressDetails = {
45513
- title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45514
- asSectionHeader: true,
45515
- isCommon: true,
45516
- values: [{
45517
- title: "BPA_DETAILS_PIN_LABEL",
45518
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo = BPA.landInfo) === null || _BPA$landInfo === void 0 ? void 0 : (_BPA$landInfo$address = _BPA$landInfo.address) === null || _BPA$landInfo$address === void 0 ? void 0 : _BPA$landInfo$address.pincode
45519
- }, {
45520
- title: "BPA_CITY_LABEL",
45521
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo2 = BPA.landInfo) === null || _BPA$landInfo2 === void 0 ? void 0 : (_BPA$landInfo2$addres = _BPA$landInfo2.address) === null || _BPA$landInfo2$addres === void 0 ? void 0 : _BPA$landInfo2$addres.city
45522
- }, {
45523
- title: "BPA_LOC_MOHALLA_LABEL",
45524
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo3 = BPA.landInfo) === null || _BPA$landInfo3 === void 0 ? void 0 : (_BPA$landInfo3$addres = _BPA$landInfo3.address) === null || _BPA$landInfo3$addres === void 0 ? void 0 : (_BPA$landInfo3$addres2 = _BPA$landInfo3$addres.locality) === null || _BPA$landInfo3$addres2 === void 0 ? void 0 : _BPA$landInfo3$addres2.name
45525
- }, {
45526
- title: "BPA_DETAILS_SRT_NAME_LABEL",
45527
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo4 = BPA.landInfo) === null || _BPA$landInfo4 === void 0 ? void 0 : (_BPA$landInfo4$addres = _BPA$landInfo4.address) === null || _BPA$landInfo4$addres === void 0 ? void 0 : _BPA$landInfo4$addres.street
45528
- }, {
45529
- title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45530
- value: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo5 = BPA.landInfo) === null || _BPA$landInfo5 === void 0 ? void 0 : (_BPA$landInfo5$addres = _BPA$landInfo5.address) === null || _BPA$landInfo5$addres === void 0 ? void 0 : _BPA$landInfo5$addres.landmark
45531
- }]
45532
- };
45533
- var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
45408
+ if (riskType == "LOW" && permitcondn.length > 0) {
45409
+ permitcondn = [];
45410
+ PermitConditions = {};
45411
+ }
45534
45412
 
45535
- if ((BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo7 = BPA.landInfo) === null || _BPA$landInfo7 === void 0 ? void 0 : (_BPA$landInfo7$owners = _BPA$landInfo7.owners) === null || _BPA$landInfo7$owners === void 0 ? void 0 : _BPA$landInfo7$owners.length) > 0) {
45536
- var _BPA$landInfo8, _BPA$landInfo8$owners;
45413
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45414
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45537
45415
 
45538
- BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo8 = BPA.landInfo) === null || _BPA$landInfo8 === void 0 ? void 0 : (_BPA$landInfo8$owners = _BPA$landInfo8.owners) === null || _BPA$landInfo8$owners === void 0 ? void 0 : _BPA$landInfo8$owners.forEach(function (ownerD) {
45539
- if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45540
- });
45541
- }
45416
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45417
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45418
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45419
+ });
45420
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45421
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45422
+ value: BPA !== null && BPA !== void 0 && (_BPA$additionalDetail8 = BPA.additionalDetails) !== null && _BPA$additionalDetail8 !== void 0 && _BPA$additionalDetail8.validityDate ? ConvertEpochToValidityDate(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail9 = BPA.additionalDetails) === null || _BPA$additionalDetail9 === void 0 ? void 0 : _BPA$additionalDetail9.validityDate) + " - " + format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail10 = BPA.additionalDetails) === null || _BPA$additionalDetail10 === void 0 ? void 0 : _BPA$additionalDetail10.validityDate), 'dd/MM/yyyy') : "NA"
45423
+ });
45424
+ }
45542
45425
 
45543
- var ownerDetails = {
45544
- title: "BPA_APPLICANT_DETAILS_HEADER",
45545
- isOwnerDetails: true,
45546
- additionalDetails: {
45547
- owners: BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo9 = BPA.landInfo) === null || _BPA$landInfo9 === void 0 ? void 0 : (_BPA$landInfo9$owners = _BPA$landInfo9.owners) === null || _BPA$landInfo9$owners === void 0 ? void 0 : _BPA$landInfo9$owners.map(function (owner, index) {
45548
- return {
45549
- title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45426
+ var basicDetails = {
45427
+ title: "BPA_BASIC_DETAILS_TITLE",
45428
+ asSectionHeader: true,
45429
+ isInsert: true,
45430
+ isCommon: true,
45431
+ values: [{
45432
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45433
+ value: BPA !== null && BPA !== void 0 && (_BPA$auditDetails = BPA.auditDetails) !== null && _BPA$auditDetails !== void 0 && _BPA$auditDetails.createdTime ? format(new Date(BPA === null || BPA === void 0 ? void 0 : (_BPA$auditDetails2 = BPA.auditDetails) === null || _BPA$auditDetails2 === void 0 ? void 0 : _BPA$auditDetails2.createdTime), 'dd/MM/yyyy') : ''
45434
+ }, {
45435
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45436
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45437
+ }, {
45438
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45439
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45440
+ }, {
45441
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45442
+ 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
45443
+ }, {
45444
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45445
+ value: "WF_BPA_" + riskType,
45446
+ isInsert: true
45447
+ }, {
45448
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45449
+ 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
45450
+ }]
45451
+ };
45452
+ var plotDetails = {
45453
+ title: "BPA_PLOT_DETAILS_TITLE",
45454
+ asSectionHeader: true,
45455
+ isCommon: true,
45456
+ values: [{
45457
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45458
+ 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),
45459
+ isNotTranslated: true,
45460
+ isUnit: "BPA_SQ_FT_LABEL"
45461
+ }, {
45462
+ title: "BPA_PLOT_NUMBER_LABEL",
45463
+ 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",
45464
+ isNotTranslated: true
45465
+ }, {
45466
+ title: "BPA_KHATHA_NUMBER_LABEL",
45467
+ 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",
45468
+ isNotTranslated: true
45469
+ }, {
45470
+ title: "BPA_HOLDING_NUMBER_LABEL",
45471
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45472
+ isNotTranslated: true
45473
+ }, {
45474
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45475
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45476
+ isNotTranslated: true
45477
+ }]
45478
+ };
45479
+ var scrutinyDetails = {
45480
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45481
+ isScrutinyDetails: true,
45482
+ isBackGroundColor: true,
45483
+ additionalDetails: {
45550
45484
  values: [{
45551
- title: "CORE_COMMON_NAME",
45552
- value: owner === null || owner === void 0 ? void 0 : owner.name
45553
- }, {
45554
- title: "BPA_APPLICANT_GENDER_LABEL",
45555
- value: owner === null || owner === void 0 ? void 0 : owner.gender
45485
+ title: "BPA_EDCR_DETAILS",
45486
+ value: " ",
45487
+ isHeader: true
45556
45488
  }, {
45557
- title: "CORE_COMMON_MOBILE_NUMBER",
45558
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45489
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45490
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45491
+ }],
45492
+ scruntinyDetails: [{
45493
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
45494
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45495
+ text: "BPA_UPLOADED_PLAN_DXF"
45559
45496
  }, {
45560
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
45561
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45562
- isNotTranslated: false
45497
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45498
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45499
+ text: "BPA_SCRUTINY_REPORT_PDF"
45563
45500
  }]
45564
- };
45565
- })
45566
- }
45567
- };
45568
- var documentDetails = {
45569
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45570
- asSectionHeader: true,
45571
- isDocumentDetails: true,
45572
- additionalDetails: {
45573
- obpsDocuments: [{
45501
+ }
45502
+ };
45503
+ var buildingExtractionDetails = {
45574
45504
  title: "",
45575
- values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45576
- var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45577
-
45578
- return {
45579
- title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45580
- documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45581
- documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45582
- fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45583
- id: doc === null || doc === void 0 ? void 0 : doc.id,
45584
- url: (_fileDetails9 = fileDetails) !== null && _fileDetails9 !== void 0 && (_fileDetails9$data = _fileDetails9.data) !== null && _fileDetails9$data !== void 0 && _fileDetails9$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails10 = fileDetails) === null || _fileDetails10 === void 0 ? void 0 : (_fileDetails10$data = _fileDetails10.data) === null || _fileDetails10$data === void 0 ? void 0 : (_fileDetails10$data$d = _fileDetails10$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails10$data$d === void 0 ? void 0 : _fileDetails10$data$d.split(',')[0] : ""
45585
- };
45586
- })
45587
- }]
45588
- }
45589
- };
45590
- var approvalChecks = [];
45591
- var approvalChecksDetails = {};
45592
-
45593
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45594
- var _mdmsRes$BPA2;
45505
+ isScrutinyDetails: true,
45506
+ isBackGroundColor: true,
45507
+ additionalDetails: {
45508
+ values: [{
45509
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45510
+ value: " ",
45511
+ isHeader: true
45512
+ }, {
45513
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45514
+ 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,
45515
+ isUnit: "BPA_SQ_MTRS_LABEL"
45516
+ }, {
45517
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45518
+ 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"
45519
+ }, {
45520
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45521
+ 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,
45522
+ isUnit: "BPA_MTRS_LABEL"
45523
+ }],
45524
+ scruntinyDetails: []
45525
+ }
45526
+ };
45527
+ var demolitionAreaDetails = {
45528
+ title: "",
45529
+ isScrutinyDetails: true,
45530
+ isBackGroundColor: true,
45531
+ additionalDetails: {
45532
+ values: [{
45533
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45534
+ value: " ",
45535
+ isHeader: true
45536
+ }, {
45537
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45538
+ 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,
45539
+ isUnit: "BPA_SQ_MTRS_LABEL"
45540
+ }],
45541
+ scruntinyDetails: []
45542
+ }
45543
+ };
45544
+ var subOccupancyTableDetails = {
45545
+ title: "",
45546
+ isSubOccupancyTable: true,
45547
+ isTitleRepeat: true,
45548
+ additionalDetails: {
45549
+ values: [{
45550
+ title: "BPA_OCC_SUBOCC_HEADER",
45551
+ value: " ",
45552
+ isHeader: true
45553
+ }],
45554
+ subOccupancyTableDetails: [{
45555
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45556
+ value: edcr
45557
+ }, {
45558
+ title: "NO_REPEAT",
45559
+ value: ""
45560
+ }]
45561
+ }
45562
+ };
45563
+ var addressDetails = {
45564
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45565
+ asSectionHeader: true,
45566
+ isCommon: true,
45567
+ values: [{
45568
+ title: "BPA_DETAILS_PIN_LABEL",
45569
+ 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
45570
+ }, {
45571
+ title: "BPA_CITY_LABEL",
45572
+ 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
45573
+ }, {
45574
+ title: "BPA_LOC_MOHALLA_LABEL",
45575
+ 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
45576
+ }, {
45577
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
45578
+ 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
45579
+ }, {
45580
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45581
+ 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
45582
+ }]
45583
+ };
45584
+ var checkOwnerLength = (BPA === null || BPA === void 0 ? void 0 : (_BPA$landInfo6 = BPA.landInfo) === null || _BPA$landInfo6 === void 0 ? void 0 : (_BPA$landInfo6$owners = _BPA$landInfo6.owners) === null || _BPA$landInfo6$owners === void 0 ? void 0 : _BPA$landInfo6$owners.length) || 1;
45595
45585
 
45596
- mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45597
- var _checklist$conditions;
45586
+ 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) {
45587
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
45598
45588
 
45599
- if ((checklist === null || checklist === void 0 ? void 0 : checklist.RiskType) === riskType && (checklist === null || checklist === void 0 ? void 0 : checklist.applicationType) === (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType) && (checklist === null || checklist === void 0 ? void 0 : checklist.ServiceType) === (edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType) && (checklist === null || checklist === void 0 ? void 0 : checklist.WFState) === "PENDINGAPPROVAL" && (checklist === null || checklist === void 0 ? void 0 : (_checklist$conditions = checklist.conditions) === null || _checklist$conditions === void 0 ? void 0 : _checklist$conditions.length) > 0) {
45600
- approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45601
- }
45602
- });
45603
- approvalChecksDetails = {
45604
- title: "",
45605
- isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45606
- asSectionHeader: true,
45607
- isPermissions: true,
45608
- additionalDetails: {
45609
- permissions: approvalChecks
45589
+ 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) {
45590
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45591
+ });
45610
45592
  }
45611
- };
45612
- }
45613
45593
 
45614
- if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45615
- var val;
45616
- var i;
45617
- var FieldInspectionData = [];
45618
- inspectionReport && (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail13 = BPA.additionalDetails) === null || _BPA$additionalDetail13 === void 0 ? void 0 : (_BPA$additionalDetail14 = _BPA$additionalDetail13.fieldinspection_pending) === null || _BPA$additionalDetail14 === void 0 ? void 0 : (_BPA$additionalDetail15 = _BPA$additionalDetail14[0]) === null || _BPA$additionalDetail15 === void 0 ? void 0 : _BPA$additionalDetail15.questions.length) > 0 && inspectionReport.map(function (ob, index) {
45619
- if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45620
- title: ob.title,
45621
- additionalDetails: {
45622
- inspectionReport: [],
45623
- values: ob.values
45624
- }
45625
- }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45626
- title: ob.title,
45627
- additionalDetails: {
45628
- isChecklist: true,
45629
- inspectionReport: [],
45630
- values: ob.values
45594
+ var ownerDetails = {
45595
+ title: "BPA_APPLICANT_DETAILS_HEADER",
45596
+ isOwnerDetails: true,
45597
+ additionalDetails: {
45598
+ 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) {
45599
+ return {
45600
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45601
+ values: [{
45602
+ title: "CORE_COMMON_NAME",
45603
+ value: owner === null || owner === void 0 ? void 0 : owner.name
45604
+ }, {
45605
+ title: "BPA_APPLICANT_GENDER_LABEL",
45606
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
45607
+ }, {
45608
+ title: "CORE_COMMON_MOBILE_NUMBER",
45609
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45610
+ }, {
45611
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
45612
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45613
+ isNotTranslated: false
45614
+ }]
45615
+ };
45616
+ })
45617
+ }
45618
+ };
45619
+ var documentDetails = {
45620
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45621
+ asSectionHeader: true,
45622
+ isDocumentDetails: true,
45623
+ additionalDetails: {
45624
+ obpsDocuments: [{
45625
+ title: "",
45626
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45627
+ var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45628
+
45629
+ return {
45630
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45631
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45632
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45633
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45634
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45635
+ url: (_fileDetails9 = fileDetails) !== null && _fileDetails9 !== void 0 && (_fileDetails9$data = _fileDetails9.data) !== null && _fileDetails9$data !== void 0 && _fileDetails9$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId] ? (_fileDetails10 = fileDetails) === null || _fileDetails10 === void 0 ? void 0 : (_fileDetails10$data = _fileDetails10.data) === null || _fileDetails10$data === void 0 ? void 0 : (_fileDetails10$data$d = _fileDetails10$data[doc === null || doc === void 0 ? void 0 : doc.fileStoreId]) === null || _fileDetails10$data$d === void 0 ? void 0 : _fileDetails10$data$d.split(',')[0] : ""
45636
+ };
45637
+ })
45638
+ }]
45639
+ }
45640
+ };
45641
+ var approvalChecks = [];
45642
+ var approvalChecksDetails = {};
45643
+
45644
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45645
+ var _mdmsRes$BPA2;
45646
+
45647
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45648
+ var _checklist$conditions;
45649
+
45650
+ 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) {
45651
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45652
+ }
45653
+ });
45654
+ approvalChecksDetails = {
45655
+ title: "",
45656
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45657
+ asSectionHeader: true,
45658
+ isPermissions: true,
45659
+ additionalDetails: {
45660
+ permissions: approvalChecks
45661
+ }
45662
+ };
45631
45663
  }
45632
- }]);else {
45633
- var _ob$additionalDetails, _ob$additionalDetails2;
45634
45664
 
45635
- var improvedDoc = [].concat((_ob$additionalDetails = ob.additionalDetails.obpsDocuments) === null || _ob$additionalDetails === void 0 ? void 0 : (_ob$additionalDetails2 = _ob$additionalDetails[0]) === null || _ob$additionalDetails2 === void 0 ? void 0 : _ob$additionalDetails2.values);
45636
- improvedDoc.map(function (ob) {
45637
- ob["isNotDuplicate"] = true;
45638
- });
45639
- improvedDoc.map(function (ob, index) {
45640
- val = ob.documentType;
45641
- if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45642
- if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45665
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45666
+ var val;
45667
+ var i;
45668
+ var FieldInspectionData = [];
45669
+ 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) {
45670
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45671
+ title: ob.title,
45672
+ additionalDetails: {
45673
+ inspectionReport: [],
45674
+ values: ob.values
45675
+ }
45676
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45677
+ title: ob.title,
45678
+ additionalDetails: {
45679
+ isChecklist: true,
45680
+ inspectionReport: [],
45681
+ values: ob.values
45682
+ }
45683
+ }]);else {
45684
+ var _ob$additionalDetails, _ob$additionalDetails2;
45685
+
45686
+ 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);
45687
+ improvedDoc.map(function (ob) {
45688
+ ob["isNotDuplicate"] = true;
45689
+ });
45690
+ improvedDoc.map(function (ob, index) {
45691
+ val = ob.documentType;
45692
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45693
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45694
+ }
45695
+ });
45696
+ FieldInspectionData = [].concat(FieldInspectionData, [{
45697
+ title: ob.title,
45698
+ additionalDetails: {
45699
+ FIdocuments: [],
45700
+ "documents": [{
45701
+ values: improvedDoc
45702
+ }]
45703
+ }
45704
+ }]);
45643
45705
  }
45644
45706
  });
45645
- FieldInspectionData = [].concat(FieldInspectionData, [{
45646
- title: ob.title,
45707
+ var fiReports = {
45708
+ title: "",
45709
+ isFieldInspection: true,
45710
+ isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? false : true,
45647
45711
  additionalDetails: {
45648
- FIdocuments: [],
45649
- "documents": [{
45650
- values: improvedDoc
45651
- }]
45712
+ values: [],
45713
+ fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail18 = BPA.additionalDetails) === null || _BPA$additionalDetail18 === void 0 ? void 0 : (_BPA$additionalDetail19 = _BPA$additionalDetail18.fieldinspection_pending) === null || _BPA$additionalDetail19 === void 0 ? void 0 : _BPA$additionalDetail19.length) > 0 ? true : false
45652
45714
  }
45653
- }]);
45654
- }
45655
- });
45656
- var fiReports = {
45657
- title: "",
45658
- isFieldInspection: true,
45659
- isNotAllowed: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail16 = BPA.additionalDetails) === null || _BPA$additionalDetail16 === void 0 ? void 0 : (_BPA$additionalDetail17 = _BPA$additionalDetail16.fieldinspection_pending) === null || _BPA$additionalDetail17 === void 0 ? void 0 : _BPA$additionalDetail17.length) > 0 ? false : true,
45660
- additionalDetails: {
45661
- values: [],
45662
- fiReport: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail18 = BPA.additionalDetails) === null || _BPA$additionalDetail18 === void 0 ? void 0 : (_BPA$additionalDetail19 = _BPA$additionalDetail18.fieldinspection_pending) === null || _BPA$additionalDetail19 === void 0 ? void 0 : _BPA$additionalDetail19.length) > 0 ? true : false
45715
+ };
45716
+
45717
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45718
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45719
+ } else {
45720
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45721
+ }
45722
+
45723
+ if (billDetails !== null && billDetails !== void 0 && (_billDetails$addition = billDetails.additionalDetails) !== null && _billDetails$addition !== void 0 && (_billDetails$addition2 = _billDetails$addition.values) !== null && _billDetails$addition2 !== void 0 && _billDetails$addition2.length) {
45724
+ details.push(billDetails);
45725
+ }
45726
+
45727
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45728
+ return data;
45729
+ });
45730
+ return {
45731
+ applicationData: BPA,
45732
+ applicationDetails: bpaFilterDetails,
45733
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45734
+ edcrDetails: edcr,
45735
+ nocData: noc,
45736
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45737
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45738
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45739
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status,
45740
+ collectionBillDetails: collectionBillDetails
45741
+ };
45663
45742
  }
45664
- };
45665
45743
 
45666
- if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45667
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45668
- } else {
45669
- details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45744
+ var i = 0;
45745
+
45746
+ var _temp3 = _for(function () {
45747
+ var _appBusinessService;
45748
+
45749
+ return i < ((_appBusinessService = appBusinessService) === null || _appBusinessService === void 0 ? void 0 : _appBusinessService.length);
45750
+ }, function () {
45751
+ return i++;
45752
+ }, function () {
45753
+ return Promise.resolve(Digit.PaymentService.recieptSearch(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, appBusinessService[i], {
45754
+ consumerCodes: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45755
+ isEmployee: true
45756
+ })).then(function (collectionres) {
45757
+ var _collectionres$Paymen, _collectionres$Paymen3;
45758
+
45759
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen = collectionres.Payments) === null || _collectionres$Paymen === void 0 ? void 0 : _collectionres$Paymen.length) > 0) {
45760
+ var _collectionres$Paymen2;
45761
+
45762
+ collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen2 = collectionres.Payments) === null || _collectionres$Paymen2 === void 0 ? void 0 : _collectionres$Paymen2.map(function (res) {
45763
+ var _res$paymentDetails;
45764
+
45765
+ res === null || res === void 0 ? void 0 : (_res$paymentDetails = res.paymentDetails) === null || _res$paymentDetails === void 0 ? void 0 : _res$paymentDetails.map(function (resData) {
45766
+ if ((resData === null || resData === void 0 ? void 0 : resData.businessService) == appBusinessService[i]) {
45767
+ collectionBillRes.push(res);
45768
+ }
45769
+ });
45770
+ });
45771
+ }
45772
+
45773
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen3 = collectionres.Payments) === null || _collectionres$Paymen3 === void 0 ? void 0 : _collectionres$Paymen3.length) > 0) collectionBillDetails.push.apply(collectionBillDetails, collectionres === null || collectionres === void 0 ? void 0 : collectionres.Payments);
45774
+ });
45775
+ });
45776
+
45777
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45670
45778
  }
45671
45779
 
45672
- var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45673
- return data;
45674
- });
45675
- return {
45676
- applicationData: BPA,
45677
- applicationDetails: bpaFilterDetails,
45678
- tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45679
- edcrDetails: edcr,
45680
- nocData: noc,
45681
- comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45682
- businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45683
- applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45684
- applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status
45685
- };
45780
+ var appBusinessService = [],
45781
+ collectionBillDetails = [],
45782
+ collectionBillArray = [],
45783
+ totalAmount = 0,
45784
+ collectionBillRes = [];
45785
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_LOW") appBusinessService = ["BPA.LOW_RISK_PERMIT_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA") appBusinessService = ["BPA.NC_APP_FEE", "BPA.NC_SAN_FEE"];else if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) === "BPA_OC") appBusinessService = ["BPA.NC_OC_APP_FEE", "BPA.NC_OC_SAN_FEE"];
45786
+ var fetchBillRes = {};
45787
+
45788
+ var _temp5 = function () {
45789
+ var _appBusinessService2;
45790
+
45791
+ if ((_appBusinessService2 = appBusinessService) !== null && _appBusinessService2 !== void 0 && _appBusinessService2[1]) {
45792
+ return Promise.resolve(Digit.PaymentService.fetchBill(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
45793
+ consumerCode: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45794
+ businessService: appBusinessService[1]
45795
+ })).then(function (_Digit$PaymentService) {
45796
+ fetchBillRes = _Digit$PaymentService;
45797
+ });
45798
+ }
45799
+ }();
45800
+
45801
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
45686
45802
  }
45687
45803
 
45688
45804
  noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
@@ -45694,7 +45810,7 @@ var OBPSService = {
45694
45810
  });
45695
45811
  var fileDetails = {};
45696
45812
 
45697
- var _temp3 = function () {
45813
+ var _temp7 = function () {
45698
45814
  var _appDocumentFileStore;
45699
45815
 
45700
45816
  if (((_appDocumentFileStore = appDocumentFileStoreIds) === null || _appDocumentFileStore === void 0 ? void 0 : _appDocumentFileStore.length) > 0) {
@@ -45704,7 +45820,7 @@ var OBPSService = {
45704
45820
  }
45705
45821
  }();
45706
45822
 
45707
- return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45823
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
45708
45824
  });
45709
45825
  });
45710
45826
  });