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