@egovernments/digit-ui-libraries 1.5.1 → 1.5.4

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
 
@@ -808,7 +807,7 @@ var getSetting = function getSetting(serviceName, moduleName) {
808
807
  });
809
808
  var responseSetting = {
810
809
  cacheTimeInSecs: serviceSetting.cacheTimeInSecs,
811
- debounceTimeInMS: serviceSetting.cacheTimeInSecs || 100
810
+ debounceTimeInMS: serviceSetting.debounceTimeInMS || 100
812
811
  };
813
812
 
814
813
  if (!moduleName) {
@@ -36037,6 +36036,22 @@ var makeCommentsSubsidariesOfPreviousActions = function makeCommentsSubsidariesO
36037
36036
  }
36038
36037
  };
36039
36038
 
36039
+ var getAssignerDetails = function getAssignerDetails(instance, nextStep, moduleCode) {
36040
+ var assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36041
+
36042
+ if (moduleCode === "FSM" || moduleCode === "FSM_POST_PAY_SERVICE") {
36043
+ if (instance.state.applicationStatus === "CREATED") {
36044
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36045
+ } else {
36046
+ assigner = (nextStep === null || nextStep === void 0 ? void 0 : nextStep.assigner) || (instance === null || instance === void 0 ? void 0 : instance.assigner);
36047
+ }
36048
+ } else {
36049
+ assigner = instance === null || instance === void 0 ? void 0 : instance.assigner;
36050
+ }
36051
+
36052
+ return assigner;
36053
+ };
36054
+
36040
36055
  var WorkflowService = {
36041
36056
  init: function init(stateCode, businessServices) {
36042
36057
  return Request({
@@ -36216,7 +36231,7 @@ var WorkflowService = {
36216
36231
  performedAction: instance.action,
36217
36232
  status: instance.state.applicationStatus,
36218
36233
  state: instance.state.state,
36219
- assigner: instance === null || instance === void 0 ? void 0 : instance.assigner,
36234
+ assigner: getAssignerDetails(instance, TLEnrichedWithWorflowData[ind - 1], moduleCode),
36220
36235
  rating: instance === null || instance === void 0 ? void 0 : instance.rating,
36221
36236
  wfComment: instance === null || instance === void 0 ? void 0 : instance.wfComments.map(function (e) {
36222
36237
  return e === null || e === void 0 ? void 0 : e.comment;
@@ -36250,7 +36265,7 @@ var WorkflowService = {
36250
36265
  if (getTripData) {
36251
36266
  var _temp21 = _catch(function () {
36252
36267
  var filters = {
36253
- businessService: 'FSM_VEHICLE_TRIP',
36268
+ businessService: "FSM_VEHICLE_TRIP",
36254
36269
  refernceNos: id
36255
36270
  };
36256
36271
  return Promise.resolve(Digit.FSMService.vehicleSearch(tenantId, filters)).then(function (tripSearchResp) {
@@ -44646,6 +44661,34 @@ var SearchMdmsTypes = {
44646
44661
  }
44647
44662
  });
44648
44663
  },
44664
+ useBPAREGServiceTypes: function useBPAREGServiceTypes(tenantId) {
44665
+ return useQuery([tenantId, "BPAREG_MDMS_SERVICE_STATUS"], function () {
44666
+ return MdmsService.getDataByCriteria(tenantId, {
44667
+ details: {
44668
+ tenantId: tenantId,
44669
+ moduleDetails: [{
44670
+ moduleName: "StakeholderRegistraition",
44671
+ masterDetails: [{
44672
+ name: "TradeTypetoRoleMapping"
44673
+ }]
44674
+ }]
44675
+ }
44676
+ }, "StakeholderRegistraition");
44677
+ }, {
44678
+ select: function select(data) {
44679
+ var _data$StakeholderRegi, _data$StakeholderRegi2;
44680
+
44681
+ return [].concat(data === null || data === void 0 ? void 0 : (_data$StakeholderRegi = data.StakeholderRegistraition) === null || _data$StakeholderRegi === void 0 ? void 0 : (_data$StakeholderRegi2 = _data$StakeholderRegi.TradeTypetoRoleMapping) === null || _data$StakeholderRegi2 === void 0 ? void 0 : _data$StakeholderRegi2.map(function (type) {
44682
+ var _type$tradeType, _type$tradeType2;
44683
+
44684
+ return {
44685
+ code: (_type$tradeType = type.tradeType) === null || _type$tradeType === void 0 ? void 0 : _type$tradeType.split(".")[0],
44686
+ i18nKey: "TRADELICENSE_TRADETYPE_" + ((_type$tradeType2 = type.tradeType) === null || _type$tradeType2 === void 0 ? void 0 : _type$tradeType2.split(".")[0])
44687
+ };
44688
+ }));
44689
+ }
44690
+ });
44691
+ },
44649
44692
  useBPAServiceTypes: function useBPAServiceTypes(tenantId) {
44650
44693
  return useQuery([tenantId, "BPA_MDMS_SERVICE_STATUS"], function () {
44651
44694
  return MdmsService.getDataByCriteria(tenantId, {
@@ -45187,502 +45230,619 @@ var OBPSService = {
45187
45230
  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
45231
  };
45189
45232
  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;
45233
+ function _temp8() {
45234
+ function _temp6() {
45235
+ function _temp4() {
45236
+ 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;
45237
+
45238
+ if ((collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.length) > 0) {
45239
+ collectionBillRes === null || collectionBillRes === void 0 ? void 0 : collectionBillRes.map(function (ob) {
45240
+ var _ob$paymentDetails, _ob$paymentDetails$, _ob$paymentDetails$$b, _ob$paymentDetails$$b2, _ob$paymentDetails$$b3;
45241
+
45242
+ 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) {
45243
+ collectionBillArray.push({
45244
+ title: (bill === null || bill === void 0 ? void 0 : bill.taxHeadCode) + "_DETAILS",
45245
+ value: "",
45246
+ isSubTitle: true
45247
+ }, {
45248
+ title: bill === null || bill === void 0 ? void 0 : bill.taxHeadCode,
45249
+ value: "\u20B9" + (bill === null || bill === void 0 ? void 0 : bill.amount)
45250
+ }, {
45251
+ title: "BPA_STATUS_LABEL",
45252
+ value: "Paid"
45253
+ });
45254
+ totalAmount = totalAmount + parseInt(bill === null || bill === void 0 ? void 0 : bill.amount);
45255
+ });
45256
+ });
45257
+ }
45192
45258
 
45193
- function ConvertEpochToValidityDate(dateEpoch) {
45194
- if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45195
- return "NA";
45196
- }
45259
+ if (((_fetchBillRes = fetchBillRes) === null || _fetchBillRes === void 0 ? void 0 : (_fetchBillRes$Bill = _fetchBillRes.Bill) === null || _fetchBillRes$Bill === void 0 ? void 0 : _fetchBillRes$Bill.length) > 0) {
45260
+ var _fetchBillRes2, _fetchBillRes2$Bill, _fetchBillRes2$Bill$, _fetchBillRes2$Bill$$, _fetchBillRes2$Bill$$2, _fetchBillRes2$Bill$$3, _fetchBillRes2$Bill$$4, _fetchBillRes3, _fetchBillRes3$Bill, _fetchBillRes3$Bill$;
45261
+
45262
+ collectionBillArray.push({
45263
+ 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",
45264
+ value: "",
45265
+ isSubTitle: true
45266
+ }, {
45267
+ title: "BPA_SANC_FEE_LABEL",
45268
+ 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)
45269
+ }, {
45270
+ title: "BPA_STATUS_LABEL",
45271
+ value: "Unpaid"
45272
+ });
45273
+ }
45197
45274
 
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
- }
45275
+ totalAmount > 0 && collectionBillArray.push({
45276
+ title: "BPA_TOT_AMT_PAID",
45277
+ value: "\u20B9" + totalAmount
45278
+ });
45279
+ var billDetails = {
45280
+ title: "BPA_FEE_DETAILS_LABEL",
45281
+ isFeeDetails: true,
45282
+ additionalDetails: {
45283
+ inspectionReport: [],
45284
+ values: [].concat(collectionBillArray)
45285
+ }
45286
+ };
45206
45287
 
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;
45288
+ function ConvertEpochToValidityDate(dateEpoch) {
45289
+ if (dateEpoch == null || dateEpoch == undefined || dateEpoch == '') {
45290
+ return "NA";
45291
+ }
45209
45292
 
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;
45293
+ var dateFromApi = new Date(dateEpoch);
45294
+ var month = dateFromApi.getMonth() + 1;
45295
+ var day = dateFromApi.getDate();
45296
+ var year = dateFromApi.getFullYear() - 3;
45297
+ month = (month > 9 ? "" : "0") + month;
45298
+ day = (day > 9 ? "" : "0") + day;
45299
+ return day + "/" + month + "/" + year;
45300
+ }
45212
45301
 
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;
45302
+ 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) {
45303
+ var _fiData$docs2;
45218
45304
 
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;
45305
+ fiData === null || fiData === void 0 ? void 0 : (_fiData$docs2 = fiData.docs) === null || _fiData$docs2 === void 0 ? void 0 : _fiData$docs2.forEach(function (fiDoc) {
45306
+ var _fileDetails3, _fileDetails4, _fileDetails4$data$fi;
45248
45307
 
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
45308
+ 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];
45309
+ });
45289
45310
  });
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;
45311
+ var nocDetails = noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails, index) {
45312
+ var _nocDetails$additiona, _nocDetails$additiona2, _nocDetails$additiona3, _nocDetails$auditDeta, _nocDetails$documents;
45304
45313
 
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
- })
45314
+ return {
45315
+ title: index === 0 ? "BPA_NOC_DETAILS_SUMMARY" : "",
45316
+ values: [{
45317
+ title: "BPA_" + (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocType) + "_LABEL",
45318
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationNo,
45319
+ isNotTranslated: true
45320
+ }, {
45321
+ title: "BPA_NOC_STATUS",
45322
+ value: nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.applicationStatus,
45323
+ field: "STATUS"
45324
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$additiona = nocDetails.additionalDetails) === null || _nocDetails$additiona === void 0 ? void 0 : _nocDetails$additiona.SubmittedOn) && {
45325
+ title: "BPA_SUDMITTED_ON_LABEL",
45326
+ 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",
45327
+ isNotTranslated: true
45328
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45329
+ title: "BPA_APPROVAL_NUMBER_LABEL",
45330
+ value: (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) || "NA",
45331
+ isNotTranslated: true
45332
+ }, (nocDetails === null || nocDetails === void 0 ? void 0 : nocDetails.nocNo) && {
45333
+ title: "BPA_APPROVED_REJECTED_ON_LABEL",
45334
+ 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",
45335
+ isNotTranslated: true
45336
+ }],
45337
+ additionalDetails: {
45338
+ data: nocDetails,
45339
+ noc: [{
45340
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45341
+ values: nocDetails === null || nocDetails === void 0 ? void 0 : (_nocDetails$documents = nocDetails.documents) === null || _nocDetails$documents === void 0 ? void 0 : _nocDetails$documents.map(function (doc) {
45342
+ var _doc$documentType2, _fileDetails5, _fileDetails5$data, _fileDetails6, _fileDetails6$data, _fileDetails6$data$do;
45343
+
45344
+ return {
45345
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType2 = doc.documentType) === null || _doc$documentType2 === void 0 ? void 0 : _doc$documentType2.replaceAll('.', '_'),
45346
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45347
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45348
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45349
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45350
+ 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] : ""
45351
+ };
45352
+ })
45353
+ }]
45354
+ }
45355
+ };
45356
+ });
45357
+ var inspectionReport = [];
45358
+ var checklist = [];
45359
+ 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) {
45360
+ return ob.docs && ob.docs.length > 0;
45361
+ }).map(function (ob, ind) {
45362
+ var _ob$date, _ob$date2, _ob$date3, _ob$questions, _ob$docs;
45363
+
45364
+ checklist = [];
45365
+ inspectionReport.push({
45366
+ title: "BPA_FI_REPORT",
45367
+ asSectionHeader: true,
45368
+ values: [{
45369
+ title: "BPA_FI_DATE_LABEL",
45370
+ 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
45371
+ }, {
45372
+ title: "BPA_FI_TIME_LABEL",
45373
+ value: ob.time
45374
+ }]
45375
+ });
45376
+ ob === null || ob === void 0 ? void 0 : (_ob$questions = ob.questions) === null || _ob$questions === void 0 ? void 0 : _ob$questions.map(function (q, index) {
45377
+ checklist.push({
45378
+ title: q.question,
45379
+ value: q.value
45380
+ });
45381
+ checklist.push({
45382
+ title: "BPA_ENTER_REMARKS",
45383
+ value: q.remarks
45384
+ });
45385
+ });
45386
+ inspectionReport.push({
45387
+ title: "BPA_CHECK_LIST_DETAILS",
45388
+ asSectionHeader: true,
45389
+ values: checklist
45390
+ });
45391
+ inspectionReport.push({
45392
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45393
+ asSectionHeader: true,
45394
+ additionalDetails: {
45395
+ obpsDocuments: [{
45396
+ title: "",
45397
+ values: ob === null || ob === void 0 ? void 0 : (_ob$docs = ob.docs) === null || _ob$docs === void 0 ? void 0 : _ob$docs.map(function (doc) {
45398
+ var _doc$documentType3, _fileDetails7, _fileDetails7$data, _fileDetails8, _fileDetails8$data, _fileDetails8$data$do;
45399
+
45400
+ return {
45401
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType3 = doc.documentType) === null || _doc$documentType3 === void 0 ? void 0 : _doc$documentType3.replaceAll('.', '_'),
45402
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45403
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.fileStore,
45404
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45405
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45406
+ 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] : ""
45407
+ };
45408
+ })
45409
+ }]
45410
+ }
45411
+ });
45412
+ });
45413
+ var details = [];
45414
+ var applicationDetailsInfo = {
45415
+ title: " ",
45416
+ isCommon: true,
45417
+ values: [{
45418
+ title: "BPA_APPLICATION_NUMBER_LABEL",
45419
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo) || "NA"
45314
45420
  }]
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$;
45330
-
45331
- applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45332
- title: "BPA_PERMIT_APP_NUMBER",
45333
- to: "/digit-ui/employee/obps/bpa/" + (bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA4 = bpaResponse.BPA) === null || _bpaResponse$BPA4 === void 0 ? void 0 : (_bpaResponse$BPA4$ = _bpaResponse$BPA4[0]) === null || _bpaResponse$BPA4$ === void 0 ? void 0 : _bpaResponse$BPA4$.applicationNo),
45334
- value: bpaResponse === null || bpaResponse === void 0 ? void 0 : (_bpaResponse$BPA5 = bpaResponse.BPA) === null || _bpaResponse$BPA5 === void 0 ? void 0 : (_bpaResponse$BPA5$ = _bpaResponse$BPA5[0]) === null || _bpaResponse$BPA5$ === void 0 ? void 0 : _bpaResponse$BPA5$.applicationNo,
45335
- isLink: true
45336
- }]);
45337
- }
45421
+ };
45338
45422
 
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 = {};
45423
+ if (BPA !== null && BPA !== void 0 && BPA.businessService.includes("BPA_OC")) {
45424
+ var _bpaResponse$BPA4, _bpaResponse$BPA4$, _bpaResponse$BPA5, _bpaResponse$BPA5$;
45356
45425
 
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;
45426
+ applicationDetailsInfo["values"] = [].concat(applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : applicationDetailsInfo.values, [{
45427
+ title: "BPA_PERMIT_APP_NUMBER",
45428
+ 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),
45429
+ 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,
45430
+ isLink: true
45431
+ }]);
45432
+ }
45364
45433
 
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
- }
45434
+ var permitcondn = [];
45435
+ (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) {
45436
+ permitcondn.push({
45437
+ title: index + 1 + ". " + ob,
45438
+ value: ""
45439
+ });
45440
+ }));
45441
+ var PermitConditions = {
45442
+ title: "BPA_PERMIT_CONDITIONS",
45443
+ isTitleVisible: ((_permitcondn = permitcondn) === null || _permitcondn === void 0 ? void 0 : _permitcondn.length) > 0 ? false : true,
45444
+ isNotAllowed: ((_permitcondn2 = permitcondn) === null || _permitcondn2 === void 0 ? void 0 : _permitcondn2.length) > 0 ? false : true,
45445
+ additionalDetails: {
45446
+ inspectionReport: [],
45447
+ permit: [].concat(permitcondn)
45448
+ }
45449
+ };
45450
+ if (permitcondn.length == 0) PermitConditions = {};
45374
45451
 
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;
45452
+ if (riskType == "LOW" && permitcondn.length > 0) {
45453
+ permitcondn = [];
45454
+ PermitConditions = {};
45455
+ }
45534
45456
 
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;
45457
+ if (BPA !== null && BPA !== void 0 && BPA.approvalNo) {
45458
+ var _applicationDetailsIn, _applicationDetailsIn2, _BPA$additionalDetail8, _BPA$additionalDetail9, _BPA$additionalDetail10;
45537
45459
 
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
- }
45460
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn = applicationDetailsInfo.values) === null || _applicationDetailsIn === void 0 ? void 0 : _applicationDetailsIn.push({
45461
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_NUMBER_LABEL" : "BPA_OC_PERMIT_NUMBER_LABEL",
45462
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.approvalNo) || "NA"
45463
+ });
45464
+ applicationDetailsInfo === null || applicationDetailsInfo === void 0 ? void 0 : (_applicationDetailsIn2 = applicationDetailsInfo.values) === null || _applicationDetailsIn2 === void 0 ? void 0 : _applicationDetailsIn2.push({
45465
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_PERMIT_VALIDITY" : "BPA_OC_PERMIT_VALIDITY",
45466
+ 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"
45467
+ });
45468
+ }
45542
45469
 
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" : "",
45470
+ var basicDetails = {
45471
+ title: "BPA_BASIC_DETAILS_TITLE",
45472
+ asSectionHeader: true,
45473
+ isInsert: true,
45474
+ isCommon: true,
45475
+ values: [{
45476
+ title: "BPA_BASIC_DETAILS_APP_DATE_LABEL",
45477
+ 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') : ''
45478
+ }, {
45479
+ title: "BPA_BASIC_DETAILS_APPLICATION_TYPE_LABEL",
45480
+ value: "WF_BPA_" + (edcr === null || edcr === void 0 ? void 0 : edcr.appliactionType)
45481
+ }, {
45482
+ title: "BPA_BASIC_DETAILS_SERVICE_TYPE_LABEL",
45483
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.applicationSubType
45484
+ }, {
45485
+ title: "BPA_BASIC_DETAILS_OCCUPANCY_LABEL",
45486
+ 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
45487
+ }, {
45488
+ title: "BPA_BASIC_DETAILS_RISK_TYPE_LABEL",
45489
+ value: "WF_BPA_" + riskType,
45490
+ isInsert: true
45491
+ }, {
45492
+ title: "BPA_BASIC_DETAILS_APPLICATION_NAME_LABEL",
45493
+ 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
45494
+ }]
45495
+ };
45496
+ var plotDetails = {
45497
+ title: "BPA_PLOT_DETAILS_TITLE",
45498
+ asSectionHeader: true,
45499
+ isCommon: true,
45500
+ values: [{
45501
+ title: "BPA_BOUNDARY_PLOT_AREA_LABEL",
45502
+ 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),
45503
+ isNotTranslated: true,
45504
+ isUnit: "BPA_SQ_FT_LABEL"
45505
+ }, {
45506
+ title: "BPA_PLOT_NUMBER_LABEL",
45507
+ 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",
45508
+ isNotTranslated: true
45509
+ }, {
45510
+ title: "BPA_KHATHA_NUMBER_LABEL",
45511
+ 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",
45512
+ isNotTranslated: true
45513
+ }, {
45514
+ title: "BPA_HOLDING_NUMBER_LABEL",
45515
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail11 = BPA.additionalDetails) === null || _BPA$additionalDetail11 === void 0 ? void 0 : _BPA$additionalDetail11.holdingNo) || "NA",
45516
+ isNotTranslated: true
45517
+ }, {
45518
+ title: "BPA_BOUNDARY_LAND_REG_DETAIL_LABEL",
45519
+ value: (BPA === null || BPA === void 0 ? void 0 : (_BPA$additionalDetail12 = BPA.additionalDetails) === null || _BPA$additionalDetail12 === void 0 ? void 0 : _BPA$additionalDetail12.registrationDetails) || "NA",
45520
+ isNotTranslated: true
45521
+ }]
45522
+ };
45523
+ var scrutinyDetails = {
45524
+ title: "BPA_STEPPER_SCRUTINY_DETAILS_HEADER",
45525
+ isScrutinyDetails: true,
45526
+ isBackGroundColor: true,
45527
+ additionalDetails: {
45550
45528
  values: [{
45551
- title: "CORE_COMMON_NAME",
45552
- value: owner === null || owner === void 0 ? void 0 : owner.name
45529
+ title: "BPA_EDCR_DETAILS",
45530
+ value: " ",
45531
+ isHeader: true
45553
45532
  }, {
45554
- title: "BPA_APPLICANT_GENDER_LABEL",
45555
- value: owner === null || owner === void 0 ? void 0 : owner.gender
45533
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_EDCR_NO_LABEL" : "BPA_OC_EDCR_NO_LABEL",
45534
+ value: (BPA === null || BPA === void 0 ? void 0 : BPA.edcrNumber) || "NA"
45535
+ }],
45536
+ scruntinyDetails: [{
45537
+ title: "BPA_UPLOADED_PLAN_DIAGRAM",
45538
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.updatedDxfFile,
45539
+ text: "BPA_UPLOADED_PLAN_DXF"
45556
45540
  }, {
45557
- title: "CORE_COMMON_MOBILE_NUMBER",
45558
- value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45559
- }, {
45560
- title: "BPA_IS_PRIMARY_OWNER_LABEL",
45561
- value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45562
- isNotTranslated: false
45541
+ title: "BPA_SCRUNTINY_REPORT_OUTPUT",
45542
+ value: edcr === null || edcr === void 0 ? void 0 : edcr.planReport,
45543
+ text: "BPA_SCRUTINY_REPORT_PDF"
45563
45544
  }]
45564
- };
45565
- })
45566
- }
45567
- };
45568
- var documentDetails = {
45569
- title: "BPA_DOCUMENT_DETAILS_LABEL",
45570
- asSectionHeader: true,
45571
- isDocumentDetails: true,
45572
- additionalDetails: {
45573
- obpsDocuments: [{
45545
+ }
45546
+ };
45547
+ var buildingExtractionDetails = {
45574
45548
  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;
45549
+ isScrutinyDetails: true,
45550
+ isBackGroundColor: true,
45551
+ additionalDetails: {
45552
+ values: [{
45553
+ title: (BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC" ? "BPA_BUILDING_EXTRACT_HEADER" : "BPA_ACTUAL_BUILDING_EXTRACT_HEADER",
45554
+ value: " ",
45555
+ isHeader: true
45556
+ }, {
45557
+ title: "BPA_TOTAL_BUILT_UP_AREA_HEADER",
45558
+ 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,
45559
+ isUnit: "BPA_SQ_MTRS_LABEL"
45560
+ }, {
45561
+ title: "BPA_SCRUTINY_DETAILS_NUMBER_OF_FLOORS_LABEL",
45562
+ 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"
45563
+ }, {
45564
+ title: "BPA_HEIGHT_FROM_GROUND_LEVEL",
45565
+ 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,
45566
+ isUnit: "BPA_MTRS_LABEL"
45567
+ }],
45568
+ scruntinyDetails: []
45569
+ }
45570
+ };
45571
+ var demolitionAreaDetails = {
45572
+ title: "",
45573
+ isScrutinyDetails: true,
45574
+ isBackGroundColor: true,
45575
+ additionalDetails: {
45576
+ values: [{
45577
+ title: "BPA_APP_DETAILS_DEMOLITION_DETAILS_LABEL",
45578
+ value: " ",
45579
+ isHeader: true
45580
+ }, {
45581
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45582
+ 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,
45583
+ isUnit: "BPA_SQ_MTRS_LABEL"
45584
+ }],
45585
+ scruntinyDetails: []
45586
+ }
45587
+ };
45588
+ var subOccupancyTableDetails = {
45589
+ title: "",
45590
+ isSubOccupancyTable: true,
45591
+ isTitleRepeat: true,
45592
+ additionalDetails: {
45593
+ values: [{
45594
+ title: "BPA_OCC_SUBOCC_HEADER",
45595
+ value: " ",
45596
+ isHeader: true
45597
+ }],
45598
+ subOccupancyTableDetails: [{
45599
+ title: "BPA_APPLICATION_DEMOLITION_AREA_LABEL",
45600
+ value: edcr
45601
+ }, {
45602
+ title: "NO_REPEAT",
45603
+ value: ""
45604
+ }]
45605
+ }
45606
+ };
45607
+ var addressDetails = {
45608
+ title: "BPA_NEW_TRADE_DETAILS_HEADER_DETAILS",
45609
+ asSectionHeader: true,
45610
+ isCommon: true,
45611
+ values: [{
45612
+ title: "BPA_DETAILS_PIN_LABEL",
45613
+ 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
45614
+ }, {
45615
+ title: "BPA_CITY_LABEL",
45616
+ 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
45617
+ }, {
45618
+ title: "BPA_LOC_MOHALLA_LABEL",
45619
+ 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
45620
+ }, {
45621
+ title: "BPA_DETAILS_SRT_NAME_LABEL",
45622
+ 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
45623
+ }, {
45624
+ title: "ES_NEW_APPLICATION_LOCATION_LANDMARK",
45625
+ 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
45626
+ }]
45627
+ };
45628
+ 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
45629
 
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;
45630
+ 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) {
45631
+ var _BPA$landInfo8, _BPA$landInfo8$owners;
45598
45632
 
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
45633
+ 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) {
45634
+ if (!ownerD.isPrimaryOwner) ownerD.isPrimaryOwner = "false";
45635
+ });
45610
45636
  }
