@djb25/digit-ui-module-ws 1.0.104 → 1.0.106

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.
@@ -504,31 +504,42 @@ const getPattern = type => {
504
504
  };
505
505
  const getFiles = function (filesArray, tenant) {
506
506
  try {
507
- const _temp3 = _catch(function () {
507
+ return Promise.resolve(_catch(function () {
508
+ if (!filesArray || filesArray.length === 0) return;
509
+ const targetFile = filesArray[0];
510
+ if (targetFile && typeof targetFile === "object") {
511
+ if (targetFile instanceof File || targetFile !== null && targetFile !== void 0 && targetFile.type) {
512
+ window.open(URL.createObjectURL(targetFile), "_blank");
513
+ return;
514
+ }
515
+ if (targetFile !== null && targetFile !== void 0 && targetFile.fileStoreId) {
516
+ filesArray = [targetFile.fileStoreId];
517
+ }
518
+ }
508
519
  return Promise.resolve(Digit.UploadServices.Filefetch(filesArray, tenant)).then(function (response) {
509
- var _response$data, _response$data$fileSt, _response$data$fileSt2, _response$data2;
510
- if (response !== null && response !== void 0 && (_response$data = response.data) !== null && _response$data !== void 0 && (_response$data$fileSt = _response$data.fileStoreIds) !== null && _response$data$fileSt !== void 0 && (_response$data$fileSt2 = _response$data$fileSt[0]) !== null && _response$data$fileSt2 !== void 0 && _response$data$fileSt2.url) {
511
- window.open(response.data.fileStoreIds[0].url);
512
- } else if (response !== null && response !== void 0 && (_response$data2 = response.data) !== null && _response$data2 !== void 0 && _response$data2[filesArray === null || filesArray === void 0 ? void 0 : filesArray[0]]) {
513
- let linkText = response.data[filesArray[0]];
514
- let fileURL = "";
515
- if (linkText && typeof linkText == "string") {
516
- const linkList = linkText.split(",");
517
- linkList.forEach(link => {
518
- if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
519
- fileURL = link;
520
- }
521
- });
522
- }
523
- if (fileURL) {
524
- window.open(fileURL);
520
+ var _response$data, _response$data$fileSt, _response$data$fileSt2, _filesArray, _response$data2;
521
+ let rawUrl = (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$fileSt = _response$data.fileStoreIds) === null || _response$data$fileSt === void 0 ? void 0 : (_response$data$fileSt2 = _response$data$fileSt[0]) === null || _response$data$fileSt2 === void 0 ? void 0 : _response$data$fileSt2.url) || ((_filesArray = filesArray) !== null && _filesArray !== void 0 && _filesArray[0] ? response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2[filesArray[0]] : "") || "";
522
+ let fileURL = "";
523
+ if (rawUrl && typeof rawUrl === "string") {
524
+ const linkList = rawUrl.split(",");
525
+ linkList.forEach(link => {
526
+ const trimmed = link ? link.trim() : "";
527
+ if (trimmed && !trimmed.includes("large") && !trimmed.includes("medium") && !trimmed.includes("small")) {
528
+ fileURL = trimmed;
529
+ }
530
+ });
531
+ if (!fileURL && linkList[0]) {
532
+ fileURL = linkList[0].trim();
525
533
  }
526
534
  }
535
+ if (fileURL) {
536
+ window.open(fileURL, "_blank");
537
+ return fileURL;
538
+ }
527
539
  });
528
540
  }, function (error) {
529
541
  console.error("Error fetching file URL", error);
530
- });
531
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
542
+ }));
532
543
  } catch (e) {
533
544
  return Promise.reject(e);
534
545
  }
@@ -832,7 +843,7 @@ const convertToWSUpdate = data => {
832
843
  return formdata;
833
844
  };
834
845
  const convertToEditWSUpdate = data => {
835
- var _data$WaterConnection3, _data$WaterConnection4, _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, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
846
+ var _data$WaterConnection3, _data$WaterConnection4, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai3, _waterResult$addition, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai4, _waterResult$addition2, _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, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
836
847
  let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnectionResult) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3.WaterConnection) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4[0];
837
848
  let formdata = {
838
849
  WaterConnection: {
@@ -852,10 +863,10 @@ const convertToEditWSUpdate = data => {
852
863
  connectionExecutionDate: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionExecutionDate : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionExecutionDate) || null,
853
864
  connectionCategory: null,
854
865
  connectionType: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionType : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType) || null,
855
- additionalDetails: data !== null && data !== void 0 && data.isEditApplication ? {
856
- ...(data === null || data === void 0 ? void 0 : data.additionalDetails)
857
- } : {
858
- ...(waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails)
866
+ additionalDetails: {
867
+ ...(data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.additionalDetails : waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails),
868
+ addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : (_data$ConnectionDetai5 = _data$ConnectionDetai4.addressType) === null || _data$ConnectionDetai5 === void 0 ? void 0 : _data$ConnectionDetai5.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai6 = data.ConnectionDetails) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6[0]) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai3 = data.additionalDetails) === null || _data$additionalDetai3 === void 0 ? void 0 : _data$additionalDetai3.addressType : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.addressType) || "",
869
+ completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai4 = data.additionalDetails) === null || _data$additionalDetai4 === void 0 ? void 0 : _data$additionalDetai4.completeAddress : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.completeAddress) || ""
859
870
  },
860
871
  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,
861
872
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
@@ -915,7 +926,7 @@ const convertToEditWSUpdate = data => {
915
926
  return formdata;
916
927
  };
917
928
  const convertToEditSWUpdate = data => {
918
- var _data$SewerageConnect, _data$SewerageConnect2, _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, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
929
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai5, _SewerageResult$addit, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai6, _SewerageResult$addit2, _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, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
919
930
  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];
920
931
  let formdata = {
921
932
  SewerageConnection: {
@@ -935,10 +946,10 @@ const convertToEditSWUpdate = data => {
935
946
  connectionExecutionDate: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionExecutionDate : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionExecutionDate) || null,
936
947
  connectionCategory: null,
937
948
  connectionType: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionType : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionType) || null,
938
- additionalDetails: data !== null && data !== void 0 && data.isEditApplication ? {
939
- ...(data === null || data === void 0 ? void 0 : data.additionalDetails)
940
- } : {
941
- ...(SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails)
949
+ additionalDetails: {
950
+ ...(data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.additionalDetails : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails),
951
+ addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.addressType) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai5 = data.additionalDetails) === null || _data$additionalDetai5 === void 0 ? void 0 : _data$additionalDetai5.addressType : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit = SewerageResult.additionalDetails) === null || _SewerageResult$addit === void 0 ? void 0 : _SewerageResult$addit.addressType) || "",
952
+ completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai6 = data.additionalDetails) === null || _data$additionalDetai6 === void 0 ? void 0 : _data$additionalDetai6.completeAddress : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit2 = SewerageResult.additionalDetails) === null || _SewerageResult$addit2 === void 0 ? void 0 : _SewerageResult$addit2.completeAddress) || ""
942
953
  },
943
954
  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,
944
955
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
@@ -1815,7 +1826,7 @@ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
1815
1826
  };
1816
1827
  const convertEditApplicationDetails = function (data, appData, actionData) {
1817
1828
  try {
1818
- var _data$cpt30, _data$cpt30$details, _data$cpt30$details$o, _appData$applicationD, _data$DocumentsRequir, _data$cpt31, _data$cpt31$details, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionHolde58, _data$ConnectionHolde59, _appData$applicationD2, _appData$applicationD3, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$cpt32;
1829
+ var _data$cpt30, _data$cpt30$details, _data$cpt30$details$o, _appData$applicationD, _data$DocumentsRequir, _data$cpt31, _data$cpt31$details, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionDetai19, _data$ConnectionDetai20, _data$ConnectionDetai21, _data$ConnectionDetai22, _data$ConnectionDetai23, _data$ConnectionDetai24, _data$ConnectionDetai25, _data$ConnectionDetai26, _data$ConnectionDetai27, _data$ConnectionDetai28, _data$ConnectionDetai29, _data$ConnectionDetai30, _data$ConnectionDetai31, _data$ConnectionDetai32, _data$ConnectionHolde58, _data$ConnectionHolde59, _appData$applicationD2, _appData$applicationD3, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$cpt32;
1819
1830
  data === null || data === void 0 ? void 0 : (_data$cpt30 = data.cpt) === null || _data$cpt30 === void 0 ? void 0 : (_data$cpt30$details = _data$cpt30.details) === null || _data$cpt30$details === void 0 ? void 0 : (_data$cpt30$details$o = _data$cpt30$details.owners) === null || _data$cpt30$details$o === void 0 ? void 0 : _data$cpt30$details$o.forEach(owner => {
1820
1831
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1821
1832
  });
@@ -1827,10 +1838,10 @@ const convertEditApplicationDetails = function (data, appData, actionData) {
1827
1838
  let payload = {
1828
1839
  ...appData.applicationData,
1829
1840
  propertyId: 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.propertyId,
1830
- proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : _data$ConnectionDetai4.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai5 = data.ConnectionDetails) === null || _data$ConnectionDetai5 === void 0 ? void 0 : (_data$ConnectionDetai6 = _data$ConnectionDetai5[0]) === null || _data$ConnectionDetai6 === void 0 ? void 0 : _data$ConnectionDetai6.proposedTaps),
1831
- proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai7 = data.ConnectionDetails) === null || _data$ConnectionDetai7 === void 0 ? void 0 : (_data$ConnectionDetai8 = _data$ConnectionDetai7[0]) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8.proposedPipeSize) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.proposedPipeSize) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.size),
1832
- proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.proposedWaterClosets),
1833
- proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai17 = data.ConnectionDetails) === null || _data$ConnectionDetai17 === void 0 ? void 0 : (_data$ConnectionDetai18 = _data$ConnectionDetai17[0]) === null || _data$ConnectionDetai18 === void 0 ? void 0 : _data$ConnectionDetai18.proposedToilets),
1841
+ proposedTaps: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai15 = data.ConnectionDetails) === null || _data$ConnectionDetai15 === void 0 ? void 0 : (_data$ConnectionDetai16 = _data$ConnectionDetai15[0]) === null || _data$ConnectionDetai16 === void 0 ? void 0 : _data$ConnectionDetai16.proposedTaps) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai17 = data.ConnectionDetails) === null || _data$ConnectionDetai17 === void 0 ? void 0 : (_data$ConnectionDetai18 = _data$ConnectionDetai17[0]) === null || _data$ConnectionDetai18 === void 0 ? void 0 : _data$ConnectionDetai18.proposedTaps),
1842
+ proposedPipeSize: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai19 = data.ConnectionDetails) === null || _data$ConnectionDetai19 === void 0 ? void 0 : (_data$ConnectionDetai20 = _data$ConnectionDetai19[0]) === null || _data$ConnectionDetai20 === void 0 ? void 0 : (_data$ConnectionDetai21 = _data$ConnectionDetai20.proposedPipeSize) === null || _data$ConnectionDetai21 === void 0 ? void 0 : _data$ConnectionDetai21.size) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai22 = data.ConnectionDetails) === null || _data$ConnectionDetai22 === void 0 ? void 0 : (_data$ConnectionDetai23 = _data$ConnectionDetai22[0]) === null || _data$ConnectionDetai23 === void 0 ? void 0 : (_data$ConnectionDetai24 = _data$ConnectionDetai23.proposedPipeSize) === null || _data$ConnectionDetai24 === void 0 ? void 0 : _data$ConnectionDetai24.size),
1843
+ proposedWaterClosets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai25 = data.ConnectionDetails) === null || _data$ConnectionDetai25 === void 0 ? void 0 : (_data$ConnectionDetai26 = _data$ConnectionDetai25[0]) === null || _data$ConnectionDetai26 === void 0 ? void 0 : _data$ConnectionDetai26.proposedWaterClosets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai27 = data.ConnectionDetails) === null || _data$ConnectionDetai27 === void 0 ? void 0 : (_data$ConnectionDetai28 = _data$ConnectionDetai27[0]) === null || _data$ConnectionDetai28 === void 0 ? void 0 : _data$ConnectionDetai28.proposedWaterClosets),
1844
+ proposedToilets: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai29 = data.ConnectionDetails) === null || _data$ConnectionDetai29 === void 0 ? void 0 : (_data$ConnectionDetai30 = _data$ConnectionDetai29[0]) === null || _data$ConnectionDetai30 === void 0 ? void 0 : _data$ConnectionDetai30.proposedToilets) && Number(data === null || data === void 0 ? void 0 : (_data$ConnectionDetai31 = data.ConnectionDetails) === null || _data$ConnectionDetai31 === void 0 ? void 0 : (_data$ConnectionDetai32 = _data$ConnectionDetai31[0]) === null || _data$ConnectionDetai32 === void 0 ? void 0 : _data$ConnectionDetai32.proposedToilets),
1834
1845
  connectionHolders: !(data !== null && data !== void 0 && (_data$ConnectionHolde58 = data.ConnectionHolderDetails) !== null && _data$ConnectionHolde58 !== void 0 && (_data$ConnectionHolde59 = _data$ConnectionHolde58[0]) !== null && _data$ConnectionHolde59 !== void 0 && _data$ConnectionHolde59.sameAsOwnerDetails) ? [{
1835
1846
  ...(appData === null || appData === void 0 ? void 0 : (_appData$applicationD2 = appData.applicationData) === null || _appData$applicationD2 === void 0 ? void 0 : (_appData$applicationD3 = _appData$applicationD2.connectionHolders) === null || _appData$applicationD3 === void 0 ? void 0 : _appData$applicationD3[0]),
1836
1847
  correspondenceAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde60 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde60 === void 0 ? void 0 : (_data$ConnectionHolde61 = _data$ConnectionHolde60[0]) === null || _data$ConnectionHolde61 === void 0 ? void 0 : _data$ConnectionHolde61.address) || "",
@@ -1940,16 +1951,16 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
1940
1951
  name: data === null || data === void 0 ? void 0 : (_data$plumberDetails1 = data.plumberDetails) === null || _data$plumberDetails1 === void 0 ? void 0 : (_data$plumberDetails10 = _data$plumberDetails1[0]) === null || _data$plumberDetails10 === void 0 ? void 0 : _data$plumberDetails10.plumberName,
1941
1952
  id: appData === null || appData === void 0 ? void 0 : (_appData$applicationD6 = appData.applicationData) === null || _appData$applicationD6 === void 0 ? void 0 : (_appData$applicationD7 = _appData$applicationD6.plumberInfo) === null || _appData$applicationD7 === void 0 ? void 0 : (_appData$applicationD8 = _appData$applicationD7[0]) === null || _appData$applicationD8 === void 0 ? void 0 : _appData$applicationD8.id
1942
1953
  }];
1943
- const _temp6 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionReason) || "",
1944
- _temp5 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionType) == "TEMPORARY" ? true : false,
1945
- _temp4 = (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents;
1954
+ const _temp5 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionReason) || "",
1955
+ _temp4 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionType) == "TEMPORARY" ? true : false,
1956
+ _temp3 = (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents;
1946
1957
  return Promise.resolve(getConvertedDate(data === null || data === void 0 ? void 0 : (_data$disConnectionDe5 = data.disConnectionDetails) === null || _data$disConnectionDe5 === void 0 ? void 0 : (_data$disConnectionDe6 = _data$disConnectionDe5[0]) === null || _data$disConnectionDe6 === void 0 ? void 0 : _data$disConnectionDe6.disConnectionProposeDate)).then(function (_getConvertedDate) {
1947
1958
  var _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
1948
1959
  let payload = {
1949
1960
  ...appData.applicationData,
1950
- documents: _temp4,
1951
- isDisconnectionTemporary: _temp5,
1952
- disconnectionReason: _temp6,
1961
+ documents: _temp3,
1962
+ isDisconnectionTemporary: _temp4,
1963
+ disconnectionReason: _temp5,
1953
1964
  dateEffectiveFrom: _getConvertedDate,
1954
1965
  processInstance: {
1955
1966
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
@@ -1992,10 +2003,10 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
1992
2003
  }
1993
2004
  try {
1994
2005
  var _data$cpt34, _data$cpt34$details, _data$cpt34$details$o, _data$cpt35, _data$cpt35$details, _data$cpt36, _data$cpt36$details, _data$connectionDetai, _data$connectionDetai2, _data$connectionDetai3, _data$connectionDetai4, _data$connectionDetai5, _data$connectionDetai6, _data$connectionDetai7, _data$connectionDetai8, _data$connectionDetai9, _data$connectionDetai0, _data$connectionDetai1, _data$connectionDetai10, _data$connectionDetai11, _data$connectionDetai12, _data$connectionDetai13, _data$connectionDetai14, _data$connectionDetai15, _data$connectionDetai16, _data$connectionDetai17, _data$connectionDetai18, _data$connectionDetai19, _data$connectionDetai20, _data$connectionDetai21, _data$connectionDetai22, _data$connectionDetai23, _data$connectionDetai24, _data$connectionDetai25, _data$connectionDetai26, _data$connectionDetai27, _data$connectionDetai28, _data$activationDetai11, _data$activationDetai12, _data$activationDetai13, _data$activationDetai14;
1995
- function _temp10() {
2006
+ function _temp1() {
1996
2007
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
1997
- function _temp0() {
1998
- function _temp8() {
2008
+ function _temp9() {
2009
+ function _temp7() {
1999
2010
  var _data$DocumentsRequir3, _data$DocumentsRequir4, _data$DocumentsRequir5, _appData$applicationD9, _data$ConnectionHolde87, _data$ConnectionHolde88, _Digit$UserService$ge12, _Digit$UserService$ge13, _Digit$UserService$ge14, _data$DocumentsRequir6, _data$cpt33;
2000
2011
  if (data !== null && data !== void 0 && (_data$DocumentsRequir3 = data.DocumentsRequired) !== null && _data$DocumentsRequir3 !== void 0 && (_data$DocumentsRequir4 = _data$DocumentsRequir3.documents) !== null && _data$DocumentsRequir4 !== void 0 && _data$DocumentsRequir4.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents;else formData.documents = null;
2001
2012
  const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD9 = appData.applicationData) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
@@ -2029,20 +2040,20 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2029
2040
  sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : _data$cpt33.details));
2030
2041
  return formData;
2031
2042
  }
2032
- const _temp7 = function (_data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4) {
2043
+ const _temp6 = function (_data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4) {
2033
2044
  if (data !== null && data !== void 0 && (_data$activationDetai = data.activationDetails) !== null && _data$activationDetai !== void 0 && (_data$activationDetai2 = _data$activationDetai[0]) !== null && _data$activationDetai2 !== void 0 && _data$activationDetai2.dateEffectiveFrom) return Promise.resolve(getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai3 = data.activationDetails) === null || _data$activationDetai3 === void 0 ? void 0 : (_data$activationDetai4 = _data$activationDetai3[0]) === null || _data$activationDetai4 === void 0 ? void 0 : _data$activationDetai4.dateEffectiveFrom)).then(function (_getConvertedDate4) {
2034
2045
  formData.dateEffectiveFrom = _getConvertedDate4;
2035
2046
  });
2036
2047
  }();
2037
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
2048
+ return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
2038
2049
  }
2039
2050
  if (data !== null && data !== void 0 && (_data$activationDetai5 = data.activationDetails) !== null && _data$activationDetai5 !== void 0 && (_data$activationDetai6 = _data$activationDetai5[0]) !== null && _data$activationDetai6 !== void 0 && _data$activationDetai6.meterInitialReading) formData.additionalDetails.initialMeterReading = data === null || data === void 0 ? void 0 : (_data$activationDetai7 = data.activationDetails) === null || _data$activationDetai7 === void 0 ? void 0 : (_data$activationDetai8 = _data$activationDetai7[0]) === null || _data$activationDetai8 === void 0 ? void 0 : _data$activationDetai8.meterInitialReading;
2040
- const _temp9 = function (_data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10) {
2051
+ const _temp8 = function (_data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10) {
2041
2052
  if (data !== null && data !== void 0 && (_data$activationDetai9 = data.activationDetails) !== null && _data$activationDetai9 !== void 0 && (_data$activationDetai0 = _data$activationDetai9[0]) !== null && _data$activationDetai0 !== void 0 && _data$activationDetai0.connectionExecutionDate) return Promise.resolve(getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai1 = data.activationDetails) === null || _data$activationDetai1 === void 0 ? void 0 : (_data$activationDetai10 = _data$activationDetai1[0]) === null || _data$activationDetai10 === void 0 ? void 0 : _data$activationDetai10.connectionExecutionDate)).then(function (_getConvertedDate3) {
2042
2053
  formData.connectionExecutionDate = _getConvertedDate3;
2043
2054
  });
2044
2055
  }();
2045
- return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
2056
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
2046
2057
  }
2047
2058
  data === null || data === void 0 ? void 0 : (_data$cpt34 = data.cpt) === null || _data$cpt34 === void 0 ? void 0 : (_data$cpt34$details = _data$cpt34.details) === null || _data$cpt34$details === void 0 ? void 0 : (_data$cpt34$details$o = _data$cpt34$details.owners) === null || _data$cpt34$details$o === void 0 ? void 0 : _data$cpt34$details$o.forEach(owner => {
2048
2059
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
@@ -2058,12 +2069,12 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2058
2069
  if (data !== null && data !== void 0 && (_data$connectionDetai21 = data.connectionDetails) !== null && _data$connectionDetai21 !== void 0 && (_data$connectionDetai22 = _data$connectionDetai21[0]) !== null && _data$connectionDetai22 !== void 0 && _data$connectionDetai22.noOfWaterClosets) formData.noOfWaterClosets = data === null || data === void 0 ? void 0 : (_data$connectionDetai23 = data.connectionDetails) === null || _data$connectionDetai23 === void 0 ? void 0 : (_data$connectionDetai24 = _data$connectionDetai23[0]) === null || _data$connectionDetai24 === void 0 ? void 0 : _data$connectionDetai24.noOfWaterClosets;
2059
2070
  if (data !== null && data !== void 0 && (_data$connectionDetai25 = data.connectionDetails) !== null && _data$connectionDetai25 !== void 0 && (_data$connectionDetai26 = _data$connectionDetai25[0]) !== null && _data$connectionDetai26 !== void 0 && _data$connectionDetai26.noOfToilets) formData.noOfToilets = data === null || data === void 0 ? void 0 : (_data$connectionDetai27 = data.connectionDetails) === null || _data$connectionDetai27 === void 0 ? void 0 : (_data$connectionDetai28 = _data$connectionDetai27[0]) === null || _data$connectionDetai28 === void 0 ? void 0 : _data$connectionDetai28.noOfToilets;
2060
2071
  if (data !== null && data !== void 0 && (_data$activationDetai11 = data.activationDetails) !== null && _data$activationDetai11 !== void 0 && (_data$activationDetai12 = _data$activationDetai11[0]) !== null && _data$activationDetai12 !== void 0 && _data$activationDetai12.meterId) formData.meterId = data === null || data === void 0 ? void 0 : (_data$activationDetai13 = data.activationDetails) === null || _data$activationDetai13 === void 0 ? void 0 : (_data$activationDetai14 = _data$activationDetai13[0]) === null || _data$activationDetai14 === void 0 ? void 0 : _data$activationDetai14.meterId;
2061
- const _temp1 = function (_data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18) {
2072
+ const _temp0 = function (_data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18) {
2062
2073
  if (data !== null && data !== void 0 && (_data$activationDetai15 = data.activationDetails) !== null && _data$activationDetai15 !== void 0 && (_data$activationDetai16 = _data$activationDetai15[0]) !== null && _data$activationDetai16 !== void 0 && _data$activationDetai16.meterInstallationDate) return Promise.resolve(getConvertedDate(data === null || data === void 0 ? void 0 : (_data$activationDetai17 = data.activationDetails) === null || _data$activationDetai17 === void 0 ? void 0 : (_data$activationDetai18 = _data$activationDetai17[0]) === null || _data$activationDetai18 === void 0 ? void 0 : _data$activationDetai18.meterInstallationDate)).then(function (_getConvertedDate2) {
2063
2074
  formData.meterInstallationDate = _getConvertedDate2;
2064
2075
  });
2065
2076
  }();
2066
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(_temp10) : _temp10(_temp1));
2077
+ return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
2067
2078
  } catch (e) {
2068
2079
  return Promise.reject(e);
2069
2080
  }
@@ -2112,7 +2123,7 @@ const ifUserRoleExists = role => {
2112
2123
  return true;
2113
2124
  } else return false;
2114
2125
  };
2115
- const checkForNA = function (value) {
2126
+ const checkForNA$1 = function (value) {
2116
2127
  if (value === void 0) {
2117
2128
  value = "";
2118
2129
  }
@@ -9599,7 +9610,7 @@ const getWSAcknowledgementData$2 = function (amendment, tenantInfo, t, tableData
9599
9610
  };
9600
9611
 
9601
9612
  const Response = () => {
9602
- var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$;
9613
+ var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$, _data$Amendments4, _data$Amendments4$;
9603
9614
  const tenantId = Digit.ULBService.getCurrentTenantId();
9604
9615
  const {
9605
9616
  state
@@ -9608,7 +9619,7 @@ const Response = () => {
9608
9619
  const {
9609
9620
  t
9610
9621
  } = useTranslation();
9611
- const connNumber = state === null || state === void 0 ? void 0 : (_state$Amendment = state.Amendment) === null || _state$Amendment === void 0 ? void 0 : _state$Amendment.consumerCode;
9622
+ const connNumber = String((state === null || state === void 0 ? void 0 : (_state$Amendment = state.Amendment) === null || _state$Amendment === void 0 ? void 0 : _state$Amendment.consumerCode) || "");
9612
9623
  let serviceType = "WATER";
9613
9624
  if (connNumber.includes("SW")) serviceType = "SEWERAGE";
9614
9625
  const {
@@ -9674,7 +9685,16 @@ const Response = () => {
9674
9685
  justifyContent: "flex-end",
9675
9686
  alignItems: "baseline"
9676
9687
  }
9677
- }, /*#__PURE__*/React.createElement(SubmitBar, {
9688
+ }, (data === null || data === void 0 ? void 0 : (_data$Amendments4 = data.Amendments) === null || _data$Amendments4 === void 0 ? void 0 : (_data$Amendments4$ = _data$Amendments4[0]) === null || _data$Amendments4$ === void 0 ? void 0 : _data$Amendments4$.amendmentId) && /*#__PURE__*/React.createElement(SubmitBar, {
9689
+ label: t("CS_TITLE_GENERATE_NOTE"),
9690
+ onSubmit: () => {
9691
+ var _data$Amendments5, _data$Amendments5$;
9692
+ return history.push(`/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$Amendments5 = data.Amendments) === null || _data$Amendments5 === void 0 ? void 0 : (_data$Amendments5$ = _data$Amendments5[0]) === null || _data$Amendments5$ === void 0 ? void 0 : _data$Amendments5$.amendmentId}`);
9693
+ },
9694
+ style: {
9695
+ marginRight: "1rem"
9696
+ }
9697
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
9678
9698
  label: t("CORE_COMMON_GO_TO_HOME"),
9679
9699
  onSubmit: () => history.push(`/digit-ui/employee`),
9680
9700
  style: {
@@ -11649,6 +11669,10 @@ const BILLSBreadCrumbs = _ref => {
11649
11669
  path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
11650
11670
  label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
11651
11671
  show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
11672
+ }, {
11673
+ path: "/digit-ui/employee/ws/water/bill-amendment/search-application",
11674
+ label: t("WS_BILL_AMENDMENT_SEARCH_APPLICATION", "Search Bill Amendment"),
11675
+ show: location.pathname.includes("/bill-amendment/search-application") ? true : false
11652
11676
  }, {
11653
11677
  path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
11654
11678
  label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
@@ -11901,7 +11925,7 @@ const BILLSBreadCrumbs = _ref => {
11901
11925
  }));
11902
11926
  };
11903
11927
  const App$1 = _ref2 => {
11904
- var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg;
11928
+ var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg, _Digit32, _Digit32$ComponentReg;
11905
11929
  let {
11906
11930
  path
11907
11931
  } = _ref2;
@@ -11980,6 +12004,7 @@ const App$1 = _ref2 => {
11980
12004
  const CPTAcknowledgement = (_Digit29 = Digit) === null || _Digit29 === void 0 ? void 0 : (_Digit29$ComponentReg = _Digit29.ComponentRegistryService) === null || _Digit29$ComponentReg === void 0 ? void 0 : _Digit29$ComponentReg.getComponent("CPTAcknowledgement");
11981
12005
  const WSInfoPage = (_Digit30 = Digit) === null || _Digit30 === void 0 ? void 0 : (_Digit30$ComponentReg = _Digit30.ComponentRegistryService) === null || _Digit30$ComponentReg === void 0 ? void 0 : _Digit30$ComponentReg.getComponent("WSInfoPage");
11982
12006
  const WSExecuteDisconnection = (_Digit31 = Digit) === null || _Digit31 === void 0 ? void 0 : (_Digit31$ComponentReg = _Digit31.ComponentRegistryService) === null || _Digit31$ComponentReg === void 0 ? void 0 : _Digit31$ComponentReg.getComponent("WSExecuteDisconnection");
12007
+ const WSSearchBillAmendment = (_Digit32 = Digit) === null || _Digit32 === void 0 ? void 0 : (_Digit32$ComponentReg = _Digit32.ComponentRegistryService) === null || _Digit32$ComponentReg === void 0 ? void 0 : _Digit32$ComponentReg.getComponent("WSSearchBillAmendment");
11983
12008
  const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/mutation-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/new-disconnection/k-number") || window.location.href.includes("/employee/ws/new-disconnection/consumer-details") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/execute-disconnection") || window.location.href.includes("/employee/ws/water/bulk-bill");
11984
12009
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
11985
12010
  return /*#__PURE__*/React.createElement("div", {
@@ -12076,6 +12101,11 @@ const App$1 = _ref2 => {
12076
12101
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
12077
12102
  path: `${path}/activate-connection`,
12078
12103
  component: WSActivateConnection
12104
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
12105
+ path: `${path}/water/bill-amendment/search-application`,
12106
+ component: props => /*#__PURE__*/React.createElement(WSSearchBillAmendment, _extends({}, props, {
12107
+ parentRoute: path
12108
+ }))
12079
12109
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
12080
12110
  path: `${path}/water/search-application`,
12081
12111
  component: props => /*#__PURE__*/React.createElement(WSSearch, _extends({}, props, {
@@ -13051,7 +13081,9 @@ const createConnectionDetails = () => ({
13051
13081
  },
13052
13082
  institutionName: "",
13053
13083
  natureOfWork: "",
13054
- orgDeptDocument: ""
13084
+ orgDeptDocument: "",
13085
+ addressType: "",
13086
+ completeAddress: ""
13055
13087
  });
13056
13088
  const WSConnectionDetails = _ref => {
13057
13089
  var _formData$ConnectionD, _formData$ConnectionD2;
@@ -13071,6 +13103,16 @@ const WSConnectionDetails = _ref => {
13071
13103
  pathname
13072
13104
  } = useLocation();
13073
13105
  const [connectionDetails, setConnectionDetails] = useState((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : _formData$ConnectionD.length) > 0 ? [formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD2 = formData.ConnectionDetails) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2[0]] : [createConnectionDetails()]);
13106
+ useEffect(() => {
13107
+ var _formData$ConnectionD3;
13108
+ if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : _formData$ConnectionD3.length) > 0) {
13109
+ const incoming = formData.ConnectionDetails[0];
13110
+ const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
13111
+ if (!(current !== null && current !== void 0 && current.addressType) && incoming !== null && incoming !== void 0 && incoming.addressType || !(current !== null && current !== void 0 && current.completeAddress) && incoming !== null && incoming !== void 0 && incoming.completeAddress || !lodash.isEqual(current, incoming)) {
13112
+ setConnectionDetails([incoming]);
13113
+ }
13114
+ }
13115
+ }, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
13074
13116
  const [focusIndex, setFocusIndex] = useState({
13075
13117
  index: -1,
13076
13118
  type: ""
@@ -13211,7 +13253,7 @@ const WSConnectionDetails = _ref => {
13211
13253
  }, commonProps))));
13212
13254
  };
13213
13255
  const ConnectionDetails = _props => {
13214
- var _formData$DocumentsRe;
13256
+ var _formData$ConnectionD4, _formData$ConnectionD5, _formData$additionalD, _formData$additionalD2, _formData$additionalD3, _formData$additionalD4, _formData$ConnectionD6, _formData$ConnectionD7, _formData$additionalD5, _formData$additionalD6, _formData$additionalD7, _formData$additionalD8, _addresses, _addresses3, _formData$DocumentsRe;
13215
13257
  const {
13216
13258
  connectionDetail,
13217
13259
  focusIndex,
@@ -13236,6 +13278,64 @@ const ConnectionDetails = _props => {
13236
13278
  formData,
13237
13279
  userType
13238
13280
  } = _props;
13281
+ const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || window.localStorage.getItem("user-info") || "{}");
13282
+ let addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13283
+ if (!addresses || addresses.length === 0) {
13284
+ var _formData$cpt, _formData$cpt$details, _formData$cpt$details2, _formData$cpt2, _formData$cpt2$detail, _cptAddress$locality, _cptAddress$locality2;
13285
+ const owner = formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : (_formData$cpt$details = _formData$cpt.details) === null || _formData$cpt$details === void 0 ? void 0 : (_formData$cpt$details2 = _formData$cpt$details.owners) === null || _formData$cpt$details2 === void 0 ? void 0 : _formData$cpt$details2[0];
13286
+ const cptAddress = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : _formData$cpt2$detail.address;
13287
+ const formattedPropertyAddress = cptAddress ? [cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.doorNo, cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.buildingName, cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.street, cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.landmark, (cptAddress === null || cptAddress === void 0 ? void 0 : (_cptAddress$locality = cptAddress.locality) === null || _cptAddress$locality === void 0 ? void 0 : _cptAddress$locality.name) || (cptAddress === null || cptAddress === void 0 ? void 0 : (_cptAddress$locality2 = cptAddress.locality) === null || _cptAddress$locality2 === void 0 ? void 0 : _cptAddress$locality2.code), cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.city, cptAddress === null || cptAddress === void 0 ? void 0 : cptAddress.pincode].filter(Boolean).join(", ") : "";
13288
+ const ownerPermAddress = owner !== null && owner !== void 0 && owner.permanentAddress && (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) !== "NA" ? owner.permanentAddress : formattedPropertyAddress;
13289
+ const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : ownerPermAddress || formattedPropertyAddress;
13290
+ if (ownerPermAddress || ownerCorrAddress) {
13291
+ addresses = [{
13292
+ type: "PERMANENT",
13293
+ address: ownerPermAddress
13294
+ }, {
13295
+ type: "CORRESPONDENCE",
13296
+ address: ownerCorrAddress
13297
+ }];
13298
+ }
13299
+ }
13300
+ const getAddressTypeObj = val => {
13301
+ if (!val) return null;
13302
+ if (typeof val === "object") {
13303
+ const code = (val.code || val.i18nKey || "").toUpperCase();
13304
+ if (code === "CORRESPONDENCE") {
13305
+ return {
13306
+ i18nKey: "Correspondence",
13307
+ code: "CORRESPONDENCE"
13308
+ };
13309
+ }
13310
+ return {
13311
+ i18nKey: "Permanent",
13312
+ code: "PERMANENT"
13313
+ };
13314
+ }
13315
+ const str = String(val).toUpperCase();
13316
+ if (str === "CORRESPONDENCE") {
13317
+ return {
13318
+ i18nKey: "Correspondence",
13319
+ code: "CORRESPONDENCE"
13320
+ };
13321
+ }
13322
+ if (str === "PERMANENT") {
13323
+ return {
13324
+ i18nKey: "Permanent",
13325
+ code: "PERMANENT"
13326
+ };
13327
+ }
13328
+ return {
13329
+ i18nKey: val,
13330
+ code: val
13331
+ };
13332
+ };
13333
+ const initialAddressType = getAddressTypeObj((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD4 = formData.ConnectionDetails) === null || _formData$ConnectionD4 === void 0 ? void 0 : (_formData$ConnectionD5 = _formData$ConnectionD4[0]) === null || _formData$ConnectionD5 === void 0 ? void 0 : _formData$ConnectionD5.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : (_formData$additionalD3 = _formData$additionalD2.ConnectionDetails) === null || _formData$additionalD3 === void 0 ? void 0 : (_formData$additionalD4 = _formData$additionalD3[0]) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.addressType) || (formData === null || formData === void 0 ? void 0 : formData.addressType)) || "";
13334
+ let initialCompleteAddress = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : (_formData$ConnectionD7 = _formData$ConnectionD6[0]) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : (_formData$additionalD7 = _formData$additionalD6.ConnectionDetails) === null || _formData$additionalD7 === void 0 ? void 0 : (_formData$additionalD8 = _formData$additionalD7[0]) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.completeAddress) || (formData === null || formData === void 0 ? void 0 : formData.completeAddress) || "";
13335
+ if (!initialCompleteAddress && initialAddressType !== null && initialAddressType !== void 0 && initialAddressType.code && ((_addresses = addresses) === null || _addresses === void 0 ? void 0 : _addresses.length) > 0) {
13336
+ const matchedAddr = addresses.find(a => a.type === initialAddressType.code) || {};
13337
+ initialCompleteAddress = matchedAddr.houseNumber || matchedAddr.city || matchedAddr.pinCode ? [matchedAddr.houseNumber, matchedAddr.address, matchedAddr.city, matchedAddr.pinCode].filter(Boolean).join(", ") : matchedAddr.address || "";
13338
+ }
13239
13339
  const {
13240
13340
  control,
13241
13341
  formState: localFormState,
@@ -13284,16 +13384,36 @@ const ConnectionDetails = _props => {
13284
13384
  natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
13285
13385
  orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
13286
13386
  orgDeptDocumentName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || "",
13287
- addressType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || "",
13288
- completeAddress: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || ""
13387
+ addressType: initialAddressType || "",
13388
+ completeAddress: initialCompleteAddress || ""
13289
13389
  }
13290
13390
  });
13291
13391
  const formValue = watch();
13292
13392
  const {
13293
13393
  errors
13294
13394
  } = localFormState;
13295
- const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || "{}");
13296
- const addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13395
+ useEffect(() => {
13396
+ var _formData$ConnectionD8, _formData$ConnectionD9, _formData$additionalD9, _formData$additionalD0, _formData$additionalD1, _formData$additionalD10, _formData$ConnectionD0, _formData$ConnectionD1, _formData$additionalD11, _formData$additionalD12, _formData$additionalD13, _formData$additionalD14, _addresses2;
13397
+ const rawAddrType = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD8 = formData.ConnectionDetails) === null || _formData$ConnectionD8 === void 0 ? void 0 : (_formData$ConnectionD9 = _formData$ConnectionD8[0]) === null || _formData$ConnectionD9 === void 0 ? void 0 : _formData$ConnectionD9.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD9 = formData.additionalDetails) === null || _formData$additionalD9 === void 0 ? void 0 : _formData$additionalD9.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD0 = formData.additionalDetails) === null || _formData$additionalD0 === void 0 ? void 0 : (_formData$additionalD1 = _formData$additionalD0.ConnectionDetails) === null || _formData$additionalD1 === void 0 ? void 0 : (_formData$additionalD10 = _formData$additionalD1[0]) === null || _formData$additionalD10 === void 0 ? void 0 : _formData$additionalD10.addressType) || (formData === null || formData === void 0 ? void 0 : formData.addressType);
13398
+ const formattedAddrType = getAddressTypeObj(rawAddrType);
13399
+ if (formattedAddrType) {
13400
+ const currentVal = getValues("addressType");
13401
+ if (!currentVal || typeof currentVal === "object" && (currentVal === null || currentVal === void 0 ? void 0 : currentVal.code) !== formattedAddrType.code || typeof currentVal === "string" && currentVal !== formattedAddrType.code) {
13402
+ setValue("addressType", formattedAddrType);
13403
+ }
13404
+ }
13405
+ const savedAddr = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD0 = formData.ConnectionDetails) === null || _formData$ConnectionD0 === void 0 ? void 0 : (_formData$ConnectionD1 = _formData$ConnectionD0[0]) === null || _formData$ConnectionD1 === void 0 ? void 0 : _formData$ConnectionD1.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD11 = formData.additionalDetails) === null || _formData$additionalD11 === void 0 ? void 0 : _formData$additionalD11.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD12 = formData.additionalDetails) === null || _formData$additionalD12 === void 0 ? void 0 : (_formData$additionalD13 = _formData$additionalD12.ConnectionDetails) === null || _formData$additionalD13 === void 0 ? void 0 : (_formData$additionalD14 = _formData$additionalD13[0]) === null || _formData$additionalD14 === void 0 ? void 0 : _formData$additionalD14.completeAddress) || (formData === null || formData === void 0 ? void 0 : formData.completeAddress);
13406
+ const currentAddr = getValues("completeAddress");
13407
+ if (savedAddr && (!currentAddr || currentAddr !== savedAddr)) {
13408
+ setValue("completeAddress", savedAddr);
13409
+ } else if (!currentAddr && formattedAddrType && ((_addresses2 = addresses) === null || _addresses2 === void 0 ? void 0 : _addresses2.length) > 0) {
13410
+ const matched = addresses.find(a => a.type === formattedAddrType.code) || {};
13411
+ const fallback = matched.houseNumber || matched.city || matched.pinCode ? [matched.houseNumber, matched.address, matched.city, matched.pinCode].filter(Boolean).join(", ") : matched.address || "";
13412
+ if (fallback) {
13413
+ setValue("completeAddress", fallback);
13414
+ }
13415
+ }
13416
+ }, [connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType, connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress, formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails, formData === null || formData === void 0 ? void 0 : formData.additionalDetails, (_addresses3 = addresses) === null || _addresses3 === void 0 ? void 0 : _addresses3.length]);
13297
13417
  const [uploadedFile, setUploadedFile] = useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
13298
13418
  const [file, setFile] = useState(null);
13299
13419
  const [fileUploadError, setFileUploadError] = useState(null);
@@ -13341,6 +13461,10 @@ const ConnectionDetails = _props => {
13341
13461
  if (!lodash.isEqual(formValue, part)) {
13342
13462
  let isErrorsFound = true;
13343
13463
  Object.keys(formValue).map(data => {
13464
+ var _formValue$domesticTy;
13465
+ if ((formValue === null || formValue === void 0 ? void 0 : (_formValue$domesticTy = formValue.domesticType) === null || _formValue$domesticTy === void 0 ? void 0 : _formValue$domesticTy.code) === "INDIVIDUAL" && ["institutionName", "natureOfWork", "orgDeptDocument", "orgDeptDocumentName", "departmentType"].includes(data)) {
13466
+ return;
13467
+ }
13344
13468
  if (!formValue[data] && isErrorsFound) {
13345
13469
  isErrorsFound = false;
13346
13470
  setIsErrors(true);
@@ -13452,12 +13576,12 @@ const ConnectionDetails = _props => {
13452
13576
  placeholder: t("Select Applicant Type")
13453
13577
  });
13454
13578
  }
13455
- })), window.location.href.includes("/citizen") && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React.createElement("span", {
13579
+ })), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React.createElement("span", {
13456
13580
  className: "check-page-link-button"
13457
13581
  }, "*")), /*#__PURE__*/React.createElement(Controller, {
13458
13582
  control: control,
13459
13583
  name: "addressType",
13460
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || "",
13584
+ defaultValue: initialAddressType || "",
13461
13585
  rules: {
13462
13586
  required: t("REQUIRED_FIELD")
13463
13587
  },
@@ -13466,7 +13590,7 @@ const ConnectionDetails = _props => {
13466
13590
  var _errors$addressType;
13467
13591
  return /*#__PURE__*/React.createElement(Dropdown, {
13468
13592
  className: "form-field",
13469
- selected: getValues("addressType"),
13593
+ selected: props.value || getValues("addressType") || initialAddressType,
13470
13594
  disable: false,
13471
13595
  option: [{
13472
13596
  i18nKey: "Permanent",
@@ -13479,7 +13603,7 @@ const ConnectionDetails = _props => {
13479
13603
  select: e => {
13480
13604
  props.onChange(e);
13481
13605
  const selectedAddress = addresses.find(a => a.type === e.code) || {};
13482
- const formattedAddress = [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ");
13606
+ const formattedAddress = selectedAddress.houseNumber || selectedAddress.city || selectedAddress.pinCode ? [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ") : selectedAddress.address || "";
13483
13607
  setValue("completeAddress", formattedAddress);
13484
13608
  },
13485
13609
  optionKey: "i18nKey",
@@ -13491,18 +13615,21 @@ const ConnectionDetails = _props => {
13491
13615
  })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Complete Address")), /*#__PURE__*/React.createElement(Controller, {
13492
13616
  control: control,
13493
13617
  name: "completeAddress",
13494
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || "",
13618
+ defaultValue: initialCompleteAddress || "",
13495
13619
  render: props => /*#__PURE__*/React.createElement("div", {
13496
13620
  className: "field"
13497
13621
  }, /*#__PURE__*/React.createElement(TextInput, {
13498
13622
  className: "form-field",
13499
- value: getValues("completeAddress"),
13500
- disable: true,
13501
- disabled: true,
13502
- onChange: () => {},
13503
- style: {
13623
+ value: props.value ?? getValues("completeAddress") ?? initialCompleteAddress ?? "",
13624
+ disable: addresses.length > 0,
13625
+ disabled: addresses.length > 0,
13626
+ onChange: e => {
13627
+ props.onChange(e.target.value);
13628
+ setValue("completeAddress", e.target.value);
13629
+ },
13630
+ style: addresses.length > 0 ? {
13504
13631
  backgroundColor: "#eee"
13505
- }
13632
+ } : {}
13506
13633
  }))
13507
13634
  })))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
13508
13635
  open: showDocModal,
@@ -16914,39 +17041,53 @@ const WSActivationCommentsDetails = _ref => {
16914
17041
  };
16915
17042
 
16916
17043
  const WSActivationSupportingDocuments = _ref => {
16917
- var _formData$supportingD, _formData$supportingD2;
17044
+ var _formData$supportingD, _formData$supportingD2, _formData$supportingD3, _formData$supportingD4, _formState$errors, _formState$errors2, _formState$errors2$co, _formErrors$config$ke, _formState$errors3, _formState$errors3$co, _formErrors$config$ke2;
16918
17045
  let {
16919
17046
  t,
16920
17047
  config,
16921
17048
  userType,
16922
17049
  formData,
16923
- onSelect
17050
+ onSelect,
17051
+ setError: setFormError,
17052
+ clearErrors: clearFormErrors,
17053
+ formState,
17054
+ errors: formErrors
16924
17055
  } = _ref;
16925
- const stateId = Digit.ULBService.getStateId();
16926
17056
  const tenantIdCode = Digit.ULBService.getCurrentTenantId();
16927
- const [documents, setDocuments] = useState(formData !== null && formData !== void 0 && (_formData$supportingD = formData.supportingDocuments) !== null && _formData$supportingD !== void 0 && _formData$supportingD[0] ? [formData === null || formData === void 0 ? void 0 : (_formData$supportingD2 = formData.supportingDocuments) === null || _formData$supportingD2 === void 0 ? void 0 : _formData$supportingD2[0]] : []);
17057
+ const initialDoc = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD = formData.supportingDocuments) === null || _formData$supportingD === void 0 ? void 0 : _formData$supportingD[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$supportingD2 = formData.supportingDocuments) === null || _formData$supportingD2 === void 0 ? void 0 : (_formData$supportingD3 = _formData$supportingD2.documents) === null || _formData$supportingD3 === void 0 ? void 0 : _formData$supportingD3[0]) || (formData !== null && formData !== void 0 && (_formData$supportingD4 = formData.supportingDocuments) !== null && _formData$supportingD4 !== void 0 && _formData$supportingD4.fileStoreId ? formData === null || formData === void 0 ? void 0 : formData.supportingDocuments : null);
17058
+ const [documents, setDocuments] = useState(initialDoc !== null && initialDoc !== void 0 && initialDoc.fileStoreId ? [initialDoc] : []);
16928
17059
  const [error, setError] = useState(null);
16929
- const [uploadedFile, setUploadedFile] = useState(null);
17060
+ const [uploadedFile, setUploadedFile] = useState((initialDoc === null || initialDoc === void 0 ? void 0 : initialDoc.fileStoreId) || null);
16930
17061
  const [file, setFile] = useState(null);
16931
- const goNext = () => {
16932
- onSelect(config.key, {
16933
- documents
16934
- });
16935
- };
16936
17062
  function selectfile(e) {
16937
- setFile(e.target.files[0]);
17063
+ var _e$target$files;
17064
+ const selectedFile = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
17065
+ if (selectedFile) {
17066
+ setFile(selectedFile);
17067
+ }
16938
17068
  }
16939
17069
  useEffect(() => {
16940
- goNext();
16941
- }, [documents]);
17070
+ var _formData$supportingD5, _formData$supportingD6, _formData$supportingD7, _formData$supportingD8;
17071
+ const doc = (formData === null || formData === void 0 ? void 0 : (_formData$supportingD5 = formData.supportingDocuments) === null || _formData$supportingD5 === void 0 ? void 0 : _formData$supportingD5[0]) || (formData === null || formData === void 0 ? void 0 : (_formData$supportingD6 = formData.supportingDocuments) === null || _formData$supportingD6 === void 0 ? void 0 : (_formData$supportingD7 = _formData$supportingD6.documents) === null || _formData$supportingD7 === void 0 ? void 0 : _formData$supportingD7[0]) || (formData !== null && formData !== void 0 && (_formData$supportingD8 = formData.supportingDocuments) !== null && _formData$supportingD8 !== void 0 && _formData$supportingD8.fileStoreId ? formData === null || formData === void 0 ? void 0 : formData.supportingDocuments : null);
17072
+ if (doc !== null && doc !== void 0 && doc.fileStoreId && !uploadedFile) {
17073
+ setUploadedFile(doc.fileStoreId);
17074
+ setDocuments([doc]);
17075
+ }
17076
+ }, [formData === null || formData === void 0 ? void 0 : formData.supportingDocuments]);
16942
17077
  useEffect(() => {
16943
- if (userType === "employee") {
16944
- onSelect(config.key, {
16945
- ...formData[config.key],
16946
- ...documents
16947
- });
17078
+ if (uploadedFile) {
17079
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17080
+ clearFormErrors(config.key);
17081
+ }
17082
+ } else {
17083
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17084
+ setFormError(config.key, {
17085
+ type: "required",
17086
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17087
+ });
17088
+ }
16948
17089
  }
16949
- }, [documents]);
17090
+ }, [uploadedFile, setFormError, clearFormErrors, config === null || config === void 0 ? void 0 : config.key]);
16950
17091
  useEffect(() => {
16951
17092
  (function () {
16952
17093
  try {
@@ -16967,7 +17108,21 @@ const WSActivationSupportingDocuments = _ref => {
16967
17108
  var _response$data, _response$data$files;
16968
17109
  if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
16969
17110
  var _response$data2, _response$data2$files;
16970
- setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
17111
+ const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
17112
+ setUploadedFile(fsId);
17113
+ setDocuments([{
17114
+ fileStoreId: fsId,
17115
+ documentUid: fsId
17116
+ }]);
17117
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17118
+ onSelect(config.key, [{
17119
+ fileStoreId: fsId,
17120
+ documentUid: fsId
17121
+ }]);
17122
+ }
17123
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17124
+ clearFormErrors(config.key);
17125
+ }
16971
17126
  } else {
16972
17127
  setError(t("CS_FILE_UPLOAD_ERROR"));
16973
17128
  }
@@ -16990,27 +17145,38 @@ const WSActivationSupportingDocuments = _ref => {
16990
17145
  }
16991
17146
  })();
16992
17147
  }, [file]);
16993
- useEffect(() => {
16994
- if (uploadedFile) {
16995
- setDocuments(prev => {
16996
- return [{
16997
- fileStoreId: uploadedFile,
16998
- documentUid: uploadedFile
16999
- }];
17148
+ const handleDelete = () => {
17149
+ setUploadedFile(null);
17150
+ setDocuments([]);
17151
+ setFile(null);
17152
+ setError(null);
17153
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17154
+ onSelect(config.key, null);
17155
+ }
17156
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17157
+ setFormError(config.key, {
17158
+ type: "required",
17159
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17000
17160
  });
17001
17161
  }
17002
- }, [uploadedFile]);
17162
+ };
17163
+ const hasValidationError = !uploadedFile && ((formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : _formState$errors[config === null || config === void 0 ? void 0 : config.key]) || (formErrors === null || formErrors === void 0 ? void 0 : formErrors[config === null || config === void 0 ? void 0 : config.key]));
17164
+ const errorStyle = {
17165
+ width: "100%",
17166
+ marginLeft: "0px",
17167
+ fontSize: "12px",
17168
+ marginTop: "4px"
17169
+ };
17003
17170
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t(`WF_APPROVAL_UPLOAD_HEAD`), /*#__PURE__*/React.createElement("span", {
17004
17171
  className: "check-page-link-button"
17005
17172
  }, " *"), ":"), /*#__PURE__*/React.createElement("div", {
17006
17173
  className: "field"
17007
17174
  }, /*#__PURE__*/React.createElement(UploadFile, {
17175
+ id: "activation-supporting-documents",
17008
17176
  onUpload: e => {
17009
17177
  selectfile(e);
17010
17178
  },
17011
- onDelete: () => {
17012
- setUploadedFile(null);
17013
- },
17179
+ onDelete: handleDelete,
17014
17180
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
17015
17181
  textStyles: {
17016
17182
  width: "100%"
@@ -17020,9 +17186,13 @@ const WSActivationSupportingDocuments = _ref => {
17020
17186
  },
17021
17187
  buttonType: "button",
17022
17188
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
17023
- iserror: error,
17189
+ iserror: error || (hasValidationError && (formState !== null && formState !== void 0 && formState.isSubmitted || (formState === null || formState === void 0 ? void 0 : formState.submitCount) > 0) ? (formState === null || formState === void 0 ? void 0 : (_formState$errors2 = formState.errors) === null || _formState$errors2 === void 0 ? void 0 : (_formState$errors2$co = _formState$errors2[config === null || config === void 0 ? void 0 : config.key]) === null || _formState$errors2$co === void 0 ? void 0 : _formState$errors2$co.message) || (formErrors === null || formErrors === void 0 ? void 0 : (_formErrors$config$ke = formErrors[config === null || config === void 0 ? void 0 : config.key]) === null || _formErrors$config$ke === void 0 ? void 0 : _formErrors$config$ke.message) || t("CORE_COMMON_REQUIRED_ERRMSG") : null),
17024
17190
  isMandatory: true
17025
- }))));
17191
+ }), error ? /*#__PURE__*/React.createElement(CardLabelError, {
17192
+ style: errorStyle
17193
+ }, error) : null, !error && hasValidationError && (formState !== null && formState !== void 0 && formState.isSubmitted || (formState === null || formState === void 0 ? void 0 : formState.submitCount) > 0) ? /*#__PURE__*/React.createElement(CardLabelError, {
17194
+ style: errorStyle
17195
+ }, (formState === null || formState === void 0 ? void 0 : (_formState$errors3 = formState.errors) === null || _formState$errors3 === void 0 ? void 0 : (_formState$errors3$co = _formState$errors3[config === null || config === void 0 ? void 0 : config.key]) === null || _formState$errors3$co === void 0 ? void 0 : _formState$errors3$co.message) || (formErrors === null || formErrors === void 0 ? void 0 : (_formErrors$config$ke2 = formErrors[config === null || config === void 0 ? void 0 : config.key]) === null || _formErrors$config$ke2 === void 0 ? void 0 : _formErrors$config$ke2.message) || t("CORE_COMMON_REQUIRED_ERRMSG")) : null)));
17026
17196
  };
17027
17197
 
17028
17198
  var b = "function" === typeof Symbol && Symbol.for,
@@ -23036,7 +23206,6 @@ const WSRestorationForm = _ref => {
23036
23206
  var _data$code;
23037
23207
  return data.i18nKey = `WS_DISCONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$code = data.code) === null || _data$code === void 0 ? void 0 : _data$code.toUpperCase(), " ", "_")}`;
23038
23208
  });
23039
- console.log("disconnectionTypes", disconnectionTypes);
23040
23209
  setDisconnectionTypeList(disconnectionTypes);
23041
23210
  }, [mdmsData]);
23042
23211
  useEffect(() => {
@@ -23850,7 +24019,6 @@ const WSRestorationForm = _ref => {
23850
24019
  onClose: () => setError(null)
23851
24020
  }));
23852
24021
  }
23853
- console.log("applicationData", applicationData);
23854
24022
  return /*#__PURE__*/React.createElement("div", {
23855
24023
  style: {
23856
24024
  margin: "16px"
@@ -25615,7 +25783,7 @@ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
25615
25783
  const normalizeCode = value => String(value || "").replace(/[._\s-]/g, "").toUpperCase();
25616
25784
  const getCode = value => typeof value === "object" ? (value === null || value === void 0 ? void 0 : value.code) || (value === null || value === void 0 ? void 0 : value.value) : value;
25617
25785
  const PropertyWaterConnection = _ref => {
25618
- var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11;
25786
+ var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10;
25619
25787
  let {
25620
25788
  t,
25621
25789
  config,
@@ -25637,10 +25805,10 @@ const PropertyWaterConnection = _ref => {
25637
25805
  } = useForm({
25638
25806
  defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config.key]) || {
25639
25807
  useDetails: {
25808
+ categoryType: null,
25640
25809
  propertyCategory: null,
25641
25810
  propertyType: null,
25642
25811
  WaterConnectionUsageType: null,
25643
- noOfFloors: null,
25644
25812
  plotArea: "",
25645
25813
  builtUpArea: "",
25646
25814
  farArea: "",
@@ -25659,13 +25827,6 @@ const PropertyWaterConnection = _ref => {
25659
25827
  const {
25660
25828
  data: ptServicesMastersData
25661
25829
  } = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping", "PropertyType2"]);
25662
- useEffect(() => {
25663
- var _ptServicesMastersDat, _ptServicesMastersDat2;
25664
- console.log("[PropertyWaterConnection] tenantId used for MDMS:", tenantId);
25665
- console.log("[PropertyWaterConnection] MDMS raw response (ptServicesMastersData):", ptServicesMastersData);
25666
- console.log("[PropertyWaterConnection] MDMS PropertyTax.PropertyType2:", ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : _ptServicesMastersDat.PropertyType2);
25667
- console.log("[PropertyWaterConnection] MDMS PropertyTax.PropertyType:", ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat2 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat2 === void 0 ? void 0 : _ptServicesMastersDat2.PropertyType);
25668
- }, [tenantId, ptServicesMastersData]);
25669
25830
  const {
25670
25831
  data: wsServicesMastersData
25671
25832
  } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]);
@@ -25705,8 +25866,16 @@ const PropertyWaterConnection = _ref => {
25705
25866
  const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "DharamshalasOrHostels" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
25706
25867
  const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
25707
25868
  const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
25708
- const dwellingPropertyTypes = ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse"];
25709
- const isDwellingUnit = dwellingPropertyTypes.includes(watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code);
25869
+ const isResidential = normalizeCode((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.name) || watchPropertyCategory) === "RESIDENTIAL" || normalizeCode(watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.propertyCategory) === "RESIDENTIAL";
25870
+ const isDwellingUnit = isResidential;
25871
+ useEffect(() => {
25872
+ if (!isDwellingUnit) {
25873
+ setValue("useDetails.NumberofDwellingUnits", "");
25874
+ if (clearErrors) {
25875
+ clearErrors("useDetails.NumberofDwellingUnits");
25876
+ }
25877
+ }
25878
+ }, [isDwellingUnit]);
25710
25879
  const yearOptions = useMemo(() => {
25711
25880
  const currentYear = new Date().getFullYear();
25712
25881
  const years = [];
@@ -25718,25 +25887,27 @@ const PropertyWaterConnection = _ref => {
25718
25887
  }
25719
25888
  return years;
25720
25889
  }, []);
25721
- const categoryOptions = useMemo(() => {
25722
- var _ptServicesMastersDat3, _ptServicesMastersDat4;
25723
- let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat3 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat3 === void 0 ? void 0 : (_ptServicesMastersDat4 = _ptServicesMastersDat3.PropertyCategory) === null || _ptServicesMastersDat4 === void 0 ? void 0 : _ptServicesMastersDat4.filter(item => item.active)) || [];
25724
- return options.map(item => ({
25725
- code: item.code,
25726
- name: item.name
25727
- }));
25728
- }, [ptServicesMastersData]);
25729
25890
  const propertyType2List = useMemo(() => {
25730
- var _ptServicesMastersDat5;
25731
- const fromMdms = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyType2;
25891
+ var _ptServicesMastersDat;
25892
+ const fromMdms = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : _ptServicesMastersDat.PropertyType2;
25732
25893
  if (Array.isArray(fromMdms) && fromMdms.length > 0) {
25733
25894
  return fromMdms;
25734
25895
  }
25735
25896
  return [];
25736
25897
  }, [ptServicesMastersData]);
25898
+ const categoryOptions = useMemo(() => {
25899
+ var _ptServicesMastersDat2;
25900
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat2 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat2 === void 0 ? void 0 : _ptServicesMastersDat2.PropertyType) || [];
25901
+ const uniqueCats = [...new Set(list.map(item => item.propertyCategory).filter(Boolean))];
25902
+ return uniqueCats.map(cat => ({
25903
+ code: cat,
25904
+ name: cat,
25905
+ i18nKey: cat
25906
+ }));
25907
+ }, [propertyType2List, ptServicesMastersData]);
25737
25908
  const propertyTypeOptions = useMemo(() => {
25738
- var _ptServicesMastersDat6;
25739
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat6 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.PropertyType) || [];
25909
+ var _ptServicesMastersDat3;
25910
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat3 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat3 === void 0 ? void 0 : _ptServicesMastersDat3.PropertyType) || [];
25740
25911
  return list.filter(item => item.active !== false).map(item => ({
25741
25912
  ...item,
25742
25913
  code: item.code,
@@ -25745,8 +25916,8 @@ const PropertyWaterConnection = _ref => {
25745
25916
  }));
25746
25917
  }, [propertyType2List, ptServicesMastersData]);
25747
25918
  const usageTypeOptions = useMemo(() => {
25748
- var _ptServicesMastersDat7;
25749
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : _ptServicesMastersDat7.PropertyType) || [];
25919
+ var _ptServicesMastersDat4;
25920
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat4 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat4 === void 0 ? void 0 : _ptServicesMastersDat4.PropertyType) || [];
25750
25921
  const uniqueTypes = [...new Set(list.map(item => item.waterConnectionUsageType).filter(Boolean))];
25751
25922
  const typesToMap = uniqueTypes.length > 0 ? uniqueTypes : ["Normal", "Bulk"];
25752
25923
  return typesToMap.map(type => ({
@@ -25755,69 +25926,127 @@ const PropertyWaterConnection = _ref => {
25755
25926
  value: type
25756
25927
  }));
25757
25928
  }, [propertyType2List, ptServicesMastersData]);
25929
+ const availableCategoryOptions = useMemo(() => {
25930
+ var _ptServicesMastersDat5;
25931
+ const propType = watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code ? watchPropertyType : null;
25932
+ if (!propType) {
25933
+ return categoryTypeList;
25934
+ }
25935
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyType) || [];
25936
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propType.code)) || propType;
25937
+ let rawCats = matched === null || matched === void 0 ? void 0 : matched.categoryType;
25938
+ if (!rawCats) return categoryTypeList;
25939
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25940
+ rawCats = rawCats.map(c => typeof c === "object" ? (c === null || c === void 0 ? void 0 : c.name) || (c === null || c === void 0 ? void 0 : c.code) || (c === null || c === void 0 ? void 0 : c.value) || "" : String(c || "")).map(c => c.trim()).filter(Boolean);
25941
+ if (rawCats.length === 0) return categoryTypeList;
25942
+ const normalizedAllowed = rawCats.map(c => normalizeCode(c));
25943
+ const matchedOptions = categoryTypeList.filter(item => normalizedAllowed.includes(normalizeCode(item.code)) || normalizedAllowed.includes(normalizeCode(item.name)));
25944
+ if (matchedOptions.length > 0) {
25945
+ return matchedOptions;
25946
+ }
25947
+ return rawCats.map(catStr => {
25948
+ const isDomestic = normalizeCode(catStr) === "DOMESTIC";
25949
+ const isNonDomestic = normalizeCode(catStr) === "NONDOMESTIC";
25950
+ const code = isDomestic ? "DOMESTIC" : isNonDomestic ? "NON_DOMESTIC" : String(catStr).toUpperCase();
25951
+ const name = isDomestic ? "Domestic" : isNonDomestic ? "Non-Domestic" : String(catStr);
25952
+ return {
25953
+ code,
25954
+ name,
25955
+ i18nKey: t && t(`WS_CATEGORY_${code}`) !== `WS_CATEGORY_${code}` ? `WS_CATEGORY_${code}` : name
25956
+ };
25957
+ });
25958
+ }, [watchPropertyType, propertyType2List, ptServicesMastersData, categoryTypeList, t]);
25959
+ const autoFillFromPropertyType = React.useCallback(propTypeItem => {
25960
+ var _ptServicesMastersDat6;
25961
+ if (!(propTypeItem !== null && propTypeItem !== void 0 && propTypeItem.code)) return;
25962
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat6 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.PropertyType) || [];
25963
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propTypeItem.code)) || propTypeItem;
25964
+ console.log("[PropertyWaterConnection] Property Type selected:", matched === null || matched === void 0 ? void 0 : matched.code);
25965
+ console.log("[PropertyWaterConnection] Matched item from MDMS:", matched);
25966
+ if (matched !== null && matched !== void 0 && matched.categoryType) {
25967
+ let rawCats = matched.categoryType;
25968
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25969
+ rawCats = rawCats.map(c => typeof c === "object" ? (c === null || c === void 0 ? void 0 : c.name) || (c === null || c === void 0 ? void 0 : c.code) || (c === null || c === void 0 ? void 0 : c.value) || "" : String(c || "")).map(c => c.trim()).filter(Boolean);
25970
+ const hasDomestic = rawCats.some(c => normalizeCode(c) === "DOMESTIC");
25971
+ const hasNonDomestic = rawCats.some(c => normalizeCode(c) === "NONDOMESTIC");
25972
+ let targetCat = null;
25973
+ if (hasDomestic) {
25974
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "DOMESTIC" || normalizeCode(c.name) === "DOMESTIC") || {
25975
+ code: "DOMESTIC",
25976
+ name: "Domestic",
25977
+ i18nKey: t && t("WS_CATEGORY_DOMESTIC") !== "WS_CATEGORY_DOMESTIC" ? "WS_CATEGORY_DOMESTIC" : "Domestic"
25978
+ };
25979
+ } else if (hasNonDomestic) {
25980
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "NONDOMESTIC" || normalizeCode(c.name) === "NONDOMESTIC") || {
25981
+ code: "NON_DOMESTIC",
25982
+ name: "Non-Domestic",
25983
+ i18nKey: t && t("WS_CATEGORY_NON_DOMESTIC") !== "WS_CATEGORY_NON_DOMESTIC" ? "WS_CATEGORY_NON_DOMESTIC" : "Non-Domestic"
25984
+ };
25985
+ } else if (rawCats.length > 0) {
25986
+ const firstNorm = normalizeCode(rawCats[0]);
25987
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === firstNorm || normalizeCode(c.name) === firstNorm) || {
25988
+ code: rawCats[0].toUpperCase(),
25989
+ name: rawCats[0],
25990
+ i18nKey: t && t(`WS_CATEGORY_${rawCats[0]}`) !== `WS_CATEGORY_${rawCats[0]}` ? `WS_CATEGORY_${rawCats[0]}` : rawCats[0]
25991
+ };
25992
+ }
25993
+ if (targetCat) {
25994
+ setValue("useDetails.categoryType", targetCat, {
25995
+ shouldValidate: true,
25996
+ shouldDirty: true
25997
+ });
25998
+ if (clearErrors) clearErrors("useDetails.categoryType");
25999
+ }
26000
+ }
26001
+ if (matched !== null && matched !== void 0 && matched.propertyCategory) {
26002
+ const foundPropCat = categoryOptions.find(c => normalizeCode(c.code) === normalizeCode(matched.propertyCategory) || normalizeCode(c.name) === normalizeCode(matched.propertyCategory)) || {
26003
+ code: matched.propertyCategory,
26004
+ name: matched.propertyCategory,
26005
+ i18nKey: matched.propertyCategory
26006
+ };
26007
+ setValue("useDetails.propertyCategory", foundPropCat, {
26008
+ shouldValidate: true,
26009
+ shouldDirty: true
26010
+ });
26011
+ if (clearErrors) clearErrors("useDetails.propertyCategory");
26012
+ }
26013
+ if (matched !== null && matched !== void 0 && matched.waterConnectionUsageType) {
26014
+ const foundUsage = usageTypeOptions.find(u => normalizeCode(u.code) === normalizeCode(matched.waterConnectionUsageType) || normalizeCode(u.name) === normalizeCode(matched.waterConnectionUsageType)) || {
26015
+ code: matched.waterConnectionUsageType,
26016
+ name: matched.waterConnectionUsageType,
26017
+ value: matched.waterConnectionUsageType
26018
+ };
26019
+ setValue("useDetails.WaterConnectionUsageType", foundUsage, {
26020
+ shouldValidate: true,
26021
+ shouldDirty: true
26022
+ });
26023
+ if (clearErrors) clearErrors("useDetails.WaterConnectionUsageType");
26024
+ }
26025
+ }, [propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue, clearErrors, t]);
25758
26026
  const prevPropertyTypeCode = React.useRef(null);
25759
26027
  useEffect(() => {
25760
- var _ptServicesMastersDat8;
25761
26028
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) {
25762
26029
  prevPropertyTypeCode.current = null;
25763
26030
  return;
25764
26031
  }
25765
26032
  const isNewType = prevPropertyTypeCode.current !== watchPropertyType.code;
25766
- prevPropertyTypeCode.current = watchPropertyType.code;
25767
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.PropertyType) || [];
25768
- const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25769
- if (matched && isNewType) {
25770
- if (matched.categoryType && categoryTypeList.length > 0) {
25771
- const catTarget = Array.isArray(matched.categoryType) ? matched.categoryType[0] : matched.categoryType;
25772
- const foundCat = categoryTypeList.find(c => normalizeCode(c.code) === normalizeCode(catTarget) || normalizeCode(c.name) === normalizeCode(catTarget));
25773
- if (foundCat) {
25774
- setValue("useDetails.categoryType", foundCat);
25775
- }
25776
- }
25777
- if (matched.propertyCategory && categoryOptions.length > 0) {
25778
- const foundPropCat = categoryOptions.find(c => normalizeCode(c.code) === normalizeCode(matched.propertyCategory) || normalizeCode(c.name) === normalizeCode(matched.propertyCategory));
25779
- if (foundPropCat) {
25780
- setValue("useDetails.propertyCategory", foundPropCat);
25781
- }
25782
- }
25783
- if (matched.waterConnectionUsageType && usageTypeOptions.length > 0) {
25784
- const foundUsage = usageTypeOptions.find(u => normalizeCode(u.code) === normalizeCode(matched.waterConnectionUsageType) || normalizeCode(u.name) === normalizeCode(matched.waterConnectionUsageType));
25785
- if (foundUsage) {
25786
- setValue("useDetails.WaterConnectionUsageType", foundUsage);
25787
- }
25788
- }
26033
+ if (isNewType) {
26034
+ prevPropertyTypeCode.current = watchPropertyType.code;
26035
+ autoFillFromPropertyType(watchPropertyType);
25789
26036
  }
25790
- }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue]);
25791
- const floorOptions = useMemo(() => {
25792
- var _ptServicesMastersDat9, _ptServicesMastersDat0;
25793
- return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat9 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat9 === void 0 ? void 0 : (_ptServicesMastersDat0 = _ptServicesMastersDat9.NoOfFloors) === null || _ptServicesMastersDat0 === void 0 ? void 0 : _ptServicesMastersDat0.filter(item => item.active).map(item => ({
25794
- code: item.code,
25795
- name: item.name
25796
- }));
25797
- }, [ptServicesMastersData]);
26037
+ }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
25798
26038
  const activeQuestions = useMemo(() => {
25799
26039
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
25800
26040
  let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
25801
26041
  if (!qList || !Array.isArray(qList)) {
25802
- var _ptServicesMastersDat1;
25803
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat1 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat1 === void 0 ? void 0 : _ptServicesMastersDat1.PropertyType) || [];
26042
+ var _ptServicesMastersDat7;
26043
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : _ptServicesMastersDat7.PropertyType) || [];
25804
26044
  const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25805
26045
  qList = matched === null || matched === void 0 ? void 0 : matched.questions;
25806
26046
  }
25807
26047
  if (!qList || !Array.isArray(qList)) return [];
25808
26048
  return qList.map(q => typeof q === "object" ? (q === null || q === void 0 ? void 0 : q.question) || (q === null || q === void 0 ? void 0 : q.title) || (q === null || q === void 0 ? void 0 : q.name) || "" : String(q || "")).map(q => q.trim()).filter(q => q.length > 0);
25809
26049
  }, [watchPropertyType, propertyType2List, ptServicesMastersData]);
25810
- useEffect(() => {
25811
- if (watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code) {
25812
- var _ptServicesMastersDat10;
25813
- const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat10 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat10 === void 0 ? void 0 : _ptServicesMastersDat10.PropertyType) || [];
25814
- const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25815
- console.log("[PropertyWaterConnection] Selected propertyType:", watchPropertyType);
25816
- console.log("[PropertyWaterConnection] Matched item in MDMS list:", matched);
25817
- console.log("[PropertyWaterConnection] Matched questions in MDMS:", matched === null || matched === void 0 ? void 0 : matched.questions);
25818
- console.log("[PropertyWaterConnection] Active questions to display:", activeQuestions);
25819
- }
25820
- }, [watchPropertyType, propertyType2List, ptServicesMastersData, activeQuestions]);
25821
26050
  const [questionAnswers, setQuestionAnswers] = useState(() => {
25822
26051
  var _formData$config$key, _formData$config$key$, _formData$config$key2, _formData$config$key3, _formData$config$key4;
25823
26052
  const existing = (formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config === null || config === void 0 ? void 0 : config.key]) === null || _formData$config$key === void 0 ? void 0 : (_formData$config$key$ = _formData$config$key.useDetails) === null || _formData$config$key$ === void 0 ? void 0 : _formData$config$key$.questionAnswers) || (formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config === null || config === void 0 ? void 0 : config.key]) === null || _formData$config$key2 === void 0 ? void 0 : (_formData$config$key3 = _formData$config$key2.useDetails) === null || _formData$config$key3 === void 0 ? void 0 : _formData$config$key3.questions) || (formData === null || formData === void 0 ? void 0 : (_formData$config$key4 = formData[config === null || config === void 0 ? void 0 : config.key]) === null || _formData$config$key4 === void 0 ? void 0 : _formData$config$key4.questionAnswers) || [];
@@ -25853,9 +26082,12 @@ const PropertyWaterConnection = _ref => {
25853
26082
  return updated;
25854
26083
  });
25855
26084
  };
26085
+ const prevQuestionsRef = React.useRef(null);
25856
26086
  useEffect(() => {
25857
- setValue("useDetails.questions", questionAnswers);
25858
- console.log("[PropertyWaterConnection] Current questions:", questionAnswers);
26087
+ if (!lodash.isEqual(prevQuestionsRef.current, questionAnswers)) {
26088
+ prevQuestionsRef.current = lodash.cloneDeep(questionAnswers);
26089
+ setValue("useDetails.questions", questionAnswers);
26090
+ }
25859
26091
  }, [questionAnswers, setValue]);
25860
26092
  const lastSentValue = React.useRef(null);
25861
26093
  useEffect(() => {
@@ -25877,33 +26109,30 @@ const PropertyWaterConnection = _ref => {
25877
26109
  if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
25878
26110
  if (!categoryTypeList.length || !ptServicesMastersData) return;
25879
26111
  if (formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.details) {
25880
- var _ptServicesMastersDat11, _ptServicesMastersDat12, _ptServicesMastersDat13, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
26112
+ var _ptServicesMastersDat8, _ptServicesMastersDat9, _ptServicesMastersDat0, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
25881
26113
  const details = formData.cpt.details;
25882
26114
  const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
25883
26115
  const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
25884
26116
  const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
25885
26117
  setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => normalizeCode(o.code) === normalizeCode(catType))) || null);
25886
- const propCategoryMatch = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat11 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat11 === void 0 ? void 0 : (_ptServicesMastersDat12 = _ptServicesMastersDat11.PropertyCategory) === null || _ptServicesMastersDat12 === void 0 ? void 0 : _ptServicesMastersDat12.find(o => normalizeCode(o.code) === normalizeCode(usageCategory));
26118
+ const propCategoryMatch = (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => normalizeCode(o.code) === normalizeCode(usageCategory) || normalizeCode(o.name) === normalizeCode(usageCategory))) || (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : (_ptServicesMastersDat9 = _ptServicesMastersDat8.PropertyCategory) === null || _ptServicesMastersDat9 === void 0 ? void 0 : _ptServicesMastersDat9.find(o => normalizeCode(o.code) === normalizeCode(usageCategory)));
25887
26119
  setValue("useDetails.propertyCategory", propCategoryMatch ? {
25888
26120
  code: propCategoryMatch.code,
25889
26121
  name: propCategoryMatch.name
26122
+ } : usageCategory ? {
26123
+ code: usageCategory,
26124
+ name: usageCategory
25890
26125
  } : null);
25891
- const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat13 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat13 === void 0 ? void 0 : _ptServicesMastersDat13.PropertyType) || [];
26126
+ const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat0 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat0 === void 0 ? void 0 : _ptServicesMastersDat0.PropertyType) || [];
25892
26127
  const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
25893
26128
  setValue("useDetails.propertyType", propTypeMatch ? {
25894
26129
  code: propTypeMatch.code,
25895
26130
  name: propTypeMatch.name
25896
26131
  } : null);
26132
+ prevPropertyTypeCode.current = (propTypeMatch === null || propTypeMatch === void 0 ? void 0 : propTypeMatch.code) || null;
25897
26133
  const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
25898
26134
  const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
25899
26135
  setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
25900
- setValue("useDetails.noOfFloors", (floorOptions === null || floorOptions === void 0 ? void 0 : floorOptions.find(o => {
25901
- var _details$noOfFloors;
25902
- const val1 = getCode(additionalDetails.numberOfFloors);
25903
- const val2 = getCode(additionalDetails.noOfFloors);
25904
- const val3 = (_details$noOfFloors = details.noOfFloors) === null || _details$noOfFloors === void 0 ? void 0 : _details$noOfFloors.toString();
25905
- return normalizeCode(o.code) === normalizeCode(val1) || normalizeCode(o.code) === normalizeCode(val2) || normalizeCode(o.code) === normalizeCode(val3) || val3 && normalizeCode(o.code) === normalizeCode(`${val3}_FLOOR`);
25906
- })) || null);
25907
26136
  setValue("useDetails.plotArea", additionalDetails.plotArea || (details === null || details === void 0 ? void 0 : (_details$landArea = details.landArea) === null || _details$landArea === void 0 ? void 0 : _details$landArea.toString()) || "");
25908
26137
  setValue("useDetails.builtUpArea", additionalDetails.builtUpArea || (details === null || details === void 0 ? void 0 : (_details$superBuiltUp = details.superBuiltUpArea) === null || _details$superBuiltUp === void 0 ? void 0 : _details$superBuiltUp.toString()) || "");
25909
26138
  setValue("useDetails.heightOfTheBuilding", additionalDetails.heightOfTheBuilding || (details === null || details === void 0 ? void 0 : (_details$heightOfTheB = details.heightOfTheBuilding) === null || _details$heightOfTheB === void 0 ? void 0 : _details$heightOfTheB.toString()) || "");
@@ -25924,7 +26153,6 @@ const PropertyWaterConnection = _ref => {
25924
26153
  setValue("useDetails.propertyCategory", null);
25925
26154
  setValue("useDetails.propertyType", null);
25926
26155
  setValue("useDetails.WaterConnectionUsageType", null);
25927
- setValue("useDetails.noOfFloors", null);
25928
26156
  setValue("useDetails.plotArea", "");
25929
26157
  setValue("useDetails.builtUpArea", "");
25930
26158
  setValue("useDetails.farArea", "");
@@ -25939,7 +26167,7 @@ const PropertyWaterConnection = _ref => {
25939
26167
  setValue("useDetails.questions", []);
25940
26168
  }
25941
26169
  propertyDetailsInitialized.current = true;
25942
- }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, floorOptions, yearOptions, categoryTypeList, setValue]);
26170
+ }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, yearOptions, categoryTypeList, setValue]);
25943
26171
  const lastErrorState = React.useRef(null);
25944
26172
  useEffect(() => {
25945
26173
  const hasErrors = Object.keys(errors).length > 0;
@@ -25981,7 +26209,11 @@ const PropertyWaterConnection = _ref => {
25981
26209
  option: propertyTypeOptions,
25982
26210
  optionKey: "name",
25983
26211
  selected: props.value,
25984
- select: props.onChange,
26212
+ select: selected => {
26213
+ props.onChange(selected);
26214
+ prevPropertyTypeCode.current = selected === null || selected === void 0 ? void 0 : selected.code;
26215
+ autoFillFromPropertyType(selected);
26216
+ },
25985
26217
  t: t,
25986
26218
  onBlur: props.onBlur,
25987
26219
  disable: isPropertyFound,
@@ -26000,7 +26232,7 @@ const PropertyWaterConnection = _ref => {
26000
26232
  required: t("REQUIRED_FIELD")
26001
26233
  },
26002
26234
  render: props => /*#__PURE__*/React.createElement(Dropdown, {
26003
- option: categoryTypeList,
26235
+ option: availableCategoryOptions,
26004
26236
  optionKey: "i18nKey",
26005
26237
  selected: props.value,
26006
26238
  select: props.onChange,
@@ -26028,7 +26260,7 @@ const PropertyWaterConnection = _ref => {
26028
26260
  select: props.onChange,
26029
26261
  t: t,
26030
26262
  onBlur: props.onBlur,
26031
- disable: isPropertyFound,
26263
+ disable: true,
26032
26264
  placeholder: t("WS_PROPERTY_CATEGORY")
26033
26265
  })
26034
26266
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyCategory) && /*#__PURE__*/React.createElement(CardLabelError, {
@@ -26050,7 +26282,7 @@ const PropertyWaterConnection = _ref => {
26050
26282
  select: props.onChange,
26051
26283
  t: t,
26052
26284
  onBlur: props.onBlur,
26053
- disable: isPropertyFound,
26285
+ disable: true,
26054
26286
  placeholder: t("WS_WATER_CONNECTION_USAGE_TYPE")
26055
26287
  })
26056
26288
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React.createElement(CardLabelError, {
@@ -26075,29 +26307,7 @@ const PropertyWaterConnection = _ref => {
26075
26307
  placeholder: "Enter Answer",
26076
26308
  onChange: e => handleAnswerChange(index, questionText, e.target.value)
26077
26309
  })));
26078
- }), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_FLOORS")}`, " ", /*#__PURE__*/React.createElement("span", {
26079
- className: "check-page-link-button"
26080
- }, "*")), /*#__PURE__*/React.createElement("div", {
26081
- className: "form-field"
26082
- }, /*#__PURE__*/React.createElement(Controller, {
26083
- control: control,
26084
- name: "useDetails.noOfFloors",
26085
- rules: {
26086
- required: t("REQUIRED_FIELD")
26087
- },
26088
- render: props => /*#__PURE__*/React.createElement(Dropdown, {
26089
- option: floorOptions,
26090
- optionKey: "name",
26091
- selected: props.value,
26092
- select: props.onChange,
26093
- t: t,
26094
- onBlur: props.onBlur,
26095
- disable: isPropertyFound,
26096
- placeholder: t("WS_NUMBER_OF_FLOORS")
26097
- })
26098
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.noOfFloors) && /*#__PURE__*/React.createElement(CardLabelError, {
26099
- style: errorStyle
26100
- }, errors.useDetails.noOfFloors.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
26310
+ }), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
26101
26311
  className: "check-page-link-button"
26102
26312
  }, "*")), /*#__PURE__*/React.createElement("div", {
26103
26313
  className: "form-field"
@@ -26115,7 +26325,7 @@ const PropertyWaterConnection = _ref => {
26115
26325
  name: "useDetails.plotArea",
26116
26326
  disabled: isPropertyFound,
26117
26327
  placeholder: t("WS_PLOT_AREA")
26118
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React.createElement(CardLabelError, {
26328
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React.createElement(CardLabelError, {
26119
26329
  style: errorStyle
26120
26330
  }, errors.useDetails.plotArea.message), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_BUILT_UP_AREA")}`, " ", /*#__PURE__*/React.createElement("span", {
26121
26331
  className: "check-page-link-button"
@@ -26136,7 +26346,7 @@ const PropertyWaterConnection = _ref => {
26136
26346
  },
26137
26347
  disabled: isPropertyFound,
26138
26348
  placeholder: t("WS_BUILT_UP_AREA")
26139
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
26349
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
26140
26350
  style: errorStyle
26141
26351
  }, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_HEIGHT_OF_THE_BUILDING(meters)")}`, /*#__PURE__*/React.createElement("span", {
26142
26352
  className: "check-page-link-button"
@@ -26157,7 +26367,7 @@ const PropertyWaterConnection = _ref => {
26157
26367
  },
26158
26368
  disabled: isPropertyFound,
26159
26369
  placeholder: t("WS_HEIGHT_OF_THE_BUILDING")
26160
- })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.heightOfTheBuilding) && /*#__PURE__*/React.createElement(CardLabelError, {
26370
+ })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.heightOfTheBuilding) && /*#__PURE__*/React.createElement(CardLabelError, {
26161
26371
  style: errorStyle
26162
26372
  }, errors.useDetails.heightOfTheBuilding.message)), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SELECT_YEAR_OF_CONSTRUCTION")}`), /*#__PURE__*/React.createElement("div", {
26163
26373
  className: "form-field"
@@ -26174,7 +26384,7 @@ const PropertyWaterConnection = _ref => {
26174
26384
  disable: isPropertyFound,
26175
26385
  placeholder: t("WS_SELECT_YEAR_OF_CONSTRUCTION")
26176
26386
  })
26177
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
26387
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
26178
26388
  style: errorStyle
26179
26389
  }, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_DWELLING_UNITS")}`, /*#__PURE__*/React.createElement("span", {
26180
26390
  className: "check-page-link-button"
@@ -26187,7 +26397,7 @@ const PropertyWaterConnection = _ref => {
26187
26397
  value: NUMBER_PATTERN$1,
26188
26398
  message: t("ERR_INVALID_NUMBER")
26189
26399
  },
26190
- required: t("REQUIRED_FIELD")
26400
+ required: isDwellingUnit ? t("REQUIRED_FIELD") : false
26191
26401
  }),
26192
26402
  name: "useDetails.NumberofDwellingUnits",
26193
26403
  disabled: isPropertyFound,
@@ -26195,7 +26405,7 @@ const PropertyWaterConnection = _ref => {
26195
26405
  required: t("REQUIRED_FIELD")
26196
26406
  },
26197
26407
  placeholder: t("WS_NUMBER_OF_DWELLING_UNITS")
26198
- }))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
26408
+ }))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
26199
26409
  style: errorStyle
26200
26410
  }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_ROOMS")}`, /*#__PURE__*/React.createElement("span", {
26201
26411
  className: "check-page-link-button"
@@ -26213,7 +26423,7 @@ const PropertyWaterConnection = _ref => {
26213
26423
  name: "useDetails.NumberofRooms",
26214
26424
  disabled: isPropertyFound,
26215
26425
  placeholder: t("WS_NUMBER_OF_ROOMS")
26216
- }))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.NumberofRooms) && /*#__PURE__*/React.createElement(CardLabelError, {
26426
+ }))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofRooms) && /*#__PURE__*/React.createElement(CardLabelError, {
26217
26427
  style: errorStyle
26218
26428
  }, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_BEDS")}`, /*#__PURE__*/React.createElement("span", {
26219
26429
  className: "check-page-link-button"
@@ -26231,7 +26441,7 @@ const PropertyWaterConnection = _ref => {
26231
26441
  name: "useDetails.numberOfBeds",
26232
26442
  disabled: isPropertyFound,
26233
26443
  placeholder: t("WS_NUMBER_OF_BEDS")
26234
- }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfBeds) && /*#__PURE__*/React.createElement(CardLabelError, {
26444
+ }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.numberOfBeds) && /*#__PURE__*/React.createElement(CardLabelError, {
26235
26445
  style: errorStyle
26236
26446
  }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_OF_STUDENTS")}`), /*#__PURE__*/React.createElement("div", {
26237
26447
  className: "form-field"
@@ -26246,7 +26456,7 @@ const PropertyWaterConnection = _ref => {
26246
26456
  name: "useDetails.numberOfStudents",
26247
26457
  disabled: isPropertyFound,
26248
26458
  placeholder: t("WS_NUMBER_OF_STUDENTS")
26249
- }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.numberOfStudents) && /*#__PURE__*/React.createElement(CardLabelError, {
26459
+ }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfStudents) && /*#__PURE__*/React.createElement(CardLabelError, {
26250
26460
  style: errorStyle
26251
26461
  }, errors.useDetails.numberOfStudents.message)));
26252
26462
  };
@@ -27139,6 +27349,10 @@ const BillAmendmentCard = () => {
27139
27349
  label: t("SW_WATER_INBOX"),
27140
27350
  link: `/digit-ui/employee/ws/sewerage/bill-amendment/inbox`,
27141
27351
  roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
27352
+ }, {
27353
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Application"),
27354
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
27355
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
27142
27356
  }]
27143
27357
  }), [isBillAMDInboxLoading, billData, totalCount]);
27144
27358
  return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
@@ -29144,7 +29358,15 @@ const WSCard = () => {
29144
29358
  count: isWSInboxLoading ? "-" : wsData === null || wsData === void 0 ? void 0 : wsData.totalCount,
29145
29359
  label: t("WATER_INBOX"),
29146
29360
  link: `/digit-ui/employee/ws/water/inbox`,
29147
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29361
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK"]
29362
+ }, {
29363
+ label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
29364
+ link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
29365
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29366
+ }, {
29367
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
29368
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
29369
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29148
29370
  }, ...links, {
29149
29371
  label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
29150
29372
  link: `/digit-ui/employee/ws/water/search-connection`,
@@ -29947,6 +30169,224 @@ const Inbox = _ref => {
29947
30169
  })));
29948
30170
  };
29949
30171
 
30172
+ const SearchBillAmendment = () => {
30173
+ const {
30174
+ t
30175
+ } = useTranslation();
30176
+ const tenantId = Digit.ULBService.getCurrentTenantId();
30177
+ const [searchResult, setSearchResult] = useState(null);
30178
+ const [isLoading, setIsLoading] = useState(false);
30179
+ const [showToast, setShowToast] = useState(null);
30180
+ const {
30181
+ register,
30182
+ handleSubmit,
30183
+ reset
30184
+ } = useForm({
30185
+ defaultValues: {
30186
+ amendmentId: "",
30187
+ consumerCode: ""
30188
+ }
30189
+ });
30190
+ const convertEpochToDate = epoch => {
30191
+ if (!epoch) return "NA";
30192
+ const d = new Date(epoch);
30193
+ const day = String(d.getDate()).padStart(2, "0");
30194
+ const month = String(d.getMonth() + 1).padStart(2, "0");
30195
+ const year = d.getFullYear();
30196
+ return `${day}/${month}/${year}`;
30197
+ };
30198
+ const onSubmit = function (formData) {
30199
+ try {
30200
+ var _formData$amendmentId, _formData$consumerCod;
30201
+ const amendmentId = formData === null || formData === void 0 ? void 0 : (_formData$amendmentId = formData.amendmentId) === null || _formData$amendmentId === void 0 ? void 0 : _formData$amendmentId.trim();
30202
+ const consumerCode = formData === null || formData === void 0 ? void 0 : (_formData$consumerCod = formData.consumerCode) === null || _formData$consumerCod === void 0 ? void 0 : _formData$consumerCod.trim();
30203
+ if (!amendmentId && !consumerCode) {
30204
+ setShowToast({
30205
+ error: true,
30206
+ label: t("WS_FILL_ATLEAST_ONE_FIELD", "Please fill at least one field to search")
30207
+ });
30208
+ setTimeout(() => setShowToast(null), 3000);
30209
+ return Promise.resolve();
30210
+ }
30211
+ const _temp = _finallyRethrows(function () {
30212
+ return _catch(function () {
30213
+ setIsLoading(true);
30214
+ const params = {
30215
+ businessService: "WS"
30216
+ };
30217
+ if (amendmentId) params.amendmentId = amendmentId;
30218
+ if (consumerCode) params.consumerCode = consumerCode;
30219
+ return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, params)).then(function (res) {
30220
+ setSearchResult((res === null || res === void 0 ? void 0 : res.Amendments) || []);
30221
+ });
30222
+ }, function (err) {
30223
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
30224
+ console.error("Error searching bill amendment:", err);
30225
+ setSearchResult([]);
30226
+ setShowToast({
30227
+ error: true,
30228
+ label: (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) || t("CS_WATER_SEARCH_FAILED", "Search failed")
30229
+ });
30230
+ setTimeout(() => setShowToast(null), 5000);
30231
+ });
30232
+ }, function (_wasThrown, _result) {
30233
+ setIsLoading(false);
30234
+ if (_wasThrown) throw _result;
30235
+ return _result;
30236
+ });
30237
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
30238
+ } catch (e) {
30239
+ return Promise.reject(e);
30240
+ }
30241
+ };
30242
+ const onReset = () => {
30243
+ reset({
30244
+ amendmentId: "",
30245
+ consumerCode: ""
30246
+ });
30247
+ setSearchResult(null);
30248
+ };
30249
+ const columns = useMemo(() => [{
30250
+ Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
30251
+ accessor: "amendmentId",
30252
+ Cell: _ref => {
30253
+ let {
30254
+ row
30255
+ } = _ref;
30256
+ return /*#__PURE__*/React.createElement("span", {
30257
+ className: "link"
30258
+ }, /*#__PURE__*/React.createElement(Link, {
30259
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30260
+ }, row.original.amendmentId));
30261
+ }
30262
+ }, {
30263
+ Header: t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No"),
30264
+ accessor: "consumerCode",
30265
+ Cell: _ref2 => {
30266
+ let {
30267
+ row
30268
+ } = _ref2;
30269
+ return /*#__PURE__*/React.createElement("span", {
30270
+ className: "link"
30271
+ }, /*#__PURE__*/React.createElement(Link, {
30272
+ to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original.consumerCode}&tenantId=${tenantId}&service=WATER`
30273
+ }, row.original.consumerCode));
30274
+ }
30275
+ }, {
30276
+ Header: t("WS_AMENDMENT_REASON", "Amendment Reason"),
30277
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.amendmentReason) || "NA")
30278
+ }, {
30279
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS", "Status"),
30280
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.status) || "NA")
30281
+ }, {
30282
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_DATE", "Application Date"),
30283
+ accessor: row => {
30284
+ var _row$auditDetails;
30285
+ return convertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails = row.auditDetails) === null || _row$auditDetails === void 0 ? void 0 : _row$auditDetails.createdTime);
30286
+ }
30287
+ }, {
30288
+ Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
30289
+ Cell: _ref3 => {
30290
+ let {
30291
+ row
30292
+ } = _ref3;
30293
+ return /*#__PURE__*/React.createElement("span", {
30294
+ className: "link"
30295
+ }, /*#__PURE__*/React.createElement(Link, {
30296
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30297
+ }, t("ES_COMMON_VIEW", "View")));
30298
+ }
30299
+ }], [t, tenantId]);
30300
+ return /*#__PURE__*/React.createElement("div", {
30301
+ className: "employee-wrapper",
30302
+ style: {
30303
+ padding: "16px"
30304
+ }
30305
+ }, /*#__PURE__*/React.createElement(Header, {
30306
+ styles: {
30307
+ fontSize: "32px",
30308
+ marginBottom: "16px"
30309
+ }
30310
+ }, t("WS_SEARCH_BILL_AMENDMENT_APPLICATION", "Search Bill Amendment Application")), /*#__PURE__*/React.createElement(Card, {
30311
+ style: {
30312
+ padding: "24px",
30313
+ marginBottom: "24px"
30314
+ }
30315
+ }, /*#__PURE__*/React.createElement("form", {
30316
+ onSubmit: handleSubmit(onSubmit)
30317
+ }, /*#__PURE__*/React.createElement("div", {
30318
+ style: {
30319
+ display: "grid",
30320
+ gridTemplateColumns: "1fr 1fr",
30321
+ gap: "24px",
30322
+ marginBottom: "24px"
30323
+ }
30324
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
30325
+ style: {
30326
+ fontWeight: "600",
30327
+ marginBottom: "8px"
30328
+ }
30329
+ }, t("WS_ACK_COMMON_APP_NO_LABEL", "Application No")), /*#__PURE__*/React.createElement(TextInput, {
30330
+ name: "amendmentId",
30331
+ inputRef: register(),
30332
+ placeholder: t("WS_SEARCH_APP_NO_PLACEHOLDER", "Enter Bill Amendment Application No")
30333
+ })), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
30334
+ style: {
30335
+ fontWeight: "600",
30336
+ marginBottom: "8px"
30337
+ }
30338
+ }, t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No")), /*#__PURE__*/React.createElement(TextInput, {
30339
+ name: "consumerCode",
30340
+ inputRef: register(),
30341
+ placeholder: t("WS_SEARCH_CONSUMER_NO_PLACEHOLDER", "Enter Consumer / Connection No")
30342
+ }))), /*#__PURE__*/React.createElement("div", {
30343
+ style: {
30344
+ display: "flex",
30345
+ gap: "16px",
30346
+ alignItems: "center"
30347
+ }
30348
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
30349
+ label: t("ES_COMMON_SEARCH", "Search"),
30350
+ submit: true
30351
+ }), /*#__PURE__*/React.createElement("button", {
30352
+ type: "button",
30353
+ className: "clear-search generic-button",
30354
+ onClick: onReset,
30355
+ style: {
30356
+ background: "transparent",
30357
+ border: "none",
30358
+ color: "#a82227",
30359
+ cursor: "pointer",
30360
+ fontWeight: "600",
30361
+ fontSize: "16px"
30362
+ }
30363
+ }, t("ES_COMMON_CLEAR_SEARCH", "Clear Search"))))), isLoading && /*#__PURE__*/React.createElement(Loader, null), !isLoading && searchResult && /*#__PURE__*/React.createElement(Card, {
30364
+ style: {
30365
+ padding: "16px"
30366
+ }
30367
+ }, searchResult.length > 0 ? /*#__PURE__*/React.createElement(Table, {
30368
+ t: t,
30369
+ data: searchResult,
30370
+ columns: columns,
30371
+ getCellProps: () => ({
30372
+ style: {
30373
+ minWidth: "140px",
30374
+ padding: "16px 14px",
30375
+ fontSize: "14px"
30376
+ }
30377
+ })
30378
+ }) : /*#__PURE__*/React.createElement(CardText, {
30379
+ style: {
30380
+ textAlign: "center",
30381
+ padding: "24px"
30382
+ }
30383
+ }, t("ES_COMMON_NO_DATA", "No applications found"))), showToast && /*#__PURE__*/React.createElement(Toast, {
30384
+ error: showToast.error,
30385
+ label: showToast.label,
30386
+ onClose: () => setShowToast(null)
30387
+ }));
30388
+ };
30389
+
29950
30390
  const newConfig = [{
29951
30391
  head: "",
29952
30392
  body: [{
@@ -33214,7 +33654,7 @@ const Rebate_menu = [{
33214
33654
  value: "Others"
33215
33655
  }];
33216
33656
  const WSFeeEstimation = _ref => {
33217
- var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _wsAdditionalDetails$8, _wsAdditionalDetails$9, _wsAdditionalDetails$0, _wsAdditionalDetails$1, _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$Proc, _workflowDetails$Proc2, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
33657
+ var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _workflowDetails$data0, _wsAdditionalDetails$8, _wsAdditionalDetails$9, _wsAdditionalDetails$0, _wsAdditionalDetails$1, _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$Proc, _workflowDetails$Proc2, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
33218
33658
  let {
33219
33659
  wsAdditionalDetails,
33220
33660
  workflowDetails,
@@ -33227,27 +33667,30 @@ const WSFeeEstimation = _ref => {
33227
33667
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
33228
33668
  const [sessionBillFormData, setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {});
33229
33669
  const appStatus = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$ === void 0 ? void 0 : (_wsAdditionalDetails$2 = _wsAdditionalDetails$.appDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : _wsAdditionalDetails$2.applicationStatus) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$3 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : (_wsAdditionalDetails$4 = _wsAdditionalDetails$3.data) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : _wsAdditionalDetails$4.applicationStatus) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.processInstances) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2[0]) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.state) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.applicationStatus) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.processInstances) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6[0]) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.state) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.state);
33230
- const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.ProcessInstances);
33670
+ const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.ProcessInstances) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$5 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : (_wsAdditionalDetails$6 = _wsAdditionalDetails$5.appDetails) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : _wsAdditionalDetails$6.processInstancesDetails) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$7 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : _wsAdditionalDetails$7.processInstancesDetails) || [];
33671
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline) || [];
33672
+ const isSendBackToCitizen = Array.isArray(timeline) && timeline.some(step => (step === null || step === void 0 ? void 0 : step.action) === "SEND_BACK_TO_CITIZEN" || (step === null || step === void 0 ? void 0 : step.action) === "SEND_BACK_TO_CITIZEN_DIRECT") || Array.isArray(allTimelineSteps) && allTimelineSteps.some(step => (step === null || step === void 0 ? void 0 : step.performedAction) === "SEND_BACK_TO_CITIZEN" || (step === null || step === void 0 ? void 0 : step.performedAction) === "SEND_BACK_TO_CITIZEN_DIRECT");
33231
33673
  const hasPaymentInTimeline = Array.isArray(timeline) && timeline.some(step => {
33232
- var _step$state, _step$state2;
33233
- return (step === null || step === void 0 ? void 0 : step.action) === "PAY" || (step === null || step === void 0 ? void 0 : (_step$state = step.state) === null || _step$state === void 0 ? void 0 : _step$state.state) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : (_step$state2 = step.state) === null || _step$state2 === void 0 ? void 0 : _step$state2.applicationStatus) === "PENDING_FOR_PAYMENT";
33234
- });
33235
- const isPostPaymentState = hasPaymentInTimeline && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && appStatus !== "PENDING_FOR_CITIZEN_ACTION" && appStatus !== "PENDING_FOR_FIELD_INSPECTION";
33236
- const isWorkflowPaid = appStatus && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && appStatus !== "PENDING_FOR_CITIZEN_ACTION" && appStatus !== "PENDING_FOR_FIELD_INSPECTION" && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "PENDING_FOR_FINAL_PAYMENT" && appStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" && appStatus !== "PENDING_APPROVAL_FOR_MUTATION";
33237
- const isPaid = wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$5 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$5 !== void 0 && _wsAdditionalDetails$5.isPaid || isWorkflowPaid || isPostPaymentState ? true : false;
33674
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
33675
+ return (step === null || step === void 0 ? void 0 : step.action) === "PAY" || (step === null || step === void 0 ? void 0 : (_step$state = step.state) === null || _step$state === void 0 ? void 0 : _step$state.state) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : (_step$state2 = step.state) === null || _step$state2 === void 0 ? void 0 : _step$state2.applicationStatus) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : (_step$state3 = step.state) === null || _step$state3 === void 0 ? void 0 : _step$state3.state) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state4 = step.state) === null || _step$state4 === void 0 ? void 0 : _step$state4.state) === "PENDING_FOR_EE_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state5 = step.state) === null || _step$state5 === void 0 ? void 0 : _step$state5.applicationStatus) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state6 = step.state) === null || _step$state6 === void 0 ? void 0 : _step$state6.applicationStatus) === "PENDING_FOR_EE_APPROVAL";
33676
+ }) || Array.isArray(allTimelineSteps) && allTimelineSteps.some(step => (step === null || step === void 0 ? void 0 : step.performedAction) === "PAY" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_EE_APPROVAL" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_EE_APPROVAL");
33677
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
33678
+ const isPostPaymentState = (hasPaymentInTimeline || isSendBackToCitizen) && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && (appStatus !== "PENDING_FOR_CITIZEN_ACTION" || isCitizenActionPostPayment) && appStatus !== "PENDING_FOR_FIELD_INSPECTION";
33679
+ const isWorkflowPaid = appStatus && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && (appStatus !== "PENDING_FOR_CITIZEN_ACTION" || isCitizenActionPostPayment) && appStatus !== "PENDING_FOR_FIELD_INSPECTION" && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "PENDING_FOR_FINAL_PAYMENT" && appStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" && appStatus !== "PENDING_APPROVAL_FOR_MUTATION";
33680
+ const isPaid = wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$8 !== void 0 && _wsAdditionalDetails$8.isPaid || isWorkflowPaid || isPostPaymentState || isCitizenActionPostPayment ? true : false;
33238
33681
  const [popup, showPopUp] = useState(false);
33239
33682
  const [fields, setFields] = useState(sessionFormData ? sessionFormData : {});
33240
33683
  const [showToast, setShowToast] = useState(null);
33241
33684
  const [billDetails, setBillDetails] = useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
33242
33685
  const [values, setValues] = useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []);
33243
- const isDisconnectionExecuted = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$6 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : (_wsAdditionalDetails$7 = _wsAdditionalDetails$6.appDetails) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : _wsAdditionalDetails$7.applicationStatus) === "DISCONNECTION_EXECUTED";
33244
- const appType = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$8 === void 0 ? void 0 : (_wsAdditionalDetails$9 = _wsAdditionalDetails$8.appDetails) === null || _wsAdditionalDetails$9 === void 0 ? void 0 : _wsAdditionalDetails$9.applicationType) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$0 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$0 === void 0 ? void 0 : (_wsAdditionalDetails$1 = _wsAdditionalDetails$0.data) === null || _wsAdditionalDetails$1 === void 0 ? void 0 : _wsAdditionalDetails$1.applicationType) || "";
33245
- const appNo = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$10 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$10 === void 0 ? void 0 : (_wsAdditionalDetails$11 = _wsAdditionalDetails$10.appDetails) === null || _wsAdditionalDetails$11 === void 0 ? void 0 : _wsAdditionalDetails$11.applicationNo) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$12 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$12 === void 0 ? void 0 : (_wsAdditionalDetails$13 = _wsAdditionalDetails$12.data) === null || _wsAdditionalDetails$13 === void 0 ? void 0 : _wsAdditionalDetails$13.applicationNo) || "";
33246
- const wfBusinessService = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : (_workflowDetails$data1 = _workflowDetails$data0.processInstances) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1[0]) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.businessService) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$Proc = workflowDetails.ProcessInstances) === null || _workflowDetails$Proc === void 0 ? void 0 : (_workflowDetails$Proc2 = _workflowDetails$Proc[0]) === null || _workflowDetails$Proc2 === void 0 ? void 0 : _workflowDetails$Proc2.businessService) || "";
33686
+ const isDisconnectionExecuted = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$9 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$9 === void 0 ? void 0 : (_wsAdditionalDetails$0 = _wsAdditionalDetails$9.appDetails) === null || _wsAdditionalDetails$0 === void 0 ? void 0 : _wsAdditionalDetails$0.applicationStatus) === "DISCONNECTION_EXECUTED";
33687
+ const appType = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$1 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$1 === void 0 ? void 0 : (_wsAdditionalDetails$10 = _wsAdditionalDetails$1.appDetails) === null || _wsAdditionalDetails$10 === void 0 ? void 0 : _wsAdditionalDetails$10.applicationType) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$11 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$11 === void 0 ? void 0 : (_wsAdditionalDetails$12 = _wsAdditionalDetails$11.data) === null || _wsAdditionalDetails$12 === void 0 ? void 0 : _wsAdditionalDetails$12.applicationType) || "";
33688
+ const appNo = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$13 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$13 === void 0 ? void 0 : (_wsAdditionalDetails$14 = _wsAdditionalDetails$13.appDetails) === null || _wsAdditionalDetails$14 === void 0 ? void 0 : _wsAdditionalDetails$14.applicationNo) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$15 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$15 === void 0 ? void 0 : (_wsAdditionalDetails$16 = _wsAdditionalDetails$15.data) === null || _wsAdditionalDetails$16 === void 0 ? void 0 : _wsAdditionalDetails$16.applicationNo) || "";
33689
+ const wfBusinessService = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data1 = workflowDetails.data) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.processInstances) === null || _workflowDetails$data10 === void 0 ? void 0 : (_workflowDetails$data11 = _workflowDetails$data10[0]) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.businessService) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$Proc = workflowDetails.ProcessInstances) === null || _workflowDetails$Proc === void 0 ? void 0 : (_workflowDetails$Proc2 = _workflowDetails$Proc[0]) === null || _workflowDetails$Proc2 === void 0 ? void 0 : _workflowDetails$Proc2.businessService) || "";
33247
33690
  const isDisconnection = (appType === null || appType === void 0 ? void 0 : appType.includes("DISCONNECT")) || (wfBusinessService === null || wfBusinessService === void 0 ? void 0 : wfBusinessService.includes("Disconnect")) || (appNo === null || appNo === void 0 ? void 0 : appNo.includes("DC"));
33248
- const isDisconnectionFeeOnly = onlyDisconnectionFee || isDisconnectionExecuted || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$14 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$14 === void 0 ? void 0 : _wsAdditionalDetails$14.onlyDisconnectionFee) || isDisconnection && ["PENDING_FOR_PAYMENT", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_ADDITIONAL_PAYMENT", "PENDING_APPROVAL_FOR_DISCONNECTION", "PENDING_FOR_DISCONNECTION_EXECUTION", "DISCONNECTION_EXECUTED"].includes(appStatus);
33691
+ const isDisconnectionFeeOnly = onlyDisconnectionFee || isDisconnectionExecuted || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$17 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$17 === void 0 ? void 0 : _wsAdditionalDetails$17.onlyDisconnectionFee) || isDisconnection && ["PENDING_FOR_PAYMENT", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_ADDITIONAL_PAYMENT", "PENDING_APPROVAL_FOR_DISCONNECTION", "PENDING_FOR_DISCONNECTION_EXECUTION", "DISCONNECTION_EXECUTED"].includes(appStatus);
33249
33692
  const isReconnection = (appType === null || appType === void 0 ? void 0 : appType.includes("RECONNECT")) || (wfBusinessService === null || wfBusinessService === void 0 ? void 0 : wfBusinessService.includes("Reconnection")) || (appNo === null || appNo === void 0 ? void 0 : appNo.includes("RC"));
33250
- const isReconnectionFeeOnly = onlyReconnectionFee || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$15 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$15 === void 0 ? void 0 : _wsAdditionalDetails$15.onlyReconnectionFee) || isReconnection && ["PENDING_FOR_PAYMENT", "PENDING_APPROVAL_FOR_RECONNECTION", "PENDING_FOR_RECONNECTION_EXECUTION", "CONNECTION_ACTIVATED"].includes(appStatus);
33693
+ const isReconnectionFeeOnly = onlyReconnectionFee || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$18 === void 0 ? void 0 : _wsAdditionalDetails$18.onlyReconnectionFee) || isReconnection && ["PENDING_FOR_PAYMENT", "PENDING_APPROVAL_FOR_RECONNECTION", "PENDING_FOR_RECONNECTION_EXECUTION", "CONNECTION_ACTIVATED"].includes(appStatus);
33251
33694
  const billRows = (billDetails === null || billDetails === void 0 ? void 0 : (_billDetails$billDeta = billDetails.billDetails) === null || _billDetails$billDeta === void 0 ? void 0 : (_billDetails$billDeta2 = _billDetails$billDeta[0]) === null || _billDetails$billDeta2 === void 0 ? void 0 : _billDetails$billDeta2.billAccountDetails) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.taxHeadEstimates) || [];
33252
33695
  const disconnectionFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_DISCONNECTION_FEE" || (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "SW_DISCONNECTION_FEE");
33253
33696
  const reopeningFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_REOPENING_FEE" || (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "SW_REOPENING_FEE");
@@ -33260,9 +33703,9 @@ const WSFeeEstimation = _ref => {
33260
33703
  data: mdmsRes
33261
33704
  } = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
33262
33705
  useEffect(() => {
33263
- var _wsAdditionalDetails$16, _wsAdditionalDetails$17, _sessionFormData$bill;
33706
+ var _wsAdditionalDetails$19, _wsAdditionalDetails$20, _sessionFormData$bill;
33264
33707
  const data = {
33265
- ...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$16 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$16 === void 0 ? void 0 : (_wsAdditionalDetails$17 = _wsAdditionalDetails$16.appDetails) === null || _wsAdditionalDetails$17 === void 0 ? void 0 : _wsAdditionalDetails$17.additionalDetails)
33708
+ ...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$19 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$19 === void 0 ? void 0 : (_wsAdditionalDetails$20 = _wsAdditionalDetails$19.appDetails) === null || _wsAdditionalDetails$20 === void 0 ? void 0 : _wsAdditionalDetails$20.additionalDetails)
33266
33709
  };
33267
33710
  if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
33268
33711
  var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
@@ -33316,8 +33759,8 @@ const WSFeeEstimation = _ref => {
33316
33759
  const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
33317
33760
  const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
33318
33761
  if (adhocAmount || rebateAmount) {
33319
- var _wsAdditionalDetails$18, _wsAdditionalDetails$19;
33320
- const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$18 === void 0 ? void 0 : (_wsAdditionalDetails$19 = _wsAdditionalDetails$18.data) === null || _wsAdditionalDetails$19 === void 0 ? void 0 : _wsAdditionalDetails$19.totalAmount;
33762
+ var _wsAdditionalDetails$21, _wsAdditionalDetails$22;
33763
+ const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$21 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$21 === void 0 ? void 0 : (_wsAdditionalDetails$22 = _wsAdditionalDetails$21.data) === null || _wsAdditionalDetails$22 === void 0 ? void 0 : _wsAdditionalDetails$22.totalAmount;
33321
33764
  if (rebateAmount > totalAmount) {
33322
33765
  setShowToast({
33323
33766
  isError: false,
@@ -33326,16 +33769,16 @@ const WSFeeEstimation = _ref => {
33326
33769
  message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
33327
33770
  });
33328
33771
  } else {
33329
- var _wsAdditionalDetails$24, _wsAdditionalDetails$25, _wsAdditionalDetails$26, _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$30, _wsAdditionalDetails$31, _wsAdditionalDetails$32, _wsAdditionalDetails$33;
33330
- const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$24 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$24 === void 0 ? void 0 : (_wsAdditionalDetails$25 = _wsAdditionalDetails$24.appDetails) === null || _wsAdditionalDetails$25 === void 0 ? void 0 : _wsAdditionalDetails$25.applicationNo;
33331
- const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$26 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$26 === void 0 ? void 0 : (_wsAdditionalDetails$27 = _wsAdditionalDetails$26.appDetails) === null || _wsAdditionalDetails$27 === void 0 ? void 0 : _wsAdditionalDetails$27.tenantId;
33772
+ var _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$30, _wsAdditionalDetails$31, _wsAdditionalDetails$32, _wsAdditionalDetails$33, _wsAdditionalDetails$34, _wsAdditionalDetails$35, _wsAdditionalDetails$36;
33773
+ const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$27 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$27 === void 0 ? void 0 : (_wsAdditionalDetails$28 = _wsAdditionalDetails$27.appDetails) === null || _wsAdditionalDetails$28 === void 0 ? void 0 : _wsAdditionalDetails$28.applicationNo;
33774
+ const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$29 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$29 === void 0 ? void 0 : (_wsAdditionalDetails$30 = _wsAdditionalDetails$29.appDetails) === null || _wsAdditionalDetails$30 === void 0 ? void 0 : _wsAdditionalDetails$30.tenantId;
33332
33775
  const appAdditionalDetails = {
33333
- ...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$28 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$28 === void 0 ? void 0 : (_wsAdditionalDetails$29 = _wsAdditionalDetails$28.appDetails) === null || _wsAdditionalDetails$29 === void 0 ? void 0 : _wsAdditionalDetails$29.additionalDetails),
33776
+ ...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$31 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$31 === void 0 ? void 0 : (_wsAdditionalDetails$32 = _wsAdditionalDetails$31.appDetails) === null || _wsAdditionalDetails$32 === void 0 ? void 0 : _wsAdditionalDetails$32.additionalDetails),
33334
33777
  ...fields
33335
33778
  };
33336
33779
  wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
33337
33780
  const data = {
33338
- CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$30 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$30 === void 0 ? void 0 : (_wsAdditionalDetails$31 = _wsAdditionalDetails$30.appDetails) === null || _wsAdditionalDetails$31 === void 0 ? void 0 : _wsAdditionalDetails$31.service) == "WATER" ? [{
33781
+ CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$33 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$33 === void 0 ? void 0 : (_wsAdditionalDetails$34 = _wsAdditionalDetails$33.appDetails) === null || _wsAdditionalDetails$34 === void 0 ? void 0 : _wsAdditionalDetails$34.service) == "WATER" ? [{
33339
33782
  applicationNo: applicationNo,
33340
33783
  tenantId: tenantId,
33341
33784
  waterConnection: wsAdditionalDetails.additionalDetails.appDetails
@@ -33346,7 +33789,7 @@ const WSFeeEstimation = _ref => {
33346
33789
  }],
33347
33790
  isconnectionCalculation: false
33348
33791
  };
33349
- let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$32 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$32 === void 0 ? void 0 : (_wsAdditionalDetails$33 = _wsAdditionalDetails$32.appDetails) === null || _wsAdditionalDetails$33 === void 0 ? void 0 : _wsAdditionalDetails$33.service) == "WATER" ? "WS" : "SW";
33792
+ let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$35 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$35 === void 0 ? void 0 : (_wsAdditionalDetails$36 = _wsAdditionalDetails$35.appDetails) === null || _wsAdditionalDetails$36 === void 0 ? void 0 : _wsAdditionalDetails$36.service) == "WATER" ? "WS" : "SW";
33350
33793
  Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
33351
33794
  var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7, _result$Calculation7$, _result$Calculation8;
33352
33795
  if ((result === null || result === void 0 ? void 0 : (_result$Calculation = result.Calculation) === null || _result$Calculation === void 0 ? void 0 : (_result$Calculation$ = _result$Calculation[0]) === null || _result$Calculation$ === void 0 ? void 0 : (_result$Calculation$$ = _result$Calculation$.taxHeadEstimates) === null || _result$Calculation$$ === void 0 ? void 0 : _result$Calculation$$.length) > 0) {
@@ -34052,11 +34495,11 @@ const ViewBreakup = _ref => {
34052
34495
  }))))));
34053
34496
  };
34054
34497
 
34055
- const checkForNA$1 = value => {
34498
+ const checkForNA$2 = value => {
34056
34499
  return value ? value : "CS_NA";
34057
34500
  };
34058
34501
  const WSApplicationDetails = () => {
34059
- 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$, _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$SewerageConnect55, _data$SewerageConnect56, _data$WaterConnection62, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect57, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$SewerageConnect60, _data$SewerageConnect61, _data$WaterConnection67, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect62, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$WaterConnection75, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$SewerageConnect70, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection79, _data$WaterConnection80, _data$WaterConnection81, _data$SewerageConnect74, _data$SewerageConnect75, _data$SewerageConnect76, _data$WaterConnection82, _data$WaterConnection83, _data$WaterConnection84, _data$WaterConnection85, _data$SewerageConnect77, _data$SewerageConnect78, _data$SewerageConnect79, _data$SewerageConnect80, _data$WaterConnection86, _data$WaterConnection87, _data$WaterConnection88, _data$WaterConnection89, _data$SewerageConnect81, _data$SewerageConnect82, _data$SewerageConnect83, _data$SewerageConnect84, _data$WaterConnection90, _data$WaterConnection91, _data$WaterConnection92, _data$WaterConnection93, _data$SewerageConnect85, _data$SewerageConnect86, _data$SewerageConnect87, _data$SewerageConnect88, _data$WaterConnection94, _data$WaterConnection95, _data$WaterConnection96, _data$WaterConnection97, _data$SewerageConnect89, _data$SewerageConnect90, _data$SewerageConnect91, _data$SewerageConnect92, _data$WaterConnection98, _data$WaterConnection99, _data$WaterConnection100, _data$WaterConnection101, _data$SewerageConnect93, _data$SewerageConnect94, _data$SewerageConnect95, _data$SewerageConnect96, _data$WaterConnection102, _data$WaterConnection103, _data$WaterConnection104, _data$WaterConnection105, _data$SewerageConnect97, _data$SewerageConnect98, _data$SewerageConnect99, _data$SewerageConnect100, _data$WaterConnection106, _data$WaterConnection107, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect101, _data$SewerageConnect102, _data$SewerageConnect103, _data$SewerageConnect104, _data$WaterConnection110, _data$WaterConnection111, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect105, _data$SewerageConnect106, _data$SewerageConnect107, _data$SewerageConnect108, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection120, _data$WaterConnection121, _data$SewerageConnect115, _data$SewerageConnect116, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect117, _data$SewerageConnect118, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca, _propertyAddress$loca2, _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$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyT3, _applicationData$dueV, _data$WaterConnection124, _data$WaterConnection125, _data$WaterConnection126, _data$WaterConnection127, _data$SewerageConnect119, _data$SewerageConnect120, _data$SewerageConnect121, _data$SewerageConnect122, _data$WaterConnection130, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$WaterConnection135, _data$SewerageConnect125, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$SewerageConnect130, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect136, _data$SewerageConnect137, _data$SewerageConnect138, _data$SewerageConnect139, _data$SewerageConnect140, _data$WaterConnection146, _data$WaterConnection147, _data$SewerageConnect141, _data$SewerageConnect142, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect143, _data$SewerageConnect144, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect145, _data$SewerageConnect146, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$SewerageConnect147, _data$SewerageConnect148, _data$WaterConnection155, _data$WaterConnection156, _data$SewerageConnect149, _data$SewerageConnect150, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160, _data$WaterConnection161, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$SewerageConnect155, _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$SewerageConnect162, _data$SewerageConnect163, _data$SewerageConnect164, _data$SewerageConnect165, _data$SewerageConnect166, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$WaterConnection167, _data$WaterConnection168, _data$WaterConnection169, _data$WaterConnection170, _data$WaterConnection171, _data$WaterConnection172, _data$WaterConnection173, _data$WaterConnection174, _data$WaterConnection175, _data$WaterConnection176, _data$SewerageConnect167, _data$SewerageConnect168, _data$SewerageConnect169, _data$SewerageConnect170, _data$WaterConnection177, _data$SewerageConnect171, _data$WaterConnection178, _data$WaterConnection179, _data$WaterConnection180, _data$WaterConnection181, _data$SewerageConnect172, _data$SewerageConnect173, _data$SewerageConnect174, _data$WaterConnection182, _data$WaterConnection183, _data$WaterConnection184, _data$SewerageConnect175, _data$SewerageConnect176, _data$SewerageConnect177, _data$WaterConnection185, _data$WaterConnection186, _data$SewerageConnect178, _data$SewerageConnect179, _data$WaterConnection187, _data$WaterConnection188, _data$SewerageConnect180;
34502
+ 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$, _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$SewerageConnect55, _data$SewerageConnect56, _data$WaterConnection62, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect57, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$SewerageConnect60, _data$SewerageConnect61, _data$WaterConnection67, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect62, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$WaterConnection75, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$SewerageConnect70, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _applicationData$addi, _applicationData$addi2, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection79, _data$WaterConnection80, _data$WaterConnection81, _data$SewerageConnect74, _data$SewerageConnect75, _data$SewerageConnect76, _data$WaterConnection82, _data$WaterConnection83, _data$WaterConnection84, _data$WaterConnection85, _data$SewerageConnect77, _data$SewerageConnect78, _data$SewerageConnect79, _data$SewerageConnect80, _data$WaterConnection86, _data$WaterConnection87, _data$WaterConnection88, _data$WaterConnection89, _data$SewerageConnect81, _data$SewerageConnect82, _data$SewerageConnect83, _data$SewerageConnect84, _data$WaterConnection90, _data$WaterConnection91, _data$WaterConnection92, _data$WaterConnection93, _data$SewerageConnect85, _data$SewerageConnect86, _data$SewerageConnect87, _data$SewerageConnect88, _data$WaterConnection94, _data$WaterConnection95, _data$WaterConnection96, _data$WaterConnection97, _data$SewerageConnect89, _data$SewerageConnect90, _data$SewerageConnect91, _data$SewerageConnect92, _data$WaterConnection98, _data$WaterConnection99, _data$WaterConnection100, _data$WaterConnection101, _data$SewerageConnect93, _data$SewerageConnect94, _data$SewerageConnect95, _data$SewerageConnect96, _data$WaterConnection102, _data$WaterConnection103, _data$WaterConnection104, _data$WaterConnection105, _data$SewerageConnect97, _data$SewerageConnect98, _data$SewerageConnect99, _data$SewerageConnect100, _data$WaterConnection106, _data$WaterConnection107, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect101, _data$SewerageConnect102, _data$SewerageConnect103, _data$SewerageConnect104, _data$WaterConnection110, _data$WaterConnection111, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect105, _data$SewerageConnect106, _data$SewerageConnect107, _data$SewerageConnect108, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection120, _data$WaterConnection121, _data$SewerageConnect115, _data$SewerageConnect116, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect117, _data$SewerageConnect118, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca, _propertyAddress$loca2, _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$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _applicationData$addi3, _applicationData$addi4, _applicationData$addi5, _applicationData$prop, _applicationData$prop2, _applicationData$prop3, _applicationData$addi6, _applicationData$addi7, _applicationData$prop4, _applicationData$prop5, _applicationData$addi8, _applicationData$addi9, _applicationData$prop6, _applicationData$prop7, _applicationData$dueV, _data$WaterConnection124, _data$WaterConnection125, _data$WaterConnection126, _data$WaterConnection127, _data$SewerageConnect119, _data$SewerageConnect120, _data$SewerageConnect121, _data$SewerageConnect122, _data$WaterConnection130, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$WaterConnection135, _data$SewerageConnect125, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$SewerageConnect130, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect136, _data$SewerageConnect137, _data$SewerageConnect138, _data$SewerageConnect139, _data$SewerageConnect140, _data$WaterConnection146, _data$WaterConnection147, _data$SewerageConnect141, _data$SewerageConnect142, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect143, _data$SewerageConnect144, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect145, _data$SewerageConnect146, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$SewerageConnect147, _data$SewerageConnect148, _data$WaterConnection155, _data$WaterConnection156, _data$SewerageConnect149, _data$SewerageConnect150, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160, _data$WaterConnection161, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$SewerageConnect155, _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$SewerageConnect162, _data$SewerageConnect163, _data$SewerageConnect164, _data$SewerageConnect165, _data$SewerageConnect166, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$WaterConnection167, _data$WaterConnection168, _data$WaterConnection169, _data$WaterConnection170, _data$WaterConnection171, _data$WaterConnection172, _data$WaterConnection173, _data$WaterConnection174, _data$WaterConnection175, _data$WaterConnection176, _data$SewerageConnect167, _data$SewerageConnect168, _data$SewerageConnect169, _data$SewerageConnect170, _data$WaterConnection177, _data$SewerageConnect171, _data$WaterConnection178, _data$WaterConnection179, _data$WaterConnection180, _data$WaterConnection181, _data$SewerageConnect172, _data$SewerageConnect173, _data$SewerageConnect174, _data$WaterConnection182, _data$WaterConnection183, _data$WaterConnection184, _data$SewerageConnect175, _data$SewerageConnect176, _data$SewerageConnect177, _data$WaterConnection185, _data$WaterConnection186, _data$SewerageConnect178, _data$SewerageConnect179, _data$WaterConnection187, _data$WaterConnection188, _data$SewerageConnect180;
34060
34503
  const getDisconnectionNoticeSearch = function () {
34061
34504
  try {
34062
34505
  var _data$WaterConnection190, _data$WaterConnection191, _data$SewerageConnect182, _data$SewerageConnect183;
@@ -34102,6 +34545,75 @@ const WSApplicationDetails = () => {
34102
34545
  const tenantId = ((_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code) || (user === null || user === void 0 ? void 0 : (_user$info4 = user.info) === null || _user$info4 === void 0 ? void 0 : _user$info4.permanentCity) || Digit.ULBService.getCurrentTenantId();
34103
34546
  const [showOptions, setShowOptions] = useState(false);
34104
34547
  const [viewTimeline, setViewTimeline] = useState(false);
34548
+ const [showDocModal, setShowDocModal] = useState(false);
34549
+ const [docFileUrl, setDocFileUrl] = useState(null);
34550
+ const [docFileType, setDocFileType] = useState("image");
34551
+ const handleViewEmployeeDoc = function (fileStoreId) {
34552
+ try {
34553
+ let _exit = false;
34554
+ function _temp3(_result) {
34555
+ if (_exit) return _result;
34556
+ const _temp = _catch(function () {
34557
+ return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
34558
+ if (res !== null && res !== void 0 && res.data) {
34559
+ var _res$headers, _res$headers2, _res$headers3, _res$headers4;
34560
+ const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
34561
+ type: ((_res$headers = res.headers) === null || _res$headers === void 0 ? void 0 : _res$headers["content-type"]) || ((_res$headers2 = res.headers) === null || _res$headers2 === void 0 ? void 0 : _res$headers2["Content-Type"]) || "image/jpeg"
34562
+ });
34563
+ const fileURL = URL.createObjectURL(blob);
34564
+ setDocFileUrl(fileURL);
34565
+ const contentType = ((_res$headers3 = res.headers) === null || _res$headers3 === void 0 ? void 0 : _res$headers3["content-type"]) || ((_res$headers4 = res.headers) === null || _res$headers4 === void 0 ? void 0 : _res$headers4["Content-Type"]) || "";
34566
+ if (contentType.toLowerCase().includes("pdf")) {
34567
+ setDocFileType("pdf");
34568
+ } else {
34569
+ setDocFileType("image");
34570
+ }
34571
+ setShowDocModal(true);
34572
+ }
34573
+ });
34574
+ }, function (err) {
34575
+ console.error("Failed to fetch file URL via FileFetchbyid", err);
34576
+ });
34577
+ if (_temp && _temp.then) return _temp.then(function () {});
34578
+ }
34579
+ if (!fileStoreId) return Promise.resolve();
34580
+ const _temp2 = _catch(function () {
34581
+ return Promise.resolve(Digit.UploadServices.Filefetch([fileStoreId], (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId())).then(function (response) {
34582
+ var _response$data, _response$data$fileSt, _response$data$fileSt2, _response$data2;
34583
+ let rawUrl = (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$fileSt = _response$data.fileStoreIds) === null || _response$data$fileSt === void 0 ? void 0 : (_response$data$fileSt2 = _response$data$fileSt[0]) === null || _response$data$fileSt2 === void 0 ? void 0 : _response$data$fileSt2.url) || (response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : _response$data2[fileStoreId]) || "";
34584
+ let fileURL = "";
34585
+ if (rawUrl && typeof rawUrl === "string") {
34586
+ const linkList = rawUrl.split(",");
34587
+ linkList.forEach(link => {
34588
+ const trimmed = link ? link.trim() : "";
34589
+ if (trimmed && !trimmed.includes("large") && !trimmed.includes("medium") && !trimmed.includes("small")) {
34590
+ fileURL = trimmed;
34591
+ }
34592
+ });
34593
+ if (!fileURL && linkList[0]) {
34594
+ fileURL = linkList[0].trim();
34595
+ }
34596
+ }
34597
+ if (fileURL) {
34598
+ setDocFileUrl(fileURL);
34599
+ const lowerUrl = fileURL.toLowerCase();
34600
+ if (lowerUrl.includes(".pdf")) {
34601
+ setDocFileType("pdf");
34602
+ } else {
34603
+ setDocFileType("image");
34604
+ }
34605
+ setShowDocModal(true);
34606
+ _exit = true;
34607
+ }
34608
+ });
34609
+ }, function (e) {
34610
+ console.warn("Filefetch failed, falling back to FileFetchbyid", e);
34611
+ });
34612
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
34613
+ } catch (e) {
34614
+ return Promise.reject(e);
34615
+ }
34616
+ };
34105
34617
  const applicationNobyData = window.location.href.includes("SW_") ? window.location.href.substring(window.location.href.indexOf("SW_")) : window.location.href.substring(window.location.href.indexOf("WS_"));
34106
34618
  let filter1 = {
34107
34619
  tenantId: tenantId,
@@ -34242,7 +34754,7 @@ const WSApplicationDetails = () => {
34242
34754
  consumerCodes: data !== null && data !== void 0 && (_data$WaterConnection27 = data.WaterConnection) !== null && _data$WaterConnection27 !== void 0 && _data$WaterConnection27[0] ? data === null || data === void 0 ? void 0 : (_data$WaterConnection28 = data.WaterConnection) === null || _data$WaterConnection28 === void 0 ? void 0 : (_data$WaterConnection29 = _data$WaterConnection28[0]) === null || _data$WaterConnection29 === void 0 ? void 0 : _data$WaterConnection29.applicationNo : data === null || data === void 0 ? void 0 : (_data$SewerageConnect26 = data.SewerageConnections) === null || _data$SewerageConnect26 === void 0 ? void 0 : (_data$SewerageConnect27 = _data$SewerageConnect26[0]) === null || _data$SewerageConnect27 === void 0 ? void 0 : _data$SewerageConnect27.applicationNo
34243
34755
  })).then(function (payments) {
34244
34756
  var _payments$Payments$;
34245
- function _temp2() {
34757
+ function _temp5() {
34246
34758
  return Promise.resolve(Digit.PaymentService.printReciept(state, {
34247
34759
  fileStoreIds: response.filestoreIds[0]
34248
34760
  })).then(function (fileStore) {
@@ -34252,7 +34764,7 @@ const WSApplicationDetails = () => {
34252
34764
  let response = {
34253
34765
  filestoreIds: [(_payments$Payments$ = payments.Payments[0]) === null || _payments$Payments$ === void 0 ? void 0 : _payments$Payments$.fileStoreId]
34254
34766
  };
34255
- const _temp = function (_payments$Payments$2) {
34767
+ const _temp4 = function (_payments$Payments$2) {
34256
34768
  if (!((_payments$Payments$2 = payments.Payments[0]) !== null && _payments$Payments$2 !== void 0 && _payments$Payments$2.fileStoreId)) {
34257
34769
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
34258
34770
  Payments: payments.Payments
@@ -34261,7 +34773,7 @@ const WSApplicationDetails = () => {
34261
34773
  });
34262
34774
  }
34263
34775
  }();
34264
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
34776
+ return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
34265
34777
  });
34266
34778
  } catch (e) {
34267
34779
  return Promise.reject(e);
@@ -34474,22 +34986,28 @@ const WSApplicationDetails = () => {
34474
34986
  }
34475
34987
  }, /*#__PURE__*/React.createElement(Row, {
34476
34988
  label: t("WS_SERVICE_TYPE"),
34477
- text: `${t(checkForNA$1(connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$se = connectionDetails.serviceType) !== null && _connectionDetails$se !== void 0 && _connectionDetails$se.code ? `WS_APPLICATION_TYPE_${connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$se2 = connectionDetails.serviceType) === null || _connectionDetails$se2 === void 0 ? void 0 : _connectionDetails$se2.code}` : connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.serviceType ? `WS_APPLICATION_TYPE_${connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.serviceType}` : applicationData !== null && applicationData !== void 0 && applicationData.applicationType ? `WS_APPLICATION_TYPE_${applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationType}` : "NA"))}`
34989
+ text: `${t(checkForNA$2(connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$se = connectionDetails.serviceType) !== null && _connectionDetails$se !== void 0 && _connectionDetails$se.code ? `WS_APPLICATION_TYPE_${connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$se2 = connectionDetails.serviceType) === null || _connectionDetails$se2 === void 0 ? void 0 : _connectionDetails$se2.code}` : connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.serviceType ? `WS_APPLICATION_TYPE_${connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.serviceType}` : applicationData !== null && applicationData !== void 0 && applicationData.applicationType ? `WS_APPLICATION_TYPE_${applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationType}` : "NA"))}`
34478
34990
  }), /*#__PURE__*/React.createElement(Row, {
34479
34991
  label: t("WS_APPLICANT_TYPE"),
34480
- text: `${t(checkForNA$1((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap = connectionDetails.applicantType) === null || _connectionDetails$ap === void 0 ? void 0 : _connectionDetails$ap.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap2 = connectionDetails.applicantType) === null || _connectionDetails$ap2 === void 0 ? void 0 : _connectionDetails$ap2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.applicantType)))}`
34992
+ text: `${t(checkForNA$2((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap = connectionDetails.applicantType) === null || _connectionDetails$ap === void 0 ? void 0 : _connectionDetails$ap.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap2 = connectionDetails.applicantType) === null || _connectionDetails$ap2 === void 0 ? void 0 : _connectionDetails$ap2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.applicantType)))}`
34993
+ }), /*#__PURE__*/React.createElement(Row, {
34994
+ label: t("WS_Billing_Address_Type"),
34995
+ text: `${t(checkForNA$2((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad = connectionDetails.addressType) === null || _connectionDetails$ad === void 0 ? void 0 : _connectionDetails$ad.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad2 = connectionDetails.addressType) === null || _connectionDetails$ad2 === void 0 ? void 0 : _connectionDetails$ad2.name) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad3 = connectionDetails.addressType) === null || _connectionDetails$ad3 === void 0 ? void 0 : _connectionDetails$ad3.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.addressType)))}`
34996
+ }), /*#__PURE__*/React.createElement(Row, {
34997
+ label: t("Complete Address"),
34998
+ text: `${checkForNA$2((connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.completeAddress) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi2 = applicationData.additionalDetails) === null || _applicationData$addi2 === void 0 ? void 0 : _applicationData$addi2.completeAddress))}`
34481
34999
  }), /*#__PURE__*/React.createElement(Row, {
34482
35000
  label: t("WS_DIVYANGJAN"),
34483
35001
  text: `${connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34484
35002
  }), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
34485
35003
  label: t("WS_DEPARTMENT_TYPE"),
34486
- text: `${t(checkForNA$1((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$de = connectionDetails.departmentType) === null || _connectionDetails$de === void 0 ? void 0 : _connectionDetails$de.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$de2 = connectionDetails.departmentType) === null || _connectionDetails$de2 === void 0 ? void 0 : _connectionDetails$de2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.departmentType)))}`
35004
+ text: `${t(checkForNA$2((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$de = connectionDetails.departmentType) === null || _connectionDetails$de === void 0 ? void 0 : _connectionDetails$de.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$de2 = connectionDetails.departmentType) === null || _connectionDetails$de2 === void 0 ? void 0 : _connectionDetails$de2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.departmentType)))}`
34487
35005
  }), /*#__PURE__*/React.createElement(Row, {
34488
35006
  label: t("WS_ORGANIZATION_DEPARTMENT_NAME"),
34489
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
35007
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
34490
35008
  }), /*#__PURE__*/React.createElement(Row, {
34491
35009
  label: t("WS_NATURE_OF_WORK"),
34492
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
35010
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
34493
35011
  }))), (data === null || data === void 0 ? void 0 : (_data$WaterConnection79 = data.WaterConnection) === null || _data$WaterConnection79 === void 0 ? void 0 : (_data$WaterConnection80 = _data$WaterConnection79[0]) === null || _data$WaterConnection80 === void 0 ? void 0 : (_data$WaterConnection81 = _data$WaterConnection80.connectionHolders) === null || _data$WaterConnection81 === void 0 ? void 0 : _data$WaterConnection81.length) > 0 || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect74 = data.SewerageConnections) === null || _data$SewerageConnect74 === void 0 ? void 0 : (_data$SewerageConnect75 = _data$SewerageConnect74[0]) === null || _data$SewerageConnect75 === void 0 ? void 0 : (_data$SewerageConnect76 = _data$SewerageConnect75.connectionHolders) === null || _data$SewerageConnect76 === void 0 ? void 0 : _data$SewerageConnect76.length) > 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, {
34494
35012
  styles: {
34495
35013
  fontSize: "28px"
@@ -34642,58 +35160,58 @@ const WSApplicationDetails = () => {
34642
35160
  }
34643
35161
  }, /*#__PURE__*/React.createElement(Row, {
34644
35162
  label: t("CORE_COMMON_PROFILE_CITY"),
34645
- text: `${t(checkForNA$1(((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city = propertyAddress.city) === null || _propertyAddress$city === void 0 ? void 0 : _propertyAddress$city.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city2 = propertyAddress.city) === null || _propertyAddress$city2 === void 0 ? void 0 : _propertyAddress$city2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)) === "dl.djb" ? "Delhi" : (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city3 = propertyAddress.city) === null || _propertyAddress$city3 === void 0 ? void 0 : _propertyAddress$city3.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city4 = propertyAddress.city) === null || _propertyAddress$city4 === void 0 ? void 0 : _propertyAddress$city4.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)))}`
35163
+ text: `${t(checkForNA$2(((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city = propertyAddress.city) === null || _propertyAddress$city === void 0 ? void 0 : _propertyAddress$city.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city2 = propertyAddress.city) === null || _propertyAddress$city2 === void 0 ? void 0 : _propertyAddress$city2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)) === "dl.djb" ? "Delhi" : (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city3 = propertyAddress.city) === null || _propertyAddress$city3 === void 0 ? void 0 : _propertyAddress$city3.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city4 = propertyAddress.city) === null || _propertyAddress$city4 === void 0 ? void 0 : _propertyAddress$city4.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)))}`
34646
35164
  }), /*#__PURE__*/React.createElement(Row, {
34647
35165
  label: t("PINCODE"),
34648
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
35166
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
34649
35167
  }), /*#__PURE__*/React.createElement(Row, {
34650
35168
  label: t("LOCALITY"),
34651
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca = propertyAddress.locality) === null || _propertyAddress$loca === void 0 ? void 0 : _propertyAddress$loca.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca2 = propertyAddress.locality) === null || _propertyAddress$loca2 === void 0 ? void 0 : _propertyAddress$loca2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.locality)))}`
35169
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca = propertyAddress.locality) === null || _propertyAddress$loca === void 0 ? void 0 : _propertyAddress$loca.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$loca2 = propertyAddress.locality) === null || _propertyAddress$loca2 === void 0 ? void 0 : _propertyAddress$loca2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.locality)))}`
34652
35170
  }), /*#__PURE__*/React.createElement(Row, {
34653
35171
  label: t("SubLocality"),
34654
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$subL = propertyAddress.subLocality) === null || _propertyAddress$subL === void 0 ? void 0 : _propertyAddress$subL.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$subL2 = propertyAddress.subLocality) === null || _propertyAddress$subL2 === void 0 ? void 0 : _propertyAddress$subL2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.subLocality)))}`
35172
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$subL = propertyAddress.subLocality) === null || _propertyAddress$subL === void 0 ? void 0 : _propertyAddress$subL.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$subL2 = propertyAddress.subLocality) === null || _propertyAddress$subL2 === void 0 ? void 0 : _propertyAddress$subL2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.subLocality)))}`
34655
35173
  }), /*#__PURE__*/React.createElement(Row, {
34656
35174
  label: t("COMMON_COLONY_MCD_CATEGORY"),
34657
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
35175
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
34658
35176
  }), /*#__PURE__*/React.createElement(Row, {
34659
35177
  label: t("STREET_NAME"),
34660
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.streetName) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
35178
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.streetName) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34661
35179
  }), /*#__PURE__*/React.createElement(Row, {
34662
35180
  label: t("ADDRESS_LINE1"),
34663
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine1) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
35181
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine1) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34664
35182
  }), /*#__PURE__*/React.createElement(Row, {
34665
35183
  label: t("ADDRESS_LINE2"),
34666
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
35184
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
34667
35185
  }), /*#__PURE__*/React.createElement(Row, {
34668
35186
  label: t("HOUSE_NO"),
34669
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.houseNo) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.doorNo)))}`
35187
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.houseNo) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.doorNo)))}`
34670
35188
  }), /*#__PURE__*/React.createElement(Row, {
34671
35189
  label: t("LATITUDE_GEOTAG"),
34672
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
35190
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
34673
35191
  }), /*#__PURE__*/React.createElement(Row, {
34674
35192
  label: t("LONGITUDE_GEOTAG"),
34675
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
35193
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
34676
35194
  }), /*#__PURE__*/React.createElement(Row, {
34677
35195
  label: t("COMMON_ASSEMBLY"),
34678
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse = propertyAddress.assembly) === null || _propertyAddress$asse === void 0 ? void 0 : _propertyAddress$asse.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse2 = propertyAddress.assembly) === null || _propertyAddress$asse2 === void 0 ? void 0 : _propertyAddress$asse2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
35196
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse = propertyAddress.assembly) === null || _propertyAddress$asse === void 0 ? void 0 : _propertyAddress$asse.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse2 = propertyAddress.assembly) === null || _propertyAddress$asse2 === void 0 ? void 0 : _propertyAddress$asse2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
34679
35197
  }), /*#__PURE__*/React.createElement(Row, {
34680
35198
  label: t("COMMON_WARD"),
34681
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc = propertyAddress.block) === null || _propertyAddress$bloc === void 0 ? void 0 : _propertyAddress$bloc.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc2 = propertyAddress.block) === null || _propertyAddress$bloc2 === void 0 ? void 0 : _propertyAddress$bloc2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.block) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward = propertyAddress.ward) === null || _propertyAddress$ward === void 0 ? void 0 : _propertyAddress$ward.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward2 = propertyAddress.ward) === null || _propertyAddress$ward2 === void 0 ? void 0 : _propertyAddress$ward2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
35199
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc = propertyAddress.block) === null || _propertyAddress$bloc === void 0 ? void 0 : _propertyAddress$bloc.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc2 = propertyAddress.block) === null || _propertyAddress$bloc2 === void 0 ? void 0 : _propertyAddress$bloc2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.block) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward = propertyAddress.ward) === null || _propertyAddress$ward === void 0 ? void 0 : _propertyAddress$ward.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward2 = propertyAddress.ward) === null || _propertyAddress$ward2 === void 0 ? void 0 : _propertyAddress$ward2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
34682
35200
  }), /*#__PURE__*/React.createElement(Row, {
34683
35201
  label: t("COMMON_ZONE"),
34684
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone = propertyAddress.zone) === null || _propertyAddress$zone === void 0 ? void 0 : _propertyAddress$zone.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone2 = propertyAddress.zone) === null || _propertyAddress$zone2 === void 0 ? void 0 : _propertyAddress$zone2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
35202
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone = propertyAddress.zone) === null || _propertyAddress$zone === void 0 ? void 0 : _propertyAddress$zone.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone2 = propertyAddress.zone) === null || _propertyAddress$zone2 === void 0 ? void 0 : _propertyAddress$zone2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
34685
35203
  }), /*#__PURE__*/React.createElement(Row, {
34686
35204
  label: t("COMMON_CURRENT_ASSEMBLY"),
34687
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
35205
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
34688
35206
  }), /*#__PURE__*/React.createElement(Row, {
34689
35207
  label: t("COMMON_CURRENT_WARD"),
34690
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
35208
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
34691
35209
  }), /*#__PURE__*/React.createElement(Row, {
34692
35210
  label: t("COMMON_CURRENT_ZONE"),
34693
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone3 = propertyAddress.zone) === null || _propertyAddress$zone3 === void 0 ? void 0 : _propertyAddress$zone3.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone4 = propertyAddress.zone) === null || _propertyAddress$zone4 === void 0 ? void 0 : _propertyAddress$zone4.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
35211
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone3 = propertyAddress.zone) === null || _propertyAddress$zone3 === void 0 ? void 0 : _propertyAddress$zone3.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone4 = propertyAddress.zone) === null || _propertyAddress$zone4 === void 0 ? void 0 : _propertyAddress$zone4.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
34694
35212
  }), /*#__PURE__*/React.createElement(Row, {
34695
35213
  label: t("LANDMARK"),
34696
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
35214
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
34697
35215
  })), /*#__PURE__*/React.createElement(CardHeader, {
34698
35216
  styles: {
34699
35217
  fontSize: "28px"
@@ -34705,35 +35223,46 @@ const WSApplicationDetails = () => {
34705
35223
  }
34706
35224
  }, /*#__PURE__*/React.createElement(Row, {
34707
35225
  label: t("WS_CATEGORY_TYPE"),
34708
- text: `${t(checkForNA$1((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)))}`
35226
+ 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)))}`
34709
35227
  }), /*#__PURE__*/React.createElement(Row, {
34710
35228
  label: t("WS_PROPERTY_CATEGORY"),
34711
- text: `${t(checkForNA$1((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$Properties9 = PTData.Properties) === null || _PTData$Properties9 === void 0 ? void 0 : (_PTData$Properties9$ = _PTData$Properties9[0]) === null || _PTData$Properties9$ === void 0 ? void 0 : _PTData$Properties9$.usageCategory)))}`
35229
+ 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$Properties9 = PTData.Properties) === null || _PTData$Properties9 === void 0 ? void 0 : (_PTData$Properties9$ = _PTData$Properties9[0]) === null || _PTData$Properties9$ === void 0 ? void 0 : _PTData$Properties9$.usageCategory)))}`
34712
35230
  }), /*#__PURE__*/React.createElement(Row, {
34713
35231
  label: t("WS_PROPERTY_TYPE"),
34714
- text: `${t(checkForNA$1((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$Properties0 = PTData.Properties) === null || _PTData$Properties0 === void 0 ? void 0 : (_PTData$Properties0$ = _PTData$Properties0[0]) === null || _PTData$Properties0$ === void 0 ? void 0 : _PTData$Properties0$.propertyType)))}`
35232
+ 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$Properties0 = PTData.Properties) === null || _PTData$Properties0 === void 0 ? void 0 : (_PTData$Properties0$ = _PTData$Properties0[0]) === null || _PTData$Properties0$ === void 0 ? void 0 : _PTData$Properties0$.propertyType)))}`
34715
35233
  }), /*#__PURE__*/React.createElement(Row, {
34716
35234
  label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
34717
- text: `${t(checkForNA$1((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) || (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) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe5 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe5 === void 0 ? void 0 : _propertyAdditionalDe5.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe6 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe6 === void 0 ? void 0 : _propertyAdditionalDe6.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.waterConnectionUsageType)))}`
35235
+ text: `${t(checkForNA$2((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) || (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) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe5 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe5 === void 0 ? void 0 : _propertyAdditionalDe5.name) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : (_propertyAdditionalDe6 = propertyAdditionalDetails.waterConnectionUsageType) === null || _propertyAdditionalDe6 === void 0 ? void 0 : _propertyAdditionalDe6.code) || (propertyAdditionalDetails === null || propertyAdditionalDetails === void 0 ? void 0 : propertyAdditionalDetails.waterConnectionUsageType)))}`
34718
35236
  }), /*#__PURE__*/React.createElement(Row, {
34719
35237
  label: t("WS_NUMBER_OF_FLOORS"),
34720
- text: `${t(checkForNA$1((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$Properties1 = PTData.Properties) === null || _PTData$Properties1 === void 0 ? void 0 : (_PTData$Properties1$ = _PTData$Properties1[0]) === null || _PTData$Properties1$ === void 0 ? void 0 : _PTData$Properties1$.noOfFloors)))}`
35238
+ text: `${t(checkForNA$2((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$Properties1 = PTData.Properties) === null || _PTData$Properties1 === void 0 ? void 0 : (_PTData$Properties1$ = _PTData$Properties1[0]) === null || _PTData$Properties1$ === void 0 ? void 0 : _PTData$Properties1$.noOfFloors)))}`
34721
35239
  }), /*#__PURE__*/React.createElement(Row, {
34722
35240
  label: t("WS_PLOT_AREA"),
34723
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
35241
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
34724
35242
  }), /*#__PURE__*/React.createElement(Row, {
34725
35243
  label: t("WS_BUILT_UP_AREA"),
34726
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
35244
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
34727
35245
  }), /*#__PURE__*/React.createElement(Row, {
34728
35246
  label: t("WS_HEIGHT_OF_THE_BUILDING"),
34729
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
35247
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
34730
35248
  }), /*#__PURE__*/React.createElement(Row, {
34731
35249
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
34732
- text: `${t(checkForNA$1((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)))}`
34733
- }), ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse", "BuiltUp.GroupHousingSociety", "BuiltUp.JJSLUMS", "BuiltUp.IndividualHouse"].includes((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)) ? /*#__PURE__*/React.createElement(Row, {
35250
+ 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)))}`
35251
+ }), 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$addi3 = applicationData.additionalDetails) === null || _applicationData$addi3 === void 0 ? void 0 : (_applicationData$addi4 = _applicationData$addi3.propertyCategory) === null || _applicationData$addi4 === void 0 ? void 0 : _applicationData$addi4.code) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi5 = applicationData.additionalDetails) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop = applicationData.property) === null || _applicationData$prop === void 0 ? void 0 : (_applicationData$prop2 = _applicationData$prop.propertyType) === null || _applicationData$prop2 === void 0 ? void 0 : _applicationData$prop2.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop3 = applicationData.property) === null || _applicationData$prop3 === void 0 ? void 0 : _applicationData$prop3.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
34734
35252
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
34735
- text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
34736
- }) : null), /*#__PURE__*/React.createElement(CardHeader, {
35253
+ text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
35254
+ }) : 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$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi7 = applicationData.additionalDetails) === null || _applicationData$addi7 === void 0 ? void 0 : _applicationData$addi7.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop4 = applicationData.property) === null || _applicationData$prop4 === void 0 ? void 0 : (_applicationData$prop5 = _applicationData$prop4.additionalDetails) === null || _applicationData$prop5 === void 0 ? void 0 : _applicationData$prop5.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$addi8 = applicationData.additionalDetails) === null || _applicationData$addi8 === void 0 ? void 0 : _applicationData$addi8.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi9 = applicationData.additionalDetails) === null || _applicationData$addi9 === void 0 ? void 0 : _applicationData$addi9.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop6 = applicationData.property) === null || _applicationData$prop6 === void 0 ? void 0 : (_applicationData$prop7 = _applicationData$prop6.additionalDetails) === null || _applicationData$prop7 === void 0 ? void 0 : _applicationData$prop7.questions) : []).map((q, idx) => {
35255
+ var _q$answer, _q$answer2, _q$answer3;
35256
+ 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}`;
35257
+ 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;
35258
+ const trimmedQ = String(qText || "").trim();
35259
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
35260
+ return /*#__PURE__*/React.createElement(Row, {
35261
+ key: `question_${idx}`,
35262
+ label: displayLabel,
35263
+ text: `${t(checkForNA$2(aText))}`
35264
+ });
35265
+ })), /*#__PURE__*/React.createElement(CardHeader, {
34737
35266
  styles: {
34738
35267
  fontSize: "28px"
34739
35268
  }
@@ -34747,10 +35276,10 @@ const WSApplicationDetails = () => {
34747
35276
  text: `${djbEmployee !== null && djbEmployee !== void 0 && djbEmployee.isDjbEmployee ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34748
35277
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.isDjbEmployee) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
34749
35278
  label: t("WS_EMPLOYEE_ID"),
34750
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
35279
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
34751
35280
  }), /*#__PURE__*/React.createElement(Row, {
34752
35281
  label: t("WS_EMPLOYEE_DESIGNATION"),
34753
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
35282
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
34754
35283
  }), !isDisconnectionExecuted && (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
34755
35284
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
34756
35285
  text: /*#__PURE__*/React.createElement("span", {
@@ -34761,7 +35290,7 @@ const WSApplicationDetails = () => {
34761
35290
  cursor: "pointer",
34762
35291
  color: "#f47738"
34763
35292
  },
34764
- onClick: () => getFiles([djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document], tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])
35293
+ onClick: () => handleViewEmployeeDoc(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
34765
35294
  }, /*#__PURE__*/React.createElement(GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
34766
35295
  }))), (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$dueV = applicationData.dueVerification) === null || _applicationData$dueV === void 0 ? void 0 : _applicationData$dueV.length) > 0 && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, {
34767
35296
  styles: {
@@ -34829,27 +35358,27 @@ const WSApplicationDetails = () => {
34829
35358
  style: {
34830
35359
  padding: "12px 8px"
34831
35360
  }
34832
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React.createElement("td", {
35361
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React.createElement("td", {
34833
35362
  style: {
34834
35363
  padding: "12px 8px"
34835
35364
  }
34836
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React.createElement("td", {
35365
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React.createElement("td", {
34837
35366
  style: {
34838
35367
  padding: "12px 8px"
34839
35368
  }
34840
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React.createElement("td", {
35369
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React.createElement("td", {
34841
35370
  style: {
34842
35371
  padding: "12px 8px"
34843
35372
  }
34844
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React.createElement("td", {
35373
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React.createElement("td", {
34845
35374
  style: {
34846
35375
  padding: "12px 8px"
34847
35376
  }
34848
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React.createElement("td", {
35377
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React.createElement("td", {
34849
35378
  style: {
34850
35379
  padding: "12px 8px"
34851
35380
  }
34852
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React.createElement("td", {
35381
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React.createElement("td", {
34853
35382
  style: {
34854
35383
  padding: "12px 8px"
34855
35384
  }
@@ -35025,7 +35554,59 @@ const WSApplicationDetails = () => {
35025
35554
  }
35026
35555
  }, /*#__PURE__*/React.createElement(SubmitBar, {
35027
35556
  label: t("WS_ACTIVATE_CONNECTION")
35028
- })) : null)))));
35557
+ })) : null)))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
35558
+ open: showDocModal,
35559
+ headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
35560
+ headerBarEnd: /*#__PURE__*/React.createElement("div", {
35561
+ onClick: () => setShowDocModal(false),
35562
+ style: {
35563
+ cursor: "pointer",
35564
+ padding: "5px"
35565
+ }
35566
+ }, /*#__PURE__*/React.createElement("svg", {
35567
+ xmlns: "http://www.w3.org/2000/svg",
35568
+ viewBox: "0 0 24 24",
35569
+ fill: "#505A5F",
35570
+ width: "24",
35571
+ height: "24"
35572
+ }, /*#__PURE__*/React.createElement("path", {
35573
+ d: "M0 0h24v24H0V0z",
35574
+ fill: "none"
35575
+ }), /*#__PURE__*/React.createElement("path", {
35576
+ d: "M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
35577
+ }))),
35578
+ actionCancelOnSubmit: () => setShowDocModal(false),
35579
+ actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
35580
+ actionSaveOnSubmit: () => window.open(docFileUrl, "_blank"),
35581
+ actionSaveLabel: t("CS_COMMON_OPEN_IN_NEW_TAB") || "Open Full",
35582
+ hideSubmit: !docFileUrl,
35583
+ width: "800px"
35584
+ }, /*#__PURE__*/React.createElement("div", {
35585
+ style: {
35586
+ display: "flex",
35587
+ justifyContent: "center",
35588
+ alignItems: "center",
35589
+ padding: "20px",
35590
+ minHeight: "300px"
35591
+ }
35592
+ }, docFileType === "pdf" ? /*#__PURE__*/React.createElement("iframe", {
35593
+ src: docFileUrl,
35594
+ title: "Document Preview",
35595
+ width: "100%",
35596
+ height: "500px",
35597
+ style: {
35598
+ border: "none"
35599
+ }
35600
+ }) : /*#__PURE__*/React.createElement("img", {
35601
+ src: docFileUrl,
35602
+ alt: "Document Preview",
35603
+ style: {
35604
+ maxWidth: "100%",
35605
+ maxHeight: "500px",
35606
+ objectFit: "contain",
35607
+ borderRadius: "4px"
35608
+ }
35609
+ }))));
35029
35610
  };
35030
35611
 
35031
35612
  const WSAdditionalDetails = () => {
@@ -35388,7 +35969,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
35388
35969
  };
35389
35970
 
35390
35971
  const ConnectionDetails$5 = () => {
35391
- var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state41, _state42, _state43, _state44, _state44$connectionHo, _state44$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect48, _data$SewerageConnect49, _data$SewerageConnect50, _data$SewerageConnect51, _state45, _state46, _state49, _state49$status, _state50, _state50$applicationS, _state51, _paymentDetails$data17, _paymentDetails$data18;
35972
+ var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state39$additionalDe2, _state40, _state40$additionalDe, _state40$additionalDe2, _state41, _state41$additionalDe, _state42, _state42$additionalDe, _state43, _state43$additionalDe, _state44, _state44$additionalDe, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state49, _state50, _state51, _state51$connectionHo, _state51$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect48, _data$SewerageConnect49, _data$SewerageConnect50, _data$SewerageConnect51, _state52, _state53, _state56, _state56$status, _state57, _state57$applicationS, _state58, _paymentDetails$data17, _paymentDetails$data18;
35392
35973
  const {
35393
35974
  t
35394
35975
  } = useTranslation();
@@ -35606,8 +36187,6 @@ const ConnectionDetails$5 = () => {
35606
36187
  }
35607
36188
  };
35608
36189
  const getRestorationButton = () => {
35609
- console.log("getRestorationButton", data, !(data !== null && data !== void 0 && data.checkWorkFlow));
35610
- console.log("Payment", paymentDetails);
35611
36190
  if (!(data !== null && data !== void 0 && data.checkWorkFlow)) {
35612
36191
  setshowActionToast({
35613
36192
  key: "error",
@@ -35619,7 +36198,6 @@ const ConnectionDetails$5 = () => {
35619
36198
  } else {
35620
36199
  var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
35621
36200
  if ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data8 = paymentDetails.data) === null || _paymentDetails$data8 === void 0 ? void 0 : (_paymentDetails$data9 = _paymentDetails$data8.Bill) === null || _paymentDetails$data9 === void 0 ? void 0 : _paymentDetails$data9.length) === 0) {
35622
- console.log("Payment", paymentDetails);
35623
36201
  let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
35624
36202
  Digit.SessionStorage.set("WS_DISCONNECTION", {
35625
36203
  ...state,
@@ -35913,16 +36491,28 @@ const ConnectionDetails$5 = () => {
35913
36491
  className: "border-none",
35914
36492
  label: t("WS_NO_OF_FLOORS"),
35915
36493
  text: ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$additionalDe = _state38.additionalDetails) === null || _state38$additionalDe === void 0 ? void 0 : _state38$additionalDe.noOfFloors) || "NA"
35916
- }), /*#__PURE__*/React.createElement(Row, {
36494
+ }), String(((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : (_state39$additionalDe2 = _state39$additionalDe.propertyCategory) === null || _state39$additionalDe2 === void 0 ? void 0 : _state39$additionalDe2.code) || ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$additionalDe = _state40.additionalDetails) === null || _state40$additionalDe === void 0 ? void 0 : (_state40$additionalDe2 = _state40$additionalDe.propertyCategory) === null || _state40$additionalDe2 === void 0 ? void 0 : _state40$additionalDe2.name) || ((_state41 = state) === null || _state41 === void 0 ? void 0 : (_state41$additionalDe = _state41.additionalDetails) === null || _state41$additionalDe === void 0 ? void 0 : _state41$additionalDe.propertyCategory) || "").toUpperCase().includes("RESIDENTIAL") && /*#__PURE__*/React.createElement(Row, {
35917
36495
  className: "border-none",
35918
36496
  label: t("WS_NO_OF_DWELLING_UNITS"),
35919
- text: ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : _state39$additionalDe.NumberofDwellingUnits) || "NA"
36497
+ text: ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$additionalDe = _state42.additionalDetails) === null || _state42$additionalDe === void 0 ? void 0 : _state42$additionalDe.NumberofDwellingUnits) || "NA"
35920
36498
  }), /*#__PURE__*/React.createElement(Row, {
35921
36499
  className: "border-none",
35922
36500
  label: t("WS_LOCALITY"),
35923
- text: ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$additionalDe = _state40.additionalDetails) === null || _state40$additionalDe === void 0 ? void 0 : _state40$additionalDe.locality) || "NA"
36501
+ text: ((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : _state43$additionalDe.locality) || "NA"
36502
+ }), (Array.isArray(((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$additionalDe = _state44.additionalDetails) === null || _state44$additionalDe === void 0 ? void 0 : _state44$additionalDe.questions) || ((_state45 = state) === null || _state45 === void 0 ? void 0 : (_state45$additionalDe = _state45.additionalDetails) === null || _state45$additionalDe === void 0 ? void 0 : _state45$additionalDe.questionAnswers)) ? ((_state46 = state) === null || _state46 === void 0 ? void 0 : (_state46$additionalDe = _state46.additionalDetails) === null || _state46$additionalDe === void 0 ? void 0 : _state46$additionalDe.questions) || ((_state47 = state) === null || _state47 === void 0 ? void 0 : (_state47$additionalDe = _state47.additionalDetails) === null || _state47$additionalDe === void 0 ? void 0 : _state47$additionalDe.questionAnswers) : []).map((q, idx) => {
36503
+ var _q$answer, _q$answer2, _q$answer3;
36504
+ 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}`;
36505
+ 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;
36506
+ const trimmedQ = String(qText || "").trim();
36507
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
36508
+ return /*#__PURE__*/React.createElement(Row, {
36509
+ key: `question_${idx}`,
36510
+ className: "border-none",
36511
+ label: displayLabel,
36512
+ text: `${t(checkForNA(aText))}`
36513
+ });
35924
36514
  }), /*#__PURE__*/React.createElement(Link, {
35925
- to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(_state41 = state) === null || _state41 === void 0 ? void 0 : _state41.propertyId}&tenantId=${(_state42 = state) === null || _state42 === void 0 ? void 0 : _state42.tenantId}`
36515
+ to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(_state48 = state) === null || _state48 === void 0 ? void 0 : _state48.propertyId}&tenantId=${(_state49 = state) === null || _state49 === void 0 ? void 0 : _state49.tenantId}`
35926
36516
  }, /*#__PURE__*/React.createElement(LinkButton, {
35927
36517
  style: {
35928
36518
  textAlign: "left",
@@ -35934,10 +36524,10 @@ const ConnectionDetails$5 = () => {
35934
36524
  styles: {
35935
36525
  fontSize: "28px"
35936
36526
  }
35937
- }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state43 = state) !== null && _state43 !== void 0 && _state43.connectionHolders ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
36527
+ }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state50 = state) !== null && _state50 !== void 0 && _state50.connectionHolders ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
35938
36528
  className: "border-none",
35939
36529
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
35940
- text: (_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$connectionHo = _state44.connectionHolders) === null || _state44$connectionHo === void 0 ? void 0 : (_state44$connectionHo2 = _state44$connectionHo[0]) === null || _state44$connectionHo2 === void 0 ? void 0 : _state44$connectionHo2.name,
36530
+ text: (_state51 = state) === null || _state51 === void 0 ? void 0 : (_state51$connectionHo = _state51.connectionHolders) === null || _state51$connectionHo === void 0 ? void 0 : (_state51$connectionHo2 = _state51$connectionHo[0]) === null || _state51$connectionHo2 === void 0 ? void 0 : _state51$connectionHo2.name,
35941
36531
  textStyle: {
35942
36532
  whiteSpace: "pre"
35943
36533
  }
@@ -36056,15 +36646,15 @@ const ConnectionDetails$5 = () => {
36056
36646
  isArray: false
36057
36647
  }
36058
36648
  }
36059
- }))) : /*#__PURE__*/React.createElement(CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((_state45 = state) === null || _state45 === void 0 ? void 0 : _state45.documents) && ((_state46 = state) === null || _state46 === void 0 ? void 0 : _state46.documents.map((doc, index) => {
36060
- var _doc$documentType, _state47, _state48;
36649
+ }))) : /*#__PURE__*/React.createElement(CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.documents) && ((_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.documents.map((doc, index) => {
36650
+ var _doc$documentType, _state54, _state55;
36061
36651
  return /*#__PURE__*/React.createElement("div", {
36062
36652
  key: `doc-${index}`
36063
36653
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split(".").slice(0, 2).join("_"))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(WSDocument, {
36064
- value: (_state47 = state) === null || _state47 === void 0 ? void 0 : _state47.documents,
36654
+ value: (_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.documents,
36065
36655
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
36066
36656
  index: index
36067
- }), ((_state48 = state) === null || _state48 === void 0 ? void 0 : _state48.documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
36657
+ }), ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
36068
36658
  style: {
36069
36659
  color: "#cccccc",
36070
36660
  backgroundColor: "#cccccc",
@@ -36073,7 +36663,7 @@ const ConnectionDetails$5 = () => {
36073
36663
  marginBottom: "20px"
36074
36664
  }
36075
36665
  }) : null)));
36076
- })), ((_state49 = state) === null || _state49 === void 0 ? void 0 : (_state49$status = _state49.status) === null || _state49$status === void 0 ? void 0 : _state49$status.toLowerCase()) === "inactive" || ((_state50 = state) === null || _state50 === void 0 ? void 0 : (_state50$applicationS = _state50.applicationStatus) === null || _state50$applicationS === void 0 ? void 0 : _state50$applicationS.toLowerCase()) === "inactive" || ((_state51 = state) === null || _state51 === void 0 ? void 0 : _state51.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React.createElement("div", {
36666
+ })), ((_state56 = state) === null || _state56 === void 0 ? void 0 : (_state56$status = _state56.status) === null || _state56$status === void 0 ? void 0 : _state56$status.toLowerCase()) === "inactive" || ((_state57 = state) === null || _state57 === void 0 ? void 0 : (_state57$applicationS = _state57.applicationStatus) === null || _state57$applicationS === void 0 ? void 0 : _state57$applicationS.toLowerCase()) === "inactive" || ((_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React.createElement("div", {
36077
36667
  style: {
36078
36668
  display: "flex",
36079
36669
  justifyContent: "flex-end",
@@ -36106,8 +36696,8 @@ const ConnectionDetails$5 = () => {
36106
36696
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
36107
36697
  hideSubmit: true,
36108
36698
  actionSingleSubmit: () => {
36109
- var _state52, _state53;
36110
- history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.connectionNo)}/${tenantId}?consumerCode=${(_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
36699
+ var _state59, _state60;
36700
+ history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.connectionNo)}/${tenantId}?consumerCode=${(_state60 = state) === null || _state60 === void 0 ? void 0 : _state60.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
36111
36701
  setshowModal(false);
36112
36702
  },
36113
36703
  popupStyles: mobileView ? {
@@ -36988,7 +37578,7 @@ const getPath$3 = (path, params) => {
36988
37578
  };
36989
37579
  const getEditDetails = (waterResult, sewerageresult, t) => {
36990
37580
  if (waterResult) {
36991
- var _waterResult$connecti, _waterResult$connecti2, _waterResult$connecti3, _waterResult$connecti4, _waterResult$connecti5, _waterResult$connecti6, _waterResult$connecti7, _waterResult$connecti8, _waterResult$connecti9, _waterResult$connecti0, _waterResult$connecti1, _waterResult$connecti10, _waterResult$connecti11, _waterResult$connecti12, _waterResult$connecti13, _waterResult$connecti14, _waterResult$connecti15, _waterResult$connecti16, _waterResult$connecti17, _waterResult$connecti18, _waterResult$connecti19, _waterResult$connecti20, _waterResult$connecti21, _waterResult$connecti22, _waterResult$connecti23, _waterResult$connecti24, _waterResult$connecti25, _waterResult$connecti26, _waterResult$connecti27, _waterResult$connecti28, _waterResult$connecti29, _waterResult$connecti30, _waterResult$connecti31, _waterResult$connecti32, _waterResult$property, _waterResult$property2, _waterResult$property3, _waterResult$property4, _waterResult$property5, _waterResult$property6, _waterResult$property7, _waterResult$property8, _waterResult$property9, _waterResult$property0, _waterResult$property1, _waterResult$property10, _waterResult$property11, _waterResult$property12, _waterResult$property13, _waterResult$property14, _waterResult$property15, _waterResult$property16, _waterResult$property17, _waterResult$property18, _waterResult$property19, _waterResult$property20, _waterResult$property21, _waterResult$property22, _waterResult$property23, _waterResult$property24, _waterResult$property25, _waterResult$property26, _waterResult$property27, _waterResult$property28, _waterResult$connecti33, _waterResult$connecti34, _waterResult$connecti35, _waterResult$connecti36, _waterResult$connecti37, _waterResult$connecti38, _waterResult$applicat, _waterResult$addition, _waterResult$addition2, _waterResult$addition3, _waterResult$addition4, _waterResult$addition5, _waterResult$addition6, _waterResult$addition7, _waterResult$addition8, _waterResult$addition9, _waterResult$addition0, _waterResult$addition1, _waterResult$addition10, _waterResult$addition11, _waterResult$addition12, _waterResult$addition13, _waterResult$addition14, _waterResult$addition15, _waterResult$addition16, _waterResult$addition17, _waterResult$addition18, _waterResult$addition19, _waterResult$addition20, _waterResult$addition21, _waterResult$addition22, _waterResult$addition23, _waterResult$addition24;
37581
+ var _waterResult$connecti, _waterResult$connecti2, _waterResult$connecti3, _waterResult$connecti4, _waterResult$connecti5, _waterResult$connecti6, _waterResult$connecti7, _waterResult$connecti8, _waterResult$connecti9, _waterResult$connecti0, _waterResult$connecti1, _waterResult$connecti10, _waterResult$connecti11, _waterResult$connecti12, _waterResult$connecti13, _waterResult$connecti14, _waterResult$connecti15, _waterResult$connecti16, _waterResult$connecti17, _waterResult$connecti18, _waterResult$connecti19, _waterResult$connecti20, _waterResult$connecti21, _waterResult$connecti22, _waterResult$connecti23, _waterResult$connecti24, _waterResult$connecti25, _waterResult$connecti26, _waterResult$connecti27, _waterResult$connecti28, _waterResult$connecti29, _waterResult$connecti30, _waterResult$connecti31, _waterResult$connecti32, _waterResult$property, _waterResult$property2, _waterResult$property3, _waterResult$property4, _waterResult$property5, _waterResult$property6, _waterResult$property7, _waterResult$property8, _waterResult$property9, _waterResult$property0, _waterResult$property1, _waterResult$property10, _waterResult$property11, _waterResult$property12, _waterResult$property13, _waterResult$property14, _waterResult$property15, _waterResult$property16, _waterResult$property17, _waterResult$property18, _waterResult$property19, _waterResult$property20, _waterResult$property21, _waterResult$property22, _waterResult$property23, _waterResult$property24, _waterResult$property25, _waterResult$property26, _waterResult$property27, _waterResult$property28, _waterResult$connecti33, _waterResult$connecti34, _waterResult$connecti35, _waterResult$connecti36, _waterResult$connecti37, _waterResult$connecti38, _waterResult$applicat, _waterResult$addition, _waterResult$Connecti, _waterResult$Connecti2, _waterResult$addition2, _waterResult$Connecti3, _waterResult$Connecti4, _waterResult$addition3, _waterResult$addition4, _waterResult$addition5, _waterResult$addition6, _waterResult$addition7, _waterResult$addition8, _waterResult$addition9, _waterResult$addition0, _waterResult$addition1, _waterResult$addition10, _waterResult$addition11, _waterResult$addition12, _waterResult$addition13, _waterResult$addition14, _waterResult$addition15, _waterResult$addition16, _waterResult$addition17, _waterResult$addition18, _waterResult$addition19, _waterResult$addition20, _waterResult$addition21, _waterResult$addition22, _waterResult$addition23, _waterResult$addition24, _waterResult$addition25, _waterResult$addition26;
36992
37582
  waterResult.ConnectionHolderDetails = waterResult !== null && waterResult !== void 0 && waterResult.connectionHolders ? [{
36993
37583
  ...(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$connecti = waterResult.connectionHolders) === null || _waterResult$connecti === void 0 ? void 0 : _waterResult$connecti[0]),
36994
37584
  address: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$connecti2 = waterResult.connectionHolders) === null || _waterResult$connecti2 === void 0 ? void 0 : (_waterResult$connecti3 = _waterResult$connecti2[0]) === null || _waterResult$connecti3 === void 0 ? void 0 : _waterResult$connecti3.correspondenceAddress,
@@ -37071,6 +37661,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37071
37661
  },
37072
37662
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37073
37663
  };
37664
+ const rawAddressType = (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.addressType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$Connecti = waterResult.ConnectionDetails) === null || _waterResult$Connecti === void 0 ? void 0 : (_waterResult$Connecti2 = _waterResult$Connecti[0]) === null || _waterResult$Connecti2 === void 0 ? void 0 : _waterResult$Connecti2.addressType) || (waterResult === null || waterResult === void 0 ? void 0 : waterResult.addressType);
37665
+ const addressTypeObj = typeof rawAddressType === "object" && rawAddressType !== null && rawAddressType !== void 0 && rawAddressType.code ? rawAddressType : String(rawAddressType).toUpperCase() === "PERMANENT" ? {
37666
+ i18nKey: "Permanent",
37667
+ code: "PERMANENT"
37668
+ } : String(rawAddressType).toUpperCase() === "CORRESPONDENCE" ? {
37669
+ i18nKey: "Correspondence",
37670
+ code: "CORRESPONDENCE"
37671
+ } : rawAddressType ? {
37672
+ i18nKey: rawAddressType,
37673
+ code: rawAddressType
37674
+ } : null;
37675
+ const completeAddressStr = (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.completeAddress) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$Connecti3 = waterResult.ConnectionDetails) === null || _waterResult$Connecti3 === void 0 ? void 0 : (_waterResult$Connecti4 = _waterResult$Connecti3[0]) === null || _waterResult$Connecti4 === void 0 ? void 0 : _waterResult$Connecti4.completeAddress) || (waterResult === null || waterResult === void 0 ? void 0 : waterResult.completeAddress) || "";
37074
37676
  waterResult.ConnectionDetails = [{
37075
37677
  water: true,
37076
37678
  sewerage: false,
@@ -37082,18 +37684,20 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37082
37684
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType,
37083
37685
  i18nKey: `WS_CONNECTION_${waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType}`
37084
37686
  } : null,
37085
- waterDemandType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition = waterResult.additionalDetails) !== null && _waterResult$addition !== void 0 && _waterResult$addition.waterDemandType ? {
37086
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.waterDemandType,
37087
- i18nKey: `WS_WATER_DEMAND_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition3 = waterResult.additionalDetails) === null || _waterResult$addition3 === void 0 ? void 0 : _waterResult$addition3.waterDemandType}`
37687
+ waterDemandType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition3 = waterResult.additionalDetails) !== null && _waterResult$addition3 !== void 0 && _waterResult$addition3.waterDemandType ? {
37688
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.waterDemandType,
37689
+ i18nKey: `WS_WATER_DEMAND_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.waterDemandType}`
37088
37690
  } : null,
37089
- applicantType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition4 = waterResult.additionalDetails) !== null && _waterResult$addition4 !== void 0 && _waterResult$addition4.applicantType ? {
37090
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.applicantType,
37091
- i18nKey: `WS_APPLICANT_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition6 = waterResult.additionalDetails) === null || _waterResult$addition6 === void 0 ? void 0 : _waterResult$addition6.applicantType}`
37691
+ applicantType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition6 = waterResult.additionalDetails) !== null && _waterResult$addition6 !== void 0 && _waterResult$addition6.applicantType ? {
37692
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.applicantType,
37693
+ i18nKey: `WS_APPLICANT_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.applicantType}`
37092
37694
  } : null,
37093
- categoryType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition7 = waterResult.additionalDetails) !== null && _waterResult$addition7 !== void 0 && _waterResult$addition7.categoryType ? {
37094
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.categoryType,
37095
- i18nKey: `WS_CATEGORY_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.categoryType}`
37695
+ categoryType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition9 = waterResult.additionalDetails) !== null && _waterResult$addition9 !== void 0 && _waterResult$addition9.categoryType ? {
37696
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.categoryType,
37697
+ i18nKey: `WS_CATEGORY_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.categoryType}`
37096
37698
  } : null,
37699
+ addressType: addressTypeObj,
37700
+ completeAddress: completeAddressStr,
37097
37701
  proposedPipeSize: waterResult !== null && waterResult !== void 0 && waterResult.proposedPipeSize ? {
37098
37702
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize,
37099
37703
  i18nKey: `${waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize} ${t("WS_INCHES_LABEL")}`,
@@ -37101,23 +37705,25 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37101
37705
  } : null,
37102
37706
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37103
37707
  }];
37708
+ waterResult.addressType = addressTypeObj;
37709
+ waterResult.completeAddress = completeAddressStr;
37104
37710
  waterResult.bankDetails = {
37105
- bankName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.bankName) || "",
37106
- bankBranchName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.bankBranchName) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.branchName) || "",
37107
- ifscCode: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition11 = waterResult.additionalDetails) === null || _waterResult$addition11 === void 0 ? void 0 : _waterResult$addition11.ifscCode) || "",
37108
- accountNumber: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition12 = waterResult.additionalDetails) === null || _waterResult$addition12 === void 0 ? void 0 : _waterResult$addition12.bankAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition13 = waterResult.additionalDetails) === null || _waterResult$addition13 === void 0 ? void 0 : _waterResult$addition13.accountNumber) || "",
37109
- confirmAccountNumber: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition14 = waterResult.additionalDetails) === null || _waterResult$addition14 === void 0 ? void 0 : _waterResult$addition14.confirmAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition15 = waterResult.additionalDetails) === null || _waterResult$addition15 === void 0 ? void 0 : _waterResult$addition15.bankAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition16 = waterResult.additionalDetails) === null || _waterResult$addition16 === void 0 ? void 0 : _waterResult$addition16.accountNumber) || "",
37110
- accountHolderName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition17 = waterResult.additionalDetails) === null || _waterResult$addition17 === void 0 ? void 0 : _waterResult$addition17.accountHolderName) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition18 = waterResult.additionalDetails) === null || _waterResult$addition18 === void 0 ? void 0 : _waterResult$addition18.ownerName) || ""
37711
+ bankName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.bankName) || "",
37712
+ bankBranchName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition11 = waterResult.additionalDetails) === null || _waterResult$addition11 === void 0 ? void 0 : _waterResult$addition11.bankBranchName) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition12 = waterResult.additionalDetails) === null || _waterResult$addition12 === void 0 ? void 0 : _waterResult$addition12.branchName) || "",
37713
+ ifscCode: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition13 = waterResult.additionalDetails) === null || _waterResult$addition13 === void 0 ? void 0 : _waterResult$addition13.ifscCode) || "",
37714
+ accountNumber: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition14 = waterResult.additionalDetails) === null || _waterResult$addition14 === void 0 ? void 0 : _waterResult$addition14.bankAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition15 = waterResult.additionalDetails) === null || _waterResult$addition15 === void 0 ? void 0 : _waterResult$addition15.accountNumber) || "",
37715
+ confirmAccountNumber: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition16 = waterResult.additionalDetails) === null || _waterResult$addition16 === void 0 ? void 0 : _waterResult$addition16.confirmAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition17 = waterResult.additionalDetails) === null || _waterResult$addition17 === void 0 ? void 0 : _waterResult$addition17.bankAccountNumber) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition18 = waterResult.additionalDetails) === null || _waterResult$addition18 === void 0 ? void 0 : _waterResult$addition18.accountNumber) || "",
37716
+ accountHolderName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition19 = waterResult.additionalDetails) === null || _waterResult$addition19 === void 0 ? void 0 : _waterResult$addition19.accountHolderName) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition20 = waterResult.additionalDetails) === null || _waterResult$addition20 === void 0 ? void 0 : _waterResult$addition20.ownerName) || ""
37111
37717
  };
37112
37718
  waterResult.djbEmployee = {
37113
- isDjbEmployee: String(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition19 = waterResult.additionalDetails) === null || _waterResult$addition19 === void 0 ? void 0 : _waterResult$addition19.isDjbEmployee) === "true",
37114
- employeeId: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition20 = waterResult.additionalDetails) === null || _waterResult$addition20 === void 0 ? void 0 : _waterResult$addition20.employeeId) || "",
37115
- designation: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition21 = waterResult.additionalDetails) === null || _waterResult$addition21 === void 0 ? void 0 : _waterResult$addition21.designation) || "",
37116
- dor: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition22 = waterResult.additionalDetails) === null || _waterResult$addition22 === void 0 ? void 0 : _waterResult$addition22.dor) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition23 = waterResult.additionalDetails) === null || _waterResult$addition23 === void 0 ? void 0 : _waterResult$addition23.dorDate) || "",
37117
- document: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition24 = waterResult.additionalDetails) === null || _waterResult$addition24 === void 0 ? void 0 : _waterResult$addition24.document) || ""
37719
+ isDjbEmployee: String(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition21 = waterResult.additionalDetails) === null || _waterResult$addition21 === void 0 ? void 0 : _waterResult$addition21.isDjbEmployee) === "true",
37720
+ employeeId: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition22 = waterResult.additionalDetails) === null || _waterResult$addition22 === void 0 ? void 0 : _waterResult$addition22.employeeId) || "",
37721
+ designation: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition23 = waterResult.additionalDetails) === null || _waterResult$addition23 === void 0 ? void 0 : _waterResult$addition23.designation) || "",
37722
+ dor: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition24 = waterResult.additionalDetails) === null || _waterResult$addition24 === void 0 ? void 0 : _waterResult$addition24.dor) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition25 = waterResult.additionalDetails) === null || _waterResult$addition25 === void 0 ? void 0 : _waterResult$addition25.dorDate) || "",
37723
+ document: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition26 = waterResult.additionalDetails) === null || _waterResult$addition26 === void 0 ? void 0 : _waterResult$addition26.document) || ""
37118
37724
  };
37119
37725
  } else if (sewerageresult) {
37120
- var _sewerageresult$conne, _sewerageresult$conne2, _sewerageresult$conne3, _sewerageresult$conne4, _sewerageresult$conne5, _sewerageresult$conne6, _sewerageresult$conne7, _sewerageresult$conne8, _sewerageresult$conne9, _sewerageresult$conne0, _sewerageresult$conne1, _sewerageresult$conne10, _sewerageresult$conne11, _sewerageresult$conne12, _sewerageresult$conne13, _sewerageresult$conne14, _sewerageresult$conne15, _sewerageresult$conne16, _sewerageresult$conne17, _sewerageresult$conne18, _sewerageresult$conne19, _sewerageresult$conne20, _sewerageresult$conne21, _sewerageresult$conne22, _sewerageresult$conne23, _sewerageresult$conne24, _sewerageresult$conne25, _sewerageresult$conne26, _sewerageresult$conne27, _sewerageresult$conne28, _sewerageresult$conne29, _sewerageresult$conne30, _sewerageresult$conne31, _sewerageresult$conne32, _sewerageresult$prope, _sewerageresult$prope2, _sewerageresult$prope3, _sewerageresult$prope4, _sewerageresult$prope5, _sewerageresult$prope6, _sewerageresult$prope7, _sewerageresult$prope8, _sewerageresult$prope9, _sewerageresult$prope0, _sewerageresult$prope1, _sewerageresult$prope10, _sewerageresult$prope11, _sewerageresult$prope12, _sewerageresult$prope13, _sewerageresult$prope14, _sewerageresult$prope15, _sewerageresult$prope16, _sewerageresult$prope17, _sewerageresult$prope18, _sewerageresult$prope19, _sewerageresult$prope20, _sewerageresult$prope21, _sewerageresult$prope22, _sewerageresult$prope23, _sewerageresult$prope24, _sewerageresult$prope25, _sewerageresult$prope26, _sewerageresult$prope27, _sewerageresult$prope28, _sewerageresult$conne33, _sewerageresult$conne34, _sewerageresult$conne35, _sewerageresult$conne36, _sewerageresult$conne37, _sewerageresult$conne38, _sewerageresult$addit, _sewerageresult$addit2, _sewerageresult$addit3, _sewerageresult$addit4, _sewerageresult$addit5, _sewerageresult$addit6, _sewerageresult$addit7, _sewerageresult$addit8, _sewerageresult$addit9, _sewerageresult$addit0, _sewerageresult$addit1, _sewerageresult$addit10, _sewerageresult$addit11, _sewerageresult$addit12, _sewerageresult$addit13, _sewerageresult$addit14, _sewerageresult$addit15, _sewerageresult$addit16, _sewerageresult$addit17, _sewerageresult$addit18, _sewerageresult$addit19, _sewerageresult$addit20, _sewerageresult$addit21, _sewerageresult$addit22, _sewerageresult$addit23, _sewerageresult$addit24;
37726
+ var _sewerageresult$conne, _sewerageresult$conne2, _sewerageresult$conne3, _sewerageresult$conne4, _sewerageresult$conne5, _sewerageresult$conne6, _sewerageresult$conne7, _sewerageresult$conne8, _sewerageresult$conne9, _sewerageresult$conne0, _sewerageresult$conne1, _sewerageresult$conne10, _sewerageresult$conne11, _sewerageresult$conne12, _sewerageresult$conne13, _sewerageresult$conne14, _sewerageresult$conne15, _sewerageresult$conne16, _sewerageresult$conne17, _sewerageresult$conne18, _sewerageresult$conne19, _sewerageresult$conne20, _sewerageresult$conne21, _sewerageresult$conne22, _sewerageresult$conne23, _sewerageresult$conne24, _sewerageresult$conne25, _sewerageresult$conne26, _sewerageresult$conne27, _sewerageresult$conne28, _sewerageresult$conne29, _sewerageresult$conne30, _sewerageresult$conne31, _sewerageresult$conne32, _sewerageresult$prope, _sewerageresult$prope2, _sewerageresult$prope3, _sewerageresult$prope4, _sewerageresult$prope5, _sewerageresult$prope6, _sewerageresult$prope7, _sewerageresult$prope8, _sewerageresult$prope9, _sewerageresult$prope0, _sewerageresult$prope1, _sewerageresult$prope10, _sewerageresult$prope11, _sewerageresult$prope12, _sewerageresult$prope13, _sewerageresult$prope14, _sewerageresult$prope15, _sewerageresult$prope16, _sewerageresult$prope17, _sewerageresult$prope18, _sewerageresult$prope19, _sewerageresult$prope20, _sewerageresult$prope21, _sewerageresult$prope22, _sewerageresult$prope23, _sewerageresult$prope24, _sewerageresult$prope25, _sewerageresult$prope26, _sewerageresult$prope27, _sewerageresult$prope28, _sewerageresult$conne33, _sewerageresult$conne34, _sewerageresult$conne35, _sewerageresult$conne36, _sewerageresult$conne37, _sewerageresult$conne38, _sewerageresult$addit, _sewerageresult$Conne, _sewerageresult$Conne2, _sewerageresult$addit2, _sewerageresult$Conne3, _sewerageresult$Conne4, _sewerageresult$addit3, _sewerageresult$addit4, _sewerageresult$addit5, _sewerageresult$addit6, _sewerageresult$addit7, _sewerageresult$addit8, _sewerageresult$addit9, _sewerageresult$addit0, _sewerageresult$addit1, _sewerageresult$addit10, _sewerageresult$addit11, _sewerageresult$addit12, _sewerageresult$addit13, _sewerageresult$addit14, _sewerageresult$addit15, _sewerageresult$addit16, _sewerageresult$addit17, _sewerageresult$addit18, _sewerageresult$addit19, _sewerageresult$addit20, _sewerageresult$addit21, _sewerageresult$addit22, _sewerageresult$addit23, _sewerageresult$addit24, _sewerageresult$addit25, _sewerageresult$addit26;
37121
37727
  sewerageresult.ConnectionHolderDetails = sewerageresult !== null && sewerageresult !== void 0 && sewerageresult.connectionHolders ? [{
37122
37728
  ...(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$conne = sewerageresult.connectionHolders) === null || _sewerageresult$conne === void 0 ? void 0 : _sewerageresult$conne[0]),
37123
37729
  address: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$conne2 = sewerageresult.connectionHolders) === null || _sewerageresult$conne2 === void 0 ? void 0 : (_sewerageresult$conne3 = _sewerageresult$conne2[0]) === null || _sewerageresult$conne3 === void 0 ? void 0 : _sewerageresult$conne3.correspondenceAddress,
@@ -37196,6 +37802,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37196
37802
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37197
37803
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37198
37804
  };
37805
+ const rawAddressTypeSewerage = (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit = sewerageresult.additionalDetails) === null || _sewerageresult$addit === void 0 ? void 0 : _sewerageresult$addit.addressType) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$Conne = sewerageresult.ConnectionDetails) === null || _sewerageresult$Conne === void 0 ? void 0 : (_sewerageresult$Conne2 = _sewerageresult$Conne[0]) === null || _sewerageresult$Conne2 === void 0 ? void 0 : _sewerageresult$Conne2.addressType) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.addressType);
37806
+ const addressTypeObjSewerage = typeof rawAddressTypeSewerage === "object" && rawAddressTypeSewerage !== null && rawAddressTypeSewerage !== void 0 && rawAddressTypeSewerage.code ? rawAddressTypeSewerage : String(rawAddressTypeSewerage).toUpperCase() === "PERMANENT" ? {
37807
+ i18nKey: "Permanent",
37808
+ code: "PERMANENT"
37809
+ } : String(rawAddressTypeSewerage).toUpperCase() === "CORRESPONDENCE" ? {
37810
+ i18nKey: "Correspondence",
37811
+ code: "CORRESPONDENCE"
37812
+ } : rawAddressTypeSewerage ? {
37813
+ i18nKey: rawAddressTypeSewerage,
37814
+ code: rawAddressTypeSewerage
37815
+ } : null;
37816
+ const completeAddressStrSewerage = (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit2 = sewerageresult.additionalDetails) === null || _sewerageresult$addit2 === void 0 ? void 0 : _sewerageresult$addit2.completeAddress) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$Conne3 = sewerageresult.ConnectionDetails) === null || _sewerageresult$Conne3 === void 0 ? void 0 : (_sewerageresult$Conne4 = _sewerageresult$Conne3[0]) === null || _sewerageresult$Conne4 === void 0 ? void 0 : _sewerageresult$Conne4.completeAddress) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.completeAddress) || "";
37199
37817
  sewerageresult.ConnectionDetails = [{
37200
37818
  water: false,
37201
37819
  sewerage: true,
@@ -37210,35 +37828,39 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37210
37828
  code: "Non Metered",
37211
37829
  i18nKey: "WS_CONNECTION_Non Metered"
37212
37830
  },
37213
- waterDemandType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit = sewerageresult.additionalDetails) !== null && _sewerageresult$addit !== void 0 && _sewerageresult$addit.waterDemandType ? {
37214
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit2 = sewerageresult.additionalDetails) === null || _sewerageresult$addit2 === void 0 ? void 0 : _sewerageresult$addit2.waterDemandType,
37215
- i18nKey: `WS_WATER_DEMAND_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit3 = sewerageresult.additionalDetails) === null || _sewerageresult$addit3 === void 0 ? void 0 : _sewerageresult$addit3.waterDemandType}`
37831
+ waterDemandType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit3 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit3 !== void 0 && _sewerageresult$addit3.waterDemandType ? {
37832
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit4 = sewerageresult.additionalDetails) === null || _sewerageresult$addit4 === void 0 ? void 0 : _sewerageresult$addit4.waterDemandType,
37833
+ i18nKey: `WS_WATER_DEMAND_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit5 = sewerageresult.additionalDetails) === null || _sewerageresult$addit5 === void 0 ? void 0 : _sewerageresult$addit5.waterDemandType}`
37216
37834
  } : null,
37217
- applicantType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit4 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit4 !== void 0 && _sewerageresult$addit4.applicantType ? {
37218
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit5 = sewerageresult.additionalDetails) === null || _sewerageresult$addit5 === void 0 ? void 0 : _sewerageresult$addit5.applicantType,
37219
- i18nKey: `WS_APPLICANT_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit6 = sewerageresult.additionalDetails) === null || _sewerageresult$addit6 === void 0 ? void 0 : _sewerageresult$addit6.applicantType}`
37835
+ applicantType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit6 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit6 !== void 0 && _sewerageresult$addit6.applicantType ? {
37836
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit7 = sewerageresult.additionalDetails) === null || _sewerageresult$addit7 === void 0 ? void 0 : _sewerageresult$addit7.applicantType,
37837
+ i18nKey: `WS_APPLICANT_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit8 = sewerageresult.additionalDetails) === null || _sewerageresult$addit8 === void 0 ? void 0 : _sewerageresult$addit8.applicantType}`
37220
37838
  } : null,
37221
- categoryType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit7 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit7 !== void 0 && _sewerageresult$addit7.categoryType ? {
37222
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit8 = sewerageresult.additionalDetails) === null || _sewerageresult$addit8 === void 0 ? void 0 : _sewerageresult$addit8.categoryType,
37223
- i18nKey: `WS_CATEGORY_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit9 = sewerageresult.additionalDetails) === null || _sewerageresult$addit9 === void 0 ? void 0 : _sewerageresult$addit9.categoryType}`
37839
+ categoryType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit9 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit9 !== void 0 && _sewerageresult$addit9.categoryType ? {
37840
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit0 = sewerageresult.additionalDetails) === null || _sewerageresult$addit0 === void 0 ? void 0 : _sewerageresult$addit0.categoryType,
37841
+ i18nKey: `WS_CATEGORY_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit1 = sewerageresult.additionalDetails) === null || _sewerageresult$addit1 === void 0 ? void 0 : _sewerageresult$addit1.categoryType}`
37224
37842
  } : null,
37843
+ addressType: addressTypeObjSewerage,
37844
+ completeAddress: completeAddressStrSewerage,
37225
37845
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37226
37846
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37227
37847
  }];
37848
+ sewerageresult.addressType = addressTypeObjSewerage;
37849
+ sewerageresult.completeAddress = completeAddressStrSewerage;
37228
37850
  sewerageresult.bankDetails = {
37229
- bankName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit0 = sewerageresult.additionalDetails) === null || _sewerageresult$addit0 === void 0 ? void 0 : _sewerageresult$addit0.bankName) || "",
37230
- bankBranchName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit1 = sewerageresult.additionalDetails) === null || _sewerageresult$addit1 === void 0 ? void 0 : _sewerageresult$addit1.bankBranchName) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit10 = sewerageresult.additionalDetails) === null || _sewerageresult$addit10 === void 0 ? void 0 : _sewerageresult$addit10.branchName) || "",
37231
- ifscCode: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit11 = sewerageresult.additionalDetails) === null || _sewerageresult$addit11 === void 0 ? void 0 : _sewerageresult$addit11.ifscCode) || "",
37232
- accountNumber: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit12 = sewerageresult.additionalDetails) === null || _sewerageresult$addit12 === void 0 ? void 0 : _sewerageresult$addit12.bankAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit13 = sewerageresult.additionalDetails) === null || _sewerageresult$addit13 === void 0 ? void 0 : _sewerageresult$addit13.accountNumber) || "",
37233
- confirmAccountNumber: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit14 = sewerageresult.additionalDetails) === null || _sewerageresult$addit14 === void 0 ? void 0 : _sewerageresult$addit14.confirmAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit15 = sewerageresult.additionalDetails) === null || _sewerageresult$addit15 === void 0 ? void 0 : _sewerageresult$addit15.bankAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit16 = sewerageresult.additionalDetails) === null || _sewerageresult$addit16 === void 0 ? void 0 : _sewerageresult$addit16.accountNumber) || "",
37234
- accountHolderName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit17 = sewerageresult.additionalDetails) === null || _sewerageresult$addit17 === void 0 ? void 0 : _sewerageresult$addit17.accountHolderName) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit18 = sewerageresult.additionalDetails) === null || _sewerageresult$addit18 === void 0 ? void 0 : _sewerageresult$addit18.ownerName) || ""
37851
+ bankName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit10 = sewerageresult.additionalDetails) === null || _sewerageresult$addit10 === void 0 ? void 0 : _sewerageresult$addit10.bankName) || "",
37852
+ bankBranchName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit11 = sewerageresult.additionalDetails) === null || _sewerageresult$addit11 === void 0 ? void 0 : _sewerageresult$addit11.bankBranchName) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit12 = sewerageresult.additionalDetails) === null || _sewerageresult$addit12 === void 0 ? void 0 : _sewerageresult$addit12.branchName) || "",
37853
+ ifscCode: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit13 = sewerageresult.additionalDetails) === null || _sewerageresult$addit13 === void 0 ? void 0 : _sewerageresult$addit13.ifscCode) || "",
37854
+ accountNumber: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit14 = sewerageresult.additionalDetails) === null || _sewerageresult$addit14 === void 0 ? void 0 : _sewerageresult$addit14.bankAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit15 = sewerageresult.additionalDetails) === null || _sewerageresult$addit15 === void 0 ? void 0 : _sewerageresult$addit15.accountNumber) || "",
37855
+ confirmAccountNumber: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit16 = sewerageresult.additionalDetails) === null || _sewerageresult$addit16 === void 0 ? void 0 : _sewerageresult$addit16.confirmAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit17 = sewerageresult.additionalDetails) === null || _sewerageresult$addit17 === void 0 ? void 0 : _sewerageresult$addit17.bankAccountNumber) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit18 = sewerageresult.additionalDetails) === null || _sewerageresult$addit18 === void 0 ? void 0 : _sewerageresult$addit18.accountNumber) || "",
37856
+ accountHolderName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit19 = sewerageresult.additionalDetails) === null || _sewerageresult$addit19 === void 0 ? void 0 : _sewerageresult$addit19.accountHolderName) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit20 = sewerageresult.additionalDetails) === null || _sewerageresult$addit20 === void 0 ? void 0 : _sewerageresult$addit20.ownerName) || ""
37235
37857
  };
37236
37858
  sewerageresult.djbEmployee = {
37237
- isDjbEmployee: String(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit19 = sewerageresult.additionalDetails) === null || _sewerageresult$addit19 === void 0 ? void 0 : _sewerageresult$addit19.isDjbEmployee) === "true",
37238
- employeeId: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit20 = sewerageresult.additionalDetails) === null || _sewerageresult$addit20 === void 0 ? void 0 : _sewerageresult$addit20.employeeId) || "",
37239
- designation: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit21 = sewerageresult.additionalDetails) === null || _sewerageresult$addit21 === void 0 ? void 0 : _sewerageresult$addit21.designation) || "",
37240
- dor: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit22 = sewerageresult.additionalDetails) === null || _sewerageresult$addit22 === void 0 ? void 0 : _sewerageresult$addit22.dor) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit23 = sewerageresult.additionalDetails) === null || _sewerageresult$addit23 === void 0 ? void 0 : _sewerageresult$addit23.dorDate) || "",
37241
- document: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit24 = sewerageresult.additionalDetails) === null || _sewerageresult$addit24 === void 0 ? void 0 : _sewerageresult$addit24.document) || ""
37859
+ isDjbEmployee: String(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit21 = sewerageresult.additionalDetails) === null || _sewerageresult$addit21 === void 0 ? void 0 : _sewerageresult$addit21.isDjbEmployee) === "true",
37860
+ employeeId: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit22 = sewerageresult.additionalDetails) === null || _sewerageresult$addit22 === void 0 ? void 0 : _sewerageresult$addit22.employeeId) || "",
37861
+ designation: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit23 = sewerageresult.additionalDetails) === null || _sewerageresult$addit23 === void 0 ? void 0 : _sewerageresult$addit23.designation) || "",
37862
+ dor: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit24 = sewerageresult.additionalDetails) === null || _sewerageresult$addit24 === void 0 ? void 0 : _sewerageresult$addit24.dor) || (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit25 = sewerageresult.additionalDetails) === null || _sewerageresult$addit25 === void 0 ? void 0 : _sewerageresult$addit25.dorDate) || "",
37863
+ document: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit26 = sewerageresult.additionalDetails) === null || _sewerageresult$addit26 === void 0 ? void 0 : _sewerageresult$addit26.document) || ""
37242
37864
  };
37243
37865
  }
37244
37866
  if (waterResult) return {
@@ -37312,10 +37934,10 @@ const EditApplication = _ref => {
37312
37934
  });
37313
37935
  let isModifyEdit = window.location.href.includes("/modify-connection") || window.location.href.includes("/edit-application");
37314
37936
  useEffect(() => {
37315
- var _waterapplication, _sewerageapplication;
37937
+ var _waterapplication, _params$ConnectionDet, _params$ConnectionDet2, _sewerageapplication, _params$ConnectionDet3, _params$ConnectionDet4;
37316
37938
  waterapplication = Waterresult;
37317
37939
  sewerageapplication = Sewarageresult;
37318
- if ((Waterresult && waterapplication || Sewarageresult && sewerageapplication) && (!(Object.keys(params).length > 0) || waterapplication && ((params === null || params === void 0 ? void 0 : params.applicationNo) !== ((_waterapplication = waterapplication) === null || _waterapplication === void 0 ? void 0 : _waterapplication.applicationNo) || !(params !== null && params !== void 0 && params.DocumentsRequired)) || sewerageapplication && ((params === null || params === void 0 ? void 0 : params.applicationNo) !== ((_sewerageapplication = sewerageapplication) === null || _sewerageapplication === void 0 ? void 0 : _sewerageapplication.applicationNo) || !(params !== null && params !== void 0 && params.DocumentsRequired)))) {
37940
+ if ((Waterresult && waterapplication || Sewarageresult && sewerageapplication) && (!(Object.keys(params).length > 0) || waterapplication && ((params === null || params === void 0 ? void 0 : params.applicationNo) !== ((_waterapplication = waterapplication) === null || _waterapplication === void 0 ? void 0 : _waterapplication.applicationNo) || !(params !== null && params !== void 0 && params.DocumentsRequired) || !(params !== null && params !== void 0 && (_params$ConnectionDet = params.ConnectionDetails) !== null && _params$ConnectionDet !== void 0 && (_params$ConnectionDet2 = _params$ConnectionDet[0]) !== null && _params$ConnectionDet2 !== void 0 && _params$ConnectionDet2.addressType)) || sewerageapplication && ((params === null || params === void 0 ? void 0 : params.applicationNo) !== ((_sewerageapplication = sewerageapplication) === null || _sewerageapplication === void 0 ? void 0 : _sewerageapplication.applicationNo) || !(params !== null && params !== void 0 && params.DocumentsRequired) || !(params !== null && params !== void 0 && (_params$ConnectionDet3 = params.ConnectionDetails) !== null && _params$ConnectionDet3 !== void 0 && (_params$ConnectionDet4 = _params$ConnectionDet3[0]) !== null && _params$ConnectionDet4 !== void 0 && _params$ConnectionDet4.addressType)))) {
37319
37941
  waterapplication = Waterresult;
37320
37942
  sewerageapplication = Sewarageresult;
37321
37943
  if (window.location.href.includes("edit-application")) {
@@ -37349,12 +37971,44 @@ const EditApplication = _ref => {
37349
37971
  ...EditDetails
37350
37972
  });
37351
37973
  } else if (Object.keys(params).length > 0 && (Waterresult || Sewarageresult)) {
37974
+ var _currentApp$additiona, _currentApp$Connectio, _currentApp$Connectio2, _currentApp$additiona2, _currentApp$Connectio3, _currentApp$Connectio4, _params$ConnectionDet5, _params$ConnectionDet6, _params$ConnectionDet7, _params$ConnectionDet8;
37352
37975
  let currentApp = Waterresult || Sewarageresult;
37353
- if (currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification)) {
37354
- setParams({
37355
- ...params,
37356
- dueVerification: currentApp.dueVerification
37357
- });
37976
+ const addrType = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona = currentApp.additionalDetails) === null || _currentApp$additiona === void 0 ? void 0 : _currentApp$additiona.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio = currentApp.ConnectionDetails) === null || _currentApp$Connectio === void 0 ? void 0 : (_currentApp$Connectio2 = _currentApp$Connectio[0]) === null || _currentApp$Connectio2 === void 0 ? void 0 : _currentApp$Connectio2.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.addressType);
37977
+ const compAddr = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona2 = currentApp.additionalDetails) === null || _currentApp$additiona2 === void 0 ? void 0 : _currentApp$additiona2.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio3 = currentApp.ConnectionDetails) === null || _currentApp$Connectio3 === void 0 ? void 0 : (_currentApp$Connectio4 = _currentApp$Connectio3[0]) === null || _currentApp$Connectio4 === void 0 ? void 0 : _currentApp$Connectio4.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.completeAddress);
37978
+ const needsAddressSync = !(params !== null && params !== void 0 && (_params$ConnectionDet5 = params.ConnectionDetails) !== null && _params$ConnectionDet5 !== void 0 && (_params$ConnectionDet6 = _params$ConnectionDet5[0]) !== null && _params$ConnectionDet6 !== void 0 && _params$ConnectionDet6.addressType) && addrType || !(params !== null && params !== void 0 && (_params$ConnectionDet7 = params.ConnectionDetails) !== null && _params$ConnectionDet7 !== void 0 && (_params$ConnectionDet8 = _params$ConnectionDet7[0]) !== null && _params$ConnectionDet8 !== void 0 && _params$ConnectionDet8.completeAddress) && compAddr;
37979
+ const needsDueSync = currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification);
37980
+ if (needsAddressSync || needsDueSync) {
37981
+ let updatedParams = {
37982
+ ...params
37983
+ };
37984
+ if (needsAddressSync) {
37985
+ var _params$ConnectionDet9, _params$ConnectionDet0;
37986
+ const addrTypeObj = typeof addrType === "object" && addrType !== null && addrType !== void 0 && addrType.code ? addrType : String(addrType).toUpperCase() === "PERMANENT" ? {
37987
+ i18nKey: "Permanent",
37988
+ code: "PERMANENT"
37989
+ } : String(addrType).toUpperCase() === "CORRESPONDENCE" ? {
37990
+ i18nKey: "Correspondence",
37991
+ code: "CORRESPONDENCE"
37992
+ } : addrType ? {
37993
+ i18nKey: addrType,
37994
+ code: addrType
37995
+ } : null;
37996
+ const updatedConnDetails = params !== null && params !== void 0 && params.ConnectionDetails ? [{
37997
+ ...params.ConnectionDetails[0],
37998
+ addressType: ((_params$ConnectionDet9 = params.ConnectionDetails[0]) === null || _params$ConnectionDet9 === void 0 ? void 0 : _params$ConnectionDet9.addressType) || addrTypeObj,
37999
+ completeAddress: ((_params$ConnectionDet0 = params.ConnectionDetails[0]) === null || _params$ConnectionDet0 === void 0 ? void 0 : _params$ConnectionDet0.completeAddress) || compAddr || ""
38000
+ }] : [{
38001
+ addressType: addrTypeObj,
38002
+ completeAddress: compAddr || ""
38003
+ }];
38004
+ updatedParams.ConnectionDetails = updatedConnDetails;
38005
+ updatedParams.addressType = updatedParams.addressType || addrTypeObj;
38006
+ updatedParams.completeAddress = updatedParams.completeAddress || compAddr || "";
38007
+ }
38008
+ if (needsDueSync) {
38009
+ updatedParams.dueVerification = currentApp.dueVerification;
38010
+ }
38011
+ setParams(updatedParams);
37358
38012
  }
37359
38013
  }
37360
38014
  }, [Waterresult, Sewarageresult]);
@@ -37378,6 +38032,9 @@ const EditApplication = _ref => {
37378
38032
  const handleSelect = (key, data, skipStep, isFromCreateApi) => {
37379
38033
  if (isFromCreateApi) setParams(data);else if (key === "") setParams({
37380
38034
  ...data
38035
+ });else if (Array.isArray(data)) setParams({
38036
+ ...params,
38037
+ [key]: data
37381
38038
  });else setParams({
37382
38039
  ...params,
37383
38040
  ...{
@@ -37597,7 +38254,7 @@ const ReSubmitDisconnectionApplication = () => {
37597
38254
  };
37598
38255
 
37599
38256
  const CheckPage = _ref => {
37600
- var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _cpt$details14, _reversedOwners$, _cpt$details15, _cpt$details16, _cpt$details17, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$co, _connectionDetails$co2, _connectionDetails$wa, _connectionDetails$wa2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$do, _connectionDetails$do2, _connectionDetails$do3, _connectionDetails$de, _connectionDetails$de2, _ConnectionHolderDeta, _ConnectionHolderDeta2, _ConnectionHolderDeta3, _ConnectionHolderDeta4, _ConnectionHolderDeta5, _ConnectionHolderDeta6, _ConnectionHolderDeta7, _ConnectionHolderDeta8, _ConnectionHolderDeta9, _ConnectionHolderDeta0, _propertyAddress$zro, _propertyAddress$addi, _propertyAddress$addr, _propertyAddress$addr2, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$loca, _propertyAddress$loca2, _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, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyT3;
38257
+ var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _cpt$details14, _reversedOwners$, _cpt$details15, _cpt$details16, _cpt$details17, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$co, _connectionDetails$co2, _connectionDetails$wa, _connectionDetails$wa2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _data, _data$additionalDetai, _data2, _data2$additionalDeta, _connectionDetails$do, _connectionDetails$do2, _connectionDetails$do3, _connectionDetails$de, _connectionDetails$de2, _ConnectionHolderDeta, _ConnectionHolderDeta2, _ConnectionHolderDeta3, _ConnectionHolderDeta4, _ConnectionHolderDeta5, _ConnectionHolderDeta6, _ConnectionHolderDeta7, _ConnectionHolderDeta8, _ConnectionHolderDeta9, _ConnectionHolderDeta0, _propertyAddress$zro, _propertyAddress$addi, _propertyAddress$addr, _propertyAddress$addr2, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$loca, _propertyAddress$loca2, _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, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail, _cpt$additionalDetail2, _cpt$additionalDetail3, _cpt$propertyType, _cpt$additionalDetail4, _cpt$additionalDetail5;
37601
38258
  let {
37602
38259
  onSubmit,
37603
38260
  value
@@ -37739,6 +38396,12 @@ const CheckPage = _ref => {
37739
38396
  }), /*#__PURE__*/React.createElement(Row, {
37740
38397
  label: t("WS_APPLICANT_TYPE"),
37741
38398
  text: `${t(checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap = connectionDetails.applicantType) === null || _connectionDetails$ap === void 0 ? void 0 : _connectionDetails$ap.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ap2 = connectionDetails.applicantType) === null || _connectionDetails$ap2 === void 0 ? void 0 : _connectionDetails$ap2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.applicantType)))}`
38399
+ }), /*#__PURE__*/React.createElement(Row, {
38400
+ label: t("WS_Billing_Address_Type"),
38401
+ text: `${t(checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad = connectionDetails.addressType) === null || _connectionDetails$ad === void 0 ? void 0 : _connectionDetails$ad.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad2 = connectionDetails.addressType) === null || _connectionDetails$ad2 === void 0 ? void 0 : _connectionDetails$ad2.name) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad3 = connectionDetails.addressType) === null || _connectionDetails$ad3 === void 0 ? void 0 : _connectionDetails$ad3.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || ((_data = data) === null || _data === void 0 ? void 0 : (_data$additionalDetai = _data.additionalDetails) === null || _data$additionalDetai === void 0 ? void 0 : _data$additionalDetai.addressType)))}`
38402
+ }), /*#__PURE__*/React.createElement(Row, {
38403
+ label: t("Complete Address"),
38404
+ text: `${checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.completeAddress) || ((_data2 = data) === null || _data2 === void 0 ? void 0 : (_data2$additionalDeta = _data2.additionalDetails) === null || _data2$additionalDeta === void 0 ? void 0 : _data2$additionalDeta.completeAddress))}`
37742
38405
  }), /*#__PURE__*/React.createElement(Row, {
37743
38406
  label: t("WS_SERVICE_TYPE"),
37744
38407
  text: `${t(checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do2 = connectionDetails.domesticType) === null || _connectionDetails$do2 === void 0 ? void 0 : _connectionDetails$do2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.domesticType)))}`
@@ -37901,10 +38564,21 @@ const CheckPage = _ref => {
37901
38564
  }), /*#__PURE__*/React.createElement(Row, {
37902
38565
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
37903
38566
  text: `${t(checkForNA((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)))}`
37904
- }), ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse", "BuiltUp.GroupHousingSociety", "BuiltUp.JJSLUMS", "BuiltUp.IndividualHouse"].includes((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)) ? /*#__PURE__*/React.createElement(Row, {
38567
+ }), 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) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail = cpt.additionalDetails) === null || _cpt$additionalDetail === void 0 ? void 0 : (_cpt$additionalDetail2 = _cpt$additionalDetail.propertyCategory) === null || _cpt$additionalDetail2 === void 0 ? void 0 : _cpt$additionalDetail2.code) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail3 = cpt.additionalDetails) === null || _cpt$additionalDetail3 === void 0 ? void 0 : _cpt$additionalDetail3.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$propertyType = cpt.propertyType) === null || _cpt$propertyType === void 0 ? void 0 : _cpt$propertyType.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : cpt.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
37905
38568
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
37906
38569
  text: `${t(checkForNA((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
37907
- }) : null), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
38570
+ }) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail4 = cpt.additionalDetails) === null || _cpt$additionalDetail4 === void 0 ? void 0 : _cpt$additionalDetail4.questions)) ? (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail5 = cpt.additionalDetails) === null || _cpt$additionalDetail5 === void 0 ? void 0 : _cpt$additionalDetail5.questions) : []).map((q, idx) => {
38571
+ var _q$answer, _q$answer2, _q$answer3;
38572
+ 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}`;
38573
+ 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;
38574
+ const trimmedQ = String(qText || "").trim();
38575
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
38576
+ return /*#__PURE__*/React.createElement(Row, {
38577
+ key: `question_${idx}`,
38578
+ label: displayLabel,
38579
+ text: `${t(checkForNA(aText))}`
38580
+ });
38581
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
37908
38582
  style: {
37909
38583
  marginTop: "10px",
37910
38584
  marginBottom: "30px"
@@ -40973,7 +41647,7 @@ const WSPropertyLocationDetails = props => {
40973
41647
  };
40974
41648
 
40975
41649
  const ApplicationBillAmendment = () => {
40976
- var _data$BillingService, _data$BillingService$, _data$BillingService2, _data$BillingService3, _state, _state$data, _state$data$applicati, _state$data$applicati2, _state$data$applicati3, _billSearchData, _billSearchData$filte, _billSearchData2, _state9, _state9$data, _errors$WS_REDUCED_AM, _errors$WS_ADDITIONAL, _billSearchData3, _errors$effectiveTill, _errors$effectiveTill2, _state12, _state12$data;
41650
+ 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;
40977
41651
  const [showToast, setShowToast] = useState(null);
40978
41652
  const {
40979
41653
  t
@@ -41001,7 +41675,7 @@ const ApplicationBillAmendment = () => {
41001
41675
  } = Digit.Hooks.ws.WSSearchMdmsTypes.useWSMDMSBillAmendment({
41002
41676
  tenantId: stateId
41003
41677
  });
41004
- const servicev1 = connectionNumber.includes("WS") ? "WS" : "SW";
41678
+ const servicev1 = "WS";
41005
41679
  const billSearchFilters = {
41006
41680
  tenantId,
41007
41681
  consumerCode: connectionNumber,
@@ -41011,6 +41685,15 @@ const ApplicationBillAmendment = () => {
41011
41685
  data: preBillSearchData,
41012
41686
  isLoading: isBillSearchLoading
41013
41687
  } = Digit.Hooks.usePaymentSearch(tenantId, billSearchFilters);
41688
+ 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;
41689
+ useEffect(() => {
41690
+ var _editFormData, _editFormData2;
41691
+ if (editFormData !== null && editFormData !== void 0 && (_editFormData = editFormData[`${servicev1}_REDUCED_AMOUNT`]) !== null && _editFormData !== void 0 && _editFormData.VALUE) {
41692
+ setischeckedReduce(true);
41693
+ } else if (editFormData !== null && editFormData !== void 0 && (_editFormData2 = editFormData[`${servicev1}_ADDITIONAL_AMOUNT`]) !== null && _editFormData2 !== void 0 && _editFormData2.VALUE) {
41694
+ setischeckedAddition(true);
41695
+ }
41696
+ }, [editFormData, servicev1]);
41014
41697
  const {
41015
41698
  data,
41016
41699
  isFetched
@@ -41023,6 +41706,7 @@ const ApplicationBillAmendment = () => {
41023
41706
  control,
41024
41707
  watch,
41025
41708
  setValue,
41709
+ clearErrors,
41026
41710
  unregister,
41027
41711
  handleSubmit,
41028
41712
  formState: {
@@ -41033,8 +41717,15 @@ const ApplicationBillAmendment = () => {
41033
41717
  reset,
41034
41718
  ...methods
41035
41719
  } = useForm({
41720
+ mode: "onChange",
41036
41721
  defaultValues: {
41037
- ...((_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)
41722
+ WS_REDUCED_AMOUNT: {
41723
+ VALUE: false
41724
+ },
41725
+ WS_ADDITIONAL_AMOUNT: {
41726
+ VALUE: false
41727
+ },
41728
+ ...((_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)
41038
41729
  }
41039
41730
  });
41040
41731
  const {
@@ -41050,8 +41741,6 @@ const ApplicationBillAmendment = () => {
41050
41741
  const amendmentReason = watch("amendmentReason");
41051
41742
  const WS_REDUCED_AMOUNT = watch("WS_REDUCED_AMOUNT");
41052
41743
  const WS_ADDITIONAL_AMOUNT = watch("WS_ADDITIONAL_AMOUNT");
41053
- const SW_REDUCED_AMOUNT = watch("SW_REDUCED_AMOUNT");
41054
- const SW_ADDITIONAL_AMOUNT = watch("SW_ADDITIONAL_AMOUNT");
41055
41744
  const history = useHistory();
41056
41745
  const uploadFile = function (data, fname, props) {
41057
41746
  try {
@@ -41175,11 +41864,10 @@ const ApplicationBillAmendment = () => {
41175
41864
  });
41176
41865
  };
41177
41866
  const getDemandDetailsComparingUpdates = d => {
41178
- var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _d$SW_REDUCED_AMOUNT, _actionPerformed, _actionPerformedInArr;
41179
- let actionPerformed;
41867
+ var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _actionPerformedInArr;
41180
41868
  const action = (d === null || d === void 0 ? void 0 : (_d = d[`${servicev1}_REDUCED_AMOUNT`]) === null || _d === void 0 ? void 0 : _d.VALUE) !== undefined && d !== null && d !== void 0 && (_d2 = d[`${servicev1}_REDUCED_AMOUNT`]) !== null && _d2 !== void 0 && _d2.VALUE || (d === null || d === void 0 ? void 0 : (_d3 = d[`${servicev1}_ADDITIONAL_AMOUNT`]) === null || _d3 === void 0 ? void 0 : _d3.VALUE) !== undefined && !(d !== null && d !== void 0 && (_d4 = d[`${servicev1}_ADDITIONAL_AMOUNT`]) !== null && _d4 !== void 0 && _d4.VALUE) ? "rebate" : "penalty";
41181
- if (servicev1 === "WS") actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$WS_REDUCED_AMOUNT = d.WS_REDUCED_AMOUNT) !== null && _d$WS_REDUCED_AMOUNT !== void 0 && _d$WS_REDUCED_AMOUNT.VALUE ? d === null || d === void 0 ? void 0 : d.WS_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.WS_ADDITIONAL_AMOUNT));else actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$SW_REDUCED_AMOUNT = d.SW_REDUCED_AMOUNT) !== null && _d$SW_REDUCED_AMOUNT !== void 0 && _d$SW_REDUCED_AMOUNT.VALUE ? d === null || d === void 0 ? void 0 : d.SW_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.SW_ADDITIONAL_AMOUNT));
41182
- (_actionPerformed = actionPerformed) === null || _actionPerformed === void 0 ? true : delete _actionPerformed.VALUE;
41869
+ let actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$WS_REDUCED_AMOUNT = d.WS_REDUCED_AMOUNT) !== null && _d$WS_REDUCED_AMOUNT !== void 0 && _d$WS_REDUCED_AMOUNT.VALUE ? d === null || d === void 0 ? void 0 : d.WS_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.WS_ADDITIONAL_AMOUNT));
41870
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41183
41871
  const actionPerformedInArray = Object.entries(actionPerformed);
41184
41872
  if (d !== null && d !== void 0 && d[`${servicev1}_REBATE`]) {
41185
41873
  actionPerformedInArray.push([`${servicev1}_TIME_ADHOC_REBATE`, d === null || d === void 0 ? void 0 : d[`${servicev1}_REBATE`]]);
@@ -41196,15 +41884,14 @@ const ApplicationBillAmendment = () => {
41196
41884
  });
41197
41885
  };
41198
41886
  const getTotalDetailsOfUpdatedData = d => {
41199
- var _d5, _d$WS_REDUCED_AMOUNT2, _d$SW_REDUCED_AMOUNT2, _actionPerformed2;
41887
+ var _d5, _d$WS_REDUCED_AMOUNT2;
41200
41888
  const action = d !== null && d !== void 0 && (_d5 = d[`${servicev1}_REDUCED_AMOUNT`]) !== null && _d5 !== void 0 && _d5.VALUE ? "REBATE" : "PENALTY";
41201
41889
  const originalDemand = {};
41202
41890
  billSearchData.map(el => {
41203
41891
  originalDemand[el.taxHeadCode] = el.amount;
41204
41892
  });
41205
- let actionPerformed;
41206
- if (servicev1 === "WS") actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$WS_REDUCED_AMOUNT2 = d.WS_REDUCED_AMOUNT) !== null && _d$WS_REDUCED_AMOUNT2 !== void 0 && _d$WS_REDUCED_AMOUNT2.VALUE ? d === null || d === void 0 ? void 0 : d.WS_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.WS_ADDITIONAL_AMOUNT));else actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$SW_REDUCED_AMOUNT2 = d.SW_REDUCED_AMOUNT) !== null && _d$SW_REDUCED_AMOUNT2 !== void 0 && _d$SW_REDUCED_AMOUNT2.VALUE ? d === null || d === void 0 ? void 0 : d.SW_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.SW_ADDITIONAL_AMOUNT));
41207
- (_actionPerformed2 = actionPerformed) === null || _actionPerformed2 === void 0 ? true : delete _actionPerformed2.VALUE;
41893
+ let actionPerformed = JSON.parse(JSON.stringify(d !== null && d !== void 0 && (_d$WS_REDUCED_AMOUNT2 = d.WS_REDUCED_AMOUNT) !== null && _d$WS_REDUCED_AMOUNT2 !== void 0 && _d$WS_REDUCED_AMOUNT2.VALUE ? d === null || d === void 0 ? void 0 : d.WS_REDUCED_AMOUNT : d === null || d === void 0 ? void 0 : d.WS_ADDITIONAL_AMOUNT));
41894
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41208
41895
  actionPerformed[`${servicev1}_${action}`] = d !== null && d !== void 0 && d[`${servicev1}_${action}`] ? d === null || d === void 0 ? void 0 : d[`${servicev1}_${action}`] : 0;
41209
41896
  return {
41210
41897
  ...actionPerformed,
@@ -41219,13 +41906,13 @@ const ApplicationBillAmendment = () => {
41219
41906
  };
41220
41907
  useEffect(() => {
41221
41908
  const timer = setTimeout(() => {
41222
- var _state3;
41223
- if (goToAppDetailsPage) window.location.href = `${window.location.origin}/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${(_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.data.applicationDetails.amendment.amendmentId}`;
41909
+ var _state4;
41910
+ if (goToAppDetailsPage) 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.applicationDetails.amendment.amendmentId}`;
41224
41911
  }, 5000);
41225
41912
  return () => clearTimeout(timer);
41226
41913
  }, [goToAppDetailsPage]);
41227
41914
  const onFormSubmit = d => {
41228
- var _state4, _state4$data;
41915
+ var _state5, _state5$data;
41229
41916
  const data = {
41230
41917
  Amendment: {
41231
41918
  consumerCode: connectionNumber,
@@ -41252,17 +41939,17 @@ const ApplicationBillAmendment = () => {
41252
41939
  }
41253
41940
  }
41254
41941
  };
41255
- if (((_state4 = state) === null || _state4 === void 0 ? void 0 : (_state4$data = _state4.data) === null || _state4$data === void 0 ? void 0 : _state4$data.action) === "RE-SUBMIT-APPLICATION") {
41256
- var _state5, _state5$data, _state5$data$applicat, _state5$data$applicat2, _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2, _state7, _state7$data, _state7$data$applicat, _state7$data$applicat2, _state8, _state8$data, _state8$data$applicat, _state8$data$applicat2;
41942
+ 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") {
41943
+ var _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2, _state7, _state7$data, _state7$data$applicat, _state7$data$applicat2;
41257
41944
  const workflow = {
41258
- businessId: (_state5 = state) === null || _state5 === void 0 ? void 0 : (_state5$data = _state5.data) === null || _state5$data === void 0 ? void 0 : (_state5$data$applicat = _state5$data.applicationDetails) === null || _state5$data$applicat === void 0 ? void 0 : (_state5$data$applicat2 = _state5$data$applicat.amendment) === null || _state5$data$applicat2 === void 0 ? void 0 : _state5$data$applicat2.amendmentId,
41945
+ 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,
41259
41946
  action: "RE-SUBMIT",
41260
41947
  tenantId: tenantId,
41261
- businessService: ((_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.applicationData) === null || _state6$data$applicat2 === void 0 ? void 0 : _state6$data$applicat2.serviceType) === "WATER" ? "WS.AMENDMENT" : "SW.AMENDMENT",
41262
- moduleName: ((_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.serviceType) === "WATER" ? "WS" : "SW"
41948
+ businessService: "WS.AMENDMENT",
41949
+ moduleName: "WS"
41263
41950
  };
41264
41951
  const AmendmentUpdate = {
41265
- ...((_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.applicationData) === null || _state8$data$applicat2 === void 0 ? void 0 : _state8$data$applicat2.billAmendmentDetails),
41952
+ ...((_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),
41266
41953
  workflow,
41267
41954
  ...(data === null || data === void 0 ? void 0 : data.Amendment)
41268
41955
  };
@@ -41284,7 +41971,7 @@ const ApplicationBillAmendment = () => {
41284
41971
  if (variables !== null && variables !== void 0 && (_variables$AmendmentU = variables.AmendmentUpdate) !== null && _variables$AmendmentU !== void 0 && (_variables$AmendmentU2 = _variables$AmendmentU.workflow) !== null && _variables$AmendmentU2 !== void 0 && _variables$AmendmentU2.action.includes("RE-SUBMIT")) {
41285
41972
  setShowToast({
41286
41973
  key: "success",
41287
- label: t("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41974
+ label: t("ES_MODIFYWSCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41288
41975
  });
41289
41976
  }
41290
41977
  setGoToAppDetailsPage(true);
@@ -41315,13 +42002,16 @@ const ApplicationBillAmendment = () => {
41315
42002
  var _ob$taxHeadCode2;
41316
42003
  return !(ob !== null && ob !== void 0 && (_ob$taxHeadCode2 = ob.taxHeadCode) !== null && _ob$taxHeadCode2 !== void 0 && _ob$taxHeadCode2.includes("ADHOC"));
41317
42004
  });
42005
+ const onFormError = formErrors => {
42006
+ console.warn("Bill Amendment form errors:", formErrors);
42007
+ };
41318
42008
  return /*#__PURE__*/React.createElement("form", {
41319
- onSubmit: handleSubmit(onFormSubmit)
42009
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41320
42010
  }, /*#__PURE__*/React.createElement("div", {
41321
42011
  style: {
41322
42012
  marginLeft: "20px"
41323
42013
  }
41324
- }, /*#__PURE__*/React.createElement(Header, null, (_state9 = state) !== null && _state9 !== void 0 && (_state9$data = _state9.data) !== null && _state9$data !== void 0 && _state9$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, {
42014
+ }, /*#__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, {
41325
42015
  style: {
41326
42016
  marginBottom: "20px"
41327
42017
  }
@@ -41365,74 +42055,108 @@ const ApplicationBillAmendment = () => {
41365
42055
  name: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41366
42056
  key: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41367
42057
  control: control,
42058
+ defaultValue: false,
41368
42059
  rules: {
41369
42060
  validate: value => {
41370
- return !!value || (servicev1 === "WS" ? !!(WS_ADDITIONAL_AMOUNT !== null && WS_ADDITIONAL_AMOUNT !== void 0 && WS_ADDITIONAL_AMOUNT.VALUE) : !!(SW_ADDITIONAL_AMOUNT !== null && SW_ADDITIONAL_AMOUNT !== void 0 && SW_ADDITIONAL_AMOUNT.VALUE));
42061
+ return !!value || ischeckedAddition || !!getValues(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`);
41371
42062
  }
41372
42063
  },
41373
- render: props => {
41374
- var _state0, _state0$data, _state0$data$applicat, _state0$data$applicat2, _state0$data$applicat3, _state0$data$applicat4, _state0$data$applicat5, _state1, _state1$data, _state1$data$applicat, _state1$data$applicat2, _state1$data$applicat3, _state1$data$applicat4, _state1$data$applicat5;
42064
+ render: _ref2 => {
42065
+ let {
42066
+ value,
42067
+ onChange
42068
+ } = _ref2;
41375
42069
  return /*#__PURE__*/React.createElement("div", {
41376
42070
  style: {
41377
- paddingTop: "20px"
42071
+ paddingTop: "20px",
42072
+ marginLeft: "35px",
42073
+ cursor: "pointer"
42074
+ },
42075
+ onClick: e => {
42076
+ if (e.target.tagName !== "INPUT") {
42077
+ const nextVal = !value;
42078
+ onChange(nextVal);
42079
+ setischeckedReduce(nextVal);
42080
+ if (nextVal) {
42081
+ setischeckedAddition(false);
42082
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
42083
+ setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
42084
+ }
42085
+ }
41378
42086
  }
41379
42087
  }, /*#__PURE__*/React.createElement(CheckBox, {
41380
- style: {
41381
- "marginLeft": "35px"
41382
- },
41383
42088
  label: t(`${servicev1}_REDUCED_AMOUNT`),
42089
+ checked: !!value,
41384
42090
  onChange: e => {
41385
- if (e.target.checked) {
41386
- props.onChange(true);
41387
- setischeckedReduce(true);
42091
+ const isChecked = e.target.checked;
42092
+ onChange(isChecked);
42093
+ setischeckedReduce(isChecked);
42094
+ if (isChecked) {
41388
42095
  setischeckedAddition(false);
42096
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
41389
42097
  setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
41390
- } else {
41391
- setischeckedReduce(false);
41392
- props.onChange(false);
41393
42098
  }
41394
- },
41395
- disable: isEdit && (((_state0 = state) === null || _state0 === void 0 ? void 0 : (_state0$data = _state0.data) === null || _state0$data === void 0 ? void 0 : (_state0$data$applicat = _state0$data.applicationDetails) === null || _state0$data$applicat === void 0 ? void 0 : (_state0$data$applicat2 = _state0$data$applicat.amendment) === null || _state0$data$applicat2 === void 0 ? void 0 : (_state0$data$applicat3 = _state0$data$applicat2.additionalDetails) === null || _state0$data$applicat3 === void 0 ? void 0 : (_state0$data$applicat4 = _state0$data$applicat3.editForm) === null || _state0$data$applicat4 === void 0 ? void 0 : (_state0$data$applicat5 = _state0$data$applicat4["WS_REDUCED_AMOUNT"]) === null || _state0$data$applicat5 === void 0 ? void 0 : _state0$data$applicat5["VALUE"]) == false || ((_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.amendment) === null || _state1$data$applicat2 === void 0 ? void 0 : (_state1$data$applicat3 = _state1$data$applicat2.additionalDetails) === null || _state1$data$applicat3 === void 0 ? void 0 : (_state1$data$applicat4 = _state1$data$applicat3.editForm) === null || _state1$data$applicat4 === void 0 ? void 0 : (_state1$data$applicat5 = _state1$data$applicat4["SW_REDUCED_AMOUNT"]) === null || _state1$data$applicat5 === void 0 ? void 0 : _state1$data$applicat5["VALUE"]) == false) ? true : false,
41396
- checked: props === null || props === void 0 ? void 0 : props.value
42099
+ }
41397
42100
  }));
41398
42101
  }
41399
- }), errors !== null && errors !== void 0 && (_errors$WS_REDUCED_AM = errors.WS_REDUCED_AMOUNT) !== null && _errors$WS_REDUCED_AM !== void 0 && _errors$WS_REDUCED_AM.VALUE && ischeckedReduce == true ? /*#__PURE__*/React.createElement(CardLabelError, null, t("WS_REQUIRED_FIELD")) : null)), /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Controller, {
42102
+ }), errors !== null && errors !== void 0 && (_errors$WS_REDUCED_AM = errors.WS_REDUCED_AMOUNT) !== null && _errors$WS_REDUCED_AM !== void 0 && _errors$WS_REDUCED_AM.VALUE && !ischeckedAddition && !ischeckedReduce ? /*#__PURE__*/React.createElement(CardLabelError, {
42103
+ style: {
42104
+ marginLeft: "35px"
42105
+ }
42106
+ }, t("WS_REQUIRED_FIELD")) : null)), /*#__PURE__*/React.createElement("th", null, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Controller, {
41400
42107
  name: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41401
42108
  key: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41402
42109
  control: control,
42110
+ defaultValue: false,
41403
42111
  rules: {
41404
42112
  validate: value => {
41405
- return !!value || (servicev1 === "WS" ? !!(WS_REDUCED_AMOUNT !== null && WS_REDUCED_AMOUNT !== void 0 && WS_REDUCED_AMOUNT.VALUE) : !!(SW_REDUCED_AMOUNT !== null && SW_REDUCED_AMOUNT !== void 0 && SW_REDUCED_AMOUNT.VALUE));
42113
+ return !!value || ischeckedReduce || !!getValues(`${servicev1}_REDUCED_AMOUNT.VALUE`);
41406
42114
  }
41407
42115
  },
41408
- render: props => {
41409
- var _state10, _state10$data, _state10$data$applica, _state10$data$applica2, _state10$data$applica3, _state10$data$applica4, _state10$data$applica5, _state11, _state11$data, _state11$data$applica, _state11$data$applica2, _state11$data$applica3, _state11$data$applica4, _state11$data$applica5;
42116
+ render: _ref3 => {
42117
+ let {
42118
+ value,
42119
+ onChange
42120
+ } = _ref3;
41410
42121
  return /*#__PURE__*/React.createElement("div", {
41411
42122
  style: {
41412
- paddingTop: "17px"
42123
+ paddingTop: "17px",
42124
+ marginLeft: "35px",
42125
+ cursor: "pointer"
42126
+ },
42127
+ onClick: e => {
42128
+ if (e.target.tagName !== "INPUT") {
42129
+ const nextVal = !value;
42130
+ onChange(nextVal);
42131
+ setischeckedAddition(nextVal);
42132
+ if (nextVal) {
42133
+ setischeckedReduce(false);
42134
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
42135
+ setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
42136
+ }
42137
+ }
41413
42138
  }
41414
42139
  }, /*#__PURE__*/React.createElement(CheckBox, {
41415
- style: {
41416
- "marginLeft": "35px"
41417
- },
41418
42140
  label: t(`${servicev1}_ADDITIONAL_AMOUNT`),
42141
+ checked: !!value,
41419
42142
  onChange: e => {
41420
- if (e.target.checked) {
41421
- props.onChange(true);
41422
- setischeckedAddition(true);
42143
+ const isChecked = e.target.checked;
42144
+ onChange(isChecked);
42145
+ setischeckedAddition(isChecked);
42146
+ if (isChecked) {
41423
42147
  setischeckedReduce(false);
42148
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
41424
42149
  setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
41425
- } else {
41426
- setischeckedAddition(false);
41427
- props.onChange(false);
41428
42150
  }
41429
- },
41430
- disable: isEdit && (((_state10 = state) === null || _state10 === void 0 ? void 0 : (_state10$data = _state10.data) === null || _state10$data === void 0 ? void 0 : (_state10$data$applica = _state10$data.applicationDetails) === null || _state10$data$applica === void 0 ? void 0 : (_state10$data$applica2 = _state10$data$applica.amendment) === null || _state10$data$applica2 === void 0 ? void 0 : (_state10$data$applica3 = _state10$data$applica2.additionalDetails) === null || _state10$data$applica3 === void 0 ? void 0 : (_state10$data$applica4 = _state10$data$applica3.editForm) === null || _state10$data$applica4 === void 0 ? void 0 : (_state10$data$applica5 = _state10$data$applica4["WS_ADDITIONAL_AMOUNT"]) === null || _state10$data$applica5 === void 0 ? void 0 : _state10$data$applica5["VALUE"]) == false || ((_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$applica3 = _state11$data$applica2.additionalDetails) === null || _state11$data$applica3 === void 0 ? void 0 : (_state11$data$applica4 = _state11$data$applica3.editForm) === null || _state11$data$applica4 === void 0 ? void 0 : (_state11$data$applica5 = _state11$data$applica4["WS_ADDITIONAL_AMOUNT"]) === null || _state11$data$applica5 === void 0 ? void 0 : _state11$data$applica5["VALUE"]) == false) ? true : false,
41431
- checked: props === null || props === void 0 ? void 0 : props.value
42151
+ }
41432
42152
  }));
41433
42153
  }
41434
- }), errors !== null && errors !== void 0 && (_errors$WS_ADDITIONAL = errors.WS_ADDITIONAL_AMOUNT) !== null && _errors$WS_ADDITIONAL !== void 0 && _errors$WS_ADDITIONAL.VALUE && ischeckedAddition == true ? /*#__PURE__*/React.createElement(CardLabelError, null, t("WS_REQUIRED_FIELD")) : null))), (_billSearchData3 = billSearchData) === null || _billSearchData3 === void 0 ? void 0 : _billSearchData3.map(node => {
41435
- var _errors$WS_REDUCED_AM2, _errors$WS_REDUCED_AM3, _errors$WS_REDUCED_AM4, _errors$SW_REDUCED_AM, _errors$SW_REDUCED_AM2, _errors$WS_ADDITIONAL2, _errors$WS_ADDITIONAL3, _errors$WS_ADDITIONAL4, _errors$SW_ADDITIONAL, _errors$SW_ADDITIONAL2, _errors$SW_ADDITIONAL3;
42154
+ }), errors !== null && errors !== void 0 && (_errors$WS_ADDITIONAL = errors.WS_ADDITIONAL_AMOUNT) !== null && _errors$WS_ADDITIONAL !== void 0 && _errors$WS_ADDITIONAL.VALUE && !ischeckedReduce && !ischeckedAddition ? /*#__PURE__*/React.createElement(CardLabelError, {
42155
+ style: {
42156
+ marginLeft: "35px"
42157
+ }
42158
+ }, t("WS_REQUIRED_FIELD")) : null))), (_billSearchData3 = billSearchData) === null || _billSearchData3 === void 0 ? void 0 : _billSearchData3.map(node => {
42159
+ var _errors$WS_REDUCED_AM2, _errors$WS_REDUCED_AM3, _errors$WS_REDUCED_AM4, _errors$WS_ADDITIONAL2, _errors$WS_ADDITIONAL3, _errors$WS_ADDITIONAL4;
41436
42160
  return /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
41437
42161
  style: {
41438
42162
  paddingRight: "60px",
@@ -41448,7 +42172,7 @@ const ApplicationBillAmendment = () => {
41448
42172
  paddingLeft: "150px"
41449
42173
  }
41450
42174
  }, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput, {
41451
- disabled: servicev1 === "WS" ? !(WS_REDUCED_AMOUNT !== null && WS_REDUCED_AMOUNT !== void 0 && WS_REDUCED_AMOUNT.VALUE) : !(SW_REDUCED_AMOUNT !== null && SW_REDUCED_AMOUNT !== void 0 && SW_REDUCED_AMOUNT.VALUE),
42175
+ disabled: !ischeckedReduce,
41452
42176
  type: "number",
41453
42177
  name: `${servicev1}_REDUCED_AMOUNT.${node.taxHeadCode}`,
41454
42178
  inputRef: register({
@@ -41461,24 +42185,18 @@ const ApplicationBillAmendment = () => {
41461
42185
  message: t("CS_INVALID_INPUT")
41462
42186
  }
41463
42187
  })
41464
- }))), servicev1 === "WS" ? (errors === null || errors === void 0 ? void 0 : (_errors$WS_REDUCED_AM2 = errors.WS_REDUCED_AMOUNT) === null || _errors$WS_REDUCED_AM2 === void 0 ? void 0 : _errors$WS_REDUCED_AM2[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
42188
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$WS_REDUCED_AM2 = errors.WS_REDUCED_AMOUNT) === null || _errors$WS_REDUCED_AM2 === void 0 ? void 0 : _errors$WS_REDUCED_AM2[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
41465
42189
  style: {
41466
42190
  marginBottom: "-20px",
41467
42191
  marginTop: "-30px",
41468
42192
  marginLeft: "150px"
41469
42193
  }
41470
- }, errors === null || errors === void 0 ? void 0 : (_errors$WS_REDUCED_AM3 = errors.WS_REDUCED_AMOUNT) === null || _errors$WS_REDUCED_AM3 === void 0 ? void 0 : (_errors$WS_REDUCED_AM4 = _errors$WS_REDUCED_AM3[node.taxHeadCode]) === null || _errors$WS_REDUCED_AM4 === void 0 ? void 0 : _errors$WS_REDUCED_AM4.message) : (errors === null || errors === void 0 ? void 0 : (_errors$SW_REDUCED_AM = errors.SW_REDUCED_AMOUNT) === null || _errors$SW_REDUCED_AM === void 0 ? void 0 : _errors$SW_REDUCED_AM[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
41471
- style: {
41472
- marginBottom: "-20px",
41473
- marginTop: "-30px",
41474
- marginLeft: "150px"
41475
- }
41476
- }, errors === null || errors === void 0 ? void 0 : (_errors$SW_REDUCED_AM2 = errors.SW_REDUCED_AMOUNT) === null || _errors$SW_REDUCED_AM2 === void 0 ? void 0 : _errors$SW_REDUCED_AM2[node.taxHeadCode].message)), /*#__PURE__*/React.createElement("td", {
42194
+ }, errors === null || errors === void 0 ? void 0 : (_errors$WS_REDUCED_AM3 = errors.WS_REDUCED_AMOUNT) === null || _errors$WS_REDUCED_AM3 === void 0 ? void 0 : (_errors$WS_REDUCED_AM4 = _errors$WS_REDUCED_AM3[node.taxHeadCode]) === null || _errors$WS_REDUCED_AM4 === void 0 ? void 0 : _errors$WS_REDUCED_AM4.message)), /*#__PURE__*/React.createElement("td", {
41477
42195
  style: {
41478
42196
  paddingRight: "60px"
41479
42197
  }
41480
42198
  }, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput, {
41481
- disabled: servicev1 === "WS" ? !(WS_ADDITIONAL_AMOUNT !== null && WS_ADDITIONAL_AMOUNT !== void 0 && WS_ADDITIONAL_AMOUNT.VALUE) : !(SW_ADDITIONAL_AMOUNT !== null && SW_ADDITIONAL_AMOUNT !== void 0 && SW_ADDITIONAL_AMOUNT.VALUE),
42199
+ disabled: !ischeckedAddition,
41482
42200
  type: "number",
41483
42201
  name: `${servicev1}_ADDITIONAL_AMOUNT.${node.taxHeadCode}`,
41484
42202
  inputRef: register({
@@ -41487,15 +42205,11 @@ const ApplicationBillAmendment = () => {
41487
42205
  message: t("CS_INVALID_INPUT")
41488
42206
  }
41489
42207
  })
41490
- })), servicev1 === "WS" ? (errors === null || errors === void 0 ? void 0 : (_errors$WS_ADDITIONAL2 = errors.WS_ADDITIONAL_AMOUNT) === null || _errors$WS_ADDITIONAL2 === void 0 ? void 0 : _errors$WS_ADDITIONAL2[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
42208
+ })), (errors === null || errors === void 0 ? void 0 : (_errors$WS_ADDITIONAL2 = errors.WS_ADDITIONAL_AMOUNT) === null || _errors$WS_ADDITIONAL2 === void 0 ? void 0 : _errors$WS_ADDITIONAL2[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
41491
42209
  style: {
41492
42210
  marginTop: "-19px"
41493
42211
  }
41494
- }, errors === null || errors === void 0 ? void 0 : (_errors$WS_ADDITIONAL3 = errors.WS_ADDITIONAL_AMOUNT) === null || _errors$WS_ADDITIONAL3 === void 0 ? void 0 : (_errors$WS_ADDITIONAL4 = _errors$WS_ADDITIONAL3[node.taxHeadCode]) === null || _errors$WS_ADDITIONAL4 === void 0 ? void 0 : _errors$WS_ADDITIONAL4.message) : (errors === null || errors === void 0 ? void 0 : (_errors$SW_ADDITIONAL = errors.SW_ADDITIONAL_AMOUNT) === null || _errors$SW_ADDITIONAL === void 0 ? void 0 : _errors$SW_ADDITIONAL[node.taxHeadCode]) && /*#__PURE__*/React.createElement(CardLabelError, {
41495
- style: {
41496
- marginTop: "-19px"
41497
- }
41498
- }, errors === null || errors === void 0 ? void 0 : (_errors$SW_ADDITIONAL2 = errors.SW_ADDITIONAL_AMOUNT) === null || _errors$SW_ADDITIONAL2 === void 0 ? void 0 : (_errors$SW_ADDITIONAL3 = _errors$SW_ADDITIONAL2[node.taxHeadCode]) === null || _errors$SW_ADDITIONAL3 === void 0 ? void 0 : _errors$SW_ADDITIONAL3.message)));
42212
+ }, errors === null || errors === void 0 ? void 0 : (_errors$WS_ADDITIONAL3 = errors.WS_ADDITIONAL_AMOUNT) === null || _errors$WS_ADDITIONAL3 === void 0 ? void 0 : (_errors$WS_ADDITIONAL4 = _errors$WS_ADDITIONAL3[node.taxHeadCode]) === null || _errors$WS_ADDITIONAL4 === void 0 ? void 0 : _errors$WS_ADDITIONAL4.message)));
41499
42213
  }), /*#__PURE__*/React.createElement("tr", null, /*#__PURE__*/React.createElement("td", {
41500
42214
  style: {
41501
42215
  paddingRight: "60px",
@@ -41526,7 +42240,7 @@ const ApplicationBillAmendment = () => {
41526
42240
  paddingLeft: "150px"
41527
42241
  }
41528
42242
  }, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput, {
41529
- disabled: servicev1 === "WS" ? !(WS_REDUCED_AMOUNT !== null && WS_REDUCED_AMOUNT !== void 0 && WS_REDUCED_AMOUNT.VALUE) : !(SW_REDUCED_AMOUNT !== null && SW_REDUCED_AMOUNT !== void 0 && SW_REDUCED_AMOUNT.VALUE),
42243
+ disabled: !ischeckedReduce,
41530
42244
  name: `${servicev1}_REBATE`,
41531
42245
  inputRef: register()
41532
42246
  }))), /*#__PURE__*/React.createElement("td", {
@@ -41534,7 +42248,7 @@ const ApplicationBillAmendment = () => {
41534
42248
  paddingRight: "60px"
41535
42249
  }
41536
42250
  }, /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(TextInput, {
41537
- disabled: servicev1 === "WS" ? !(WS_ADDITIONAL_AMOUNT !== null && WS_ADDITIONAL_AMOUNT !== void 0 && WS_ADDITIONAL_AMOUNT.VALUE) : !(SW_ADDITIONAL_AMOUNT !== null && SW_ADDITIONAL_AMOUNT !== void 0 && SW_ADDITIONAL_AMOUNT.VALUE),
42251
+ disabled: !ischeckedAddition,
41538
42252
  name: `${servicev1}_PENALTY`,
41539
42253
  inputRef: register()
41540
42254
  }))))))) : /*#__PURE__*/React.createElement(Loader, null), BillAmendmentMDMSLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
@@ -41713,8 +42427,8 @@ const ApplicationBillAmendment = () => {
41713
42427
  onClose: closeToast
41714
42428
  }) : null, /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
41715
42429
  submit: true,
41716
- label: (_state12 = state) !== null && _state12 !== void 0 && (_state12$data = _state12.data) !== null && _state12$data !== void 0 && _state12$data.action ? t("WF_CITIZEN_NEWSW1_RESUBMIT_APPLICATION") : t("WS_COMMON_BUTTON_SUBMIT"),
41717
- disabled: servicev1 == "WS" && ischeckedReduce && (getValues().WS_REDUCED_AMOUNT.WS_CHARGE == "" || getValues().WS_REDUCED_AMOUNT.WS_CHARGE == null) && (getValues().WS_REDUCED_AMOUNT.WS_TIME_PENALTY == "" || getValues().WS_REDUCED_AMOUNT.WS_TIME_PENALTY == null) && (getValues().WS_REDUCED_AMOUNT.WS_TIME_INTEREST == "" || getValues().WS_REDUCED_AMOUNT.WS_TIME_INTEREST == null) && (getValues().WS_REDUCED_AMOUNT.WS_WATER_CESS == "" || getValues().WS_REDUCED_AMOUNT.WS_WATER_CESS == null) || servicev1 == "SW" && ischeckedReduce && (getValues().SW_REDUCED_AMOUNT.SW_CHARGE == "" || getValues().SW_REDUCED_AMOUNT.SW_CHARGE == null) && (getValues().SW_REDUCED_AMOUNT.SW_TIME_PENALTY == "" || getValues().SW_REDUCED_AMOUNT.SW_TIME_PENALTY == null) && (getValues().SW_REDUCED_AMOUNT.SW_TIME_INTEREST == "" || getValues().SW_REDUCED_AMOUNT.SW_TIME_INTEREST == null) && (getValues().SW_REDUCED_AMOUNT.SW_SEWERAGE_CESS == "" || getValues().SW_REDUCED_AMOUNT.SW_SEWERAGE_CESS == null) || servicev1 == "WS" && ischeckedAddition && (getValues().WS_ADDITIONAL_AMOUNT.WS_CHARGE == "" || getValues().WS_ADDITIONAL_AMOUNT.WS_CHARGE == null) && (getValues().WS_ADDITIONAL_AMOUNT.WS_TIME_PENALTY == "" || getValues().WS_ADDITIONAL_AMOUNT.WS_TIME_PENALTY == null) && (getValues().WS_ADDITIONAL_AMOUNT.WS_TIME_INTEREST == "" || getValues().WS_ADDITIONAL_AMOUNT.WS_TIME_INTEREST == null) && (getValues().WS_ADDITIONAL_AMOUNT.WS_WATER_CESS == "" || getValues().WS_ADDITIONAL_AMOUNT.WS_WATER_CESS == null) || servicev1 == "SW" && ischeckedAddition && (getValues().SW_ADDITIONAL_AMOUNT.SW_CHARGE == "" || getValues().SW_ADDITIONAL_AMOUNT.SW_CHARGE == null) && (getValues().SW_ADDITIONAL_AMOUNT.SW_TIME_PENALTY == "" || getValues().SW_ADDITIONAL_AMOUNT.SW_TIME_PENALTY == null) && (getValues().SW_ADDITIONAL_AMOUNT.SW_TIME_INTEREST == "" || getValues().SW_ADDITIONAL_AMOUNT.SW_TIME_INTEREST == null) && (getValues().SW_ADDITIONAL_AMOUNT.SW_SEWERAGE_CESS == "" || getValues().SW_ADDITIONAL_AMOUNT.SW_SEWERAGE_CESS == null)
42430
+ 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"),
42431
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41718
42432
  })));
41719
42433
  };
41720
42434
 
@@ -41923,7 +42637,7 @@ const createOption = (code, name) => ({
41923
42637
  code,
41924
42638
  name
41925
42639
  });
41926
- const PROPERTY_CATEGORY_OPTIONS = [createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
42640
+ const PROPERTY_CATEGORY_OPTIONS = [createOption("RESIDENTIAL", "Residential"), createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
41927
42641
  const PROPERTY_TYPE_OPTIONS = [createOption("APARTMENT", "Apartment"), createOption("BANQUET_HALL", "Banquet Hall"), createOption("BUNGALOWS", "Bungalows"), createOption("DDA_FLATS", "DDA flats"), createOption("DHARAMSHALAS_HOSTELS", "Dharamshalas or Hostels"), createOption("GOVT_FLATS", "Govt. Flats"), createOption("GROUP_HOUSING_SOCIETY", "Group Housing Society"), createOption("HOTEL_GUEST_HOUSES", "Hotel or Guest Houses"), createOption("INDIVIDUAL_HOUSE", "Individual House"), createOption("MALL_CINEPLEX", "Mall or Cineplex"), createOption("OFFICE_COMPLEX", "Office complex"), createOption("SCHOOL", "School"), createOption("HOSPITAL_NURSING_HOME", "Hospital/Nursing Home")];
41928
42642
  const USAGE_TYPE_OPTIONS = [createOption("BSES_RAJDHANI", "B.S.E.S. RAJDHANI"), createOption("BSES_YAMUNA", "B.S.E.S. YAMUNA"), createOption("BANQUET_HALL_PARTY_HALL", "Banquet hall/ Party hall"), createOption("BEAUTY_PARLORS", "Beauty Parlors"), createOption("BLIND_SCHOOLS", "Blind Schools"), createOption("BOTTLING_PLANT", "Bottling Plant"), createOption("CPWD", "C.P.W.D."), createOption("CENTRAL_GOVT_OFFICES", "Central Govt. Offices"), createOption("CINEPLEX", "Cineplex"), createOption("CLINIC_PATHLAB", "Clinic/Pathlab"), createOption("COOP_GROUP_HOUSING", "Co-operative Group Housing Society"), createOption("COLD_STORAGE", "Cold Storage"), createOption("COLOUR_DYE_SHOP", "Colour Dye shop/factory"), createOption("COOLING_PLANT", "Cooling Plant"), createOption("COURTS", "Courts"), createOption("DSIIDC", "D.S.I.I.D.C"), createOption("DDA", "Delhi Development Authority"), createOption("DELHI_FIRE_SERVICE", "Delhi Fire Service (Fire Station)"), createOption("DELHI_GOVT_OFFICE", "Delhi Govt. Office")];
41929
42643
  const NO_OF_FLOORS_OPTIONS = [createOption("BASEMENT", "Basement"), createOption("GROUND_FLOOR", "Ground Floor"), createOption("1_FLOOR", "1 Floor"), createOption("2_FLOOR", "2 Floor"), createOption("3_FLOOR", "3 Floor"), createOption("4_FLOOR", "4 Floor"), createOption("5_FLOOR", "5 Floor"), createOption("6_FLOOR", "6 Floor")];
@@ -42598,7 +43312,7 @@ const FileUploadField = _ref6 => {
42598
43312
  })))));
42599
43313
  };
42600
43314
  const NewApplication = () => {
42601
- var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch4, _watch6, _watch8, _watch0, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$disabilit, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$useDetail12, _formValues$useDetail13, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4, _formValues$declarati5;
43315
+ var _Digit$SessionStorage, _getFieldError, _getFieldError2, _getFieldError3, _getFieldError4, _getFieldError5, _getFieldError6, _getFieldError7, _getFieldError8, _getFieldError9, _getFieldError0, _getFieldError1, _getFieldError10, _getFieldError11, _watch, _watch3, _watch4, _watch6, _watch8, _watch0, _formValues$applicati, _formValues$applicati2, _formValues$applicati3, _formValues$applicati4, _formValues$applicati5, _formValues$applicati6, _formValues$applicati7, _formValues$applicati8, _formValues$applicati9, _formValues$applicati0, _formValues$applicati1, _formValues$applicati10, _formValues$applicati11, _formValues$applicati12, _formValues$applicati13, _formValues$applicati14, _formValues$applicati15, _formValues$applicati16, _formValues$applicati17, _formValues$applicati18, _formValues$applicati19, _formValues$applicati20, _formValues$applicati21, _formValues$applicati22, _formValues$applicati23, _formValues$applicant, _formValues$applicant2, _formValues$applicant3, _formValues$applicant4, _formValues$applicant5, _formValues$applicant6, _formValues$applicant7, _formValues$useDetail, _formValues$applicant8, _formValues$contact, _formValues$contact2, _formValues$contact3, _formValues$documents, _formValues$djbEmploy, _formValues$djbEmploy2, _formValues$djbEmploy3, _formValues$djbEmploy4, _formValues$disabilit, _formValues$governmen, _formValues$governmen2, _formValues$governmen3, _formValues$governmen4, _formValues$propertyA, _formValues$propertyA2, _formValues$propertyA3, _formValues$propertyA4, _formValues$propertyA5, _formValues$propertyA6, _formValues$propertyA7, _formValues$propertyA8, _formValues$propertyA9, _formValues$propertyA0, _formValues$propertyA1, _formValues$useDetail2, _formValues$useDetail3, _formValues$useDetail4, _formValues$useDetail5, _formValues$useDetail6, _formValues$useDetail7, _formValues$useDetail8, _formValues$useDetail9, _formValues$useDetail0, _formValues$useDetail1, _formValues$useDetail10, _formValues$useDetail11, _formValues$useDetail12, _formValues$useDetail13, _formValues$useDetail14, _formValues$useDetail15, _formValues$useDetail16, _formValues$documents2, _formValues$documents3, _formValues$documents4, _formValues$documents5, _formValues$documents6, _formValues$documents7, _formValues$documents8, _formValues$documents9, _formValues$documents0, _formValues$documents1, _formValues$declarati, _formValues$declarati2, _formValues$declarati3, _formValues$declarati4, _formValues$declarati5;
42602
43316
  const {
42603
43317
  t
42604
43318
  } = useTranslation();
@@ -42757,8 +43471,15 @@ const NewApplication = () => {
42757
43471
  const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
42758
43472
  const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
42759
43473
  const selectedPropertyType = watch("useDetails.propertyType");
42760
- const dwellingPropertyTypes = ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse", "BuiltUp.GroupHousingSociety", "BuiltUp.JJSLUMS", "BuiltUp.IndividualHouse"];
42761
- const isDwellingUnit = dwellingPropertyTypes.includes(selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code);
43474
+ const selectedPropertyCategory = watch("useDetails.propertyCategory");
43475
+ const isResidential = String((selectedPropertyCategory === null || selectedPropertyCategory === void 0 ? void 0 : selectedPropertyCategory.code) || (selectedPropertyCategory === null || selectedPropertyCategory === void 0 ? void 0 : selectedPropertyCategory.name) || selectedPropertyCategory || "").toUpperCase().includes("RESIDENTIAL");
43476
+ const isDwellingUnit = isResidential;
43477
+ useEffect(() => {
43478
+ if (!isDwellingUnit) {
43479
+ setValue("useDetails.NumberofDwellingUnits", "");
43480
+ clearErrors("useDetails.NumberofDwellingUnits");
43481
+ }
43482
+ }, [isDwellingUnit]);
42762
43483
  const selectedLocality = watch("propertyAddress.locality");
42763
43484
  const selectedSubLocality = watch("propertyAddress.subLocality");
42764
43485
  const pCode = watch("propertyAddress.pinCode");
@@ -44874,18 +45595,18 @@ const NewApplication = () => {
44874
45595
  }), /*#__PURE__*/React.createElement(PreviewItem, {
44875
45596
  label: "Number of Floors",
44876
45597
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.noOfFloors
44877
- }), dwellingPropertyTypes.includes(formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : (_formValues$useDetail7 = _formValues$useDetail6.propertyType) === null || _formValues$useDetail7 === void 0 ? void 0 : _formValues$useDetail7.code) ? /*#__PURE__*/React.createElement(PreviewItem, {
45598
+ }), String((formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail6 = formValues.useDetails) === null || _formValues$useDetail6 === void 0 ? void 0 : (_formValues$useDetail7 = _formValues$useDetail6.propertyCategory) === null || _formValues$useDetail7 === void 0 ? void 0 : _formValues$useDetail7.code) || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail8 = formValues.useDetails) === null || _formValues$useDetail8 === void 0 ? void 0 : (_formValues$useDetail9 = _formValues$useDetail8.propertyCategory) === null || _formValues$useDetail9 === void 0 ? void 0 : _formValues$useDetail9.name) || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail0 = formValues.useDetails) === null || _formValues$useDetail0 === void 0 ? void 0 : _formValues$useDetail0.propertyCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(PreviewItem, {
44878
45599
  label: "Number of Dwelling Units",
44879
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail8 = formValues.useDetails) === null || _formValues$useDetail8 === void 0 ? void 0 : _formValues$useDetail8.NumberofDwellingUnits
44880
- }) : null, (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail9 = formValues.useDetails) === null || _formValues$useDetail9 === void 0 ? void 0 : (_formValues$useDetail0 = _formValues$useDetail9.propertyType) === null || _formValues$useDetail0 === void 0 ? void 0 : _formValues$useDetail0.code) === "HOSPITAL" || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : (_formValues$useDetail10 = _formValues$useDetail1.propertyType) === null || _formValues$useDetail10 === void 0 ? void 0 : _formValues$useDetail10.code) === "HOSPITAL_NURSING_HOME" ? /*#__PURE__*/React.createElement(PreviewItem, {
45600
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.NumberofDwellingUnits
45601
+ }) : null, (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail10 = formValues.useDetails) === null || _formValues$useDetail10 === void 0 ? void 0 : (_formValues$useDetail11 = _formValues$useDetail10.propertyType) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.code) === "HOSPITAL" || (formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail12 = formValues.useDetails) === null || _formValues$useDetail12 === void 0 ? void 0 : (_formValues$useDetail13 = _formValues$useDetail12.propertyType) === null || _formValues$useDetail13 === void 0 ? void 0 : _formValues$useDetail13.code) === "HOSPITAL_NURSING_HOME" ? /*#__PURE__*/React.createElement(PreviewItem, {
44881
45602
  label: "No. of Beds",
44882
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail11 = formValues.useDetails) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.hospitalBeds
45603
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail14 = formValues.useDetails) === null || _formValues$useDetail14 === void 0 ? void 0 : _formValues$useDetail14.hospitalBeds
44883
45604
  }) : null, /*#__PURE__*/React.createElement(PreviewItem, {
44884
45605
  label: "Year of Construction",
44885
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail12 = formValues.useDetails) === null || _formValues$useDetail12 === void 0 ? void 0 : _formValues$useDetail12.SelectYearofConstruction
45606
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail15 = formValues.useDetails) === null || _formValues$useDetail15 === void 0 ? void 0 : _formValues$useDetail15.SelectYearofConstruction
44886
45607
  }), /*#__PURE__*/React.createElement(PreviewItem, {
44887
45608
  label: "Water Connection Usage Type",
44888
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail13 = formValues.useDetails) === null || _formValues$useDetail13 === void 0 ? void 0 : _formValues$useDetail13.WaterConnectionUsageType
45609
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail16 = formValues.useDetails) === null || _formValues$useDetail16 === void 0 ? void 0 : _formValues$useDetail16.WaterConnectionUsageType
44889
45610
  })), /*#__PURE__*/React.createElement(SectionCard, {
44890
45611
  description: "Uploaded supporting documents.",
44891
45612
  isOpen: collapsedSections.documents,
@@ -51485,7 +52206,16 @@ function ApplicationDetailsContent(_ref) {
51485
52206
  if (index === void 0) {
51486
52207
  index = 0;
51487
52208
  }
51488
- if (checkpoint.state === "OPEN" || checkpoint.status === "INITIATED" && !window.location.href.includes("/obps/")) {
52209
+ let actualIndex = 0;
52210
+ let actualTimeline = [];
52211
+ if (Array.isArray(index)) {
52212
+ actualTimeline = index;
52213
+ actualIndex = 0;
52214
+ } else {
52215
+ actualIndex = typeof index === "number" ? index : 0;
52216
+ actualTimeline = Array.isArray(timeline) ? timeline : [];
52217
+ }
52218
+ if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === "OPEN" || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status) === "INITIATED" && !window.location.href.includes("/obps/")) {
51489
52219
  var _applicationData$audi;
51490
52220
  const caption = {
51491
52221
  date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime),
@@ -51495,7 +52225,7 @@ function ApplicationDetailsContent(_ref) {
51495
52225
  data: caption
51496
52226
  });
51497
52227
  } else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
51498
- var _checkpoint$assignes, _checkpoint$assignes$, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
52228
+ var _checkpoint$assignes, _checkpoint$assignes$, _actualTimeline, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
51499
52229
  const privacy = {
51500
52230
  uuid: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes = checkpoint.assignes) === null || _checkpoint$assignes === void 0 ? void 0 : (_checkpoint$assignes$ = _checkpoint$assignes[0]) === null || _checkpoint$assignes$ === void 0 ? void 0 : _checkpoint$assignes$.uuid,
51501
52231
  fieldName: "mobileNumber",
@@ -51513,12 +52243,12 @@ function ApplicationDetailsContent(_ref) {
51513
52243
  isArray: false,
51514
52244
  d: res => {
51515
52245
  let resultstring = "";
51516
- resultstring = `+91 ${_.get(res, `ProcessInstances[${index}].assignes[0].mobileNumber`)}`;
52246
+ resultstring = `+91 ${_.get(res, `ProcessInstances[${actualIndex}].assignes[0].mobileNumber`)}`;
51517
52247
  return resultstring;
51518
52248
  }
51519
52249
  }
51520
52250
  };
51521
- const previousCheckpoint = timeline[index - 1];
52251
+ const previousCheckpoint = (_actualTimeline = actualTimeline) === null || _actualTimeline === void 0 ? void 0 : _actualTimeline[actualIndex - 1];
51522
52252
  const caption = {
51523
52253
  date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
51524
52254
  name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes2 = checkpoint.assignes) === null || _checkpoint$assignes2 === void 0 ? void 0 : (_checkpoint$assignes3 = _checkpoint$assignes2[0]) === null || _checkpoint$assignes3 === void 0 ? void 0 : _checkpoint$assignes3.name,
@@ -51933,7 +52663,7 @@ function ApplicationDetailsContent(_ref) {
51933
52663
  }, t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")), workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data13 = workflowDetails.data) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.timeline && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data14 = workflowDetails.data) === null || _workflowDetails$data14 === void 0 ? void 0 : (_workflowDetails$data15 = _workflowDetails$data14.timeline) === null || _workflowDetails$data15 === void 0 ? void 0 : _workflowDetails$data15.length) === 1 ? /*#__PURE__*/React.createElement(CheckPoint, {
51934
52664
  isCompleted: true,
51935
52665
  label: t(`${timelineStatusPrefix}${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data16 = workflowDetails.data) === null || _workflowDetails$data16 === void 0 ? void 0 : (_workflowDetails$data17 = _workflowDetails$data16.timeline[0]) === null || _workflowDetails$data17 === void 0 ? void 0 : _workflowDetails$data17.state}`),
51936
- customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
52666
+ customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], 0, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
51937
52667
  }) : /*#__PURE__*/React.createElement(ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data20 = workflowDetails.data) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.timeline) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data21 = workflowDetails.data) === null || _workflowDetails$data21 === void 0 ? void 0 : _workflowDetails$data21.timeline.slice(0, showAllTimeline ? workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data.timeline.length : 2).map((checkpoint, index, arr) => {
51938
52668
  var _workflowDetails$data28;
51939
52669
  let timelineStatusPostfix = "";
@@ -52120,10 +52850,10 @@ function ApplicationDetailsActionBar(_ref) {
52120
52850
  if (completelySatisfied !== undefined) {
52121
52851
  if (completelySatisfied === true) {
52122
52852
  var _actions;
52123
- actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52853
+ actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52124
52854
  } else if (completelySatisfied === false) {
52125
52855
  var _actions2;
52126
- actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52856
+ actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52127
52857
  }
52128
52858
  }
52129
52859
  const closeMenu = () => {
@@ -52654,7 +53384,7 @@ const ApplicationDetails = props => {
52654
53384
  };
52655
53385
 
52656
53386
  const ApplicationDetails$1 = () => {
52657
- var _mdmsCommonmastersDat, _commonPayInfo, _applicationDetails$p4, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _newValueFilter$, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _reciept_data$Payment, _applicationDetails$a0, _applicationDetails$p8, _applicationDetails$p9, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data21, _workflowDetails$data22, _workflowDetails$data23, _oldData$WaterConnect, _oldData$WaterConnect2, _oldData$SewerageConn, _oldData$SewerageConn2, _applicationDetails$a23, _applicationDetails$a24, _reciept_data$Payment3, _applicationDetails$p17, _applicationDetails$p18, _applicationDetails$p19, _applicationDetails$p20, _applicationDetails$p21, _applicationDetails$p22;
53387
+ var _mdmsCommonmastersDat, _commonPayInfo, _applicationDetails$p4, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _newValueFilter$, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _workflowDetails$data, _workflowDetails$data2, _reciept_data$Payment, _applicationDetails$a0, _applicationDetails$p8, _applicationDetails$p9, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data23, _workflowDetails$data24, _workflowDetails$data25, _oldData$WaterConnect, _oldData$WaterConnect2, _oldData$SewerageConn, _oldData$SewerageConn2, _applicationDetails$a23, _applicationDetails$a24, _reciept_data$Payment3, _applicationDetails$p17, _applicationDetails$p18, _applicationDetails$p19, _applicationDetails$p20, _applicationDetails$p21, _applicationDetails$p22;
52658
53388
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
52659
53389
  try {
52660
53390
  let response = null;
@@ -52815,15 +53545,23 @@ const ApplicationDetails$1 = () => {
52815
53545
  };
52816
53546
  let dowloadOptions = [],
52817
53547
  appStatus = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a9 = applicationDetails.applicationData) === null || _applicationDetails$a9 === void 0 ? void 0 : _applicationDetails$a9.applicationStatus) || "";
52818
- const isFeePaid = (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.length) > 0 || appStatus && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && appStatus !== "PENDING_FOR_CITIZEN_ACTION" && appStatus !== "PENDING_FOR_FIELD_INSPECTION" && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "PENDING_FOR_FINAL_PAYMENT" && appStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" && appStatus !== "PENDING_APPROVAL_FOR_MUTATION";
53548
+ const timeline = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.ProcessInstances) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.processInstancesDetails) || [];
53549
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline) || [];
53550
+ const isSendBackToCitizen = Array.isArray(timeline) && timeline.some(step => (step === null || step === void 0 ? void 0 : step.action) === "SEND_BACK_TO_CITIZEN" || (step === null || step === void 0 ? void 0 : step.action) === "SEND_BACK_TO_CITIZEN_DIRECT") || Array.isArray(allTimelineSteps) && allTimelineSteps.some(step => (step === null || step === void 0 ? void 0 : step.performedAction) === "SEND_BACK_TO_CITIZEN" || (step === null || step === void 0 ? void 0 : step.performedAction) === "SEND_BACK_TO_CITIZEN_DIRECT");
53551
+ const hasPaymentInTimeline = Array.isArray(timeline) && timeline.some(step => {
53552
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
53553
+ return (step === null || step === void 0 ? void 0 : step.action) === "PAY" || (step === null || step === void 0 ? void 0 : (_step$state = step.state) === null || _step$state === void 0 ? void 0 : _step$state.state) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : (_step$state2 = step.state) === null || _step$state2 === void 0 ? void 0 : _step$state2.applicationStatus) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : (_step$state3 = step.state) === null || _step$state3 === void 0 ? void 0 : _step$state3.state) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state4 = step.state) === null || _step$state4 === void 0 ? void 0 : _step$state4.state) === "PENDING_FOR_EE_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state5 = step.state) === null || _step$state5 === void 0 ? void 0 : _step$state5.applicationStatus) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : (_step$state6 = step.state) === null || _step$state6 === void 0 ? void 0 : _step$state6.applicationStatus) === "PENDING_FOR_EE_APPROVAL";
53554
+ }) || Array.isArray(allTimelineSteps) && allTimelineSteps.some(step => (step === null || step === void 0 ? void 0 : step.performedAction) === "PAY" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_PAYMENT" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : step.state) === "PENDING_FOR_EE_APPROVAL" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_ZRO_APPROVAL" || (step === null || step === void 0 ? void 0 : step.status) === "PENDING_FOR_EE_APPROVAL");
53555
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
53556
+ const isFeePaid = (reciept_data === null || reciept_data === void 0 ? void 0 : (_reciept_data$Payment = reciept_data.Payments) === null || _reciept_data$Payment === void 0 ? void 0 : _reciept_data$Payment.length) > 0 || isCitizenActionPostPayment || appStatus && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && (appStatus !== "PENDING_FOR_CITIZEN_ACTION" || isCitizenActionPostPayment) && appStatus !== "PENDING_FOR_FIELD_INSPECTION" && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "PENDING_FOR_FINAL_PAYMENT" && appStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" && appStatus !== "PENDING_APPROVAL_FOR_MUTATION";
52819
53557
  const feeEstimationSection = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a0 = applicationDetails.applicationDetails) === null || _applicationDetails$a0 === void 0 ? void 0 : _applicationDetails$a0.find(section => (section === null || section === void 0 ? void 0 : section.title) === "WS_TASK_DETAILS_FEE_ESTIMATE");
52820
53558
  if (feeEstimationSection !== null && feeEstimationSection !== void 0 && feeEstimationSection.additionalDetails && isFeePaid) {
52821
53559
  feeEstimationSection.additionalDetails.isPaid = true;
52822
53560
  }
52823
53561
  if (workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.data && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p8 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p8 === void 0 ? void 0 : (_applicationDetails$p9 = _applicationDetails$p8[0]) === null || _applicationDetails$p9 === void 0 ? void 0 : _applicationDetails$p9.businessService) === "NewWS1" && appStatus === "PENDING_FOR_BILLING_CLERK_REVIEW") {
52824
- var _applicationDetails$p0, _applicationDetails$p1, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3;
53562
+ var _applicationDetails$p0, _applicationDetails$p1, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
52825
53563
  const plotArea = Number((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p0 = applicationDetails.propertyDetails) === null || _applicationDetails$p0 === void 0 ? void 0 : (_applicationDetails$p1 = _applicationDetails$p0.additionalDetails) === null || _applicationDetails$p1 === void 0 ? void 0 : _applicationDetails$p1.plotArea) ?? 0);
52826
- if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data = workflowDetails.data) !== null && _workflowDetails$data !== void 0 && (_workflowDetails$data2 = _workflowDetails$data.actionState) !== null && _workflowDetails$data2 !== void 0 && _workflowDetails$data2.nextActions) {
53564
+ if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data3 = workflowDetails.data) !== null && _workflowDetails$data3 !== void 0 && (_workflowDetails$data4 = _workflowDetails$data3.actionState) !== null && _workflowDetails$data4 !== void 0 && _workflowDetails$data4.nextActions) {
52827
53565
  workflowDetails.data.actionState.nextActions = workflowDetails.data.actionState.nextActions.filter(action => {
52828
53566
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52829
53567
  return plotArea > 200;
@@ -52834,7 +53572,7 @@ const ApplicationDetails$1 = () => {
52834
53572
  return true;
52835
53573
  });
52836
53574
  }
52837
- if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data3 = workflowDetails.data) !== null && _workflowDetails$data3 !== void 0 && _workflowDetails$data3.nextActions) {
53575
+ if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data5 = workflowDetails.data) !== null && _workflowDetails$data5 !== void 0 && _workflowDetails$data5.nextActions) {
52838
53576
  workflowDetails.data.nextActions = workflowDetails.data.nextActions.filter(action => {
52839
53577
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52840
53578
  return plotArea > 200;
@@ -52846,7 +53584,7 @@ const ApplicationDetails$1 = () => {
52846
53584
  });
52847
53585
  }
52848
53586
  }
52849
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data4 = workflowDetails.data) === null || _workflowDetails$data4 === void 0 ? void 0 : (_workflowDetails$data5 = _workflowDetails$data4.actionState) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.nextActions) === null || _workflowDetails$data6 === void 0 ? void 0 : _workflowDetails$data6.forEach(action => {
53587
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data6 = workflowDetails.data) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6.actionState) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.nextActions) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.forEach(action => {
52850
53588
  if ((action === null || action === void 0 ? void 0 : action.action) === "ACTIVATE_CONNECTION") {
52851
53589
  action.redirectionUrll = {
52852
53590
  action: "ACTIVATE_CONNECTION",
@@ -52888,7 +53626,7 @@ const ApplicationDetails$1 = () => {
52888
53626
  };
52889
53627
  }
52890
53628
  });
52891
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data7 = workflowDetails.data) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.actionState) === null || _workflowDetails$data8 === void 0 ? void 0 : (_workflowDetails$data9 = _workflowDetails$data8.nextActions) === null || _workflowDetails$data9 === void 0 ? void 0 : _workflowDetails$data9.forEach(action => {
53629
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.actionState) === null || _workflowDetails$data0 === void 0 ? void 0 : (_workflowDetails$data1 = _workflowDetails$data0.nextActions) === null || _workflowDetails$data1 === void 0 ? void 0 : _workflowDetails$data1.forEach(action => {
52892
53630
  if ((action === null || action === void 0 ? void 0 : action.action) === "EDIT") {
52893
53631
  var _applicationDetails$a11, _applicationDetails$a12, _applicationDetails$p14, _applicationDetails$p15, _servicesMasterData$w2, _userConfig$3, _userConfig$4;
52894
53632
  const isMutation = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a11 = applicationDetails.applicationData) === null || _applicationDetails$a11 === void 0 ? void 0 : (_applicationDetails$a12 = _applicationDetails$a11.applicationType) === null || _applicationDetails$a12 === void 0 ? void 0 : _applicationDetails$a12.includes("MUTATION");
@@ -52915,27 +53653,27 @@ const ApplicationDetails$1 = () => {
52915
53653
  };
52916
53654
  }
52917
53655
  });
52918
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : (_workflowDetails$data1 = _workflowDetails$data0.nextActions) === null || _workflowDetails$data1 === void 0 ? void 0 : _workflowDetails$data1.forEach(action => {
53656
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data10 = workflowDetails.data) === null || _workflowDetails$data10 === void 0 ? void 0 : (_workflowDetails$data11 = _workflowDetails$data10.nextActions) === null || _workflowDetails$data11 === void 0 ? void 0 : _workflowDetails$data11.forEach(action => {
52919
53657
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52920
53658
  action.isToast = true;
52921
53659
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52922
53660
  }
52923
53661
  });
52924
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data10 = workflowDetails.data) === null || _workflowDetails$data10 === void 0 ? void 0 : (_workflowDetails$data11 = _workflowDetails$data10.actionState) === null || _workflowDetails$data11 === void 0 ? void 0 : (_workflowDetails$data12 = _workflowDetails$data11.nextActions) === null || _workflowDetails$data12 === void 0 ? void 0 : _workflowDetails$data12.forEach(action => {
53662
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data12 = workflowDetails.data) === null || _workflowDetails$data12 === void 0 ? void 0 : (_workflowDetails$data13 = _workflowDetails$data12.actionState) === null || _workflowDetails$data13 === void 0 ? void 0 : (_workflowDetails$data14 = _workflowDetails$data13.nextActions) === null || _workflowDetails$data14 === void 0 ? void 0 : _workflowDetails$data14.forEach(action => {
52925
53663
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52926
53664
  action.isToast = true;
52927
53665
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52928
53666
  }
52929
53667
  });
52930
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data13 = workflowDetails.data) === null || _workflowDetails$data13 === void 0 ? void 0 : (_workflowDetails$data14 = _workflowDetails$data13.nextActions) === null || _workflowDetails$data14 === void 0 ? void 0 : _workflowDetails$data14.forEach(action => {
53668
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data15 = workflowDetails.data) === null || _workflowDetails$data15 === void 0 ? void 0 : (_workflowDetails$data16 = _workflowDetails$data15.nextActions) === null || _workflowDetails$data16 === void 0 ? void 0 : _workflowDetails$data16.forEach(action => {
52931
53669
  if ((action === null || action === void 0 ? void 0 : action.action) === "PAY") {
52932
- var _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20;
52933
- if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data15 = workflowDetails.data) === null || _workflowDetails$data15 === void 0 ? void 0 : (_workflowDetails$data16 = _workflowDetails$data15.processInstances) === null || _workflowDetails$data16 === void 0 ? void 0 : (_workflowDetails$data17 = _workflowDetails$data16[0]) === null || _workflowDetails$data17 === void 0 ? void 0 : _workflowDetails$data17.businessService) === "WSReconnection") {
53670
+ var _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data22;
53671
+ if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data17 = workflowDetails.data) === null || _workflowDetails$data17 === void 0 ? void 0 : (_workflowDetails$data18 = _workflowDetails$data17.processInstances) === null || _workflowDetails$data18 === void 0 ? void 0 : (_workflowDetails$data19 = _workflowDetails$data18[0]) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.businessService) === "WSReconnection") {
52934
53672
  action.redirectionUrll = {
52935
53673
  pathname: `WSReconnection/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}?tenantId=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}&ISWSAPP&applicationNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}`,
52936
53674
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52937
53675
  };
52938
- } else if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : (_workflowDetails$data19 = _workflowDetails$data18.processInstances) === null || _workflowDetails$data19 === void 0 ? void 0 : (_workflowDetails$data20 = _workflowDetails$data19[0]) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.businessService) === "SWReconnection") {
53676
+ } else if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data20 = workflowDetails.data) === null || _workflowDetails$data20 === void 0 ? void 0 : (_workflowDetails$data21 = _workflowDetails$data20.processInstances) === null || _workflowDetails$data21 === void 0 ? void 0 : (_workflowDetails$data22 = _workflowDetails$data21[0]) === null || _workflowDetails$data22 === void 0 ? void 0 : _workflowDetails$data22.businessService) === "SWReconnection") {
52939
53677
  action.redirectionUrll = {
52940
53678
  pathname: `SWReconnection/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}?tenantId=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}&ISWSAPP&applicationNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}`,
52941
53679
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -52948,15 +53686,15 @@ const ApplicationDetails$1 = () => {
52948
53686
  }
52949
53687
  }
52950
53688
  });
52951
- workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data21 = workflowDetails.data) === null || _workflowDetails$data21 === void 0 ? void 0 : (_workflowDetails$data22 = _workflowDetails$data21.actionState) === null || _workflowDetails$data22 === void 0 ? void 0 : (_workflowDetails$data23 = _workflowDetails$data22.nextActions) === null || _workflowDetails$data23 === void 0 ? void 0 : _workflowDetails$data23.forEach(action => {
53689
+ workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data23 = workflowDetails.data) === null || _workflowDetails$data23 === void 0 ? void 0 : (_workflowDetails$data24 = _workflowDetails$data23.actionState) === null || _workflowDetails$data24 === void 0 ? void 0 : (_workflowDetails$data25 = _workflowDetails$data24.nextActions) === null || _workflowDetails$data25 === void 0 ? void 0 : _workflowDetails$data25.forEach(action => {
52952
53690
  if ((action === null || action === void 0 ? void 0 : action.action) === "PAY") {
52953
- var _workflowDetails$data24, _workflowDetails$data25, _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29;
52954
- if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data24 = workflowDetails.data) === null || _workflowDetails$data24 === void 0 ? void 0 : (_workflowDetails$data25 = _workflowDetails$data24.processInstances) === null || _workflowDetails$data25 === void 0 ? void 0 : (_workflowDetails$data26 = _workflowDetails$data25[0]) === null || _workflowDetails$data26 === void 0 ? void 0 : _workflowDetails$data26.businessService) === "WSReconnection") {
53691
+ var _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29, _workflowDetails$data30, _workflowDetails$data31;
53692
+ if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data26 = workflowDetails.data) === null || _workflowDetails$data26 === void 0 ? void 0 : (_workflowDetails$data27 = _workflowDetails$data26.processInstances) === null || _workflowDetails$data27 === void 0 ? void 0 : (_workflowDetails$data28 = _workflowDetails$data27[0]) === null || _workflowDetails$data28 === void 0 ? void 0 : _workflowDetails$data28.businessService) === "WSReconnection") {
52955
53693
  action.redirectionUrll = {
52956
53694
  pathname: `WSReconnection/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}?tenantId=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}&ISWSAPP&applicationNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}`,
52957
53695
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52958
53696
  };
52959
- } else if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data27 = workflowDetails.data) === null || _workflowDetails$data27 === void 0 ? void 0 : (_workflowDetails$data28 = _workflowDetails$data27.processInstances) === null || _workflowDetails$data28 === void 0 ? void 0 : (_workflowDetails$data29 = _workflowDetails$data28[0]) === null || _workflowDetails$data29 === void 0 ? void 0 : _workflowDetails$data29.businessService) === "SWReconnection") {
53697
+ } else if ((workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data29 = workflowDetails.data) === null || _workflowDetails$data29 === void 0 ? void 0 : (_workflowDetails$data30 = _workflowDetails$data29.processInstances) === null || _workflowDetails$data30 === void 0 ? void 0 : (_workflowDetails$data31 = _workflowDetails$data30[0]) === null || _workflowDetails$data31 === void 0 ? void 0 : _workflowDetails$data31.businessService) === "SWReconnection") {
52960
53698
  action.redirectionUrll = {
52961
53699
  pathname: `SWReconnection/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}/${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}?tenantId=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId}&ISWSAPP&applicationNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationNo}`,
52962
53700
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -53158,16 +53896,16 @@ const ApplicationDetails$1 = () => {
53158
53896
  };
53159
53897
 
53160
53898
  const GetConnectionDetails = () => {
53161
- var _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a10, _applicationDetails$a11, _applicationDetails$a12, _mdmsCommonmastersDat, _applicationDetails$a14, _applicationDetails$a19, _applicationDetails$a20, _applicationDetails$a21, _applicationDetails$a22, _applicationDetails$a23, _applicationDetails$f5, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$f6, _applicationDetails$f7;
53899
+ var _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a10, _applicationDetails$a11, _applicationDetails$a12, _mdmsCommonmastersDat, _applicationDetails$a14, _applicationDetails$a20, _applicationDetails$a21, _applicationDetails$a22, _applicationDetails$a23, _applicationDetails$a24, _applicationDetails$f5, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$f6, _applicationDetails$f7;
53162
53900
  const getBillSearch = function () {
53163
53901
  try {
53164
53902
  const _temp = function (_applicationDetails$f8) {
53165
53903
  if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f8 = applicationDetails.fetchBillsData) === null || _applicationDetails$f8 === void 0 ? void 0 : _applicationDetails$f8.length) > 0) {
53166
- var _applicationDetails$a24;
53904
+ var _applicationDetails$a25;
53167
53905
  const service = serviceType === "WATER" ? "WS" : "SW";
53168
53906
  let wsSearchFilters = {
53169
53907
  isConnectionSearch: true,
53170
- connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a24 = applicationDetails.applicationData) === null || _applicationDetails$a24 === void 0 ? void 0 : _applicationDetails$a24.connectionNo
53908
+ connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo
53171
53909
  };
53172
53910
  return Promise.resolve(Digit.WSService.search({
53173
53911
  tenantId,
@@ -53180,8 +53918,8 @@ const GetConnectionDetails = () => {
53180
53918
  bussinessService: service
53181
53919
  };
53182
53920
  if ((wsConnectionDetails === null || wsConnectionDetails === void 0 ? void 0 : (_wsConnectionDetails$5 = wsConnectionDetails.WaterConnection) === null || _wsConnectionDetails$5 === void 0 ? void 0 : _wsConnectionDetails$5.length) > 0 || (wsConnectionDetails === null || wsConnectionDetails === void 0 ? void 0 : (_wsConnectionDetails$6 = wsConnectionDetails.SewerageConnections) === null || _wsConnectionDetails$6 === void 0 ? void 0 : _wsConnectionDetails$6.length) > 0) {
53183
- var _applicationDetails$a25;
53184
- downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo, filters);
53921
+ var _applicationDetails$a26;
53922
+ downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a26 = applicationDetails.applicationData) === null || _applicationDetails$a26 === void 0 ? void 0 : _applicationDetails$a26.connectionNo, filters);
53185
53923
  }
53186
53924
  });
53187
53925
  }
@@ -53205,7 +53943,7 @@ const GetConnectionDetails = () => {
53205
53943
  const getTenantId = filters === null || filters === void 0 ? void 0 : filters.tenantId;
53206
53944
  const [showOptions, setShowOptions] = useState(false);
53207
53945
  const stateCode = Digit.ULBService.getStateId();
53208
- const actionConfig = ["DISCONNECTION_BUTTON"];
53946
+ const actionConfig = ["BILL_AMENDMENT_BUTTON", "DISCONNECTION_BUTTON"];
53209
53947
  const {
53210
53948
  isLoading,
53211
53949
  isError,
@@ -53222,11 +53960,11 @@ const GetConnectionDetails = () => {
53222
53960
  isLoading: isLoadingDemand,
53223
53961
  data: demandData
53224
53962
  } = Digit.Hooks.useDemandSearch({
53225
- consumerCode: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo,
53963
+ consumerCode: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo) || applicationNumber,
53226
53964
  businessService: serviceType === "WATER" ? "WS" : "SW",
53227
53965
  tenantId
53228
53966
  }, {
53229
- enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.applicationNo)
53967
+ enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.connectionNo || applicationNumber)
53230
53968
  });
53231
53969
  const [showModal, setshowModal] = useState(false);
53232
53970
  const [billData, setBilldata] = useState([]);
@@ -53292,6 +54030,35 @@ const GetConnectionDetails = () => {
53292
54030
  }, 10000);
53293
54031
  const checkApplicationStatus = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a14 = applicationDetails.applicationData) === null || _applicationDetails$a14 === void 0 ? void 0 : _applicationDetails$a14.status) === "Active" ? true : false;
53294
54032
  const checkWorkflow = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isApplicationApproved;
54033
+ const getBillAmendmentButton = () => {
54034
+ var _demandData$Demands, _applicationDetails$a16, _applicationDetails$a17;
54035
+ let isBillAmendNotApplicable = false;
54036
+ billData === null || billData === void 0 ? void 0 : billData.map(bill => {
54037
+ if ((bill === null || bill === void 0 ? void 0 : bill.status) === "INWORKFLOW") {
54038
+ isBillAmendNotApplicable = true;
54039
+ return;
54040
+ }
54041
+ });
54042
+ if ((demandData === null || demandData === void 0 ? void 0 : (_demandData$Demands = demandData.Demands) === null || _demandData$Demands === void 0 ? void 0 : _demandData$Demands.length) === 0) {
54043
+ setshowActionToast({
54044
+ key: "error",
54045
+ label: "No_Bills_Found"
54046
+ });
54047
+ return;
54048
+ } else if (isBillAmendNotApplicable) {
54049
+ setshowActionToast({
54050
+ key: "error",
54051
+ label: "WORKFLOW_IN_PROGRESS"
54052
+ });
54053
+ return;
54054
+ }
54055
+ const finalTenantId = getTenantId || tenantId || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a16 = applicationDetails.applicationData) === null || _applicationDetails$a16 === void 0 ? void 0 : _applicationDetails$a16.tenantId);
54056
+ const connNo = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) || applicationNumber;
54057
+ const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
54058
+ history.push(`/digit-ui/employee/ws/required-documents?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
54059
+ data: applicationDetails
54060
+ }));
54061
+ };
53295
54062
  const closeMenu = () => {
53296
54063
  setShowOptions(false);
53297
54064
  };
@@ -53309,11 +54076,10 @@ const GetConnectionDetails = () => {
53309
54076
  });
53310
54077
  } else {
53311
54078
  var _billData$, _applicationDetails$f3;
53312
- console.log("due", due, applicationDetails);
53313
54079
  if (((_billData$ = billData[0]) === null || _billData$ === void 0 ? void 0 : _billData$.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f3 = applicationDetails.fetchBillsData) === null || _applicationDetails$f3 === void 0 ? void 0 : _applicationDetails$f3.length) <= 0 || due == "0" || due < 0) {
53314
- var _applicationDetails$a17;
54080
+ var _applicationDetails$a18;
53315
54081
  Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
53316
- const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) || applicationNumber;
54082
+ const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
53317
54083
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53318
54084
  } else {
53319
54085
  setshowModal(true);
@@ -53330,12 +54096,12 @@ const GetConnectionDetails = () => {
53330
54096
  } else {
53331
54097
  var _billData$2, _applicationDetails$f4;
53332
54098
  if (((_billData$2 = billData[0]) === null || _billData$2 === void 0 ? void 0 : _billData$2.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f4 = applicationDetails.fetchBillsData) === null || _applicationDetails$f4 === void 0 ? void 0 : _applicationDetails$f4.length) <= 0 || due === "0" || due == "0" || due < 0) {
53333
- var _applicationDetails$a18;
54099
+ var _applicationDetails$a19;
53334
54100
  Digit.SessionStorage.set("WS_DISCONNECTION", {
53335
54101
  ...applicationDetails,
53336
54102
  serviceType
53337
54103
  });
53338
- const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
54104
+ const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : _applicationDetails$a19.connectionNo) || applicationNumber;
53339
54105
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53340
54106
  } else {
53341
54107
  setshowModal(true);
@@ -53343,14 +54109,16 @@ const GetConnectionDetails = () => {
53343
54109
  }
53344
54110
  };
53345
54111
  function onActionSelect(action) {
53346
- if (action === "DISCONNECTION_BUTTON") {
54112
+ if (action === "BILL_AMENDMENT_BUTTON") {
54113
+ getBillAmendmentButton();
54114
+ } else if (action === "DISCONNECTION_BUTTON") {
53347
54115
  getDisconnectionButton();
53348
54116
  } else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
53349
54117
  getRestorationButton();
53350
54118
  }
53351
54119
  }
53352
- const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : _applicationDetails$a19.status) === "Active" ? true : false;
53353
- const isDisconnectedOrInactive = !checkApplicationStatus || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a20 = applicationDetails.applicationData) === null || _applicationDetails$a20 === void 0 ? void 0 : (_applicationDetails$a21 = _applicationDetails$a20.status) === null || _applicationDetails$a21 === void 0 ? void 0 : _applicationDetails$a21.toLowerCase()) === "inactive" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a22 = applicationDetails.applicationData) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.applicationStatus) === "DISCONNECTION_EXECUTED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isDisconnectionDone) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a23 = applicationDetails.applicationData) === null || _applicationDetails$a23 === void 0 ? void 0 : _applicationDetails$a23.isDisconnectionTemporary);
54120
+ const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a20 = applicationDetails.applicationData) === null || _applicationDetails$a20 === void 0 ? void 0 : _applicationDetails$a20.status) === "Active" ? true : false;
54121
+ const isDisconnectedOrInactive = !checkApplicationStatus || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a21 = applicationDetails.applicationData) === null || _applicationDetails$a21 === void 0 ? void 0 : (_applicationDetails$a22 = _applicationDetails$a21.status) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.toLowerCase()) === "inactive" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a23 = applicationDetails.applicationData) === null || _applicationDetails$a23 === void 0 ? void 0 : _applicationDetails$a23.applicationStatus) === "DISCONNECTION_EXECUTED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isDisconnectionDone) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a24 = applicationDetails.applicationData) === null || _applicationDetails$a24 === void 0 ? void 0 : _applicationDetails$a24.isDisconnectionTemporary);
53354
54122
  const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
53355
54123
  const showActionRestoration = ["RESTORATION_BUTTON"];
53356
54124
  let dowloadOptions = [];
@@ -53532,7 +54300,11 @@ const newConfig$2 = [{
53532
54300
  type: "component",
53533
54301
  key: "supportingDocuments",
53534
54302
  component: "WSActivationSupportingDocuments",
53535
- withoutLabel: true
54303
+ withoutLabel: true,
54304
+ isMandatory: true,
54305
+ validation: {
54306
+ required: true
54307
+ }
53536
54308
  }]
53537
54309
  }]
53538
54310
  }];
@@ -53663,6 +54435,15 @@ const ActivateConnection = () => {
53663
54435
  component: "WSActivationDetails"
53664
54436
  };
53665
54437
  }
54438
+ if (item.key === "supportingDocuments") {
54439
+ return {
54440
+ ...item,
54441
+ isMandatory: true,
54442
+ validation: {
54443
+ required: true
54444
+ }
54445
+ };
54446
+ }
53666
54447
  return item;
53667
54448
  });
53668
54449
  flattenedBody = [...flattenedBody, ...mappedSectionBody];
@@ -53690,7 +54471,9 @@ const ActivateConnection = () => {
53690
54471
  return () => clearTimeout(timer);
53691
54472
  }, [isAppDetailsPage]);
53692
54473
  const onFormValueChange = (setValue, formData, formState) => {
53693
- if (Object.keys(formState.errors).length > 0 && Object.keys(formState.errors).length == 1 && formState.errors["owners"] && Object.values(formState.errors["owners"].type).filter(ob => ob.type === "required").length == 0 && Object.getPrototypeOf(formState.errors) === Object.prototype) setSubmitValve(true);else setSubmitValve(!Object.keys(formState.errors).length);
54474
+ var _formData$supportingD, _formData$supportingD2, _formData$supportingD3, _formData$supportingD4, _formData$supportingD5;
54475
+ const hasDoc = !!(formData !== null && formData !== void 0 && (_formData$supportingD = formData.supportingDocuments) !== null && _formData$supportingD !== void 0 && (_formData$supportingD2 = _formData$supportingD[0]) !== null && _formData$supportingD2 !== void 0 && _formData$supportingD2.fileStoreId || formData !== null && formData !== void 0 && (_formData$supportingD3 = formData.supportingDocuments) !== null && _formData$supportingD3 !== void 0 && _formData$supportingD3.fileStoreId || Array.isArray(formData === null || formData === void 0 ? void 0 : formData.supportingDocuments) && formData !== null && formData !== void 0 && (_formData$supportingD4 = formData.supportingDocuments) !== null && _formData$supportingD4 !== void 0 && (_formData$supportingD5 = _formData$supportingD4[0]) !== null && _formData$supportingD5 !== void 0 && _formData$supportingD5.fileStoreId);
54476
+ if (Object.keys(formState.errors).length > 0 && Object.keys(formState.errors).length == 1 && formState.errors["owners"] && Object.values(formState.errors["owners"].type).filter(ob => ob.type === "required").length == 0 && Object.getPrototypeOf(formState.errors) === Object.prototype) setSubmitValve(hasDoc);else setSubmitValve(!Object.keys(formState.errors).length && hasDoc);
53694
54477
  };
53695
54478
  const getConvertedDate = function (dateOfTime) {
53696
54479
  try {
@@ -53714,8 +54497,10 @@ const ActivateConnection = () => {
53714
54497
  };
53715
54498
  const onSubmit = function (data) {
53716
54499
  try {
53717
- const _temp5 = function () {
53718
- if (!canSubmit) {
54500
+ var _data$supportingDocum, _data$supportingDocum2, _data$supportingDocum3, _data$supportingDocum4, _data$supportingDocum5;
54501
+ const docFileStoreId = (data === null || data === void 0 ? void 0 : (_data$supportingDocum = data.supportingDocuments) === null || _data$supportingDocum === void 0 ? void 0 : (_data$supportingDocum2 = _data$supportingDocum[0]) === null || _data$supportingDocum2 === void 0 ? void 0 : _data$supportingDocum2.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$supportingDocum3 = data.supportingDocuments) === null || _data$supportingDocum3 === void 0 ? void 0 : _data$supportingDocum3.fileStoreId) || Array.isArray(data === null || data === void 0 ? void 0 : data.supportingDocuments) && (data === null || data === void 0 ? void 0 : (_data$supportingDocum4 = data.supportingDocuments) === null || _data$supportingDocum4 === void 0 ? void 0 : (_data$supportingDocum5 = _data$supportingDocum4[0]) === null || _data$supportingDocum5 === void 0 ? void 0 : _data$supportingDocum5.fileStoreId);
54502
+ return Promise.resolve(function () {
54503
+ if (!canSubmit || !docFileStoreId) {
53719
54504
  setShowToast({
53720
54505
  warning: true,
53721
54506
  message: "PLEASE_FILL_MANDATORY_DETAILS"
@@ -53727,19 +54512,19 @@ const ActivateConnection = () => {
53727
54512
  var _details4, _formDetails$connecti, _formDetails$connecti2, _formDetails$connecti3, _formDetails$connecti4, _formDetails$connecti5, _formDetails$connecti6, _formDetails$connecti7, _formDetails$connecti8, _formDetails$connecti9, _formDetails$connecti0, _formDetails$connecti1, _formDetails$connecti10, _formDetails$connecti11, _formDetails$connecti12, _formDetails$connecti13, _formDetails$connecti14, _formDetails$connecti15, _formDetails$connecti16, _formDetails$connecti17, _formDetails$connecti18, _formDetails$connecti19, _formDetails$connecti20, _formDetails$connecti21, _formDetails$connecti22, _formDetails$connecti23, _formDetails$connecti24, _formDetails$connecti25, _formDetails$connecti26, _formDetails$connecti27, _formDetails$connecti28, _formDetails$plumberD, _formDetails$plumberD2, _formDetails$plumberD3, _formData$plumberInfo, _formDetails$plumberD7, _formDetails$plumberD8, _formDetails$plumberD9, _formDetails$plumberD0, _formDetails$plumberD1, _formDetails$plumberD10, _formDetails$plumberD11, _formDetails$plumberD12, _formDetails$plumberD13, _formDetails$plumberD14, _formDetails$plumberD15, _formDetails$plumberD16, _formDetails$activati;
53728
54513
  function _temp4() {
53729
54514
  function _temp2() {
53730
- var _formDetails$comments, _data$supportingDocum, _data$supportingDocum2, _data$supportingDocum3, _data$supportingDocum4, _formDetails$comments2, _data$supportingDocum5, _data$supportingDocum6, _data$supportingDocum7, _data$supportingDocum8, _formData$application, _formData$application2;
54515
+ var _formDetails$comments, _formDetails$comments2, _formData$application, _formData$application2;
53731
54516
  formData.comment = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments = formDetails.comments) === null || _formDetails$comments === void 0 ? void 0 : _formDetails$comments.comments) || "";
53732
54517
  formData.action = filters === null || filters === void 0 ? void 0 : filters.action;
53733
- formData.wfDocuments = data !== null && data !== void 0 && (_data$supportingDocum = data.supportingDocuments) !== null && _data$supportingDocum !== void 0 && (_data$supportingDocum2 = _data$supportingDocum[0]) !== null && _data$supportingDocum2 !== void 0 && _data$supportingDocum2.fileStoreId ? [{
54518
+ formData.wfDocuments = docFileStoreId ? [{
53734
54519
  documentType: "Document - 1",
53735
- fileStoreId: data === null || data === void 0 ? void 0 : (_data$supportingDocum3 = data.supportingDocuments) === null || _data$supportingDocum3 === void 0 ? void 0 : (_data$supportingDocum4 = _data$supportingDocum3[0]) === null || _data$supportingDocum4 === void 0 ? void 0 : _data$supportingDocum4.fileStoreId
54520
+ fileStoreId: docFileStoreId
53736
54521
  }] : [];
53737
54522
  formData.processInstance = {
53738
54523
  action: filters === null || filters === void 0 ? void 0 : filters.action,
53739
54524
  comment: (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments2 = formDetails.comments) === null || _formDetails$comments2 === void 0 ? void 0 : _formDetails$comments2.comments) || "",
53740
- documents: data !== null && data !== void 0 && (_data$supportingDocum5 = data.supportingDocuments) !== null && _data$supportingDocum5 !== void 0 && (_data$supportingDocum6 = _data$supportingDocum5[0]) !== null && _data$supportingDocum6 !== void 0 && _data$supportingDocum6.fileStoreId ? [{
54525
+ documents: docFileStoreId ? [{
53741
54526
  documentType: "Document - 1",
53742
- fileStoreId: data === null || data === void 0 ? void 0 : (_data$supportingDocum7 = data.supportingDocuments) === null || _data$supportingDocum7 === void 0 ? void 0 : (_data$supportingDocum8 = _data$supportingDocum7[0]) === null || _data$supportingDocum8 === void 0 ? void 0 : _data$supportingDocum8.fileStoreId
54527
+ fileStoreId: docFileStoreId
53743
54528
  }] : []
53744
54529
  };
53745
54530
  const isWater = filters !== null && filters !== void 0 && filters.service ? filters.service.toUpperCase() === "WATER" : (formData === null || formData === void 0 ? void 0 : formData.serviceType) === "WATER" || !(formData !== null && formData !== void 0 && formData.serviceType);
@@ -53840,8 +54625,7 @@ const ActivateConnection = () => {
53840
54625
  }();
53841
54626
  return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
53842
54627
  }
53843
- }();
53844
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
54628
+ }());
53845
54629
  } catch (e) {
53846
54630
  return Promise.reject(e);
53847
54631
  }
@@ -53883,29 +54667,31 @@ const ActivateConnection = () => {
53883
54667
  };
53884
54668
 
53885
54669
  const ApplicationDetailsBillAmendment = () => {
53886
- var _applicationDetails$p, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$p4, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$p8, _applicationDetails$p9;
53887
- const {
53888
- applicationNumber
53889
- } = Digit.Hooks.useQueryParams();
54670
+ var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2;
54671
+ const queryParams = Digit.Hooks.useQueryParams();
54672
+ const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
53890
54673
  const tenantId = Digit.ULBService.getCurrentTenantId();
53891
54674
  const {
53892
54675
  t
53893
54676
  } = useTranslation();
53894
54677
  let serviceType = "WATER";
53895
- if (applicationNumber.includes("SW")) serviceType = "SEWERAGE";
54678
+ if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
53896
54679
  const [showToast, setShowToast] = useState(false);
53897
54680
  const {
53898
54681
  isLoading,
53899
54682
  isError,
53900
54683
  data: applicationDetails,
53901
54684
  error
53902
- } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType);
54685
+ } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType, {
54686
+ enabled: !!applicationNumber
54687
+ });
54688
+ const businessService = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p = applicationDetails.processInstancesDetails) === null || _applicationDetails$p === void 0 ? void 0 : (_applicationDetails$p2 = _applicationDetails$p[0]) === null || _applicationDetails$p2 === void 0 ? void 0 : _applicationDetails$p2.businessService) || (serviceType === "WATER" ? "WS.AMENDMENT" : "SW.AMENDMENT");
53903
54689
  const workflowDetails = Digit.Hooks.useWorkflowDetails({
53904
54690
  tenantId,
53905
54691
  id: applicationNumber,
53906
- moduleCode: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p = applicationDetails.processInstancesDetails) === null || _applicationDetails$p === void 0 ? void 0 : (_applicationDetails$p2 = _applicationDetails$p[0]) === null || _applicationDetails$p2 === void 0 ? void 0 : _applicationDetails$p2.businessService,
54692
+ moduleCode: businessService,
53907
54693
  config: {
53908
- enabled: applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$p3 = applicationDetails.processInstancesDetails) !== null && _applicationDetails$p3 !== void 0 && (_applicationDetails$p4 = _applicationDetails$p3[0]) !== null && _applicationDetails$p4 !== void 0 && _applicationDetails$p4.businessService ? true : false
54694
+ enabled: !!applicationNumber
53909
54695
  }
53910
54696
  });
53911
54697
  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 => {
@@ -53981,12 +54767,12 @@ const ApplicationDetailsBillAmendment = () => {
53981
54767
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
53982
54768
  mutate: mutate,
53983
54769
  workflowDetails: workflowDetails,
53984
- businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p5 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p5 === void 0 ? void 0 : (_applicationDetails$p6 = _applicationDetails$p5[0]) === null || _applicationDetails$p6 === void 0 ? void 0 : _applicationDetails$p6.businessService,
54770
+ businessService: businessService,
53985
54771
  moduleCode: "WS",
53986
54772
  showToast: showToast,
53987
54773
  setShowToast: setShowToast,
53988
54774
  closeToast: () => setShowToast(null),
53989
- timelineStatusPrefix: `WF_${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p7 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p7 === void 0 ? void 0 : (_applicationDetails$p8 = _applicationDetails$p7[0]) === null || _applicationDetails$p8 === void 0 ? void 0 : (_applicationDetails$p9 = _applicationDetails$p8.businessService) === null || _applicationDetails$p9 === void 0 ? void 0 : _applicationDetails$p9.toUpperCase()}_`
54775
+ timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
53990
54776
  })), showToast ? /*#__PURE__*/React.createElement(Toast, {
53991
54777
  isDleteBtn: true,
53992
54778
  error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
@@ -56519,8 +57305,6 @@ const Step2_NewConsumerDetails = _ref => {
56519
57305
  name: "reasonForNameChange"
56520
57306
  });
56521
57307
  const isDevolutionOrInheritance = (selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.code) === "DEVOLUTION_INHERITANCE" || selectedReason === "DEVOLUTION_INHERITANCE" || String((selectedReason === null || selectedReason === void 0 ? void 0 : selectedReason.code) || "").toUpperCase().includes("DEVOLUTION") || String(selectedReason || "").toUpperCase().includes("DEVOLUTION");
56522
- console.log("selectedReason in Step2:", selectedReason);
56523
- console.log("isDevolutionOrInheritance:", isDevolutionOrInheritance);
56524
57308
  const genderOptions = [{
56525
57309
  code: "MALE",
56526
57310
  i18nKey: "Male"
@@ -58237,7 +59021,6 @@ const MutationApplication = () => {
58237
59021
  }
58238
59022
  }, [location.pathname, path]);
58239
59023
  const editApplicationNumber = (details === null || details === void 0 ? void 0 : details.applicationNo) || applicationNumber;
58240
- console.log(editApplicationNumber, "editApplicationNumber");
58241
59024
  const {
58242
59025
  isLoading: isWorkflowLoading,
58243
59026
  data: workflowData
@@ -58253,7 +59036,6 @@ const MutationApplication = () => {
58253
59036
  }, {
58254
59037
  enabled: !!editApplicationNumber
58255
59038
  });
58256
- console.log(workflowData, "workflowData");
58257
59039
  const isEmployee = window.location.href.includes("/employee/");
58258
59040
  const isEditFlow = !!editApplicationNumber && (!!urlAppNo || (workflowData === null || workflowData === void 0 ? void 0 : workflowData.businessService) === "mutationWSConnection" || (workflowData === null || workflowData === void 0 ? void 0 : workflowData.action) === "SEND_BACK_TO_CITIZEN");
58259
59041
  const querySearchParam = isEditFlow ? editApplicationNumber : authKNumber;
@@ -60351,7 +61133,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60351
61133
  businessService,
60352
61134
  isLoading
60353
61135
  } = _ref;
60354
- console.log("dafff", data);
60355
61136
  const convertEpochToDate = dateEpoch => {
60356
61137
  if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
60357
61138
  return "NA";
@@ -60410,7 +61191,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60410
61191
  }
60411
61192
  const downloadIntegratedBill = function () {
60412
61193
  try {
60413
- console.log("integrated", data);
60414
61194
  const _temp2 = function () {
60415
61195
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
60416
61196
  const _temp = _catch(function () {
@@ -60423,9 +61203,7 @@ const SearchWaterConnectionIntegrated = _ref => {
60423
61203
  type: "application/pdf"
60424
61204
  }), `IntegratedBill.pdf`);
60425
61205
  });
60426
- }, function (e) {
60427
- console.log("errorrrrrr", e);
60428
- });
61206
+ }, function () {});
60429
61207
  if (_temp && _temp.then) return _temp.then(function () {});
60430
61208
  } else {
60431
61209
  alert("NO Pdf");
@@ -60813,7 +61591,7 @@ const openFilePDF = fileId => {
60813
61591
  }).catch(error => console.error("Error fetching file:", error));
60814
61592
  };
60815
61593
  const CheckPage$4 = _ref2 => {
60816
- var _Digit$UserService$ge, _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyT3;
61594
+ var _Digit$UserService$ge, _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails7, _connectionDetails7$a, _connectionDetails8, _connectionDetails8$a, _connectionDetails9, _connectionDetails9$a, _connectionDetails0, _data$additionalDetai, _connectionDetails1, _data$additionalDetai2, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail, _cpt$additionalDetail2, _cpt$additionalDetail3, _cpt$propertyType, _cpt$additionalDetail4, _cpt$additionalDetail5;
60817
61595
  let {
60818
61596
  data,
60819
61597
  onSubmit,
@@ -60855,7 +61633,7 @@ const CheckPage$4 = _ref2 => {
60855
61633
  }
60856
61634
  }, /*#__PURE__*/React.createElement(Row, {
60857
61635
  label: t("WS_PROPERTY_ID_LABEL"),
60858
- text: `${t(checkForNA(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
61636
+ text: `${t(checkForNA$1(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
60859
61637
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
60860
61638
  onClick: onEdit
60861
61639
  })
@@ -60866,13 +61644,19 @@ const CheckPage$4 = _ref2 => {
60866
61644
  }
60867
61645
  }, /*#__PURE__*/React.createElement(Row, {
60868
61646
  label: t("WS_SERVICE_TYPE"),
60869
- text: `${t(checkForNA(((_connectionDetails = connectionDetails) === null || _connectionDetails === void 0 ? void 0 : (_connectionDetails$se = _connectionDetails.serviceType) === null || _connectionDetails$se === void 0 ? void 0 : _connectionDetails$se.i18nKey) || ((_connectionDetails2 = connectionDetails) === null || _connectionDetails2 === void 0 ? void 0 : (_connectionDetails2$s = _connectionDetails2.serviceType) === null || _connectionDetails2$s === void 0 ? void 0 : _connectionDetails2$s.code) || ((_connectionDetails3 = connectionDetails) === null || _connectionDetails3 === void 0 ? void 0 : _connectionDetails3.serviceType)))}`,
61647
+ text: `${t(checkForNA$1(((_connectionDetails = connectionDetails) === null || _connectionDetails === void 0 ? void 0 : (_connectionDetails$se = _connectionDetails.serviceType) === null || _connectionDetails$se === void 0 ? void 0 : _connectionDetails$se.i18nKey) || ((_connectionDetails2 = connectionDetails) === null || _connectionDetails2 === void 0 ? void 0 : (_connectionDetails2$s = _connectionDetails2.serviceType) === null || _connectionDetails2$s === void 0 ? void 0 : _connectionDetails2$s.code) || ((_connectionDetails3 = connectionDetails) === null || _connectionDetails3 === void 0 ? void 0 : _connectionDetails3.serviceType)))}`,
60870
61648
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
60871
61649
  onClick: onEdit
60872
61650
  })
60873
61651
  }), /*#__PURE__*/React.createElement(Row, {
60874
61652
  label: t("WS_APPLICANT_TYPE"),
60875
- text: `${t(checkForNA(((_connectionDetails4 = connectionDetails) === null || _connectionDetails4 === void 0 ? void 0 : (_connectionDetails4$a = _connectionDetails4.applicantType) === null || _connectionDetails4$a === void 0 ? void 0 : _connectionDetails4$a.i18nKey) || ((_connectionDetails5 = connectionDetails) === null || _connectionDetails5 === void 0 ? void 0 : (_connectionDetails5$a = _connectionDetails5.applicantType) === null || _connectionDetails5$a === void 0 ? void 0 : _connectionDetails5$a.code) || ((_connectionDetails6 = connectionDetails) === null || _connectionDetails6 === void 0 ? void 0 : _connectionDetails6.applicantType)))}`
61653
+ text: `${t(checkForNA$1(((_connectionDetails4 = connectionDetails) === null || _connectionDetails4 === void 0 ? void 0 : (_connectionDetails4$a = _connectionDetails4.applicantType) === null || _connectionDetails4$a === void 0 ? void 0 : _connectionDetails4$a.i18nKey) || ((_connectionDetails5 = connectionDetails) === null || _connectionDetails5 === void 0 ? void 0 : (_connectionDetails5$a = _connectionDetails5.applicantType) === null || _connectionDetails5$a === void 0 ? void 0 : _connectionDetails5$a.code) || ((_connectionDetails6 = connectionDetails) === null || _connectionDetails6 === void 0 ? void 0 : _connectionDetails6.applicantType)))}`
61654
+ }), /*#__PURE__*/React.createElement(Row, {
61655
+ label: t("WS_Billing_Address_Type"),
61656
+ text: `${t(checkForNA$1(((_connectionDetails7 = connectionDetails) === null || _connectionDetails7 === void 0 ? void 0 : (_connectionDetails7$a = _connectionDetails7.addressType) === null || _connectionDetails7$a === void 0 ? void 0 : _connectionDetails7$a.i18nKey) || ((_connectionDetails8 = connectionDetails) === null || _connectionDetails8 === void 0 ? void 0 : (_connectionDetails8$a = _connectionDetails8.addressType) === null || _connectionDetails8$a === void 0 ? void 0 : _connectionDetails8$a.name) || (typeof ((_connectionDetails9 = connectionDetails) === null || _connectionDetails9 === void 0 ? void 0 : (_connectionDetails9$a = _connectionDetails9.addressType) === null || _connectionDetails9$a === void 0 ? void 0 : _connectionDetails9$a.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof ((_connectionDetails0 = connectionDetails) === null || _connectionDetails0 === void 0 ? void 0 : _connectionDetails0.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai = data.additionalDetails) === null || _data$additionalDetai === void 0 ? void 0 : _data$additionalDetai.addressType)))}`
61657
+ }), /*#__PURE__*/React.createElement(Row, {
61658
+ label: t("Complete Address"),
61659
+ text: `${checkForNA$1(((_connectionDetails1 = connectionDetails) === null || _connectionDetails1 === void 0 ? void 0 : _connectionDetails1.completeAddress) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai2 = data.additionalDetails) === null || _data$additionalDetai2 === void 0 ? void 0 : _data$additionalDetai2.completeAddress))}`
60876
61660
  })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), /*#__PURE__*/React.createElement(StatusTable, {
60877
61661
  style: {
60878
61662
  marginTop: "10px",
@@ -60880,28 +61664,28 @@ const CheckPage$4 = _ref2 => {
60880
61664
  }
60881
61665
  }, /*#__PURE__*/React.createElement(Row, {
60882
61666
  label: t("WS_OWN_DETAIL_NAME"),
60883
- text: `${t(checkForNA((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
61667
+ text: `${t(checkForNA$1((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
60884
61668
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
60885
61669
  onClick: onEdit
60886
61670
  })
60887
61671
  }), /*#__PURE__*/React.createElement(Row, {
60888
61672
  label: t("WS_OWN_DETAIL_MIDDLE_NAME"),
60889
- text: `${t(checkForNA((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
61673
+ text: `${t(checkForNA$1((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
60890
61674
  }), /*#__PURE__*/React.createElement(Row, {
60891
61675
  label: t("WS_OWN_DETAIL_LAST_NAME"),
60892
- text: `${t(checkForNA((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
61676
+ text: `${t(checkForNA$1((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
60893
61677
  }), /*#__PURE__*/React.createElement(Row, {
60894
61678
  label: t("WS_CONN_HOLDER_OWN_DETAIL_GENDER_LABEL"),
60895
- text: `${t(checkForNA(((_holderDetails4 = holderDetails) === null || _holderDetails4 === void 0 ? void 0 : (_holderDetails4$gende = _holderDetails4.gender) === null || _holderDetails4$gende === void 0 ? void 0 : _holderDetails4$gende.i18nKey) || ((_holderDetails5 = holderDetails) === null || _holderDetails5 === void 0 ? void 0 : (_holderDetails5$gende = _holderDetails5.gender) === null || _holderDetails5$gende === void 0 ? void 0 : _holderDetails5$gende.code) || ((_holderDetails6 = holderDetails) === null || _holderDetails6 === void 0 ? void 0 : _holderDetails6.gender)))}`
61679
+ text: `${t(checkForNA$1(((_holderDetails4 = holderDetails) === null || _holderDetails4 === void 0 ? void 0 : (_holderDetails4$gende = _holderDetails4.gender) === null || _holderDetails4$gende === void 0 ? void 0 : _holderDetails4$gende.i18nKey) || ((_holderDetails5 = holderDetails) === null || _holderDetails5 === void 0 ? void 0 : (_holderDetails5$gende = _holderDetails5.gender) === null || _holderDetails5$gende === void 0 ? void 0 : _holderDetails5$gende.code) || ((_holderDetails6 = holderDetails) === null || _holderDetails6 === void 0 ? void 0 : _holderDetails6.gender)))}`
60896
61680
  }), /*#__PURE__*/React.createElement(Row, {
60897
61681
  label: t("CORE_COMMON_MOBILE_NUMBER"),
60898
- text: `${t(checkForNA((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
61682
+ text: `${t(checkForNA$1((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
60899
61683
  }), /*#__PURE__*/React.createElement(Row, {
60900
61684
  label: t("CORE_COMMON_WHATSAPP_MOBILE_NUMBER"),
60901
- text: `${t(checkForNA((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
61685
+ text: `${t(checkForNA$1((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
60902
61686
  }), /*#__PURE__*/React.createElement(Row, {
60903
61687
  label: t("WS_EMAIL_ID"),
60904
- text: `${t(checkForNA((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
61688
+ text: `${t(checkForNA$1((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
60905
61689
  })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
60906
61690
  style: {
60907
61691
  marginTop: "10px",
@@ -60909,64 +61693,64 @@ const CheckPage$4 = _ref2 => {
60909
61693
  }
60910
61694
  }, /*#__PURE__*/React.createElement(Row, {
60911
61695
  label: t("WS_ZRO_LOCATION"),
60912
- text: `${t(checkForNA(((_propertyAddress = propertyAddress) === null || _propertyAddress === void 0 ? void 0 : (_propertyAddress$zro = _propertyAddress.zro) === null || _propertyAddress$zro === void 0 ? void 0 : _propertyAddress$zro.name) || ((_propertyAddress2 = propertyAddress) === null || _propertyAddress2 === void 0 ? void 0 : _propertyAddress2.zro) || ((_propertyAddress3 = propertyAddress) === null || _propertyAddress3 === void 0 ? void 0 : _propertyAddress3.zroLocation) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zroLocation) || ((_propertyAddress4 = propertyAddress) === null || _propertyAddress4 === void 0 ? void 0 : (_propertyAddress4$add = _propertyAddress4.additionalDetails) === null || _propertyAddress4$add === void 0 ? void 0 : _propertyAddress4$add.zroLocation)))}`,
61696
+ text: `${t(checkForNA$1(((_propertyAddress = propertyAddress) === null || _propertyAddress === void 0 ? void 0 : (_propertyAddress$zro = _propertyAddress.zro) === null || _propertyAddress$zro === void 0 ? void 0 : _propertyAddress$zro.name) || ((_propertyAddress2 = propertyAddress) === null || _propertyAddress2 === void 0 ? void 0 : _propertyAddress2.zro) || ((_propertyAddress3 = propertyAddress) === null || _propertyAddress3 === void 0 ? void 0 : _propertyAddress3.zroLocation) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zroLocation) || ((_propertyAddress4 = propertyAddress) === null || _propertyAddress4 === void 0 ? void 0 : (_propertyAddress4$add = _propertyAddress4.additionalDetails) === null || _propertyAddress4$add === void 0 ? void 0 : _propertyAddress4$add.zroLocation)))}`,
60913
61697
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
60914
61698
  onClick: onEdit
60915
61699
  })
60916
61700
  }), /*#__PURE__*/React.createElement(Row, {
60917
61701
  label: t("COMMON_ADDRESS_TYPE"),
60918
- text: `${t(checkForNA(((_propertyAddress5 = propertyAddress) === null || _propertyAddress5 === void 0 ? void 0 : (_propertyAddress5$add = _propertyAddress5.addressType) === null || _propertyAddress5$add === void 0 ? void 0 : _propertyAddress5$add.i18nKey) || ((_propertyAddress6 = propertyAddress) === null || _propertyAddress6 === void 0 ? void 0 : (_propertyAddress6$add = _propertyAddress6.addressType) === null || _propertyAddress6$add === void 0 ? void 0 : _propertyAddress6$add.code) || ((_propertyAddress7 = propertyAddress) === null || _propertyAddress7 === void 0 ? void 0 : _propertyAddress7.addressType)))}`
61702
+ text: `${t(checkForNA$1(((_propertyAddress5 = propertyAddress) === null || _propertyAddress5 === void 0 ? void 0 : (_propertyAddress5$add = _propertyAddress5.addressType) === null || _propertyAddress5$add === void 0 ? void 0 : _propertyAddress5$add.i18nKey) || ((_propertyAddress6 = propertyAddress) === null || _propertyAddress6 === void 0 ? void 0 : (_propertyAddress6$add = _propertyAddress6.addressType) === null || _propertyAddress6$add === void 0 ? void 0 : _propertyAddress6$add.code) || ((_propertyAddress7 = propertyAddress) === null || _propertyAddress7 === void 0 ? void 0 : _propertyAddress7.addressType)))}`
60919
61703
  }), /*#__PURE__*/React.createElement(Row, {
60920
61704
  label: t("CORE_COMMON_PROFILE_CITY"),
60921
- text: `${t(checkForNA(((_propertyAddress8 = propertyAddress) === null || _propertyAddress8 === void 0 ? void 0 : (_propertyAddress8$cit = _propertyAddress8.city) === null || _propertyAddress8$cit === void 0 ? void 0 : _propertyAddress8$cit.name) || ((_propertyAddress9 = propertyAddress) === null || _propertyAddress9 === void 0 ? void 0 : (_propertyAddress9$cit = _propertyAddress9.city) === null || _propertyAddress9$cit === void 0 ? void 0 : _propertyAddress9$cit.code) || ((_propertyAddress0 = propertyAddress) === null || _propertyAddress0 === void 0 ? void 0 : _propertyAddress0.city)))}`
61705
+ text: `${t(checkForNA$1(((_propertyAddress8 = propertyAddress) === null || _propertyAddress8 === void 0 ? void 0 : (_propertyAddress8$cit = _propertyAddress8.city) === null || _propertyAddress8$cit === void 0 ? void 0 : _propertyAddress8$cit.name) || ((_propertyAddress9 = propertyAddress) === null || _propertyAddress9 === void 0 ? void 0 : (_propertyAddress9$cit = _propertyAddress9.city) === null || _propertyAddress9$cit === void 0 ? void 0 : _propertyAddress9$cit.code) || ((_propertyAddress0 = propertyAddress) === null || _propertyAddress0 === void 0 ? void 0 : _propertyAddress0.city)))}`
60922
61706
  }), /*#__PURE__*/React.createElement(Row, {
60923
61707
  label: t("PINCODE"),
60924
- text: `${t(checkForNA(((_propertyAddress1 = propertyAddress) === null || _propertyAddress1 === void 0 ? void 0 : _propertyAddress1.pincode) || ((_propertyAddress10 = propertyAddress) === null || _propertyAddress10 === void 0 ? void 0 : _propertyAddress10.pinCode)))}`
61708
+ text: `${t(checkForNA$1(((_propertyAddress1 = propertyAddress) === null || _propertyAddress1 === void 0 ? void 0 : _propertyAddress1.pincode) || ((_propertyAddress10 = propertyAddress) === null || _propertyAddress10 === void 0 ? void 0 : _propertyAddress10.pinCode)))}`
60925
61709
  }), /*#__PURE__*/React.createElement(Row, {
60926
61710
  label: t("LOCALITY"),
60927
- text: `${t(checkForNA(((_propertyAddress11 = propertyAddress) === null || _propertyAddress11 === void 0 ? void 0 : (_propertyAddress11$lo = _propertyAddress11.locality) === null || _propertyAddress11$lo === void 0 ? void 0 : _propertyAddress11$lo.name) || ((_propertyAddress12 = propertyAddress) === null || _propertyAddress12 === void 0 ? void 0 : (_propertyAddress12$lo = _propertyAddress12.locality) === null || _propertyAddress12$lo === void 0 ? void 0 : _propertyAddress12$lo.code) || ((_propertyAddress13 = propertyAddress) === null || _propertyAddress13 === void 0 ? void 0 : _propertyAddress13.locality)))}`
61711
+ text: `${t(checkForNA$1(((_propertyAddress11 = propertyAddress) === null || _propertyAddress11 === void 0 ? void 0 : (_propertyAddress11$lo = _propertyAddress11.locality) === null || _propertyAddress11$lo === void 0 ? void 0 : _propertyAddress11$lo.name) || ((_propertyAddress12 = propertyAddress) === null || _propertyAddress12 === void 0 ? void 0 : (_propertyAddress12$lo = _propertyAddress12.locality) === null || _propertyAddress12$lo === void 0 ? void 0 : _propertyAddress12$lo.code) || ((_propertyAddress13 = propertyAddress) === null || _propertyAddress13 === void 0 ? void 0 : _propertyAddress13.locality)))}`
60928
61712
  }), /*#__PURE__*/React.createElement(Row, {
60929
61713
  label: t("SubLocality"),
60930
- text: `${t(checkForNA(((_propertyAddress14 = propertyAddress) === null || _propertyAddress14 === void 0 ? void 0 : (_propertyAddress14$su = _propertyAddress14.subLocality) === null || _propertyAddress14$su === void 0 ? void 0 : _propertyAddress14$su.name) || ((_propertyAddress15 = propertyAddress) === null || _propertyAddress15 === void 0 ? void 0 : (_propertyAddress15$su = _propertyAddress15.subLocality) === null || _propertyAddress15$su === void 0 ? void 0 : _propertyAddress15$su.code) || ((_propertyAddress16 = propertyAddress) === null || _propertyAddress16 === void 0 ? void 0 : _propertyAddress16.subLocality)))}`
61714
+ text: `${t(checkForNA$1(((_propertyAddress14 = propertyAddress) === null || _propertyAddress14 === void 0 ? void 0 : (_propertyAddress14$su = _propertyAddress14.subLocality) === null || _propertyAddress14$su === void 0 ? void 0 : _propertyAddress14$su.name) || ((_propertyAddress15 = propertyAddress) === null || _propertyAddress15 === void 0 ? void 0 : (_propertyAddress15$su = _propertyAddress15.subLocality) === null || _propertyAddress15$su === void 0 ? void 0 : _propertyAddress15$su.code) || ((_propertyAddress16 = propertyAddress) === null || _propertyAddress16 === void 0 ? void 0 : _propertyAddress16.subLocality)))}`
60931
61715
  }), /*#__PURE__*/React.createElement(Row, {
60932
61716
  label: t("STREET_NAME"),
60933
- text: `${t(checkForNA(((_propertyAddress17 = propertyAddress) === null || _propertyAddress17 === void 0 ? void 0 : _propertyAddress17.streetName) || ((_propertyAddress18 = propertyAddress) === null || _propertyAddress18 === void 0 ? void 0 : _propertyAddress18.street)))}`
61717
+ text: `${t(checkForNA$1(((_propertyAddress17 = propertyAddress) === null || _propertyAddress17 === void 0 ? void 0 : _propertyAddress17.streetName) || ((_propertyAddress18 = propertyAddress) === null || _propertyAddress18 === void 0 ? void 0 : _propertyAddress18.street)))}`
60934
61718
  }), /*#__PURE__*/React.createElement(Row, {
60935
61719
  label: t("ADDRESS_LINE1"),
60936
- text: `${t(checkForNA(((_propertyAddress19 = propertyAddress) === null || _propertyAddress19 === void 0 ? void 0 : _propertyAddress19.addressLine1) || ((_propertyAddress20 = propertyAddress) === null || _propertyAddress20 === void 0 ? void 0 : _propertyAddress20.street)))}`
61720
+ text: `${t(checkForNA$1(((_propertyAddress19 = propertyAddress) === null || _propertyAddress19 === void 0 ? void 0 : _propertyAddress19.addressLine1) || ((_propertyAddress20 = propertyAddress) === null || _propertyAddress20 === void 0 ? void 0 : _propertyAddress20.street)))}`
60937
61721
  }), /*#__PURE__*/React.createElement(Row, {
60938
61722
  label: t("ADDRESS_LINE2"),
60939
- text: `${t(checkForNA((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
61723
+ text: `${t(checkForNA$1((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
60940
61724
  }), /*#__PURE__*/React.createElement(Row, {
60941
61725
  label: t("HOUSE_NO"),
60942
- text: `${t(checkForNA(((_propertyAddress22 = propertyAddress) === null || _propertyAddress22 === void 0 ? void 0 : _propertyAddress22.houseNo) || ((_propertyAddress23 = propertyAddress) === null || _propertyAddress23 === void 0 ? void 0 : _propertyAddress23.doorNo)))}`
61726
+ text: `${t(checkForNA$1(((_propertyAddress22 = propertyAddress) === null || _propertyAddress22 === void 0 ? void 0 : _propertyAddress22.houseNo) || ((_propertyAddress23 = propertyAddress) === null || _propertyAddress23 === void 0 ? void 0 : _propertyAddress23.doorNo)))}`
60943
61727
  }), /*#__PURE__*/React.createElement(Row, {
60944
61728
  label: t("LATITUDE_GEOTAG"),
60945
- text: `${t(checkForNA((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
61729
+ text: `${t(checkForNA$1((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
60946
61730
  }), /*#__PURE__*/React.createElement(Row, {
60947
61731
  label: t("LONGITUDE_GEOTAG"),
60948
- text: `${t(checkForNA((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
61732
+ text: `${t(checkForNA$1((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
60949
61733
  }), /*#__PURE__*/React.createElement(Row, {
60950
61734
  label: t("COMMON_ASSEMBLY"),
60951
- text: `${t(checkForNA(((_propertyAddress26 = propertyAddress) === null || _propertyAddress26 === void 0 ? void 0 : (_propertyAddress26$as = _propertyAddress26.assembly) === null || _propertyAddress26$as === void 0 ? void 0 : _propertyAddress26$as.name) || ((_propertyAddress27 = propertyAddress) === null || _propertyAddress27 === void 0 ? void 0 : (_propertyAddress27$as = _propertyAddress27.assembly) === null || _propertyAddress27$as === void 0 ? void 0 : _propertyAddress27$as.code) || ((_propertyAddress28 = propertyAddress) === null || _propertyAddress28 === void 0 ? void 0 : _propertyAddress28.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
61735
+ text: `${t(checkForNA$1(((_propertyAddress26 = propertyAddress) === null || _propertyAddress26 === void 0 ? void 0 : (_propertyAddress26$as = _propertyAddress26.assembly) === null || _propertyAddress26$as === void 0 ? void 0 : _propertyAddress26$as.name) || ((_propertyAddress27 = propertyAddress) === null || _propertyAddress27 === void 0 ? void 0 : (_propertyAddress27$as = _propertyAddress27.assembly) === null || _propertyAddress27$as === void 0 ? void 0 : _propertyAddress27$as.code) || ((_propertyAddress28 = propertyAddress) === null || _propertyAddress28 === void 0 ? void 0 : _propertyAddress28.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
60952
61736
  }), /*#__PURE__*/React.createElement(Row, {
60953
61737
  label: t("COMMON_WARD"),
60954
- text: `${t(checkForNA(((_propertyAddress29 = propertyAddress) === null || _propertyAddress29 === void 0 ? void 0 : (_propertyAddress29$bl = _propertyAddress29.block) === null || _propertyAddress29$bl === void 0 ? void 0 : _propertyAddress29$bl.name) || ((_propertyAddress30 = propertyAddress) === null || _propertyAddress30 === void 0 ? void 0 : (_propertyAddress30$bl = _propertyAddress30.block) === null || _propertyAddress30$bl === void 0 ? void 0 : _propertyAddress30$bl.code) || ((_propertyAddress31 = propertyAddress) === null || _propertyAddress31 === void 0 ? void 0 : _propertyAddress31.block) || ((_propertyAddress32 = propertyAddress) === null || _propertyAddress32 === void 0 ? void 0 : (_propertyAddress32$wa = _propertyAddress32.ward) === null || _propertyAddress32$wa === void 0 ? void 0 : _propertyAddress32$wa.name) || ((_propertyAddress33 = propertyAddress) === null || _propertyAddress33 === void 0 ? void 0 : (_propertyAddress33$wa = _propertyAddress33.ward) === null || _propertyAddress33$wa === void 0 ? void 0 : _propertyAddress33$wa.code) || ((_propertyAddress34 = propertyAddress) === null || _propertyAddress34 === void 0 ? void 0 : _propertyAddress34.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
61738
+ text: `${t(checkForNA$1(((_propertyAddress29 = propertyAddress) === null || _propertyAddress29 === void 0 ? void 0 : (_propertyAddress29$bl = _propertyAddress29.block) === null || _propertyAddress29$bl === void 0 ? void 0 : _propertyAddress29$bl.name) || ((_propertyAddress30 = propertyAddress) === null || _propertyAddress30 === void 0 ? void 0 : (_propertyAddress30$bl = _propertyAddress30.block) === null || _propertyAddress30$bl === void 0 ? void 0 : _propertyAddress30$bl.code) || ((_propertyAddress31 = propertyAddress) === null || _propertyAddress31 === void 0 ? void 0 : _propertyAddress31.block) || ((_propertyAddress32 = propertyAddress) === null || _propertyAddress32 === void 0 ? void 0 : (_propertyAddress32$wa = _propertyAddress32.ward) === null || _propertyAddress32$wa === void 0 ? void 0 : _propertyAddress32$wa.name) || ((_propertyAddress33 = propertyAddress) === null || _propertyAddress33 === void 0 ? void 0 : (_propertyAddress33$wa = _propertyAddress33.ward) === null || _propertyAddress33$wa === void 0 ? void 0 : _propertyAddress33$wa.code) || ((_propertyAddress34 = propertyAddress) === null || _propertyAddress34 === void 0 ? void 0 : _propertyAddress34.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
60955
61739
  }), /*#__PURE__*/React.createElement(Row, {
60956
61740
  label: t("COMMON_ZONE"),
60957
- text: `${t(checkForNA(((_propertyAddress35 = propertyAddress) === null || _propertyAddress35 === void 0 ? void 0 : (_propertyAddress35$zo = _propertyAddress35.zone) === null || _propertyAddress35$zo === void 0 ? void 0 : _propertyAddress35$zo.name) || ((_propertyAddress36 = propertyAddress) === null || _propertyAddress36 === void 0 ? void 0 : (_propertyAddress36$zo = _propertyAddress36.zone) === null || _propertyAddress36$zo === void 0 ? void 0 : _propertyAddress36$zo.code) || ((_propertyAddress37 = propertyAddress) === null || _propertyAddress37 === void 0 ? void 0 : _propertyAddress37.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
61741
+ text: `${t(checkForNA$1(((_propertyAddress35 = propertyAddress) === null || _propertyAddress35 === void 0 ? void 0 : (_propertyAddress35$zo = _propertyAddress35.zone) === null || _propertyAddress35$zo === void 0 ? void 0 : _propertyAddress35$zo.name) || ((_propertyAddress36 = propertyAddress) === null || _propertyAddress36 === void 0 ? void 0 : (_propertyAddress36$zo = _propertyAddress36.zone) === null || _propertyAddress36$zo === void 0 ? void 0 : _propertyAddress36$zo.code) || ((_propertyAddress37 = propertyAddress) === null || _propertyAddress37 === void 0 ? void 0 : _propertyAddress37.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
60958
61742
  }), /*#__PURE__*/React.createElement(Row, {
60959
61743
  label: t("COMMON_CURRENT_ASSEMBLY"),
60960
- text: `${t(checkForNA(((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : _propertyAddress38.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
61744
+ text: `${t(checkForNA$1(((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : _propertyAddress38.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
60961
61745
  }), /*#__PURE__*/React.createElement(Row, {
60962
61746
  label: t("COMMON_CURRENT_WARD"),
60963
- text: `${t(checkForNA(((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
61747
+ text: `${t(checkForNA$1(((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
60964
61748
  }), /*#__PURE__*/React.createElement(Row, {
60965
61749
  label: t("COMMON_CURRENT_ZONE"),
60966
- text: `${t(checkForNA(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : _propertyAddress40.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
61750
+ text: `${t(checkForNA$1(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : _propertyAddress40.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
60967
61751
  }), /*#__PURE__*/React.createElement(Row, {
60968
61752
  label: t("LANDMARK"),
60969
- text: `${t(checkForNA((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
61753
+ text: `${t(checkForNA$1((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
60970
61754
  })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
60971
61755
  style: {
60972
61756
  marginTop: "10px",
@@ -60974,38 +61758,49 @@ const CheckPage$4 = _ref2 => {
60974
61758
  }
60975
61759
  }, /*#__PURE__*/React.createElement(Row, {
60976
61760
  label: t("WS_CATEGORY_TYPE"),
60977
- text: `${t(checkForNA((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)))}`,
61761
+ text: `${t(checkForNA$1((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)))}`,
60978
61762
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
60979
61763
  onClick: onEdit
60980
61764
  })
60981
61765
  }), /*#__PURE__*/React.createElement(Row, {
60982
61766
  label: t("WS_PROPERTY_CATEGORY"),
60983
- text: `${t(checkForNA((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)))}`
61767
+ text: `${t(checkForNA$1((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)))}`
60984
61768
  }), /*#__PURE__*/React.createElement(Row, {
60985
61769
  label: t("WS_PROPERTY_TYPE"),
60986
- text: `${t(checkForNA((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)))}`
61770
+ text: `${t(checkForNA$1((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)))}`
60987
61771
  }), /*#__PURE__*/React.createElement(Row, {
60988
61772
  label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
60989
- text: `${t(checkForNA((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) || (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)))}`
61773
+ text: `${t(checkForNA$1((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) || (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)))}`
60990
61774
  }), /*#__PURE__*/React.createElement(Row, {
60991
61775
  label: t("WS_NUMBER_OF_FLOORS"),
60992
- text: `${t(checkForNA((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)))}`
61776
+ text: `${t(checkForNA$1((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)))}`
60993
61777
  }), /*#__PURE__*/React.createElement(Row, {
60994
61778
  label: t("WS_PLOT_AREA"),
60995
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
61779
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
60996
61780
  }), /*#__PURE__*/React.createElement(Row, {
60997
61781
  label: t("WS_BUILT_UP_AREA"),
60998
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
61782
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
60999
61783
  }), (useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding) && /*#__PURE__*/React.createElement(Row, {
61000
61784
  label: t("WS_HEIGHT_OF_THE_BUILDING(meters)"),
61001
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61785
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61002
61786
  }), /*#__PURE__*/React.createElement(Row, {
61003
61787
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
61004
- text: `${t(checkForNA((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)))}`
61005
- }), ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse", "BuiltUp.GroupHousingSociety", "BuiltUp.JJSLUMS", "BuiltUp.IndividualHouse"].includes((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)) ? /*#__PURE__*/React.createElement(Row, {
61788
+ text: `${t(checkForNA$1((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)))}`
61789
+ }), 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) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail = cpt.additionalDetails) === null || _cpt$additionalDetail === void 0 ? void 0 : (_cpt$additionalDetail2 = _cpt$additionalDetail.propertyCategory) === null || _cpt$additionalDetail2 === void 0 ? void 0 : _cpt$additionalDetail2.code) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail3 = cpt.additionalDetails) === null || _cpt$additionalDetail3 === void 0 ? void 0 : _cpt$additionalDetail3.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$propertyType = cpt.propertyType) === null || _cpt$propertyType === void 0 ? void 0 : _cpt$propertyType.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : cpt.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
61006
61790
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
61007
- text: `${t(checkForNA((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
61008
- }) : null), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
61791
+ text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
61792
+ }) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail4 = cpt.additionalDetails) === null || _cpt$additionalDetail4 === void 0 ? void 0 : _cpt$additionalDetail4.questions)) ? (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail5 = cpt.additionalDetails) === null || _cpt$additionalDetail5 === void 0 ? void 0 : _cpt$additionalDetail5.questions) : []).map((q, idx) => {
61793
+ var _q$answer, _q$answer2, _q$answer3;
61794
+ 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}`;
61795
+ 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;
61796
+ const trimmedQ = String(qText || "").trim();
61797
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
61798
+ return /*#__PURE__*/React.createElement(Row, {
61799
+ key: `question_${idx}`,
61800
+ label: displayLabel,
61801
+ text: `${t(checkForNA$1(aText))}`
61802
+ });
61803
+ })), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
61009
61804
  style: {
61010
61805
  marginTop: "10px",
61011
61806
  marginBottom: "30px"
@@ -61018,10 +61813,10 @@ const CheckPage$4 = _ref2 => {
61018
61813
  })
61019
61814
  }), ((djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.isDjbEmployee) || (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId) || (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation) || (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)) && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
61020
61815
  label: t("WS_EMPLOYEE_ID"),
61021
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61816
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61022
61817
  }), /*#__PURE__*/React.createElement(Row, {
61023
61818
  label: t("WS_EMPLOYEE_DESIGNATION"),
61024
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61819
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61025
61820
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
61026
61821
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
61027
61822
  text: /*#__PURE__*/React.createElement("span", {
@@ -61053,7 +61848,7 @@ const CheckPage$4 = _ref2 => {
61053
61848
  key: index
61054
61849
  }, /*#__PURE__*/React.createElement(Row, {
61055
61850
  label: t(`${doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll(".", "_")}`),
61056
- text: checkForNA(doc === null || doc === void 0 ? void 0 : doc.documentUid),
61851
+ text: checkForNA$1(doc === null || doc === void 0 ? void 0 : doc.documentUid),
61057
61852
  actionButton: index === 0 ? /*#__PURE__*/React.createElement(ActionButton$1, {
61058
61853
  onClick: onEdit
61059
61854
  }) : null
@@ -62434,6 +63229,7 @@ const componentsToRegister = {
62434
63229
  WSCard,
62435
63230
  SWCard,
62436
63231
  WSBillIAmendMentInbox: Inbox,
63232
+ WSSearchBillAmendment: SearchBillAmendment,
62437
63233
  WSCreate: WSCreate,
62438
63234
  WSDisconnection: WSDisconnection,
62439
63235
  WSRestoration: WSDisconnection$1,