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