45611
- };
45612
- }
45613
45637
 
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
45638
+ var ownerDetails = {
45639
+ title: "BPA_APPLICANT_DETAILS_HEADER",
45640
+ isOwnerDetails: true,
45641
+ additionalDetails: {
45642
+ 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) {
45643
+ return {
45644
+ title: Number(checkOwnerLength) > 1 ? "COMMON_OWNER" : "",
45645
+ values: [{
45646
+ title: "CORE_COMMON_NAME",
45647
+ value: owner === null || owner === void 0 ? void 0 : owner.name
45648
+ }, {
45649
+ title: "BPA_APPLICANT_GENDER_LABEL",
45650
+ value: owner === null || owner === void 0 ? void 0 : owner.gender
45651
+ }, {
45652
+ title: "CORE_COMMON_MOBILE_NUMBER",
45653
+ value: owner === null || owner === void 0 ? void 0 : owner.mobileNumber
45654
+ }, {
45655
+ title: "BPA_IS_PRIMARY_OWNER_LABEL",
45656
+ value: owner === null || owner === void 0 ? void 0 : owner.isPrimaryOwner,
45657
+ isNotTranslated: false
45658
+ }]
45659
+ };
45660
+ })
45661
+ }
45662
+ };
45663
+ var documentDetails = {
45664
+ title: "BPA_DOCUMENT_DETAILS_LABEL",
45665
+ asSectionHeader: true,
45666
+ isDocumentDetails: true,
45667
+ additionalDetails: {
45668
+ obpsDocuments: [{
45669
+ title: "",
45670
+ values: BPA === null || BPA === void 0 ? void 0 : (_BPA$documents = BPA.documents) === null || _BPA$documents === void 0 ? void 0 : _BPA$documents.map(function (doc) {
45671
+ var _doc$documentType4, _fileDetails9, _fileDetails9$data, _fileDetails10, _fileDetails10$data, _fileDetails10$data$d;
45672
+
45673
+ return {
45674
+ title: doc === null || doc === void 0 ? void 0 : (_doc$documentType4 = doc.documentType) === null || _doc$documentType4 === void 0 ? void 0 : _doc$documentType4.replaceAll('.', '_'),
45675
+ documentType: doc === null || doc === void 0 ? void 0 : doc.documentType,
45676
+ documentUid: doc === null || doc === void 0 ? void 0 : doc.documentUid,
45677
+ fileStoreId: doc === null || doc === void 0 ? void 0 : doc.fileStoreId,
45678
+ id: doc === null || doc === void 0 ? void 0 : doc.id,
45679
+ 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] : ""
45680
+ };
45681
+ })
45682
+ }]
45683
+ }
45684
+ };
45685
+ var approvalChecks = [];
45686
+ var approvalChecksDetails = {};
45687
+
45688
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.status) === "APPROVAL_INPROGRESS") {
45689
+ var _mdmsRes$BPA2;
45690
+
45691
+ mdmsRes === null || mdmsRes === void 0 ? void 0 : (_mdmsRes$BPA2 = mdmsRes.BPA) === null || _mdmsRes$BPA2 === void 0 ? void 0 : _mdmsRes$BPA2.CheckList.forEach(function (checklist) {
45692
+ var _checklist$conditions;
45693
+
45694
+ 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) {
45695
+ approvalChecks.push.apply(approvalChecks, checklist === null || checklist === void 0 ? void 0 : checklist.conditions);
45696
+ }
45697
+ });
45698
+ approvalChecksDetails = {
45699
+ title: "",
45700
+ isTitleVisible: (approvalChecks === null || approvalChecks === void 0 ? void 0 : approvalChecks.length) > 0 ? false : true,
45701
+ asSectionHeader: true,
45702
+ isPermissions: true,
45703
+ additionalDetails: {
45704
+ permissions: approvalChecks
45705
+ }
45706
+ };
45631
45707
  }
