@djb25/digit-ui-module-ws 1.0.115 → 1.0.116

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.
@@ -1043,12 +1043,14 @@ const convertToWSUpdate = data => {
1043
1043
  return formdata;
1044
1044
  };
1045
1045
  const convertToEditWSUpdate = data => {
1046
- var _data$WaterConnection9, _data$WaterConnection0, _data$additionalDetai8, _data$additionalDetai9, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai0, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai1, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$rainWaterHarves10, _data$waterConnection2, _data$additionalDetai10, _waterResult$addition4, _data$additionalDetai11, _waterResult$addition5, _data$additionalDetai12, _waterResult$addition6, _data$additionalDetai13, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai14, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai15, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai16, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai17, _waterResult$addition1, _data$additionalDetai18, _data$property, _data$property$additi, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
1046
+ var _data$WaterConnection9, _data$WaterConnection0, _data$property, _data$property$auditD, _waterResult$property, _waterResult$property2, _data$property2, _data$property2$audit, _waterResult$auditDet, _data$additionalDetai8, _data$additionalDetai9, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai0, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai1, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$rainWaterHarves10, _data$waterConnection2, _data$additionalDetai10, _waterResult$addition4, _data$additionalDetai11, _waterResult$addition5, _data$additionalDetai12, _waterResult$addition6, _data$additionalDetai13, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai14, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai15, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai16, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai17, _waterResult$addition1, _data$additionalDetai18, _data$property3, _data$property3$addit, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
1047
1047
  const {
1048
1048
  signatureFileStoreId,
1049
1049
  signatureFileName
1050
1050
  } = getSignatureDetails(data);
1051
1051
  let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection9 = data.WaterConnectionResult) === null || _data$WaterConnection9 === void 0 ? void 0 : (_data$WaterConnection0 = _data$WaterConnection9.WaterConnection) === null || _data$WaterConnection0 === void 0 ? void 0 : _data$WaterConnection0[0];
1052
+ const isPropUpdated = Boolean((data === null || data === void 0 ? void 0 : data.isPropertyUpdated) === true || (data === null || data === void 0 ? void 0 : data.workflowAction) === "RESUBMIT_FOR_INFRA_PAYMENT" || typeof sessionStorage !== "undefined" && sessionStorage.getItem("WS_WORKFLOW_ACTION") === "RESUBMIT_FOR_INFRA_PAYMENT" || typeof sessionStorage !== "undefined" && sessionStorage.getItem("IS_PROPERTY_UPDATED") === "true" || typeof sessionStorage !== "undefined" && (data === null || data === void 0 ? void 0 : data.propertyId) && sessionStorage.getItem("IS_PROPERTY_UPDATED_" + data.propertyId) === "true" || typeof sessionStorage !== "undefined" && (waterResult === null || waterResult === void 0 ? void 0 : waterResult.propertyId) && sessionStorage.getItem("IS_PROPERTY_UPDATED_" + waterResult.propertyId) === "true" || (data === null || data === void 0 ? void 0 : (_data$property = data.property) === null || _data$property === void 0 ? void 0 : (_data$property$auditD = _data$property.auditDetails) === null || _data$property$auditD === void 0 ? void 0 : _data$property$auditD.lastModifiedTime) && (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$property = waterResult.property) === null || _waterResult$property === void 0 ? void 0 : (_waterResult$property2 = _waterResult$property.auditDetails) === null || _waterResult$property2 === void 0 ? void 0 : _waterResult$property2.lastModifiedTime) && data.property.auditDetails.lastModifiedTime > waterResult.property.auditDetails.lastModifiedTime || (data === null || data === void 0 ? void 0 : (_data$property2 = data.property) === null || _data$property2 === void 0 ? void 0 : (_data$property2$audit = _data$property2.auditDetails) === null || _data$property2$audit === void 0 ? void 0 : _data$property2$audit.lastModifiedTime) && (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$auditDet = waterResult.auditDetails) === null || _waterResult$auditDet === void 0 ? void 0 : _waterResult$auditDet.lastModifiedTime) && data.property.auditDetails.lastModifiedTime > waterResult.auditDetails.lastModifiedTime);
1053
+ const actionToTake = (data === null || data === void 0 ? void 0 : data.workflowAction) || typeof sessionStorage !== "undefined" && sessionStorage.getItem("WS_WORKFLOW_ACTION") || (isPropUpdated ? "RESUBMIT_FOR_INFRA_PAYMENT" : "RESUBMIT_APPLICATION");
1052
1054
  let formdata = {
1053
1055
  WaterConnection: {
1054
1056
  id: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.id : waterResult === null || waterResult === void 0 ? void 0 : waterResult.id,
@@ -1109,13 +1111,13 @@ const convertToEditWSUpdate = data => {
1109
1111
  propertyCategory: ((_data$waterConnection4 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection4 === void 0 ? void 0 : _data$waterConnection4.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai15 = data.additionalDetails) === null || _data$additionalDetai15 === void 0 ? void 0 : _data$additionalDetai15.propertyCategory) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.propertyCategory),
1110
1112
  propertyType: ((_data$waterConnection5 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection5 === void 0 ? void 0 : _data$waterConnection5.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai16 = data.additionalDetails) === null || _data$additionalDetai16 === void 0 ? void 0 : _data$additionalDetai16.propertyType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.propertyType),
1111
1113
  waterConnectionUsageType: ((_data$waterConnection6 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai17 = data.additionalDetails) === null || _data$additionalDetai17 === void 0 ? void 0 : _data$additionalDetai17.waterConnectionUsageType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.waterConnectionUsageType),
1112
- numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai18 = data.additionalDetails) === null || _data$additionalDetai18 === void 0 ? void 0 : _data$additionalDetai18.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property = data.property) === null || _data$property === void 0 ? void 0 : (_data$property$additi = _data$property.additionalDetails) === null || _data$property$additi === void 0 ? void 0 : _data$property$additi.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : (_data$cpt31$details$a = _data$cpt31$details.additionalDetails) === null || _data$cpt31$details$a === void 0 ? void 0 : _data$cpt31$details$a.numberOfDwellingUnits) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.numberOfDwellingUnits) || ""
1114
+ numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai18 = data.additionalDetails) === null || _data$additionalDetai18 === void 0 ? void 0 : _data$additionalDetai18.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property3 = data.property) === null || _data$property3 === void 0 ? void 0 : (_data$property3$addit = _data$property3.additionalDetails) === null || _data$property3$addit === void 0 ? void 0 : _data$property3$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : (_data$cpt31$details$a = _data$cpt31$details.additionalDetails) === null || _data$cpt31$details$a === void 0 ? void 0 : _data$cpt31$details$a.numberOfDwellingUnits) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.numberOfDwellingUnits) || ""
1113
1115
  } : {})
1114
1116
  },
1115
1117
  auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : waterResult === null || waterResult === void 0 ? void 0 : waterResult.auditDetails,
1116
1118
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
1117
1119
  ...(data === null || data === void 0 ? void 0 : data.processInstance),
1118
- action: "RESUBMIT_APPLICATION"
1120
+ action: actionToTake
1119
1121
  } : {
1120
1122
  ...(waterResult === null || waterResult === void 0 ? void 0 : waterResult.processInstance),
1121
1123
  action: "SUBMIT_APPLICATION"
@@ -1203,7 +1205,7 @@ const convertToEditWSUpdate = data => {
1203
1205
  comment: "",
1204
1206
  wfDocuments: [],
1205
1207
  assignee: [],
1206
- action: data !== null && data !== void 0 && data.isEditApplication ? "RESUBMIT_APPLICATION" : "SUBMIT_APPLICATION",
1208
+ action: data !== null && data !== void 0 && data.isEditApplication ? actionToTake : "SUBMIT_APPLICATION",
1207
1209
  assignes: []
1208
1210
  }
1209
1211
  };
@@ -1211,12 +1213,13 @@ const convertToEditWSUpdate = data => {
1211
1213
  return formdata;
1212
1214
  };
1213
1215
  const convertToEditSWUpdate = data => {
1214
- var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai19, _data$additionalDetai20, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai21, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai22, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$rainWaterHarves14, _data$waterConnection8, _data$additionalDetai23, _SewerageResult$addit4, _data$additionalDetai24, _SewerageResult$addit5, _data$additionalDetai25, _SewerageResult$addit6, _data$additionalDetai26, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai27, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai28, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai29, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai30, _SewerageResult$addit1, _data$additionalDetai31, _data$property2, _data$property2$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
1216
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai19, _data$additionalDetai20, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai21, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai22, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$rainWaterHarves14, _data$waterConnection8, _data$additionalDetai23, _SewerageResult$addit4, _data$additionalDetai24, _SewerageResult$addit5, _data$additionalDetai25, _SewerageResult$addit6, _data$additionalDetai26, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai27, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai28, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai29, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai30, _SewerageResult$addit1, _data$additionalDetai31, _data$property4, _data$property4$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
1215
1217
  const {
1216
1218
  signatureFileStoreId,
1217
1219
  signatureFileName
1218
1220
  } = getSignatureDetails(data);
1219
1221
  let SewerageResult = data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnectionResult) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0];
1222
+ const actionToTake = (data === null || data === void 0 ? void 0 : data.workflowAction) || "RESUBMIT_APPLICATION";
1220
1223
  let formdata = {
1221
1224
  SewerageConnection: {
1222
1225
  id: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.id : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.id,
@@ -1277,13 +1280,13 @@ const convertToEditSWUpdate = data => {
1277
1280
  propertyCategory: ((_data$waterConnection0 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai28 = data.additionalDetails) === null || _data$additionalDetai28 === void 0 ? void 0 : _data$additionalDetai28.propertyCategory) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit9 = SewerageResult.additionalDetails) === null || _SewerageResult$addit9 === void 0 ? void 0 : _SewerageResult$addit9.propertyCategory),
1278
1281
  propertyType: ((_data$waterConnection1 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection1 === void 0 ? void 0 : _data$waterConnection1.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai29 = data.additionalDetails) === null || _data$additionalDetai29 === void 0 ? void 0 : _data$additionalDetai29.propertyType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit0 = SewerageResult.additionalDetails) === null || _SewerageResult$addit0 === void 0 ? void 0 : _SewerageResult$addit0.propertyType),
1279
1282
  waterConnectionUsageType: ((_data$waterConnection10 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai30 = data.additionalDetails) === null || _data$additionalDetai30 === void 0 ? void 0 : _data$additionalDetai30.waterConnectionUsageType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit1 = SewerageResult.additionalDetails) === null || _SewerageResult$addit1 === void 0 ? void 0 : _SewerageResult$addit1.waterConnectionUsageType),
1280
- numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai31 = data.additionalDetails) === null || _data$additionalDetai31 === void 0 ? void 0 : _data$additionalDetai31.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property2 = data.property) === null || _data$property2 === void 0 ? void 0 : (_data$property2$addit = _data$property2.additionalDetails) === null || _data$property2$addit === void 0 ? void 0 : _data$property2$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$a = _data$cpt33$details.additionalDetails) === null || _data$cpt33$details$a === void 0 ? void 0 : _data$cpt33$details$a.numberOfDwellingUnits) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit10 = SewerageResult.additionalDetails) === null || _SewerageResult$addit10 === void 0 ? void 0 : _SewerageResult$addit10.numberOfDwellingUnits) || ""
1283
+ numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai31 = data.additionalDetails) === null || _data$additionalDetai31 === void 0 ? void 0 : _data$additionalDetai31.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property4 = data.property) === null || _data$property4 === void 0 ? void 0 : (_data$property4$addit = _data$property4.additionalDetails) === null || _data$property4$addit === void 0 ? void 0 : _data$property4$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$a = _data$cpt33$details.additionalDetails) === null || _data$cpt33$details$a === void 0 ? void 0 : _data$cpt33$details$a.numberOfDwellingUnits) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit10 = SewerageResult.additionalDetails) === null || _SewerageResult$addit10 === void 0 ? void 0 : _SewerageResult$addit10.numberOfDwellingUnits) || ""
1281
1284
  } : {})
1282
1285
  },
1283
1286
  auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.auditDetails,
1284
1287
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
1285
1288
  ...(data === null || data === void 0 ? void 0 : data.processInstance),
1286
- action: "RESUBMIT_APPLICATION"
1289
+ action: actionToTake
1287
1290
  } : {
1288
1291
  ...(SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.processInstance),
1289
1292
  action: "SUBMIT_APPLICATION"
@@ -1371,7 +1374,7 @@ const convertToEditSWUpdate = data => {
1371
1374
  comment: "",
1372
1375
  wfDocuments: [],
1373
1376
  assignee: [],
1374
- action: data !== null && data !== void 0 && data.isEditApplication ? "RESUBMIT_APPLICATION" : "SUBMIT_APPLICATION",
1377
+ action: data !== null && data !== void 0 && data.isEditApplication ? actionToTake : "SUBMIT_APPLICATION",
1375
1378
  assignes: []
1376
1379
  }
1377
1380
  };
@@ -8481,7 +8484,7 @@ var lodash = createCommonjsModule(function (module, exports) {
8481
8484
  });
8482
8485
 
8483
8486
  const WSApplication = _ref => {
8484
- var _user$info, _user$info$userName, _user$info2, _user$info3, _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$applicat9, _application$connecti, _application$property, _application$property2, _application$property3, _application$property4, _application$property5, _application$property6;
8487
+ var _user$info, _user$info$userName, _user$info2, _user$info3, _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$applicat9, _application$connecti, _application$property, _application$property2, _application$property3, _application$property4, _application$property5, _application$property6, _application$applicat0, _application$applicat1;
8485
8488
  let {
8486
8489
  application
8487
8490
  } = _ref;
@@ -8577,17 +8580,17 @@ const WSApplication = _ref => {
8577
8580
  to: application !== null && application !== void 0 && application.isBillAmendment ? `/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${encodeApplicationNo}` : `/digit-ui/citizen/ws/connection/application/${encodeApplicationNo}`
8578
8581
  }, /*#__PURE__*/React.createElement(SubmitBar, {
8579
8582
  label: t("WS_VIEW_DETAILS_LABEL")
8580
- })), (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement("div", {
8583
+ })), (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_ZRO" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_EE" || application !== null && application !== void 0 && (_application$applicat0 = application.applicationStatus) !== null && _application$applicat0 !== void 0 && (_application$applicat1 = _application$applicat0.includes) !== null && _application$applicat1 !== void 0 && _application$applicat1.call(_application$applicat0, "PENDING_FOR_INFRA_PAYMENT") ? /*#__PURE__*/React.createElement("div", {
8581
8584
  style: {
8582
8585
  marginTop: "10px"
8583
8586
  }
8584
8587
  }, /*#__PURE__*/React.createElement(SubmitBar, {
8585
8588
  label: t("MAKE_PAYMENT"),
8586
8589
  onSubmit: () => {
8587
- var _application$connecti2, _application$connecti3, _PTData$Properties, _PTData$Properties$, _PTData$Properties$$o, _application$applicat0;
8590
+ var _application$connecti2, _application$connecti3, _PTData$Properties, _PTData$Properties$, _PTData$Properties$$o, _application$applicat10;
8588
8591
  history.push({
8589
8592
  pathname: `/digit-ui/citizen/payment/my-bills/${businessService}/${stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")}`,
8590
- search: `?workflow=WNS&tenantId=${application === null || application === void 0 ? void 0 : application.tenantId}&ConsumerName=${(application === null || application === void 0 ? void 0 : (_application$connecti2 = application.connectionHolders) === null || _application$connecti2 === void 0 ? void 0 : _application$connecti2.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$connecti3 = application.connectionHolders) === null || _application$connecti3 === void 0 ? void 0 : _application$connecti3.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties = PTData.Properties) === null || _PTData$Properties === void 0 ? void 0 : (_PTData$Properties$ = _PTData$Properties[0]) === null || _PTData$Properties$ === void 0 ? void 0 : (_PTData$Properties$$o = _PTData$Properties$.owners) === null || _PTData$Properties$$o === void 0 ? void 0 : _PTData$Properties$$o.map(owner => owner.name).join(","))}&isDisoconnectFlow=${application !== null && application !== void 0 && (_application$applicat0 = application.applicationNo) !== null && _application$applicat0 !== void 0 && _application$applicat0.includes("DC") ? true : false}&consumerCode=${application === null || application === void 0 ? void 0 : application.applicationNo}`,
8593
+ search: `?workflow=WNS&tenantId=${application === null || application === void 0 ? void 0 : application.tenantId}&ConsumerName=${(application === null || application === void 0 ? void 0 : (_application$connecti2 = application.connectionHolders) === null || _application$connecti2 === void 0 ? void 0 : _application$connecti2.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$connecti3 = application.connectionHolders) === null || _application$connecti3 === void 0 ? void 0 : _application$connecti3.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties = PTData.Properties) === null || _PTData$Properties === void 0 ? void 0 : (_PTData$Properties$ = _PTData$Properties[0]) === null || _PTData$Properties$ === void 0 ? void 0 : (_PTData$Properties$$o = _PTData$Properties$.owners) === null || _PTData$Properties$$o === void 0 ? void 0 : _PTData$Properties$$o.map(owner => owner.name).join(","))}&isDisoconnectFlow=${application !== null && application !== void 0 && (_application$applicat10 = application.applicationNo) !== null && _application$applicat10 !== void 0 && _application$applicat10.includes("DC") ? true : false}&consumerCode=${application === null || application === void 0 ? void 0 : application.applicationNo}`,
8591
8594
  state: {}
8592
8595
  });
8593
8596
  }
@@ -8717,6 +8720,25 @@ const WSMyApplications = () => {
8717
8720
  },
8718
8721
  enabled: userMobileNumber ? true : false
8719
8722
  });
8723
+ const {
8724
+ data: userConnections
8725
+ } = Digit.Hooks.ws.useMyApplicationSearch({
8726
+ filters: {
8727
+ tenantId,
8728
+ mobileNumber: userMobileNumber,
8729
+ searchType: "CONNECTION"
8730
+ }
8731
+ }, {
8732
+ filters: {
8733
+ tenantId,
8734
+ mobileNumber: userMobileNumber,
8735
+ searchType: "CONNECTION"
8736
+ },
8737
+ enabled: !!userMobileNumber
8738
+ });
8739
+ const [pageOffset, setPageOffset] = useState(0);
8740
+ const [pageSize, setPageSize] = useState(10);
8741
+ const [searchParams, setSearchParams] = useState(null);
8720
8742
  const [billAmendments, setBillAmendments] = useState([]);
8721
8743
  const [isBillAmendLoading, setIsBillAmendLoading] = useState(false);
8722
8744
  useEffect(() => {
@@ -8727,11 +8749,51 @@ const WSMyApplications = () => {
8727
8749
  setIsBillAmendLoading(true);
8728
8750
  const _temp = _finallyRethrows(function () {
8729
8751
  return _catch(function () {
8730
- return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, {
8731
- mobileNumber: userMobileNumber
8732
- })).then(function (res) {
8752
+ const consumerCodes = new Set();
8753
+ ((data === null || data === void 0 ? void 0 : data.WaterConnection) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
8754
+ ((SWdata === null || SWdata === void 0 ? void 0 : SWdata.SewerageConnections) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
8755
+ ((userConnections === null || userConnections === void 0 ? void 0 : userConnections.WaterConnection) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
8756
+ ((userConnections === null || userConnections === void 0 ? void 0 : userConnections.SewerageConnections) || []).forEach(c => (c === null || c === void 0 ? void 0 : c.connectionNo) && consumerCodes.add(c.connectionNo));
8757
+ const amendmentPromises = [];
8758
+ consumerCodes.forEach(code => {
8759
+ amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
8760
+ consumerCode: code,
8761
+ businessService: "WS"
8762
+ }).catch(() => ({
8763
+ Amendments: []
8764
+ })));
8765
+ amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
8766
+ consumerCode: code,
8767
+ businessService: "SW"
8768
+ }).catch(() => ({
8769
+ Amendments: []
8770
+ })));
8771
+ });
8772
+ if (searchParams !== null && searchParams !== void 0 && searchParams.applicationNo) {
8773
+ amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
8774
+ amendmentId: searchParams.applicationNo,
8775
+ businessService: "WS"
8776
+ }).catch(() => ({
8777
+ Amendments: []
8778
+ })));
8779
+ amendmentPromises.push(Digit.PaymentService.searchAmendment(tenantId, {
8780
+ amendmentId: searchParams.applicationNo,
8781
+ businessService: "SW"
8782
+ }).catch(() => ({
8783
+ Amendments: []
8784
+ })));
8785
+ }
8786
+ return Promise.resolve(Promise.all(amendmentPromises)).then(function (responses) {
8787
+ const allAmendmentsMap = new Map();
8788
+ responses.forEach(res => {
8789
+ ((res === null || res === void 0 ? void 0 : res.Amendments) || []).forEach(amend => {
8790
+ if (amend !== null && amend !== void 0 && amend.amendmentId) {
8791
+ allAmendmentsMap.set(amend.amendmentId, amend);
8792
+ }
8793
+ });
8794
+ });
8733
8795
  if (isMounted) {
8734
- setBillAmendments((res === null || res === void 0 ? void 0 : res.Amendments) || []);
8796
+ setBillAmendments(Array.from(allAmendmentsMap.values()));
8735
8797
  }
8736
8798
  });
8737
8799
  }, function (err) {
@@ -8753,10 +8815,7 @@ const WSMyApplications = () => {
8753
8815
  return () => {
8754
8816
  isMounted = false;
8755
8817
  };
8756
- }, [tenantId, userMobileNumber]);
8757
- const [pageOffset, setPageOffset] = useState(0);
8758
- const [pageSize, setPageSize] = useState(10);
8759
- const [searchParams, setSearchParams] = useState(null);
8818
+ }, [tenantId, userMobileNumber, data, SWdata, userConnections, searchParams === null || searchParams === void 0 ? void 0 : searchParams.applicationNo]);
8760
8819
  const isMobile = window.Digit.Utils.browser.isMobile();
8761
8820
  const GetCell = value => /*#__PURE__*/React.createElement("span", {
8762
8821
  className: "cell-text"
@@ -8885,7 +8944,7 @@ const WSMyApplications = () => {
8885
8944
  Header: t("MAKE_PAYMENT"),
8886
8945
  disableSortBy: true,
8887
8946
  Cell: _ref0 => {
8888
- var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$connecti, _application$property, _application$property2, _application$applicat9;
8947
+ var _application$applicat, _application$applicat2, _application$applicat3, _application$applicat4, _application$applicat5, _application$applicat6, _application$applicat7, _application$applicat8, _application$applicat9, _application$applicat0, _application$connecti, _application$property, _application$property2, _application$applicat1;
8889
8948
  let {
8890
8949
  row
8891
8950
  } = _ref0;
@@ -8893,12 +8952,12 @@ const WSMyApplications = () => {
8893
8952
  const isMutation = application === null || application === void 0 ? void 0 : (_application$applicat = application.applicationType) === null || _application$applicat === void 0 ? void 0 : _application$applicat.includes("MUTATION");
8894
8953
  const isReconnection = (application === null || application === void 0 ? void 0 : (_application$applicat2 = application.applicationType) === null || _application$applicat2 === void 0 ? void 0 : _application$applicat2.includes("RECONNECT")) || (application === null || application === void 0 ? void 0 : (_application$applicat3 = application.applicationNo) === null || _application$applicat3 === void 0 ? void 0 : _application$applicat3.includes("RC"));
8895
8954
  const businessService = application !== null && application !== void 0 && (_application$applicat4 = application.applicationNo) !== null && _application$applicat4 !== void 0 && _application$applicat4.includes("SW") || (application === null || application === void 0 ? void 0 : application.serviceType) === "SEWERAGE" ? application !== null && application !== void 0 && (_application$applicat5 = application.applicationNo) !== null && _application$applicat5 !== void 0 && _application$applicat5.includes("DC") || application !== null && application !== void 0 && (_application$applicat6 = application.applicationType) !== null && _application$applicat6 !== void 0 && _application$applicat6.includes("DISCONNECT") ? "SW.DISCONNECTION" : isReconnection ? "SWReconnection" : isMutation ? "SW.MUTATION" : "SW.ONE_TIME_FEE" : application !== null && application !== void 0 && (_application$applicat7 = application.applicationNo) !== null && _application$applicat7 !== void 0 && _application$applicat7.includes("DC") || application !== null && application !== void 0 && (_application$applicat8 = application.applicationType) !== null && _application$applicat8 !== void 0 && _application$applicat8.includes("DISCONNECT") ? "WS.DISCONNECTION" : isReconnection ? "WSReconnection" : isMutation ? "WS.MUTATION" : "WS.ONE_TIME_FEE";
8896
- return (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" ? /*#__PURE__*/React.createElement("span", {
8955
+ return (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_ZRO" || (application === null || application === void 0 ? void 0 : application.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_EE" || application !== null && application !== void 0 && (_application$applicat9 = application.applicationStatus) !== null && _application$applicat9 !== void 0 && (_application$applicat0 = _application$applicat9.includes) !== null && _application$applicat0 !== void 0 && _application$applicat0.call(_application$applicat9, "PENDING_FOR_INFRA_PAYMENT") ? /*#__PURE__*/React.createElement("span", {
8897
8956
  className: "link"
8898
8957
  }, /*#__PURE__*/React.createElement(Link, {
8899
8958
  to: {
8900
8959
  pathname: `/digit-ui/citizen/payment/my-bills/${businessService}/${stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+") || stringReplaceAll(application === null || application === void 0 ? void 0 : application.applicationNo, "/", "+")}`,
8901
- search: `?workflow=WNS&tenantId=${application === null || application === void 0 ? void 0 : application.tenantId}&ConsumerName=${(application === null || application === void 0 ? void 0 : (_application$connecti = application.connectionHolders) === null || _application$connecti === void 0 ? void 0 : _application$connecti.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$property = application.property) === null || _application$property === void 0 ? void 0 : (_application$property2 = _application$property.owners) === null || _application$property2 === void 0 ? void 0 : _application$property2.map(owner => owner.name).join(","))}&isDisoconnectFlow=${application !== null && application !== void 0 && (_application$applicat9 = application.applicationNo) !== null && _application$applicat9 !== void 0 && _application$applicat9.includes("DC") ? true : false}&consumerCode=${application === null || application === void 0 ? void 0 : application.applicationNo}`,
8960
+ search: `?workflow=WNS&tenantId=${application === null || application === void 0 ? void 0 : application.tenantId}&ConsumerName=${(application === null || application === void 0 ? void 0 : (_application$connecti = application.connectionHolders) === null || _application$connecti === void 0 ? void 0 : _application$connecti.map(owner => owner.name).join(",")) || (application === null || application === void 0 ? void 0 : (_application$property = application.property) === null || _application$property === void 0 ? void 0 : (_application$property2 = _application$property.owners) === null || _application$property2 === void 0 ? void 0 : _application$property2.map(owner => owner.name).join(","))}&isDisoconnectFlow=${application !== null && application !== void 0 && (_application$applicat1 = application.applicationNo) !== null && _application$applicat1 !== void 0 && _application$applicat1.includes("DC") ? true : false}&consumerCode=${application === null || application === void 0 ? void 0 : application.applicationNo}`,
8902
8961
  state: {
8903
8962
  fromMyApplications: true
8904
8963
  }
@@ -10043,7 +10102,7 @@ const ResponseBillAmend = () => {
10043
10102
  };
10044
10103
 
10045
10104
  const ApplicationBillAmendment = () => {
10046
- var _state, _state$data, _state$data$applicati, _state$data$applicati2, _state$data$applicati3, _data$BillingService, _data$BillingService$, _data$BillingService2, _data$BillingService3, _state2, _state2$data, _state2$data$applicat, _state2$data$applicat2, _state2$data$applicat3, _billSearchData, _billSearchData$filte, _billSearchData2, _state8, _state8$data, _errors$WS_REDUCED_AM, _errors$WS_ADDITIONAL, _billSearchData3, _errors$effectiveTill, _errors$effectiveTill2, _state9, _state9$data;
10105
+ var _state, _state$data, _state2, _state2$data, _state3, _state3$data, _state3$data$applicat, _state3$data$applicat2, _state3$data$applicat3, _data$BillingService, _data$BillingService$, _data$BillingService2, _data$BillingService3, _state4, _state4$data, _state4$data$applicat, _state4$data$applicat2, _state4$data$applicat3, _billSearchData, _billSearchData$filte, _billSearchData2, _state14, _state14$data, _state15, _state15$data, _errors$WS_REDUCED_AM, _errors$WS_ADDITIONAL, _billSearchData3, _errors$effectiveTill, _errors$effectiveTill2, _state16, _state16$data;
10047
10106
  const [showToast, setShowToast] = useState(null);
10048
10107
  const {
10049
10108
  t
@@ -10073,6 +10132,27 @@ const ApplicationBillAmendment = () => {
10073
10132
  tenantId: stateId
10074
10133
  });
10075
10134
  const servicev1 = service === "SEWERAGE" || connectionNumber !== null && connectionNumber !== void 0 && connectionNumber.includes("SW") ? "SW" : "WS";
10135
+ const isApplicationNo = (connectionNumber === null || connectionNumber === void 0 ? void 0 : connectionNumber.includes("_AP")) || (connectionNumber === null || connectionNumber === void 0 ? void 0 : connectionNumber.includes("_APPLICATION")) || (connectionNumber === null || connectionNumber === void 0 ? void 0 : connectionNumber.startsWith("WS_")) || (connectionNumber === null || connectionNumber === void 0 ? void 0 : connectionNumber.startsWith("SW_"));
10136
+ const {
10137
+ data: connSearchData,
10138
+ isLoading: isConnLoading
10139
+ } = Digit.Hooks.ws.useOldValue({
10140
+ tenantId,
10141
+ filters: {
10142
+ connectionNumber,
10143
+ searchType: "CONNECTION",
10144
+ isConnectionSearch: true
10145
+ },
10146
+ businessService: servicev1 === "SW" ? "SEWERAGE" : "WATER"
10147
+ }, {
10148
+ enabled: !isEdit && !((_state = state) !== null && _state !== void 0 && (_state$data = _state.data) !== null && _state$data !== void 0 && _state$data.action) && !!connectionNumber && !isApplicationNo,
10149
+ staleTime: 60000
10150
+ });
10151
+ const connList = (connSearchData === null || connSearchData === void 0 ? void 0 : connSearchData.WaterConnection) || (connSearchData === null || connSearchData === void 0 ? void 0 : connSearchData.SewerageConnections) || [];
10152
+ const foundConn = (connList === null || connList === void 0 ? void 0 : connList.find(c => (c === null || c === void 0 ? void 0 : c.connectionNo) === connectionNumber)) || (connList === null || connList === void 0 ? void 0 : connList[0]);
10153
+ const connStatus = String((foundConn === null || foundConn === void 0 ? void 0 : foundConn.status) || "").toUpperCase();
10154
+ const connAppStatus = String((foundConn === null || foundConn === void 0 ? void 0 : foundConn.applicationStatus) || "").toUpperCase();
10155
+ const isConnInactive = !isEdit && !((_state2 = state) !== null && _state2 !== void 0 && (_state2$data = _state2.data) !== null && _state2$data !== void 0 && _state2$data.action) && !isConnLoading && connSearchData && (!foundConn || connStatus === "INACTIVE" || connAppStatus === "DISCONNECTION_EXECUTED" || connStatus !== "ACTIVE" && connAppStatus !== "CONNECTION_ACTIVATED" && connAppStatus !== "ACTIVE");
10076
10156
  const billSearchFilters = {
10077
10157
  tenantId,
10078
10158
  consumerCode: connectionNumber,
@@ -10082,9 +10162,9 @@ const ApplicationBillAmendment = () => {
10082
10162
  data: preBillSearchData,
10083
10163
  isLoading: isBillSearchLoading
10084
10164
  } = Digit.Hooks.usePaymentSearch(tenantId, billSearchFilters, {
10085
- enabled: !!connectionNumber
10165
+ enabled: !!connectionNumber && !isApplicationNo && !isConnInactive
10086
10166
  });
10087
- const editFormData = (_state = state) === null || _state === void 0 ? void 0 : (_state$data = _state.data) === null || _state$data === void 0 ? void 0 : (_state$data$applicati = _state$data.applicationDetails) === null || _state$data$applicati === void 0 ? void 0 : (_state$data$applicati2 = _state$data$applicati.amendment) === null || _state$data$applicati2 === void 0 ? void 0 : (_state$data$applicati3 = _state$data$applicati2.additionalDetails) === null || _state$data$applicati3 === void 0 ? void 0 : _state$data$applicati3.editForm;
10167
+ const editFormData = (_state3 = state) === null || _state3 === void 0 ? void 0 : (_state3$data = _state3.data) === null || _state3$data === void 0 ? void 0 : (_state3$data$applicat = _state3$data.applicationDetails) === null || _state3$data$applicat === void 0 ? void 0 : (_state3$data$applicat2 = _state3$data$applicat.amendment) === null || _state3$data$applicat2 === void 0 ? void 0 : (_state3$data$applicat3 = _state3$data$applicat2.additionalDetails) === null || _state3$data$applicat3 === void 0 ? void 0 : _state3$data$applicat3.editForm;
10088
10168
  useEffect(() => {
10089
10169
  var _editFormData, _editFormData2;
10090
10170
  if (editFormData !== null && editFormData !== void 0 && (_editFormData = editFormData[`${servicev1}_REDUCED_AMOUNT`]) !== null && _editFormData !== void 0 && _editFormData.VALUE) {
@@ -10124,7 +10204,7 @@ const ApplicationBillAmendment = () => {
10124
10204
  WS_ADDITIONAL_AMOUNT: {
10125
10205
  VALUE: false
10126
10206
  },
10127
- ...((_state2 = state) === null || _state2 === void 0 ? void 0 : (_state2$data = _state2.data) === null || _state2$data === void 0 ? void 0 : (_state2$data$applicat = _state2$data.applicationDetails) === null || _state2$data$applicat === void 0 ? void 0 : (_state2$data$applicat2 = _state2$data$applicat.amendment) === null || _state2$data$applicat2 === void 0 ? void 0 : (_state2$data$applicat3 = _state2$data$applicat2.additionalDetails) === null || _state2$data$applicat3 === void 0 ? void 0 : _state2$data$applicat3.editForm)
10207
+ ...((_state4 = state) === null || _state4 === void 0 ? void 0 : (_state4$data = _state4.data) === null || _state4$data === void 0 ? void 0 : (_state4$data$applicat = _state4$data.applicationDetails) === null || _state4$data$applicat === void 0 ? void 0 : (_state4$data$applicat2 = _state4$data$applicat.amendment) === null || _state4$data$applicat2 === void 0 ? void 0 : (_state4$data$applicat3 = _state4$data$applicat2.additionalDetails) === null || _state4$data$applicat3 === void 0 ? void 0 : _state4$data$applicat3.editForm)
10128
10208
  }
10129
10209
  });
10130
10210
  const {
@@ -10304,20 +10384,21 @@ const ApplicationBillAmendment = () => {
10304
10384
  setShowToast(null);
10305
10385
  };
10306
10386
  useEffect(() => {
10307
- const timer = setTimeout(() => {
10308
- if (goToAppDetailsPage) {
10387
+ if (goToAppDetailsPage) {
10388
+ var _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2;
10389
+ const appId = (_state6 = state) === null || _state6 === void 0 ? void 0 : (_state6$data = _state6.data) === null || _state6$data === void 0 ? void 0 : (_state6$data$applicat = _state6$data.applicationDetails) === null || _state6$data$applicat === void 0 ? void 0 : (_state6$data$applicat2 = _state6$data$applicat.amendment) === null || _state6$data$applicat2 === void 0 ? void 0 : _state6$data$applicat2.amendmentId;
10390
+ const timer = setTimeout(() => {
10309
10391
  if (isEmployee) {
10310
- var _state4, _state4$data, _state4$data$applicat, _state4$data$applicat2;
10311
- window.location.href = `${window.location.origin}/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${(_state4 = state) === null || _state4 === void 0 ? void 0 : (_state4$data = _state4.data) === null || _state4$data === void 0 ? void 0 : (_state4$data$applicat = _state4$data.applicationDetails) === null || _state4$data$applicat === void 0 ? void 0 : (_state4$data$applicat2 = _state4$data$applicat.amendment) === null || _state4$data$applicat2 === void 0 ? void 0 : _state4$data$applicat2.amendmentId}`;
10392
+ history.push(`/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${appId}`);
10312
10393
  } else {
10313
- window.location.href = `${window.location.origin}/digit-ui/citizen/ws/my-applications`;
10394
+ history.push(`/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${appId}`);
10314
10395
  }
10315
- }
10316
- }, 5000);
10317
- return () => clearTimeout(timer);
10396
+ }, 1500);
10397
+ return () => clearTimeout(timer);
10398
+ }
10318
10399
  }, [goToAppDetailsPage]);
10319
10400
  const onFormSubmit = d => {
10320
- var _state5, _state5$data;
10401
+ var _state7, _state7$data;
10321
10402
  const data = {
10322
10403
  Amendment: {
10323
10404
  consumerCode: connectionNumber,
@@ -10344,17 +10425,18 @@ const ApplicationBillAmendment = () => {
10344
10425
  }
10345
10426
  }
10346
10427
  };
10347
- if (((_state5 = state) === null || _state5 === void 0 ? void 0 : (_state5$data = _state5.data) === null || _state5$data === void 0 ? void 0 : _state5$data.action) === "RE-SUBMIT-APPLICATION") {
10348
- var _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2, _state7, _state7$data, _state7$data$applicat, _state7$data$applicat2;
10428
+ if (((_state7 = state) === null || _state7 === void 0 ? void 0 : (_state7$data = _state7.data) === null || _state7$data === void 0 ? void 0 : _state7$data.action) === "RE-SUBMIT-APPLICATION") {
10429
+ var _state8, _state8$data, _state8$data$applicat, _state8$data$applicat2, _state8$data$applicat3, _state8$data$applicat4, _state8$data$applicat5, _state9, _state9$data, _state9$data$applicat, _state9$data$applicat2, _state0, _state0$data, _state0$data$applicat, _state0$data$applicat2, _state0$data$applicat3, _state0$data$applicat4, _state1, _state1$data, _state1$data$applicat, _state1$data$applicat2, _state1$data$applicat3, _state10, _state10$data, _state10$data$applica, _state10$data$applica2, _state10$data$applica3, _state11, _state11$data, _state11$data$applica, _state11$data$applica2, _state12, _state12$data, _state12$data$applica, _state12$data$applica2, _state13, _state13$data, _state13$data$applica, _state13$data$applica2;
10430
+ const selectedAction = ((_state8 = state) === null || _state8 === void 0 ? void 0 : (_state8$data = _state8.data) === null || _state8$data === void 0 ? void 0 : (_state8$data$applicat = _state8$data.applicationDetails) === null || _state8$data$applicat === void 0 ? void 0 : (_state8$data$applicat2 = _state8$data$applicat.processInstancesDetails) === null || _state8$data$applicat2 === void 0 ? void 0 : (_state8$data$applicat3 = _state8$data$applicat2[0]) === null || _state8$data$applicat3 === void 0 ? void 0 : (_state8$data$applicat4 = _state8$data$applicat3.nextActions) === null || _state8$data$applicat4 === void 0 ? void 0 : (_state8$data$applicat5 = _state8$data$applicat4.find(a => ["RE-SUBMIT", "RESUBMIT", "RE_SUBMIT", "SUBMIT"].includes(a === null || a === void 0 ? void 0 : a.action))) === null || _state8$data$applicat5 === void 0 ? void 0 : _state8$data$applicat5.action) || "RE-SUBMIT";
10349
10431
  const workflow = {
10350
- businessId: (_state6 = state) === null || _state6 === void 0 ? void 0 : (_state6$data = _state6.data) === null || _state6$data === void 0 ? void 0 : (_state6$data$applicat = _state6$data.applicationDetails) === null || _state6$data$applicat === void 0 ? void 0 : (_state6$data$applicat2 = _state6$data$applicat.amendment) === null || _state6$data$applicat2 === void 0 ? void 0 : _state6$data$applicat2.amendmentId,
10351
- action: "RE-SUBMIT",
10432
+ businessId: (_state9 = state) === null || _state9 === void 0 ? void 0 : (_state9$data = _state9.data) === null || _state9$data === void 0 ? void 0 : (_state9$data$applicat = _state9$data.applicationDetails) === null || _state9$data$applicat === void 0 ? void 0 : (_state9$data$applicat2 = _state9$data$applicat.amendment) === null || _state9$data$applicat2 === void 0 ? void 0 : _state9$data$applicat2.amendmentId,
10433
+ action: selectedAction,
10352
10434
  tenantId: tenantId,
10353
- businessService: "WS.AMENDMENT",
10354
- moduleName: "WS"
10435
+ businessService: (_state0 = state) !== null && _state0 !== void 0 && (_state0$data = _state0.data) !== null && _state0$data !== void 0 && (_state0$data$applicat = _state0$data.applicationDetails) !== null && _state0$data$applicat !== void 0 && (_state0$data$applicat2 = _state0$data$applicat.processInstancesDetails) !== null && _state0$data$applicat2 !== void 0 && (_state0$data$applicat3 = _state0$data$applicat2[0]) !== null && _state0$data$applicat3 !== void 0 && (_state0$data$applicat4 = _state0$data$applicat3.businessService) !== null && _state0$data$applicat4 !== void 0 && _state0$data$applicat4.includes(".AMENDMENT") ? (_state1 = state) === null || _state1 === void 0 ? void 0 : (_state1$data = _state1.data) === null || _state1$data === void 0 ? void 0 : (_state1$data$applicat = _state1$data.applicationDetails) === null || _state1$data$applicat === void 0 ? void 0 : (_state1$data$applicat2 = _state1$data$applicat.processInstancesDetails) === null || _state1$data$applicat2 === void 0 ? void 0 : (_state1$data$applicat3 = _state1$data$applicat2[0]) === null || _state1$data$applicat3 === void 0 ? void 0 : _state1$data$applicat3.businessService : (_state10 = state) !== null && _state10 !== void 0 && (_state10$data = _state10.data) !== null && _state10$data !== void 0 && (_state10$data$applica = _state10$data.applicationDetails) !== null && _state10$data$applica !== void 0 && (_state10$data$applica2 = _state10$data$applica.amendment) !== null && _state10$data$applica2 !== void 0 && (_state10$data$applica3 = _state10$data$applica2.businessService) !== null && _state10$data$applica3 !== void 0 && _state10$data$applica3.includes(".AMENDMENT") ? (_state11 = state) === null || _state11 === void 0 ? void 0 : (_state11$data = _state11.data) === null || _state11$data === void 0 ? void 0 : (_state11$data$applica = _state11$data.applicationDetails) === null || _state11$data$applica === void 0 ? void 0 : (_state11$data$applica2 = _state11$data$applica.amendment) === null || _state11$data$applica2 === void 0 ? void 0 : _state11$data$applica2.businessService : servicev1 === "SW" || ((_state12 = state) === null || _state12 === void 0 ? void 0 : (_state12$data = _state12.data) === null || _state12$data === void 0 ? void 0 : (_state12$data$applica = _state12$data.applicationDetails) === null || _state12$data$applica === void 0 ? void 0 : (_state12$data$applica2 = _state12$data$applica.amendment) === null || _state12$data$applica2 === void 0 ? void 0 : _state12$data$applica2.businessService) === "SW" ? "SW.AMENDMENT" : "WS.AMENDMENT",
10436
+ moduleName: servicev1 === "SW" ? "SW" : "WS"
10355
10437
  };
10356
10438
  const AmendmentUpdate = {
10357
- ...((_state7 = state) === null || _state7 === void 0 ? void 0 : (_state7$data = _state7.data) === null || _state7$data === void 0 ? void 0 : (_state7$data$applicat = _state7$data.applicationDetails) === null || _state7$data$applicat === void 0 ? void 0 : (_state7$data$applicat2 = _state7$data$applicat.applicationData) === null || _state7$data$applicat2 === void 0 ? void 0 : _state7$data$applicat2.billAmendmentDetails),
10439
+ ...((_state13 = state) === null || _state13 === void 0 ? void 0 : (_state13$data = _state13.data) === null || _state13$data === void 0 ? void 0 : (_state13$data$applica = _state13$data.applicationDetails) === null || _state13$data$applica === void 0 ? void 0 : (_state13$data$applica2 = _state13$data$applica.applicationData) === null || _state13$data$applica2 === void 0 ? void 0 : _state13$data$applica2.billAmendmentDetails),
10358
10440
  workflow,
10359
10441
  ...(data === null || data === void 0 ? void 0 : data.Amendment)
10360
10442
  };
@@ -10410,13 +10492,13 @@ const ApplicationBillAmendment = () => {
10410
10492
  const onFormError = formErrors => {
10411
10493
  console.warn("Bill Amendment form errors:", formErrors);
10412
10494
  };
10413
- if (!connectionNumber) {
10495
+ if (!connectionNumber || !isEdit && !((_state14 = state) !== null && _state14 !== void 0 && (_state14$data = _state14.data) !== null && _state14$data !== void 0 && _state14$data.action) && isApplicationNo || isConnInactive) {
10414
10496
  return /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Header, null, t("WS_BILL_AMEND_APP")), /*#__PURE__*/React.createElement(CardText, {
10415
10497
  style: {
10416
10498
  marginTop: "16px",
10417
10499
  marginBottom: "20px"
10418
10500
  }
10419
- }, t("WS_SELECT_CONNECTION_FOR_BILL_AMENDMENT_MSG", "Please select a connection from your connections list to apply for Bill Amendment.")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
10501
+ }, isApplicationNo ? t("WS_BILL_AMENDMENT_NOT_FOR_APPLICATION", "Bill Amendment is only applicable for active connections, not for new connection applications.") : isConnInactive ? t("WS_BILL_AMENDMENT_CONN_NOT_ACTIVE", "Bill Amendment is only allowed on active connections. The selected connection is not active.") : t("WS_SELECT_CONNECTION_FOR_BILL_AMENDMENT_MSG", "Please select a connection from your connections list to apply for Bill Amendment.")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
10420
10502
  label: t("WS_VIEW_MY_CONNECTIONS", "Go to My Connections"),
10421
10503
  onSubmit: () => history.push(isEmployee ? "/digit-ui/employee/ws/water/search-connection" : "/digit-ui/citizen/ws/my-connections")
10422
10504
  })));
@@ -10427,7 +10509,7 @@ const ApplicationBillAmendment = () => {
10427
10509
  style: {
10428
10510
  marginLeft: "20px"
10429
10511
  }
10430
- }, /*#__PURE__*/React.createElement(Header, null, (_state8 = state) !== null && _state8 !== void 0 && (_state8$data = _state8.data) !== null && _state8$data !== void 0 && _state8$data.action ? t("WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL") : t("WS_BILL_AMENDMENT_BUTTON"))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(LabelFieldPair, {
10512
+ }, /*#__PURE__*/React.createElement(Header, null, (_state15 = state) !== null && _state15 !== void 0 && (_state15$data = _state15.data) !== null && _state15$data !== void 0 && _state15$data.action ? t("WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL") : t("WS_BILL_AMENDMENT_BUTTON"))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(LabelFieldPair, {
10431
10513
  style: {
10432
10514
  marginBottom: "20px"
10433
10515
  }
@@ -10843,7 +10925,7 @@ const ApplicationBillAmendment = () => {
10843
10925
  onClose: closeToast
10844
10926
  }) : null, /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
10845
10927
  submit: true,
10846
- label: (_state9 = state) !== null && _state9 !== void 0 && (_state9$data = _state9.data) !== null && _state9$data !== void 0 && _state9$data.action ? t("WF_CITIZEN_NEWWS1_RESUBMIT_APPLICATION") : t("WS_COMMON_BUTTON_SUBMIT"),
10928
+ label: (_state16 = state) !== null && _state16 !== void 0 && (_state16$data = _state16.data) !== null && _state16$data !== void 0 && _state16$data.action ? t("WF_CITIZEN_NEWWS1_RESUBMIT_APPLICATION") : t("WS_COMMON_BUTTON_SUBMIT"),
10847
10929
  onSubmit: handleSubmit(onFormSubmit, onFormError)
10848
10930
  })));
10849
10931
  };
@@ -12933,8 +13015,8 @@ function getNative(object, key) {
12933
13015
  }
12934
13016
  var _getNative = getNative;
12935
13017
 
12936
- var Map = _getNative(_root, 'Map');
12937
- var _Map = Map;
13018
+ var Map$1 = _getNative(_root, 'Map');
13019
+ var _Map = Map$1;
12938
13020
 
12939
13021
  var nativeCreate = _getNative(Object, 'create');
12940
13022
  var _nativeCreate = nativeCreate;
@@ -16375,11 +16457,38 @@ function PropertyDocuments(_ref) {
16375
16457
  }
16376
16458
  }));
16377
16459
  };
16460
+ const isInvalidDocNum = (val, doc) => {
16461
+ var _doc$originalDoc, _doc$originalDoc2;
16462
+ if (!val || typeof val !== "string") return true;
16463
+ const trimmed = val.trim();
16464
+ if (!trimmed || trimmed.toUpperCase() === "NA" || trimmed.toUpperCase() === "NULL" || trimmed.toUpperCase() === "UNDEFINED" || trimmed.toUpperCase() === "NONE" || trimmed === "-") {
16465
+ return true;
16466
+ }
16467
+ const uuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
16468
+ if (uuidRegex.test(trimmed)) return true;
16469
+ if (/^[0-9a-fA-F]{32}$/.test(trimmed)) return true;
16470
+ if (doc !== null && doc !== void 0 && doc.fileStoreId && trimmed === String(doc.fileStoreId).trim()) return true;
16471
+ if (doc !== null && doc !== void 0 && doc.id && trimmed === String(doc.id).trim()) return true;
16472
+ if (doc !== null && doc !== void 0 && doc.documentId && trimmed === String(doc.documentId).trim()) return true;
16473
+ if (doc !== null && doc !== void 0 && (_doc$originalDoc = doc.originalDoc) !== null && _doc$originalDoc !== void 0 && _doc$originalDoc.fileStoreId && trimmed === String(doc.originalDoc.fileStoreId).trim()) return true;
16474
+ if (doc !== null && doc !== void 0 && (_doc$originalDoc2 = doc.originalDoc) !== null && _doc$originalDoc2 !== void 0 && _doc$originalDoc2.id && trimmed === String(doc.originalDoc.id).trim()) return true;
16475
+ return false;
16476
+ };
16477
+ const getDocNumber = doc => {
16478
+ var _doc$originalDoc3, _doc$originalDoc4;
16479
+ const candidates = [doc === null || doc === void 0 ? void 0 : doc.documentNumber, doc === null || doc === void 0 ? void 0 : doc.documentUid, doc === null || doc === void 0 ? void 0 : (_doc$originalDoc3 = doc.originalDoc) === null || _doc$originalDoc3 === void 0 ? void 0 : _doc$originalDoc3.documentNumber, doc === null || doc === void 0 ? void 0 : (_doc$originalDoc4 = doc.originalDoc) === null || _doc$originalDoc4 === void 0 ? void 0 : _doc$originalDoc4.documentUid];
16480
+ for (const c of candidates) {
16481
+ if (c && !isInvalidDocNum(c, doc)) {
16482
+ return String(c).trim();
16483
+ }
16484
+ }
16485
+ return t("NA");
16486
+ };
16378
16487
  const renderDocumentRow = (value, index) => {
16379
16488
  var _pdfFiles$value$fileS;
16380
16489
  const fileUrl = (_pdfFiles$value$fileS = pdfFiles[value.fileStoreId]) === null || _pdfFiles$value$fileS === void 0 ? void 0 : _pdfFiles$value$fileS.split(",")[0];
16381
16490
  const docSubType = getDocSubType(value === null || value === void 0 ? void 0 : value.documentType);
16382
- const docUid = (value === null || value === void 0 ? void 0 : value.documentNumber) || (value === null || value === void 0 ? void 0 : value.documentUid) || "";
16491
+ const docUid = getDocNumber(value);
16383
16492
  const isPhoto = value === null || value === void 0 ? void 0 : value.isPhoto;
16384
16493
  let typeLabel = "";
16385
16494
  let numLabel = "";
@@ -20640,7 +20749,7 @@ const ApplicationDetailsBillAmendment = () => {
20640
20749
  const queryParams = Digit.Hooks.useQueryParams();
20641
20750
  const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
20642
20751
  const isEmployee = window.location.href.includes("/employee");
20643
- const tenantId = Digit.ULBService.getCurrentTenantId() || "dl.djb";
20752
+ const tenantId = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.tenantId) || (Digit.ULBService.getCurrentTenantId() && Digit.ULBService.getCurrentTenantId() !== "dl" ? Digit.ULBService.getCurrentTenantId() : "dl.djb");
20644
20753
  const {
20645
20754
  t
20646
20755
  } = useTranslation();
@@ -20664,8 +20773,9 @@ const ApplicationDetailsBillAmendment = () => {
20664
20773
  enabled: !!applicationNumber
20665
20774
  }
20666
20775
  });
20667
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.actionState) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.nextActions) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.forEach(action => {
20668
- if ((action === null || action === void 0 ? void 0 : action.action) === "RE-SUBMIT") {
20776
+ const allNextActions = [...((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.actionState) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.nextActions) || []), ...((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.nextActions) || [])];
20777
+ allNextActions.forEach(action => {
20778
+ if (["RE-SUBMIT", "RESUBMIT", "RE_SUBMIT", "SUBMIT", "EDIT"].includes(action === null || action === void 0 ? void 0 : action.action)) {
20669
20779
  var _applicationDetails$a, _applicationDetails$a2;
20670
20780
  let pathName = isEmployee ? `/digit-ui/employee/ws/bill-amendment?connectionNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo}&tenantId=${tenantId}&isEdit=true` : `/digit-ui/citizen/ws/bill-amendment?connectionNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationData) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.connectionNo}&tenantId=${tenantId}&isEdit=true`;
20671
20781
  action.redirectionUrll = {
@@ -21013,7 +21123,7 @@ const App = _ref => {
21013
21123
  className: "employee-form"
21014
21124
  }, /*#__PURE__*/React.createElement("div", {
21015
21125
  className: "employee-form-content"
21016
- }, /*#__PURE__*/React.createElement(PrivateRoute, {
21126
+ }, /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(PrivateRoute, {
21017
21127
  path: `${path}/create-application`,
21018
21128
  component: WSInfoPage
21019
21129
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
@@ -21093,6 +21203,13 @@ const App = _ref => {
21093
21203
  path: `${path}/mutation-application`,
21094
21204
  component: WSMutationApplication
21095
21205
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
21206
+ exact: true,
21207
+ path: `${path}/bill-amendment/application-details`,
21208
+ component: props => /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, _extends({}, props, {
21209
+ path: path
21210
+ }))
21211
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
21212
+ exact: true,
21096
21213
  path: `${path}/bill-amendment`,
21097
21214
  component: props => /*#__PURE__*/React.createElement(WSApplicationBillAmendment, _extends({}, props, {
21098
21215
  path: path
@@ -21112,12 +21229,7 @@ const App = _ref => {
21112
21229
  component: props => /*#__PURE__*/React.createElement(ResponseBillAmend, _extends({}, props, {
21113
21230
  path: path
21114
21231
  }))
21115
- }), /*#__PURE__*/React.createElement(PrivateRoute, {
21116
- path: `${path}/bill-amendment/application-details`,
21117
- component: props => /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, _extends({}, props, {
21118
- path: path
21119
- }))
21120
- })))))));
21232
+ }))))))));
21121
21233
  };
21122
21234
 
21123
21235
  const getPropertyAddress$2 = property => {
@@ -22786,6 +22898,1969 @@ const WSZROVerificationDetails = () => {
22786
22898
  }));
22787
22899
  };
22788
22900
 
22901
+ const initialChecklist = {
22902
+ inspectionDate: new Date().toISOString().split("T")[0],
22903
+ inspectionTime: "11:30 AM",
22904
+ siteInspectorName: "",
22905
+ inspectorEmployeeId: "",
22906
+ isLicensedPlumberPresent: {
22907
+ code: "YES",
22908
+ name: "YES"
22909
+ },
22910
+ isConsumerRepresentativePresent: {
22911
+ code: "YES",
22912
+ name: "YES"
22913
+ },
22914
+ consumerIdentityVerified: false,
22915
+ knoDetailsMatched: false,
22916
+ propertyAddressVerified: false,
22917
+ localityColonyVerified: false,
22918
+ propertyUseVerified: false,
22919
+ plotDetailsVerified: false,
22920
+ existingWaterConnectionChecked: false,
22921
+ proposedConnectionPointIdentified: false,
22922
+ waterMainAndRoadAccessFeasible: false,
22923
+ meterLocationIdentifiedAndAccessible: false,
22924
+ licensedPlumberVerified: false,
22925
+ siteConditionsMatchedApplication: false,
22926
+ siteAccessibility: {
22927
+ code: "ACCESSIBLE",
22928
+ name: "ACCESSIBLE"
22929
+ },
22930
+ proposedMeterLocation: {
22931
+ code: "INSIDE_PREMISES",
22932
+ name: "INSIDE_PREMISES"
22933
+ },
22934
+ siteFeasibilityObserved: {
22935
+ code: "FEASIBLE",
22936
+ name: "FEASIBLE"
22937
+ },
22938
+ siteInspectorRemarks: ""
22939
+ };
22940
+ const initialDeclaration = {
22941
+ agreed: false,
22942
+ inspectorName: "",
22943
+ submissionDate: new Date().toISOString().split("T")[0]
22944
+ };
22945
+ const emptyConnectionDetails = {
22946
+ kno: "",
22947
+ applicationNo: "",
22948
+ connectionNo: "",
22949
+ tenantId: "",
22950
+ status: "",
22951
+ applicationType: "",
22952
+ knoIssuanceDate: "",
22953
+ knoIssuanceDateEpoch: null,
22954
+ zone: "",
22955
+ zroOffice: "",
22956
+ connectionType: "",
22957
+ connectionCategory: "",
22958
+ applicationStatus: "",
22959
+ assignedLicensedPlumber: "",
22960
+ propertyAddress: "",
22961
+ city: "",
22962
+ pincode: "",
22963
+ locality: "",
22964
+ subLocality: "",
22965
+ colonyCategory: "",
22966
+ propertyUse: "",
22967
+ ownershipType: "",
22968
+ houseNo: "",
22969
+ consumerName: "",
22970
+ mobileNumber: "",
22971
+ emailId: "",
22972
+ applicantType: "",
22973
+ identityType: "",
22974
+ alternateContactNumber: "",
22975
+ plotNumber: "",
22976
+ plotArea: "",
22977
+ plotAreaUnit: "",
22978
+ numberOfFloors: "",
22979
+ coveredArea: "",
22980
+ roadWidth: "",
22981
+ propertyType: "",
22982
+ buildingStatus: "",
22983
+ existingWaterConnection: ""
22984
+ };
22985
+ const yesNoOptions = [{
22986
+ code: "YES",
22987
+ name: "YES"
22988
+ }, {
22989
+ code: "NO",
22990
+ name: "NO"
22991
+ }];
22992
+ const siteAccessibilityOptions = [{
22993
+ code: "ACCESSIBLE",
22994
+ name: "ACCESSIBLE"
22995
+ }, {
22996
+ code: "INACCESSIBLE",
22997
+ name: "INACCESSIBLE"
22998
+ }, {
22999
+ code: "PARTIALLY_ACCESSIBLE",
23000
+ name: "PARTIALLY_ACCESSIBLE"
23001
+ }];
23002
+ const proposedMeterLocationOptions = [{
23003
+ code: "INSIDE_PREMISES",
23004
+ name: "INSIDE_PREMISES"
23005
+ }, {
23006
+ code: "OUTSIDE_PREMISES",
23007
+ name: "OUTSIDE_PREMISES"
23008
+ }, {
23009
+ code: "BOUNDARY_WALL",
23010
+ name: "BOUNDARY_WALL"
23011
+ }, {
23012
+ code: "METER_CHAMBER",
23013
+ name: "METER_CHAMBER"
23014
+ }];
23015
+ const siteFeasibilityOptions = [{
23016
+ code: "FEASIBLE",
23017
+ name: "FEASIBLE"
23018
+ }, {
23019
+ code: "NOT_FEASIBLE",
23020
+ name: "NOT_FEASIBLE"
23021
+ }, {
23022
+ code: "FEASIBLE_WITH_CONDITIONS",
23023
+ name: "FEASIBLE_WITH_CONDITIONS"
23024
+ }];
23025
+ const WSFieldInspection = () => {
23026
+ var _Digit$UserService$ge, _checklist$isLicensed2, _checklist$isConsumer2, _checklist$siteAccess2, _checklist$proposedMe2, _checklist$siteFeasib2;
23027
+ const {
23028
+ t
23029
+ } = useTranslation();
23030
+ const history = useHistory();
23031
+ const printRef = useRef();
23032
+ const loggedInUser = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
23033
+ const currentTenantId = Digit.ULBService.getCurrentTenantId() || "dl";
23034
+ const [searchKno, setSearchKno] = useState("");
23035
+ const [isSearching, setIsSearching] = useState(false);
23036
+ const [isSubmitting, setIsSubmitting] = useState(false);
23037
+ const [toast, setToast] = useState(null);
23038
+ const [dataLoaded, setDataLoaded] = useState(false);
23039
+ const [isSubmittedSuccess, setIsSubmittedSuccess] = useState(false);
23040
+ const [submittedData, setSubmittedData] = useState(null);
23041
+ const [connectionDetails, setConnectionDetails] = useState({
23042
+ ...emptyConnectionDetails,
23043
+ tenantId: currentTenantId
23044
+ });
23045
+ const [checklist, setChecklist] = useState({
23046
+ ...initialChecklist,
23047
+ siteInspectorName: (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || "",
23048
+ inspectorEmployeeId: loggedInUser !== null && loggedInUser !== void 0 && loggedInUser.id ? String(loggedInUser.id) : (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.code) || ""
23049
+ });
23050
+ const [uploadedDocuments, setUploadedDocuments] = useState([]);
23051
+ const [isUploading, setIsUploading] = useState(false);
23052
+ const [declaration, setDeclaration] = useState({
23053
+ ...initialDeclaration,
23054
+ inspectorName: (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || ""
23055
+ });
23056
+ useEffect(() => {
23057
+ setDeclaration(prev => ({
23058
+ ...prev,
23059
+ inspectorName: checklist.siteInspectorName
23060
+ }));
23061
+ }, [checklist.siteInspectorName]);
23062
+ const handleSearch = function (e) {
23063
+ try {
23064
+ if (e && e.preventDefault) e.preventDefault();
23065
+ const knoQuery = searchKno.trim();
23066
+ if (!knoQuery) {
23067
+ setToast({
23068
+ key: "warning",
23069
+ message: t("WS_ENTER_KNO_WARNING", "Please enter K Number / Connection ID")
23070
+ });
23071
+ return Promise.resolve();
23072
+ }
23073
+ setIsSearching(true);
23074
+ setToast(null);
23075
+ return Promise.resolve(_finallyRethrows(function () {
23076
+ return _catch(function () {
23077
+ const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
23078
+ const params = {
23079
+ connectionNumber: knoQuery,
23080
+ searchType: "CONNECTION",
23081
+ isConnectionSearch: true
23082
+ };
23083
+ let connection = null;
23084
+ return Promise.resolve(Digit.WSService.search({
23085
+ tenantId,
23086
+ filters: params,
23087
+ businessService: "WS"
23088
+ }).catch(() => null)).then(function (wsResponse) {
23089
+ function _temp6() {
23090
+ function _temp4() {
23091
+ function _temp2() {
23092
+ var _connection$connectio, _property, _property$owners, _property2, _property3, _connection$auditDeta, _connection$plumberIn, _addr$locality, _addDetails$siteInspe, _property4, _connection$tenantId, _connection$tenantId$, _connection$tenantId$2, _addr$locality2, _addr$locality3, _addr$additionalDetai, _addr$additionalDetai2, _property5, _property6, _property7, _property8, _property9, _property0, _property1, _property10, _property11;
23093
+ const holder = ((_connection$connectio = connection.connectionHolders) === null || _connection$connectio === void 0 ? void 0 : _connection$connectio[0]) || {};
23094
+ const owner = ((_property = property) === null || _property === void 0 ? void 0 : (_property$owners = _property.owners) === null || _property$owners === void 0 ? void 0 : _property$owners[0]) || {};
23095
+ const addr = ((_property2 = property) === null || _property2 === void 0 ? void 0 : _property2.address) || connection.address || {};
23096
+ const addDetails = connection.additionalDetails || {};
23097
+ const propAddDetails = ((_property3 = property) === null || _property3 === void 0 ? void 0 : _property3.additionalDetails) || {};
23098
+ const issuanceEpoch = addDetails.knoIssuanceDate || connection.dateEffectiveFrom || ((_connection$auditDeta = connection.auditDetails) === null || _connection$auditDeta === void 0 ? void 0 : _connection$auditDeta.createdTime);
23099
+ const formattedIssuanceDate = issuanceEpoch ? Digit.DateUtils ? Digit.DateUtils.ConvertTimestampToDate(issuanceEpoch) : new Date(issuanceEpoch).toLocaleDateString("en-IN") : "NA";
23100
+ const plumberInfo = (_connection$plumberIn = connection.plumberInfo) === null || _connection$plumberIn === void 0 ? void 0 : _connection$plumberIn[0];
23101
+ const assignedPlumber = addDetails.assignedLicensedPlumber || (plumberInfo !== null && plumberInfo !== void 0 && plumberInfo.name ? `${plumberInfo.name}${plumberInfo.licenseNo ? ` (${plumberInfo.licenseNo})` : ""}` : "NA");
23102
+ const formattedAddress = addr.addressLine1 || [addr.doorNo || addr.houseNo, addr.buildingName, addr.street, (_addr$locality = addr.locality) === null || _addr$locality === void 0 ? void 0 : _addr$locality.name].filter(Boolean).join(", ") || "NA";
23103
+ setConnectionDetails({
23104
+ kno: connection.connectionNo || knoQuery,
23105
+ applicationNo: connection.applicationNo || "NA",
23106
+ connectionNo: connection.connectionNo || knoQuery,
23107
+ tenantId: connection.tenantId || tenantId,
23108
+ status: connection.status || connection.applicationStatus || "Active",
23109
+ applicationType: connection.applicationType || "NEW_WATER_CONNECTION",
23110
+ knoIssuanceDate: formattedIssuanceDate,
23111
+ knoIssuanceDateEpoch: issuanceEpoch || null,
23112
+ zone: addDetails.zone || addr.zone || ((_addDetails$siteInspe = addDetails.siteInspection) === null || _addDetails$siteInspe === void 0 ? void 0 : _addDetails$siteInspe.zone) || "NA",
23113
+ zroOffice: addDetails.zroOffice || addDetails.zroName || addDetails.subdivision || addDetails.zroLocation || "NA",
23114
+ connectionType: connection.connectionType || "NA",
23115
+ connectionCategory: addDetails.category || addDetails.connectionCategory || connection.waterSource || ((_property4 = property) === null || _property4 === void 0 ? void 0 : _property4.propertyType) || "NA",
23116
+ applicationStatus: connection.applicationStatus || connection.status || "Active",
23117
+ assignedLicensedPlumber: assignedPlumber,
23118
+ propertyAddress: formattedAddress,
23119
+ city: addr.city || ((_connection$tenantId = connection.tenantId) === null || _connection$tenantId === void 0 ? void 0 : (_connection$tenantId$ = _connection$tenantId.split(".")) === null || _connection$tenantId$ === void 0 ? void 0 : (_connection$tenantId$2 = _connection$tenantId$[1]) === null || _connection$tenantId$2 === void 0 ? void 0 : _connection$tenantId$2.toUpperCase()) || "NA",
23120
+ pincode: addr.pincode || "NA",
23121
+ locality: ((_addr$locality2 = addr.locality) === null || _addr$locality2 === void 0 ? void 0 : _addr$locality2.name) || ((_addr$locality3 = addr.locality) === null || _addr$locality3 === void 0 ? void 0 : _addr$locality3.code) || "NA",
23122
+ subLocality: ((_addr$additionalDetai = addr.additionalDetails) === null || _addr$additionalDetai === void 0 ? void 0 : _addr$additionalDetai.subLocality) || addr.buildingName || addr.street || "NA",
23123
+ colonyCategory: propAddDetails.colonyCategory || ((_addr$additionalDetai2 = addr.additionalDetails) === null || _addr$additionalDetai2 === void 0 ? void 0 : _addr$additionalDetai2.colonyCategory) || "NA",
23124
+ propertyUse: ((_property5 = property) === null || _property5 === void 0 ? void 0 : _property5.usageCategory) || addDetails.propertyUse || ((_property6 = property) === null || _property6 === void 0 ? void 0 : _property6.propertyType) || "NA",
23125
+ ownershipType: ((_property7 = property) === null || _property7 === void 0 ? void 0 : _property7.ownershipCategory) || "NA",
23126
+ houseNo: addr.doorNo || addr.houseNo || ((_property8 = property) === null || _property8 === void 0 ? void 0 : _property8.propertyId) || "NA",
23127
+ consumerName: holder.name || owner.name || "NA",
23128
+ mobileNumber: holder.mobileNumber || owner.mobileNumber || "NA",
23129
+ emailId: holder.emailId || owner.emailId || "NA",
23130
+ applicantType: holder.type || owner.type || "NA",
23131
+ identityType: holder.relationship || owner.ownerType || "NA",
23132
+ alternateContactNumber: holder.altContactNumber || addDetails.alternateMobileNumber || owner.alternatemobilenumber || "NA",
23133
+ plotNumber: addr.plotNo || propAddDetails.plotNo || addr.doorNo || "NA",
23134
+ plotArea: (_property9 = property) !== null && _property9 !== void 0 && _property9.landArea ? String(property.landArea) : addDetails.plotArea ? String(addDetails.plotArea) : "NA",
23135
+ plotAreaUnit: propAddDetails.plotAreaUnit || addDetails.plotAreaUnit || "NA",
23136
+ numberOfFloors: (_property0 = property) !== null && _property0 !== void 0 && _property0.noOfFloors ? String(property.noOfFloors) : addDetails.noOfFloors ? String(addDetails.noOfFloors) : "NA",
23137
+ coveredArea: propAddDetails.coveredArea || (_property1 = property) !== null && _property1 !== void 0 && _property1.superBuiltUpArea ? String(propAddDetails.coveredArea || ((_property10 = property) === null || _property10 === void 0 ? void 0 : _property10.superBuiltUpArea)) : "NA",
23138
+ roadWidth: addDetails.roadWidth || propAddDetails.roadWidth ? String(addDetails.roadWidth || propAddDetails.roadWidth) : "NA",
23139
+ propertyType: ((_property11 = property) === null || _property11 === void 0 ? void 0 : _property11.propertyType) || "NA",
23140
+ buildingStatus: propAddDetails.buildingStatus || addDetails.buildingStatus || "NA",
23141
+ existingWaterConnection: addDetails.existingWaterConnection || (connection.connectionNo ? "Yes" : "No")
23142
+ });
23143
+ setDataLoaded(true);
23144
+ setToast({
23145
+ key: "success",
23146
+ message: t("WS_KNO_FETCH_SUCCESS", "KNO details fetched successfully from DJB records.")
23147
+ });
23148
+ }
23149
+ if (!connection) {
23150
+ setDataLoaded(false);
23151
+ setConnectionDetails({
23152
+ ...emptyConnectionDetails,
23153
+ tenantId
23154
+ });
23155
+ setToast({
23156
+ key: "error",
23157
+ message: t("WS_NO_CONNECTION_FOUND_ERR", "Active connection not found for the given K Number")
23158
+ });
23159
+ return;
23160
+ }
23161
+ let property = connection.property;
23162
+ const _temp = function () {
23163
+ if (!property && connection.propertyId) {
23164
+ return Promise.resolve(Digit.PTService.search({
23165
+ tenantId: connection.tenantId || tenantId,
23166
+ filters: {
23167
+ propertyIds: connection.propertyId
23168
+ },
23169
+ auth: true
23170
+ }).catch(() => null)).then(function (propertyResponse) {
23171
+ var _propertyResponse$Pro;
23172
+ property = propertyResponse === null || propertyResponse === void 0 ? void 0 : (_propertyResponse$Pro = propertyResponse.Properties) === null || _propertyResponse$Pro === void 0 ? void 0 : _propertyResponse$Pro[0];
23173
+ });
23174
+ }
23175
+ }();
23176
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
23177
+ }
23178
+ const _temp3 = function () {
23179
+ if (!connection) {
23180
+ return Promise.resolve(Digit.WSService.search({
23181
+ tenantId,
23182
+ filters: params,
23183
+ businessService: "SW"
23184
+ }).catch(() => null)).then(function (swResponse) {
23185
+ const swData = (swResponse === null || swResponse === void 0 ? void 0 : swResponse.data) || swResponse;
23186
+ if (swData !== null && swData !== void 0 && swData.SewerageConnections && swData.SewerageConnections.length > 0) {
23187
+ connection = swData.SewerageConnections[0];
23188
+ }
23189
+ });
23190
+ }
23191
+ }();
23192
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
23193
+ }
23194
+ const waterData = (wsResponse === null || wsResponse === void 0 ? void 0 : wsResponse.data) || wsResponse;
23195
+ if (waterData !== null && waterData !== void 0 && waterData.WaterConnection && waterData.WaterConnection.length > 0) {
23196
+ connection = waterData.WaterConnection.find(c => c.connectionNo === knoQuery) || waterData.WaterConnection[0];
23197
+ }
23198
+ const _temp5 = function () {
23199
+ if (!connection) {
23200
+ return Promise.resolve(Digit.WSService.search({
23201
+ tenantId,
23202
+ filters: {
23203
+ applicationNumber: knoQuery
23204
+ },
23205
+ businessService: "WS"
23206
+ }).catch(() => null)).then(function (appResponse) {
23207
+ const appData = (appResponse === null || appResponse === void 0 ? void 0 : appResponse.data) || appResponse;
23208
+ if (appData !== null && appData !== void 0 && appData.WaterConnection && appData.WaterConnection.length > 0) {
23209
+ connection = appData.WaterConnection[0];
23210
+ }
23211
+ });
23212
+ }
23213
+ }();
23214
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
23215
+ });
23216
+ }, function (err) {
23217
+ console.error("Error searching KNO:", err);
23218
+ setDataLoaded(false);
23219
+ setConnectionDetails({
23220
+ ...emptyConnectionDetails
23221
+ });
23222
+ setToast({
23223
+ key: "error",
23224
+ message: (err === null || err === void 0 ? void 0 : err.message) || t("WS_KNO_SEARCH_ERROR", "Error fetching KNO details.")
23225
+ });
23226
+ });
23227
+ }, function (_wasThrown, _result) {
23228
+ setIsSearching(false);
23229
+ if (_wasThrown) throw _result;
23230
+ return _result;
23231
+ }));
23232
+ } catch (e) {
23233
+ return Promise.reject(e);
23234
+ }
23235
+ };
23236
+ const handleChecklistChange = (field, value) => {
23237
+ setChecklist(prev => ({
23238
+ ...prev,
23239
+ [field]: value
23240
+ }));
23241
+ };
23242
+ const handleFileUpload = function (e) {
23243
+ try {
23244
+ var _e$target$files;
23245
+ const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
23246
+ if (!file) return Promise.resolve();
23247
+ if (file.size >= 5242880) {
23248
+ setToast({
23249
+ key: "error",
23250
+ message: t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED", "Maximum file size is 5MB")
23251
+ });
23252
+ return Promise.resolve();
23253
+ }
23254
+ setIsUploading(true);
23255
+ const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
23256
+ const _temp7 = _finallyRethrows(function () {
23257
+ return _catch(function () {
23258
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId)).then(function (res) {
23259
+ var _res$data, _res$data$files, _res$data$files$;
23260
+ const fileStoreId = res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$files = _res$data.files) === null || _res$data$files === void 0 ? void 0 : (_res$data$files$ = _res$data$files[0]) === null || _res$data$files$ === void 0 ? void 0 : _res$data$files$.fileStoreId;
23261
+ if (fileStoreId) {
23262
+ setUploadedDocuments(prev => [...prev, {
23263
+ documentType: "SITE_INSPECTION_PHOTO",
23264
+ fileStoreId: fileStoreId,
23265
+ documentUid: file.name,
23266
+ fileName: file.name,
23267
+ fileSize: (file.size / 1024).toFixed(1) + " KB"
23268
+ }]);
23269
+ setToast({
23270
+ key: "success",
23271
+ message: t("WS_PHOTO_UPLOAD_SUCCESS", "Photograph uploaded successfully.")
23272
+ });
23273
+ } else {
23274
+ setToast({
23275
+ key: "error",
23276
+ message: t("CS_FILE_UPLOAD_ERROR", "File upload failed.")
23277
+ });
23278
+ }
23279
+ });
23280
+ }, function (err) {
23281
+ console.error("File upload error:", err);
23282
+ setToast({
23283
+ key: "error",
23284
+ message: t("CS_FILE_UPLOAD_ERROR", "File upload failed.")
23285
+ });
23286
+ });
23287
+ }, function (_wasThrown2, _result2) {
23288
+ setIsUploading(false);
23289
+ e.target.value = null;
23290
+ if (_wasThrown2) throw _result2;
23291
+ return _result2;
23292
+ });
23293
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
23294
+ } catch (e) {
23295
+ return Promise.reject(e);
23296
+ }
23297
+ };
23298
+ const handleRemoveDocument = indexToRemove => {
23299
+ setUploadedDocuments(prev => prev.filter((_, idx) => idx !== indexToRemove));
23300
+ };
23301
+ const handleReset = () => {
23302
+ if (window.confirm(t("WS_RESET_CONFIRMATION", "Are you sure you want to reset the checklist, evidence, and declaration?"))) {
23303
+ setChecklist({
23304
+ ...initialChecklist,
23305
+ siteInspectorName: (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || "",
23306
+ inspectorEmployeeId: loggedInUser !== null && loggedInUser !== void 0 && loggedInUser.id ? String(loggedInUser.id) : (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.code) || ""
23307
+ });
23308
+ setUploadedDocuments([]);
23309
+ setDeclaration({
23310
+ ...initialDeclaration,
23311
+ inspectorName: (loggedInUser === null || loggedInUser === void 0 ? void 0 : loggedInUser.name) || ""
23312
+ });
23313
+ setToast({
23314
+ key: "info",
23315
+ message: t("WS_CHECKLIST_RESET", "Checklist and declaration have been reset.")
23316
+ });
23317
+ }
23318
+ };
23319
+ const handlePrint = () => {
23320
+ const printElement = document.getElementById("field-inspection-printable-document");
23321
+ if (!printElement) {
23322
+ window.print();
23323
+ return;
23324
+ }
23325
+ try {
23326
+ let iframe = document.getElementById("field-inspection-print-frame");
23327
+ if (iframe && iframe.parentNode) {
23328
+ iframe.parentNode.removeChild(iframe);
23329
+ }
23330
+ iframe = document.createElement("iframe");
23331
+ iframe.id = "field-inspection-print-frame";
23332
+ iframe.style.position = "fixed";
23333
+ iframe.style.right = "0";
23334
+ iframe.style.bottom = "0";
23335
+ iframe.style.width = "0";
23336
+ iframe.style.height = "0";
23337
+ iframe.style.border = "0";
23338
+ iframe.style.zIndex = "-9999";
23339
+ document.body.appendChild(iframe);
23340
+ const pri = iframe.contentWindow;
23341
+ pri.document.open();
23342
+ pri.document.write(`
23343
+ <!DOCTYPE html>
23344
+ <html>
23345
+ <head>
23346
+ <meta charset="utf-8" />
23347
+ <title>DJB Site Inspection Form - ${connectionDetails.kno || connectionDetails.connectionNo || searchKno || "Water Connection"}</title>
23348
+ <style>
23349
+ @page {
23350
+ size: A4 portrait;
23351
+ margin: 10mm 12mm;
23352
+ }
23353
+ * {
23354
+ box-sizing: border-box;
23355
+ -webkit-print-color-adjust: exact !important;
23356
+ print-color-adjust: exact !important;
23357
+ }
23358
+ body {
23359
+ font-family: Arial, Helvetica, sans-serif;
23360
+ color: #111111;
23361
+ margin: 0;
23362
+ padding: 0;
23363
+ font-size: 9.5pt;
23364
+ line-height: 1.35;
23365
+ background: #ffffff;
23366
+ }
23367
+ .print-header {
23368
+ text-align: center;
23369
+ border-bottom: 2px solid #003366;
23370
+ padding-bottom: 8px;
23371
+ margin-bottom: 12px;
23372
+ }
23373
+ .print-header h1 {
23374
+ font-size: 15pt;
23375
+ font-weight: bold;
23376
+ margin: 0 0 3px 0;
23377
+ color: #003366;
23378
+ }
23379
+ .print-header h2 {
23380
+ font-size: 11.5pt;
23381
+ font-weight: bold;
23382
+ margin: 0 0 3px 0;
23383
+ color: #222222;
23384
+ }
23385
+ .print-header .subtitle {
23386
+ font-size: 9pt;
23387
+ color: #555555;
23388
+ }
23389
+ .print-header .meta-bar {
23390
+ display: flex;
23391
+ justify-content: space-between;
23392
+ margin-top: 6px;
23393
+ font-size: 8.5pt;
23394
+ border-top: 1px solid #dddddd;
23395
+ padding-top: 4px;
23396
+ }
23397
+ .print-section {
23398
+ margin-bottom: 10px;
23399
+ page-break-inside: avoid;
23400
+ break-inside: avoid;
23401
+ }
23402
+ .print-section-header {
23403
+ background-color: #003366 !important;
23404
+ color: #ffffff !important;
23405
+ font-weight: bold;
23406
+ font-size: 9.5pt;
23407
+ padding: 4px 8px;
23408
+ margin-bottom: 4px;
23409
+ -webkit-print-color-adjust: exact !important;
23410
+ print-color-adjust: exact !important;
23411
+ }
23412
+ .print-table {
23413
+ width: 100%;
23414
+ border-collapse: collapse;
23415
+ margin-bottom: 4px;
23416
+ font-size: 8.5pt;
23417
+ }
23418
+ .print-table th, .print-table td {
23419
+ border: 1px solid #333333;
23420
+ padding: 4px 6px;
23421
+ vertical-align: top;
23422
+ }
23423
+ .print-label {
23424
+ font-weight: bold;
23425
+ background-color: #f7f7f7 !important;
23426
+ color: #222222;
23427
+ -webkit-print-color-adjust: exact !important;
23428
+ print-color-adjust: exact !important;
23429
+ }
23430
+ .print-value {
23431
+ color: #111111;
23432
+ word-break: break-word;
23433
+ }
23434
+ </style>
23435
+ </head>
23436
+ <body>
23437
+ ${printElement.innerHTML}
23438
+ </body>
23439
+ </html>
23440
+ `);
23441
+ pri.document.close();
23442
+ setTimeout(() => {
23443
+ pri.focus();
23444
+ pri.print();
23445
+ setTimeout(() => {
23446
+ if (iframe && iframe.parentNode) {
23447
+ iframe.parentNode.removeChild(iframe);
23448
+ }
23449
+ }, 1500);
23450
+ }, 300);
23451
+ } catch (e) {
23452
+ console.warn("Iframe print fallback triggered:", e);
23453
+ window.print();
23454
+ }
23455
+ };
23456
+ const handleSubmit = function () {
23457
+ try {
23458
+ var _checklist$siteInspec, _checklist$siteInspec2, _checklist$isLicensed, _checklist$isConsumer, _checklist$siteAccess, _checklist$proposedMe, _checklist$siteFeasib;
23459
+ if (!dataLoaded) {
23460
+ setToast({
23461
+ key: "error",
23462
+ message: t("WS_LOAD_KNO_FIRST", "Please search and load a valid KNO record first.")
23463
+ });
23464
+ return Promise.resolve();
23465
+ }
23466
+ if (!checklist.inspectionDate) {
23467
+ setToast({
23468
+ key: "error",
23469
+ message: t("WS_REQ_INSPECTION_DATE", "Please specify the Inspection Date.")
23470
+ });
23471
+ return Promise.resolve();
23472
+ }
23473
+ if (!checklist.inspectionTime) {
23474
+ setToast({
23475
+ key: "error",
23476
+ message: t("WS_REQ_INSPECTION_TIME", "Please specify the Inspection Time.")
23477
+ });
23478
+ return Promise.resolve();
23479
+ }
23480
+ if (!((_checklist$siteInspec = checklist.siteInspectorName) !== null && _checklist$siteInspec !== void 0 && _checklist$siteInspec.trim())) {
23481
+ setToast({
23482
+ key: "error",
23483
+ message: t("WS_REQ_INSPECTOR_NAME", "Please enter Site Inspector Name.")
23484
+ });
23485
+ return Promise.resolve();
23486
+ }
23487
+ if (!((_checklist$siteInspec2 = checklist.siteInspectorRemarks) !== null && _checklist$siteInspec2 !== void 0 && _checklist$siteInspec2.trim())) {
23488
+ setToast({
23489
+ key: "error",
23490
+ message: t("WS_REQ_INSPECTOR_REMARKS", "Please enter Site Inspector Observations / Remarks.")
23491
+ });
23492
+ return Promise.resolve();
23493
+ }
23494
+ if (uploadedDocuments.length === 0) {
23495
+ setToast({
23496
+ key: "error",
23497
+ message: t("WS_REQ_EVIDENCE_PHOTO", "Please upload at least one Site Photograph evidence.")
23498
+ });
23499
+ return Promise.resolve();
23500
+ }
23501
+ if (!declaration.agreed) {
23502
+ setToast({
23503
+ key: "error",
23504
+ message: t("WS_REQ_DECLARATION_AGREE", "Please accept the Declaration before submitting the report.")
23505
+ });
23506
+ return Promise.resolve();
23507
+ }
23508
+ setIsSubmitting(true);
23509
+ setToast(null);
23510
+ const inspectionDateEpoch = new Date(checklist.inspectionDate).getTime() || Date.now();
23511
+ const submissionDateEpoch = new Date(declaration.submissionDate).getTime() || Date.now();
23512
+ const knoIssuanceEpoch = connectionDetails.knoIssuanceDateEpoch || Date.now();
23513
+ const docsPayload = uploadedDocuments.map(doc => ({
23514
+ documentType: doc.documentType || "SITE_INSPECTION_PHOTO",
23515
+ fileStoreId: doc.fileStoreId,
23516
+ documentUid: doc.documentUid || doc.fileName || "property_frontage.jpg"
23517
+ }));
23518
+ const submitPayload = {
23519
+ WaterConnection: {
23520
+ applicationNo: connectionDetails.applicationNo,
23521
+ connectionNo: connectionDetails.connectionNo,
23522
+ tenantId: connectionDetails.tenantId,
23523
+ status: connectionDetails.status || "Active",
23524
+ applicationType: connectionDetails.applicationType || "NEW_WATER_CONNECTION",
23525
+ inspectionInformation: {
23526
+ inspectionType: {
23527
+ code: "SITE_INSPECTION",
23528
+ i18nKey: "WS_SITE_INSPECTION"
23529
+ },
23530
+ inspectionDate: inspectionDateEpoch,
23531
+ inspectorName: checklist.siteInspectorName
23532
+ },
23533
+ documents: docsPayload,
23534
+ additionalDetails: {
23535
+ siteInspection: {
23536
+ knoIssuanceDate: knoIssuanceEpoch,
23537
+ zone: connectionDetails.zone,
23538
+ zroOffice: connectionDetails.zroOffice,
23539
+ assignedLicensedPlumber: connectionDetails.assignedLicensedPlumber,
23540
+ inspectionTime: checklist.inspectionTime,
23541
+ inspectorEmployeeId: checklist.inspectorEmployeeId,
23542
+ isLicensedPlumberPresent: ((_checklist$isLicensed = checklist.isLicensedPlumberPresent) === null || _checklist$isLicensed === void 0 ? void 0 : _checklist$isLicensed.code) || checklist.isLicensedPlumberPresent,
23543
+ isConsumerRepresentativePresent: ((_checklist$isConsumer = checklist.isConsumerRepresentativePresent) === null || _checklist$isConsumer === void 0 ? void 0 : _checklist$isConsumer.code) || checklist.isConsumerRepresentativePresent,
23544
+ checklist: {
23545
+ consumerIdentityVerified: !!checklist.consumerIdentityVerified,
23546
+ knoDetailsMatched: !!checklist.knoDetailsMatched,
23547
+ propertyAddressVerified: !!checklist.propertyAddressVerified,
23548
+ localityColonyVerified: !!checklist.localityColonyVerified,
23549
+ propertyUseVerified: !!checklist.propertyUseVerified,
23550
+ plotDetailsVerified: !!checklist.plotDetailsVerified,
23551
+ existingWaterConnectionChecked: !!checklist.existingWaterConnectionChecked,
23552
+ proposedConnectionPointIdentified: !!checklist.proposedConnectionPointIdentified,
23553
+ waterMainAndRoadAccessFeasible: !!checklist.waterMainAndRoadAccessFeasible,
23554
+ meterLocationIdentifiedAndAccessible: !!checklist.meterLocationIdentifiedAndAccessible,
23555
+ licensedPlumberVerified: !!checklist.licensedPlumberVerified,
23556
+ siteConditionsMatchedApplication: !!checklist.siteConditionsMatchedApplication
23557
+ },
23558
+ siteAccessibility: ((_checklist$siteAccess = checklist.siteAccessibility) === null || _checklist$siteAccess === void 0 ? void 0 : _checklist$siteAccess.code) || checklist.siteAccessibility,
23559
+ proposedMeterLocation: ((_checklist$proposedMe = checklist.proposedMeterLocation) === null || _checklist$proposedMe === void 0 ? void 0 : _checklist$proposedMe.code) || checklist.proposedMeterLocation,
23560
+ siteFeasibilityObserved: ((_checklist$siteFeasib = checklist.siteFeasibilityObserved) === null || _checklist$siteFeasib === void 0 ? void 0 : _checklist$siteFeasib.code) || checklist.siteFeasibilityObserved,
23561
+ siteInspectorRemarks: checklist.siteInspectorRemarks,
23562
+ declaration: {
23563
+ agreed: !!declaration.agreed,
23564
+ inspectorName: declaration.inspectorName || checklist.siteInspectorName,
23565
+ submissionDate: submissionDateEpoch
23566
+ }
23567
+ }
23568
+ }
23569
+ }
23570
+ };
23571
+ const _temp12 = _finallyRethrows(function () {
23572
+ return _catch(function () {
23573
+ function _temp11() {
23574
+ function _temp1() {
23575
+ var _response, _response2;
23576
+ setSubmittedData({
23577
+ ...submitPayload.WaterConnection,
23578
+ responseInfo: ((_response = response) === null || _response === void 0 ? void 0 : _response.ResponseInfo) || ((_response2 = response) === null || _response2 === void 0 ? void 0 : _response2.responseInfo)
23579
+ });
23580
+ setIsSubmittedSuccess(true);
23581
+ setToast({
23582
+ key: "success",
23583
+ message: t("WS_SITE_INSPECTION_SUCCESS", "Site Inspection report submitted successfully!")
23584
+ });
23585
+ }
23586
+ const _temp0 = function (_Digit, _Digit$CustomService) {
23587
+ if (!response && (_Digit = Digit) !== null && _Digit !== void 0 && (_Digit$CustomService = _Digit.CustomService) !== null && _Digit$CustomService !== void 0 && _Digit$CustomService.getResponse) {
23588
+ const _temp9 = _catch(function () {
23589
+ return Promise.resolve(Digit.CustomService.getResponse({
23590
+ url: "/ws-services/wc/site-inspection/_submit",
23591
+ data: submitPayload
23592
+ })).then(function (_Digit$CustomService$) {
23593
+ response = _Digit$CustomService$;
23594
+ });
23595
+ }, function (gatewayErr) {
23596
+ console.warn("Gateway endpoint call failed, attempting direct path:", gatewayErr);
23597
+ return Promise.resolve(Digit.CustomService.getResponse({
23598
+ url: "/site-inspection/_submit",
23599
+ data: submitPayload
23600
+ })).then(function (_Digit$CustomService$2) {
23601
+ response = _Digit$CustomService$2;
23602
+ });
23603
+ });
23604
+ if (_temp9 && _temp9.then) return _temp9.then(function () {});
23605
+ }
23606
+ }();
23607
+ return _temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0);
23608
+ }
23609
+ let response = null;
23610
+ const _temp10 = function (_Digit2, _Digit2$WSService) {
23611
+ if ((_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$WSService = _Digit2.WSService) !== null && _Digit2$WSService !== void 0 && _Digit2$WSService.submitSiteInspection) {
23612
+ const _temp8 = _catch(function () {
23613
+ return Promise.resolve(Digit.WSService.submitSiteInspection(submitPayload)).then(function (_Digit$WSService$subm) {
23614
+ response = _Digit$WSService$subm;
23615
+ });
23616
+ }, function (apiErr) {
23617
+ console.warn("WSService.submitSiteInspection error:", apiErr);
23618
+ });
23619
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
23620
+ }
23621
+ }();
23622
+ return _temp10 && _temp10.then ? _temp10.then(_temp11) : _temp11(_temp10);
23623
+ }, function (err) {
23624
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
23625
+ console.error("Error submitting site inspection:", err);
23626
+ setToast({
23627
+ key: "error",
23628
+ message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || (err === null || err === void 0 ? void 0 : err.message) || t("WS_SUBMISSION_ERROR", "Submission failed. Please try again.")
23629
+ });
23630
+ });
23631
+ }, function (_wasThrown3, _result3) {
23632
+ setIsSubmitting(false);
23633
+ if (_wasThrown3) throw _result3;
23634
+ return _result3;
23635
+ });
23636
+ return Promise.resolve(_temp12 && _temp12.then ? _temp12.then(function () {}) : void 0);
23637
+ } catch (e) {
23638
+ return Promise.reject(e);
23639
+ }
23640
+ };
23641
+ const grid3Style = {
23642
+ display: "grid",
23643
+ gridTemplateColumns: "repeat(auto-fit, minmax(280px, 1fr))",
23644
+ gap: "16px 20px",
23645
+ marginTop: "12px",
23646
+ marginBottom: "16px"
23647
+ };
23648
+ const grid2Style = {
23649
+ display: "grid",
23650
+ gridTemplateColumns: "repeat(auto-fit, minmax(320px, 1fr))",
23651
+ gap: "16px 24px",
23652
+ marginTop: "16px",
23653
+ marginBottom: "16px"
23654
+ };
23655
+ const checklistItems = [{
23656
+ label: "Consumer identity / applicant details verified at site",
23657
+ key: "consumerIdentityVerified"
23658
+ }, {
23659
+ label: "KNO and application details matched",
23660
+ key: "knoDetailsMatched"
23661
+ }, {
23662
+ label: "Property address and premises location verified",
23663
+ key: "propertyAddressVerified"
23664
+ }, {
23665
+ label: "Locality / colony details verified",
23666
+ key: "localityColonyVerified"
23667
+ }, {
23668
+ label: "Property use and category verified",
23669
+ key: "propertyUseVerified"
23670
+ }, {
23671
+ label: "Plot details / area verified at site",
23672
+ key: "plotDetailsVerified"
23673
+ }, {
23674
+ label: "Existing water connection / service line checked",
23675
+ key: "existingWaterConnectionChecked"
23676
+ }, {
23677
+ label: "Proposed connection point identified",
23678
+ key: "proposedConnectionPointIdentified"
23679
+ }, {
23680
+ label: "Water main and road access feasibility checked",
23681
+ key: "waterMainAndRoadAccessFeasible"
23682
+ }, {
23683
+ label: "Meter installation location identified and accessible",
23684
+ key: "meterLocationIdentifiedAndAccessible"
23685
+ }, {
23686
+ label: "Licensed plumber details / authorization verified",
23687
+ key: "licensedPlumberVerified"
23688
+ }, {
23689
+ label: "Site conditions match application details",
23690
+ key: "siteConditionsMatchedApplication"
23691
+ }];
23692
+ const plumberPresentValue = ((_checklist$isLicensed2 = checklist.isLicensedPlumberPresent) === null || _checklist$isLicensed2 === void 0 ? void 0 : _checklist$isLicensed2.name) || checklist.isLicensedPlumberPresent || "NA";
23693
+ const consumerPresentValue = ((_checklist$isConsumer2 = checklist.isConsumerRepresentativePresent) === null || _checklist$isConsumer2 === void 0 ? void 0 : _checklist$isConsumer2.name) || checklist.isConsumerRepresentativePresent || "NA";
23694
+ const accessibilityValue = ((_checklist$siteAccess2 = checklist.siteAccessibility) === null || _checklist$siteAccess2 === void 0 ? void 0 : _checklist$siteAccess2.name) || checklist.siteAccessibility || "NA";
23695
+ const meterLocValue = ((_checklist$proposedMe2 = checklist.proposedMeterLocation) === null || _checklist$proposedMe2 === void 0 ? void 0 : _checklist$proposedMe2.name) || checklist.proposedMeterLocation || "NA";
23696
+ const feasibilityValue = ((_checklist$siteFeasib2 = checklist.siteFeasibilityObserved) === null || _checklist$siteFeasib2 === void 0 ? void 0 : _checklist$siteFeasib2.name) || checklist.siteFeasibilityObserved || "NA";
23697
+ const renderPrintView = () => /*#__PURE__*/React.createElement("div", {
23698
+ id: "field-inspection-printable-document",
23699
+ className: "field-inspection-print-view",
23700
+ ref: printRef
23701
+ }, /*#__PURE__*/React.createElement("div", {
23702
+ className: "print-header",
23703
+ style: {
23704
+ textAlign: "center",
23705
+ borderBottom: "2px solid #003366",
23706
+ paddingBottom: "10px",
23707
+ marginBottom: "12px"
23708
+ }
23709
+ }, /*#__PURE__*/React.createElement("h1", {
23710
+ style: {
23711
+ fontSize: "16pt",
23712
+ fontWeight: "bold",
23713
+ margin: "0 0 4px 0",
23714
+ color: "#003366"
23715
+ }
23716
+ }, "DELHI JAL BOARD : GOVT. OF NCT OF DELHI"), /*#__PURE__*/React.createElement("h2", {
23717
+ style: {
23718
+ fontSize: "12pt",
23719
+ fontWeight: "bold",
23720
+ margin: "0 0 4px 0",
23721
+ color: "#222"
23722
+ }
23723
+ }, "SITE INSPECTION REPORT \u2013 NEW WATER CONNECTION"), /*#__PURE__*/React.createElement("div", {
23724
+ className: "subtitle",
23725
+ style: {
23726
+ fontSize: "9.5pt",
23727
+ color: "#555"
23728
+ }
23729
+ }, "Post KNO Issuance | Physical Field Inspection Assessment Form"), /*#__PURE__*/React.createElement("div", {
23730
+ className: "meta-bar",
23731
+ style: {
23732
+ display: "flex",
23733
+ justifyContent: "space-between",
23734
+ marginTop: "8px",
23735
+ fontSize: "9pt",
23736
+ borderTop: "1px solid #ddd",
23737
+ paddingTop: "4px"
23738
+ }
23739
+ }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, "Application No:"), " ", connectionDetails.applicationNo || "NA"), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, "KNO / Connection No:"), " ", connectionDetails.kno || connectionDetails.connectionNo || searchKno || "NA"), /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("strong", null, "Report Date:"), " ", new Date().toLocaleDateString("en-IN")))), /*#__PURE__*/React.createElement("div", {
23740
+ className: "print-section print-avoid-break"
23741
+ }, /*#__PURE__*/React.createElement("div", {
23742
+ className: "print-section-header"
23743
+ }, "1. SEARCH KNO & RECORD IDENTIFICATION"), /*#__PURE__*/React.createElement("table", {
23744
+ className: "print-table"
23745
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23746
+ className: "print-label",
23747
+ style: {
23748
+ width: "18%"
23749
+ }
23750
+ }, "Searched KNO:"), /*#__PURE__*/React.createElement("td", {
23751
+ className: "print-value",
23752
+ style: {
23753
+ width: "32%"
23754
+ }
23755
+ }, searchKno || connectionDetails.kno || "NA"), /*#__PURE__*/React.createElement("td", {
23756
+ className: "print-label",
23757
+ style: {
23758
+ width: "18%"
23759
+ }
23760
+ }, "Record Retrieval:"), /*#__PURE__*/React.createElement("td", {
23761
+ className: "print-value",
23762
+ style: {
23763
+ width: "32%"
23764
+ }
23765
+ }, dataLoaded ? "RECORD RETRIEVED FROM DJB DATABASE (VERIFIED)" : "MANUAL INSPECTION ENTRY"))))), /*#__PURE__*/React.createElement("div", {
23766
+ className: "print-section print-avoid-break"
23767
+ }, /*#__PURE__*/React.createElement("div", {
23768
+ className: "print-section-header"
23769
+ }, "2. KNO ISSUANCE DETAILS"), /*#__PURE__*/React.createElement("table", {
23770
+ className: "print-table"
23771
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23772
+ className: "print-label",
23773
+ style: {
23774
+ width: "16%"
23775
+ }
23776
+ }, "KNO:"), /*#__PURE__*/React.createElement("td", {
23777
+ className: "print-value",
23778
+ style: {
23779
+ width: "17%"
23780
+ }
23781
+ }, connectionDetails.kno || "NA"), /*#__PURE__*/React.createElement("td", {
23782
+ className: "print-label",
23783
+ style: {
23784
+ width: "16%"
23785
+ }
23786
+ }, "Application No:"), /*#__PURE__*/React.createElement("td", {
23787
+ className: "print-value",
23788
+ style: {
23789
+ width: "17%"
23790
+ }
23791
+ }, connectionDetails.applicationNo || "NA"), /*#__PURE__*/React.createElement("td", {
23792
+ className: "print-label",
23793
+ style: {
23794
+ width: "17%"
23795
+ }
23796
+ }, "KNO Issuance Date:"), /*#__PURE__*/React.createElement("td", {
23797
+ className: "print-value",
23798
+ style: {
23799
+ width: "17%"
23800
+ }
23801
+ }, connectionDetails.knoIssuanceDate || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23802
+ className: "print-label"
23803
+ }, "Zone:"), /*#__PURE__*/React.createElement("td", {
23804
+ className: "print-value"
23805
+ }, connectionDetails.zone || "NA"), /*#__PURE__*/React.createElement("td", {
23806
+ className: "print-label"
23807
+ }, "ZRO Name / Office:"), /*#__PURE__*/React.createElement("td", {
23808
+ className: "print-value"
23809
+ }, connectionDetails.zroOffice || "NA"), /*#__PURE__*/React.createElement("td", {
23810
+ className: "print-label"
23811
+ }, "Connection Type:"), /*#__PURE__*/React.createElement("td", {
23812
+ className: "print-value"
23813
+ }, connectionDetails.connectionType || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23814
+ className: "print-label"
23815
+ }, "Category:"), /*#__PURE__*/React.createElement("td", {
23816
+ className: "print-value"
23817
+ }, connectionDetails.connectionCategory || "NA"), /*#__PURE__*/React.createElement("td", {
23818
+ className: "print-label"
23819
+ }, "Status:"), /*#__PURE__*/React.createElement("td", {
23820
+ className: "print-value"
23821
+ }, connectionDetails.applicationStatus || "NA"), /*#__PURE__*/React.createElement("td", {
23822
+ className: "print-label"
23823
+ }, "Assigned Plumber:"), /*#__PURE__*/React.createElement("td", {
23824
+ className: "print-value"
23825
+ }, connectionDetails.assignedLicensedPlumber || "NA"))))), /*#__PURE__*/React.createElement("div", {
23826
+ className: "print-section print-avoid-break"
23827
+ }, /*#__PURE__*/React.createElement("div", {
23828
+ className: "print-section-header"
23829
+ }, "3. PROPERTY DETAILS"), /*#__PURE__*/React.createElement("table", {
23830
+ className: "print-table"
23831
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23832
+ className: "print-label",
23833
+ style: {
23834
+ width: "16%"
23835
+ }
23836
+ }, "Property Address:"), /*#__PURE__*/React.createElement("td", {
23837
+ className: "print-value",
23838
+ colSpan: 3
23839
+ }, connectionDetails.propertyAddress || "NA"), /*#__PURE__*/React.createElement("td", {
23840
+ className: "print-label",
23841
+ style: {
23842
+ width: "17%"
23843
+ }
23844
+ }, "City / PIN:"), /*#__PURE__*/React.createElement("td", {
23845
+ className: "print-value",
23846
+ style: {
23847
+ width: "17%"
23848
+ }
23849
+ }, `${connectionDetails.city || "Delhi"} - ${connectionDetails.pincode || "NA"}`)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23850
+ className: "print-label"
23851
+ }, "Locality:"), /*#__PURE__*/React.createElement("td", {
23852
+ className: "print-value"
23853
+ }, connectionDetails.locality || "NA"), /*#__PURE__*/React.createElement("td", {
23854
+ className: "print-label"
23855
+ }, "Sub Locality:"), /*#__PURE__*/React.createElement("td", {
23856
+ className: "print-value"
23857
+ }, connectionDetails.subLocality || "NA"), /*#__PURE__*/React.createElement("td", {
23858
+ className: "print-label"
23859
+ }, "Colony Category:"), /*#__PURE__*/React.createElement("td", {
23860
+ className: "print-value"
23861
+ }, connectionDetails.colonyCategory || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23862
+ className: "print-label"
23863
+ }, "Property Use:"), /*#__PURE__*/React.createElement("td", {
23864
+ className: "print-value"
23865
+ }, connectionDetails.propertyUse || "NA"), /*#__PURE__*/React.createElement("td", {
23866
+ className: "print-label"
23867
+ }, "Ownership Type:"), /*#__PURE__*/React.createElement("td", {
23868
+ className: "print-value"
23869
+ }, connectionDetails.ownershipType || "NA"), /*#__PURE__*/React.createElement("td", {
23870
+ className: "print-label"
23871
+ }, "House / Prop No:"), /*#__PURE__*/React.createElement("td", {
23872
+ className: "print-value"
23873
+ }, connectionDetails.houseNo || "NA"))))), /*#__PURE__*/React.createElement("div", {
23874
+ className: "print-section print-avoid-break"
23875
+ }, /*#__PURE__*/React.createElement("div", {
23876
+ className: "print-section-header"
23877
+ }, "4. CONSUMER / APPLICANT DETAILS"), /*#__PURE__*/React.createElement("table", {
23878
+ className: "print-table"
23879
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23880
+ className: "print-label",
23881
+ style: {
23882
+ width: "16%"
23883
+ }
23884
+ }, "Consumer Name:"), /*#__PURE__*/React.createElement("td", {
23885
+ className: "print-value",
23886
+ style: {
23887
+ width: "17%"
23888
+ }
23889
+ }, connectionDetails.consumerName || "NA"), /*#__PURE__*/React.createElement("td", {
23890
+ className: "print-label",
23891
+ style: {
23892
+ width: "16%"
23893
+ }
23894
+ }, "Mobile Number:"), /*#__PURE__*/React.createElement("td", {
23895
+ className: "print-value",
23896
+ style: {
23897
+ width: "17%"
23898
+ }
23899
+ }, connectionDetails.mobileNumber || "NA"), /*#__PURE__*/React.createElement("td", {
23900
+ className: "print-label",
23901
+ style: {
23902
+ width: "17%"
23903
+ }
23904
+ }, "Email ID:"), /*#__PURE__*/React.createElement("td", {
23905
+ className: "print-value",
23906
+ style: {
23907
+ width: "17%"
23908
+ }
23909
+ }, connectionDetails.emailId || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23910
+ className: "print-label"
23911
+ }, "Applicant Type:"), /*#__PURE__*/React.createElement("td", {
23912
+ className: "print-value"
23913
+ }, connectionDetails.applicantType || "NA"), /*#__PURE__*/React.createElement("td", {
23914
+ className: "print-label"
23915
+ }, "Identity Type:"), /*#__PURE__*/React.createElement("td", {
23916
+ className: "print-value"
23917
+ }, connectionDetails.identityType || "NA"), /*#__PURE__*/React.createElement("td", {
23918
+ className: "print-label"
23919
+ }, "Alt Contact No:"), /*#__PURE__*/React.createElement("td", {
23920
+ className: "print-value"
23921
+ }, connectionDetails.alternateContactNumber || "NA"))))), /*#__PURE__*/React.createElement("div", {
23922
+ className: "print-section print-avoid-break"
23923
+ }, /*#__PURE__*/React.createElement("div", {
23924
+ className: "print-section-header"
23925
+ }, "5. PLOT & PREMISES DETAILS"), /*#__PURE__*/React.createElement("table", {
23926
+ className: "print-table"
23927
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23928
+ className: "print-label",
23929
+ style: {
23930
+ width: "16%"
23931
+ }
23932
+ }, "Plot Number:"), /*#__PURE__*/React.createElement("td", {
23933
+ className: "print-value",
23934
+ style: {
23935
+ width: "17%"
23936
+ }
23937
+ }, connectionDetails.plotNumber || "NA"), /*#__PURE__*/React.createElement("td", {
23938
+ className: "print-label",
23939
+ style: {
23940
+ width: "16%"
23941
+ }
23942
+ }, "Plot Area:"), /*#__PURE__*/React.createElement("td", {
23943
+ className: "print-value",
23944
+ style: {
23945
+ width: "17%"
23946
+ }
23947
+ }, connectionDetails.plotArea ? `${connectionDetails.plotArea} ${connectionDetails.plotAreaUnit || ""}` : "NA"), /*#__PURE__*/React.createElement("td", {
23948
+ className: "print-label",
23949
+ style: {
23950
+ width: "17%"
23951
+ }
23952
+ }, "No. of Floors:"), /*#__PURE__*/React.createElement("td", {
23953
+ className: "print-value",
23954
+ style: {
23955
+ width: "17%"
23956
+ }
23957
+ }, connectionDetails.numberOfFloors || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23958
+ className: "print-label"
23959
+ }, "Covered Area:"), /*#__PURE__*/React.createElement("td", {
23960
+ className: "print-value"
23961
+ }, connectionDetails.coveredArea || "NA"), /*#__PURE__*/React.createElement("td", {
23962
+ className: "print-label"
23963
+ }, "Road Width:"), /*#__PURE__*/React.createElement("td", {
23964
+ className: "print-value"
23965
+ }, connectionDetails.roadWidth || "NA"), /*#__PURE__*/React.createElement("td", {
23966
+ className: "print-label"
23967
+ }, "Property Type:"), /*#__PURE__*/React.createElement("td", {
23968
+ className: "print-value"
23969
+ }, connectionDetails.propertyType || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23970
+ className: "print-label"
23971
+ }, "Building Status:"), /*#__PURE__*/React.createElement("td", {
23972
+ className: "print-value"
23973
+ }, connectionDetails.buildingStatus || "NA"), /*#__PURE__*/React.createElement("td", {
23974
+ className: "print-label"
23975
+ }, "Existing Water Conn:"), /*#__PURE__*/React.createElement("td", {
23976
+ className: "print-value",
23977
+ colSpan: 3
23978
+ }, connectionDetails.existingWaterConnection || "NA"))))), /*#__PURE__*/React.createElement("div", {
23979
+ className: "print-section print-avoid-break"
23980
+ }, /*#__PURE__*/React.createElement("div", {
23981
+ className: "print-section-header"
23982
+ }, "6. SITE INSPECTION CHECKLIST & OBSERVATIONS"), /*#__PURE__*/React.createElement("table", {
23983
+ className: "print-table"
23984
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
23985
+ className: "print-label",
23986
+ style: {
23987
+ width: "16%"
23988
+ }
23989
+ }, "Inspection Date:"), /*#__PURE__*/React.createElement("td", {
23990
+ className: "print-value",
23991
+ style: {
23992
+ width: "17%"
23993
+ }
23994
+ }, checklist.inspectionDate || "NA"), /*#__PURE__*/React.createElement("td", {
23995
+ className: "print-label",
23996
+ style: {
23997
+ width: "16%"
23998
+ }
23999
+ }, "Inspection Time:"), /*#__PURE__*/React.createElement("td", {
24000
+ className: "print-value",
24001
+ style: {
24002
+ width: "17%"
24003
+ }
24004
+ }, checklist.inspectionTime || "NA"), /*#__PURE__*/React.createElement("td", {
24005
+ className: "print-label",
24006
+ style: {
24007
+ width: "17%"
24008
+ }
24009
+ }, "Inspector Name:"), /*#__PURE__*/React.createElement("td", {
24010
+ className: "print-value",
24011
+ style: {
24012
+ width: "17%"
24013
+ }
24014
+ }, checklist.siteInspectorName || "NA")), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
24015
+ className: "print-label"
24016
+ }, "Inspector Emp ID:"), /*#__PURE__*/React.createElement("td", {
24017
+ className: "print-value"
24018
+ }, checklist.inspectorEmployeeId || "NA"), /*#__PURE__*/React.createElement("td", {
24019
+ className: "print-label"
24020
+ }, "Plumber Present:"), /*#__PURE__*/React.createElement("td", {
24021
+ className: "print-value"
24022
+ }, plumberPresentValue), /*#__PURE__*/React.createElement("td", {
24023
+ className: "print-label"
24024
+ }, "Consumer Present:"), /*#__PURE__*/React.createElement("td", {
24025
+ className: "print-value"
24026
+ }, consumerPresentValue)))), /*#__PURE__*/React.createElement("div", {
24027
+ style: {
24028
+ marginTop: "6px",
24029
+ fontWeight: "bold",
24030
+ fontSize: "9.5pt"
24031
+ }
24032
+ }, "Checklist Verification Criteria:"), /*#__PURE__*/React.createElement("table", {
24033
+ className: "print-table",
24034
+ style: {
24035
+ marginTop: "4px"
24036
+ }
24037
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", {
24038
+ style: {
24039
+ backgroundColor: "#f0f0f0"
24040
+ }
24041
+ }, /*#__PURE__*/React.createElement("th", {
24042
+ style: {
24043
+ width: "6%",
24044
+ textAlign: "center"
24045
+ }
24046
+ }, "S.No"), /*#__PURE__*/React.createElement("th", {
24047
+ style: {
24048
+ width: "68%",
24049
+ textAlign: "left"
24050
+ }
24051
+ }, "Inspection Checklist Item"), /*#__PURE__*/React.createElement("th", {
24052
+ style: {
24053
+ width: "26%",
24054
+ textAlign: "center"
24055
+ }
24056
+ }, "Verification Status"))), /*#__PURE__*/React.createElement("tbody", null, checklistItems.map((item, idx) => /*#__PURE__*/React.createElement("tr", {
24057
+ key: idx
24058
+ }, /*#__PURE__*/React.createElement("td", {
24059
+ style: {
24060
+ textAlign: "center"
24061
+ }
24062
+ }, idx + 1), /*#__PURE__*/React.createElement("td", null, item.label), /*#__PURE__*/React.createElement("td", {
24063
+ style: {
24064
+ textAlign: "center",
24065
+ fontWeight: "bold"
24066
+ }
24067
+ }, checklist[item.key] ? /*#__PURE__*/React.createElement("span", {
24068
+ style: {
24069
+ color: "#006600"
24070
+ }
24071
+ }, "[\u2713] YES (Verified)") : /*#__PURE__*/React.createElement("span", {
24072
+ style: {
24073
+ color: "#555555"
24074
+ }
24075
+ }, "[ ] NO (Not Verified)")))))), /*#__PURE__*/React.createElement("table", {
24076
+ className: "print-table",
24077
+ style: {
24078
+ marginTop: "6px"
24079
+ }
24080
+ }, /*#__PURE__*/React.createElement("tbody", null, /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
24081
+ className: "print-label",
24082
+ style: {
24083
+ width: "20%"
24084
+ }
24085
+ }, "Site Accessibility:"), /*#__PURE__*/React.createElement("td", {
24086
+ className: "print-value",
24087
+ style: {
24088
+ width: "30%"
24089
+ }
24090
+ }, accessibilityValue), /*#__PURE__*/React.createElement("td", {
24091
+ className: "print-label",
24092
+ style: {
24093
+ width: "25%"
24094
+ }
24095
+ }, "Proposed Meter Location:"), /*#__PURE__*/React.createElement("td", {
24096
+ className: "print-value",
24097
+ style: {
24098
+ width: "25%"
24099
+ }
24100
+ }, meterLocValue)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
24101
+ className: "print-label"
24102
+ }, "Site Feasibility Observed:"), /*#__PURE__*/React.createElement("td", {
24103
+ className: "print-value",
24104
+ colSpan: 3,
24105
+ style: {
24106
+ fontWeight: "bold"
24107
+ }
24108
+ }, feasibilityValue)), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
24109
+ className: "print-label"
24110
+ }, "Inspector Observations / Remarks:"), /*#__PURE__*/React.createElement("td", {
24111
+ className: "print-value",
24112
+ colSpan: 3,
24113
+ style: {
24114
+ minHeight: "36px"
24115
+ }
24116
+ }, checklist.siteInspectorRemarks || "None"))))), /*#__PURE__*/React.createElement("div", {
24117
+ className: "print-section print-avoid-break"
24118
+ }, /*#__PURE__*/React.createElement("div", {
24119
+ className: "print-section-header"
24120
+ }, "7. SITE INSPECTION EVIDENCE / PHOTOGRAPHS"), uploadedDocuments.length === 0 ? /*#__PURE__*/React.createElement("div", {
24121
+ style: {
24122
+ padding: "6px 8px",
24123
+ fontStyle: "italic",
24124
+ fontSize: "9pt",
24125
+ border: "1px solid #ccc"
24126
+ }
24127
+ }, "No photographs attached.") : /*#__PURE__*/React.createElement("table", {
24128
+ className: "print-table"
24129
+ }, /*#__PURE__*/React.createElement("thead", null, /*#__PURE__*/React.createElement("tr", {
24130
+ style: {
24131
+ backgroundColor: "#f0f0f0"
24132
+ }
24133
+ }, /*#__PURE__*/React.createElement("th", {
24134
+ style: {
24135
+ width: "8%",
24136
+ textAlign: "center"
24137
+ }
24138
+ }, "S.No"), /*#__PURE__*/React.createElement("th", {
24139
+ style: {
24140
+ width: "40%"
24141
+ }
24142
+ }, "Document Type"), /*#__PURE__*/React.createElement("th", {
24143
+ style: {
24144
+ width: "37%"
24145
+ }
24146
+ }, "File Name / UID"), /*#__PURE__*/React.createElement("th", {
24147
+ style: {
24148
+ width: "15%",
24149
+ textAlign: "center"
24150
+ }
24151
+ }, "File Size"))), /*#__PURE__*/React.createElement("tbody", null, uploadedDocuments.map((doc, idx) => /*#__PURE__*/React.createElement("tr", {
24152
+ key: idx
24153
+ }, /*#__PURE__*/React.createElement("td", {
24154
+ style: {
24155
+ textAlign: "center"
24156
+ }
24157
+ }, idx + 1), /*#__PURE__*/React.createElement("td", null, doc.documentType || "SITE_INSPECTION_PHOTO"), /*#__PURE__*/React.createElement("td", null, doc.fileName || doc.documentUid || `Photo-${idx + 1}.jpg`), /*#__PURE__*/React.createElement("td", {
24158
+ style: {
24159
+ textAlign: "center"
24160
+ }
24161
+ }, doc.fileSize || "NA")))))), /*#__PURE__*/React.createElement("div", {
24162
+ className: "print-section print-avoid-break",
24163
+ style: {
24164
+ marginTop: "8px"
24165
+ }
24166
+ }, /*#__PURE__*/React.createElement("div", {
24167
+ className: "print-section-header"
24168
+ }, "8. DECLARATION & SIGNATURES"), /*#__PURE__*/React.createElement("div", {
24169
+ style: {
24170
+ padding: "6px 8px",
24171
+ fontSize: "9pt",
24172
+ lineHeight: "1.35",
24173
+ border: "1px solid #333",
24174
+ marginBottom: "12px",
24175
+ backgroundColor: "#fafafa"
24176
+ }
24177
+ }, /*#__PURE__*/React.createElement("strong", null, "Declaration:"), " I hereby declare that I have physically inspected the site and that the details, checklist responses, observations and photographs submitted in this inspection report are true and correct to the best of my knowledge. I understand that this report will be recorded against the respective KNO.", /*#__PURE__*/React.createElement("div", {
24178
+ style: {
24179
+ marginTop: "4px"
24180
+ }
24181
+ }, /*#__PURE__*/React.createElement("strong", null, "Declaration Status:"), " ", declaration.agreed ? /*#__PURE__*/React.createElement("span", {
24182
+ style: {
24183
+ color: "#006600",
24184
+ fontWeight: "bold"
24185
+ }
24186
+ }, "[\u2713] YES (Agreed & Confirmed by Site Inspector)") : /*#__PURE__*/React.createElement("span", {
24187
+ style: {
24188
+ color: "#555555"
24189
+ }
24190
+ }, "[ ] Pending Confirmation"))), /*#__PURE__*/React.createElement("div", {
24191
+ style: {
24192
+ display: "flex",
24193
+ justifyContent: "space-between",
24194
+ marginTop: "32px",
24195
+ padding: "0 24px"
24196
+ }
24197
+ }, /*#__PURE__*/React.createElement("div", {
24198
+ style: {
24199
+ textAlign: "center",
24200
+ width: "45%"
24201
+ }
24202
+ }, /*#__PURE__*/React.createElement("div", {
24203
+ style: {
24204
+ borderBottom: "1px solid #000",
24205
+ width: "220px",
24206
+ margin: "0 auto 4px auto"
24207
+ }
24208
+ }), /*#__PURE__*/React.createElement("div", {
24209
+ style: {
24210
+ fontWeight: "bold",
24211
+ fontSize: "9.5pt"
24212
+ }
24213
+ }, "Signature of Site Inspector"), /*#__PURE__*/React.createElement("div", {
24214
+ style: {
24215
+ fontSize: "8.5pt"
24216
+ }
24217
+ }, "Name: ", declaration.inspectorName || checklist.siteInspectorName || "____________________"), /*#__PURE__*/React.createElement("div", {
24218
+ style: {
24219
+ fontSize: "8.5pt"
24220
+ }
24221
+ }, "Emp ID: ", checklist.inspectorEmployeeId || "____________________"), /*#__PURE__*/React.createElement("div", {
24222
+ style: {
24223
+ fontSize: "8.5pt"
24224
+ }
24225
+ }, "Date: ", declaration.submissionDate || "____________________")), /*#__PURE__*/React.createElement("div", {
24226
+ style: {
24227
+ textAlign: "center",
24228
+ width: "45%"
24229
+ }
24230
+ }, /*#__PURE__*/React.createElement("div", {
24231
+ style: {
24232
+ borderBottom: "1px solid #000",
24233
+ width: "220px",
24234
+ margin: "0 auto 4px auto"
24235
+ }
24236
+ }), /*#__PURE__*/React.createElement("div", {
24237
+ style: {
24238
+ fontWeight: "bold",
24239
+ fontSize: "9.5pt"
24240
+ }
24241
+ }, "Counter Signature (ZRO / EE)"), /*#__PURE__*/React.createElement("div", {
24242
+ style: {
24243
+ fontSize: "8.5pt"
24244
+ }
24245
+ }, "ZRO / Office: ", connectionDetails.zroOffice || "____________________"), /*#__PURE__*/React.createElement("div", {
24246
+ style: {
24247
+ fontSize: "8.5pt"
24248
+ }
24249
+ }, "Zone: ", connectionDetails.zone || "____________________"), /*#__PURE__*/React.createElement("div", {
24250
+ style: {
24251
+ fontSize: "8.5pt"
24252
+ }
24253
+ }, "Date: ____________________")))), /*#__PURE__*/React.createElement("div", {
24254
+ style: {
24255
+ textAlign: "center",
24256
+ fontSize: "8pt",
24257
+ color: "#666",
24258
+ marginTop: "16px",
24259
+ borderTop: "1px solid #ddd",
24260
+ paddingTop: "4px"
24261
+ }
24262
+ }, "Delhi Jal Board | Water & Sewerage Department | Site Inspection Report | Computer Generated Printout"));
24263
+ if (isSubmittedSuccess) {
24264
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, `
24265
+ @media screen {
24266
+ .field-inspection-print-view {
24267
+ display: none !important;
24268
+ }
24269
+ }
24270
+ @media print {
24271
+ @page {
24272
+ size: A4 portrait;
24273
+ margin: 10mm 12mm;
24274
+ }
24275
+ html, body, #root, .app-container, .ground-container {
24276
+ height: auto !important;
24277
+ min-height: 100% !important;
24278
+ overflow: visible !important;
24279
+ position: static !important;
24280
+ margin: 0 !important;
24281
+ padding: 0 !important;
24282
+ background: #ffffff !important;
24283
+ color: #000000 !important;
24284
+ -webkit-print-color-adjust: exact !important;
24285
+ print-color-adjust: exact !important;
24286
+ }
24287
+ header, nav, .topbar, .sidebar, .collapsible-sidebar, .action-bar-wrap, .digit-action-bar, .submit-bar, .toast, .breadcrumbs, .clear-both, .employee-header, .digit-header, .field-inspection-screen-view {
24288
+ display: none !important;
24289
+ }
24290
+ .field-inspection-print-view {
24291
+ display: block !important;
24292
+ visibility: visible !important;
24293
+ position: static !important;
24294
+ width: 100% !important;
24295
+ margin: 0 !important;
24296
+ padding: 0 !important;
24297
+ background: #ffffff !important;
24298
+ color: #111111 !important;
24299
+ font-family: Arial, Helvetica, sans-serif !important;
24300
+ font-size: 9.5pt !important;
24301
+ line-height: 1.35 !important;
24302
+ }
24303
+ .field-inspection-print-view * {
24304
+ visibility: visible !important;
24305
+ box-sizing: border-box !important;
24306
+ }
24307
+ .print-section {
24308
+ margin-bottom: 10px !important;
24309
+ }
24310
+ .print-avoid-break {
24311
+ page-break-inside: avoid !important;
24312
+ break-inside: avoid !important;
24313
+ }
24314
+ .print-section-header {
24315
+ background-color: #003366 !important;
24316
+ color: #ffffff !important;
24317
+ font-weight: bold !important;
24318
+ font-size: 10pt !important;
24319
+ padding: 4px 8px !important;
24320
+ margin-bottom: 4px !important;
24321
+ -webkit-print-color-adjust: exact !important;
24322
+ print-color-adjust: exact !important;
24323
+ }
24324
+ .print-table {
24325
+ width: 100% !important;
24326
+ border-collapse: collapse !important;
24327
+ margin-bottom: 6px !important;
24328
+ font-size: 9pt !important;
24329
+ }
24330
+ .print-table th, .print-table td {
24331
+ border: 1px solid #333333 !important;
24332
+ padding: 4px 6px !important;
24333
+ vertical-align: top !important;
24334
+ }
24335
+ .print-label {
24336
+ font-weight: bold !important;
24337
+ background-color: #f7f7f7 !important;
24338
+ color: #222222 !important;
24339
+ -webkit-print-color-adjust: exact !important;
24340
+ print-color-adjust: exact !important;
24341
+ }
24342
+ .print-value {
24343
+ color: #111111 !important;
24344
+ word-break: break-word !important;
24345
+ }
24346
+ }
24347
+ `), /*#__PURE__*/React.createElement("div", {
24348
+ className: "field-inspection-screen-view"
24349
+ }, /*#__PURE__*/React.createElement(Header, null, t("WS_SITE_INSPECTION_HEADER", "Site Inspection – New Water Connection")), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(Banner, {
24350
+ successful: true,
24351
+ message: t("WS_SITE_INSPECTION_SUBMITTED_SUCCESS", "Site Inspection Report Submitted Successfully"),
24352
+ applicationNumber: (submittedData === null || submittedData === void 0 ? void 0 : submittedData.connectionNo) || connectionDetails.connectionNo,
24353
+ info: t("WS_CONNECTION_NO_LABEL", "Connection No (KNO)")
24354
+ }), /*#__PURE__*/React.createElement(CardText, null, t("WS_SITE_INSPECTION_SUCCESS_NOTE", "The physical site inspection report and checklist evidence have been successfully recorded against the connection.")), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
24355
+ label: t("WS_PRINT_FORM", "Print Form"),
24356
+ onSubmit: handlePrint,
24357
+ style: {
24358
+ backgroundColor: "#e6f4ff",
24359
+ color: "#003366",
24360
+ border: "1px solid #91caff",
24361
+ marginRight: "12px"
24362
+ }
24363
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
24364
+ label: t("WS_INSPECT_ANOTHER_KNO", "Inspect Another KNO"),
24365
+ onSubmit: () => {
24366
+ setIsSubmittedSuccess(false);
24367
+ setDataLoaded(false);
24368
+ setSearchKno("");
24369
+ setUploadedDocuments([]);
24370
+ setConnectionDetails({
24371
+ ...emptyConnectionDetails
24372
+ });
24373
+ setChecklist(initialChecklist);
24374
+ },
24375
+ style: {
24376
+ marginRight: "12px"
24377
+ }
24378
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
24379
+ label: t("CORE_COMMON_GO_TO_HOME", "Go to Home"),
24380
+ onSubmit: () => history.push("/digit-ui/employee/ws/water/inbox")
24381
+ })))), renderPrintView());
24382
+ }
24383
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("style", null, `
24384
+ @media screen {
24385
+ .field-inspection-print-view {
24386
+ display: none !important;
24387
+ }
24388
+ }
24389
+ @media print {
24390
+ @page {
24391
+ size: A4 portrait;
24392
+ margin: 10mm 12mm;
24393
+ }
24394
+ html, body, #root, .app-container, .ground-container {
24395
+ height: auto !important;
24396
+ min-height: 100% !important;
24397
+ overflow: visible !important;
24398
+ position: static !important;
24399
+ margin: 0 !important;
24400
+ padding: 0 !important;
24401
+ background: #ffffff !important;
24402
+ color: #000000 !important;
24403
+ -webkit-print-color-adjust: exact !important;
24404
+ print-color-adjust: exact !important;
24405
+ }
24406
+ header, nav, .topbar, .sidebar, .collapsible-sidebar, .action-bar-wrap, .digit-action-bar, .submit-bar, .toast, .breadcrumbs, .clear-both, .employee-header, .digit-header, .field-inspection-screen-view {
24407
+ display: none !important;
24408
+ }
24409
+ .field-inspection-print-view {
24410
+ display: block !important;
24411
+ visibility: visible !important;
24412
+ position: static !important;
24413
+ width: 100% !important;
24414
+ margin: 0 !important;
24415
+ padding: 0 !important;
24416
+ background: #ffffff !important;
24417
+ color: #111111 !important;
24418
+ font-family: Arial, Helvetica, sans-serif !important;
24419
+ font-size: 9.5pt !important;
24420
+ line-height: 1.35 !important;
24421
+ }
24422
+ .field-inspection-print-view * {
24423
+ visibility: visible !important;
24424
+ box-sizing: border-box !important;
24425
+ }
24426
+ .print-section {
24427
+ margin-bottom: 10px !important;
24428
+ }
24429
+ .print-avoid-break {
24430
+ page-break-inside: avoid !important;
24431
+ break-inside: avoid !important;
24432
+ }
24433
+ .print-section-header {
24434
+ background-color: #003366 !important;
24435
+ color: #ffffff !important;
24436
+ font-weight: bold !important;
24437
+ font-size: 10pt !important;
24438
+ padding: 4px 8px !important;
24439
+ margin-bottom: 4px !important;
24440
+ -webkit-print-color-adjust: exact !important;
24441
+ print-color-adjust: exact !important;
24442
+ }
24443
+ .print-table {
24444
+ width: 100% !important;
24445
+ border-collapse: collapse !important;
24446
+ margin-bottom: 6px !important;
24447
+ font-size: 9pt !important;
24448
+ }
24449
+ .print-table th, .print-table td {
24450
+ border: 1px solid #333333 !important;
24451
+ padding: 4px 6px !important;
24452
+ vertical-align: top !important;
24453
+ }
24454
+ .print-label {
24455
+ font-weight: bold !important;
24456
+ background-color: #f7f7f7 !important;
24457
+ color: #222222 !important;
24458
+ -webkit-print-color-adjust: exact !important;
24459
+ print-color-adjust: exact !important;
24460
+ }
24461
+ .print-value {
24462
+ color: #111111 !important;
24463
+ word-break: break-word !important;
24464
+ }
24465
+ }
24466
+ `), /*#__PURE__*/React.createElement("div", {
24467
+ className: "field-inspection-screen-view"
24468
+ }, /*#__PURE__*/React.createElement(Header, null, t("WS_SITE_INSPECTION_TITLE", "Site Inspection – New Water Connection")), /*#__PURE__*/React.createElement("div", {
24469
+ style: {
24470
+ color: "#505a5f",
24471
+ fontSize: "14px",
24472
+ marginTop: "-8px",
24473
+ marginBottom: "16px"
24474
+ }
24475
+ }, t("WS_SITE_INSPECTION_SUBTITLE", "Post KNO issuance | Site Inspector Form")), /*#__PURE__*/React.createElement(Card, {
24476
+ style: {
24477
+ backgroundColor: "#fffbe6",
24478
+ border: "1px solid #ffe58f",
24479
+ marginBottom: "16px"
24480
+ }
24481
+ }, /*#__PURE__*/React.createElement(CardText, {
24482
+ style: {
24483
+ margin: 0,
24484
+ color: "#595959",
24485
+ fontSize: "14px",
24486
+ lineHeight: "1.5"
24487
+ }
24488
+ }, /*#__PURE__*/React.createElement("strong", null, "Workflow:"), " KNO issuance, property, consumer and plot details are fetched from the application record. The site inspector completes the checklist, uploads site photographs and submits the inspection report. No approval process is included.")), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_SEARCH_KNO_SECTION", "1. Search KNO")), /*#__PURE__*/React.createElement("div", {
24489
+ style: {
24490
+ maxWidth: "600px",
24491
+ marginTop: "12px"
24492
+ }
24493
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
24494
+ style: {
24495
+ fontWeight: "600",
24496
+ width: "120px"
24497
+ }
24498
+ }, `${t("WS_KNO_LABEL", "KNO")} *`), /*#__PURE__*/React.createElement("div", {
24499
+ className: "field",
24500
+ style: {
24501
+ display: "flex",
24502
+ gap: "12px",
24503
+ width: "100%"
24504
+ }
24505
+ }, /*#__PURE__*/React.createElement(TextInput, {
24506
+ name: "searchKno",
24507
+ value: searchKno,
24508
+ onChange: e => setSearchKno(e.target.value),
24509
+ placeholder: t("WS_ENTER_KNO_PLACEHOLDER", "Enter KNO"),
24510
+ onKeyDown: e => e.key === "Enter" && handleSearch(e)
24511
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
24512
+ label: isSearching ? t("COMMON_SEARCHING", "Searching...") : t("WS_FETCH_KNO_DETAILS", "Fetch KNO Details"),
24513
+ onSubmit: handleSearch,
24514
+ disabled: isSearching
24515
+ }))), /*#__PURE__*/React.createElement(CardSectionSubText, {
24516
+ style: {
24517
+ marginTop: "4px",
24518
+ fontSize: "12px"
24519
+ }
24520
+ }, t("WS_SEARCH_KNO_HELPER", "The live DJB application should retrieve the issued KNO record and populate the read-only sections below.")))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_KNO_ISSUANCE_DETAILS", "2. KNO Issuance Details")), /*#__PURE__*/React.createElement(CardSectionSubText, null, t("WS_KNO_ISSUANCE_SUBTEXT", "Auto-fetched from KNO issuance record; read-only for site inspector.")), /*#__PURE__*/React.createElement("div", {
24521
+ style: grid3Style
24522
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_KNO_LABEL", "KNO")), /*#__PURE__*/React.createElement(TextInput, {
24523
+ disabled: true,
24524
+ value: connectionDetails.kno
24525
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_APPLICATION_NUMBER_LABEL", "Application Number")), /*#__PURE__*/React.createElement(TextInput, {
24526
+ disabled: true,
24527
+ value: connectionDetails.applicationNo
24528
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_KNO_ISSUANCE_DATE_LABEL", "KNO Issuance Date")), /*#__PURE__*/React.createElement(TextInput, {
24529
+ disabled: true,
24530
+ value: connectionDetails.knoIssuanceDate
24531
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ZONE_LABEL", "Zone")), /*#__PURE__*/React.createElement(TextInput, {
24532
+ disabled: true,
24533
+ value: connectionDetails.zone
24534
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ZRO_NAME_OFFICE_LABEL", "ZRO Name / Office")), /*#__PURE__*/React.createElement(TextInput, {
24535
+ disabled: true,
24536
+ value: connectionDetails.zroOffice
24537
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CONNECTION_TYPE_LABEL", "Connection Type")), /*#__PURE__*/React.createElement(TextInput, {
24538
+ disabled: true,
24539
+ value: connectionDetails.connectionType
24540
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CONNECTION_CATEGORY_LABEL", "Connection Category")), /*#__PURE__*/React.createElement(TextInput, {
24541
+ disabled: true,
24542
+ value: connectionDetails.connectionCategory
24543
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_APPLICATION_STATUS_LABEL", "Application Status")), /*#__PURE__*/React.createElement(TextInput, {
24544
+ disabled: true,
24545
+ value: connectionDetails.applicationStatus
24546
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ASSIGNED_LICENSED_PLUMBER_LABEL", "Assigned Licensed Plumber")), /*#__PURE__*/React.createElement(TextInput, {
24547
+ disabled: true,
24548
+ value: connectionDetails.assignedLicensedPlumber
24549
+ })))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PROPERTY_DETAILS", "3. Property Details")), /*#__PURE__*/React.createElement(CardSectionSubText, null, t("WS_PREFILLED_FROM_CITIZEN_APP", "Prefilled from citizen application.")), /*#__PURE__*/React.createElement("div", {
24550
+ style: grid3Style
24551
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PROPERTY_ADDRESS_LABEL", "Property Address")), /*#__PURE__*/React.createElement(TextInput, {
24552
+ disabled: true,
24553
+ value: connectionDetails.propertyAddress
24554
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CITY_LABEL", "City")), /*#__PURE__*/React.createElement(TextInput, {
24555
+ disabled: true,
24556
+ value: connectionDetails.city
24557
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PIN_CODE_LABEL", "PIN Code")), /*#__PURE__*/React.createElement(TextInput, {
24558
+ disabled: true,
24559
+ value: connectionDetails.pincode
24560
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_LOCALITY_LABEL", "Locality")), /*#__PURE__*/React.createElement(TextInput, {
24561
+ disabled: true,
24562
+ value: connectionDetails.locality
24563
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SUB_LOCALITY_LABEL", "Sub Locality")), /*#__PURE__*/React.createElement(TextInput, {
24564
+ disabled: true,
24565
+ value: connectionDetails.subLocality
24566
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_COLONY_CATEGORY_LABEL", "Colony Category")), /*#__PURE__*/React.createElement(TextInput, {
24567
+ disabled: true,
24568
+ value: connectionDetails.colonyCategory
24569
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PROPERTY_USE_LABEL", "Property Use")), /*#__PURE__*/React.createElement(TextInput, {
24570
+ disabled: true,
24571
+ value: connectionDetails.propertyUse
24572
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_OWNERSHIP_TYPE_LABEL", "Ownership Type")), /*#__PURE__*/React.createElement(TextInput, {
24573
+ disabled: true,
24574
+ value: connectionDetails.ownershipType
24575
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_HOUSE_PROPERTY_NO_LABEL", "House / Property Number")), /*#__PURE__*/React.createElement(TextInput, {
24576
+ disabled: true,
24577
+ value: connectionDetails.houseNo
24578
+ })))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_CONSUMER_DETAILS", "4. Consumer Details")), /*#__PURE__*/React.createElement(CardSectionSubText, null, t("WS_PREFILLED_FROM_CITIZEN_APP", "Prefilled from citizen application.")), /*#__PURE__*/React.createElement("div", {
24579
+ style: grid3Style
24580
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CONSUMER_NAME_LABEL", "Consumer / Applicant Name")), /*#__PURE__*/React.createElement(TextInput, {
24581
+ disabled: true,
24582
+ value: connectionDetails.consumerName
24583
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_MOBILE_NUMBER_LABEL", "Mobile Number")), /*#__PURE__*/React.createElement(TextInput, {
24584
+ disabled: true,
24585
+ value: connectionDetails.mobileNumber
24586
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_EMAIL_ID_LABEL", "Email ID")), /*#__PURE__*/React.createElement(TextInput, {
24587
+ disabled: true,
24588
+ value: connectionDetails.emailId
24589
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_APPLICANT_TYPE_LABEL", "Applicant Type")), /*#__PURE__*/React.createElement(TextInput, {
24590
+ disabled: true,
24591
+ value: connectionDetails.applicantType
24592
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_IDENTITY_TYPE_LABEL", "Identity / Reference Type")), /*#__PURE__*/React.createElement(TextInput, {
24593
+ disabled: true,
24594
+ value: connectionDetails.identityType
24595
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ALT_CONTACT_LABEL", "Alternate Contact Number")), /*#__PURE__*/React.createElement(TextInput, {
24596
+ disabled: true,
24597
+ value: connectionDetails.alternateContactNumber
24598
+ })))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PLOT_DETAILS", "5. Plot Details")), /*#__PURE__*/React.createElement(CardSectionSubText, null, t("WS_PREFILLED_PLOT_INFO", "Prefilled plot / premises information as submitted in the application.")), /*#__PURE__*/React.createElement("div", {
24599
+ style: grid3Style
24600
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PLOT_NUMBER_LABEL", "Plot Number")), /*#__PURE__*/React.createElement(TextInput, {
24601
+ disabled: true,
24602
+ value: connectionDetails.plotNumber
24603
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PLOT_AREA_LABEL", "Plot Area")), /*#__PURE__*/React.createElement(TextInput, {
24604
+ disabled: true,
24605
+ value: connectionDetails.plotArea
24606
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PLOT_AREA_UNIT_LABEL", "Plot Area Unit")), /*#__PURE__*/React.createElement(TextInput, {
24607
+ disabled: true,
24608
+ value: connectionDetails.plotAreaUnit
24609
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_NUMBER_OF_FLOORS_LABEL", "Number of Floors")), /*#__PURE__*/React.createElement(TextInput, {
24610
+ disabled: true,
24611
+ value: connectionDetails.numberOfFloors
24612
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_COVERED_AREA_LABEL", "Covered Area")), /*#__PURE__*/React.createElement(TextInput, {
24613
+ disabled: true,
24614
+ value: connectionDetails.coveredArea
24615
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ROAD_WIDTH_LABEL", "Road Width")), /*#__PURE__*/React.createElement(TextInput, {
24616
+ disabled: true,
24617
+ value: connectionDetails.roadWidth
24618
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PROPERTY_TYPE_LABEL", "Property Type")), /*#__PURE__*/React.createElement(TextInput, {
24619
+ disabled: true,
24620
+ value: connectionDetails.propertyType
24621
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_BUILDING_STATUS_LABEL", "Building Status")), /*#__PURE__*/React.createElement(TextInput, {
24622
+ disabled: true,
24623
+ value: connectionDetails.buildingStatus
24624
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_EXISTING_WATER_CONN_LABEL", "Existing Water Connection")), /*#__PURE__*/React.createElement(TextInput, {
24625
+ disabled: true,
24626
+ value: connectionDetails.existingWaterConnection
24627
+ })))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_SITE_INSPECTION_CHECKLIST", "6. Site Inspection Checklist")), /*#__PURE__*/React.createElement(CardSectionSubText, null, t("WS_CHECKLIST_SUBTEXT", "To be filled by the site inspector during the physical site visit.")), /*#__PURE__*/React.createElement("div", {
24628
+ style: grid3Style
24629
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_INSPECTION_DATE_LABEL", "Inspection Date")} *`), /*#__PURE__*/React.createElement(TextInput, {
24630
+ type: "date",
24631
+ value: checklist.inspectionDate,
24632
+ onChange: e => handleChecklistChange("inspectionDate", e.target.value)
24633
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_INSPECTION_TIME_LABEL", "Inspection Time")} *`), /*#__PURE__*/React.createElement(TextInput, {
24634
+ value: checklist.inspectionTime,
24635
+ placeholder: "11:30 AM",
24636
+ onChange: e => handleChecklistChange("inspectionTime", e.target.value)
24637
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_INSPECTOR_NAME_LABEL", "Site Inspector Name")} *`), /*#__PURE__*/React.createElement(TextInput, {
24638
+ value: checklist.siteInspectorName,
24639
+ placeholder: t("WS_ENTER_INSPECTOR_NAME", "Enter inspector name"),
24640
+ onChange: e => handleChecklistChange("siteInspectorName", e.target.value)
24641
+ }))), /*#__PURE__*/React.createElement("div", {
24642
+ style: grid3Style
24643
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_INSPECTOR_EMPLOYEE_ID_LABEL", "Inspector Employee ID")), /*#__PURE__*/React.createElement(TextInput, {
24644
+ value: checklist.inspectorEmployeeId,
24645
+ placeholder: t("WS_EMPLOYEE_ID_PLACEHOLDER", "Employee ID"),
24646
+ onChange: e => handleChecklistChange("inspectorEmployeeId", e.target.value)
24647
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_LICENSED_PLUMBER_PRESENT_LABEL", "Licensed Plumber Present?")), /*#__PURE__*/React.createElement(Dropdown, {
24648
+ option: yesNoOptions,
24649
+ selected: checklist.isLicensedPlumberPresent,
24650
+ select: val => handleChecklistChange("isLicensedPlumberPresent", val),
24651
+ optionKey: "name",
24652
+ t: t
24653
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_CONSUMER_REP_PRESENT_LABEL", "Consumer / Representative Present?")), /*#__PURE__*/React.createElement(Dropdown, {
24654
+ option: yesNoOptions,
24655
+ selected: checklist.isConsumerRepresentativePresent,
24656
+ select: val => handleChecklistChange("isConsumerRepresentativePresent", val),
24657
+ optionKey: "name",
24658
+ t: t
24659
+ }))), /*#__PURE__*/React.createElement("div", {
24660
+ style: grid2Style
24661
+ }, /*#__PURE__*/React.createElement("div", {
24662
+ style: {
24663
+ display: "flex",
24664
+ flexDirection: "column",
24665
+ gap: "12px"
24666
+ }
24667
+ }, /*#__PURE__*/React.createElement(CheckBox, {
24668
+ checked: checklist.consumerIdentityVerified,
24669
+ onChange: e => handleChecklistChange("consumerIdentityVerified", e.target.checked),
24670
+ label: t("WS_CHECKLIST_CONSUMER_IDENTITY", "Consumer identity / applicant details verified at site")
24671
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24672
+ checked: checklist.propertyAddressVerified,
24673
+ onChange: e => handleChecklistChange("propertyAddressVerified", e.target.checked),
24674
+ label: t("WS_CHECKLIST_PROP_ADDRESS", "Property address and premises location verified")
24675
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24676
+ checked: checklist.propertyUseVerified,
24677
+ onChange: e => handleChecklistChange("propertyUseVerified", e.target.checked),
24678
+ label: t("WS_CHECKLIST_PROP_USE", "Property use and category verified")
24679
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24680
+ checked: checklist.existingWaterConnectionChecked,
24681
+ onChange: e => handleChecklistChange("existingWaterConnectionChecked", e.target.checked),
24682
+ label: t("WS_CHECKLIST_EXISTING_CONN", "Existing water connection / service line checked")
24683
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24684
+ checked: checklist.waterMainAndRoadAccessFeasible,
24685
+ onChange: e => handleChecklistChange("waterMainAndRoadAccessFeasible", e.target.checked),
24686
+ label: t("WS_CHECKLIST_ROAD_ACCESS", "Water main and road access feasibility checked")
24687
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24688
+ checked: checklist.licensedPlumberVerified,
24689
+ onChange: e => handleChecklistChange("licensedPlumberVerified", e.target.checked),
24690
+ label: t("WS_CHECKLIST_PLUMBER_AUTH", "Licensed plumber details / authorization verified")
24691
+ })), /*#__PURE__*/React.createElement("div", {
24692
+ style: {
24693
+ display: "flex",
24694
+ flexDirection: "column",
24695
+ gap: "12px"
24696
+ }
24697
+ }, /*#__PURE__*/React.createElement(CheckBox, {
24698
+ checked: checklist.knoDetailsMatched,
24699
+ onChange: e => handleChecklistChange("knoDetailsMatched", e.target.checked),
24700
+ label: t("WS_CHECKLIST_KNO_MATCHED", "KNO and application details matched")
24701
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24702
+ checked: checklist.localityColonyVerified,
24703
+ onChange: e => handleChecklistChange("localityColonyVerified", e.target.checked),
24704
+ label: t("WS_CHECKLIST_LOCALITY_VERIFIED", "Locality / colony details verified")
24705
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24706
+ checked: checklist.plotDetailsVerified,
24707
+ onChange: e => handleChecklistChange("plotDetailsVerified", e.target.checked),
24708
+ label: t("WS_CHECKLIST_PLOT_DETAILS", "Plot details / area verified at site")
24709
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24710
+ checked: checklist.proposedConnectionPointIdentified,
24711
+ onChange: e => handleChecklistChange("proposedConnectionPointIdentified", e.target.checked),
24712
+ label: t("WS_CHECKLIST_PROPOSED_POINT", "Proposed connection point identified")
24713
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24714
+ checked: checklist.meterLocationIdentifiedAndAccessible,
24715
+ onChange: e => handleChecklistChange("meterLocationIdentifiedAndAccessible", e.target.checked),
24716
+ label: t("WS_CHECKLIST_METER_LOCATION", "Meter installation location identified and accessible")
24717
+ }), /*#__PURE__*/React.createElement(CheckBox, {
24718
+ checked: checklist.siteConditionsMatchedApplication,
24719
+ onChange: e => handleChecklistChange("siteConditionsMatchedApplication", e.target.checked),
24720
+ label: t("WS_CHECKLIST_SITE_CONDITIONS", "Site conditions match application details")
24721
+ }))), /*#__PURE__*/React.createElement("div", {
24722
+ style: grid3Style
24723
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SITE_ACCESSIBILITY_LABEL", "Site Accessibility")} *`), /*#__PURE__*/React.createElement(Dropdown, {
24724
+ option: siteAccessibilityOptions,
24725
+ selected: checklist.siteAccessibility,
24726
+ select: val => handleChecklistChange("siteAccessibility", val),
24727
+ optionKey: "name",
24728
+ t: t
24729
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PROPOSED_METER_LOC_LABEL", "Proposed Meter Location")} *`), /*#__PURE__*/React.createElement(Dropdown, {
24730
+ option: proposedMeterLocationOptions,
24731
+ selected: checklist.proposedMeterLocation,
24732
+ select: val => handleChecklistChange("proposedMeterLocation", val),
24733
+ optionKey: "name",
24734
+ t: t
24735
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SITE_FEASIBILITY_LABEL", "Site Feasibility Observed")} *`), /*#__PURE__*/React.createElement(Dropdown, {
24736
+ option: siteFeasibilityOptions,
24737
+ selected: checklist.siteFeasibilityObserved,
24738
+ select: val => handleChecklistChange("siteFeasibilityObserved", val),
24739
+ optionKey: "name",
24740
+ t: t
24741
+ }))), /*#__PURE__*/React.createElement("div", {
24742
+ style: {
24743
+ marginTop: "16px"
24744
+ }
24745
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_INSPECTOR_REMARKS_LABEL", "Site Inspector Observations / Remarks")} *`), /*#__PURE__*/React.createElement(TextArea, {
24746
+ name: "siteInspectorRemarks",
24747
+ value: checklist.siteInspectorRemarks,
24748
+ placeholder: t("WS_ENTER_SITE_REMARKS", "Enter site observations, discrepancies, measurements and findings"),
24749
+ onChange: e => handleChecklistChange("siteInspectorRemarks", e.target.value),
24750
+ style: {
24751
+ minHeight: "90px"
24752
+ }
24753
+ }))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_SITE_INSPECTION_EVIDENCE", "7. Site Inspection Evidence")), /*#__PURE__*/React.createElement("div", {
24754
+ style: {
24755
+ marginTop: "12px"
24756
+ }
24757
+ }, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_UPLOAD_SITE_PHOTOS", "Upload Site Photograph(s)")} *`), /*#__PURE__*/React.createElement(UploadFile, {
24758
+ id: "site-inspection-photos",
24759
+ accept: "image/*",
24760
+ onUpload: handleFileUpload,
24761
+ onDelete: () => setUploadedDocuments([]),
24762
+ message: uploadedDocuments.length > 0 ? `${uploadedDocuments.length} ${t("CS_ACTION_FILEUPLOADED", "file(s) uploaded")}` : t("ES_NO_FILE_SELECTED_LABEL", "No file selected"),
24763
+ disabled: isUploading
24764
+ }), /*#__PURE__*/React.createElement(CardSectionSubText, {
24765
+ style: {
24766
+ marginTop: "6px",
24767
+ fontSize: "12px"
24768
+ }
24769
+ }, t("WS_UPLOAD_EVIDENCE_HELPER", "Upload photographs of property frontage, premises, proposed connection point and proposed meter installation location. No supporting documents or coordinates are required.")), uploadedDocuments.length > 0 && /*#__PURE__*/React.createElement("div", {
24770
+ style: {
24771
+ marginTop: "12px",
24772
+ display: "flex",
24773
+ flexDirection: "column",
24774
+ gap: "8px"
24775
+ }
24776
+ }, uploadedDocuments.map((doc, idx) => /*#__PURE__*/React.createElement("div", {
24777
+ key: idx,
24778
+ style: {
24779
+ display: "flex",
24780
+ alignItems: "center",
24781
+ justifyContent: "space-between",
24782
+ padding: "8px 12px",
24783
+ backgroundColor: "#f5f5f5",
24784
+ border: "1px solid #d9d9d9",
24785
+ borderRadius: "4px"
24786
+ }
24787
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
24788
+ style: {
24789
+ fontWeight: "500",
24790
+ fontSize: "13px"
24791
+ }
24792
+ }, doc.fileName || doc.documentUid), /*#__PURE__*/React.createElement("span", {
24793
+ style: {
24794
+ fontSize: "11px",
24795
+ color: "#666",
24796
+ marginLeft: "8px"
24797
+ }
24798
+ }, "(", doc.fileSize, ")")), /*#__PURE__*/React.createElement("button", {
24799
+ type: "button",
24800
+ onClick: () => handleRemoveDocument(idx),
24801
+ style: {
24802
+ background: "none",
24803
+ border: "none",
24804
+ color: "#cf1322",
24805
+ cursor: "pointer",
24806
+ fontWeight: "600",
24807
+ fontSize: "12px"
24808
+ }
24809
+ }, t("CS_COMMON_DELETE", "Remove"))))))), /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DECLARATION", "8. Declaration")), /*#__PURE__*/React.createElement("div", {
24810
+ style: {
24811
+ marginTop: "12px",
24812
+ marginBottom: "16px"
24813
+ }
24814
+ }, /*#__PURE__*/React.createElement(CheckBox, {
24815
+ checked: declaration.agreed,
24816
+ onChange: e => setDeclaration(prev => ({
24817
+ ...prev,
24818
+ agreed: e.target.checked
24819
+ })),
24820
+ label: t("WS_INSPECTION_DECLARATION_TEXT", "I hereby declare that I have physically inspected the site and that the details, checklist responses, observations and photographs submitted in this inspection report are true and correct to the best of my knowledge. I understand that this report will be recorded against the respective KNO.")
24821
+ })), /*#__PURE__*/React.createElement("div", {
24822
+ style: grid2Style
24823
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_INSPECTOR_NAME_LABEL", "Inspector Name")), /*#__PURE__*/React.createElement(TextInput, {
24824
+ disabled: true,
24825
+ value: declaration.inspectorName
24826
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SUBMISSION_DATE_LABEL", "Submission Date")), /*#__PURE__*/React.createElement(TextInput, {
24827
+ type: "date",
24828
+ value: declaration.submissionDate,
24829
+ onChange: e => setDeclaration(prev => ({
24830
+ ...prev,
24831
+ submissionDate: e.target.value
24832
+ }))
24833
+ })))), /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
24834
+ label: t("WS_PRINT_FORM", "Print Form"),
24835
+ onSubmit: handlePrint,
24836
+ style: {
24837
+ backgroundColor: "#e6f4ff",
24838
+ color: "#003366",
24839
+ border: "1px solid #91caff",
24840
+ marginRight: "12px"
24841
+ }
24842
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
24843
+ label: t("WS_RESET", "Reset"),
24844
+ onSubmit: handleReset,
24845
+ style: {
24846
+ backgroundColor: "#fff1f0",
24847
+ color: "#cf1322",
24848
+ border: "1px solid #ffa39e",
24849
+ marginRight: "12px"
24850
+ }
24851
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
24852
+ label: isSubmitting ? t("WS_SUBMITTING", "Submitting...") : t("WS_SUBMIT_SITE_INSPECTION", "Submit Site Inspection"),
24853
+ onSubmit: handleSubmit,
24854
+ disabled: isSubmitting
24855
+ }))), renderPrintView(), toast && /*#__PURE__*/React.createElement(Toast, {
24856
+ error: toast.key === "error",
24857
+ warning: toast.key === "warning",
24858
+ info: toast.key === "info",
24859
+ label: toast.message,
24860
+ onClose: () => setToast(null)
24861
+ }));
24862
+ };
24863
+
22789
24864
  const BILLSBreadCrumbs = _ref => {
22790
24865
  var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
22791
24866
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
@@ -23258,6 +25333,10 @@ const BILLSBreadCrumbs = _ref => {
23258
25333
  path: "/digit-ui/employee/ws/zro-verification-details",
23259
25334
  label: t("WS_APPLICATION_DETAILS_HEADER"),
23260
25335
  show: location.pathname.includes("/ws/zro-verification-details") ? true : false
25336
+ }, {
25337
+ path: "/digit-ui/employee/ws/field-inspection",
25338
+ label: t("WS_FIELD_INSPECTION", "Field Inspection"),
25339
+ show: location.pathname.includes("/ws/field-inspection") ? true : false
23261
25340
  }];
23262
25341
  let lastCrumbIndex = findLastIndex(crumbs, "show", true);
23263
25342
  crumbs[lastCrumbIndex] = {
@@ -23610,6 +25689,9 @@ const App$1 = _ref2 => {
23610
25689
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
23611
25690
  path: `${path}/zro-verification-details`,
23612
25691
  component: () => /*#__PURE__*/React.createElement(WSZROVerificationDetails, null)
25692
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
25693
+ path: `${path}/field-inspection`,
25694
+ component: WSFieldInspection
23613
25695
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
23614
25696
  path: `${path}/execute-disconnection`,
23615
25697
  component: WSExecuteDisconnection
@@ -29980,7 +32062,15 @@ function SelectDocument$2(_ref3) {
29980
32062
  });
29981
32063
  const [file, setFile] = useState(null);
29982
32064
  const [uploadedFile, setUploadedFile] = useState(() => isOther ? null : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
29983
- const [documentUid, setDocumentUid] = useState(() => isOther ? "" : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || "");
32065
+ const [documentUid, setDocumentUid] = useState(() => {
32066
+ if (isOther) return "";
32067
+ const num = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || "";
32068
+ const uuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
32069
+ if (uuidRegex.test(num) || num === (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || num === (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.id)) {
32070
+ return "";
32071
+ }
32072
+ return num;
32073
+ });
29984
32074
  const [isDocumentUidLocked, setIsDocumentUidLocked] = useState(false);
29985
32075
  const [showCamera, setShowCamera] = useState(false);
29986
32076
  const [isUploading, setIsUploading] = useState(false);
@@ -40869,6 +42959,10 @@ const WSCard = () => {
40869
42959
  label: t("WS_APPLY_MUTATION"),
40870
42960
  link: `/digit-ui/employee/ws/mutation-application`,
40871
42961
  roles: []
42962
+ }, {
42963
+ label: t("WS_FIELD_INSPECTION", "Field Inspection"),
42964
+ link: `/digit-ui/employee/ws/field-inspection`,
42965
+ roles: ["WS_CEMP", "WS_FIELD_INSPECTOR", "WS_APPROVER", "WS_ZRO", "EE", "WS_CLERK", "SW_FIELD_INSPECTOR"]
40872
42966
  }, {
40873
42967
  label: t("WS_ZRO_VERIFICATION"),
40874
42968
  link: `/digit-ui/employee/ws/zro-application`,
@@ -44952,6 +47046,34 @@ const isPhotoDoc = (doc, code) => {
44952
47046
  const str = (((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "") + " " + (code || "")).toUpperCase();
44953
47047
  return str.includes("APPLICANTPHOTO") || str.includes("PHOTO");
44954
47048
  };
47049
+ const isPhotoOrSignatureDoc = (doc, code) => {
47050
+ const str = (((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "") + " " + (code || "")).toUpperCase();
47051
+ return str.includes("APPLICANTPHOTO") || str.includes("PHOTO") || str.includes("SIGNATURE") || str.includes("SIGN");
47052
+ };
47053
+ const isInvalidDocNum = (val, doc) => {
47054
+ if (!val || typeof val !== "string") return true;
47055
+ const trimmed = val.trim();
47056
+ if (!trimmed || trimmed.toUpperCase() === "NA" || trimmed.toUpperCase() === "NULL" || trimmed.toUpperCase() === "UNDEFINED" || trimmed.toUpperCase() === "NONE" || trimmed === "-") {
47057
+ return true;
47058
+ }
47059
+ const uuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
47060
+ if (uuidRegex.test(trimmed)) return true;
47061
+ if (/^[0-9a-fA-F]{32}$/.test(trimmed)) return true;
47062
+ if (doc !== null && doc !== void 0 && doc.fileStoreId && trimmed === String(doc.fileStoreId).trim()) return true;
47063
+ if (doc !== null && doc !== void 0 && doc.id && trimmed === String(doc.id).trim()) return true;
47064
+ if (doc !== null && doc !== void 0 && doc.documentId && trimmed === String(doc.documentId).trim()) return true;
47065
+ return false;
47066
+ };
47067
+ const getDocNumber = (document, isPhotoOrSig, t) => {
47068
+ if (isPhotoOrSig) return "";
47069
+ const candidates = [document === null || document === void 0 ? void 0 : document.documentNumber, document === null || document === void 0 ? void 0 : document.documentUid];
47070
+ for (const c of candidates) {
47071
+ if (c && !isInvalidDocNum(c, document)) {
47072
+ return String(c).trim();
47073
+ }
47074
+ }
47075
+ return t ? t("NA") : "NA";
47076
+ };
44955
47077
  function WSDocument(_ref) {
44956
47078
  var _value$documents;
44957
47079
  let {
@@ -45014,7 +47136,8 @@ function WSDocument(_ref) {
45014
47136
  const finalUrl = linkFromData || localLink || (typeof fileId === "string" && fileId.startsWith("http") ? fileId : "");
45015
47137
  const displayName = getDocumentDisplayName(document, Code, t);
45016
47138
  const isPhoto = isPhotoDoc(document, Code);
45017
- const docNum = !isPhoto ? (document === null || document === void 0 ? void 0 : document.documentNumber) || (document === null || document === void 0 ? void 0 : document.documentUid) || "" : "";
47139
+ const isPhotoOrSig = isPhotoOrSignatureDoc(document, Code);
47140
+ const docNum = getDocNumber(document, isPhotoOrSig, t);
45018
47141
  return /*#__PURE__*/React.createElement("div", {
45019
47142
  style: {
45020
47143
  display: "flex",
@@ -45079,7 +47202,7 @@ function WSDocument(_ref) {
45079
47202
  maxWidth: "200px",
45080
47203
  lineHeight: "1.3"
45081
47204
  }
45082
- }, displayName), docNum ? /*#__PURE__*/React.createElement("p", {
47205
+ }, displayName), !isPhotoOrSig && /*#__PURE__*/React.createElement("p", {
45083
47206
  style: {
45084
47207
  marginTop: "4px",
45085
47208
  fontSize: "13px",
@@ -45087,7 +47210,7 @@ function WSDocument(_ref) {
45087
47210
  wordBreak: "break-all",
45088
47211
  maxWidth: "200px"
45089
47212
  }
45090
- }, docNum) : null), appStatus === "PENDING_FOR_CONNECTION_ACTIVATION" && /*#__PURE__*/React.createElement("div", {
47213
+ }, docNum || t("NA"))), appStatus === "PENDING_FOR_CONNECTION_ACTIVATION" && /*#__PURE__*/React.createElement("div", {
45091
47214
  style: {
45092
47215
  marginTop: "10px"
45093
47216
  }
@@ -45244,33 +47367,33 @@ const checkForNA$2 = value => {
45244
47367
  return value ? value : "CS_NA";
45245
47368
  };
45246
47369
  const WSApplicationDetails = () => {
45247
- var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect9, _data$SewerageConnect0, _data$WaterConnection1, _data$WaterConnection10, _data$SewerageConnect1, _data$SewerageConnect10, _data$WaterConnection11, _data$WaterConnection12, _data$SewerageConnect11, _data$SewerageConnect12, _data$WaterConnection13, _data$SewerageConnect13, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _propertyAddress$geoL, _propertyAddress$loca, _additionalDetails$ge, _additionalDetails$pr, _additionalDetails$pr2, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties4, _PTData$Properties4$, _PTData$Properties4$$, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties6$$, _PTData$Properties6$$2, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties8, _PTData$Properties8$, _PTData$Properties9, _PTData$Properties9$, _PTData$Properties9$$, _applicationData$prop, _applicationData$prop2, _applicationData$prop3, _applicationData$prop4, _applicationData$prop5, _propertyAddress$geoL2, _propertyAddress$loca2, _additionalDetails$ge2, _additionalDetails$pr3, _additionalDetails$pr4, _PTData$Properties0, _PTData$Properties0$, _PTData$Properties0$$, _PTData$Properties1, _PTData$Properties1$, _PTData$Properties1$$, _PTData$Properties10, _PTData$Properties10$, _PTData$Properties10$2, _PTData$Properties10$3, _PTData$Properties11, _PTData$Properties11$, _PTData$Properties11$2, _PTData$Properties11$3, _PTData$Properties12, _PTData$Properties12$, _PTData$Properties13, _PTData$Properties13$, _PTData$Properties14, _PTData$Properties14$, _PTData$Properties14$2, _applicationData$prop6, _applicationData$prop7, _applicationData$prop8, _applicationData$prop9, _applicationData$prop0, _additionalDetails$pr5, _additionalDetails$pr6, _PTData$Properties15, _PTData$Properties15$, _PTData$Properties16, _PTData$Properties16$, _PTData$Properties17, _PTData$Properties17$, _PTData$Properties18, _PTData$Properties18$, _PTData$Properties19, _PTData$Properties19$, _PTData$Properties20, _PTData$Properties20$, _PTData$Properties20$2, _PTData$Properties21, _PTData$Properties21$, _PTData$Properties21$2, _data$WaterConnection14, _data$WaterConnection15, _data$WaterConnection16, _data$WaterConnection17, _data$SewerageConnect14, _data$SewerageConnect15, _data$SewerageConnect16, _data$SewerageConnect17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect18, _data$SewerageConnect19, _appDetailsData$appli, _data$WaterConnection38, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect34, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _appDetailsData$appli2, _data$WaterConnection43, _data$WaterConnection44, _data$WaterConnection45, _data$SewerageConnect39, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection46, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$SewerageConnect44, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$WaterConnection57, _data$SewerageConnect50, _data$SewerageConnect51, _data$SewerageConnect52, _data$WaterConnection58, _data$WaterConnection59, _data$SewerageConnect53, _data$SewerageConnect54, _data$WaterConnection60, _data$WaterConnection61, _data$WaterConnection62, _data$SewerageConnect55, _data$SewerageConnect56, _data$SewerageConnect57, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$WaterConnection67, _data$SewerageConnect60, _data$SewerageConnect61, _data$SewerageConnect62, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$WaterConnection72, _data$SewerageConnect65, _data$SewerageConnect66, _data$SewerageConnect67, _data$WaterConnection73, _data$WaterConnection74, _data$WaterConnection75, _data$WaterConnection76, _data$SewerageConnect68, _data$SewerageConnect69, _data$SewerageConnect70, _data$SewerageConnect71, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _applicationData$addi, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection77, _data$WaterConnection78, _data$WaterConnection79, _data$SewerageConnect72, _data$SewerageConnect73, _data$SewerageConnect74, _data$WaterConnection80, _data$WaterConnection81, _data$WaterConnection82, _data$WaterConnection83, _data$SewerageConnect75, _data$SewerageConnect76, _data$SewerageConnect77, _data$SewerageConnect78, _data$WaterConnection84, _data$WaterConnection85, _data$WaterConnection86, _data$WaterConnection87, _data$SewerageConnect79, _data$SewerageConnect80, _data$SewerageConnect81, _data$SewerageConnect82, _data$WaterConnection88, _data$WaterConnection89, _data$WaterConnection90, _data$WaterConnection91, _data$SewerageConnect83, _data$SewerageConnect84, _data$SewerageConnect85, _data$SewerageConnect86, _data$WaterConnection92, _data$WaterConnection93, _data$WaterConnection94, _data$WaterConnection95, _data$SewerageConnect87, _data$SewerageConnect88, _data$SewerageConnect89, _data$SewerageConnect90, _data$WaterConnection96, _data$WaterConnection97, _data$WaterConnection98, _data$WaterConnection99, _data$SewerageConnect91, _data$SewerageConnect92, _data$SewerageConnect93, _data$SewerageConnect94, _data$WaterConnection100, _data$WaterConnection101, _data$WaterConnection102, _data$WaterConnection103, _data$SewerageConnect95, _data$SewerageConnect96, _data$SewerageConnect97, _data$SewerageConnect98, _data$WaterConnection104, _data$WaterConnection105, _data$WaterConnection106, _data$WaterConnection107, _data$SewerageConnect99, _data$SewerageConnect100, _data$SewerageConnect101, _data$SewerageConnect102, _data$WaterConnection108, _data$WaterConnection109, _data$WaterConnection110, _data$WaterConnection111, _data$SewerageConnect103, _data$SewerageConnect104, _data$SewerageConnect105, _data$SewerageConnect106, _data$WaterConnection112, _data$WaterConnection113, _data$WaterConnection114, _data$WaterConnection115, _data$SewerageConnect107, _data$SewerageConnect108, _data$SewerageConnect109, _data$SewerageConnect110, _PTData$Properties24, _PTData$Properties24$, _PTData$Properties24$2, _PTData$Properties24$3, _PTData$Properties25, _PTData$Properties25$, _PTData$Properties26, _PTData$Properties26$, _PTData$Properties26$2, _PTData$Properties26$3, _PTData$Properties27, _PTData$Properties27$, _PTData$Properties28, _PTData$Properties28$, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca3, _propertyAddress$loca4, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _propertyAdditionalDe, _propertyAdditionalDe2, _PTData$Properties29, _PTData$Properties29$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties30, _PTData$Properties30$, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties31, _PTData$Properties31$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _applicationData$addi4, _applicationData$addi5, _applicationData$addi6, _applicationData$prop1, _applicationData$prop10, _applicationData$prop11, _applicationData$addi7, _applicationData$addi8, _applicationData$prop12, _applicationData$prop13, _applicationData$addi9, _applicationData$addi0, _applicationData$prop14, _applicationData$prop15, _applicationData$dueV, _data$WaterConnection120, _data$WaterConnection121, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect115, _data$SewerageConnect116, _data$SewerageConnect117, _data$SewerageConnect118, _data$WaterConnection126, _data$WaterConnection127, _data$WaterConnection128, _data$WaterConnection129, _data$SewerageConnect121, _data$SewerageConnect122, _data$SewerageConnect123, _data$SewerageConnect124, _ref2, _data$WaterConnection130, _data$SewerageConnect125, _ref3, _data$WaterConnection131, _data$SewerageConnect126, _ref4, _ref4$additionalDetai, _data$WaterConnection132, _data$SewerageConnect127, _ref5, _ref5$additionalDetai, _ref5$additionalDetai2, _data$WaterConnection133, _data$SewerageConnect128, _ref6, _ref6$additionalDetai, _data$WaterConnection134, _data$SewerageConnect129, _ref7, _ref7$additionalDetai, _ref7$additionalDetai2, _data$WaterConnection135, _data$SewerageConnect130, _ref8, _ref8$additionalDetai, _ref8$additionalDetai2, _data$WaterConnection136, _data$SewerageConnect131, _ref9, _ref9$plumberInfo, _ref9$plumberInfo$, _data$WaterConnection137, _data$SewerageConnect132, _ref0, _ref0$plumberInfo, _ref0$plumberInfo$, _data$WaterConnection138, _data$SewerageConnect133, _ref1, _ref1$plumberInfo, _ref1$plumberInfo$, _data$WaterConnection139, _data$SewerageConnect134, _ref10, _data$WaterConnection140, _data$SewerageConnect135, _ref11, _data$WaterConnection141, _data$SewerageConnect136, _ref12, _data$WaterConnection142, _data$SewerageConnect137, _ref13, _ref13$additionalDeta, _data$WaterConnection143, _data$SewerageConnect138, _ref14, _ref14$additionalDeta, _data$WaterConnection144, _data$SewerageConnect139, _ref15, _ref15$additionalDeta, _data$WaterConnection145, _data$SewerageConnect140, _ref16, _ref16$additionalDeta, _data$WaterConnection146, _data$SewerageConnect141, _ref17, _data$WaterConnection147, _data$SewerageConnect142, _ref18, _data$WaterConnection148, _data$SewerageConnect143, _ref19, _data$WaterConnection149, _data$SewerageConnect144, _ref20, _data$WaterConnection150, _data$SewerageConnect145, _ref21, _data$WaterConnection151, _data$SewerageConnect146, _ref22, _data$WaterConnection152, _data$SewerageConnect147, _data$WaterConnection153, _data$WaterConnection154, _data$WaterConnection155, _data$WaterConnection156, _data$WaterConnection157, _data$WaterConnection158, _data$SewerageConnect148, _data$SewerageConnect149, _data$SewerageConnect150, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$WaterConnection167, _data$WaterConnection168, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$SewerageConnect162, _data$SewerageConnect163, _data$WaterConnection169, _data$WaterConnection170, _data$SewerageConnect164, _data$SewerageConnect165, _data$WaterConnection171, _data$WaterConnection172, _data$SewerageConnect166, _data$SewerageConnect167, _data$WaterConnection173, _data$WaterConnection174, _data$SewerageConnect168, _data$SewerageConnect169, _data$WaterConnection175, _data$WaterConnection176, _data$WaterConnection177, _data$SewerageConnect170, _data$SewerageConnect171, _data$WaterConnection178, _data$WaterConnection179, _data$SewerageConnect172, _data$SewerageConnect173, _data$WaterConnection180, _data$WaterConnection181, _data$WaterConnection182, _data$WaterConnection183, _data$WaterConnection184, _data$SewerageConnect174, _data$SewerageConnect175, _data$SewerageConnect176, _data$SewerageConnect177, _data$SewerageConnect178, _data$WaterConnection185, _data$WaterConnection186, _data$SewerageConnect179, _data$SewerageConnect180, _data$SewerageConnect181, _data$SewerageConnect182, _data$SewerageConnect183, _data$SewerageConnect184, _data$SewerageConnect185, _data$SewerageConnect186, _data$SewerageConnect187, _data$SewerageConnect188, _data$SewerageConnect189, _data$WaterConnection187, _data$WaterConnection188, _data$WaterConnection189, _data$WaterConnection190, _data$WaterConnection191, _data$WaterConnection192, _data$WaterConnection193, _data$WaterConnection194, _data$WaterConnection195, _data$WaterConnection196, _data$WaterConnection197, _data$WaterConnection198, _data$WaterConnection199, _data$SewerageConnect190, _data$SewerageConnect191, _data$SewerageConnect192, _data$SewerageConnect193, _data$WaterConnection200, _data$SewerageConnect194, _data$WaterConnection201, _data$WaterConnection202, _data$WaterConnection203, _data$WaterConnection204, _data$SewerageConnect195, _data$SewerageConnect196, _data$SewerageConnect197, _data$WaterConnection205, _data$WaterConnection206, _data$WaterConnection207, _data$SewerageConnect198, _data$SewerageConnect199, _data$SewerageConnect200, _data$WaterConnection215, _data$WaterConnection216, _data$WaterConnection217, _data$SewerageConnect207, _data$SewerageConnect208, _data$SewerageConnect209;
47370
+ var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect9, _data$SewerageConnect0, _data$WaterConnection1, _data$WaterConnection10, _data$SewerageConnect1, _data$SewerageConnect10, _data$WaterConnection11, _data$WaterConnection12, _data$SewerageConnect11, _data$SewerageConnect12, _data$WaterConnection13, _data$SewerageConnect13, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _propertyAddress$geoL, _propertyAddress$loca, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties4, _PTData$Properties4$, _PTData$Properties4$$, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties6$$, _PTData$Properties6$$2, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties8, _PTData$Properties8$, _PTData$Properties9, _PTData$Properties9$, _PTData$Properties9$$, _additionalDetails$ge, _additionalDetails$pr, _additionalDetails$pr2, _applicationData$prop, _applicationData$prop2, _applicationData$prop3, _applicationData$prop4, _applicationData$prop5, _propertyAddress$geoL2, _propertyAddress$loca2, _PTData$Properties0, _PTData$Properties0$, _PTData$Properties0$$, _PTData$Properties1, _PTData$Properties1$, _PTData$Properties1$$, _PTData$Properties10, _PTData$Properties10$, _PTData$Properties10$2, _PTData$Properties10$3, _PTData$Properties11, _PTData$Properties11$, _PTData$Properties11$2, _PTData$Properties11$3, _PTData$Properties12, _PTData$Properties12$, _PTData$Properties13, _PTData$Properties13$, _PTData$Properties14, _PTData$Properties14$, _PTData$Properties14$2, _additionalDetails$ge2, _additionalDetails$pr3, _additionalDetails$pr4, _applicationData$prop6, _applicationData$prop7, _applicationData$prop8, _applicationData$prop9, _applicationData$prop0, _PTData$Properties15, _PTData$Properties15$, _PTData$Properties16, _PTData$Properties16$, _additionalDetails$pr5, _additionalDetails$pr6, _PTData$Properties17, _PTData$Properties17$, _PTData$Properties18, _PTData$Properties18$, _PTData$Properties19, _PTData$Properties19$, _PTData$Properties20, _PTData$Properties20$, _PTData$Properties20$2, _PTData$Properties21, _PTData$Properties21$, _PTData$Properties21$2, _data$WaterConnection14, _data$WaterConnection15, _data$WaterConnection16, _data$WaterConnection17, _data$SewerageConnect14, _data$SewerageConnect15, _data$SewerageConnect16, _data$SewerageConnect17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect18, _data$SewerageConnect19, _appDetailsData$appli, _data$WaterConnection38, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect34, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _appDetailsData$appli2, _data$WaterConnection43, _data$WaterConnection44, _data$WaterConnection45, _data$SewerageConnect39, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection46, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$SewerageConnect44, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$WaterConnection57, _data$SewerageConnect50, _data$SewerageConnect51, _data$SewerageConnect52, _data$WaterConnection58, _data$WaterConnection59, _data$SewerageConnect53, _data$SewerageConnect54, _data$WaterConnection60, _data$WaterConnection61, _data$WaterConnection62, _data$SewerageConnect55, _data$SewerageConnect56, _data$SewerageConnect57, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$WaterConnection67, _data$SewerageConnect60, _data$SewerageConnect61, _data$SewerageConnect62, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$WaterConnection72, _data$SewerageConnect65, _data$SewerageConnect66, _data$SewerageConnect67, _data$WaterConnection73, _data$WaterConnection74, _data$WaterConnection75, _data$WaterConnection76, _data$SewerageConnect68, _data$SewerageConnect69, _data$SewerageConnect70, _data$SewerageConnect71, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _applicationData$addi, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection77, _data$WaterConnection78, _data$WaterConnection79, _data$SewerageConnect72, _data$SewerageConnect73, _data$SewerageConnect74, _data$WaterConnection80, _data$WaterConnection81, _data$WaterConnection82, _data$WaterConnection83, _data$SewerageConnect75, _data$SewerageConnect76, _data$SewerageConnect77, _data$SewerageConnect78, _data$WaterConnection84, _data$WaterConnection85, _data$WaterConnection86, _data$WaterConnection87, _data$SewerageConnect79, _data$SewerageConnect80, _data$SewerageConnect81, _data$SewerageConnect82, _data$WaterConnection88, _data$WaterConnection89, _data$WaterConnection90, _data$WaterConnection91, _data$SewerageConnect83, _data$SewerageConnect84, _data$SewerageConnect85, _data$SewerageConnect86, _data$WaterConnection92, _data$WaterConnection93, _data$WaterConnection94, _data$WaterConnection95, _data$SewerageConnect87, _data$SewerageConnect88, _data$SewerageConnect89, _data$SewerageConnect90, _data$WaterConnection96, _data$WaterConnection97, _data$WaterConnection98, _data$WaterConnection99, _data$SewerageConnect91, _data$SewerageConnect92, _data$SewerageConnect93, _data$SewerageConnect94, _data$WaterConnection100, _data$WaterConnection101, _data$WaterConnection102, _data$WaterConnection103, _data$SewerageConnect95, _data$SewerageConnect96, _data$SewerageConnect97, _data$SewerageConnect98, _data$WaterConnection104, _data$WaterConnection105, _data$WaterConnection106, _data$WaterConnection107, _data$SewerageConnect99, _data$SewerageConnect100, _data$SewerageConnect101, _data$SewerageConnect102, _data$WaterConnection108, _data$WaterConnection109, _data$WaterConnection110, _data$WaterConnection111, _data$SewerageConnect103, _data$SewerageConnect104, _data$SewerageConnect105, _data$SewerageConnect106, _data$WaterConnection112, _data$WaterConnection113, _data$WaterConnection114, _data$WaterConnection115, _data$SewerageConnect107, _data$SewerageConnect108, _data$SewerageConnect109, _data$SewerageConnect110, _PTData$Properties24, _PTData$Properties24$, _PTData$Properties24$2, _PTData$Properties24$3, _PTData$Properties25, _PTData$Properties25$, _PTData$Properties26, _PTData$Properties26$, _PTData$Properties26$2, _PTData$Properties26$3, _PTData$Properties27, _PTData$Properties27$, _PTData$Properties28, _PTData$Properties28$, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca3, _propertyAddress$loca4, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _propertyAdditionalDe, _propertyAdditionalDe2, _propertyAdditionalDe3, _propertyAdditionalDe4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$WaterConn, _useDetails$WaterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _propertyAdditionalDe7, _PTData$Properties29, _PTData$Properties29$, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyC3, _applicationData$prop1, _propertyAdditionalDe8, _propertyAdditionalDe9, _propertyAdditionalDe0, _PTData$Properties30, _PTData$Properties30$, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$propertyT3, _PTData$Properties31, _PTData$Properties31$, _PTData$Properties32, _PTData$Properties32$, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties33, _PTData$Properties33$, _PTData$Properties34, _PTData$Properties34$, _PTData$Properties35, _PTData$Properties35$, _PTData$Properties36, _PTData$Properties36$, _PTData$Properties37, _PTData$Properties37$, _PTData$Properties38, _PTData$Properties38$, _PTData$Properties39, _PTData$Properties39$, _PTData$Properties40, _PTData$Properties40$, _PTData$Properties41, _PTData$Properties41$, _propertyAdditionalDe1, _propertyAdditionalDe10, _propertyAdditionalDe11, _propertyAdditionalDe12, _propertyAdditionalDe13, _propertyAdditionalDe14, _propertyAdditionalDe15, _propertyAdditionalDe16, _propertyAdditionalDe17, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _propertyAdditionalDe18, _propertyAdditionalDe19, _PTData$Properties42, _PTData$Properties42$, _PTData$Properties43, _PTData$Properties43$, _useDetails$propertyC4, _useDetails$propertyC5, _applicationData$addi4, _applicationData$addi5, _applicationData$addi6, _applicationData$prop10, _applicationData$prop11, _applicationData$prop12, _PTData$Properties44, _PTData$Properties44$, _PTData$Properties45, _PTData$Properties45$, _PTData$Properties46, _PTData$Properties46$, _PTData$Properties47, _PTData$Properties47$, _PTData$Properties48, _PTData$Properties48$, _PTData$Properties49, _PTData$Properties49$, _PTData$Properties50, _PTData$Properties50$, _PTData$Properties51, _PTData$Properties51$, _PTData$Properties52, _PTData$Properties52$, _PTData$Properties53, _PTData$Properties53$, _PTData$Properties54, _PTData$Properties54$, _PTData$Properties55, _PTData$Properties55$, _PTData$Properties56, _PTData$Properties56$, _applicationData$addi7, _applicationData$addi8, _applicationData$prop13, _applicationData$prop14, _PTData$Properties57, _PTData$Properties57$, _applicationData$addi9, _applicationData$addi0, _applicationData$prop15, _applicationData$prop16, _applicationData$dueV, _data$WaterConnection120, _data$WaterConnection121, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect115, _data$SewerageConnect116, _data$SewerageConnect117, _data$SewerageConnect118, _data$WaterConnection126, _data$WaterConnection127, _data$WaterConnection128, _data$WaterConnection129, _data$SewerageConnect121, _data$SewerageConnect122, _data$SewerageConnect123, _data$SewerageConnect124, _ref2, _data$WaterConnection130, _data$SewerageConnect125, _ref3, _data$WaterConnection131, _data$SewerageConnect126, _ref4, _ref4$additionalDetai, _data$WaterConnection132, _data$SewerageConnect127, _ref5, _ref5$additionalDetai, _ref5$additionalDetai2, _data$WaterConnection133, _data$SewerageConnect128, _ref6, _ref6$additionalDetai, _data$WaterConnection134, _data$SewerageConnect129, _ref7, _ref7$additionalDetai, _ref7$additionalDetai2, _data$WaterConnection135, _data$SewerageConnect130, _ref8, _ref8$additionalDetai, _ref8$additionalDetai2, _data$WaterConnection136, _data$SewerageConnect131, _ref9, _ref9$plumberInfo, _ref9$plumberInfo$, _data$WaterConnection137, _data$SewerageConnect132, _ref0, _ref0$plumberInfo, _ref0$plumberInfo$, _data$WaterConnection138, _data$SewerageConnect133, _ref1, _ref1$plumberInfo, _ref1$plumberInfo$, _data$WaterConnection139, _data$SewerageConnect134, _ref10, _data$WaterConnection140, _data$SewerageConnect135, _ref11, _data$WaterConnection141, _data$SewerageConnect136, _ref12, _data$WaterConnection142, _data$SewerageConnect137, _ref13, _ref13$additionalDeta, _data$WaterConnection143, _data$SewerageConnect138, _ref14, _ref14$additionalDeta, _data$WaterConnection144, _data$SewerageConnect139, _ref15, _ref15$additionalDeta, _data$WaterConnection145, _data$SewerageConnect140, _ref16, _ref16$additionalDeta, _data$WaterConnection146, _data$SewerageConnect141, _ref17, _data$WaterConnection147, _data$SewerageConnect142, _ref18, _data$WaterConnection148, _data$SewerageConnect143, _ref19, _data$WaterConnection149, _data$SewerageConnect144, _ref20, _data$WaterConnection150, _data$SewerageConnect145, _ref21, _data$WaterConnection151, _data$SewerageConnect146, _ref22, _data$WaterConnection152, _data$SewerageConnect147, _data$WaterConnection153, _data$WaterConnection154, _data$WaterConnection155, _data$WaterConnection156, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160, _data$WaterConnection161, _data$WaterConnection162, _data$WaterConnection163, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$SewerageConnect148, _data$SewerageConnect149, _data$SewerageConnect150, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$SewerageConnect155, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$WaterConnection172, _data$WaterConnection173, _data$WaterConnection174, _data$WaterConnection175, _data$WaterConnection176, _data$SewerageConnect167, _data$SewerageConnect168, _data$SewerageConnect169, _data$SewerageConnect170, _data$SewerageConnect171, _data$WaterConnection177, _data$WaterConnection178, _data$SewerageConnect172, _data$SewerageConnect173, _data$WaterConnection179, _data$WaterConnection180, _data$SewerageConnect174, _data$SewerageConnect175, _data$WaterConnection181, _data$WaterConnection182, _data$SewerageConnect176, _data$SewerageConnect177, _data$WaterConnection183, _data$WaterConnection184, _data$WaterConnection185, _data$SewerageConnect178, _data$SewerageConnect179, _data$WaterConnection186, _data$WaterConnection187, _data$SewerageConnect180, _data$SewerageConnect181, _data$WaterConnection188, _data$WaterConnection189, _data$WaterConnection190, _data$WaterConnection191, _data$WaterConnection192, _data$SewerageConnect182, _data$SewerageConnect183, _data$SewerageConnect184, _data$SewerageConnect185, _data$SewerageConnect186, _data$WaterConnection193, _data$WaterConnection194, _data$SewerageConnect187, _data$SewerageConnect188, _data$SewerageConnect189, _data$SewerageConnect190, _data$SewerageConnect191, _data$SewerageConnect192, _data$SewerageConnect193, _data$SewerageConnect194, _data$SewerageConnect195, _data$SewerageConnect196, _data$SewerageConnect197, _data$WaterConnection195, _data$WaterConnection196, _data$WaterConnection197, _data$WaterConnection198, _data$WaterConnection199, _data$WaterConnection200, _data$WaterConnection201, _data$WaterConnection202, _data$WaterConnection203, _data$WaterConnection204, _data$WaterConnection205, _data$WaterConnection206, _data$WaterConnection207, _data$SewerageConnect198, _data$SewerageConnect199, _data$SewerageConnect200, _data$SewerageConnect201, _data$WaterConnection208, _data$SewerageConnect202, _data$WaterConnection209, _data$WaterConnection210, _data$WaterConnection211, _data$WaterConnection212, _data$SewerageConnect203, _data$SewerageConnect204, _data$SewerageConnect205, _data$WaterConnection213, _data$WaterConnection214, _data$WaterConnection215, _data$SewerageConnect206, _data$SewerageConnect207, _data$SewerageConnect208, _data$WaterConnection223, _data$WaterConnection224, _data$WaterConnection225, _data$SewerageConnect215, _data$SewerageConnect216, _data$SewerageConnect217;
45248
47371
  const getDisconnectionNoticeSearch = function () {
45249
47372
  try {
45250
- var _data$WaterConnection219, _data$WaterConnection220, _data$SewerageConnect211, _data$SewerageConnect212;
47373
+ var _data$WaterConnection227, _data$WaterConnection228, _data$SewerageConnect219, _data$SewerageConnect220;
45251
47374
  let key = "ws-waterdisconnectionnotice";
45252
47375
  let details = {};
45253
47376
  if (applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("WS")) {
45254
- var _data$WaterConnection218, _PTData$Properties33;
47377
+ var _data$WaterConnection226, _PTData$Properties59;
45255
47378
  details = {
45256
47379
  WaterConnection: [{
45257
- ...(data === null || data === void 0 ? void 0 : (_data$WaterConnection218 = data.WaterConnection) === null || _data$WaterConnection218 === void 0 ? void 0 : _data$WaterConnection218[0]),
45258
- property: PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties33 = PTData.Properties) === null || _PTData$Properties33 === void 0 ? void 0 : _PTData$Properties33[0]
47380
+ ...(data === null || data === void 0 ? void 0 : (_data$WaterConnection226 = data.WaterConnection) === null || _data$WaterConnection226 === void 0 ? void 0 : _data$WaterConnection226[0]),
47381
+ property: PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties59 = PTData.Properties) === null || _PTData$Properties59 === void 0 ? void 0 : _PTData$Properties59[0]
45259
47382
  }]
45260
47383
  };
45261
47384
  } else {
45262
- var _data$SewerageConnect210, _PTData$Properties34;
47385
+ var _data$SewerageConnect218, _PTData$Properties60;
45263
47386
  key = "ws-seweragedisconnectionnotice";
45264
47387
  details = {
45265
47388
  SewerageConnection: [{
45266
- ...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect210 = data.SewerageConnections) === null || _data$SewerageConnect210 === void 0 ? void 0 : _data$SewerageConnect210[0]),
45267
- property: PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties34 = PTData.Properties) === null || _PTData$Properties34 === void 0 ? void 0 : _PTData$Properties34[0]
47389
+ ...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect218 = data.SewerageConnections) === null || _data$SewerageConnect218 === void 0 ? void 0 : _data$SewerageConnect218[0]),
47390
+ property: PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties60 = PTData.Properties) === null || _PTData$Properties60 === void 0 ? void 0 : _PTData$Properties60[0]
45268
47391
  }]
45269
47392
  };
45270
47393
  }
45271
- return Promise.resolve(Digit.WSService.WSDisconnectionNotice((data === null || data === void 0 ? void 0 : (_data$WaterConnection219 = data.WaterConnection) === null || _data$WaterConnection219 === void 0 ? void 0 : (_data$WaterConnection220 = _data$WaterConnection219[0]) === null || _data$WaterConnection220 === void 0 ? void 0 : _data$WaterConnection220.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect211 = data.SewerageConnections) === null || _data$SewerageConnect211 === void 0 ? void 0 : (_data$SewerageConnect212 = _data$SewerageConnect211[0]) === null || _data$SewerageConnect212 === void 0 ? void 0 : _data$SewerageConnect212.tenantId), details, key)).then(function (response) {
45272
- var _data$WaterConnection221, _data$WaterConnection222, _data$SewerageConnect213, _data$SewerageConnect214;
45273
- return Promise.resolve(Digit.PaymentService.printReciept((data === null || data === void 0 ? void 0 : (_data$WaterConnection221 = data.WaterConnection) === null || _data$WaterConnection221 === void 0 ? void 0 : (_data$WaterConnection222 = _data$WaterConnection221[0]) === null || _data$WaterConnection222 === void 0 ? void 0 : _data$WaterConnection222.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect213 = data.SewerageConnections) === null || _data$SewerageConnect213 === void 0 ? void 0 : (_data$SewerageConnect214 = _data$SewerageConnect213[0]) === null || _data$SewerageConnect214 === void 0 ? void 0 : _data$SewerageConnect214.tenantId), {
47394
+ return Promise.resolve(Digit.WSService.WSDisconnectionNotice((data === null || data === void 0 ? void 0 : (_data$WaterConnection227 = data.WaterConnection) === null || _data$WaterConnection227 === void 0 ? void 0 : (_data$WaterConnection228 = _data$WaterConnection227[0]) === null || _data$WaterConnection228 === void 0 ? void 0 : _data$WaterConnection228.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect219 = data.SewerageConnections) === null || _data$SewerageConnect219 === void 0 ? void 0 : (_data$SewerageConnect220 = _data$SewerageConnect219[0]) === null || _data$SewerageConnect220 === void 0 ? void 0 : _data$SewerageConnect220.tenantId), details, key)).then(function (response) {
47395
+ var _data$WaterConnection229, _data$WaterConnection230, _data$SewerageConnect221, _data$SewerageConnect222;
47396
+ return Promise.resolve(Digit.PaymentService.printReciept((data === null || data === void 0 ? void 0 : (_data$WaterConnection229 = data.WaterConnection) === null || _data$WaterConnection229 === void 0 ? void 0 : (_data$WaterConnection230 = _data$WaterConnection229[0]) === null || _data$WaterConnection230 === void 0 ? void 0 : _data$WaterConnection230.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect221 = data.SewerageConnections) === null || _data$SewerageConnect221 === void 0 ? void 0 : (_data$SewerageConnect222 = _data$SewerageConnect221[0]) === null || _data$SewerageConnect222 === void 0 ? void 0 : _data$SewerageConnect222.tenantId), {
45274
47397
  fileStoreIds: response.filestoreIds[0]
45275
47398
  })).then(function (fileStore) {
45276
47399
  window.open(fileStore[response === null || response === void 0 ? void 0 : response.filestoreIds[0]], "_blank");
@@ -45434,10 +47557,10 @@ const WSApplicationDetails = () => {
45434
47557
  const propertyAdditionalDetails = (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties = PTData.Properties) === null || _PTData$Properties === void 0 ? void 0 : (_PTData$Properties$ = _PTData$Properties[0]) === null || _PTData$Properties$ === void 0 ? void 0 : _PTData$Properties$.additionalDetails) || {};
45435
47558
  const djbEmployee = additionalDetails;
45436
47559
  const propertyAddress = (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties2 = PTData.Properties) === null || _PTData$Properties2 === void 0 ? void 0 : (_PTData$Properties2$ = _PTData$Properties2[0]) === null || _PTData$Properties2$ === void 0 ? void 0 : _PTData$Properties2$.address) || additionalDetails;
45437
- const rawLatitude = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.Latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$geoL = propertyAddress.geoLocation) === null || _propertyAddress$geoL === void 0 ? void 0 : _propertyAddress$geoL.latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca = propertyAddress.locality) === null || _propertyAddress$loca === void 0 ? void 0 : _propertyAddress$loca.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.Latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$ge = additionalDetails.geoLocation) === null || _additionalDetails$ge === void 0 ? void 0 : _additionalDetails$ge.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr === void 0 ? void 0 : _additionalDetails$pr.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr2 = additionalDetails.propertyAddress) === null || _additionalDetails$pr2 === void 0 ? void 0 : _additionalDetails$pr2.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties3 = PTData.Properties) === null || _PTData$Properties3 === void 0 ? void 0 : (_PTData$Properties3$ = _PTData$Properties3[0]) === null || _PTData$Properties3$ === void 0 ? void 0 : (_PTData$Properties3$$ = _PTData$Properties3$.address) === null || _PTData$Properties3$$ === void 0 ? void 0 : _PTData$Properties3$$.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties4 = PTData.Properties) === null || _PTData$Properties4 === void 0 ? void 0 : (_PTData$Properties4$ = _PTData$Properties4[0]) === null || _PTData$Properties4$ === void 0 ? void 0 : (_PTData$Properties4$$ = _PTData$Properties4$.address) === null || _PTData$Properties4$$ === void 0 ? void 0 : _PTData$Properties4$$.Latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties5 = PTData.Properties) === null || _PTData$Properties5 === void 0 ? void 0 : (_PTData$Properties5$ = _PTData$Properties5[0]) === null || _PTData$Properties5$ === void 0 ? void 0 : (_PTData$Properties5$$ = _PTData$Properties5$.address) === null || _PTData$Properties5$$ === void 0 ? void 0 : (_PTData$Properties5$$2 = _PTData$Properties5$$.geoLocation) === null || _PTData$Properties5$$2 === void 0 ? void 0 : _PTData$Properties5$$2.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties6 = PTData.Properties) === null || _PTData$Properties6 === void 0 ? void 0 : (_PTData$Properties6$ = _PTData$Properties6[0]) === null || _PTData$Properties6$ === void 0 ? void 0 : (_PTData$Properties6$$ = _PTData$Properties6$.address) === null || _PTData$Properties6$$ === void 0 ? void 0 : (_PTData$Properties6$$2 = _PTData$Properties6$$.locality) === null || _PTData$Properties6$$2 === void 0 ? void 0 : _PTData$Properties6$$2.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties7 = PTData.Properties) === null || _PTData$Properties7 === void 0 ? void 0 : (_PTData$Properties7$ = _PTData$Properties7[0]) === null || _PTData$Properties7$ === void 0 ? void 0 : _PTData$Properties7$.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties8 = PTData.Properties) === null || _PTData$Properties8 === void 0 ? void 0 : (_PTData$Properties8$ = _PTData$Properties8[0]) === null || _PTData$Properties8$ === void 0 ? void 0 : _PTData$Properties8$.Latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties9 = PTData.Properties) === null || _PTData$Properties9 === void 0 ? void 0 : (_PTData$Properties9$ = _PTData$Properties9[0]) === null || _PTData$Properties9$ === void 0 ? void 0 : (_PTData$Properties9$$ = _PTData$Properties9$.additionalDetails) === null || _PTData$Properties9$$ === void 0 ? void 0 : _PTData$Properties9$$.latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop = applicationData.property) === null || _applicationData$prop === void 0 ? void 0 : (_applicationData$prop2 = _applicationData$prop.address) === null || _applicationData$prop2 === void 0 ? void 0 : _applicationData$prop2.latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop3 = applicationData.property) === null || _applicationData$prop3 === void 0 ? void 0 : (_applicationData$prop4 = _applicationData$prop3.address) === null || _applicationData$prop4 === void 0 ? void 0 : _applicationData$prop4.Latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop5 = applicationData.propertyAddress) === null || _applicationData$prop5 === void 0 ? void 0 : _applicationData$prop5.latitude) || "";
45438
- const rawLongitude = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.Longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$geoL2 = propertyAddress.geoLocation) === null || _propertyAddress$geoL2 === void 0 ? void 0 : _propertyAddress$geoL2.longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca2 = propertyAddress.locality) === null || _propertyAddress$loca2 === void 0 ? void 0 : _propertyAddress$loca2.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.Longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$ge2 = additionalDetails.geoLocation) === null || _additionalDetails$ge2 === void 0 ? void 0 : _additionalDetails$ge2.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr3 = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr3 === void 0 ? void 0 : _additionalDetails$pr3.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr4 = additionalDetails.propertyAddress) === null || _additionalDetails$pr4 === void 0 ? void 0 : _additionalDetails$pr4.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties0 = PTData.Properties) === null || _PTData$Properties0 === void 0 ? void 0 : (_PTData$Properties0$ = _PTData$Properties0[0]) === null || _PTData$Properties0$ === void 0 ? void 0 : (_PTData$Properties0$$ = _PTData$Properties0$.address) === null || _PTData$Properties0$$ === void 0 ? void 0 : _PTData$Properties0$$.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties1 = PTData.Properties) === null || _PTData$Properties1 === void 0 ? void 0 : (_PTData$Properties1$ = _PTData$Properties1[0]) === null || _PTData$Properties1$ === void 0 ? void 0 : (_PTData$Properties1$$ = _PTData$Properties1$.address) === null || _PTData$Properties1$$ === void 0 ? void 0 : _PTData$Properties1$$.Longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties10 = PTData.Properties) === null || _PTData$Properties10 === void 0 ? void 0 : (_PTData$Properties10$ = _PTData$Properties10[0]) === null || _PTData$Properties10$ === void 0 ? void 0 : (_PTData$Properties10$2 = _PTData$Properties10$.address) === null || _PTData$Properties10$2 === void 0 ? void 0 : (_PTData$Properties10$3 = _PTData$Properties10$2.geoLocation) === null || _PTData$Properties10$3 === void 0 ? void 0 : _PTData$Properties10$3.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties11 = PTData.Properties) === null || _PTData$Properties11 === void 0 ? void 0 : (_PTData$Properties11$ = _PTData$Properties11[0]) === null || _PTData$Properties11$ === void 0 ? void 0 : (_PTData$Properties11$2 = _PTData$Properties11$.address) === null || _PTData$Properties11$2 === void 0 ? void 0 : (_PTData$Properties11$3 = _PTData$Properties11$2.locality) === null || _PTData$Properties11$3 === void 0 ? void 0 : _PTData$Properties11$3.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties12 = PTData.Properties) === null || _PTData$Properties12 === void 0 ? void 0 : (_PTData$Properties12$ = _PTData$Properties12[0]) === null || _PTData$Properties12$ === void 0 ? void 0 : _PTData$Properties12$.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties13 = PTData.Properties) === null || _PTData$Properties13 === void 0 ? void 0 : (_PTData$Properties13$ = _PTData$Properties13[0]) === null || _PTData$Properties13$ === void 0 ? void 0 : _PTData$Properties13$.Longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties14 = PTData.Properties) === null || _PTData$Properties14 === void 0 ? void 0 : (_PTData$Properties14$ = _PTData$Properties14[0]) === null || _PTData$Properties14$ === void 0 ? void 0 : (_PTData$Properties14$2 = _PTData$Properties14$.additionalDetails) === null || _PTData$Properties14$2 === void 0 ? void 0 : _PTData$Properties14$2.longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop6 = applicationData.property) === null || _applicationData$prop6 === void 0 ? void 0 : (_applicationData$prop7 = _applicationData$prop6.address) === null || _applicationData$prop7 === void 0 ? void 0 : _applicationData$prop7.longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop8 = applicationData.property) === null || _applicationData$prop8 === void 0 ? void 0 : (_applicationData$prop9 = _applicationData$prop8.address) === null || _applicationData$prop9 === void 0 ? void 0 : _applicationData$prop9.Longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop0 = applicationData.propertyAddress) === null || _applicationData$prop0 === void 0 ? void 0 : _applicationData$prop0.longitude) || "";
45439
- const rawFloorConsumerResides = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr5 = additionalDetails.propertyAddress) === null || _additionalDetails$pr5 === void 0 ? void 0 : _additionalDetails$pr5.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr6 = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr6 === void 0 ? void 0 : _additionalDetails$pr6.atWhichFloorConsumerResides) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.numberOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.noOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.numberOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.noOfFloors) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.atWhichFloorConsumerResides) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties15 = PTData.Properties) === null || _PTData$Properties15 === void 0 ? void 0 : (_PTData$Properties15$ = _PTData$Properties15[0]) === null || _PTData$Properties15$ === void 0 ? void 0 : _PTData$Properties15$.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties16 = PTData.Properties) === null || _PTData$Properties16 === void 0 ? void 0 : (_PTData$Properties16$ = _PTData$Properties16[0]) === null || _PTData$Properties16$ === void 0 ? void 0 : _PTData$Properties16$.numberOfFloors) || "";
45440
- const rawTotalFloors = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalNumberOfFloorInTheBuilding) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalNoOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalNumberOfFloorInTheBuilding) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalNoOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalNumberOfFloorInTheBuilding) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalNoOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties17 = PTData.Properties) === null || _PTData$Properties17 === void 0 ? void 0 : (_PTData$Properties17$ = _PTData$Properties17[0]) === null || _PTData$Properties17$ === void 0 ? void 0 : _PTData$Properties17$.totalNumberOfFloorInTheBuilding) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties18 = PTData.Properties) === null || _PTData$Properties18 === void 0 ? void 0 : (_PTData$Properties18$ = _PTData$Properties18[0]) === null || _PTData$Properties18$ === void 0 ? void 0 : _PTData$Properties18$.totalNoOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties19 = PTData.Properties) === null || _PTData$Properties19 === void 0 ? void 0 : (_PTData$Properties19$ = _PTData$Properties19[0]) === null || _PTData$Properties19$ === void 0 ? void 0 : _PTData$Properties19$.totalFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties20 = PTData.Properties) === null || _PTData$Properties20 === void 0 ? void 0 : (_PTData$Properties20$ = _PTData$Properties20[0]) === null || _PTData$Properties20$ === void 0 ? void 0 : (_PTData$Properties20$2 = _PTData$Properties20$.address) === null || _PTData$Properties20$2 === void 0 ? void 0 : _PTData$Properties20$2.totalNoOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties21 = PTData.Properties) === null || _PTData$Properties21 === void 0 ? void 0 : (_PTData$Properties21$ = _PTData$Properties21[0]) === null || _PTData$Properties21$ === void 0 ? void 0 : (_PTData$Properties21$2 = _PTData$Properties21$.address) === null || _PTData$Properties21$2 === void 0 ? void 0 : _PTData$Properties21$2.totalFloors) || "";
47560
+ const rawLatitude = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.Latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$geoL = propertyAddress.geoLocation) === null || _propertyAddress$geoL === void 0 ? void 0 : _propertyAddress$geoL.latitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca = propertyAddress.locality) === null || _propertyAddress$loca === void 0 ? void 0 : _propertyAddress$loca.latitude) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties3 = PTData.Properties) === null || _PTData$Properties3 === void 0 ? void 0 : (_PTData$Properties3$ = _PTData$Properties3[0]) === null || _PTData$Properties3$ === void 0 ? void 0 : (_PTData$Properties3$$ = _PTData$Properties3$.address) === null || _PTData$Properties3$$ === void 0 ? void 0 : _PTData$Properties3$$.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties4 = PTData.Properties) === null || _PTData$Properties4 === void 0 ? void 0 : (_PTData$Properties4$ = _PTData$Properties4[0]) === null || _PTData$Properties4$ === void 0 ? void 0 : (_PTData$Properties4$$ = _PTData$Properties4$.address) === null || _PTData$Properties4$$ === void 0 ? void 0 : _PTData$Properties4$$.Latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties5 = PTData.Properties) === null || _PTData$Properties5 === void 0 ? void 0 : (_PTData$Properties5$ = _PTData$Properties5[0]) === null || _PTData$Properties5$ === void 0 ? void 0 : (_PTData$Properties5$$ = _PTData$Properties5$.address) === null || _PTData$Properties5$$ === void 0 ? void 0 : (_PTData$Properties5$$2 = _PTData$Properties5$$.geoLocation) === null || _PTData$Properties5$$2 === void 0 ? void 0 : _PTData$Properties5$$2.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties6 = PTData.Properties) === null || _PTData$Properties6 === void 0 ? void 0 : (_PTData$Properties6$ = _PTData$Properties6[0]) === null || _PTData$Properties6$ === void 0 ? void 0 : (_PTData$Properties6$$ = _PTData$Properties6$.address) === null || _PTData$Properties6$$ === void 0 ? void 0 : (_PTData$Properties6$$2 = _PTData$Properties6$$.locality) === null || _PTData$Properties6$$2 === void 0 ? void 0 : _PTData$Properties6$$2.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties7 = PTData.Properties) === null || _PTData$Properties7 === void 0 ? void 0 : (_PTData$Properties7$ = _PTData$Properties7[0]) === null || _PTData$Properties7$ === void 0 ? void 0 : _PTData$Properties7$.latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties8 = PTData.Properties) === null || _PTData$Properties8 === void 0 ? void 0 : (_PTData$Properties8$ = _PTData$Properties8[0]) === null || _PTData$Properties8$ === void 0 ? void 0 : _PTData$Properties8$.Latitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties9 = PTData.Properties) === null || _PTData$Properties9 === void 0 ? void 0 : (_PTData$Properties9$ = _PTData$Properties9[0]) === null || _PTData$Properties9$ === void 0 ? void 0 : (_PTData$Properties9$$ = _PTData$Properties9$.additionalDetails) === null || _PTData$Properties9$$ === void 0 ? void 0 : _PTData$Properties9$$.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.Latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$ge = additionalDetails.geoLocation) === null || _additionalDetails$ge === void 0 ? void 0 : _additionalDetails$ge.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr === void 0 ? void 0 : _additionalDetails$pr.latitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr2 = additionalDetails.propertyAddress) === null || _additionalDetails$pr2 === void 0 ? void 0 : _additionalDetails$pr2.latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop = applicationData.property) === null || _applicationData$prop === void 0 ? void 0 : (_applicationData$prop2 = _applicationData$prop.address) === null || _applicationData$prop2 === void 0 ? void 0 : _applicationData$prop2.latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop3 = applicationData.property) === null || _applicationData$prop3 === void 0 ? void 0 : (_applicationData$prop4 = _applicationData$prop3.address) === null || _applicationData$prop4 === void 0 ? void 0 : _applicationData$prop4.Latitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop5 = applicationData.propertyAddress) === null || _applicationData$prop5 === void 0 ? void 0 : _applicationData$prop5.latitude) || "";
47561
+ const rawLongitude = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.Longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$geoL2 = propertyAddress.geoLocation) === null || _propertyAddress$geoL2 === void 0 ? void 0 : _propertyAddress$geoL2.longitude) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca2 = propertyAddress.locality) === null || _propertyAddress$loca2 === void 0 ? void 0 : _propertyAddress$loca2.longitude) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties0 = PTData.Properties) === null || _PTData$Properties0 === void 0 ? void 0 : (_PTData$Properties0$ = _PTData$Properties0[0]) === null || _PTData$Properties0$ === void 0 ? void 0 : (_PTData$Properties0$$ = _PTData$Properties0$.address) === null || _PTData$Properties0$$ === void 0 ? void 0 : _PTData$Properties0$$.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties1 = PTData.Properties) === null || _PTData$Properties1 === void 0 ? void 0 : (_PTData$Properties1$ = _PTData$Properties1[0]) === null || _PTData$Properties1$ === void 0 ? void 0 : (_PTData$Properties1$$ = _PTData$Properties1$.address) === null || _PTData$Properties1$$ === void 0 ? void 0 : _PTData$Properties1$$.Longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties10 = PTData.Properties) === null || _PTData$Properties10 === void 0 ? void 0 : (_PTData$Properties10$ = _PTData$Properties10[0]) === null || _PTData$Properties10$ === void 0 ? void 0 : (_PTData$Properties10$2 = _PTData$Properties10$.address) === null || _PTData$Properties10$2 === void 0 ? void 0 : (_PTData$Properties10$3 = _PTData$Properties10$2.geoLocation) === null || _PTData$Properties10$3 === void 0 ? void 0 : _PTData$Properties10$3.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties11 = PTData.Properties) === null || _PTData$Properties11 === void 0 ? void 0 : (_PTData$Properties11$ = _PTData$Properties11[0]) === null || _PTData$Properties11$ === void 0 ? void 0 : (_PTData$Properties11$2 = _PTData$Properties11$.address) === null || _PTData$Properties11$2 === void 0 ? void 0 : (_PTData$Properties11$3 = _PTData$Properties11$2.locality) === null || _PTData$Properties11$3 === void 0 ? void 0 : _PTData$Properties11$3.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties12 = PTData.Properties) === null || _PTData$Properties12 === void 0 ? void 0 : (_PTData$Properties12$ = _PTData$Properties12[0]) === null || _PTData$Properties12$ === void 0 ? void 0 : _PTData$Properties12$.longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties13 = PTData.Properties) === null || _PTData$Properties13 === void 0 ? void 0 : (_PTData$Properties13$ = _PTData$Properties13[0]) === null || _PTData$Properties13$ === void 0 ? void 0 : _PTData$Properties13$.Longitude) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties14 = PTData.Properties) === null || _PTData$Properties14 === void 0 ? void 0 : (_PTData$Properties14$ = _PTData$Properties14[0]) === null || _PTData$Properties14$ === void 0 ? void 0 : (_PTData$Properties14$2 = _PTData$Properties14$.additionalDetails) === null || _PTData$Properties14$2 === void 0 ? void 0 : _PTData$Properties14$2.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.Longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$ge2 = additionalDetails.geoLocation) === null || _additionalDetails$ge2 === void 0 ? void 0 : _additionalDetails$ge2.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr3 = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr3 === void 0 ? void 0 : _additionalDetails$pr3.longitude) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr4 = additionalDetails.propertyAddress) === null || _additionalDetails$pr4 === void 0 ? void 0 : _additionalDetails$pr4.longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop6 = applicationData.property) === null || _applicationData$prop6 === void 0 ? void 0 : (_applicationData$prop7 = _applicationData$prop6.address) === null || _applicationData$prop7 === void 0 ? void 0 : _applicationData$prop7.longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop8 = applicationData.property) === null || _applicationData$prop8 === void 0 ? void 0 : (_applicationData$prop9 = _applicationData$prop8.address) === null || _applicationData$prop9 === void 0 ? void 0 : _applicationData$prop9.Longitude) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop0 = applicationData.propertyAddress) === null || _applicationData$prop0 === void 0 ? void 0 : _applicationData$prop0.longitude) || "";
47562
+ const rawFloorConsumerResides = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.atWhichFloorConsumerResides) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.atWhichFloorConsumerResides) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.numberOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties15 = PTData.Properties) === null || _PTData$Properties15 === void 0 ? void 0 : (_PTData$Properties15$ = _PTData$Properties15[0]) === null || _PTData$Properties15$ === void 0 ? void 0 : _PTData$Properties15$.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties16 = PTData.Properties) === null || _PTData$Properties16 === void 0 ? void 0 : (_PTData$Properties16$ = _PTData$Properties16[0]) === null || _PTData$Properties16$ === void 0 ? void 0 : _PTData$Properties16$.numberOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr5 = additionalDetails.propertyAddress) === null || _additionalDetails$pr5 === void 0 ? void 0 : _additionalDetails$pr5.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : (_additionalDetails$pr6 = additionalDetails.propertyLocationDetails) === null || _additionalDetails$pr6 === void 0 ? void 0 : _additionalDetails$pr6.atWhichFloorConsumerResides) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.numberOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.noOfFloors) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfFloors) || "";
47563
+ const rawTotalFloors = (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalNumberOfFloorInTheBuilding) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalNoOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.totalFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalNumberOfFloorInTheBuilding) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalNoOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.totalFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties17 = PTData.Properties) === null || _PTData$Properties17 === void 0 ? void 0 : (_PTData$Properties17$ = _PTData$Properties17[0]) === null || _PTData$Properties17$ === void 0 ? void 0 : _PTData$Properties17$.totalNumberOfFloorInTheBuilding) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties18 = PTData.Properties) === null || _PTData$Properties18 === void 0 ? void 0 : (_PTData$Properties18$ = _PTData$Properties18[0]) === null || _PTData$Properties18$ === void 0 ? void 0 : _PTData$Properties18$.totalNoOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties19 = PTData.Properties) === null || _PTData$Properties19 === void 0 ? void 0 : (_PTData$Properties19$ = _PTData$Properties19[0]) === null || _PTData$Properties19$ === void 0 ? void 0 : _PTData$Properties19$.totalFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties20 = PTData.Properties) === null || _PTData$Properties20 === void 0 ? void 0 : (_PTData$Properties20$ = _PTData$Properties20[0]) === null || _PTData$Properties20$ === void 0 ? void 0 : (_PTData$Properties20$2 = _PTData$Properties20$.address) === null || _PTData$Properties20$2 === void 0 ? void 0 : _PTData$Properties20$2.totalNoOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties21 = PTData.Properties) === null || _PTData$Properties21 === void 0 ? void 0 : (_PTData$Properties21$ = _PTData$Properties21[0]) === null || _PTData$Properties21$ === void 0 ? void 0 : (_PTData$Properties21$2 = _PTData$Properties21$.address) === null || _PTData$Properties21$2 === void 0 ? void 0 : _PTData$Properties21$2.totalFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalNumberOfFloorInTheBuilding) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalNoOfFloors) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.totalFloors) || "";
45441
47564
  const getFloorDisplay = val => {
45442
47565
  if (val === undefined || val === null || val === "") return "";
45443
47566
  if (typeof val === "object") {
@@ -45459,7 +47582,7 @@ const WSApplicationDetails = () => {
45459
47582
  }) || false;
45460
47583
  const applicationStatus = (data === null || data === void 0 ? void 0 : (_data$WaterConnection18 = data.WaterConnection) === null || _data$WaterConnection18 === void 0 ? void 0 : (_data$WaterConnection19 = _data$WaterConnection18[0]) === null || _data$WaterConnection19 === void 0 ? void 0 : _data$WaterConnection19.applicationStatus) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect18 = data.SewerageConnections) === null || _data$SewerageConnect18 === void 0 ? void 0 : (_data$SewerageConnect19 = _data$SewerageConnect18[0]) === null || _data$SewerageConnect19 === void 0 ? void 0 : _data$SewerageConnect19.applicationStatus);
45461
47584
  const isDisconnectionExecuted = applicationStatus === "DISCONNECTION_EXECUTED";
45462
- const isPaid = applicationStatus && applicationStatus !== "INITIATED" && applicationStatus !== "PENDING_APPROVAL_FOR_MUTATION" && applicationStatus !== "PENDING_FOR_PAYMENT" && applicationStatus !== "PENDING_FOR_FINAL_PAYMENT" && applicationStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" ? true : false;
47585
+ const isPaid = applicationStatus && applicationStatus !== "INITIATED" && applicationStatus !== "PENDING_APPROVAL_FOR_MUTATION" && applicationStatus !== "PENDING_FOR_PAYMENT" && applicationStatus !== "PENDING_FOR_FINAL_PAYMENT" && applicationStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" && applicationStatus !== "PENDING_FOR_INFRA_PAYMENT_ZRO" && applicationStatus !== "PENDING_FOR_INFRA_PAYMENT_EE" && !applicationStatus.includes("PENDING_FOR_INFRA_PAYMENT") ? true : false;
45463
47586
  const {
45464
47587
  isLoading: isAppDetailsLoading,
45465
47588
  data: appDetailsData
@@ -45594,6 +47717,8 @@ const WSApplicationDetails = () => {
45594
47717
  break;
45595
47718
  case "PENDING_APPROVAL_FOR_CONNECTION":
45596
47719
  case "PENDING_FOR_PAYMENT":
47720
+ case "PENDING_FOR_INFRA_PAYMENT_ZRO":
47721
+ case "PENDING_FOR_INFRA_PAYMENT_EE":
45597
47722
  downloadOptions = downloadOptions.concat(applicationDownloadObject, wsEstimateDownloadObject);
45598
47723
  break;
45599
47724
  case "PENDING_FOR_CONNECTION_ACTIVATION":
@@ -45977,32 +48102,41 @@ const WSApplicationDetails = () => {
45977
48102
  }
45978
48103
  }, /*#__PURE__*/React.createElement(Row, {
45979
48104
  label: t("WS_CATEGORY_TYPE"),
45980
- text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$categoryT = useDetails.categoryType) === null || _useDetails$categoryT === void 0 ? void 0 : _useDetails$categoryT.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$categoryT2 = useDetails.categoryType) === null || _useDetails$categoryT2 === void 0 ? void 0 : _useDetails$categoryT2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.categoryType)))}`
48105
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe = propertyAdditionalDetails.categoryType) === null || _propertyAdditionalDe === void 0 ? void 0 : _propertyAdditionalDe.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe2 = propertyAdditionalDetails.categoryType) === null || _propertyAdditionalDe2 === void 0 ? void 0 : _propertyAdditionalDe2.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.categoryType) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe3 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe3 === void 0 ? void 0 : _propertyAdditionalDe3.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe4 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe4 === void 0 ? void 0 : _propertyAdditionalDe4.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.waterConnectionUsageType) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$categoryT = useDetails.categoryType) === null || _useDetails$categoryT === void 0 ? void 0 : _useDetails$categoryT.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$categoryT2 = useDetails.categoryType) === null || _useDetails$categoryT2 === void 0 ? void 0 : _useDetails$categoryT2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.categoryType) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$WaterConn = useDetails.WaterConnectionUsageType) === null || _useDetails$WaterConn === void 0 ? void 0 : _useDetails$WaterConn.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$WaterConn2 = useDetails.WaterConnectionUsageType) === null || _useDetails$WaterConn2 === void 0 ? void 0 : _useDetails$WaterConn2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.WaterConnectionUsageType)))}`
45981
48106
  }), /*#__PURE__*/React.createElement(Row, {
45982
48107
  label: t("WS_PROPERTY_CATEGORY"),
45983
- text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC = useDetails.propertyCategory) === null || _useDetails$propertyC === void 0 ? void 0 : _useDetails$propertyC.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC2 = useDetails.propertyCategory) === null || _useDetails$propertyC2 === void 0 ? void 0 : _useDetails$propertyC2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe === void 0 ? void 0 : _propertyAdditionalDe.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe2 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe2 === void 0 ? void 0 : _propertyAdditionalDe2.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyCategory) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties29 = PTData.Properties) === null || _PTData$Properties29 === void 0 ? void 0 : (_PTData$Properties29$ = _PTData$Properties29[0]) === null || _PTData$Properties29$ === void 0 ? void 0 : _PTData$Properties29$.usageCategory)))}`
48108
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe5 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe5 === void 0 ? void 0 : _propertyAdditionalDe5.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe6 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe6 === void 0 ? void 0 : _propertyAdditionalDe6.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe7 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe7 === void 0 ? void 0 : _propertyAdditionalDe7.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyCategory) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties29 = PTData.Properties) === null || _PTData$Properties29 === void 0 ? void 0 : (_PTData$Properties29$ = _PTData$Properties29[0]) === null || _PTData$Properties29$ === void 0 ? void 0 : _PTData$Properties29$.usageCategory) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC = useDetails.propertyCategory) === null || _useDetails$propertyC === void 0 ? void 0 : _useDetails$propertyC.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC2 = useDetails.propertyCategory) === null || _useDetails$propertyC2 === void 0 ? void 0 : _useDetails$propertyC2.name) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC3 = useDetails.propertyCategory) === null || _useDetails$propertyC3 === void 0 ? void 0 : _useDetails$propertyC3.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop1 = applicationData.property) === null || _applicationData$prop1 === void 0 ? void 0 : _applicationData$prop1.usageCategory)))}`
45984
48109
  }), /*#__PURE__*/React.createElement(Row, {
45985
48110
  label: t("WS_PROPERTY_TYPE"),
45986
- text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT = useDetails.propertyType) === null || _useDetails$propertyT === void 0 ? void 0 : _useDetails$propertyT.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT2 = useDetails.propertyType) === null || _useDetails$propertyT2 === void 0 ? void 0 : _useDetails$propertyT2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyType) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe3 = propertyAdditionalDetails.propertyType) === null || _propertyAdditionalDe3 === void 0 ? void 0 : _propertyAdditionalDe3.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe4 = propertyAdditionalDetails.propertyType) === null || _propertyAdditionalDe4 === void 0 ? void 0 : _propertyAdditionalDe4.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyType) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties30 = PTData.Properties) === null || _PTData$Properties30 === void 0 ? void 0 : (_PTData$Properties30$ = _PTData$Properties30[0]) === null || _PTData$Properties30$ === void 0 ? void 0 : _PTData$Properties30$.propertyType)))}`
48111
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe8 = propertyAdditionalDetails.propertyType) === null || _propertyAdditionalDe8 === void 0 ? void 0 : _propertyAdditionalDe8.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe9 = propertyAdditionalDetails.propertyType) === null || _propertyAdditionalDe9 === void 0 ? void 0 : _propertyAdditionalDe9.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe0 = propertyAdditionalDetails.propertyType) === null || _propertyAdditionalDe0 === void 0 ? void 0 : _propertyAdditionalDe0.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyType) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties30 = PTData.Properties) === null || _PTData$Properties30 === void 0 ? void 0 : (_PTData$Properties30$ = _PTData$Properties30[0]) === null || _PTData$Properties30$ === void 0 ? void 0 : _PTData$Properties30$.propertyType) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT = useDetails.propertyType) === null || _useDetails$propertyT === void 0 ? void 0 : _useDetails$propertyT.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT2 = useDetails.propertyType) === null || _useDetails$propertyT2 === void 0 ? void 0 : _useDetails$propertyT2.name) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT3 = useDetails.propertyType) === null || _useDetails$propertyT3 === void 0 ? void 0 : _useDetails$propertyT3.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyType)))}`
45987
48112
  }), /*#__PURE__*/React.createElement(Row, {
45988
48113
  label: t("WS_NUMBER_OF_FLOORS"),
45989
- text: `${t(checkForNA$2(getFloorDisplay(rawFloorConsumerResides) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$noOfFloor = useDetails.noOfFloors) === null || _useDetails$noOfFloor === void 0 ? void 0 : _useDetails$noOfFloor.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$noOfFloor2 = useDetails.noOfFloors) === null || _useDetails$noOfFloor2 === void 0 ? void 0 : _useDetails$noOfFloor2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties31 = PTData.Properties) === null || _PTData$Properties31 === void 0 ? void 0 : (_PTData$Properties31$ = _PTData$Properties31[0]) === null || _PTData$Properties31$ === void 0 ? void 0 : _PTData$Properties31$.noOfFloors)))}`
48114
+ text: `${t(checkForNA$2(getFloorDisplay((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.atWhichFloorConsumerResides) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.atWhichFloorConsumerResides) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfFloors) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.numberOfFloors) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties31 = PTData.Properties) === null || _PTData$Properties31 === void 0 ? void 0 : (_PTData$Properties31$ = _PTData$Properties31[0]) === null || _PTData$Properties31$ === void 0 ? void 0 : _PTData$Properties31$.noOfFloors) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties32 = PTData.Properties) === null || _PTData$Properties32 === void 0 ? void 0 : (_PTData$Properties32$ = _PTData$Properties32[0]) === null || _PTData$Properties32$ === void 0 ? void 0 : _PTData$Properties32$.numberOfFloors) || rawFloorConsumerResides || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$noOfFloor = useDetails.noOfFloors) === null || _useDetails$noOfFloor === void 0 ? void 0 : _useDetails$noOfFloor.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$noOfFloor2 = useDetails.noOfFloors) === null || _useDetails$noOfFloor2 === void 0 ? void 0 : _useDetails$noOfFloor2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfFloors) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfFloors))))}`
45990
48115
  }), /*#__PURE__*/React.createElement(Row, {
45991
48116
  label: t("WS_PLOT_AREA"),
45992
- text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
48117
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.plotArea) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.plotArea) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.plotArea) !== "" ? propertyAdditionalDetails.plotArea : (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties33 = PTData.Properties) === null || _PTData$Properties33 === void 0 ? void 0 : (_PTData$Properties33$ = _PTData$Properties33[0]) === null || _PTData$Properties33$ === void 0 ? void 0 : _PTData$Properties33$.landArea) !== undefined && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties34 = PTData.Properties) === null || _PTData$Properties34 === void 0 ? void 0 : (_PTData$Properties34$ = _PTData$Properties34[0]) === null || _PTData$Properties34$ === void 0 ? void 0 : _PTData$Properties34$.landArea) !== null && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties35 = PTData.Properties) === null || _PTData$Properties35 === void 0 ? void 0 : (_PTData$Properties35$ = _PTData$Properties35[0]) === null || _PTData$Properties35$ === void 0 ? void 0 : _PTData$Properties35$.landArea) !== "" ? PTData.Properties[0].landArea : useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
45993
48118
  }), /*#__PURE__*/React.createElement(Row, {
45994
48119
  label: t("WS_BUILT_UP_AREA"),
45995
- text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
48120
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.builtUpArea) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.builtUpArea) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.builtUpArea) !== "" ? propertyAdditionalDetails.builtUpArea : (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties36 = PTData.Properties) === null || _PTData$Properties36 === void 0 ? void 0 : (_PTData$Properties36$ = _PTData$Properties36[0]) === null || _PTData$Properties36$ === void 0 ? void 0 : _PTData$Properties36$.superBuiltUpArea) !== undefined && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties37 = PTData.Properties) === null || _PTData$Properties37 === void 0 ? void 0 : (_PTData$Properties37$ = _PTData$Properties37[0]) === null || _PTData$Properties37$ === void 0 ? void 0 : _PTData$Properties37$.superBuiltUpArea) !== null && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties38 = PTData.Properties) === null || _PTData$Properties38 === void 0 ? void 0 : (_PTData$Properties38$ = _PTData$Properties38[0]) === null || _PTData$Properties38$ === void 0 ? void 0 : _PTData$Properties38$.superBuiltUpArea) !== "" ? PTData.Properties[0].superBuiltUpArea : useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
45996
48121
  }), /*#__PURE__*/React.createElement(Row, {
45997
48122
  label: t("WS_HEIGHT_OF_THE_BUILDING"),
45998
- text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
48123
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.heightOfTheBuilding) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.heightOfTheBuilding) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.heightOfTheBuilding) !== "" ? propertyAdditionalDetails.heightOfTheBuilding : (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties39 = PTData.Properties) === null || _PTData$Properties39 === void 0 ? void 0 : (_PTData$Properties39$ = _PTData$Properties39[0]) === null || _PTData$Properties39$ === void 0 ? void 0 : _PTData$Properties39$.heightOfTheBuilding) !== undefined && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties40 = PTData.Properties) === null || _PTData$Properties40 === void 0 ? void 0 : (_PTData$Properties40$ = _PTData$Properties40[0]) === null || _PTData$Properties40$ === void 0 ? void 0 : _PTData$Properties40$.heightOfTheBuilding) !== null && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties41 = PTData.Properties) === null || _PTData$Properties41 === void 0 ? void 0 : (_PTData$Properties41$ = _PTData$Properties41[0]) === null || _PTData$Properties41$ === void 0 ? void 0 : _PTData$Properties41$.heightOfTheBuilding) !== "" ? PTData.Properties[0].heightOfTheBuilding : useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
45999
48124
  }), /*#__PURE__*/React.createElement(Row, {
46000
48125
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
46001
- text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea === void 0 ? void 0 : _useDetails$SelectYea.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea2 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea2 === void 0 ? void 0 : _useDetails$SelectYea2.value) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea3 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea3 === void 0 ? void 0 : _useDetails$SelectYea3.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.SelectYearofConstruction) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct = useDetails.constructionYear) === null || _useDetails$construct === void 0 ? void 0 : _useDetails$construct.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct2 = useDetails.constructionYear) === null || _useDetails$construct2 === void 0 ? void 0 : _useDetails$construct2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.constructionYear)))}`
46002
- }), String((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC3 = useDetails.propertyCategory) === null || _useDetails$propertyC3 === void 0 ? void 0 : _useDetails$propertyC3.code) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC4 = useDetails.propertyCategory) === null || _useDetails$propertyC4 === void 0 ? void 0 : _useDetails$propertyC4.name) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi4 = applicationData.additionalDetails) === null || _applicationData$addi4 === void 0 ? void 0 : (_applicationData$addi5 = _applicationData$addi4.propertyCategory) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.code) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop1 = applicationData.property) === null || _applicationData$prop1 === void 0 ? void 0 : (_applicationData$prop10 = _applicationData$prop1.propertyType) === null || _applicationData$prop10 === void 0 ? void 0 : _applicationData$prop10.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop11 = applicationData.property) === null || _applicationData$prop11 === void 0 ? void 0 : _applicationData$prop11.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
48126
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe1 = propertyAdditionalDetails.yearOfConstruction) === null || _propertyAdditionalDe1 === void 0 ? void 0 : _propertyAdditionalDe1.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe10 = propertyAdditionalDetails.yearOfConstruction) === null || _propertyAdditionalDe10 === void 0 ? void 0 : _propertyAdditionalDe10.value) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe11 = propertyAdditionalDetails.yearOfConstruction) === null || _propertyAdditionalDe11 === void 0 ? void 0 : _propertyAdditionalDe11.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.yearOfConstruction) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe12 = propertyAdditionalDetails.SelectYearofConstruction) === null || _propertyAdditionalDe12 === void 0 ? void 0 : _propertyAdditionalDe12.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe13 = propertyAdditionalDetails.SelectYearofConstruction) === null || _propertyAdditionalDe13 === void 0 ? void 0 : _propertyAdditionalDe13.value) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe14 = propertyAdditionalDetails.SelectYearofConstruction) === null || _propertyAdditionalDe14 === void 0 ? void 0 : _propertyAdditionalDe14.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.SelectYearofConstruction) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe15 = propertyAdditionalDetails.constructionYear) === null || _propertyAdditionalDe15 === void 0 ? void 0 : _propertyAdditionalDe15.i18nKey) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe16 = propertyAdditionalDetails.constructionYear) === null || _propertyAdditionalDe16 === void 0 ? void 0 : _propertyAdditionalDe16.value) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe17 = propertyAdditionalDetails.constructionYear) === null || _propertyAdditionalDe17 === void 0 ? void 0 : _propertyAdditionalDe17.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.constructionYear) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea === void 0 ? void 0 : _useDetails$SelectYea.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea2 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea2 === void 0 ? void 0 : _useDetails$SelectYea2.value) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea3 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea3 === void 0 ? void 0 : _useDetails$SelectYea3.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.SelectYearofConstruction) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct = useDetails.constructionYear) === null || _useDetails$construct === void 0 ? void 0 : _useDetails$construct.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct2 = useDetails.constructionYear) === null || _useDetails$construct2 === void 0 ? void 0 : _useDetails$construct2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.constructionYear) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.yearOfConstruction)))}`
48127
+ }), String((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe18 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe18 === void 0 ? void 0 : _propertyAdditionalDe18.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe19 = propertyAdditionalDetails.propertyCategory) === null || _propertyAdditionalDe19 === void 0 ? void 0 : _propertyAdditionalDe19.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyCategory) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties42 = PTData.Properties) === null || _PTData$Properties42 === void 0 ? void 0 : (_PTData$Properties42$ = _PTData$Properties42[0]) === null || _PTData$Properties42$ === void 0 ? void 0 : _PTData$Properties42$.usageCategory) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties43 = PTData.Properties) === null || _PTData$Properties43 === void 0 ? void 0 : (_PTData$Properties43$ = _PTData$Properties43[0]) === null || _PTData$Properties43$ === void 0 ? void 0 : _PTData$Properties43$.propertyType) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC4 = useDetails.propertyCategory) === null || _useDetails$propertyC4 === void 0 ? void 0 : _useDetails$propertyC4.code) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC5 = useDetails.propertyCategory) === null || _useDetails$propertyC5 === void 0 ? void 0 : _useDetails$propertyC5.name) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi4 = applicationData.additionalDetails) === null || _applicationData$addi4 === void 0 ? void 0 : (_applicationData$addi5 = _applicationData$addi4.propertyCategory) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.code) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop10 = applicationData.property) === null || _applicationData$prop10 === void 0 ? void 0 : (_applicationData$prop11 = _applicationData$prop10.propertyType) === null || _applicationData$prop11 === void 0 ? void 0 : _applicationData$prop11.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop12 = applicationData.property) === null || _applicationData$prop12 === void 0 ? void 0 : _applicationData$prop12.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
46003
48128
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
46004
- text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
46005
- }) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi7 = applicationData.additionalDetails) === null || _applicationData$addi7 === void 0 ? void 0 : _applicationData$addi7.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi8 = applicationData.additionalDetails) === null || _applicationData$addi8 === void 0 ? void 0 : _applicationData$addi8.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop12 = applicationData.property) === null || _applicationData$prop12 === void 0 ? void 0 : (_applicationData$prop13 = _applicationData$prop12.additionalDetails) === null || _applicationData$prop13 === void 0 ? void 0 : _applicationData$prop13.questions)) ? (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi9 = applicationData.additionalDetails) === null || _applicationData$addi9 === void 0 ? void 0 : _applicationData$addi9.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi0 = applicationData.additionalDetails) === null || _applicationData$addi0 === void 0 ? void 0 : _applicationData$addi0.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop14 = applicationData.property) === null || _applicationData$prop14 === void 0 ? void 0 : (_applicationData$prop15 = _applicationData$prop14.additionalDetails) === null || _applicationData$prop15 === void 0 ? void 0 : _applicationData$prop15.questions) : []).map((q, idx) => {
48129
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfDwellingUnits) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfDwellingUnits) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfDwellingUnits) !== "" ? propertyAdditionalDetails.numberOfDwellingUnits : (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.NumberofDwellingUnits) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.NumberofDwellingUnits) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.NumberofDwellingUnits) !== "" ? propertyAdditionalDetails.NumberofDwellingUnits : (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfDwellingUnits) !== undefined && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfDwellingUnits) !== null && (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.noOfDwellingUnits) !== "" ? propertyAdditionalDetails.noOfDwellingUnits : (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties44 = PTData.Properties) === null || _PTData$Properties44 === void 0 ? void 0 : (_PTData$Properties44$ = _PTData$Properties44[0]) === null || _PTData$Properties44$ === void 0 ? void 0 : _PTData$Properties44$.numberOfDwellingUnits) !== undefined && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties45 = PTData.Properties) === null || _PTData$Properties45 === void 0 ? void 0 : (_PTData$Properties45$ = _PTData$Properties45[0]) === null || _PTData$Properties45$ === void 0 ? void 0 : _PTData$Properties45$.numberOfDwellingUnits) !== null && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties46 = PTData.Properties) === null || _PTData$Properties46 === void 0 ? void 0 : (_PTData$Properties46$ = _PTData$Properties46[0]) === null || _PTData$Properties46$ === void 0 ? void 0 : _PTData$Properties46$.numberOfDwellingUnits) !== "" ? PTData.Properties[0].numberOfDwellingUnits : (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties47 = PTData.Properties) === null || _PTData$Properties47 === void 0 ? void 0 : (_PTData$Properties47$ = _PTData$Properties47[0]) === null || _PTData$Properties47$ === void 0 ? void 0 : _PTData$Properties47$.noOfDwellingUnits) !== undefined && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties48 = PTData.Properties) === null || _PTData$Properties48 === void 0 ? void 0 : (_PTData$Properties48$ = _PTData$Properties48[0]) === null || _PTData$Properties48$ === void 0 ? void 0 : _PTData$Properties48$.noOfDwellingUnits) !== null && (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties49 = PTData.Properties) === null || _PTData$Properties49 === void 0 ? void 0 : (_PTData$Properties49$ = _PTData$Properties49[0]) === null || _PTData$Properties49$ === void 0 ? void 0 : _PTData$Properties49$.noOfDwellingUnits) !== "" ? PTData.Properties[0].noOfDwellingUnits : (useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) !== undefined && (useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) !== null && (useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) !== "" ? useDetails.NumberofDwellingUnits : (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits) !== undefined && (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits) !== null && (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits) !== "" ? useDetails.noOfDwellingUnits : useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfDwellingUnits))}`
48130
+ }) : null, Boolean((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfRooms) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.NumberofRooms) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties50 = PTData.Properties) === null || _PTData$Properties50 === void 0 ? void 0 : (_PTData$Properties50$ = _PTData$Properties50[0]) === null || _PTData$Properties50$ === void 0 ? void 0 : _PTData$Properties50$.numberOfRooms) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofRooms) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfRooms)) && /*#__PURE__*/React.createElement(Row, {
48131
+ label: t("WS_NUMBER_OF_ROOMS"),
48132
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfRooms) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.NumberofRooms) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties51 = PTData.Properties) === null || _PTData$Properties51 === void 0 ? void 0 : (_PTData$Properties51$ = _PTData$Properties51[0]) === null || _PTData$Properties51$ === void 0 ? void 0 : _PTData$Properties51$.numberOfRooms) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofRooms) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfRooms)))}`
48133
+ }), Boolean((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfBeds) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.hospitalBeds) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties52 = PTData.Properties) === null || _PTData$Properties52 === void 0 ? void 0 : (_PTData$Properties52$ = _PTData$Properties52[0]) === null || _PTData$Properties52$ === void 0 ? void 0 : _PTData$Properties52$.numberOfBeds) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfBeds)) && /*#__PURE__*/React.createElement(Row, {
48134
+ label: t("WS_NUMBER_OF_BEDS"),
48135
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfBeds) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.hospitalBeds) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties53 = PTData.Properties) === null || _PTData$Properties53 === void 0 ? void 0 : (_PTData$Properties53$ = _PTData$Properties53[0]) === null || _PTData$Properties53$ === void 0 ? void 0 : _PTData$Properties53$.numberOfBeds) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfBeds)))}`
48136
+ }), Boolean((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfStudents) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties54 = PTData.Properties) === null || _PTData$Properties54 === void 0 ? void 0 : (_PTData$Properties54$ = _PTData$Properties54[0]) === null || _PTData$Properties54$ === void 0 ? void 0 : _PTData$Properties54$.numberOfStudents) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents)) && /*#__PURE__*/React.createElement(Row, {
48137
+ label: t("WS_NUMBER_OF_STUDENTS"),
48138
+ text: `${t(checkForNA$2((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.numberOfStudents) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties55 = PTData.Properties) === null || _PTData$Properties55 === void 0 ? void 0 : (_PTData$Properties55$ = _PTData$Properties55[0]) === null || _PTData$Properties55$ === void 0 ? void 0 : _PTData$Properties55$.numberOfStudents) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.numberOfStudents)))}`
48139
+ }), (Array.isArray((propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.questions) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.questionAnswers) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyQuestions) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties56 = PTData.Properties) === null || _PTData$Properties56 === void 0 ? void 0 : (_PTData$Properties56$ = _PTData$Properties56[0]) === null || _PTData$Properties56$ === void 0 ? void 0 : _PTData$Properties56$.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi7 = applicationData.additionalDetails) === null || _applicationData$addi7 === void 0 ? void 0 : _applicationData$addi7.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi8 = applicationData.additionalDetails) === null || _applicationData$addi8 === void 0 ? void 0 : _applicationData$addi8.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop13 = applicationData.property) === null || _applicationData$prop13 === void 0 ? void 0 : (_applicationData$prop14 = _applicationData$prop13.additionalDetails) === null || _applicationData$prop14 === void 0 ? void 0 : _applicationData$prop14.questions)) ? (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.questions) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.questionAnswers) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.propertyQuestions) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties57 = PTData.Properties) === null || _PTData$Properties57 === void 0 ? void 0 : (_PTData$Properties57$ = _PTData$Properties57[0]) === null || _PTData$Properties57$ === void 0 ? void 0 : _PTData$Properties57$.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi9 = applicationData.additionalDetails) === null || _applicationData$addi9 === void 0 ? void 0 : _applicationData$addi9.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi0 = applicationData.additionalDetails) === null || _applicationData$addi0 === void 0 ? void 0 : _applicationData$addi0.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop15 = applicationData.property) === null || _applicationData$prop15 === void 0 ? void 0 : (_applicationData$prop16 = _applicationData$prop15.additionalDetails) === null || _applicationData$prop16 === void 0 ? void 0 : _applicationData$prop16.questions) : []).map((q, idx) => {
46006
48140
  var _q$answer, _q$answer2, _q$answer3;
46007
48141
  const qText = typeof q === "object" ? (q === null || q === void 0 ? void 0 : q.question) || (q === null || q === void 0 ? void 0 : q.questionText) || (q === null || q === void 0 ? void 0 : q.title) || `Question ${idx + 1}` : `Question ${idx + 1}`;
46008
48142
  const aText = typeof q === "object" ? typeof (q === null || q === void 0 ? void 0 : q.answer) === "object" ? (q === null || q === void 0 ? void 0 : (_q$answer = q.answer) === null || _q$answer === void 0 ? void 0 : _q$answer.name) || (q === null || q === void 0 ? void 0 : (_q$answer2 = q.answer) === null || _q$answer2 === void 0 ? void 0 : _q$answer2.value) || (q === null || q === void 0 ? void 0 : (_q$answer3 = q.answer) === null || _q$answer3 === void 0 ? void 0 : _q$answer3.code) : q === null || q === void 0 ? void 0 : q.answer : q;
@@ -46242,46 +48376,48 @@ const WSApplicationDetails = () => {
46242
48376
  }), (((_ref19 = (data === null || data === void 0 ? void 0 : (_data$WaterConnection149 = data.WaterConnection) === null || _data$WaterConnection149 === void 0 ? void 0 : _data$WaterConnection149[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect144 = data.SewerageConnections) === null || _data$SewerageConnect144 === void 0 ? void 0 : _data$SewerageConnect144[0])) === null || _ref19 === void 0 ? void 0 : _ref19.comment) || ((_ref20 = (data === null || data === void 0 ? void 0 : (_data$WaterConnection150 = data.WaterConnection) === null || _data$WaterConnection150 === void 0 ? void 0 : _data$WaterConnection150[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect145 = data.SewerageConnections) === null || _data$SewerageConnect145 === void 0 ? void 0 : _data$SewerageConnect145[0])) === null || _ref20 === void 0 ? void 0 : _ref20.comments)) && /*#__PURE__*/React.createElement(Row, {
46243
48377
  label: t("WS_COMMON_COMMENTS"),
46244
48378
  text: ((_ref21 = (data === null || data === void 0 ? void 0 : (_data$WaterConnection151 = data.WaterConnection) === null || _data$WaterConnection151 === void 0 ? void 0 : _data$WaterConnection151[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect146 = data.SewerageConnections) === null || _data$SewerageConnect146 === void 0 ? void 0 : _data$SewerageConnect146[0])) === null || _ref21 === void 0 ? void 0 : _ref21.comment) || ((_ref22 = (data === null || data === void 0 ? void 0 : (_data$WaterConnection152 = data.WaterConnection) === null || _data$WaterConnection152 === void 0 ? void 0 : _data$WaterConnection152[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect147 = data.SewerageConnections) === null || _data$SewerageConnect147 === void 0 ? void 0 : _data$SewerageConnect147[0])) === null || _ref22 === void 0 ? void 0 : _ref22.comments) || t("NA")
46245
- }))), (data === null || data === void 0 ? void 0 : (_data$WaterConnection153 = data.WaterConnection) === null || _data$WaterConnection153 === void 0 ? void 0 : (_data$WaterConnection154 = _data$WaterConnection153[0]) === null || _data$WaterConnection154 === void 0 ? void 0 : _data$WaterConnection154.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection155 = data.WaterConnection) === null || _data$WaterConnection155 === void 0 ? void 0 : (_data$WaterConnection156 = _data$WaterConnection155[0]) === null || _data$WaterConnection156 === void 0 ? void 0 : _data$WaterConnection156.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection157 = data.WaterConnection) === null || _data$WaterConnection157 === void 0 ? void 0 : (_data$WaterConnection158 = _data$WaterConnection157[0]) === null || _data$WaterConnection158 === void 0 ? void 0 : _data$WaterConnection158.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect148 = data.SewerageConnections) === null || _data$SewerageConnect148 === void 0 ? void 0 : (_data$SewerageConnect149 = _data$SewerageConnect148[0]) === null || _data$SewerageConnect149 === void 0 ? void 0 : _data$SewerageConnect149.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect150 = data.SewerageConnections) === null || _data$SewerageConnect150 === void 0 ? void 0 : (_data$SewerageConnect151 = _data$SewerageConnect150[0]) === null || _data$SewerageConnect151 === void 0 ? void 0 : _data$SewerageConnect151.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect152 = data.SewerageConnections) === null || _data$SewerageConnect152 === void 0 ? void 0 : (_data$SewerageConnect153 = _data$SewerageConnect152[0]) === null || _data$SewerageConnect153 === void 0 ? void 0 : _data$SewerageConnect153.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" ? /*#__PURE__*/React.createElement("div", {
48379
+ }))), (data === null || data === void 0 ? void 0 : (_data$WaterConnection153 = data.WaterConnection) === null || _data$WaterConnection153 === void 0 ? void 0 : (_data$WaterConnection154 = _data$WaterConnection153[0]) === null || _data$WaterConnection154 === void 0 ? void 0 : _data$WaterConnection154.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection155 = data.WaterConnection) === null || _data$WaterConnection155 === void 0 ? void 0 : (_data$WaterConnection156 = _data$WaterConnection155[0]) === null || _data$WaterConnection156 === void 0 ? void 0 : _data$WaterConnection156.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection157 = data.WaterConnection) === null || _data$WaterConnection157 === void 0 ? void 0 : (_data$WaterConnection158 = _data$WaterConnection157[0]) === null || _data$WaterConnection158 === void 0 ? void 0 : _data$WaterConnection158.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection159 = data.WaterConnection) === null || _data$WaterConnection159 === void 0 ? void 0 : (_data$WaterConnection160 = _data$WaterConnection159[0]) === null || _data$WaterConnection160 === void 0 ? void 0 : _data$WaterConnection160.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_ZRO" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection161 = data.WaterConnection) === null || _data$WaterConnection161 === void 0 ? void 0 : (_data$WaterConnection162 = _data$WaterConnection161[0]) === null || _data$WaterConnection162 === void 0 ? void 0 : _data$WaterConnection162.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_EE" || data !== null && data !== void 0 && (_data$WaterConnection163 = data.WaterConnection) !== null && _data$WaterConnection163 !== void 0 && (_data$WaterConnection164 = _data$WaterConnection163[0]) !== null && _data$WaterConnection164 !== void 0 && (_data$WaterConnection165 = _data$WaterConnection164.applicationStatus) !== null && _data$WaterConnection165 !== void 0 && (_data$WaterConnection166 = _data$WaterConnection165.includes) !== null && _data$WaterConnection166 !== void 0 && _data$WaterConnection166.call(_data$WaterConnection165, "PENDING_FOR_INFRA_PAYMENT") || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect148 = data.SewerageConnections) === null || _data$SewerageConnect148 === void 0 ? void 0 : (_data$SewerageConnect149 = _data$SewerageConnect148[0]) === null || _data$SewerageConnect149 === void 0 ? void 0 : _data$SewerageConnect149.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect150 = data.SewerageConnections) === null || _data$SewerageConnect150 === void 0 ? void 0 : (_data$SewerageConnect151 = _data$SewerageConnect150[0]) === null || _data$SewerageConnect151 === void 0 ? void 0 : _data$SewerageConnect151.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect152 = data.SewerageConnections) === null || _data$SewerageConnect152 === void 0 ? void 0 : (_data$SewerageConnect153 = _data$SewerageConnect152[0]) === null || _data$SewerageConnect153 === void 0 ? void 0 : _data$SewerageConnect153.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect154 = data.SewerageConnections) === null || _data$SewerageConnect154 === void 0 ? void 0 : (_data$SewerageConnect155 = _data$SewerageConnect154[0]) === null || _data$SewerageConnect155 === void 0 ? void 0 : _data$SewerageConnect155.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_ZRO" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect156 = data.SewerageConnections) === null || _data$SewerageConnect156 === void 0 ? void 0 : (_data$SewerageConnect157 = _data$SewerageConnect156[0]) === null || _data$SewerageConnect157 === void 0 ? void 0 : _data$SewerageConnect157.applicationStatus) === "PENDING_FOR_INFRA_PAYMENT_EE" || data !== null && data !== void 0 && (_data$SewerageConnect158 = data.SewerageConnections) !== null && _data$SewerageConnect158 !== void 0 && (_data$SewerageConnect159 = _data$SewerageConnect158[0]) !== null && _data$SewerageConnect159 !== void 0 && (_data$SewerageConnect160 = _data$SewerageConnect159.applicationStatus) !== null && _data$SewerageConnect160 !== void 0 && (_data$SewerageConnect161 = _data$SewerageConnect160.includes) !== null && _data$SewerageConnect161 !== void 0 && _data$SewerageConnect161.call(_data$SewerageConnect160, "PENDING_FOR_INFRA_PAYMENT") ? /*#__PURE__*/React.createElement("div", {
46246
48380
  style: {
46247
48381
  marginTop: "10px"
46248
48382
  }
46249
48383
  }, /*#__PURE__*/React.createElement(SubmitBar, {
46250
48384
  label: t("MAKE_PAYMENT"),
46251
48385
  onSubmit: () => {
46252
- var _paymentDetails$data, _paymentDetails$data$, _paymentDetails$data$2, _paymentDetails$data2, _paymentDetails$data3, _paymentDetails$data4, _data$WaterConnection159, _data$WaterConnection160, _data$SewerageConnect154, _data$SewerageConnect155, _data$WaterConnection161, _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _PTData$Properties32, _PTData$Properties32$, _PTData$Properties32$2, _paymentDetails$data5, _paymentDetails$data6, _paymentDetails$data7;
48386
+ var _paymentDetails$data, _paymentDetails$data$, _paymentDetails$data$2, _paymentDetails$data2, _paymentDetails$data3, _paymentDetails$data4, _data$WaterConnection167, _data$WaterConnection168, _data$SewerageConnect162, _data$SewerageConnect163, _data$WaterConnection169, _data$WaterConnection170, _data$WaterConnection171, _data$SewerageConnect164, _data$SewerageConnect165, _data$SewerageConnect166, _PTData$Properties58, _PTData$Properties58$, _PTData$Properties58$2;
48387
+ const bService = (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data = paymentDetails.data) === null || _paymentDetails$data === void 0 ? void 0 : (_paymentDetails$data$ = _paymentDetails$data.Bill) === null || _paymentDetails$data$ === void 0 ? void 0 : (_paymentDetails$data$2 = _paymentDetails$data$[0]) === null || _paymentDetails$data$2 === void 0 ? void 0 : _paymentDetails$data$2.businessService) || (applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("SW") ? "SW.ONE_TIME_FEE" : "WS.ONE_TIME_FEE");
48388
+ const cCode = (paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data2 = paymentDetails.data) === null || _paymentDetails$data2 === void 0 ? void 0 : (_paymentDetails$data3 = _paymentDetails$data2.Bill) === null || _paymentDetails$data3 === void 0 ? void 0 : (_paymentDetails$data4 = _paymentDetails$data3[0]) === null || _paymentDetails$data4 === void 0 ? void 0 : _paymentDetails$data4.consumerCode) || applicationNobyData;
46253
48389
  history.push({
46254
- pathname: `/digit-ui/citizen/payment/collect/${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data = paymentDetails.data) === null || _paymentDetails$data === void 0 ? void 0 : (_paymentDetails$data$ = _paymentDetails$data.Bill) === null || _paymentDetails$data$ === void 0 ? void 0 : (_paymentDetails$data$2 = _paymentDetails$data$[0]) === null || _paymentDetails$data$2 === void 0 ? void 0 : _paymentDetails$data$2.businessService}/${stringReplaceAll(paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data2 = paymentDetails.data) === null || _paymentDetails$data2 === void 0 ? void 0 : (_paymentDetails$data3 = _paymentDetails$data2.Bill) === null || _paymentDetails$data3 === void 0 ? void 0 : (_paymentDetails$data4 = _paymentDetails$data3[0]) === null || _paymentDetails$data4 === void 0 ? void 0 : _paymentDetails$data4.consumerCode, "/", "+")}`,
46255
- search: `?workflow=WNS&tenantId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection159 = data.WaterConnection) === null || _data$WaterConnection159 === void 0 ? void 0 : (_data$WaterConnection160 = _data$WaterConnection159[0]) === null || _data$WaterConnection160 === void 0 ? void 0 : _data$WaterConnection160.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect154 = data.SewerageConnections) === null || _data$SewerageConnect154 === void 0 ? void 0 : (_data$SewerageConnect155 = _data$SewerageConnect154[0]) === null || _data$SewerageConnect155 === void 0 ? void 0 : _data$SewerageConnect155.tenantId)}&ConsumerName=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection161 = data.WaterConnection) === null || _data$WaterConnection161 === void 0 ? void 0 : (_data$WaterConnection162 = _data$WaterConnection161[0]) === null || _data$WaterConnection162 === void 0 ? void 0 : (_data$WaterConnection163 = _data$WaterConnection162.connectionHolders) === null || _data$WaterConnection163 === void 0 ? void 0 : _data$WaterConnection163.map(owner => owner.name).join(",")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect156 = data.SewerageConnections) === null || _data$SewerageConnect156 === void 0 ? void 0 : (_data$SewerageConnect157 = _data$SewerageConnect156[0]) === null || _data$SewerageConnect157 === void 0 ? void 0 : (_data$SewerageConnect158 = _data$SewerageConnect157.connectionHolders) === null || _data$SewerageConnect158 === void 0 ? void 0 : _data$SewerageConnect158.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties32 = PTData.Properties) === null || _PTData$Properties32 === void 0 ? void 0 : (_PTData$Properties32$ = _PTData$Properties32[0]) === null || _PTData$Properties32$ === void 0 ? void 0 : (_PTData$Properties32$2 = _PTData$Properties32$.owners) === null || _PTData$Properties32$2 === void 0 ? void 0 : _PTData$Properties32$2.map(owner => owner.name).join(","))}&isDisoconnectFlow=${applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("DC") ? true : false}&consumerCode=${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data5 = paymentDetails.data) === null || _paymentDetails$data5 === void 0 ? void 0 : (_paymentDetails$data6 = _paymentDetails$data5.Bill) === null || _paymentDetails$data6 === void 0 ? void 0 : (_paymentDetails$data7 = _paymentDetails$data6[0]) === null || _paymentDetails$data7 === void 0 ? void 0 : _paymentDetails$data7.consumerCode}`,
48390
+ pathname: `/digit-ui/citizen/payment/collect/${bService}/${stringReplaceAll(cCode, "/", "+")}`,
48391
+ search: `?workflow=WNS&tenantId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection167 = data.WaterConnection) === null || _data$WaterConnection167 === void 0 ? void 0 : (_data$WaterConnection168 = _data$WaterConnection167[0]) === null || _data$WaterConnection168 === void 0 ? void 0 : _data$WaterConnection168.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect162 = data.SewerageConnections) === null || _data$SewerageConnect162 === void 0 ? void 0 : (_data$SewerageConnect163 = _data$SewerageConnect162[0]) === null || _data$SewerageConnect163 === void 0 ? void 0 : _data$SewerageConnect163.tenantId)}&ConsumerName=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection169 = data.WaterConnection) === null || _data$WaterConnection169 === void 0 ? void 0 : (_data$WaterConnection170 = _data$WaterConnection169[0]) === null || _data$WaterConnection170 === void 0 ? void 0 : (_data$WaterConnection171 = _data$WaterConnection170.connectionHolders) === null || _data$WaterConnection171 === void 0 ? void 0 : _data$WaterConnection171.map(owner => owner.name).join(",")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect164 = data.SewerageConnections) === null || _data$SewerageConnect164 === void 0 ? void 0 : (_data$SewerageConnect165 = _data$SewerageConnect164[0]) === null || _data$SewerageConnect165 === void 0 ? void 0 : (_data$SewerageConnect166 = _data$SewerageConnect165.connectionHolders) === null || _data$SewerageConnect166 === void 0 ? void 0 : _data$SewerageConnect166.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties58 = PTData.Properties) === null || _PTData$Properties58 === void 0 ? void 0 : (_PTData$Properties58$ = _PTData$Properties58[0]) === null || _PTData$Properties58$ === void 0 ? void 0 : (_PTData$Properties58$2 = _PTData$Properties58$.owners) === null || _PTData$Properties58$2 === void 0 ? void 0 : _PTData$Properties58$2.map(owner => owner.name).join(","))}&isDisoconnectFlow=${applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("DC") ? true : false}&consumerCode=${cCode}`,
46256
48392
  state: {
46257
48393
  fromApplicationDetails: true
46258
48394
  }
46259
48395
  });
46260
48396
  }
46261
- })) : null, !(data !== null && data !== void 0 && (_data$WaterConnection164 = data.WaterConnection) !== null && _data$WaterConnection164 !== void 0 && (_data$WaterConnection165 = _data$WaterConnection164[0]) !== null && _data$WaterConnection165 !== void 0 && (_data$WaterConnection166 = _data$WaterConnection165.applicationType) !== null && _data$WaterConnection166 !== void 0 && _data$WaterConnection166.includes("DISCONNECT")) && data !== null && data !== void 0 && (_data$WaterConnection167 = data.WaterConnection) !== null && _data$WaterConnection167 !== void 0 && (_data$WaterConnection168 = _data$WaterConnection167[0]) !== null && _data$WaterConnection168 !== void 0 && _data$WaterConnection168.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") || !(data !== null && data !== void 0 && (_data$SewerageConnect159 = data.SewerageConnections) !== null && _data$SewerageConnect159 !== void 0 && (_data$SewerageConnect160 = _data$SewerageConnect159[0]) !== null && _data$SewerageConnect160 !== void 0 && (_data$SewerageConnect161 = _data$SewerageConnect160.applicationType) !== null && _data$SewerageConnect161 !== void 0 && _data$SewerageConnect161.includes("DISCONNECT")) && data !== null && data !== void 0 && (_data$SewerageConnect162 = data.SewerageConnections) !== null && _data$SewerageConnect162 !== void 0 && (_data$SewerageConnect163 = _data$SewerageConnect162[0]) !== null && _data$SewerageConnect163 !== void 0 && _data$SewerageConnect163.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") ? /*#__PURE__*/React.createElement(Link, {
48397
+ })) : null, !(data !== null && data !== void 0 && (_data$WaterConnection172 = data.WaterConnection) !== null && _data$WaterConnection172 !== void 0 && (_data$WaterConnection173 = _data$WaterConnection172[0]) !== null && _data$WaterConnection173 !== void 0 && (_data$WaterConnection174 = _data$WaterConnection173.applicationType) !== null && _data$WaterConnection174 !== void 0 && _data$WaterConnection174.includes("DISCONNECT")) && data !== null && data !== void 0 && (_data$WaterConnection175 = data.WaterConnection) !== null && _data$WaterConnection175 !== void 0 && (_data$WaterConnection176 = _data$WaterConnection175[0]) !== null && _data$WaterConnection176 !== void 0 && _data$WaterConnection176.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") || !(data !== null && data !== void 0 && (_data$SewerageConnect167 = data.SewerageConnections) !== null && _data$SewerageConnect167 !== void 0 && (_data$SewerageConnect168 = _data$SewerageConnect167[0]) !== null && _data$SewerageConnect168 !== void 0 && (_data$SewerageConnect169 = _data$SewerageConnect168.applicationType) !== null && _data$SewerageConnect169 !== void 0 && _data$SewerageConnect169.includes("DISCONNECT")) && data !== null && data !== void 0 && (_data$SewerageConnect170 = data.SewerageConnections) !== null && _data$SewerageConnect170 !== void 0 && (_data$SewerageConnect171 = _data$SewerageConnect170[0]) !== null && _data$SewerageConnect171 !== void 0 && _data$SewerageConnect171.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") ? /*#__PURE__*/React.createElement(Link, {
46262
48398
  to: {
46263
- pathname: isMutation ? `/digit-ui/citizen/ws/mutation-application` : `/digit-ui/citizen/ws/edit-application/${(data === null || data === void 0 ? void 0 : (_data$WaterConnection169 = data.WaterConnection) === null || _data$WaterConnection169 === void 0 ? void 0 : (_data$WaterConnection170 = _data$WaterConnection169[0]) === null || _data$WaterConnection170 === void 0 ? void 0 : _data$WaterConnection170.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect164 = data.SewerageConnections) === null || _data$SewerageConnect164 === void 0 ? void 0 : (_data$SewerageConnect165 = _data$SewerageConnect164[0]) === null || _data$SewerageConnect165 === void 0 ? void 0 : _data$SewerageConnect165.tenantId)}`,
46264
- search: isMutation ? `?applicationNumber=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection171 = data.WaterConnection) === null || _data$WaterConnection171 === void 0 ? void 0 : (_data$WaterConnection172 = _data$WaterConnection171[0]) === null || _data$WaterConnection172 === void 0 ? void 0 : _data$WaterConnection172.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect166 = data.SewerageConnections) === null || _data$SewerageConnect166 === void 0 ? void 0 : (_data$SewerageConnect167 = _data$SewerageConnect166[0]) === null || _data$SewerageConnect167 === void 0 ? void 0 : _data$SewerageConnect167.applicationNo)}&tenantId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection173 = data.WaterConnection) === null || _data$WaterConnection173 === void 0 ? void 0 : (_data$WaterConnection174 = _data$WaterConnection173[0]) === null || _data$WaterConnection174 === void 0 ? void 0 : _data$WaterConnection174.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect168 = data.SewerageConnections) === null || _data$SewerageConnect168 === void 0 ? void 0 : (_data$SewerageConnect169 = _data$SewerageConnect168[0]) === null || _data$SewerageConnect169 === void 0 ? void 0 : _data$SewerageConnect169.tenantId)}&service=${data !== null && data !== void 0 && (_data$WaterConnection175 = data.WaterConnection) !== null && _data$WaterConnection175 !== void 0 && _data$WaterConnection175[0] ? "WATER" : "SEWERAGE"}&propertyId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection176 = data.WaterConnection) === null || _data$WaterConnection176 === void 0 ? void 0 : (_data$WaterConnection177 = _data$WaterConnection176[0]) === null || _data$WaterConnection177 === void 0 ? void 0 : _data$WaterConnection177.propertyId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect170 = data.SewerageConnections) === null || _data$SewerageConnect170 === void 0 ? void 0 : (_data$SewerageConnect171 = _data$SewerageConnect170[0]) === null || _data$SewerageConnect171 === void 0 ? void 0 : _data$SewerageConnect171.propertyId)}` : "",
48399
+ pathname: isMutation ? `/digit-ui/citizen/ws/mutation-application` : `/digit-ui/citizen/ws/edit-application/${(data === null || data === void 0 ? void 0 : (_data$WaterConnection177 = data.WaterConnection) === null || _data$WaterConnection177 === void 0 ? void 0 : (_data$WaterConnection178 = _data$WaterConnection177[0]) === null || _data$WaterConnection178 === void 0 ? void 0 : _data$WaterConnection178.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect172 = data.SewerageConnections) === null || _data$SewerageConnect172 === void 0 ? void 0 : (_data$SewerageConnect173 = _data$SewerageConnect172[0]) === null || _data$SewerageConnect173 === void 0 ? void 0 : _data$SewerageConnect173.tenantId)}`,
48400
+ search: isMutation ? `?applicationNumber=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection179 = data.WaterConnection) === null || _data$WaterConnection179 === void 0 ? void 0 : (_data$WaterConnection180 = _data$WaterConnection179[0]) === null || _data$WaterConnection180 === void 0 ? void 0 : _data$WaterConnection180.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect174 = data.SewerageConnections) === null || _data$SewerageConnect174 === void 0 ? void 0 : (_data$SewerageConnect175 = _data$SewerageConnect174[0]) === null || _data$SewerageConnect175 === void 0 ? void 0 : _data$SewerageConnect175.applicationNo)}&tenantId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection181 = data.WaterConnection) === null || _data$WaterConnection181 === void 0 ? void 0 : (_data$WaterConnection182 = _data$WaterConnection181[0]) === null || _data$WaterConnection182 === void 0 ? void 0 : _data$WaterConnection182.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect176 = data.SewerageConnections) === null || _data$SewerageConnect176 === void 0 ? void 0 : (_data$SewerageConnect177 = _data$SewerageConnect176[0]) === null || _data$SewerageConnect177 === void 0 ? void 0 : _data$SewerageConnect177.tenantId)}&service=${data !== null && data !== void 0 && (_data$WaterConnection183 = data.WaterConnection) !== null && _data$WaterConnection183 !== void 0 && _data$WaterConnection183[0] ? "WATER" : "SEWERAGE"}&propertyId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection184 = data.WaterConnection) === null || _data$WaterConnection184 === void 0 ? void 0 : (_data$WaterConnection185 = _data$WaterConnection184[0]) === null || _data$WaterConnection185 === void 0 ? void 0 : _data$WaterConnection185.propertyId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect178 = data.SewerageConnections) === null || _data$SewerageConnect178 === void 0 ? void 0 : (_data$SewerageConnect179 = _data$SewerageConnect178[0]) === null || _data$SewerageConnect179 === void 0 ? void 0 : _data$SewerageConnect179.propertyId)}` : "",
46265
48401
  state: {
46266
- id: `${(data === null || data === void 0 ? void 0 : (_data$WaterConnection178 = data.WaterConnection) === null || _data$WaterConnection178 === void 0 ? void 0 : (_data$WaterConnection179 = _data$WaterConnection178[0]) === null || _data$WaterConnection179 === void 0 ? void 0 : _data$WaterConnection179.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect172 = data.SewerageConnections) === null || _data$SewerageConnect172 === void 0 ? void 0 : (_data$SewerageConnect173 = _data$SewerageConnect172[0]) === null || _data$SewerageConnect173 === void 0 ? void 0 : _data$SewerageConnect173.applicationNo)}`
48402
+ id: `${(data === null || data === void 0 ? void 0 : (_data$WaterConnection186 = data.WaterConnection) === null || _data$WaterConnection186 === void 0 ? void 0 : (_data$WaterConnection187 = _data$WaterConnection186[0]) === null || _data$WaterConnection187 === void 0 ? void 0 : _data$WaterConnection187.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect180 = data.SewerageConnections) === null || _data$SewerageConnect180 === void 0 ? void 0 : (_data$SewerageConnect181 = _data$SewerageConnect180[0]) === null || _data$SewerageConnect181 === void 0 ? void 0 : _data$SewerageConnect181.applicationNo)}`
46267
48403
  }
46268
48404
  }
46269
48405
  }, /*#__PURE__*/React.createElement(SubmitBar, {
46270
48406
  label: t("COMMON_EDIT")
46271
- })) : null, data !== null && data !== void 0 && (_data$WaterConnection180 = data.WaterConnection) !== null && _data$WaterConnection180 !== void 0 && (_data$WaterConnection181 = _data$WaterConnection180[0]) !== null && _data$WaterConnection181 !== void 0 && (_data$WaterConnection182 = _data$WaterConnection181.applicationType) !== null && _data$WaterConnection182 !== void 0 && _data$WaterConnection182.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$WaterConnection183 = data.WaterConnection) !== null && _data$WaterConnection183 !== void 0 && (_data$WaterConnection184 = _data$WaterConnection183[0]) !== null && _data$WaterConnection184 !== void 0 && _data$WaterConnection184.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") || data !== null && data !== void 0 && (_data$SewerageConnect174 = data.SewerageConnections) !== null && _data$SewerageConnect174 !== void 0 && (_data$SewerageConnect175 = _data$SewerageConnect174[0]) !== null && _data$SewerageConnect175 !== void 0 && (_data$SewerageConnect176 = _data$SewerageConnect175.applicationType) !== null && _data$SewerageConnect176 !== void 0 && _data$SewerageConnect176.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$SewerageConnect177 = data.SewerageConnections) !== null && _data$SewerageConnect177 !== void 0 && (_data$SewerageConnect178 = _data$SewerageConnect177[0]) !== null && _data$SewerageConnect178 !== void 0 && _data$SewerageConnect178.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") ? /*#__PURE__*/React.createElement(Link, {
48407
+ })) : null, data !== null && data !== void 0 && (_data$WaterConnection188 = data.WaterConnection) !== null && _data$WaterConnection188 !== void 0 && (_data$WaterConnection189 = _data$WaterConnection188[0]) !== null && _data$WaterConnection189 !== void 0 && (_data$WaterConnection190 = _data$WaterConnection189.applicationType) !== null && _data$WaterConnection190 !== void 0 && _data$WaterConnection190.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$WaterConnection191 = data.WaterConnection) !== null && _data$WaterConnection191 !== void 0 && (_data$WaterConnection192 = _data$WaterConnection191[0]) !== null && _data$WaterConnection192 !== void 0 && _data$WaterConnection192.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") || data !== null && data !== void 0 && (_data$SewerageConnect182 = data.SewerageConnections) !== null && _data$SewerageConnect182 !== void 0 && (_data$SewerageConnect183 = _data$SewerageConnect182[0]) !== null && _data$SewerageConnect183 !== void 0 && (_data$SewerageConnect184 = _data$SewerageConnect183.applicationType) !== null && _data$SewerageConnect184 !== void 0 && _data$SewerageConnect184.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$SewerageConnect185 = data.SewerageConnections) !== null && _data$SewerageConnect185 !== void 0 && (_data$SewerageConnect186 = _data$SewerageConnect185[0]) !== null && _data$SewerageConnect186 !== void 0 && _data$SewerageConnect186.applicationStatus.includes("PENDING_FOR_CITIZEN_ACTION") ? /*#__PURE__*/React.createElement(Link, {
46272
48408
  to: {
46273
48409
  pathname: `/digit-ui/citizen/ws/resubmit-disconnect-application`,
46274
48410
  state: {
46275
- id: `${(data === null || data === void 0 ? void 0 : (_data$WaterConnection185 = data.WaterConnection) === null || _data$WaterConnection185 === void 0 ? void 0 : (_data$WaterConnection186 = _data$WaterConnection185[0]) === null || _data$WaterConnection186 === void 0 ? void 0 : _data$WaterConnection186.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect179 = data.SewerageConnections) === null || _data$SewerageConnect179 === void 0 ? void 0 : (_data$SewerageConnect180 = _data$SewerageConnect179[0]) === null || _data$SewerageConnect180 === void 0 ? void 0 : _data$SewerageConnect180.applicationNo)}`
48411
+ id: `${(data === null || data === void 0 ? void 0 : (_data$WaterConnection193 = data.WaterConnection) === null || _data$WaterConnection193 === void 0 ? void 0 : (_data$WaterConnection194 = _data$WaterConnection193[0]) === null || _data$WaterConnection194 === void 0 ? void 0 : _data$WaterConnection194.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect187 = data.SewerageConnections) === null || _data$SewerageConnect187 === void 0 ? void 0 : (_data$SewerageConnect188 = _data$SewerageConnect187[0]) === null || _data$SewerageConnect188 === void 0 ? void 0 : _data$SewerageConnect188.applicationNo)}`
46276
48412
  }
46277
48413
  }
46278
48414
  }, /*#__PURE__*/React.createElement(SubmitBar, {
46279
48415
  label: t("RESUBMIT_APPLICATION"),
46280
48416
  onSubmit: Digit.SessionStorage.set("WS_DISCONNECTION", applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("SW") ? {
46281
- applicationData: data === null || data === void 0 ? void 0 : (_data$SewerageConnect181 = data.SewerageConnections) === null || _data$SewerageConnect181 === void 0 ? void 0 : _data$SewerageConnect181[0],
48417
+ applicationData: data === null || data === void 0 ? void 0 : (_data$SewerageConnect189 = data.SewerageConnections) === null || _data$SewerageConnect189 === void 0 ? void 0 : _data$SewerageConnect189[0],
46282
48418
  serviceType: "SEWERAGE",
46283
48419
  WSDisconnectionForm: {
46284
- type: data !== null && data !== void 0 && (_data$SewerageConnect182 = data.SewerageConnections) !== null && _data$SewerageConnect182 !== void 0 && (_data$SewerageConnect183 = _data$SewerageConnect182[0]) !== null && _data$SewerageConnect183 !== void 0 && _data$SewerageConnect183.isDisconnectionTemporary ? {
48420
+ type: data !== null && data !== void 0 && (_data$SewerageConnect190 = data.SewerageConnections) !== null && _data$SewerageConnect190 !== void 0 && (_data$SewerageConnect191 = _data$SewerageConnect190[0]) !== null && _data$SewerageConnect191 !== void 0 && _data$SewerageConnect191.isDisconnectionTemporary ? {
46285
48421
  code: "type",
46286
48422
  value: {
46287
48423
  name: "Temporary",
@@ -46298,18 +48434,18 @@ const WSApplicationDetails = () => {
46298
48434
  code: "Permanent"
46299
48435
  }
46300
48436
  },
46301
- date: convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$SewerageConnect184 = data.SewerageConnections) === null || _data$SewerageConnect184 === void 0 ? void 0 : (_data$SewerageConnect185 = _data$SewerageConnect184[0]) === null || _data$SewerageConnect185 === void 0 ? void 0 : _data$SewerageConnect185.dateEffectiveFrom, true),
48437
+ date: convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$SewerageConnect192 = data.SewerageConnections) === null || _data$SewerageConnect192 === void 0 ? void 0 : (_data$SewerageConnect193 = _data$SewerageConnect192[0]) === null || _data$SewerageConnect193 === void 0 ? void 0 : _data$SewerageConnect193.dateEffectiveFrom, true),
46302
48438
  reason: {
46303
48439
  code: "reason",
46304
- value: data === null || data === void 0 ? void 0 : (_data$SewerageConnect186 = data.SewerageConnections) === null || _data$SewerageConnect186 === void 0 ? void 0 : (_data$SewerageConnect187 = _data$SewerageConnect186[0]) === null || _data$SewerageConnect187 === void 0 ? void 0 : _data$SewerageConnect187.disconnectionReason
48440
+ value: data === null || data === void 0 ? void 0 : (_data$SewerageConnect194 = data.SewerageConnections) === null || _data$SewerageConnect194 === void 0 ? void 0 : (_data$SewerageConnect195 = _data$SewerageConnect194[0]) === null || _data$SewerageConnect195 === void 0 ? void 0 : _data$SewerageConnect195.disconnectionReason
46305
48441
  },
46306
- documents: data === null || data === void 0 ? void 0 : (_data$SewerageConnect188 = data.SewerageConnections) === null || _data$SewerageConnect188 === void 0 ? void 0 : (_data$SewerageConnect189 = _data$SewerageConnect188[0]) === null || _data$SewerageConnect189 === void 0 ? void 0 : _data$SewerageConnect189.documents
48442
+ documents: data === null || data === void 0 ? void 0 : (_data$SewerageConnect196 = data.SewerageConnections) === null || _data$SewerageConnect196 === void 0 ? void 0 : (_data$SewerageConnect197 = _data$SewerageConnect196[0]) === null || _data$SewerageConnect197 === void 0 ? void 0 : _data$SewerageConnect197.documents
46307
48443
  }
46308
48444
  } : {
46309
- applicationData: data === null || data === void 0 ? void 0 : (_data$WaterConnection187 = data.WaterConnection) === null || _data$WaterConnection187 === void 0 ? void 0 : _data$WaterConnection187[0],
48445
+ applicationData: data === null || data === void 0 ? void 0 : (_data$WaterConnection195 = data.WaterConnection) === null || _data$WaterConnection195 === void 0 ? void 0 : _data$WaterConnection195[0],
46310
48446
  serviceType: "WATER",
46311
48447
  WSDisconnectionForm: {
46312
- type: data !== null && data !== void 0 && (_data$WaterConnection188 = data.WaterConnection) !== null && _data$WaterConnection188 !== void 0 && (_data$WaterConnection189 = _data$WaterConnection188[0]) !== null && _data$WaterConnection189 !== void 0 && _data$WaterConnection189.isDisconnectionTemporary ? {
48448
+ type: data !== null && data !== void 0 && (_data$WaterConnection196 = data.WaterConnection) !== null && _data$WaterConnection196 !== void 0 && (_data$WaterConnection197 = _data$WaterConnection196[0]) !== null && _data$WaterConnection197 !== void 0 && _data$WaterConnection197.isDisconnectionTemporary ? {
46313
48449
  code: "type",
46314
48450
  value: {
46315
48451
  name: "Temporary",
@@ -46326,28 +48462,28 @@ const WSApplicationDetails = () => {
46326
48462
  code: "Permanent"
46327
48463
  }
46328
48464
  },
46329
- date: convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$WaterConnection190 = data.WaterConnection) === null || _data$WaterConnection190 === void 0 ? void 0 : (_data$WaterConnection191 = _data$WaterConnection190[0]) === null || _data$WaterConnection191 === void 0 ? void 0 : _data$WaterConnection191.dateEffectiveFrom, true),
48465
+ date: convertEpochToDateDMY(data === null || data === void 0 ? void 0 : (_data$WaterConnection198 = data.WaterConnection) === null || _data$WaterConnection198 === void 0 ? void 0 : (_data$WaterConnection199 = _data$WaterConnection198[0]) === null || _data$WaterConnection199 === void 0 ? void 0 : _data$WaterConnection199.dateEffectiveFrom, true),
46330
48466
  reason: {
46331
48467
  code: "reason",
46332
- value: data === null || data === void 0 ? void 0 : (_data$WaterConnection192 = data.WaterConnection) === null || _data$WaterConnection192 === void 0 ? void 0 : (_data$WaterConnection193 = _data$WaterConnection192[0]) === null || _data$WaterConnection193 === void 0 ? void 0 : _data$WaterConnection193.disconnectionReason
48468
+ value: data === null || data === void 0 ? void 0 : (_data$WaterConnection200 = data.WaterConnection) === null || _data$WaterConnection200 === void 0 ? void 0 : (_data$WaterConnection201 = _data$WaterConnection200[0]) === null || _data$WaterConnection201 === void 0 ? void 0 : _data$WaterConnection201.disconnectionReason
46333
48469
  },
46334
- documents: data === null || data === void 0 ? void 0 : (_data$WaterConnection194 = data.WaterConnection) === null || _data$WaterConnection194 === void 0 ? void 0 : (_data$WaterConnection195 = _data$WaterConnection194[0]) === null || _data$WaterConnection195 === void 0 ? void 0 : _data$WaterConnection195.documents
48470
+ documents: data === null || data === void 0 ? void 0 : (_data$WaterConnection202 = data.WaterConnection) === null || _data$WaterConnection202 === void 0 ? void 0 : (_data$WaterConnection203 = _data$WaterConnection202[0]) === null || _data$WaterConnection203 === void 0 ? void 0 : _data$WaterConnection203.documents
46335
48471
  }
46336
48472
  })
46337
- })) : null, data !== null && data !== void 0 && (_data$WaterConnection196 = data.WaterConnection) !== null && _data$WaterConnection196 !== void 0 && (_data$WaterConnection197 = _data$WaterConnection196[0]) !== null && _data$WaterConnection197 !== void 0 && _data$WaterConnection197.applicationType.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$WaterConnection198 = data.WaterConnection) !== null && _data$WaterConnection198 !== void 0 && (_data$WaterConnection199 = _data$WaterConnection198[0]) !== null && _data$WaterConnection199 !== void 0 && _data$WaterConnection199.applicationStatus.includes("PENDING_FOR_DISCONNECTION_EXECUTION") || data !== null && data !== void 0 && (_data$SewerageConnect190 = data.SewerageConnections) !== null && _data$SewerageConnect190 !== void 0 && (_data$SewerageConnect191 = _data$SewerageConnect190[0]) !== null && _data$SewerageConnect191 !== void 0 && _data$SewerageConnect191.applicationType.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$SewerageConnect192 = data.SewerageConnections) !== null && _data$SewerageConnect192 !== void 0 && (_data$SewerageConnect193 = _data$SewerageConnect192[0]) !== null && _data$SewerageConnect193 !== void 0 && _data$SewerageConnect193.applicationStatus.includes("PENDING_FOR_DISCONNECTION_EXECUTION") ? /*#__PURE__*/React.createElement(Link, {
48473
+ })) : null, data !== null && data !== void 0 && (_data$WaterConnection204 = data.WaterConnection) !== null && _data$WaterConnection204 !== void 0 && (_data$WaterConnection205 = _data$WaterConnection204[0]) !== null && _data$WaterConnection205 !== void 0 && _data$WaterConnection205.applicationType.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$WaterConnection206 = data.WaterConnection) !== null && _data$WaterConnection206 !== void 0 && (_data$WaterConnection207 = _data$WaterConnection206[0]) !== null && _data$WaterConnection207 !== void 0 && _data$WaterConnection207.applicationStatus.includes("PENDING_FOR_DISCONNECTION_EXECUTION") || data !== null && data !== void 0 && (_data$SewerageConnect198 = data.SewerageConnections) !== null && _data$SewerageConnect198 !== void 0 && (_data$SewerageConnect199 = _data$SewerageConnect198[0]) !== null && _data$SewerageConnect199 !== void 0 && _data$SewerageConnect199.applicationType.includes("DISCONNECT") && data !== null && data !== void 0 && (_data$SewerageConnect200 = data.SewerageConnections) !== null && _data$SewerageConnect200 !== void 0 && (_data$SewerageConnect201 = _data$SewerageConnect200[0]) !== null && _data$SewerageConnect201 !== void 0 && _data$SewerageConnect201.applicationStatus.includes("PENDING_FOR_DISCONNECTION_EXECUTION") ? /*#__PURE__*/React.createElement(Link, {
46338
48474
  to: {
46339
48475
  pathname: `/digit-ui/citizen/ws/execute-disconnection`,
46340
48476
  state: {
46341
- applicationData: (data === null || data === void 0 ? void 0 : (_data$WaterConnection200 = data.WaterConnection) === null || _data$WaterConnection200 === void 0 ? void 0 : _data$WaterConnection200[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect194 = data.SewerageConnections) === null || _data$SewerageConnect194 === void 0 ? void 0 : _data$SewerageConnect194[0]),
48477
+ applicationData: (data === null || data === void 0 ? void 0 : (_data$WaterConnection208 = data.WaterConnection) === null || _data$WaterConnection208 === void 0 ? void 0 : _data$WaterConnection208[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect202 = data.SewerageConnections) === null || _data$SewerageConnect202 === void 0 ? void 0 : _data$SewerageConnect202[0]),
46342
48478
  action: {
46343
48479
  action: "EXECUTE_DISCONNECTION"
46344
48480
  },
46345
- serviceType: data !== null && data !== void 0 && (_data$WaterConnection201 = data.WaterConnection) !== null && _data$WaterConnection201 !== void 0 && _data$WaterConnection201[0] ? "WATER" : "SEWERAGE"
48481
+ serviceType: data !== null && data !== void 0 && (_data$WaterConnection209 = data.WaterConnection) !== null && _data$WaterConnection209 !== void 0 && _data$WaterConnection209[0] ? "WATER" : "SEWERAGE"
46346
48482
  }
46347
48483
  }
46348
48484
  }, /*#__PURE__*/React.createElement(SubmitBar, {
46349
48485
  label: t("WS_EXECUTE_DISCONNECTION")
46350
- })) : null, data !== null && data !== void 0 && (_data$WaterConnection202 = data.WaterConnection) !== null && _data$WaterConnection202 !== void 0 && (_data$WaterConnection203 = _data$WaterConnection202[0]) !== null && _data$WaterConnection203 !== void 0 && (_data$WaterConnection204 = _data$WaterConnection203.applicationStatus) !== null && _data$WaterConnection204 !== void 0 && _data$WaterConnection204.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$SewerageConnect195 = data.SewerageConnections) !== null && _data$SewerageConnect195 !== void 0 && (_data$SewerageConnect196 = _data$SewerageConnect195[0]) !== null && _data$SewerageConnect196 !== void 0 && (_data$SewerageConnect197 = _data$SewerageConnect196.applicationStatus) !== null && _data$SewerageConnect197 !== void 0 && _data$SewerageConnect197.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$WaterConnection205 = data.WaterConnection) !== null && _data$WaterConnection205 !== void 0 && (_data$WaterConnection206 = _data$WaterConnection205[0]) !== null && _data$WaterConnection206 !== void 0 && (_data$WaterConnection207 = _data$WaterConnection206.applicationStatus) !== null && _data$WaterConnection207 !== void 0 && _data$WaterConnection207.includes("PENDING_FOR_RECONNECTION_EXECUTION") || data !== null && data !== void 0 && (_data$SewerageConnect198 = data.SewerageConnections) !== null && _data$SewerageConnect198 !== void 0 && (_data$SewerageConnect199 = _data$SewerageConnect198[0]) !== null && _data$SewerageConnect199 !== void 0 && (_data$SewerageConnect200 = _data$SewerageConnect199.applicationStatus) !== null && _data$SewerageConnect200 !== void 0 && _data$SewerageConnect200.includes("PENDING_FOR_RECONNECTION_EXECUTION") ? /*#__PURE__*/React.createElement("button", {
48486
+ })) : null, data !== null && data !== void 0 && (_data$WaterConnection210 = data.WaterConnection) !== null && _data$WaterConnection210 !== void 0 && (_data$WaterConnection211 = _data$WaterConnection210[0]) !== null && _data$WaterConnection211 !== void 0 && (_data$WaterConnection212 = _data$WaterConnection211.applicationStatus) !== null && _data$WaterConnection212 !== void 0 && _data$WaterConnection212.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$SewerageConnect203 = data.SewerageConnections) !== null && _data$SewerageConnect203 !== void 0 && (_data$SewerageConnect204 = _data$SewerageConnect203[0]) !== null && _data$SewerageConnect204 !== void 0 && (_data$SewerageConnect205 = _data$SewerageConnect204.applicationStatus) !== null && _data$SewerageConnect205 !== void 0 && _data$SewerageConnect205.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$WaterConnection213 = data.WaterConnection) !== null && _data$WaterConnection213 !== void 0 && (_data$WaterConnection214 = _data$WaterConnection213[0]) !== null && _data$WaterConnection214 !== void 0 && (_data$WaterConnection215 = _data$WaterConnection214.applicationStatus) !== null && _data$WaterConnection215 !== void 0 && _data$WaterConnection215.includes("PENDING_FOR_RECONNECTION_EXECUTION") || data !== null && data !== void 0 && (_data$SewerageConnect206 = data.SewerageConnections) !== null && _data$SewerageConnect206 !== void 0 && (_data$SewerageConnect207 = _data$SewerageConnect206[0]) !== null && _data$SewerageConnect207 !== void 0 && (_data$SewerageConnect208 = _data$SewerageConnect207.applicationStatus) !== null && _data$SewerageConnect208 !== void 0 && _data$SewerageConnect208.includes("PENDING_FOR_RECONNECTION_EXECUTION") ? /*#__PURE__*/React.createElement("button", {
46351
48487
  type: "button",
46352
48488
  style: {
46353
48489
  padding: "12px 24px",
@@ -46362,19 +48498,19 @@ const WSApplicationDetails = () => {
46362
48498
  display: "inline-block"
46363
48499
  },
46364
48500
  onClick: () => {
46365
- var _data$WaterConnection208, _data$WaterConnection209, _data$WaterConnection210, _data$SewerageConnect201, _data$SewerageConnect202, _data$SewerageConnect203, _data$WaterConnection211, _data$WaterConnection212, _data$SewerageConnect204, _data$SewerageConnect205, _data$WaterConnection213, _data$WaterConnection214, _data$SewerageConnect206;
46366
- const isPendingMeter = (data === null || data === void 0 ? void 0 : (_data$WaterConnection208 = data.WaterConnection) === null || _data$WaterConnection208 === void 0 ? void 0 : (_data$WaterConnection209 = _data$WaterConnection208[0]) === null || _data$WaterConnection209 === void 0 ? void 0 : (_data$WaterConnection210 = _data$WaterConnection209.applicationStatus) === null || _data$WaterConnection210 === void 0 ? void 0 : _data$WaterConnection210.includes("PENDING_FOR_METER_INSTALLATION")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect201 = data.SewerageConnections) === null || _data$SewerageConnect201 === void 0 ? void 0 : (_data$SewerageConnect202 = _data$SewerageConnect201[0]) === null || _data$SewerageConnect202 === void 0 ? void 0 : (_data$SewerageConnect203 = _data$SewerageConnect202.applicationStatus) === null || _data$SewerageConnect203 === void 0 ? void 0 : _data$SewerageConnect203.includes("PENDING_FOR_METER_INSTALLATION"));
48501
+ var _data$WaterConnection216, _data$WaterConnection217, _data$WaterConnection218, _data$SewerageConnect209, _data$SewerageConnect210, _data$SewerageConnect211, _data$WaterConnection219, _data$WaterConnection220, _data$SewerageConnect212, _data$SewerageConnect213, _data$WaterConnection221, _data$WaterConnection222, _data$SewerageConnect214;
48502
+ const isPendingMeter = (data === null || data === void 0 ? void 0 : (_data$WaterConnection216 = data.WaterConnection) === null || _data$WaterConnection216 === void 0 ? void 0 : (_data$WaterConnection217 = _data$WaterConnection216[0]) === null || _data$WaterConnection217 === void 0 ? void 0 : (_data$WaterConnection218 = _data$WaterConnection217.applicationStatus) === null || _data$WaterConnection218 === void 0 ? void 0 : _data$WaterConnection218.includes("PENDING_FOR_METER_INSTALLATION")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect209 = data.SewerageConnections) === null || _data$SewerageConnect209 === void 0 ? void 0 : (_data$SewerageConnect210 = _data$SewerageConnect209[0]) === null || _data$SewerageConnect210 === void 0 ? void 0 : (_data$SewerageConnect211 = _data$SewerageConnect210.applicationStatus) === null || _data$SewerageConnect211 === void 0 ? void 0 : _data$SewerageConnect211.includes("PENDING_FOR_METER_INSTALLATION"));
46367
48503
  const currentAction = isPendingMeter ? "ENTER_METER_DETAILS" : "ACTIVATE_CONNECTION";
46368
48504
  history.push({
46369
48505
  pathname: `/digit-ui/citizen/ws/activate-connection`,
46370
- search: `?applicationNumber=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection211 = data.WaterConnection) === null || _data$WaterConnection211 === void 0 ? void 0 : (_data$WaterConnection212 = _data$WaterConnection211[0]) === null || _data$WaterConnection212 === void 0 ? void 0 : _data$WaterConnection212.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect204 = data.SewerageConnections) === null || _data$SewerageConnect204 === void 0 ? void 0 : (_data$SewerageConnect205 = _data$SewerageConnect204[0]) === null || _data$SewerageConnect205 === void 0 ? void 0 : _data$SewerageConnect205.applicationNo)}&service=${data !== null && data !== void 0 && (_data$WaterConnection213 = data.WaterConnection) !== null && _data$WaterConnection213 !== void 0 && _data$WaterConnection213[0] ? "WATER" : "SEWERAGE"}&action=${currentAction}`,
48506
+ search: `?applicationNumber=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection219 = data.WaterConnection) === null || _data$WaterConnection219 === void 0 ? void 0 : (_data$WaterConnection220 = _data$WaterConnection219[0]) === null || _data$WaterConnection220 === void 0 ? void 0 : _data$WaterConnection220.applicationNo) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect212 = data.SewerageConnections) === null || _data$SewerageConnect212 === void 0 ? void 0 : (_data$SewerageConnect213 = _data$SewerageConnect212[0]) === null || _data$SewerageConnect213 === void 0 ? void 0 : _data$SewerageConnect213.applicationNo)}&service=${data !== null && data !== void 0 && (_data$WaterConnection221 = data.WaterConnection) !== null && _data$WaterConnection221 !== void 0 && _data$WaterConnection221[0] ? "WATER" : "SEWERAGE"}&action=${currentAction}`,
46371
48507
  state: {
46372
- applicationData: (data === null || data === void 0 ? void 0 : (_data$WaterConnection214 = data.WaterConnection) === null || _data$WaterConnection214 === void 0 ? void 0 : _data$WaterConnection214[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect206 = data.SewerageConnections) === null || _data$SewerageConnect206 === void 0 ? void 0 : _data$SewerageConnect206[0]),
48508
+ applicationData: (data === null || data === void 0 ? void 0 : (_data$WaterConnection222 = data.WaterConnection) === null || _data$WaterConnection222 === void 0 ? void 0 : _data$WaterConnection222[0]) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect214 = data.SewerageConnections) === null || _data$SewerageConnect214 === void 0 ? void 0 : _data$SewerageConnect214[0]),
46373
48509
  action: currentAction
46374
48510
  }
46375
48511
  });
46376
48512
  }
46377
- }, data !== null && data !== void 0 && (_data$WaterConnection215 = data.WaterConnection) !== null && _data$WaterConnection215 !== void 0 && (_data$WaterConnection216 = _data$WaterConnection215[0]) !== null && _data$WaterConnection216 !== void 0 && (_data$WaterConnection217 = _data$WaterConnection216.applicationStatus) !== null && _data$WaterConnection217 !== void 0 && _data$WaterConnection217.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$SewerageConnect207 = data.SewerageConnections) !== null && _data$SewerageConnect207 !== void 0 && (_data$SewerageConnect208 = _data$SewerageConnect207[0]) !== null && _data$SewerageConnect208 !== void 0 && (_data$SewerageConnect209 = _data$SewerageConnect208.applicationStatus) !== null && _data$SewerageConnect209 !== void 0 && _data$SewerageConnect209.includes("PENDING_FOR_METER_INSTALLATION") ? t("CS_PENDING_FOR_METER_INSTALLATION") : t("WS_ACTIVATE_CONNECTION")) : null)))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
48513
+ }, data !== null && data !== void 0 && (_data$WaterConnection223 = data.WaterConnection) !== null && _data$WaterConnection223 !== void 0 && (_data$WaterConnection224 = _data$WaterConnection223[0]) !== null && _data$WaterConnection224 !== void 0 && (_data$WaterConnection225 = _data$WaterConnection224.applicationStatus) !== null && _data$WaterConnection225 !== void 0 && _data$WaterConnection225.includes("PENDING_FOR_METER_INSTALLATION") || data !== null && data !== void 0 && (_data$SewerageConnect215 = data.SewerageConnections) !== null && _data$SewerageConnect215 !== void 0 && (_data$SewerageConnect216 = _data$SewerageConnect215[0]) !== null && _data$SewerageConnect216 !== void 0 && (_data$SewerageConnect217 = _data$SewerageConnect216.applicationStatus) !== null && _data$SewerageConnect217 !== void 0 && _data$SewerageConnect217.includes("PENDING_FOR_METER_INSTALLATION") ? t("CS_PENDING_FOR_METER_INSTALLATION") : t("WS_ACTIVATE_CONNECTION")) : null)))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
46378
48514
  open: showDocModal,
46379
48515
  headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
46380
48516
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
@@ -49123,7 +51259,7 @@ const EditApplication = _ref1 => {
49123
51259
  };
49124
51260
  const createApplication = function () {
49125
51261
  try {
49126
- var _params$DocumentsRequ, _currentApp$documents, _params$additionalDet4, _params$additionalDet5, _params$declarationDa, _currentApp$additiona6, _params$cpt4;
51262
+ var _params$DocumentsRequ, _currentApp$documents, _params$additionalDet4, _params$additionalDet5, _params$declarationDa, _currentApp$additiona6, _params$cpt4, _latestProperty$audit2, _appProp$auditDetails, _currentApp$auditDeta3, _currentApp$auditDeta4, _latestProperty$addit, _latestProperty$addit2, _appProp$additionalDe, _latestProperty$addit3, _latestProperty$addit4, _appProp$additionalDe2, _latestProperty$addit5, _latestProperty$addit6, _appProp$additionalDe3, _latestProperty$addit7, _latestProperty$addit8, _latestProperty$addit9, _latestProperty$addit0, _appProp$additionalDe4, _appProp$additionalDe5, _latestProperty$addit1, _latestProperty$addit10, _appProp$additionalDe6;
49127
51263
  if (params !== null && params !== void 0 && (_params$DocumentsRequ = params.DocumentsRequired) !== null && _params$DocumentsRequ !== void 0 && _params$DocumentsRequ.documents) {
49128
51264
  params.documents = {
49129
51265
  documents: params.DocumentsRequired.documents
@@ -49217,6 +51353,14 @@ const EditApplication = _ref1 => {
49217
51353
  params.SewerageConnectionResult.SewerageConnections[0].propertyId = propToSubmit === null || propToSubmit === void 0 ? void 0 : propToSubmit.propertyId;
49218
51354
  }
49219
51355
  }
51356
+ const isPropertySessionUpdated = sessionStorage.getItem("IS_PROPERTY_UPDATED") === "true" || propertyId && sessionStorage.getItem("IS_PROPERTY_UPDATED_" + propertyId) === "true" || (propToSubmit === null || propToSubmit === void 0 ? void 0 : propToSubmit.propertyId) && sessionStorage.getItem("IS_PROPERTY_UPDATED_" + propToSubmit.propertyId) === "true";
51357
+ const appProp = (Waterresult === null || Waterresult === void 0 ? void 0 : Waterresult.property) || (Sewarageresult === null || Sewarageresult === void 0 ? void 0 : Sewarageresult.property);
51358
+ const isPropertyTimeUpdated = Boolean((latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$audit2 = latestProperty.auditDetails) === null || _latestProperty$audit2 === void 0 ? void 0 : _latestProperty$audit2.lastModifiedTime) && ((appProp === null || appProp === void 0 ? void 0 : (_appProp$auditDetails = appProp.auditDetails) === null || _appProp$auditDetails === void 0 ? void 0 : _appProp$auditDetails.lastModifiedTime) && latestProperty.auditDetails.lastModifiedTime > appProp.auditDetails.lastModifiedTime || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$auditDeta3 = currentApp.auditDetails) === null || _currentApp$auditDeta3 === void 0 ? void 0 : _currentApp$auditDeta3.lastModifiedTime) && latestProperty.auditDetails.lastModifiedTime > currentApp.auditDetails.lastModifiedTime || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$auditDeta4 = currentApp.auditDetails) === null || _currentApp$auditDeta4 === void 0 ? void 0 : _currentApp$auditDeta4.createdTime) && latestProperty.auditDetails.lastModifiedTime > currentApp.auditDetails.createdTime));
51359
+ const isPropertyFieldUpdated = Boolean(latestProperty && appProp && ((latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit = latestProperty.additionalDetails) === null || _latestProperty$addit === void 0 ? void 0 : _latestProperty$addit.plotArea) && (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit2 = latestProperty.additionalDetails) === null || _latestProperty$addit2 === void 0 ? void 0 : _latestProperty$addit2.plotArea) != (appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe = appProp.additionalDetails) === null || _appProp$additionalDe === void 0 ? void 0 : _appProp$additionalDe.plotArea) || (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit3 = latestProperty.additionalDetails) === null || _latestProperty$addit3 === void 0 ? void 0 : _latestProperty$addit3.builtUpArea) && (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit4 = latestProperty.additionalDetails) === null || _latestProperty$addit4 === void 0 ? void 0 : _latestProperty$addit4.builtUpArea) != (appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe2 = appProp.additionalDetails) === null || _appProp$additionalDe2 === void 0 ? void 0 : _appProp$additionalDe2.builtUpArea) || (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit5 = latestProperty.additionalDetails) === null || _latestProperty$addit5 === void 0 ? void 0 : _latestProperty$addit5.propertyCategory) && (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit6 = latestProperty.additionalDetails) === null || _latestProperty$addit6 === void 0 ? void 0 : _latestProperty$addit6.propertyCategory) != (appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe3 = appProp.additionalDetails) === null || _appProp$additionalDe3 === void 0 ? void 0 : _appProp$additionalDe3.propertyCategory) || (latestProperty === null || latestProperty === void 0 ? void 0 : latestProperty.propertyType) && (latestProperty === null || latestProperty === void 0 ? void 0 : latestProperty.propertyType) != (appProp === null || appProp === void 0 ? void 0 : appProp.propertyType) || (latestProperty === null || latestProperty === void 0 ? void 0 : latestProperty.noOfFloors) && (latestProperty === null || latestProperty === void 0 ? void 0 : latestProperty.noOfFloors) != (appProp === null || appProp === void 0 ? void 0 : appProp.noOfFloors) || ((latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit7 = latestProperty.additionalDetails) === null || _latestProperty$addit7 === void 0 ? void 0 : _latestProperty$addit7.numberOfDwellingUnits) || (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit8 = latestProperty.additionalDetails) === null || _latestProperty$addit8 === void 0 ? void 0 : _latestProperty$addit8.noOfDwellingUnits)) && ((latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit9 = latestProperty.additionalDetails) === null || _latestProperty$addit9 === void 0 ? void 0 : _latestProperty$addit9.numberOfDwellingUnits) || (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit0 = latestProperty.additionalDetails) === null || _latestProperty$addit0 === void 0 ? void 0 : _latestProperty$addit0.noOfDwellingUnits)) != ((appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe4 = appProp.additionalDetails) === null || _appProp$additionalDe4 === void 0 ? void 0 : _appProp$additionalDe4.numberOfDwellingUnits) || (appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe5 = appProp.additionalDetails) === null || _appProp$additionalDe5 === void 0 ? void 0 : _appProp$additionalDe5.noOfDwellingUnits)) || (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit1 = latestProperty.additionalDetails) === null || _latestProperty$addit1 === void 0 ? void 0 : _latestProperty$addit1.heightOfTheBuilding) && (latestProperty === null || latestProperty === void 0 ? void 0 : (_latestProperty$addit10 = latestProperty.additionalDetails) === null || _latestProperty$addit10 === void 0 ? void 0 : _latestProperty$addit10.heightOfTheBuilding) != (appProp === null || appProp === void 0 ? void 0 : (_appProp$additionalDe6 = appProp.additionalDetails) === null || _appProp$additionalDe6 === void 0 ? void 0 : _appProp$additionalDe6.heightOfTheBuilding)));
51360
+ const isPropUpdated = Boolean(isPropertySessionUpdated || isPropertyTimeUpdated || isPropertyFieldUpdated || (params === null || params === void 0 ? void 0 : params.isPropertyUpdated) === true);
51361
+ params.isPropertyUpdated = isPropUpdated;
51362
+ params.workflowAction = isPropUpdated ? "RESUBMIT_FOR_INFRA_PAYMENT" : "RESUBMIT_APPLICATION";
51363
+ sessionStorage.setItem("WS_WORKFLOW_ACTION", params.workflowAction);
49220
51364
  history.push(`${getPath$3(match.path, match.params)}/acknowledgement`);
49221
51365
  return Promise.resolve();
49222
51366
  } catch (e) {
@@ -50347,7 +52491,7 @@ const BannerPicker$2 = props => {
50347
52491
  });
50348
52492
  };
50349
52493
  const WSAcknowledgement = _ref => {
50350
- var _data$serviceName7, _data$serviceName8, _data$serviceName9, _data$serviceName0, _data$serviceName1, _data$serviceName10, _data$serviceName11, _data$serviceName12, _data$serviceName13, _data$serviceName14;
52494
+ var _data$serviceName7, _data$serviceName8, _data$serviceName9, _data$serviceName0, _data$serviceName1, _data$serviceName10, _data$serviceName11, _data$serviceName12, _data$serviceName13, _data$serviceName14, _WSmutation$data3, _WSmutation$data3$Wat, _WSmutation$data3$Wat2, _WSmutation$data3$Wat3, _WSmutation$data4, _WSmutation$data4$Wat, _WSmutation$data4$Wat2, _SWmutation$data3, _SWmutation$data3$Sew, _SWmutation$data3$Sew2, _SWmutation$data3$Sew3, _SWmutation$data4, _SWmutation$data4$Sew, _SWmutation$data4$Sew2, _WSmutation$data5, _WSmutation$data5$Wat, _WSmutation$data5$Wat2, _WSmutation$data6, _WSmutation$data6$Wat, _WSmutation$data6$Wat2, _SWmutation$data5, _SWmutation$data5$Sew, _SWmutation$data5$Sew2, _data$cpt11, _data$cpt11$details, _WSmutation$data7, _WSmutation$data7$Wat, _WSmutation$data7$Wat2, _SWmutation$data6, _SWmutation$data6$Sew, _SWmutation$data6$Sew2, _WSmutation$data8, _WSmutation$data8$Wat, _WSmutation$data8$Wat2, _SWmutation$data7, _SWmutation$data7$Sew, _SWmutation$data7$Sew2;
50351
52495
  let {
50352
52496
  data,
50353
52497
  onSuccess,
@@ -50374,9 +52518,18 @@ const WSAcknowledgement = _ref => {
50374
52518
  const mutationTriggeredRef = React.useRef(false);
50375
52519
  const swMutationTriggeredRef = React.useRef(false);
50376
52520
  const handleSuccess = res => {
52521
+ var _data$cpt, _data$cpt$details;
50377
52522
  sessionStorage.removeItem("WS_EDIT_APPLICATION_V5");
50378
52523
  sessionStorage.removeItem("WaterInitialObject");
50379
52524
  sessionStorage.removeItem("SewerageInitialObject");
52525
+ sessionStorage.removeItem("IS_PROPERTY_UPDATED");
52526
+ sessionStorage.removeItem("WS_WORKFLOW_ACTION");
52527
+ if (data !== null && data !== void 0 && data.propertyId) {
52528
+ sessionStorage.removeItem("IS_PROPERTY_UPDATED_" + data.propertyId);
52529
+ }
52530
+ if (data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && (_data$cpt$details = _data$cpt.details) !== null && _data$cpt$details !== void 0 && _data$cpt$details.propertyId) {
52531
+ sessionStorage.removeItem("IS_PROPERTY_UPDATED_" + data.cpt.details.propertyId);
52532
+ }
50380
52533
  if (onSuccess) onSuccess(res);
50381
52534
  };
50382
52535
  useEffect(() => {
@@ -50385,9 +52538,9 @@ const WSAcknowledgement = _ref => {
50385
52538
  var _data$serviceName, _data$serviceName2;
50386
52539
  let tenantId;
50387
52540
  if ((data === null || data === void 0 ? void 0 : (_data$serviceName = data.serviceName) === null || _data$serviceName === void 0 ? void 0 : _data$serviceName.code) === "WATER" || (data === null || data === void 0 ? void 0 : (_data$serviceName2 = data.serviceName) === null || _data$serviceName2 === void 0 ? void 0 : _data$serviceName2.code) === "BOTH") {
50388
- var _data$cpt, _data$cpt$details;
52541
+ var _data$cpt2, _data$cpt2$details;
50389
52542
  mutationTriggeredRef.current = true;
50390
- tenantId = (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.tenantId) || tenantId;
52543
+ tenantId = (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : _data$cpt2$details.tenantId) || tenantId;
50391
52544
  let formdata = isEdit ? convertToEditWSUpdate(data) : convertToWSUpdate(data);
50392
52545
  const formdataNew = {
50393
52546
  ...formdata,
@@ -50419,30 +52572,30 @@ const WSAcknowledgement = _ref => {
50419
52572
  }
50420
52573
  }, [data, WSmutation.isSuccess]);
50421
52574
  const handleDownloadPdfWater = () => {
50422
- var _WSmutation$data, _WSmutation$data$Wate, _data$cpt4;
52575
+ var _WSmutation$data, _WSmutation$data$Wate, _data$cpt5;
50423
52576
  const WSmutationdata = WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data = WSmutation.data) === null || _WSmutation$data === void 0 ? void 0 : (_WSmutation$data$Wate = _WSmutation$data.WaterConnection) === null || _WSmutation$data$Wate === void 0 ? void 0 : _WSmutation$data$Wate[0];
50424
52577
  const tenantInfo = tenants.find(tenant => {
50425
- var _data$cpt3, _data$cpt3$details;
50426
- return tenant.code === (data === null || data === void 0 ? void 0 : (_data$cpt3 = data.cpt) === null || _data$cpt3 === void 0 ? void 0 : (_data$cpt3$details = _data$cpt3.details) === null || _data$cpt3$details === void 0 ? void 0 : _data$cpt3$details.tenantId);
52578
+ var _data$cpt4, _data$cpt4$details;
52579
+ return tenant.code === (data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : (_data$cpt4$details = _data$cpt4.details) === null || _data$cpt4$details === void 0 ? void 0 : _data$cpt4$details.tenantId);
50427
52580
  });
50428
52581
  const data1 = getWSAcknowledgementData({
50429
52582
  ...WSmutationdata
50430
52583
  }, {
50431
- ...(data === null || data === void 0 ? void 0 : (_data$cpt4 = data.cpt) === null || _data$cpt4 === void 0 ? void 0 : _data$cpt4.details)
52584
+ ...(data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : _data$cpt5.details)
50432
52585
  }, tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code, t);
50433
52586
  data1.then(ress => Digit.Utils.pdf.generatev1(ress));
50434
52587
  };
50435
52588
  const handleDownloadPdfSewerage = () => {
50436
- var _SWmutation$data, _SWmutation$data$Sewe, _data$cpt6;
52589
+ var _SWmutation$data, _SWmutation$data$Sewe, _data$cpt7;
50437
52590
  const SWmutationdata = SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data = SWmutation.data) === null || _SWmutation$data === void 0 ? void 0 : (_SWmutation$data$Sewe = _SWmutation$data.SewerageConnections) === null || _SWmutation$data$Sewe === void 0 ? void 0 : _SWmutation$data$Sewe[0];
50438
52591
  const tenantInfo = tenants.find(tenant => {
50439
- var _data$cpt5, _data$cpt5$details;
50440
- return tenant.code === (data === null || data === void 0 ? void 0 : (_data$cpt5 = data.cpt) === null || _data$cpt5 === void 0 ? void 0 : (_data$cpt5$details = _data$cpt5.details) === null || _data$cpt5$details === void 0 ? void 0 : _data$cpt5$details.tenantId);
52592
+ var _data$cpt6, _data$cpt6$details;
52593
+ return tenant.code === (data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : (_data$cpt6$details = _data$cpt6.details) === null || _data$cpt6$details === void 0 ? void 0 : _data$cpt6$details.tenantId);
50441
52594
  });
50442
52595
  const data2 = getWSAcknowledgementData({
50443
52596
  ...SWmutationdata
50444
52597
  }, {
50445
- ...(data === null || data === void 0 ? void 0 : (_data$cpt6 = data.cpt) === null || _data$cpt6 === void 0 ? void 0 : _data$cpt6.details)
52598
+ ...(data === null || data === void 0 ? void 0 : (_data$cpt7 = data.cpt) === null || _data$cpt7 === void 0 ? void 0 : _data$cpt7.details)
50446
52599
  }, tenantInfo === null || tenantInfo === void 0 ? void 0 : tenantInfo.code, t);
50447
52600
  data2.then(ress => Digit.Utils.pdf.generatev1(ress));
50448
52601
  };
@@ -50483,7 +52636,22 @@ const WSAcknowledgement = _ref => {
50483
52636
  className: "download-button"
50484
52637
  }, t("WS_PRINT_SEWERAGE_APPLICATION_LABEL"))),
50485
52638
  onClick: handleDownloadPdfSewerage
50486
- }), /*#__PURE__*/React.createElement(Link, {
52639
+ }), ((WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data3 = WSmutation.data) === null || _WSmutation$data3 === void 0 ? void 0 : (_WSmutation$data3$Wat = _WSmutation$data3.WaterConnection) === null || _WSmutation$data3$Wat === void 0 ? void 0 : (_WSmutation$data3$Wat2 = _WSmutation$data3$Wat[0]) === null || _WSmutation$data3$Wat2 === void 0 ? void 0 : (_WSmutation$data3$Wat3 = _WSmutation$data3$Wat2.applicationStatus) === null || _WSmutation$data3$Wat3 === void 0 ? void 0 : _WSmutation$data3$Wat3.includes("INFRA_PAYMENT")) || (WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data4 = WSmutation.data) === null || _WSmutation$data4 === void 0 ? void 0 : (_WSmutation$data4$Wat = _WSmutation$data4.WaterConnection) === null || _WSmutation$data4$Wat === void 0 ? void 0 : (_WSmutation$data4$Wat2 = _WSmutation$data4$Wat[0]) === null || _WSmutation$data4$Wat2 === void 0 ? void 0 : _WSmutation$data4$Wat2.applicationStatus) === "PENDING_FOR_PAYMENT" || (SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data3 = SWmutation.data) === null || _SWmutation$data3 === void 0 ? void 0 : (_SWmutation$data3$Sew = _SWmutation$data3.SewerageConnections) === null || _SWmutation$data3$Sew === void 0 ? void 0 : (_SWmutation$data3$Sew2 = _SWmutation$data3$Sew[0]) === null || _SWmutation$data3$Sew2 === void 0 ? void 0 : (_SWmutation$data3$Sew3 = _SWmutation$data3$Sew2.applicationStatus) === null || _SWmutation$data3$Sew3 === void 0 ? void 0 : _SWmutation$data3$Sew3.includes("INFRA_PAYMENT")) || (SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data4 = SWmutation.data) === null || _SWmutation$data4 === void 0 ? void 0 : (_SWmutation$data4$Sew = _SWmutation$data4.SewerageConnections) === null || _SWmutation$data4$Sew === void 0 ? void 0 : (_SWmutation$data4$Sew2 = _SWmutation$data4$Sew[0]) === null || _SWmutation$data4$Sew2 === void 0 ? void 0 : _SWmutation$data4$Sew2.applicationStatus) === "PENDING_FOR_PAYMENT") && /*#__PURE__*/React.createElement("div", {
52640
+ style: {
52641
+ marginTop: "10px",
52642
+ marginBottom: "10px"
52643
+ }
52644
+ }, /*#__PURE__*/React.createElement(Link, {
52645
+ to: {
52646
+ pathname: `/digit-ui/citizen/payment/collect/${WSmutation !== null && WSmutation !== void 0 && (_WSmutation$data5 = WSmutation.data) !== null && _WSmutation$data5 !== void 0 && (_WSmutation$data5$Wat = _WSmutation$data5.WaterConnection) !== null && _WSmutation$data5$Wat !== void 0 && (_WSmutation$data5$Wat2 = _WSmutation$data5$Wat[0]) !== null && _WSmutation$data5$Wat2 !== void 0 && _WSmutation$data5$Wat2.applicationNo ? "WS.ONE_TIME_FEE" : "SW.ONE_TIME_FEE"}/${((WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data6 = WSmutation.data) === null || _WSmutation$data6 === void 0 ? void 0 : (_WSmutation$data6$Wat = _WSmutation$data6.WaterConnection) === null || _WSmutation$data6$Wat === void 0 ? void 0 : (_WSmutation$data6$Wat2 = _WSmutation$data6$Wat[0]) === null || _WSmutation$data6$Wat2 === void 0 ? void 0 : _WSmutation$data6$Wat2.applicationNo) || (SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data5 = SWmutation.data) === null || _SWmutation$data5 === void 0 ? void 0 : (_SWmutation$data5$Sew = _SWmutation$data5.SewerageConnections) === null || _SWmutation$data5$Sew === void 0 ? void 0 : (_SWmutation$data5$Sew2 = _SWmutation$data5$Sew[0]) === null || _SWmutation$data5$Sew2 === void 0 ? void 0 : _SWmutation$data5$Sew2.applicationNo) || "").replace(/\//g, "+")}`,
52647
+ search: `?workflow=WNS&tenantId=${(data === null || data === void 0 ? void 0 : (_data$cpt11 = data.cpt) === null || _data$cpt11 === void 0 ? void 0 : (_data$cpt11$details = _data$cpt11.details) === null || _data$cpt11$details === void 0 ? void 0 : _data$cpt11$details.tenantId) || (WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data7 = WSmutation.data) === null || _WSmutation$data7 === void 0 ? void 0 : (_WSmutation$data7$Wat = _WSmutation$data7.WaterConnection) === null || _WSmutation$data7$Wat === void 0 ? void 0 : (_WSmutation$data7$Wat2 = _WSmutation$data7$Wat[0]) === null || _WSmutation$data7$Wat2 === void 0 ? void 0 : _WSmutation$data7$Wat2.tenantId) || (SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data6 = SWmutation.data) === null || _SWmutation$data6 === void 0 ? void 0 : (_SWmutation$data6$Sew = _SWmutation$data6.SewerageConnections) === null || _SWmutation$data6$Sew === void 0 ? void 0 : (_SWmutation$data6$Sew2 = _SWmutation$data6$Sew[0]) === null || _SWmutation$data6$Sew2 === void 0 ? void 0 : _SWmutation$data6$Sew2.tenantId)}&consumerCode=${(WSmutation === null || WSmutation === void 0 ? void 0 : (_WSmutation$data8 = WSmutation.data) === null || _WSmutation$data8 === void 0 ? void 0 : (_WSmutation$data8$Wat = _WSmutation$data8.WaterConnection) === null || _WSmutation$data8$Wat === void 0 ? void 0 : (_WSmutation$data8$Wat2 = _WSmutation$data8$Wat[0]) === null || _WSmutation$data8$Wat2 === void 0 ? void 0 : _WSmutation$data8$Wat2.applicationNo) || (SWmutation === null || SWmutation === void 0 ? void 0 : (_SWmutation$data7 = SWmutation.data) === null || _SWmutation$data7 === void 0 ? void 0 : (_SWmutation$data7$Sew = _SWmutation$data7.SewerageConnections) === null || _SWmutation$data7$Sew === void 0 ? void 0 : (_SWmutation$data7$Sew2 = _SWmutation$data7$Sew[0]) === null || _SWmutation$data7$Sew2 === void 0 ? void 0 : _SWmutation$data7$Sew2.applicationNo)}`,
52648
+ state: {
52649
+ fromAcknowledgement: true
52650
+ }
52651
+ }
52652
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
52653
+ label: t("MAKE_PAYMENT")
52654
+ }))), /*#__PURE__*/React.createElement(Link, {
50487
52655
  to: {
50488
52656
  pathname: `/digit-ui/${window.location.pathname.includes("employee") ? "employee" : "citizen"}`
50489
52657
  }
@@ -66195,7 +68363,8 @@ const componentsToRegister = {
66195
68363
  WSOLDApplication: OLDApplication,
66196
68364
  WSDivyangjan: WSDivyangjan,
66197
68365
  WSRainWaterHarvesting: WSRainWaterHarvesting,
66198
- WSExecuteDisconnection: WSExecuteDisconnection
68366
+ WSExecuteDisconnection: WSExecuteDisconnection,
68367
+ WSFieldInspection: WSFieldInspection
66199
68368
  };
66200
68369
  const initWSComponents = () => {
66201
68370
  Object.entries(componentsToRegister).forEach(_ref3 => {