45632
- }]);else {
45633
- var _ob$additionalDetails, _ob$additionalDetails2;
45634
45708
 
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;
45709
+ if (riskType == "LOW" && approvalChecks.length > 0) approvalChecksDetails = {};
45710
+ var val;
45711
+ var i;
45712
+ var FieldInspectionData = [];
45713
+ 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) {
45714
+ if (ob.title.includes("FI_REPORT")) FieldInspectionData = [].concat(FieldInspectionData, [{
45715
+ title: ob.title,
45716
+ additionalDetails: {
45717
+ inspectionReport: [],
45718
+ values: ob.values
45719
+ }
45720
+ }]);else if (ob.title.includes("CHECK_LIST")) FieldInspectionData = [].concat(FieldInspectionData, [{
45721
+ title: ob.title,
45722
+ additionalDetails: {
45723
+ isChecklist: true,
45724
+ inspectionReport: [],
45725
+ values: ob.values
45726
+ }
45727
+ }]);else {
45728
+ var _ob$additionalDetails, _ob$additionalDetails2;
45729
+
45730
+ 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);
45731
+ improvedDoc.map(function (ob) {
45732
+ ob["isNotDuplicate"] = true;
45733
+ });
45734
+ improvedDoc.map(function (ob, index) {
45735
+ val = ob.documentType;
45736
+ if (ob.isNotDuplicate == true) for (i = index + 1; i < improvedDoc.length; i++) {
45737
+ if (val === improvedDoc[i].documentType) improvedDoc[i].isNotDuplicate = false;
45738
+ }
45739
+ });
45740
+ FieldInspectionData = [].concat(FieldInspectionData, [{
45741
+ title: ob.title,
45742
+ additionalDetails: {
45743
+ FIdocuments: [],
45744
+ "documents": [{
45745
+ values: improvedDoc
45746
+ }]
45747
+ }
45748
+ }]);
45643
45749
  }
45644
45750
  });
45645
- FieldInspectionData = [].concat(FieldInspectionData, [{
45646
- title: ob.title,
45751
+ var fiReports = {
45752
+ title: "",
45753
+ isFieldInspection: true,
45754
+ 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
45755
  additionalDetails: {
45648
- FIdocuments: [],
45649
- "documents": [{
45650
- values: improvedDoc
45651
- }]
45756
+ values: [],
45757
+ 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
45758
  }
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
45759
+ };
45760
+
45761
+ if ((BPA === null || BPA === void 0 ? void 0 : BPA.businessService) !== "BPA_OC") {
45762
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, addressDetails, ownerDetails, documentDetails, fiReports], nocDetails, [approvalChecksDetails, PermitConditions]);
45763
+ } else {
45764
+ details = [].concat(details, [applicationDetailsInfo, basicDetails, plotDetails, scrutinyDetails, buildingExtractionDetails, subOccupancyTableDetails, demolitionAreaDetails, documentDetails, fiReports], nocDetails, [PermitConditions]);
45765
+ }
45766
+
45767
+ 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) {
45768
+ details.push(billDetails);
45769
+ }
45770
+
45771
+ var bpaFilterDetails = (_details = details) === null || _details === void 0 ? void 0 : _details.filter(function (data) {
45772
+ return data;
45773
+ });
45774
+ return {
45775
+ applicationData: BPA,
45776
+ applicationDetails: bpaFilterDetails,
45777
+ tenantId: BPA === null || BPA === void 0 ? void 0 : BPA.tenantId,
45778
+ edcrDetails: edcr,
45779
+ nocData: noc,
45780
+ comparisionReport: comparisionReport === null || comparisionReport === void 0 ? void 0 : comparisionReport.comparisonDetail,
45781
+ businessService: BPA === null || BPA === void 0 ? void 0 : BPA.businessService,
45782
+ applicationNo: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45783
+ applicationStatus: BPA === null || BPA === void 0 ? void 0 : BPA.status,
45784
+ collectionBillDetails: collectionBillDetails
45785
+ };
45663
45786
  }
45664
- };
45665
45787
 
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]);
45788
+ var i = 0;
45789
+
45790
+ var _temp3 = _for(function () {
45791
+ var _appBusinessService;
45792
+
45793
+ return i < ((_appBusinessService = appBusinessService) === null || _appBusinessService === void 0 ? void 0 : _appBusinessService.length);
45794
+ }, function () {
45795
+ return i++;
45796
+ }, function () {
45797
+ return Promise.resolve(Digit.PaymentService.recieptSearch(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, appBusinessService[i], {
45798
+ consumerCodes: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45799
+ isEmployee: true
45800
+ })).then(function (collectionres) {
45801
+ var _collectionres$Paymen, _collectionres$Paymen3;
45802
+
45803
+ if ((collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen = collectionres.Payments) === null || _collectionres$Paymen === void 0 ? void 0 : _collectionres$Paymen.length) > 0) {
45804
+ var _collectionres$Paymen2;
45805
+
45806
+ collectionres === null || collectionres === void 0 ? void 0 : (_collectionres$Paymen2 = collectionres.Payments) === null || _collectionres$Paymen2 === void 0 ? void 0 : _collectionres$Paymen2.map(function (res) {
45807
+ var _res$paymentDetails;
45808
+
45809
+ res === null || res === void 0 ? void 0 : (_res$paymentDetails = res.paymentDetails) === null || _res$paymentDetails === void 0 ? void 0 : _res$paymentDetails.map(function (resData) {
45810
+ if ((resData === null || resData === void 0 ? void 0 : resData.businessService) == appBusinessService[i]) {
45811
+ collectionBillRes.push(res);
45812
+ }
45813
+ });
45814
+ });
45815
+ }
45816
+
45817
+ 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);
45818
+ });
45819
+ });
45820
+
45821
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45670
45822
  }
45671
45823
 
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
- };
45824
+ var appBusinessService = [],
45825
+ collectionBillDetails = [],
45826
+ collectionBillArray = [],
45827
+ totalAmount = 0,
45828
+ collectionBillRes = [];
45829
+ 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"];
45830
+ var fetchBillRes = {};
45831
+
45832
+ var _temp5 = function () {
45833
+ var _appBusinessService2;
45834
+
45835
+ if ((_appBusinessService2 = appBusinessService) !== null && _appBusinessService2 !== void 0 && _appBusinessService2[1]) {
45836
+ return Promise.resolve(Digit.PaymentService.fetchBill(BPA === null || BPA === void 0 ? void 0 : BPA.tenantId, {
45837
+ consumerCode: BPA === null || BPA === void 0 ? void 0 : BPA.applicationNo,
45838
+ businessService: appBusinessService[1]
45839
+ })).then(function (_Digit$PaymentService) {
45840
+ fetchBillRes = _Digit$PaymentService;
45841
+ });
45842
+ }
45843
+ }();
45844
+
45845
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
45686
45846
  }
45687
45847
 
45688
45848
  noc === null || noc === void 0 ? void 0 : noc.map(function (nocDetails) {
@@ -45694,7 +45854,7 @@ var OBPSService = {
45694
45854
  });
45695
45855
  var fileDetails = {};
45696
45856
 
45697
- var _temp3 = function () {
45857
+ var _temp7 = function () {
45698
45858
  var _appDocumentFileStore;
45699
45859
 
45700
45860
  if (((_appDocumentFileStore = appDocumentFileStoreIds) === null || _appDocumentFileStore === void 0 ? void 0 : _appDocumentFileStore.length) > 0) {
@@ -45704,7 +45864,7 @@ var OBPSService = {
45704
45864
  }
45705
45865
  }();
45706
45866
 
45707
- return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
45867
+ return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
45708
45868
  });
45709
45869
  });
45710
45870
  });
@@ -45751,6 +45911,13 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45751
45911
  config = {};
45752
45912
  }
45753
45913
 
45914
+ if (window.location.href.includes("search/application")) {
45915
+ var _filters, _filters2;
45916
+
45917
+ if (!((_filters = filters) !== null && _filters !== void 0 && _filters.limit)) filters.limit = 10;
45918
+ if (!((_filters2 = filters) !== null && _filters2 !== void 0 && _filters2.offset)) filters.offset = 0;
45919
+ }
45920
+
45754
45921
  var client = useQueryClient();
45755
45922
  return _extends({}, useQuery(['BPA_SEARCH', tenantId, filters], function () {
45756
45923
  try {
@@ -45822,9 +45989,12 @@ var useBPASearch = function useBPASearch(tenantId, filters, config) {
45822
45989
  };
45823
45990
 
45824
45991
  var useOBPSSearch = function useOBPSSearch(selectedType, payload, tenantId, filters, params, config) {
45992
+ if (config === void 0) {
45993
+ config = {};
45994
+ }
45825
45995
 
45826
45996
  if (selectedType && selectedType.includes("STAKEHOLDER") || Object.keys(payload).length > 0 && payload !== null && payload !== void 0 && payload.applicationType && payload !== null && payload !== void 0 && payload.applicationType.includes("STAKEHOLDER")) {
45827
- return useEmpBPAREGSearch(tenantId, {}, params);
45997
+ return useEmpBPAREGSearch(tenantId, {}, params, config);
45828
45998
  } else {
45829
45999
  return useBPASearch(tenantId, filters);
45830
46000
  }
@@ -46569,6 +46739,8 @@ var useBPAREGSearch = function useBPAREGSearch(tenantId, filters, params, config
46569
46739
  };
46570
46740
 
46571
46741
  var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationType(_ref) {
46742
+ var _userInfo$value;
46743
+
46572
46744
  var Applicationtype = _ref.Applicationtype,
46573
46745
  tenantId = _ref.tenantId;
46574
46746
 
@@ -46579,9 +46751,29 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46579
46751
  serviceTypes = _SearchMdmsTypes$useB.data,
46580
46752
  isLoadingServiceTypes = _SearchMdmsTypes$useB.isLoading;
46581
46753
 
46754
+ var _SearchMdmsTypes$useB2 = SearchMdmsTypes.useBPAREGServiceTypes(tenantId),
46755
+ BPAREGserviceTypes = _SearchMdmsTypes$useB2.data,
46756
+ isLoadingBPAREGServiceTypes = _SearchMdmsTypes$useB2.isLoading;
46757
+
46758
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46759
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46760
+ var userInformation = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value = userInfo.value) === null || _userInfo$value === void 0 ? void 0 : _userInfo$value.info;
46761
+ var uniqueBPAREGserviceTypes = useMemo(function () {
46762
+ var tradeTypes = BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.map(function (ob) {
46763
+ return ob === null || ob === void 0 ? void 0 : ob.code;
46764
+ });
46765
+ return BPAREGserviceTypes === null || BPAREGserviceTypes === void 0 ? void 0 : BPAREGserviceTypes.filter(function (_ref2, index) {
46766
+ var code = _ref2.code;
46767
+ return !tradeTypes.includes(code, index + 1);
46768
+ });
46769
+ }, [BPAREGserviceTypes, isLoadingBPAREGServiceTypes]);
46582
46770
  var ServiceTypes = useMemo(function () {
46771
+ var _userInformation$role, _userInformation$role2;
46772
+
46583
46773
  var serviceTypesWithStakeholer = [].concat(serviceTypes ? serviceTypes : []);
46584
- return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
46774
+ if (Applicationtype === "BPA_STAKEHOLDER_REGISTRATION" && uniqueBPAREGserviceTypes && (userInformation === null || userInformation === void 0 ? void 0 : (_userInformation$role = userInformation.roles) === null || _userInformation$role === void 0 ? void 0 : (_userInformation$role2 = _userInformation$role.filter(function (ob) {
46775
+ return ob.code.includes("BPAREG_");
46776
+ })) === null || _userInformation$role2 === void 0 ? void 0 : _userInformation$role2.length) > 0) return [].concat(uniqueBPAREGserviceTypes);else return serviceTypesWithStakeholer === null || serviceTypesWithStakeholer === void 0 ? void 0 : serviceTypesWithStakeholer.filter(function (e) {
46585
46777
  return e.applicationType.includes(Applicationtype);
46586
46778
  }).map(function (e) {
46587
46779
  return {
@@ -46589,11 +46781,48 @@ var useServiceTypeFromApplicationType = function useServiceTypeFromApplicationTy
46589
46781
  i18nKey: e.i18nKey
46590
46782
  };
46591
46783
  });
46592
- }, [serviceTypes, isLoadingServiceTypes, Applicationtype]);
46784
+ }, [serviceTypes, isLoadingServiceTypes, uniqueBPAREGserviceTypes, Applicationtype]);
46593
46785
  var applicationTypesWithStakeholder = [].concat(applicationTypes ? applicationTypes : [], [{
46594
46786
  code: "BPA_STAKEHOLDER_REGISTRATION",
46595
46787
  i18nKey: "WF_BPA_BPA_STAKEHOLDER_REGISTRATION"
46596
46788
  }]);
46789
+
46790
+ var showHidingLinksForStakeholder = function showHidingLinksForStakeholder(roles) {
46791
+ var _roles;
46792
+
46793
+ if (roles === void 0) {
46794
+ roles = [];
46795
+ }
46796
+
46797
+ var userInfos = sessionStorage.getItem("Digit.citizen.userRequestObject");
46798
+ var userInfo = userInfos ? JSON.parse(userInfos) : {};
46799
+ var checkedRoles = [];
46800
+ var rolearray = (_roles = roles) === null || _roles === void 0 ? void 0 : _roles.map(function (role) {
46801
+ var _userInfo$value2, _userInfo$value2$info, _userInfo$value2$info2;
46802
+
46803
+ userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$value2 = userInfo.value) === null || _userInfo$value2 === void 0 ? void 0 : (_userInfo$value2$info = _userInfo$value2.info) === null || _userInfo$value2$info === void 0 ? void 0 : (_userInfo$value2$info2 = _userInfo$value2$info.roles) === null || _userInfo$value2$info2 === void 0 ? void 0 : _userInfo$value2$info2.map(function (item) {
46804
+ if (item.code === role.code && item.tenantId === role.tenantId) {
46805
+ checkedRoles.push(item);
46806
+ }
46807
+ });
46808
+ });
46809
+ return checkedRoles === null || checkedRoles === void 0 ? void 0 : checkedRoles.length;
46810
+ };
46811
+
46812
+ var stateCode = Digit.ULBService.getStateId();
46813
+ var stakeholderEmployeeRoles = [{
46814
+ code: "BPAREG_DOC_VERIFIER",
46815
+ tenantId: stateCode
46816
+ }, {
46817
+ code: "BPAREG_APPROVER",
46818
+ tenantId: stateCode
46819
+ }];
46820
+ var checkingForStakeholderRoles = showHidingLinksForStakeholder(stakeholderEmployeeRoles);
46821
+
46822
+ if (!checkingForStakeholderRoles && (applicationTypesWithStakeholder === null || applicationTypesWithStakeholder === void 0 ? void 0 : applicationTypesWithStakeholder.length) > 0) {
46823
+ applicationTypesWithStakeholder.pop();
46824
+ }
46825
+
46597
46826
  var filteredapplicationTypes = useMemo(function () {
46598
46827
  return applicationTypesWithStakeholder.filter(function (curr) {
46599
46828
  var temp = 0;
@@ -47993,7 +48222,7 @@ var stringReplaceAll$3 = function stringReplaceAll(str, searcher, replaceWith) {
47993
48222
  replaceWith = "";
47994
48223
  }
47995
48224
 
47996
- if (searcher == "") return str;
48225
+ if (searcher === "") return str;
47997
48226
 
47998
48227
  while (str.includes(searcher)) {
47999
48228
  str = str.replace(searcher, replaceWith);
@@ -48072,7 +48301,7 @@ var convertToLocaleData = function convertToLocaleData(dropdownValues, key, t) {
48072
48301
  }
48073
48302
 
48074
48303
  if (key === void 0) {
48075
- key = '';
48304
+ key = "";
48076
48305
  }
48077
48306
 
48078
48307
  return dropdownValues.map(function (ele) {
@@ -48092,6 +48321,23 @@ var getTransformedLocale$1 = function getTransformedLocale(label) {
48092
48321
  label = (_label = label) === null || _label === void 0 ? void 0 : _label.trim();
48093
48322
  return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
48094
48323
  };
48324
+ var sortDropdownNames = function sortDropdownNames(options, optionkey, t) {
48325
+ var _options;
48326
+
48327
+ if (options === void 0) {
48328
+ options = [];
48329
+ }
48330
+
48331
+ if (optionkey === void 0) {
48332
+ optionkey = "i18nKey";
48333
+ }
48334
+
48335
+ return (_options = options) === null || _options === void 0 ? void 0 : _options.sort(function (a, b) {
48336
+ var _t, _t$localeCompare;
48337
+
48338
+ return (_t = t(a === null || a === void 0 ? void 0 : a[optionkey])) === null || _t === void 0 ? void 0 : (_t$localeCompare = _t.localeCompare) === null || _t$localeCompare === void 0 ? void 0 : _t$localeCompare.call(_t, t(b === null || b === void 0 ? void 0 : b[optionkey]));
48339
+ });
48340
+ };
48095
48341
 
48096
48342
  var locale = {
48097
48343
  __proto__: null,
@@ -48104,7 +48350,8 @@ var locale = {
48104
48350
  getMohallaLocale: getMohallaLocale$1,
48105
48351
  getCityLocale: getCityLocale$1,
48106
48352
  convertToLocaleData: convertToLocaleData,
48107
- getTransformedLocale: getTransformedLocale$1
48353
+ getTransformedLocale: getTransformedLocale$1,
48354
+ sortDropdownNames: sortDropdownNames
48108
48355
  };
48109
48356
 
48110
48357
  var calculateRiskType = function calculateRiskType(riskTypes, plotArea, blocks) {
@@ -48799,7 +49046,7 @@ var NOCAccess = function NOCAccess() {
48799
49046
  var userRoles = userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$info4 = userInfo.info) === null || _userInfo$info4 === void 0 ? void 0 : (_userInfo$info4$roles = _userInfo$info4.roles) === null || _userInfo$info4$roles === void 0 ? void 0 : _userInfo$info4$roles.map(function (roleData) {
48800
49047
  return roleData.code;
48801
49048
  });
48802
- var NOC_ROLES = ["NOC_CEMP", "NOC_DOC_VERIFIER", "NOC_FIELD_INSPECTOR", "NOC_APPROVER", "BPA_NOC_VERIFIER", "AIRPORT_AUTHORITY_APPROVER", "FIRE_NOC_APPROVER", "NOC_DEPT_APPROVER"];
49049
+ var NOC_ROLES = ["FIRE_NOC_APPROVER"];
48803
49050
  var NOC_ACCESS = userRoles === null || userRoles === void 0 ? void 0 : userRoles.filter(function (role) {
48804
49051
  return NOC_ROLES.includes(role);
48805
49052
  });