@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.
package/dist/index.js CHANGED
@@ -507,31 +507,42 @@ const getPattern = type => {
507
507
  };
508
508
  const getFiles = function (filesArray, tenant) {
509
509
  try {
510
- const _temp3 = _catch(function () {
510
+ return Promise.resolve(_catch(function () {
511
+ if (!filesArray || filesArray.length === 0) return;
512
+ const targetFile = filesArray[0];
513
+ if (targetFile && typeof targetFile === "object") {
514
+ if (targetFile instanceof File || targetFile !== null && targetFile !== void 0 && targetFile.type) {
515
+ window.open(URL.createObjectURL(targetFile), "_blank");
516
+ return;
517
+ }
518
+ if (targetFile !== null && targetFile !== void 0 && targetFile.fileStoreId) {
519
+ filesArray = [targetFile.fileStoreId];
520
+ }
521
+ }
511
522
  return Promise.resolve(Digit.UploadServices.Filefetch(filesArray, tenant)).then(function (response) {
512
- var _response$data, _response$data$fileSt, _response$data$fileSt2, _response$data2;
513
- 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) {
514
- window.open(response.data.fileStoreIds[0].url);
515
- } 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]]) {
516
- let linkText = response.data[filesArray[0]];
517
- let fileURL = "";
518
- if (linkText && typeof linkText == "string") {
519
- const linkList = linkText.split(",");
520
- linkList.forEach(link => {
521
- if (!link.includes("large") && !link.includes("medium") && !link.includes("small")) {
522
- fileURL = link;
523
- }
524
- });
525
- }
526
- if (fileURL) {
527
- window.open(fileURL);
523
+ var _response$data, _response$data$fileSt, _response$data$fileSt2, _filesArray, _response$data2;
524
+ 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]] : "") || "";
525
+ let fileURL = "";
526
+ if (rawUrl && typeof rawUrl === "string") {
527
+ const linkList = rawUrl.split(",");
528
+ linkList.forEach(link => {
529
+ const trimmed = link ? link.trim() : "";
530
+ if (trimmed && !trimmed.includes("large") && !trimmed.includes("medium") && !trimmed.includes("small")) {
531
+ fileURL = trimmed;
532
+ }
533
+ });
534
+ if (!fileURL && linkList[0]) {
535
+ fileURL = linkList[0].trim();
528
536
  }
529
537
  }
538
+ if (fileURL) {
539
+ window.open(fileURL, "_blank");
540
+ return fileURL;
541
+ }
530
542
  });
531
543
  }, function (error) {
532
544
  console.error("Error fetching file URL", error);
533
- });
534
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
545
+ }));
535
546
  } catch (e) {
536
547
  return Promise.reject(e);
537
548
  }
@@ -835,7 +846,7 @@ const convertToWSUpdate = data => {
835
846
  return formdata;
836
847
  };
837
848
  const convertToEditWSUpdate = data => {
838
- 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;
849
+ 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;
839
850
  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];
840
851
  let formdata = {
841
852
  WaterConnection: {
@@ -855,10 +866,10 @@ const convertToEditWSUpdate = data => {
855
866
  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,
856
867
  connectionCategory: null,
857
868
  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,
858
- additionalDetails: data !== null && data !== void 0 && data.isEditApplication ? {
859
- ...(data === null || data === void 0 ? void 0 : data.additionalDetails)
860
- } : {
861
- ...(waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails)
869
+ additionalDetails: {
870
+ ...(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),
871
+ 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) || "",
872
+ 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) || ""
862
873
  },
863
874
  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,
864
875
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
@@ -918,7 +929,7 @@ const convertToEditWSUpdate = data => {
918
929
  return formdata;
919
930
  };
920
931
  const convertToEditSWUpdate = data => {
921
- 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;
932
+ 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;
922
933
  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];
923
934
  let formdata = {
924
935
  SewerageConnection: {
@@ -938,10 +949,10 @@ const convertToEditSWUpdate = data => {
938
949
  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,
939
950
  connectionCategory: null,
940
951
  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,
941
- additionalDetails: data !== null && data !== void 0 && data.isEditApplication ? {
942
- ...(data === null || data === void 0 ? void 0 : data.additionalDetails)
943
- } : {
944
- ...(SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails)
952
+ additionalDetails: {
953
+ ...(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),
954
+ 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) || "",
955
+ 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) || ""
945
956
  },
946
957
  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,
947
958
  processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
@@ -1818,7 +1829,7 @@ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
1818
1829
  };
1819
1830
  const convertEditApplicationDetails = function (data, appData, actionData) {
1820
1831
  try {
1821
- 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;
1832
+ 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;
1822
1833
  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 => {
1823
1834
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
1824
1835
  });
@@ -1830,10 +1841,10 @@ const convertEditApplicationDetails = function (data, appData, actionData) {
1830
1841
  let payload = {
1831
1842
  ...appData.applicationData,
1832
1843
  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,
1833
- 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),
1834
- 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),
1835
- 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),
1836
- 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),
1844
+ 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),
1845
+ 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),
1846
+ 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),
1847
+ 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),
1837
1848
  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) ? [{
1838
1849
  ...(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]),
1839
1850
  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) || "",
@@ -1943,16 +1954,16 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
1943
1954
  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,
1944
1955
  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
1945
1956
  }];
1946
- 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) || "",
1947
- _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,
1948
- _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;
1957
+ 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) || "",
1958
+ _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,
1959
+ _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;
1949
1960
  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) {
1950
1961
  var _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
1951
1962
  let payload = {
1952
1963
  ...appData.applicationData,
1953
- documents: _temp4,
1954
- isDisconnectionTemporary: _temp5,
1955
- disconnectionReason: _temp6,
1964
+ documents: _temp3,
1965
+ isDisconnectionTemporary: _temp4,
1966
+ disconnectionReason: _temp5,
1956
1967
  dateEffectiveFrom: _getConvertedDate,
1957
1968
  processInstance: {
1958
1969
  action: actionData ? actionData : "RESUBMIT_APPLICATION"
@@ -1995,10 +2006,10 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
1995
2006
  }
1996
2007
  try {
1997
2008
  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;
1998
- function _temp10() {
2009
+ function _temp1() {
1999
2010
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
2000
- function _temp0() {
2001
- function _temp8() {
2011
+ function _temp9() {
2012
+ function _temp7() {
2002
2013
  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;
2003
2014
  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;
2004
2015
  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) || [];
@@ -2032,20 +2043,20 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2032
2043
  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));
2033
2044
  return formData;
2034
2045
  }
2035
- const _temp7 = function (_data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4) {
2046
+ const _temp6 = function (_data$activationDetai, _data$activationDetai2, _data$activationDetai3, _data$activationDetai4) {
2036
2047
  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) {
2037
2048
  formData.dateEffectiveFrom = _getConvertedDate4;
2038
2049
  });
2039
2050
  }();
2040
- return _temp7 && _temp7.then ? _temp7.then(_temp8) : _temp8(_temp7);
2051
+ return _temp6 && _temp6.then ? _temp6.then(_temp7) : _temp7(_temp6);
2041
2052
  }
2042
2053
  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;
2043
- const _temp9 = function (_data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10) {
2054
+ const _temp8 = function (_data$activationDetai9, _data$activationDetai0, _data$activationDetai1, _data$activationDetai10) {
2044
2055
  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) {
2045
2056
  formData.connectionExecutionDate = _getConvertedDate3;
2046
2057
  });
2047
2058
  }();
2048
- return _temp9 && _temp9.then ? _temp9.then(_temp0) : _temp0(_temp9);
2059
+ return _temp8 && _temp8.then ? _temp8.then(_temp9) : _temp9(_temp8);
2049
2060
  }
2050
2061
  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 => {
2051
2062
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
@@ -2061,12 +2072,12 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2061
2072
  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;
2062
2073
  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;
2063
2074
  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;
2064
- const _temp1 = function (_data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18) {
2075
+ const _temp0 = function (_data$activationDetai15, _data$activationDetai16, _data$activationDetai17, _data$activationDetai18) {
2065
2076
  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) {
2066
2077
  formData.meterInstallationDate = _getConvertedDate2;
2067
2078
  });
2068
2079
  }();
2069
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(_temp10) : _temp10(_temp1));
2080
+ return Promise.resolve(_temp0 && _temp0.then ? _temp0.then(_temp1) : _temp1(_temp0));
2070
2081
  } catch (e) {
2071
2082
  return Promise.reject(e);
2072
2083
  }
@@ -2115,7 +2126,7 @@ const ifUserRoleExists = role => {
2115
2126
  return true;
2116
2127
  } else return false;
2117
2128
  };
2118
- const checkForNA = function (value) {
2129
+ const checkForNA$1 = function (value) {
2119
2130
  if (value === void 0) {
2120
2131
  value = "";
2121
2132
  }
@@ -9602,7 +9613,7 @@ const getWSAcknowledgementData$2 = function (amendment, tenantInfo, t, tableData
9602
9613
  };
9603
9614
 
9604
9615
  const Response = () => {
9605
- var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$;
9616
+ var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$, _data$Amendments4, _data$Amendments4$;
9606
9617
  const tenantId = Digit.ULBService.getCurrentTenantId();
9607
9618
  const {
9608
9619
  state
@@ -9611,7 +9622,7 @@ const Response = () => {
9611
9622
  const {
9612
9623
  t
9613
9624
  } = reactI18next.useTranslation();
9614
- const connNumber = state === null || state === void 0 ? void 0 : (_state$Amendment = state.Amendment) === null || _state$Amendment === void 0 ? void 0 : _state$Amendment.consumerCode;
9625
+ const connNumber = String((state === null || state === void 0 ? void 0 : (_state$Amendment = state.Amendment) === null || _state$Amendment === void 0 ? void 0 : _state$Amendment.consumerCode) || "");
9615
9626
  let serviceType = "WATER";
9616
9627
  if (connNumber.includes("SW")) serviceType = "SEWERAGE";
9617
9628
  const {
@@ -9677,7 +9688,16 @@ const Response = () => {
9677
9688
  justifyContent: "flex-end",
9678
9689
  alignItems: "baseline"
9679
9690
  }
9680
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9691
+ }, (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__default.createElement(digitUiReactComponents.SubmitBar, {
9692
+ label: t("CS_TITLE_GENERATE_NOTE"),
9693
+ onSubmit: () => {
9694
+ var _data$Amendments5, _data$Amendments5$;
9695
+ 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}`);
9696
+ },
9697
+ style: {
9698
+ marginRight: "1rem"
9699
+ }
9700
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
9681
9701
  label: t("CORE_COMMON_GO_TO_HOME"),
9682
9702
  onSubmit: () => history.push(`/digit-ui/employee`),
9683
9703
  style: {
@@ -11652,6 +11672,10 @@ const BILLSBreadCrumbs = _ref => {
11652
11672
  path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
11653
11673
  label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
11654
11674
  show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
11675
+ }, {
11676
+ path: "/digit-ui/employee/ws/water/bill-amendment/search-application",
11677
+ label: t("WS_BILL_AMENDMENT_SEARCH_APPLICATION", "Search Bill Amendment"),
11678
+ show: location.pathname.includes("/bill-amendment/search-application") ? true : false
11655
11679
  }, {
11656
11680
  path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
11657
11681
  label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
@@ -11904,7 +11928,7 @@ const BILLSBreadCrumbs = _ref => {
11904
11928
  }));
11905
11929
  };
11906
11930
  const App$1 = _ref2 => {
11907
- 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;
11931
+ 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;
11908
11932
  let {
11909
11933
  path
11910
11934
  } = _ref2;
@@ -11983,6 +12007,7 @@ const App$1 = _ref2 => {
11983
12007
  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");
11984
12008
  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");
11985
12009
  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");
12010
+ 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");
11986
12011
  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");
11987
12012
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
11988
12013
  return /*#__PURE__*/React__default.createElement("div", {
@@ -12079,6 +12104,11 @@ const App$1 = _ref2 => {
12079
12104
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12080
12105
  path: `${path}/activate-connection`,
12081
12106
  component: WSActivateConnection
12107
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12108
+ path: `${path}/water/bill-amendment/search-application`,
12109
+ component: props => /*#__PURE__*/React__default.createElement(WSSearchBillAmendment, _extends({}, props, {
12110
+ parentRoute: path
12111
+ }))
12082
12112
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
12083
12113
  path: `${path}/water/search-application`,
12084
12114
  component: props => /*#__PURE__*/React__default.createElement(WSSearch, _extends({}, props, {
@@ -13054,7 +13084,9 @@ const createConnectionDetails = () => ({
13054
13084
  },
13055
13085
  institutionName: "",
13056
13086
  natureOfWork: "",
13057
- orgDeptDocument: ""
13087
+ orgDeptDocument: "",
13088
+ addressType: "",
13089
+ completeAddress: ""
13058
13090
  });
13059
13091
  const WSConnectionDetails = _ref => {
13060
13092
  var _formData$ConnectionD, _formData$ConnectionD2;
@@ -13074,6 +13106,16 @@ const WSConnectionDetails = _ref => {
13074
13106
  pathname
13075
13107
  } = reactRouterDom.useLocation();
13076
13108
  const [connectionDetails, setConnectionDetails] = React.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()]);
13109
+ React.useEffect(() => {
13110
+ var _formData$ConnectionD3;
13111
+ if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : _formData$ConnectionD3.length) > 0) {
13112
+ const incoming = formData.ConnectionDetails[0];
13113
+ const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
13114
+ 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)) {
13115
+ setConnectionDetails([incoming]);
13116
+ }
13117
+ }
13118
+ }, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
13077
13119
  const [focusIndex, setFocusIndex] = React.useState({
13078
13120
  index: -1,
13079
13121
  type: ""
@@ -13214,7 +13256,7 @@ const WSConnectionDetails = _ref => {
13214
13256
  }, commonProps))));
13215
13257
  };
13216
13258
  const ConnectionDetails = _props => {
13217
- var _formData$DocumentsRe;
13259
+ 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;
13218
13260
  const {
13219
13261
  connectionDetail,
13220
13262
  focusIndex,
@@ -13239,6 +13281,64 @@ const ConnectionDetails = _props => {
13239
13281
  formData,
13240
13282
  userType
13241
13283
  } = _props;
13284
+ const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || window.localStorage.getItem("user-info") || "{}");
13285
+ let addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13286
+ if (!addresses || addresses.length === 0) {
13287
+ var _formData$cpt, _formData$cpt$details, _formData$cpt$details2, _formData$cpt2, _formData$cpt2$detail, _cptAddress$locality, _cptAddress$locality2;
13288
+ 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];
13289
+ 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;
13290
+ 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(", ") : "";
13291
+ const ownerPermAddress = owner !== null && owner !== void 0 && owner.permanentAddress && (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) !== "NA" ? owner.permanentAddress : formattedPropertyAddress;
13292
+ const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : ownerPermAddress || formattedPropertyAddress;
13293
+ if (ownerPermAddress || ownerCorrAddress) {
13294
+ addresses = [{
13295
+ type: "PERMANENT",
13296
+ address: ownerPermAddress
13297
+ }, {
13298
+ type: "CORRESPONDENCE",
13299
+ address: ownerCorrAddress
13300
+ }];
13301
+ }
13302
+ }
13303
+ const getAddressTypeObj = val => {
13304
+ if (!val) return null;
13305
+ if (typeof val === "object") {
13306
+ const code = (val.code || val.i18nKey || "").toUpperCase();
13307
+ if (code === "CORRESPONDENCE") {
13308
+ return {
13309
+ i18nKey: "Correspondence",
13310
+ code: "CORRESPONDENCE"
13311
+ };
13312
+ }
13313
+ return {
13314
+ i18nKey: "Permanent",
13315
+ code: "PERMANENT"
13316
+ };
13317
+ }
13318
+ const str = String(val).toUpperCase();
13319
+ if (str === "CORRESPONDENCE") {
13320
+ return {
13321
+ i18nKey: "Correspondence",
13322
+ code: "CORRESPONDENCE"
13323
+ };
13324
+ }
13325
+ if (str === "PERMANENT") {
13326
+ return {
13327
+ i18nKey: "Permanent",
13328
+ code: "PERMANENT"
13329
+ };
13330
+ }
13331
+ return {
13332
+ i18nKey: val,
13333
+ code: val
13334
+ };
13335
+ };
13336
+ 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)) || "";
13337
+ 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) || "";
13338
+ if (!initialCompleteAddress && initialAddressType !== null && initialAddressType !== void 0 && initialAddressType.code && ((_addresses = addresses) === null || _addresses === void 0 ? void 0 : _addresses.length) > 0) {
13339
+ const matchedAddr = addresses.find(a => a.type === initialAddressType.code) || {};
13340
+ initialCompleteAddress = matchedAddr.houseNumber || matchedAddr.city || matchedAddr.pinCode ? [matchedAddr.houseNumber, matchedAddr.address, matchedAddr.city, matchedAddr.pinCode].filter(Boolean).join(", ") : matchedAddr.address || "";
13341
+ }
13242
13342
  const {
13243
13343
  control,
13244
13344
  formState: localFormState,
@@ -13287,16 +13387,36 @@ const ConnectionDetails = _props => {
13287
13387
  natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
13288
13388
  orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
13289
13389
  orgDeptDocumentName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || "",
13290
- addressType: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || "",
13291
- completeAddress: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || ""
13390
+ addressType: initialAddressType || "",
13391
+ completeAddress: initialCompleteAddress || ""
13292
13392
  }
13293
13393
  });
13294
13394
  const formValue = watch();
13295
13395
  const {
13296
13396
  errors
13297
13397
  } = localFormState;
13298
- const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || "{}");
13299
- const addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13398
+ React.useEffect(() => {
13399
+ 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;
13400
+ 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);
13401
+ const formattedAddrType = getAddressTypeObj(rawAddrType);
13402
+ if (formattedAddrType) {
13403
+ const currentVal = getValues("addressType");
13404
+ if (!currentVal || typeof currentVal === "object" && (currentVal === null || currentVal === void 0 ? void 0 : currentVal.code) !== formattedAddrType.code || typeof currentVal === "string" && currentVal !== formattedAddrType.code) {
13405
+ setValue("addressType", formattedAddrType);
13406
+ }
13407
+ }
13408
+ 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);
13409
+ const currentAddr = getValues("completeAddress");
13410
+ if (savedAddr && (!currentAddr || currentAddr !== savedAddr)) {
13411
+ setValue("completeAddress", savedAddr);
13412
+ } else if (!currentAddr && formattedAddrType && ((_addresses2 = addresses) === null || _addresses2 === void 0 ? void 0 : _addresses2.length) > 0) {
13413
+ const matched = addresses.find(a => a.type === formattedAddrType.code) || {};
13414
+ const fallback = matched.houseNumber || matched.city || matched.pinCode ? [matched.houseNumber, matched.address, matched.city, matched.pinCode].filter(Boolean).join(", ") : matched.address || "";
13415
+ if (fallback) {
13416
+ setValue("completeAddress", fallback);
13417
+ }
13418
+ }
13419
+ }, [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]);
13300
13420
  const [uploadedFile, setUploadedFile] = React.useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
13301
13421
  const [file, setFile] = React.useState(null);
13302
13422
  const [fileUploadError, setFileUploadError] = React.useState(null);
@@ -13344,6 +13464,10 @@ const ConnectionDetails = _props => {
13344
13464
  if (!lodash.isEqual(formValue, part)) {
13345
13465
  let isErrorsFound = true;
13346
13466
  Object.keys(formValue).map(data => {
13467
+ var _formValue$domesticTy;
13468
+ 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)) {
13469
+ return;
13470
+ }
13347
13471
  if (!formValue[data] && isErrorsFound) {
13348
13472
  isErrorsFound = false;
13349
13473
  setIsErrors(true);
@@ -13455,12 +13579,12 @@ const ConnectionDetails = _props => {
13455
13579
  placeholder: t("Select Applicant Type")
13456
13580
  });
13457
13581
  }
13458
- })), window.location.href.includes("/citizen") && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React__default.createElement("span", {
13582
+ })), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React__default.createElement("span", {
13459
13583
  className: "check-page-link-button"
13460
13584
  }, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
13461
13585
  control: control,
13462
13586
  name: "addressType",
13463
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || "",
13587
+ defaultValue: initialAddressType || "",
13464
13588
  rules: {
13465
13589
  required: t("REQUIRED_FIELD")
13466
13590
  },
@@ -13469,7 +13593,7 @@ const ConnectionDetails = _props => {
13469
13593
  var _errors$addressType;
13470
13594
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
13471
13595
  className: "form-field",
13472
- selected: getValues("addressType"),
13596
+ selected: props.value || getValues("addressType") || initialAddressType,
13473
13597
  disable: false,
13474
13598
  option: [{
13475
13599
  i18nKey: "Permanent",
@@ -13482,7 +13606,7 @@ const ConnectionDetails = _props => {
13482
13606
  select: e => {
13483
13607
  props.onChange(e);
13484
13608
  const selectedAddress = addresses.find(a => a.type === e.code) || {};
13485
- const formattedAddress = [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ");
13609
+ const formattedAddress = selectedAddress.houseNumber || selectedAddress.city || selectedAddress.pinCode ? [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ") : selectedAddress.address || "";
13486
13610
  setValue("completeAddress", formattedAddress);
13487
13611
  },
13488
13612
  optionKey: "i18nKey",
@@ -13494,18 +13618,21 @@ const ConnectionDetails = _props => {
13494
13618
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Complete Address")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
13495
13619
  control: control,
13496
13620
  name: "completeAddress",
13497
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || "",
13621
+ defaultValue: initialCompleteAddress || "",
13498
13622
  render: props => /*#__PURE__*/React__default.createElement("div", {
13499
13623
  className: "field"
13500
13624
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
13501
13625
  className: "form-field",
13502
- value: getValues("completeAddress"),
13503
- disable: true,
13504
- disabled: true,
13505
- onChange: () => {},
13506
- style: {
13626
+ value: props.value ?? getValues("completeAddress") ?? initialCompleteAddress ?? "",
13627
+ disable: addresses.length > 0,
13628
+ disabled: addresses.length > 0,
13629
+ onChange: e => {
13630
+ props.onChange(e.target.value);
13631
+ setValue("completeAddress", e.target.value);
13632
+ },
13633
+ style: addresses.length > 0 ? {
13507
13634
  backgroundColor: "#eee"
13508
- }
13635
+ } : {}
13509
13636
  }))
13510
13637
  })))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
13511
13638
  open: showDocModal,
@@ -16917,39 +17044,53 @@ const WSActivationCommentsDetails = _ref => {
16917
17044
  };
16918
17045
 
16919
17046
  const WSActivationSupportingDocuments = _ref => {
16920
- var _formData$supportingD, _formData$supportingD2;
17047
+ 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;
16921
17048
  let {
16922
17049
  t,
16923
17050
  config,
16924
17051
  userType,
16925
17052
  formData,
16926
- onSelect
17053
+ onSelect,
17054
+ setError: setFormError,
17055
+ clearErrors: clearFormErrors,
17056
+ formState,
17057
+ errors: formErrors
16927
17058
  } = _ref;
16928
- const stateId = Digit.ULBService.getStateId();
16929
17059
  const tenantIdCode = Digit.ULBService.getCurrentTenantId();
16930
- const [documents, setDocuments] = React.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]] : []);
17060
+ 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);
17061
+ const [documents, setDocuments] = React.useState(initialDoc !== null && initialDoc !== void 0 && initialDoc.fileStoreId ? [initialDoc] : []);
16931
17062
  const [error, setError] = React.useState(null);
16932
- const [uploadedFile, setUploadedFile] = React.useState(null);
17063
+ const [uploadedFile, setUploadedFile] = React.useState((initialDoc === null || initialDoc === void 0 ? void 0 : initialDoc.fileStoreId) || null);
16933
17064
  const [file, setFile] = React.useState(null);
16934
- const goNext = () => {
16935
- onSelect(config.key, {
16936
- documents
16937
- });
16938
- };
16939
17065
  function selectfile(e) {
16940
- setFile(e.target.files[0]);
17066
+ var _e$target$files;
17067
+ const selectedFile = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
17068
+ if (selectedFile) {
17069
+ setFile(selectedFile);
17070
+ }
16941
17071
  }
16942
17072
  React.useEffect(() => {
16943
- goNext();
16944
- }, [documents]);
17073
+ var _formData$supportingD5, _formData$supportingD6, _formData$supportingD7, _formData$supportingD8;
17074
+ 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);
17075
+ if (doc !== null && doc !== void 0 && doc.fileStoreId && !uploadedFile) {
17076
+ setUploadedFile(doc.fileStoreId);
17077
+ setDocuments([doc]);
17078
+ }
17079
+ }, [formData === null || formData === void 0 ? void 0 : formData.supportingDocuments]);
16945
17080
  React.useEffect(() => {
16946
- if (userType === "employee") {
16947
- onSelect(config.key, {
16948
- ...formData[config.key],
16949
- ...documents
16950
- });
17081
+ if (uploadedFile) {
17082
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17083
+ clearFormErrors(config.key);
17084
+ }
17085
+ } else {
17086
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17087
+ setFormError(config.key, {
17088
+ type: "required",
17089
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17090
+ });
17091
+ }
16951
17092
  }
16952
- }, [documents]);
17093
+ }, [uploadedFile, setFormError, clearFormErrors, config === null || config === void 0 ? void 0 : config.key]);
16953
17094
  React.useEffect(() => {
16954
17095
  (function () {
16955
17096
  try {
@@ -16970,7 +17111,21 @@ const WSActivationSupportingDocuments = _ref => {
16970
17111
  var _response$data, _response$data$files;
16971
17112
  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) {
16972
17113
  var _response$data2, _response$data2$files;
16973
- 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);
17114
+ 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;
17115
+ setUploadedFile(fsId);
17116
+ setDocuments([{
17117
+ fileStoreId: fsId,
17118
+ documentUid: fsId
17119
+ }]);
17120
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17121
+ onSelect(config.key, [{
17122
+ fileStoreId: fsId,
17123
+ documentUid: fsId
17124
+ }]);
17125
+ }
17126
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17127
+ clearFormErrors(config.key);
17128
+ }
16974
17129
  } else {
16975
17130
  setError(t("CS_FILE_UPLOAD_ERROR"));
16976
17131
  }
@@ -16993,27 +17148,38 @@ const WSActivationSupportingDocuments = _ref => {
16993
17148
  }
16994
17149
  })();
16995
17150
  }, [file]);
16996
- React.useEffect(() => {
16997
- if (uploadedFile) {
16998
- setDocuments(prev => {
16999
- return [{
17000
- fileStoreId: uploadedFile,
17001
- documentUid: uploadedFile
17002
- }];
17151
+ const handleDelete = () => {
17152
+ setUploadedFile(null);
17153
+ setDocuments([]);
17154
+ setFile(null);
17155
+ setError(null);
17156
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17157
+ onSelect(config.key, null);
17158
+ }
17159
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17160
+ setFormError(config.key, {
17161
+ type: "required",
17162
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17003
17163
  });
17004
17164
  }
17005
- }, [uploadedFile]);
17165
+ };
17166
+ 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]));
17167
+ const errorStyle = {
17168
+ width: "100%",
17169
+ marginLeft: "0px",
17170
+ fontSize: "12px",
17171
+ marginTop: "4px"
17172
+ };
17006
17173
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t(`WF_APPROVAL_UPLOAD_HEAD`), /*#__PURE__*/React__default.createElement("span", {
17007
17174
  className: "check-page-link-button"
17008
17175
  }, " *"), ":"), /*#__PURE__*/React__default.createElement("div", {
17009
17176
  className: "field"
17010
17177
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
17178
+ id: "activation-supporting-documents",
17011
17179
  onUpload: e => {
17012
17180
  selectfile(e);
17013
17181
  },
17014
- onDelete: () => {
17015
- setUploadedFile(null);
17016
- },
17182
+ onDelete: handleDelete,
17017
17183
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
17018
17184
  textStyles: {
17019
17185
  width: "100%"
@@ -17023,9 +17189,13 @@ const WSActivationSupportingDocuments = _ref => {
17023
17189
  },
17024
17190
  buttonType: "button",
17025
17191
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
17026
- iserror: error,
17192
+ 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),
17027
17193
  isMandatory: true
17028
- }))));
17194
+ }), error ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
17195
+ style: errorStyle
17196
+ }, error) : null, !error && hasValidationError && (formState !== null && formState !== void 0 && formState.isSubmitted || (formState === null || formState === void 0 ? void 0 : formState.submitCount) > 0) ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
17197
+ style: errorStyle
17198
+ }, (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)));
17029
17199
  };
17030
17200
 
17031
17201
  var b = "function" === typeof Symbol && Symbol.for,
@@ -23039,7 +23209,6 @@ const WSRestorationForm = _ref => {
23039
23209
  var _data$code;
23040
23210
  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(), " ", "_")}`;
23041
23211
  });
23042
- console.log("disconnectionTypes", disconnectionTypes);
23043
23212
  setDisconnectionTypeList(disconnectionTypes);
23044
23213
  }, [mdmsData]);
23045
23214
  React.useEffect(() => {
@@ -23853,7 +24022,6 @@ const WSRestorationForm = _ref => {
23853
24022
  onClose: () => setError(null)
23854
24023
  }));
23855
24024
  }
23856
- console.log("applicationData", applicationData);
23857
24025
  return /*#__PURE__*/React__default.createElement("div", {
23858
24026
  style: {
23859
24027
  margin: "16px"
@@ -25618,7 +25786,7 @@ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
25618
25786
  const normalizeCode = value => String(value || "").replace(/[._\s-]/g, "").toUpperCase();
25619
25787
  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;
25620
25788
  const PropertyWaterConnection = _ref => {
25621
- 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;
25789
+ 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;
25622
25790
  let {
25623
25791
  t,
25624
25792
  config,
@@ -25640,10 +25808,10 @@ const PropertyWaterConnection = _ref => {
25640
25808
  } = reactHookForm.useForm({
25641
25809
  defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config.key]) || {
25642
25810
  useDetails: {
25811
+ categoryType: null,
25643
25812
  propertyCategory: null,
25644
25813
  propertyType: null,
25645
25814
  WaterConnectionUsageType: null,
25646
- noOfFloors: null,
25647
25815
  plotArea: "",
25648
25816
  builtUpArea: "",
25649
25817
  farArea: "",
@@ -25662,13 +25830,6 @@ const PropertyWaterConnection = _ref => {
25662
25830
  const {
25663
25831
  data: ptServicesMastersData
25664
25832
  } = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "NoOfFloors", "PropertyNewUsageType", "PropertyToUsageMapping", "PropertyType2"]);
25665
- React.useEffect(() => {
25666
- var _ptServicesMastersDat, _ptServicesMastersDat2;
25667
- console.log("[PropertyWaterConnection] tenantId used for MDMS:", tenantId);
25668
- console.log("[PropertyWaterConnection] MDMS raw response (ptServicesMastersData):", ptServicesMastersData);
25669
- console.log("[PropertyWaterConnection] MDMS PropertyTax.PropertyType2:", ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : _ptServicesMastersDat.PropertyType2);
25670
- console.log("[PropertyWaterConnection] MDMS PropertyTax.PropertyType:", ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat2 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat2 === void 0 ? void 0 : _ptServicesMastersDat2.PropertyType);
25671
- }, [tenantId, ptServicesMastersData]);
25672
25833
  const {
25673
25834
  data: wsServicesMastersData
25674
25835
  } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]);
@@ -25708,8 +25869,16 @@ const PropertyWaterConnection = _ref => {
25708
25869
  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";
25709
25870
  const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
25710
25871
  const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
25711
- const dwellingPropertyTypes = ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse"];
25712
- const isDwellingUnit = dwellingPropertyTypes.includes(watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code);
25872
+ 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";
25873
+ const isDwellingUnit = isResidential;
25874
+ React.useEffect(() => {
25875
+ if (!isDwellingUnit) {
25876
+ setValue("useDetails.NumberofDwellingUnits", "");
25877
+ if (clearErrors) {
25878
+ clearErrors("useDetails.NumberofDwellingUnits");
25879
+ }
25880
+ }
25881
+ }, [isDwellingUnit]);
25713
25882
  const yearOptions = React.useMemo(() => {
25714
25883
  const currentYear = new Date().getFullYear();
25715
25884
  const years = [];
@@ -25721,25 +25890,27 @@ const PropertyWaterConnection = _ref => {
25721
25890
  }
25722
25891
  return years;
25723
25892
  }, []);
25724
- const categoryOptions = React.useMemo(() => {
25725
- var _ptServicesMastersDat3, _ptServicesMastersDat4;
25726
- 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)) || [];
25727
- return options.map(item => ({
25728
- code: item.code,
25729
- name: item.name
25730
- }));
25731
- }, [ptServicesMastersData]);
25732
25893
  const propertyType2List = React.useMemo(() => {
25733
- var _ptServicesMastersDat5;
25734
- const fromMdms = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : _ptServicesMastersDat5.PropertyType2;
25894
+ var _ptServicesMastersDat;
25895
+ const fromMdms = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : _ptServicesMastersDat.PropertyType2;
25735
25896
  if (Array.isArray(fromMdms) && fromMdms.length > 0) {
25736
25897
  return fromMdms;
25737
25898
  }
25738
25899
  return [];
25739
25900
  }, [ptServicesMastersData]);
25901
+ const categoryOptions = React.useMemo(() => {
25902
+ var _ptServicesMastersDat2;
25903
+ 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) || [];
25904
+ const uniqueCats = [...new Set(list.map(item => item.propertyCategory).filter(Boolean))];
25905
+ return uniqueCats.map(cat => ({
25906
+ code: cat,
25907
+ name: cat,
25908
+ i18nKey: cat
25909
+ }));
25910
+ }, [propertyType2List, ptServicesMastersData]);
25740
25911
  const propertyTypeOptions = React.useMemo(() => {
25741
- var _ptServicesMastersDat6;
25742
- 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) || [];
25912
+ var _ptServicesMastersDat3;
25913
+ 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) || [];
25743
25914
  return list.filter(item => item.active !== false).map(item => ({
25744
25915
  ...item,
25745
25916
  code: item.code,
@@ -25748,8 +25919,8 @@ const PropertyWaterConnection = _ref => {
25748
25919
  }));
25749
25920
  }, [propertyType2List, ptServicesMastersData]);
25750
25921
  const usageTypeOptions = React.useMemo(() => {
25751
- var _ptServicesMastersDat7;
25752
- 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) || [];
25922
+ var _ptServicesMastersDat4;
25923
+ 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) || [];
25753
25924
  const uniqueTypes = [...new Set(list.map(item => item.waterConnectionUsageType).filter(Boolean))];
25754
25925
  const typesToMap = uniqueTypes.length > 0 ? uniqueTypes : ["Normal", "Bulk"];
25755
25926
  return typesToMap.map(type => ({
@@ -25758,69 +25929,127 @@ const PropertyWaterConnection = _ref => {
25758
25929
  value: type
25759
25930
  }));
25760
25931
  }, [propertyType2List, ptServicesMastersData]);
25932
+ const availableCategoryOptions = React.useMemo(() => {
25933
+ var _ptServicesMastersDat5;
25934
+ const propType = watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code ? watchPropertyType : null;
25935
+ if (!propType) {
25936
+ return categoryTypeList;
25937
+ }
25938
+ 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) || [];
25939
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propType.code)) || propType;
25940
+ let rawCats = matched === null || matched === void 0 ? void 0 : matched.categoryType;
25941
+ if (!rawCats) return categoryTypeList;
25942
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25943
+ 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);
25944
+ if (rawCats.length === 0) return categoryTypeList;
25945
+ const normalizedAllowed = rawCats.map(c => normalizeCode(c));
25946
+ const matchedOptions = categoryTypeList.filter(item => normalizedAllowed.includes(normalizeCode(item.code)) || normalizedAllowed.includes(normalizeCode(item.name)));
25947
+ if (matchedOptions.length > 0) {
25948
+ return matchedOptions;
25949
+ }
25950
+ return rawCats.map(catStr => {
25951
+ const isDomestic = normalizeCode(catStr) === "DOMESTIC";
25952
+ const isNonDomestic = normalizeCode(catStr) === "NONDOMESTIC";
25953
+ const code = isDomestic ? "DOMESTIC" : isNonDomestic ? "NON_DOMESTIC" : String(catStr).toUpperCase();
25954
+ const name = isDomestic ? "Domestic" : isNonDomestic ? "Non-Domestic" : String(catStr);
25955
+ return {
25956
+ code,
25957
+ name,
25958
+ i18nKey: t && t(`WS_CATEGORY_${code}`) !== `WS_CATEGORY_${code}` ? `WS_CATEGORY_${code}` : name
25959
+ };
25960
+ });
25961
+ }, [watchPropertyType, propertyType2List, ptServicesMastersData, categoryTypeList, t]);
25962
+ const autoFillFromPropertyType = React__default.useCallback(propTypeItem => {
25963
+ var _ptServicesMastersDat6;
25964
+ if (!(propTypeItem !== null && propTypeItem !== void 0 && propTypeItem.code)) return;
25965
+ 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) || [];
25966
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propTypeItem.code)) || propTypeItem;
25967
+ console.log("[PropertyWaterConnection] Property Type selected:", matched === null || matched === void 0 ? void 0 : matched.code);
25968
+ console.log("[PropertyWaterConnection] Matched item from MDMS:", matched);
25969
+ if (matched !== null && matched !== void 0 && matched.categoryType) {
25970
+ let rawCats = matched.categoryType;
25971
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25972
+ 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);
25973
+ const hasDomestic = rawCats.some(c => normalizeCode(c) === "DOMESTIC");
25974
+ const hasNonDomestic = rawCats.some(c => normalizeCode(c) === "NONDOMESTIC");
25975
+ let targetCat = null;
25976
+ if (hasDomestic) {
25977
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "DOMESTIC" || normalizeCode(c.name) === "DOMESTIC") || {
25978
+ code: "DOMESTIC",
25979
+ name: "Domestic",
25980
+ i18nKey: t && t("WS_CATEGORY_DOMESTIC") !== "WS_CATEGORY_DOMESTIC" ? "WS_CATEGORY_DOMESTIC" : "Domestic"
25981
+ };
25982
+ } else if (hasNonDomestic) {
25983
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "NONDOMESTIC" || normalizeCode(c.name) === "NONDOMESTIC") || {
25984
+ code: "NON_DOMESTIC",
25985
+ name: "Non-Domestic",
25986
+ i18nKey: t && t("WS_CATEGORY_NON_DOMESTIC") !== "WS_CATEGORY_NON_DOMESTIC" ? "WS_CATEGORY_NON_DOMESTIC" : "Non-Domestic"
25987
+ };
25988
+ } else if (rawCats.length > 0) {
25989
+ const firstNorm = normalizeCode(rawCats[0]);
25990
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === firstNorm || normalizeCode(c.name) === firstNorm) || {
25991
+ code: rawCats[0].toUpperCase(),
25992
+ name: rawCats[0],
25993
+ i18nKey: t && t(`WS_CATEGORY_${rawCats[0]}`) !== `WS_CATEGORY_${rawCats[0]}` ? `WS_CATEGORY_${rawCats[0]}` : rawCats[0]
25994
+ };
25995
+ }
25996
+ if (targetCat) {
25997
+ setValue("useDetails.categoryType", targetCat, {
25998
+ shouldValidate: true,
25999
+ shouldDirty: true
26000
+ });
26001
+ if (clearErrors) clearErrors("useDetails.categoryType");
26002
+ }
26003
+ }
26004
+ if (matched !== null && matched !== void 0 && matched.propertyCategory) {
26005
+ const foundPropCat = categoryOptions.find(c => normalizeCode(c.code) === normalizeCode(matched.propertyCategory) || normalizeCode(c.name) === normalizeCode(matched.propertyCategory)) || {
26006
+ code: matched.propertyCategory,
26007
+ name: matched.propertyCategory,
26008
+ i18nKey: matched.propertyCategory
26009
+ };
26010
+ setValue("useDetails.propertyCategory", foundPropCat, {
26011
+ shouldValidate: true,
26012
+ shouldDirty: true
26013
+ });
26014
+ if (clearErrors) clearErrors("useDetails.propertyCategory");
26015
+ }
26016
+ if (matched !== null && matched !== void 0 && matched.waterConnectionUsageType) {
26017
+ const foundUsage = usageTypeOptions.find(u => normalizeCode(u.code) === normalizeCode(matched.waterConnectionUsageType) || normalizeCode(u.name) === normalizeCode(matched.waterConnectionUsageType)) || {
26018
+ code: matched.waterConnectionUsageType,
26019
+ name: matched.waterConnectionUsageType,
26020
+ value: matched.waterConnectionUsageType
26021
+ };
26022
+ setValue("useDetails.WaterConnectionUsageType", foundUsage, {
26023
+ shouldValidate: true,
26024
+ shouldDirty: true
26025
+ });
26026
+ if (clearErrors) clearErrors("useDetails.WaterConnectionUsageType");
26027
+ }
26028
+ }, [propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue, clearErrors, t]);
25761
26029
  const prevPropertyTypeCode = React__default.useRef(null);
25762
26030
  React.useEffect(() => {
25763
- var _ptServicesMastersDat8;
25764
26031
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) {
25765
26032
  prevPropertyTypeCode.current = null;
25766
26033
  return;
25767
26034
  }
25768
26035
  const isNewType = prevPropertyTypeCode.current !== watchPropertyType.code;
25769
- prevPropertyTypeCode.current = watchPropertyType.code;
25770
- 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) || [];
25771
- const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25772
- if (matched && isNewType) {
25773
- if (matched.categoryType && categoryTypeList.length > 0) {
25774
- const catTarget = Array.isArray(matched.categoryType) ? matched.categoryType[0] : matched.categoryType;
25775
- const foundCat = categoryTypeList.find(c => normalizeCode(c.code) === normalizeCode(catTarget) || normalizeCode(c.name) === normalizeCode(catTarget));
25776
- if (foundCat) {
25777
- setValue("useDetails.categoryType", foundCat);
25778
- }
25779
- }
25780
- if (matched.propertyCategory && categoryOptions.length > 0) {
25781
- const foundPropCat = categoryOptions.find(c => normalizeCode(c.code) === normalizeCode(matched.propertyCategory) || normalizeCode(c.name) === normalizeCode(matched.propertyCategory));
25782
- if (foundPropCat) {
25783
- setValue("useDetails.propertyCategory", foundPropCat);
25784
- }
25785
- }
25786
- if (matched.waterConnectionUsageType && usageTypeOptions.length > 0) {
25787
- const foundUsage = usageTypeOptions.find(u => normalizeCode(u.code) === normalizeCode(matched.waterConnectionUsageType) || normalizeCode(u.name) === normalizeCode(matched.waterConnectionUsageType));
25788
- if (foundUsage) {
25789
- setValue("useDetails.WaterConnectionUsageType", foundUsage);
25790
- }
25791
- }
26036
+ if (isNewType) {
26037
+ prevPropertyTypeCode.current = watchPropertyType.code;
26038
+ autoFillFromPropertyType(watchPropertyType);
25792
26039
  }
25793
- }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue]);
25794
- const floorOptions = React.useMemo(() => {
25795
- var _ptServicesMastersDat9, _ptServicesMastersDat0;
25796
- 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 => ({
25797
- code: item.code,
25798
- name: item.name
25799
- }));
25800
- }, [ptServicesMastersData]);
26040
+ }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
25801
26041
  const activeQuestions = React.useMemo(() => {
25802
26042
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
25803
26043
  let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
25804
26044
  if (!qList || !Array.isArray(qList)) {
25805
- var _ptServicesMastersDat1;
25806
- 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) || [];
26045
+ var _ptServicesMastersDat7;
26046
+ 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) || [];
25807
26047
  const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25808
26048
  qList = matched === null || matched === void 0 ? void 0 : matched.questions;
25809
26049
  }
25810
26050
  if (!qList || !Array.isArray(qList)) return [];
25811
26051
  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);
25812
26052
  }, [watchPropertyType, propertyType2List, ptServicesMastersData]);
25813
- React.useEffect(() => {
25814
- if (watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code) {
25815
- var _ptServicesMastersDat10;
25816
- 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) || [];
25817
- const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25818
- console.log("[PropertyWaterConnection] Selected propertyType:", watchPropertyType);
25819
- console.log("[PropertyWaterConnection] Matched item in MDMS list:", matched);
25820
- console.log("[PropertyWaterConnection] Matched questions in MDMS:", matched === null || matched === void 0 ? void 0 : matched.questions);
25821
- console.log("[PropertyWaterConnection] Active questions to display:", activeQuestions);
25822
- }
25823
- }, [watchPropertyType, propertyType2List, ptServicesMastersData, activeQuestions]);
25824
26053
  const [questionAnswers, setQuestionAnswers] = React.useState(() => {
25825
26054
  var _formData$config$key, _formData$config$key$, _formData$config$key2, _formData$config$key3, _formData$config$key4;
25826
26055
  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) || [];
@@ -25856,9 +26085,12 @@ const PropertyWaterConnection = _ref => {
25856
26085
  return updated;
25857
26086
  });
25858
26087
  };
26088
+ const prevQuestionsRef = React__default.useRef(null);
25859
26089
  React.useEffect(() => {
25860
- setValue("useDetails.questions", questionAnswers);
25861
- console.log("[PropertyWaterConnection] Current questions:", questionAnswers);
26090
+ if (!lodash.isEqual(prevQuestionsRef.current, questionAnswers)) {
26091
+ prevQuestionsRef.current = lodash.cloneDeep(questionAnswers);
26092
+ setValue("useDetails.questions", questionAnswers);
26093
+ }
25862
26094
  }, [questionAnswers, setValue]);
25863
26095
  const lastSentValue = React__default.useRef(null);
25864
26096
  React.useEffect(() => {
@@ -25880,33 +26112,30 @@ const PropertyWaterConnection = _ref => {
25880
26112
  if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
25881
26113
  if (!categoryTypeList.length || !ptServicesMastersData) return;
25882
26114
  if (formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.details) {
25883
- var _ptServicesMastersDat11, _ptServicesMastersDat12, _ptServicesMastersDat13, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
26115
+ var _ptServicesMastersDat8, _ptServicesMastersDat9, _ptServicesMastersDat0, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
25884
26116
  const details = formData.cpt.details;
25885
26117
  const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
25886
26118
  const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
25887
26119
  const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
25888
26120
  setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => normalizeCode(o.code) === normalizeCode(catType))) || null);
25889
- 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));
26121
+ 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)));
25890
26122
  setValue("useDetails.propertyCategory", propCategoryMatch ? {
25891
26123
  code: propCategoryMatch.code,
25892
26124
  name: propCategoryMatch.name
26125
+ } : usageCategory ? {
26126
+ code: usageCategory,
26127
+ name: usageCategory
25893
26128
  } : null);
25894
- 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) || [];
26129
+ 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) || [];
25895
26130
  const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
25896
26131
  setValue("useDetails.propertyType", propTypeMatch ? {
25897
26132
  code: propTypeMatch.code,
25898
26133
  name: propTypeMatch.name
25899
26134
  } : null);
26135
+ prevPropertyTypeCode.current = (propTypeMatch === null || propTypeMatch === void 0 ? void 0 : propTypeMatch.code) || null;
25900
26136
  const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
25901
26137
  const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
25902
26138
  setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
25903
- setValue("useDetails.noOfFloors", (floorOptions === null || floorOptions === void 0 ? void 0 : floorOptions.find(o => {
25904
- var _details$noOfFloors;
25905
- const val1 = getCode(additionalDetails.numberOfFloors);
25906
- const val2 = getCode(additionalDetails.noOfFloors);
25907
- const val3 = (_details$noOfFloors = details.noOfFloors) === null || _details$noOfFloors === void 0 ? void 0 : _details$noOfFloors.toString();
25908
- return normalizeCode(o.code) === normalizeCode(val1) || normalizeCode(o.code) === normalizeCode(val2) || normalizeCode(o.code) === normalizeCode(val3) || val3 && normalizeCode(o.code) === normalizeCode(`${val3}_FLOOR`);
25909
- })) || null);
25910
26139
  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()) || "");
25911
26140
  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()) || "");
25912
26141
  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()) || "");
@@ -25927,7 +26156,6 @@ const PropertyWaterConnection = _ref => {
25927
26156
  setValue("useDetails.propertyCategory", null);
25928
26157
  setValue("useDetails.propertyType", null);
25929
26158
  setValue("useDetails.WaterConnectionUsageType", null);
25930
- setValue("useDetails.noOfFloors", null);
25931
26159
  setValue("useDetails.plotArea", "");
25932
26160
  setValue("useDetails.builtUpArea", "");
25933
26161
  setValue("useDetails.farArea", "");
@@ -25942,7 +26170,7 @@ const PropertyWaterConnection = _ref => {
25942
26170
  setValue("useDetails.questions", []);
25943
26171
  }
25944
26172
  propertyDetailsInitialized.current = true;
25945
- }, [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]);
26173
+ }, [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]);
25946
26174
  const lastErrorState = React__default.useRef(null);
25947
26175
  React.useEffect(() => {
25948
26176
  const hasErrors = Object.keys(errors).length > 0;
@@ -25984,7 +26212,11 @@ const PropertyWaterConnection = _ref => {
25984
26212
  option: propertyTypeOptions,
25985
26213
  optionKey: "name",
25986
26214
  selected: props.value,
25987
- select: props.onChange,
26215
+ select: selected => {
26216
+ props.onChange(selected);
26217
+ prevPropertyTypeCode.current = selected === null || selected === void 0 ? void 0 : selected.code;
26218
+ autoFillFromPropertyType(selected);
26219
+ },
25988
26220
  t: t,
25989
26221
  onBlur: props.onBlur,
25990
26222
  disable: isPropertyFound,
@@ -26003,7 +26235,7 @@ const PropertyWaterConnection = _ref => {
26003
26235
  required: t("REQUIRED_FIELD")
26004
26236
  },
26005
26237
  render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
26006
- option: categoryTypeList,
26238
+ option: availableCategoryOptions,
26007
26239
  optionKey: "i18nKey",
26008
26240
  selected: props.value,
26009
26241
  select: props.onChange,
@@ -26031,7 +26263,7 @@ const PropertyWaterConnection = _ref => {
26031
26263
  select: props.onChange,
26032
26264
  t: t,
26033
26265
  onBlur: props.onBlur,
26034
- disable: isPropertyFound,
26266
+ disable: true,
26035
26267
  placeholder: t("WS_PROPERTY_CATEGORY")
26036
26268
  })
26037
26269
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyCategory) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
@@ -26053,7 +26285,7 @@ const PropertyWaterConnection = _ref => {
26053
26285
  select: props.onChange,
26054
26286
  t: t,
26055
26287
  onBlur: props.onBlur,
26056
- disable: isPropertyFound,
26288
+ disable: true,
26057
26289
  placeholder: t("WS_WATER_CONNECTION_USAGE_TYPE")
26058
26290
  })
26059
26291
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
@@ -26078,29 +26310,7 @@ const PropertyWaterConnection = _ref => {
26078
26310
  placeholder: "Enter Answer",
26079
26311
  onChange: e => handleAnswerChange(index, questionText, e.target.value)
26080
26312
  })));
26081
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_FLOORS")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26082
- className: "check-page-link-button"
26083
- }, "*")), /*#__PURE__*/React__default.createElement("div", {
26084
- className: "form-field"
26085
- }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
26086
- control: control,
26087
- name: "useDetails.noOfFloors",
26088
- rules: {
26089
- required: t("REQUIRED_FIELD")
26090
- },
26091
- render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
26092
- option: floorOptions,
26093
- optionKey: "name",
26094
- selected: props.value,
26095
- select: props.onChange,
26096
- t: t,
26097
- onBlur: props.onBlur,
26098
- disable: isPropertyFound,
26099
- placeholder: t("WS_NUMBER_OF_FLOORS")
26100
- })
26101
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.noOfFloors) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26102
- style: errorStyle
26103
- }, errors.useDetails.noOfFloors.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26313
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26104
26314
  className: "check-page-link-button"
26105
26315
  }, "*")), /*#__PURE__*/React__default.createElement("div", {
26106
26316
  className: "form-field"
@@ -26118,7 +26328,7 @@ const PropertyWaterConnection = _ref => {
26118
26328
  name: "useDetails.plotArea",
26119
26329
  disabled: isPropertyFound,
26120
26330
  placeholder: t("WS_PLOT_AREA")
26121
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26331
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26122
26332
  style: errorStyle
26123
26333
  }, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_BUILT_UP_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
26124
26334
  className: "check-page-link-button"
@@ -26139,7 +26349,7 @@ const PropertyWaterConnection = _ref => {
26139
26349
  },
26140
26350
  disabled: isPropertyFound,
26141
26351
  placeholder: t("WS_BUILT_UP_AREA")
26142
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26352
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26143
26353
  style: errorStyle
26144
26354
  }, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_HEIGHT_OF_THE_BUILDING(meters)")}`, /*#__PURE__*/React__default.createElement("span", {
26145
26355
  className: "check-page-link-button"
@@ -26160,7 +26370,7 @@ const PropertyWaterConnection = _ref => {
26160
26370
  },
26161
26371
  disabled: isPropertyFound,
26162
26372
  placeholder: t("WS_HEIGHT_OF_THE_BUILDING")
26163
- })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26373
+ })), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26164
26374
  style: errorStyle
26165
26375
  }, errors.useDetails.heightOfTheBuilding.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_SELECT_YEAR_OF_CONSTRUCTION")}`), /*#__PURE__*/React__default.createElement("div", {
26166
26376
  className: "form-field"
@@ -26177,7 +26387,7 @@ const PropertyWaterConnection = _ref => {
26177
26387
  disable: isPropertyFound,
26178
26388
  placeholder: t("WS_SELECT_YEAR_OF_CONSTRUCTION")
26179
26389
  })
26180
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26390
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
26181
26391
  style: errorStyle
26182
26392
  }, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_DWELLING_UNITS")}`, /*#__PURE__*/React__default.createElement("span", {
26183
26393
  className: "check-page-link-button"
@@ -26190,7 +26400,7 @@ const PropertyWaterConnection = _ref => {
26190
26400
  value: NUMBER_PATTERN$1,
26191
26401
  message: t("ERR_INVALID_NUMBER")
26192
26402
  },
26193
- required: t("REQUIRED_FIELD")
26403
+ required: isDwellingUnit ? t("REQUIRED_FIELD") : false
26194
26404
  }),
26195
26405
  name: "useDetails.NumberofDwellingUnits",
26196
26406
  disabled: isPropertyFound,
@@ -26198,7 +26408,7 @@ const PropertyWaterConnection = _ref => {
26198
26408
  required: t("REQUIRED_FIELD")
26199
26409
  },
26200
26410
  placeholder: t("WS_NUMBER_OF_DWELLING_UNITS")
26201
- }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26411
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26202
26412
  style: errorStyle
26203
26413
  }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_ROOMS")}`, /*#__PURE__*/React__default.createElement("span", {
26204
26414
  className: "check-page-link-button"
@@ -26216,7 +26426,7 @@ const PropertyWaterConnection = _ref => {
26216
26426
  name: "useDetails.NumberofRooms",
26217
26427
  disabled: isPropertyFound,
26218
26428
  placeholder: t("WS_NUMBER_OF_ROOMS")
26219
- }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26429
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26220
26430
  style: errorStyle
26221
26431
  }, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_BEDS")}`, /*#__PURE__*/React__default.createElement("span", {
26222
26432
  className: "check-page-link-button"
@@ -26234,7 +26444,7 @@ const PropertyWaterConnection = _ref => {
26234
26444
  name: "useDetails.numberOfBeds",
26235
26445
  disabled: isPropertyFound,
26236
26446
  placeholder: t("WS_NUMBER_OF_BEDS")
26237
- }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26447
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26238
26448
  style: errorStyle
26239
26449
  }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_STUDENTS")}`), /*#__PURE__*/React__default.createElement("div", {
26240
26450
  className: "form-field"
@@ -26249,7 +26459,7 @@ const PropertyWaterConnection = _ref => {
26249
26459
  name: "useDetails.numberOfStudents",
26250
26460
  disabled: isPropertyFound,
26251
26461
  placeholder: t("WS_NUMBER_OF_STUDENTS")
26252
- }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26462
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
26253
26463
  style: errorStyle
26254
26464
  }, errors.useDetails.numberOfStudents.message)));
26255
26465
  };
@@ -27142,6 +27352,10 @@ const BillAmendmentCard = () => {
27142
27352
  label: t("SW_WATER_INBOX"),
27143
27353
  link: `/digit-ui/employee/ws/sewerage/bill-amendment/inbox`,
27144
27354
  roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
27355
+ }, {
27356
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Application"),
27357
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
27358
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
27145
27359
  }]
27146
27360
  }), [isBillAMDInboxLoading, billData, totalCount]);
27147
27361
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
@@ -29147,7 +29361,15 @@ const WSCard = () => {
29147
29361
  count: isWSInboxLoading ? "-" : wsData === null || wsData === void 0 ? void 0 : wsData.totalCount,
29148
29362
  label: t("WATER_INBOX"),
29149
29363
  link: `/digit-ui/employee/ws/water/inbox`,
29150
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29364
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK"]
29365
+ }, {
29366
+ label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
29367
+ link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
29368
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29369
+ }, {
29370
+ label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
29371
+ link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
29372
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29151
29373
  }, ...links, {
29152
29374
  label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
29153
29375
  link: `/digit-ui/employee/ws/water/search-connection`,
@@ -29950,6 +30172,224 @@ const Inbox = _ref => {
29950
30172
  })));
29951
30173
  };
29952
30174
 
30175
+ const SearchBillAmendment = () => {
30176
+ const {
30177
+ t
30178
+ } = reactI18next.useTranslation();
30179
+ const tenantId = Digit.ULBService.getCurrentTenantId();
30180
+ const [searchResult, setSearchResult] = React.useState(null);
30181
+ const [isLoading, setIsLoading] = React.useState(false);
30182
+ const [showToast, setShowToast] = React.useState(null);
30183
+ const {
30184
+ register,
30185
+ handleSubmit,
30186
+ reset
30187
+ } = reactHookForm.useForm({
30188
+ defaultValues: {
30189
+ amendmentId: "",
30190
+ consumerCode: ""
30191
+ }
30192
+ });
30193
+ const convertEpochToDate = epoch => {
30194
+ if (!epoch) return "NA";
30195
+ const d = new Date(epoch);
30196
+ const day = String(d.getDate()).padStart(2, "0");
30197
+ const month = String(d.getMonth() + 1).padStart(2, "0");
30198
+ const year = d.getFullYear();
30199
+ return `${day}/${month}/${year}`;
30200
+ };
30201
+ const onSubmit = function (formData) {
30202
+ try {
30203
+ var _formData$amendmentId, _formData$consumerCod;
30204
+ const amendmentId = formData === null || formData === void 0 ? void 0 : (_formData$amendmentId = formData.amendmentId) === null || _formData$amendmentId === void 0 ? void 0 : _formData$amendmentId.trim();
30205
+ const consumerCode = formData === null || formData === void 0 ? void 0 : (_formData$consumerCod = formData.consumerCode) === null || _formData$consumerCod === void 0 ? void 0 : _formData$consumerCod.trim();
30206
+ if (!amendmentId && !consumerCode) {
30207
+ setShowToast({
30208
+ error: true,
30209
+ label: t("WS_FILL_ATLEAST_ONE_FIELD", "Please fill at least one field to search")
30210
+ });
30211
+ setTimeout(() => setShowToast(null), 3000);
30212
+ return Promise.resolve();
30213
+ }
30214
+ const _temp = _finallyRethrows(function () {
30215
+ return _catch(function () {
30216
+ setIsLoading(true);
30217
+ const params = {
30218
+ businessService: "WS"
30219
+ };
30220
+ if (amendmentId) params.amendmentId = amendmentId;
30221
+ if (consumerCode) params.consumerCode = consumerCode;
30222
+ return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, params)).then(function (res) {
30223
+ setSearchResult((res === null || res === void 0 ? void 0 : res.Amendments) || []);
30224
+ });
30225
+ }, function (err) {
30226
+ var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
30227
+ console.error("Error searching bill amendment:", err);
30228
+ setSearchResult([]);
30229
+ setShowToast({
30230
+ error: true,
30231
+ 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")
30232
+ });
30233
+ setTimeout(() => setShowToast(null), 5000);
30234
+ });
30235
+ }, function (_wasThrown, _result) {
30236
+ setIsLoading(false);
30237
+ if (_wasThrown) throw _result;
30238
+ return _result;
30239
+ });
30240
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
30241
+ } catch (e) {
30242
+ return Promise.reject(e);
30243
+ }
30244
+ };
30245
+ const onReset = () => {
30246
+ reset({
30247
+ amendmentId: "",
30248
+ consumerCode: ""
30249
+ });
30250
+ setSearchResult(null);
30251
+ };
30252
+ const columns = React.useMemo(() => [{
30253
+ Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
30254
+ accessor: "amendmentId",
30255
+ Cell: _ref => {
30256
+ let {
30257
+ row
30258
+ } = _ref;
30259
+ return /*#__PURE__*/React__default.createElement("span", {
30260
+ className: "link"
30261
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30262
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30263
+ }, row.original.amendmentId));
30264
+ }
30265
+ }, {
30266
+ Header: t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No"),
30267
+ accessor: "consumerCode",
30268
+ Cell: _ref2 => {
30269
+ let {
30270
+ row
30271
+ } = _ref2;
30272
+ return /*#__PURE__*/React__default.createElement("span", {
30273
+ className: "link"
30274
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30275
+ to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original.consumerCode}&tenantId=${tenantId}&service=WATER`
30276
+ }, row.original.consumerCode));
30277
+ }
30278
+ }, {
30279
+ Header: t("WS_AMENDMENT_REASON", "Amendment Reason"),
30280
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.amendmentReason) || "NA")
30281
+ }, {
30282
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS", "Status"),
30283
+ accessor: row => t((row === null || row === void 0 ? void 0 : row.status) || "NA")
30284
+ }, {
30285
+ Header: t("WS_COMMON_TABLE_COL_APPLICATION_DATE", "Application Date"),
30286
+ accessor: row => {
30287
+ var _row$auditDetails;
30288
+ return convertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails = row.auditDetails) === null || _row$auditDetails === void 0 ? void 0 : _row$auditDetails.createdTime);
30289
+ }
30290
+ }, {
30291
+ Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
30292
+ Cell: _ref3 => {
30293
+ let {
30294
+ row
30295
+ } = _ref3;
30296
+ return /*#__PURE__*/React__default.createElement("span", {
30297
+ className: "link"
30298
+ }, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
30299
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
30300
+ }, t("ES_COMMON_VIEW", "View")));
30301
+ }
30302
+ }], [t, tenantId]);
30303
+ return /*#__PURE__*/React__default.createElement("div", {
30304
+ className: "employee-wrapper",
30305
+ style: {
30306
+ padding: "16px"
30307
+ }
30308
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
30309
+ styles: {
30310
+ fontSize: "32px",
30311
+ marginBottom: "16px"
30312
+ }
30313
+ }, t("WS_SEARCH_BILL_AMENDMENT_APPLICATION", "Search Bill Amendment Application")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
30314
+ style: {
30315
+ padding: "24px",
30316
+ marginBottom: "24px"
30317
+ }
30318
+ }, /*#__PURE__*/React__default.createElement("form", {
30319
+ onSubmit: handleSubmit(onSubmit)
30320
+ }, /*#__PURE__*/React__default.createElement("div", {
30321
+ style: {
30322
+ display: "grid",
30323
+ gridTemplateColumns: "1fr 1fr",
30324
+ gap: "24px",
30325
+ marginBottom: "24px"
30326
+ }
30327
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
30328
+ style: {
30329
+ fontWeight: "600",
30330
+ marginBottom: "8px"
30331
+ }
30332
+ }, t("WS_ACK_COMMON_APP_NO_LABEL", "Application No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
30333
+ name: "amendmentId",
30334
+ inputRef: register(),
30335
+ placeholder: t("WS_SEARCH_APP_NO_PLACEHOLDER", "Enter Bill Amendment Application No")
30336
+ })), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
30337
+ style: {
30338
+ fontWeight: "600",
30339
+ marginBottom: "8px"
30340
+ }
30341
+ }, t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
30342
+ name: "consumerCode",
30343
+ inputRef: register(),
30344
+ placeholder: t("WS_SEARCH_CONSUMER_NO_PLACEHOLDER", "Enter Consumer / Connection No")
30345
+ }))), /*#__PURE__*/React__default.createElement("div", {
30346
+ style: {
30347
+ display: "flex",
30348
+ gap: "16px",
30349
+ alignItems: "center"
30350
+ }
30351
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
30352
+ label: t("ES_COMMON_SEARCH", "Search"),
30353
+ submit: true
30354
+ }), /*#__PURE__*/React__default.createElement("button", {
30355
+ type: "button",
30356
+ className: "clear-search generic-button",
30357
+ onClick: onReset,
30358
+ style: {
30359
+ background: "transparent",
30360
+ border: "none",
30361
+ color: "#a82227",
30362
+ cursor: "pointer",
30363
+ fontWeight: "600",
30364
+ fontSize: "16px"
30365
+ }
30366
+ }, t("ES_COMMON_CLEAR_SEARCH", "Clear Search"))))), isLoading && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null), !isLoading && searchResult && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
30367
+ style: {
30368
+ padding: "16px"
30369
+ }
30370
+ }, searchResult.length > 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
30371
+ t: t,
30372
+ data: searchResult,
30373
+ columns: columns,
30374
+ getCellProps: () => ({
30375
+ style: {
30376
+ minWidth: "140px",
30377
+ padding: "16px 14px",
30378
+ fontSize: "14px"
30379
+ }
30380
+ })
30381
+ }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
30382
+ style: {
30383
+ textAlign: "center",
30384
+ padding: "24px"
30385
+ }
30386
+ }, t("ES_COMMON_NO_DATA", "No applications found"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
30387
+ error: showToast.error,
30388
+ label: showToast.label,
30389
+ onClose: () => setShowToast(null)
30390
+ }));
30391
+ };
30392
+
29953
30393
  const newConfig = [{
29954
30394
  head: "",
29955
30395
  body: [{
@@ -33217,7 +33657,7 @@ const Rebate_menu = [{
33217
33657
  value: "Others"
33218
33658
  }];
33219
33659
  const WSFeeEstimation = _ref => {
33220
- 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;
33660
+ 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;
33221
33661
  let {
33222
33662
  wsAdditionalDetails,
33223
33663
  workflowDetails,
@@ -33230,27 +33670,30 @@ const WSFeeEstimation = _ref => {
33230
33670
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
33231
33671
  const [sessionBillFormData, setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {});
33232
33672
  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);
33233
- 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);
33673
+ 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) || [];
33674
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline) || [];
33675
+ 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");
33234
33676
  const hasPaymentInTimeline = Array.isArray(timeline) && timeline.some(step => {
33235
- var _step$state, _step$state2;
33236
- 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";
33237
- });
33238
- const isPostPaymentState = hasPaymentInTimeline && appStatus !== "PENDING_FOR_PAYMENT" && appStatus !== "INITIATED" && appStatus !== "PENDING_FOR_DOCUMENT_VERIFICATION" && appStatus !== "PENDING_FOR_CITIZEN_ACTION" && appStatus !== "PENDING_FOR_FIELD_INSPECTION";
33239
- 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";
33240
- const isPaid = wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$5 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$5 !== void 0 && _wsAdditionalDetails$5.isPaid || isWorkflowPaid || isPostPaymentState ? true : false;
33677
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
33678
+ 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";
33679
+ }) || 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");
33680
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
33681
+ 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";
33682
+ 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";
33683
+ const isPaid = wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$8 !== void 0 && _wsAdditionalDetails$8.isPaid || isWorkflowPaid || isPostPaymentState || isCitizenActionPostPayment ? true : false;
33241
33684
  const [popup, showPopUp] = React.useState(false);
33242
33685
  const [fields, setFields] = React.useState(sessionFormData ? sessionFormData : {});
33243
33686
  const [showToast, setShowToast] = React.useState(null);
33244
33687
  const [billDetails, setBillDetails] = React.useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
33245
33688
  const [values, setValues] = React.useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []);
33246
- 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";
33247
- 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) || "";
33248
- 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) || "";
33249
- 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) || "";
33689
+ 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";
33690
+ 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) || "";
33691
+ 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) || "";
33692
+ 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) || "";
33250
33693
  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"));
33251
- 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);
33694
+ 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);
33252
33695
  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"));
33253
- 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);
33696
+ 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);
33254
33697
  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) || [];
33255
33698
  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");
33256
33699
  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");
@@ -33263,9 +33706,9 @@ const WSFeeEstimation = _ref => {
33263
33706
  data: mdmsRes
33264
33707
  } = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
33265
33708
  React.useEffect(() => {
33266
- var _wsAdditionalDetails$16, _wsAdditionalDetails$17, _sessionFormData$bill;
33709
+ var _wsAdditionalDetails$19, _wsAdditionalDetails$20, _sessionFormData$bill;
33267
33710
  const data = {
33268
- ...(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)
33711
+ ...(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)
33269
33712
  };
33270
33713
  if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
33271
33714
  var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
@@ -33319,8 +33762,8 @@ const WSFeeEstimation = _ref => {
33319
33762
  const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
33320
33763
  const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
33321
33764
  if (adhocAmount || rebateAmount) {
33322
- var _wsAdditionalDetails$18, _wsAdditionalDetails$19;
33323
- 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;
33765
+ var _wsAdditionalDetails$21, _wsAdditionalDetails$22;
33766
+ 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;
33324
33767
  if (rebateAmount > totalAmount) {
33325
33768
  setShowToast({
33326
33769
  isError: false,
@@ -33329,16 +33772,16 @@ const WSFeeEstimation = _ref => {
33329
33772
  message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
33330
33773
  });
33331
33774
  } else {
33332
- var _wsAdditionalDetails$24, _wsAdditionalDetails$25, _wsAdditionalDetails$26, _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$30, _wsAdditionalDetails$31, _wsAdditionalDetails$32, _wsAdditionalDetails$33;
33333
- 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;
33334
- 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;
33775
+ var _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$30, _wsAdditionalDetails$31, _wsAdditionalDetails$32, _wsAdditionalDetails$33, _wsAdditionalDetails$34, _wsAdditionalDetails$35, _wsAdditionalDetails$36;
33776
+ 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;
33777
+ 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;
33335
33778
  const appAdditionalDetails = {
33336
- ...(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),
33779
+ ...(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),
33337
33780
  ...fields
33338
33781
  };
33339
33782
  wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
33340
33783
  const data = {
33341
- 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" ? [{
33784
+ 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" ? [{
33342
33785
  applicationNo: applicationNo,
33343
33786
  tenantId: tenantId,
33344
33787
  waterConnection: wsAdditionalDetails.additionalDetails.appDetails
@@ -33349,7 +33792,7 @@ const WSFeeEstimation = _ref => {
33349
33792
  }],
33350
33793
  isconnectionCalculation: false
33351
33794
  };
33352
- 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";
33795
+ 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";
33353
33796
  Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
33354
33797
  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;
33355
33798
  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) {
@@ -34055,11 +34498,11 @@ const ViewBreakup = _ref => {
34055
34498
  }))))));
34056
34499
  };
34057
34500
 
34058
- const checkForNA$1 = value => {
34501
+ const checkForNA$2 = value => {
34059
34502
  return value ? value : "CS_NA";
34060
34503
  };
34061
34504
  const WSApplicationDetails = () => {
34062
- 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;
34505
+ 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;
34063
34506
  const getDisconnectionNoticeSearch = function () {
34064
34507
  try {
34065
34508
  var _data$WaterConnection190, _data$WaterConnection191, _data$SewerageConnect182, _data$SewerageConnect183;
@@ -34105,6 +34548,75 @@ const WSApplicationDetails = () => {
34105
34548
  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();
34106
34549
  const [showOptions, setShowOptions] = React.useState(false);
34107
34550
  const [viewTimeline, setViewTimeline] = React.useState(false);
34551
+ const [showDocModal, setShowDocModal] = React.useState(false);
34552
+ const [docFileUrl, setDocFileUrl] = React.useState(null);
34553
+ const [docFileType, setDocFileType] = React.useState("image");
34554
+ const handleViewEmployeeDoc = function (fileStoreId) {
34555
+ try {
34556
+ let _exit = false;
34557
+ function _temp3(_result) {
34558
+ if (_exit) return _result;
34559
+ const _temp = _catch(function () {
34560
+ return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
34561
+ if (res !== null && res !== void 0 && res.data) {
34562
+ var _res$headers, _res$headers2, _res$headers3, _res$headers4;
34563
+ const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
34564
+ 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"
34565
+ });
34566
+ const fileURL = URL.createObjectURL(blob);
34567
+ setDocFileUrl(fileURL);
34568
+ 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"]) || "";
34569
+ if (contentType.toLowerCase().includes("pdf")) {
34570
+ setDocFileType("pdf");
34571
+ } else {
34572
+ setDocFileType("image");
34573
+ }
34574
+ setShowDocModal(true);
34575
+ }
34576
+ });
34577
+ }, function (err) {
34578
+ console.error("Failed to fetch file URL via FileFetchbyid", err);
34579
+ });
34580
+ if (_temp && _temp.then) return _temp.then(function () {});
34581
+ }
34582
+ if (!fileStoreId) return Promise.resolve();
34583
+ const _temp2 = _catch(function () {
34584
+ return Promise.resolve(Digit.UploadServices.Filefetch([fileStoreId], (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId())).then(function (response) {
34585
+ var _response$data, _response$data$fileSt, _response$data$fileSt2, _response$data2;
34586
+ 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]) || "";
34587
+ let fileURL = "";
34588
+ if (rawUrl && typeof rawUrl === "string") {
34589
+ const linkList = rawUrl.split(",");
34590
+ linkList.forEach(link => {
34591
+ const trimmed = link ? link.trim() : "";
34592
+ if (trimmed && !trimmed.includes("large") && !trimmed.includes("medium") && !trimmed.includes("small")) {
34593
+ fileURL = trimmed;
34594
+ }
34595
+ });
34596
+ if (!fileURL && linkList[0]) {
34597
+ fileURL = linkList[0].trim();
34598
+ }
34599
+ }
34600
+ if (fileURL) {
34601
+ setDocFileUrl(fileURL);
34602
+ const lowerUrl = fileURL.toLowerCase();
34603
+ if (lowerUrl.includes(".pdf")) {
34604
+ setDocFileType("pdf");
34605
+ } else {
34606
+ setDocFileType("image");
34607
+ }
34608
+ setShowDocModal(true);
34609
+ _exit = true;
34610
+ }
34611
+ });
34612
+ }, function (e) {
34613
+ console.warn("Filefetch failed, falling back to FileFetchbyid", e);
34614
+ });
34615
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
34616
+ } catch (e) {
34617
+ return Promise.reject(e);
34618
+ }
34619
+ };
34108
34620
  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_"));
34109
34621
  let filter1 = {
34110
34622
  tenantId: tenantId,
@@ -34245,7 +34757,7 @@ const WSApplicationDetails = () => {
34245
34757
  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
34246
34758
  })).then(function (payments) {
34247
34759
  var _payments$Payments$;
34248
- function _temp2() {
34760
+ function _temp5() {
34249
34761
  return Promise.resolve(Digit.PaymentService.printReciept(state, {
34250
34762
  fileStoreIds: response.filestoreIds[0]
34251
34763
  })).then(function (fileStore) {
@@ -34255,7 +34767,7 @@ const WSApplicationDetails = () => {
34255
34767
  let response = {
34256
34768
  filestoreIds: [(_payments$Payments$ = payments.Payments[0]) === null || _payments$Payments$ === void 0 ? void 0 : _payments$Payments$.fileStoreId]
34257
34769
  };
34258
- const _temp = function (_payments$Payments$2) {
34770
+ const _temp4 = function (_payments$Payments$2) {
34259
34771
  if (!((_payments$Payments$2 = payments.Payments[0]) !== null && _payments$Payments$2 !== void 0 && _payments$Payments$2.fileStoreId)) {
34260
34772
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
34261
34773
  Payments: payments.Payments
@@ -34264,7 +34776,7 @@ const WSApplicationDetails = () => {
34264
34776
  });
34265
34777
  }
34266
34778
  }();
34267
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
34779
+ return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
34268
34780
  });
34269
34781
  } catch (e) {
34270
34782
  return Promise.reject(e);
@@ -34477,22 +34989,28 @@ const WSApplicationDetails = () => {
34477
34989
  }
34478
34990
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34479
34991
  label: t("WS_SERVICE_TYPE"),
34480
- 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"))}`
34992
+ 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"))}`
34481
34993
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34482
34994
  label: t("WS_APPLICANT_TYPE"),
34483
- 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)))}`
34995
+ 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)))}`
34996
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34997
+ label: t("WS_Billing_Address_Type"),
34998
+ 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)))}`
34999
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35000
+ label: t("Complete Address"),
35001
+ 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))}`
34484
35002
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34485
35003
  label: t("WS_DIVYANGJAN"),
34486
35004
  text: `${connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34487
35005
  }), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.code) === "ORGANIZATION" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34488
35006
  label: t("WS_DEPARTMENT_TYPE"),
34489
- 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)))}`
35007
+ 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)))}`
34490
35008
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34491
35009
  label: t("WS_ORGANIZATION_DEPARTMENT_NAME"),
34492
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
35010
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
34493
35011
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34494
35012
  label: t("WS_NATURE_OF_WORK"),
34495
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
35013
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
34496
35014
  }))), (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__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34497
35015
  styles: {
34498
35016
  fontSize: "28px"
@@ -34645,58 +35163,58 @@ const WSApplicationDetails = () => {
34645
35163
  }
34646
35164
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34647
35165
  label: t("CORE_COMMON_PROFILE_CITY"),
34648
- 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)))}`
35166
+ 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)))}`
34649
35167
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34650
35168
  label: t("PINCODE"),
34651
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
35169
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
34652
35170
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34653
35171
  label: t("LOCALITY"),
34654
- 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)))}`
35172
+ 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)))}`
34655
35173
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34656
35174
  label: t("SubLocality"),
34657
- 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)))}`
35175
+ 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)))}`
34658
35176
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34659
35177
  label: t("COMMON_COLONY_MCD_CATEGORY"),
34660
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
35178
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
34661
35179
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34662
35180
  label: t("STREET_NAME"),
34663
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.streetName) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
35181
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.streetName) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34664
35182
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34665
35183
  label: t("ADDRESS_LINE1"),
34666
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine1) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
35184
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine1) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34667
35185
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34668
35186
  label: t("ADDRESS_LINE2"),
34669
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
35187
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
34670
35188
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34671
35189
  label: t("HOUSE_NO"),
34672
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.houseNo) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.doorNo)))}`
35190
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.houseNo) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.doorNo)))}`
34673
35191
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34674
35192
  label: t("LATITUDE_GEOTAG"),
34675
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
35193
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
34676
35194
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34677
35195
  label: t("LONGITUDE_GEOTAG"),
34678
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
35196
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
34679
35197
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34680
35198
  label: t("COMMON_ASSEMBLY"),
34681
- 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)))}`
35199
+ 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)))}`
34682
35200
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34683
35201
  label: t("COMMON_WARD"),
34684
- 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)))}`
35202
+ 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)))}`
34685
35203
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34686
35204
  label: t("COMMON_ZONE"),
34687
- 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)))}`
35205
+ 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)))}`
34688
35206
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34689
35207
  label: t("COMMON_CURRENT_ASSEMBLY"),
34690
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
35208
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
34691
35209
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34692
35210
  label: t("COMMON_CURRENT_WARD"),
34693
- text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
35211
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
34694
35212
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34695
35213
  label: t("COMMON_CURRENT_ZONE"),
34696
- 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)))}`
35214
+ 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)))}`
34697
35215
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34698
35216
  label: t("LANDMARK"),
34699
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
35217
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
34700
35218
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34701
35219
  styles: {
34702
35220
  fontSize: "28px"
@@ -34708,35 +35226,46 @@ const WSApplicationDetails = () => {
34708
35226
  }
34709
35227
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34710
35228
  label: t("WS_CATEGORY_TYPE"),
34711
- 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)))}`
35229
+ 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)))}`
34712
35230
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34713
35231
  label: t("WS_PROPERTY_CATEGORY"),
34714
- 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)))}`
35232
+ 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)))}`
34715
35233
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34716
35234
  label: t("WS_PROPERTY_TYPE"),
34717
- 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)))}`
35235
+ 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)))}`
34718
35236
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34719
35237
  label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
34720
- 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)))}`
35238
+ 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)))}`
34721
35239
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34722
35240
  label: t("WS_NUMBER_OF_FLOORS"),
34723
- 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)))}`
35241
+ 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)))}`
34724
35242
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34725
35243
  label: t("WS_PLOT_AREA"),
34726
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
35244
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
34727
35245
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34728
35246
  label: t("WS_BUILT_UP_AREA"),
34729
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
35247
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
34730
35248
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34731
35249
  label: t("WS_HEIGHT_OF_THE_BUILDING"),
34732
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
35250
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
34733
35251
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34734
35252
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
34735
- 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)))}`
34736
- }), ["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__default.createElement(digitUiReactComponents.Row, {
35253
+ 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)))}`
35254
+ }), 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__default.createElement(digitUiReactComponents.Row, {
34737
35255
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
34738
- text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
34739
- }) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
35256
+ text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
35257
+ }) : 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) => {
35258
+ var _q$answer, _q$answer2, _q$answer3;
35259
+ 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}`;
35260
+ 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;
35261
+ const trimmedQ = String(qText || "").trim();
35262
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
35263
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35264
+ key: `question_${idx}`,
35265
+ label: displayLabel,
35266
+ text: `${t(checkForNA$2(aText))}`
35267
+ });
35268
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34740
35269
  styles: {
34741
35270
  fontSize: "28px"
34742
35271
  }
@@ -34750,10 +35279,10 @@ const WSApplicationDetails = () => {
34750
35279
  text: `${djbEmployee !== null && djbEmployee !== void 0 && djbEmployee.isDjbEmployee ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34751
35280
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.isDjbEmployee) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34752
35281
  label: t("WS_EMPLOYEE_ID"),
34753
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
35282
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
34754
35283
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34755
35284
  label: t("WS_EMPLOYEE_DESIGNATION"),
34756
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
35285
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
34757
35286
  }), !isDisconnectionExecuted && (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34758
35287
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
34759
35288
  text: /*#__PURE__*/React__default.createElement("span", {
@@ -34764,7 +35293,7 @@ const WSApplicationDetails = () => {
34764
35293
  cursor: "pointer",
34765
35294
  color: "#f47738"
34766
35295
  },
34767
- onClick: () => getFiles([djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document], tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])
35296
+ onClick: () => handleViewEmployeeDoc(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
34768
35297
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
34769
35298
  }))), (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$dueV = applicationData.dueVerification) === null || _applicationData$dueV === void 0 ? void 0 : _applicationData$dueV.length) > 0 && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34770
35299
  styles: {
@@ -34832,27 +35361,27 @@ const WSApplicationDetails = () => {
34832
35361
  style: {
34833
35362
  padding: "12px 8px"
34834
35363
  }
34835
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React__default.createElement("td", {
35364
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React__default.createElement("td", {
34836
35365
  style: {
34837
35366
  padding: "12px 8px"
34838
35367
  }
34839
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React__default.createElement("td", {
35368
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React__default.createElement("td", {
34840
35369
  style: {
34841
35370
  padding: "12px 8px"
34842
35371
  }
34843
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React__default.createElement("td", {
35372
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React__default.createElement("td", {
34844
35373
  style: {
34845
35374
  padding: "12px 8px"
34846
35375
  }
34847
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React__default.createElement("td", {
35376
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React__default.createElement("td", {
34848
35377
  style: {
34849
35378
  padding: "12px 8px"
34850
35379
  }
34851
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React__default.createElement("td", {
35380
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React__default.createElement("td", {
34852
35381
  style: {
34853
35382
  padding: "12px 8px"
34854
35383
  }
34855
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React__default.createElement("td", {
35384
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React__default.createElement("td", {
34856
35385
  style: {
34857
35386
  padding: "12px 8px"
34858
35387
  }
@@ -35028,7 +35557,59 @@ const WSApplicationDetails = () => {
35028
35557
  }
35029
35558
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
35030
35559
  label: t("WS_ACTIVATE_CONNECTION")
35031
- })) : null)))));
35560
+ })) : null)))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
35561
+ open: showDocModal,
35562
+ headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
35563
+ headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
35564
+ onClick: () => setShowDocModal(false),
35565
+ style: {
35566
+ cursor: "pointer",
35567
+ padding: "5px"
35568
+ }
35569
+ }, /*#__PURE__*/React__default.createElement("svg", {
35570
+ xmlns: "http://www.w3.org/2000/svg",
35571
+ viewBox: "0 0 24 24",
35572
+ fill: "#505A5F",
35573
+ width: "24",
35574
+ height: "24"
35575
+ }, /*#__PURE__*/React__default.createElement("path", {
35576
+ d: "M0 0h24v24H0V0z",
35577
+ fill: "none"
35578
+ }), /*#__PURE__*/React__default.createElement("path", {
35579
+ 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"
35580
+ }))),
35581
+ actionCancelOnSubmit: () => setShowDocModal(false),
35582
+ actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
35583
+ actionSaveOnSubmit: () => window.open(docFileUrl, "_blank"),
35584
+ actionSaveLabel: t("CS_COMMON_OPEN_IN_NEW_TAB") || "Open Full",
35585
+ hideSubmit: !docFileUrl,
35586
+ width: "800px"
35587
+ }, /*#__PURE__*/React__default.createElement("div", {
35588
+ style: {
35589
+ display: "flex",
35590
+ justifyContent: "center",
35591
+ alignItems: "center",
35592
+ padding: "20px",
35593
+ minHeight: "300px"
35594
+ }
35595
+ }, docFileType === "pdf" ? /*#__PURE__*/React__default.createElement("iframe", {
35596
+ src: docFileUrl,
35597
+ title: "Document Preview",
35598
+ width: "100%",
35599
+ height: "500px",
35600
+ style: {
35601
+ border: "none"
35602
+ }
35603
+ }) : /*#__PURE__*/React__default.createElement("img", {
35604
+ src: docFileUrl,
35605
+ alt: "Document Preview",
35606
+ style: {
35607
+ maxWidth: "100%",
35608
+ maxHeight: "500px",
35609
+ objectFit: "contain",
35610
+ borderRadius: "4px"
35611
+ }
35612
+ }))));
35032
35613
  };
35033
35614
 
35034
35615
  const WSAdditionalDetails = () => {
@@ -35391,7 +35972,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
35391
35972
  };
35392
35973
 
35393
35974
  const ConnectionDetails$5 = () => {
35394
- 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;
35975
+ 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;
35395
35976
  const {
35396
35977
  t
35397
35978
  } = reactI18next.useTranslation();
@@ -35609,8 +36190,6 @@ const ConnectionDetails$5 = () => {
35609
36190
  }
35610
36191
  };
35611
36192
  const getRestorationButton = () => {
35612
- console.log("getRestorationButton", data, !(data !== null && data !== void 0 && data.checkWorkFlow));
35613
- console.log("Payment", paymentDetails);
35614
36193
  if (!(data !== null && data !== void 0 && data.checkWorkFlow)) {
35615
36194
  setshowActionToast({
35616
36195
  key: "error",
@@ -35622,7 +36201,6 @@ const ConnectionDetails$5 = () => {
35622
36201
  } else {
35623
36202
  var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
35624
36203
  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) {
35625
- console.log("Payment", paymentDetails);
35626
36204
  let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
35627
36205
  Digit.SessionStorage.set("WS_DISCONNECTION", {
35628
36206
  ...state,
@@ -35916,16 +36494,28 @@ const ConnectionDetails$5 = () => {
35916
36494
  className: "border-none",
35917
36495
  label: t("WS_NO_OF_FLOORS"),
35918
36496
  text: ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$additionalDe = _state38.additionalDetails) === null || _state38$additionalDe === void 0 ? void 0 : _state38$additionalDe.noOfFloors) || "NA"
35919
- }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
36497
+ }), 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__default.createElement(digitUiReactComponents.Row, {
35920
36498
  className: "border-none",
35921
36499
  label: t("WS_NO_OF_DWELLING_UNITS"),
35922
- text: ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : _state39$additionalDe.NumberofDwellingUnits) || "NA"
36500
+ text: ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$additionalDe = _state42.additionalDetails) === null || _state42$additionalDe === void 0 ? void 0 : _state42$additionalDe.NumberofDwellingUnits) || "NA"
35923
36501
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35924
36502
  className: "border-none",
35925
36503
  label: t("WS_LOCALITY"),
35926
- text: ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$additionalDe = _state40.additionalDetails) === null || _state40$additionalDe === void 0 ? void 0 : _state40$additionalDe.locality) || "NA"
36504
+ text: ((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : _state43$additionalDe.locality) || "NA"
36505
+ }), (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) => {
36506
+ var _q$answer, _q$answer2, _q$answer3;
36507
+ 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}`;
36508
+ 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;
36509
+ const trimmedQ = String(qText || "").trim();
36510
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
36511
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
36512
+ key: `question_${idx}`,
36513
+ className: "border-none",
36514
+ label: displayLabel,
36515
+ text: `${t(checkForNA(aText))}`
36516
+ });
35927
36517
  }), /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
35928
- 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}`
36518
+ 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}`
35929
36519
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
35930
36520
  style: {
35931
36521
  textAlign: "left",
@@ -35937,10 +36527,10 @@ const ConnectionDetails$5 = () => {
35937
36527
  styles: {
35938
36528
  fontSize: "28px"
35939
36529
  }
35940
- }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state43 = state) !== null && _state43 !== void 0 && _state43.connectionHolders ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
36530
+ }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state50 = state) !== null && _state50 !== void 0 && _state50.connectionHolders ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35941
36531
  className: "border-none",
35942
36532
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
35943
- 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,
36533
+ 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,
35944
36534
  textStyle: {
35945
36535
  whiteSpace: "pre"
35946
36536
  }
@@ -36059,15 +36649,15 @@ const ConnectionDetails$5 = () => {
36059
36649
  isArray: false
36060
36650
  }
36061
36651
  }
36062
- }))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.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) => {
36063
- var _doc$documentType, _state47, _state48;
36652
+ }))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.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) => {
36653
+ var _doc$documentType, _state54, _state55;
36064
36654
  return /*#__PURE__*/React__default.createElement("div", {
36065
36655
  key: `doc-${index}`
36066
36656
  }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.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__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(WSDocument, {
36067
- value: (_state47 = state) === null || _state47 === void 0 ? void 0 : _state47.documents,
36657
+ value: (_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.documents,
36068
36658
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
36069
36659
  index: index
36070
- }), ((_state48 = state) === null || _state48 === void 0 ? void 0 : _state48.documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
36660
+ }), ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
36071
36661
  style: {
36072
36662
  color: "#cccccc",
36073
36663
  backgroundColor: "#cccccc",
@@ -36076,7 +36666,7 @@ const ConnectionDetails$5 = () => {
36076
36666
  marginBottom: "20px"
36077
36667
  }
36078
36668
  }) : null)));
36079
- })), ((_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__default.createElement("div", {
36669
+ })), ((_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__default.createElement("div", {
36080
36670
  style: {
36081
36671
  display: "flex",
36082
36672
  justifyContent: "flex-end",
@@ -36109,8 +36699,8 @@ const ConnectionDetails$5 = () => {
36109
36699
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
36110
36700
  hideSubmit: true,
36111
36701
  actionSingleSubmit: () => {
36112
- var _state52, _state53;
36113
- 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`);
36702
+ var _state59, _state60;
36703
+ 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`);
36114
36704
  setshowModal(false);
36115
36705
  },
36116
36706
  popupStyles: mobileView ? {
@@ -36991,7 +37581,7 @@ const getPath$3 = (path, params) => {
36991
37581
  };
36992
37582
  const getEditDetails = (waterResult, sewerageresult, t) => {
36993
37583
  if (waterResult) {
36994
- 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;
37584
+ 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;
36995
37585
  waterResult.ConnectionHolderDetails = waterResult !== null && waterResult !== void 0 && waterResult.connectionHolders ? [{
36996
37586
  ...(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$connecti = waterResult.connectionHolders) === null || _waterResult$connecti === void 0 ? void 0 : _waterResult$connecti[0]),
36997
37587
  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,
@@ -37074,6 +37664,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37074
37664
  },
37075
37665
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37076
37666
  };
37667
+ 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);
37668
+ const addressTypeObj = typeof rawAddressType === "object" && rawAddressType !== null && rawAddressType !== void 0 && rawAddressType.code ? rawAddressType : String(rawAddressType).toUpperCase() === "PERMANENT" ? {
37669
+ i18nKey: "Permanent",
37670
+ code: "PERMANENT"
37671
+ } : String(rawAddressType).toUpperCase() === "CORRESPONDENCE" ? {
37672
+ i18nKey: "Correspondence",
37673
+ code: "CORRESPONDENCE"
37674
+ } : rawAddressType ? {
37675
+ i18nKey: rawAddressType,
37676
+ code: rawAddressType
37677
+ } : null;
37678
+ 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) || "";
37077
37679
  waterResult.ConnectionDetails = [{
37078
37680
  water: true,
37079
37681
  sewerage: false,
@@ -37085,18 +37687,20 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37085
37687
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType,
37086
37688
  i18nKey: `WS_CONNECTION_${waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType}`
37087
37689
  } : null,
37088
- waterDemandType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition = waterResult.additionalDetails) !== null && _waterResult$addition !== void 0 && _waterResult$addition.waterDemandType ? {
37089
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.waterDemandType,
37090
- 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}`
37690
+ waterDemandType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition3 = waterResult.additionalDetails) !== null && _waterResult$addition3 !== void 0 && _waterResult$addition3.waterDemandType ? {
37691
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.waterDemandType,
37692
+ 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}`
37091
37693
  } : null,
37092
- applicantType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition4 = waterResult.additionalDetails) !== null && _waterResult$addition4 !== void 0 && _waterResult$addition4.applicantType ? {
37093
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.applicantType,
37094
- i18nKey: `WS_APPLICANT_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition6 = waterResult.additionalDetails) === null || _waterResult$addition6 === void 0 ? void 0 : _waterResult$addition6.applicantType}`
37694
+ applicantType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition6 = waterResult.additionalDetails) !== null && _waterResult$addition6 !== void 0 && _waterResult$addition6.applicantType ? {
37695
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.applicantType,
37696
+ i18nKey: `WS_APPLICANT_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.applicantType}`
37095
37697
  } : null,
37096
- categoryType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition7 = waterResult.additionalDetails) !== null && _waterResult$addition7 !== void 0 && _waterResult$addition7.categoryType ? {
37097
- code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.categoryType,
37098
- i18nKey: `WS_CATEGORY_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.categoryType}`
37698
+ categoryType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition9 = waterResult.additionalDetails) !== null && _waterResult$addition9 !== void 0 && _waterResult$addition9.categoryType ? {
37699
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.categoryType,
37700
+ i18nKey: `WS_CATEGORY_${waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.categoryType}`
37099
37701
  } : null,
37702
+ addressType: addressTypeObj,
37703
+ completeAddress: completeAddressStr,
37100
37704
  proposedPipeSize: waterResult !== null && waterResult !== void 0 && waterResult.proposedPipeSize ? {
37101
37705
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize,
37102
37706
  i18nKey: `${waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize} ${t("WS_INCHES_LABEL")}`,
@@ -37104,23 +37708,25 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37104
37708
  } : null,
37105
37709
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37106
37710
  }];
37711
+ waterResult.addressType = addressTypeObj;
37712
+ waterResult.completeAddress = completeAddressStr;
37107
37713
  waterResult.bankDetails = {
37108
- bankName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.bankName) || "",
37109
- 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) || "",
37110
- ifscCode: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition11 = waterResult.additionalDetails) === null || _waterResult$addition11 === void 0 ? void 0 : _waterResult$addition11.ifscCode) || "",
37111
- 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) || "",
37112
- 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) || "",
37113
- 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) || ""
37714
+ bankName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.bankName) || "",
37715
+ 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) || "",
37716
+ ifscCode: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition13 = waterResult.additionalDetails) === null || _waterResult$addition13 === void 0 ? void 0 : _waterResult$addition13.ifscCode) || "",
37717
+ 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) || "",
37718
+ 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) || "",
37719
+ 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) || ""
37114
37720
  };
37115
37721
  waterResult.djbEmployee = {
37116
- isDjbEmployee: String(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition19 = waterResult.additionalDetails) === null || _waterResult$addition19 === void 0 ? void 0 : _waterResult$addition19.isDjbEmployee) === "true",
37117
- employeeId: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition20 = waterResult.additionalDetails) === null || _waterResult$addition20 === void 0 ? void 0 : _waterResult$addition20.employeeId) || "",
37118
- designation: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition21 = waterResult.additionalDetails) === null || _waterResult$addition21 === void 0 ? void 0 : _waterResult$addition21.designation) || "",
37119
- 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) || "",
37120
- document: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition24 = waterResult.additionalDetails) === null || _waterResult$addition24 === void 0 ? void 0 : _waterResult$addition24.document) || ""
37722
+ isDjbEmployee: String(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition21 = waterResult.additionalDetails) === null || _waterResult$addition21 === void 0 ? void 0 : _waterResult$addition21.isDjbEmployee) === "true",
37723
+ employeeId: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition22 = waterResult.additionalDetails) === null || _waterResult$addition22 === void 0 ? void 0 : _waterResult$addition22.employeeId) || "",
37724
+ designation: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition23 = waterResult.additionalDetails) === null || _waterResult$addition23 === void 0 ? void 0 : _waterResult$addition23.designation) || "",
37725
+ 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) || "",
37726
+ document: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition26 = waterResult.additionalDetails) === null || _waterResult$addition26 === void 0 ? void 0 : _waterResult$addition26.document) || ""
37121
37727
  };
37122
37728
  } else if (sewerageresult) {
37123
- 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;
37729
+ 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;
37124
37730
  sewerageresult.ConnectionHolderDetails = sewerageresult !== null && sewerageresult !== void 0 && sewerageresult.connectionHolders ? [{
37125
37731
  ...(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$conne = sewerageresult.connectionHolders) === null || _sewerageresult$conne === void 0 ? void 0 : _sewerageresult$conne[0]),
37126
37732
  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,
@@ -37199,6 +37805,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37199
37805
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37200
37806
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37201
37807
  };
37808
+ 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);
37809
+ const addressTypeObjSewerage = typeof rawAddressTypeSewerage === "object" && rawAddressTypeSewerage !== null && rawAddressTypeSewerage !== void 0 && rawAddressTypeSewerage.code ? rawAddressTypeSewerage : String(rawAddressTypeSewerage).toUpperCase() === "PERMANENT" ? {
37810
+ i18nKey: "Permanent",
37811
+ code: "PERMANENT"
37812
+ } : String(rawAddressTypeSewerage).toUpperCase() === "CORRESPONDENCE" ? {
37813
+ i18nKey: "Correspondence",
37814
+ code: "CORRESPONDENCE"
37815
+ } : rawAddressTypeSewerage ? {
37816
+ i18nKey: rawAddressTypeSewerage,
37817
+ code: rawAddressTypeSewerage
37818
+ } : null;
37819
+ 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) || "";
37202
37820
  sewerageresult.ConnectionDetails = [{
37203
37821
  water: false,
37204
37822
  sewerage: true,
@@ -37213,35 +37831,39 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37213
37831
  code: "Non Metered",
37214
37832
  i18nKey: "WS_CONNECTION_Non Metered"
37215
37833
  },
37216
- waterDemandType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit = sewerageresult.additionalDetails) !== null && _sewerageresult$addit !== void 0 && _sewerageresult$addit.waterDemandType ? {
37217
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit2 = sewerageresult.additionalDetails) === null || _sewerageresult$addit2 === void 0 ? void 0 : _sewerageresult$addit2.waterDemandType,
37218
- 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}`
37834
+ waterDemandType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit3 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit3 !== void 0 && _sewerageresult$addit3.waterDemandType ? {
37835
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit4 = sewerageresult.additionalDetails) === null || _sewerageresult$addit4 === void 0 ? void 0 : _sewerageresult$addit4.waterDemandType,
37836
+ 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}`
37219
37837
  } : null,
37220
- applicantType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit4 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit4 !== void 0 && _sewerageresult$addit4.applicantType ? {
37221
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit5 = sewerageresult.additionalDetails) === null || _sewerageresult$addit5 === void 0 ? void 0 : _sewerageresult$addit5.applicantType,
37222
- i18nKey: `WS_APPLICANT_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit6 = sewerageresult.additionalDetails) === null || _sewerageresult$addit6 === void 0 ? void 0 : _sewerageresult$addit6.applicantType}`
37838
+ applicantType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit6 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit6 !== void 0 && _sewerageresult$addit6.applicantType ? {
37839
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit7 = sewerageresult.additionalDetails) === null || _sewerageresult$addit7 === void 0 ? void 0 : _sewerageresult$addit7.applicantType,
37840
+ i18nKey: `WS_APPLICANT_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit8 = sewerageresult.additionalDetails) === null || _sewerageresult$addit8 === void 0 ? void 0 : _sewerageresult$addit8.applicantType}`
37223
37841
  } : null,
37224
- categoryType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit7 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit7 !== void 0 && _sewerageresult$addit7.categoryType ? {
37225
- code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit8 = sewerageresult.additionalDetails) === null || _sewerageresult$addit8 === void 0 ? void 0 : _sewerageresult$addit8.categoryType,
37226
- i18nKey: `WS_CATEGORY_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit9 = sewerageresult.additionalDetails) === null || _sewerageresult$addit9 === void 0 ? void 0 : _sewerageresult$addit9.categoryType}`
37842
+ categoryType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit9 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit9 !== void 0 && _sewerageresult$addit9.categoryType ? {
37843
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit0 = sewerageresult.additionalDetails) === null || _sewerageresult$addit0 === void 0 ? void 0 : _sewerageresult$addit0.categoryType,
37844
+ i18nKey: `WS_CATEGORY_${sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit1 = sewerageresult.additionalDetails) === null || _sewerageresult$addit1 === void 0 ? void 0 : _sewerageresult$addit1.categoryType}`
37227
37845
  } : null,
37846
+ addressType: addressTypeObjSewerage,
37847
+ completeAddress: completeAddressStrSewerage,
37228
37848
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37229
37849
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37230
37850
  }];
37851
+ sewerageresult.addressType = addressTypeObjSewerage;
37852
+ sewerageresult.completeAddress = completeAddressStrSewerage;
37231
37853
  sewerageresult.bankDetails = {
37232
- bankName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit0 = sewerageresult.additionalDetails) === null || _sewerageresult$addit0 === void 0 ? void 0 : _sewerageresult$addit0.bankName) || "",
37233
- 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) || "",
37234
- ifscCode: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit11 = sewerageresult.additionalDetails) === null || _sewerageresult$addit11 === void 0 ? void 0 : _sewerageresult$addit11.ifscCode) || "",
37235
- 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) || "",
37236
- 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) || "",
37237
- 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) || ""
37854
+ bankName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit10 = sewerageresult.additionalDetails) === null || _sewerageresult$addit10 === void 0 ? void 0 : _sewerageresult$addit10.bankName) || "",
37855
+ 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) || "",
37856
+ ifscCode: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit13 = sewerageresult.additionalDetails) === null || _sewerageresult$addit13 === void 0 ? void 0 : _sewerageresult$addit13.ifscCode) || "",
37857
+ 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) || "",
37858
+ 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) || "",
37859
+ 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) || ""
37238
37860
  };
37239
37861
  sewerageresult.djbEmployee = {
37240
- isDjbEmployee: String(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit19 = sewerageresult.additionalDetails) === null || _sewerageresult$addit19 === void 0 ? void 0 : _sewerageresult$addit19.isDjbEmployee) === "true",
37241
- employeeId: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit20 = sewerageresult.additionalDetails) === null || _sewerageresult$addit20 === void 0 ? void 0 : _sewerageresult$addit20.employeeId) || "",
37242
- designation: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit21 = sewerageresult.additionalDetails) === null || _sewerageresult$addit21 === void 0 ? void 0 : _sewerageresult$addit21.designation) || "",
37243
- 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) || "",
37244
- document: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit24 = sewerageresult.additionalDetails) === null || _sewerageresult$addit24 === void 0 ? void 0 : _sewerageresult$addit24.document) || ""
37862
+ isDjbEmployee: String(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit21 = sewerageresult.additionalDetails) === null || _sewerageresult$addit21 === void 0 ? void 0 : _sewerageresult$addit21.isDjbEmployee) === "true",
37863
+ employeeId: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit22 = sewerageresult.additionalDetails) === null || _sewerageresult$addit22 === void 0 ? void 0 : _sewerageresult$addit22.employeeId) || "",
37864
+ designation: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit23 = sewerageresult.additionalDetails) === null || _sewerageresult$addit23 === void 0 ? void 0 : _sewerageresult$addit23.designation) || "",
37865
+ 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) || "",
37866
+ document: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit26 = sewerageresult.additionalDetails) === null || _sewerageresult$addit26 === void 0 ? void 0 : _sewerageresult$addit26.document) || ""
37245
37867
  };
37246
37868
  }
37247
37869
  if (waterResult) return {
@@ -37315,10 +37937,10 @@ const EditApplication = _ref => {
37315
37937
  });
37316
37938
  let isModifyEdit = window.location.href.includes("/modify-connection") || window.location.href.includes("/edit-application");
37317
37939
  React.useEffect(() => {
37318
- var _waterapplication, _sewerageapplication;
37940
+ var _waterapplication, _params$ConnectionDet, _params$ConnectionDet2, _sewerageapplication, _params$ConnectionDet3, _params$ConnectionDet4;
37319
37941
  waterapplication = Waterresult;
37320
37942
  sewerageapplication = Sewarageresult;
37321
- 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)))) {
37943
+ 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)))) {
37322
37944
  waterapplication = Waterresult;
37323
37945
  sewerageapplication = Sewarageresult;
37324
37946
  if (window.location.href.includes("edit-application")) {
@@ -37352,12 +37974,44 @@ const EditApplication = _ref => {
37352
37974
  ...EditDetails
37353
37975
  });
37354
37976
  } else if (Object.keys(params).length > 0 && (Waterresult || Sewarageresult)) {
37977
+ var _currentApp$additiona, _currentApp$Connectio, _currentApp$Connectio2, _currentApp$additiona2, _currentApp$Connectio3, _currentApp$Connectio4, _params$ConnectionDet5, _params$ConnectionDet6, _params$ConnectionDet7, _params$ConnectionDet8;
37355
37978
  let currentApp = Waterresult || Sewarageresult;
37356
- if (currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification)) {
37357
- setParams({
37358
- ...params,
37359
- dueVerification: currentApp.dueVerification
37360
- });
37979
+ 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);
37980
+ 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);
37981
+ 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;
37982
+ const needsDueSync = currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification);
37983
+ if (needsAddressSync || needsDueSync) {
37984
+ let updatedParams = {
37985
+ ...params
37986
+ };
37987
+ if (needsAddressSync) {
37988
+ var _params$ConnectionDet9, _params$ConnectionDet0;
37989
+ const addrTypeObj = typeof addrType === "object" && addrType !== null && addrType !== void 0 && addrType.code ? addrType : String(addrType).toUpperCase() === "PERMANENT" ? {
37990
+ i18nKey: "Permanent",
37991
+ code: "PERMANENT"
37992
+ } : String(addrType).toUpperCase() === "CORRESPONDENCE" ? {
37993
+ i18nKey: "Correspondence",
37994
+ code: "CORRESPONDENCE"
37995
+ } : addrType ? {
37996
+ i18nKey: addrType,
37997
+ code: addrType
37998
+ } : null;
37999
+ const updatedConnDetails = params !== null && params !== void 0 && params.ConnectionDetails ? [{
38000
+ ...params.ConnectionDetails[0],
38001
+ addressType: ((_params$ConnectionDet9 = params.ConnectionDetails[0]) === null || _params$ConnectionDet9 === void 0 ? void 0 : _params$ConnectionDet9.addressType) || addrTypeObj,
38002
+ completeAddress: ((_params$ConnectionDet0 = params.ConnectionDetails[0]) === null || _params$ConnectionDet0 === void 0 ? void 0 : _params$ConnectionDet0.completeAddress) || compAddr || ""
38003
+ }] : [{
38004
+ addressType: addrTypeObj,
38005
+ completeAddress: compAddr || ""
38006
+ }];
38007
+ updatedParams.ConnectionDetails = updatedConnDetails;
38008
+ updatedParams.addressType = updatedParams.addressType || addrTypeObj;
38009
+ updatedParams.completeAddress = updatedParams.completeAddress || compAddr || "";
38010
+ }
38011
+ if (needsDueSync) {
38012
+ updatedParams.dueVerification = currentApp.dueVerification;
38013
+ }
38014
+ setParams(updatedParams);
37361
38015
  }
37362
38016
  }
37363
38017
  }, [Waterresult, Sewarageresult]);
@@ -37381,6 +38035,9 @@ const EditApplication = _ref => {
37381
38035
  const handleSelect = (key, data, skipStep, isFromCreateApi) => {
37382
38036
  if (isFromCreateApi) setParams(data);else if (key === "") setParams({
37383
38037
  ...data
38038
+ });else if (Array.isArray(data)) setParams({
38039
+ ...params,
38040
+ [key]: data
37384
38041
  });else setParams({
37385
38042
  ...params,
37386
38043
  ...{
@@ -37600,7 +38257,7 @@ const ReSubmitDisconnectionApplication = () => {
37600
38257
  };
37601
38258
 
37602
38259
  const CheckPage = _ref => {
37603
- 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;
38260
+ 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;
37604
38261
  let {
37605
38262
  onSubmit,
37606
38263
  value
@@ -37742,6 +38399,12 @@ const CheckPage = _ref => {
37742
38399
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37743
38400
  label: t("WS_APPLICANT_TYPE"),
37744
38401
  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)))}`
38402
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38403
+ label: t("WS_Billing_Address_Type"),
38404
+ 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)))}`
38405
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38406
+ label: t("Complete Address"),
38407
+ 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))}`
37745
38408
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37746
38409
  label: t("WS_SERVICE_TYPE"),
37747
38410
  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)))}`
@@ -37904,10 +38567,21 @@ const CheckPage = _ref => {
37904
38567
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37905
38568
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
37906
38569
  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)))}`
37907
- }), ["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__default.createElement(digitUiReactComponents.Row, {
38570
+ }), 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__default.createElement(digitUiReactComponents.Row, {
37908
38571
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
37909
38572
  text: `${t(checkForNA((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
37910
- }) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
38573
+ }) : 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) => {
38574
+ var _q$answer, _q$answer2, _q$answer3;
38575
+ 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}`;
38576
+ 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;
38577
+ const trimmedQ = String(qText || "").trim();
38578
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
38579
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38580
+ key: `question_${idx}`,
38581
+ label: displayLabel,
38582
+ text: `${t(checkForNA(aText))}`
38583
+ });
38584
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
37911
38585
  style: {
37912
38586
  marginTop: "10px",
37913
38587
  marginBottom: "30px"
@@ -40976,7 +41650,7 @@ const WSPropertyLocationDetails = props => {
40976
41650
  };
40977
41651
 
40978
41652
  const ApplicationBillAmendment = () => {
40979
- 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;
41653
+ 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;
40980
41654
  const [showToast, setShowToast] = React.useState(null);
40981
41655
  const {
40982
41656
  t
@@ -41004,7 +41678,7 @@ const ApplicationBillAmendment = () => {
41004
41678
  } = Digit.Hooks.ws.WSSearchMdmsTypes.useWSMDMSBillAmendment({
41005
41679
  tenantId: stateId
41006
41680
  });
41007
- const servicev1 = connectionNumber.includes("WS") ? "WS" : "SW";
41681
+ const servicev1 = "WS";
41008
41682
  const billSearchFilters = {
41009
41683
  tenantId,
41010
41684
  consumerCode: connectionNumber,
@@ -41014,6 +41688,15 @@ const ApplicationBillAmendment = () => {
41014
41688
  data: preBillSearchData,
41015
41689
  isLoading: isBillSearchLoading
41016
41690
  } = Digit.Hooks.usePaymentSearch(tenantId, billSearchFilters);
41691
+ 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;
41692
+ React.useEffect(() => {
41693
+ var _editFormData, _editFormData2;
41694
+ if (editFormData !== null && editFormData !== void 0 && (_editFormData = editFormData[`${servicev1}_REDUCED_AMOUNT`]) !== null && _editFormData !== void 0 && _editFormData.VALUE) {
41695
+ setischeckedReduce(true);
41696
+ } else if (editFormData !== null && editFormData !== void 0 && (_editFormData2 = editFormData[`${servicev1}_ADDITIONAL_AMOUNT`]) !== null && _editFormData2 !== void 0 && _editFormData2.VALUE) {
41697
+ setischeckedAddition(true);
41698
+ }
41699
+ }, [editFormData, servicev1]);
41017
41700
  const {
41018
41701
  data,
41019
41702
  isFetched
@@ -41026,6 +41709,7 @@ const ApplicationBillAmendment = () => {
41026
41709
  control,
41027
41710
  watch,
41028
41711
  setValue,
41712
+ clearErrors,
41029
41713
  unregister,
41030
41714
  handleSubmit,
41031
41715
  formState: {
@@ -41036,8 +41720,15 @@ const ApplicationBillAmendment = () => {
41036
41720
  reset,
41037
41721
  ...methods
41038
41722
  } = reactHookForm.useForm({
41723
+ mode: "onChange",
41039
41724
  defaultValues: {
41040
- ...((_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)
41725
+ WS_REDUCED_AMOUNT: {
41726
+ VALUE: false
41727
+ },
41728
+ WS_ADDITIONAL_AMOUNT: {
41729
+ VALUE: false
41730
+ },
41731
+ ...((_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)
41041
41732
  }
41042
41733
  });
41043
41734
  const {
@@ -41053,8 +41744,6 @@ const ApplicationBillAmendment = () => {
41053
41744
  const amendmentReason = watch("amendmentReason");
41054
41745
  const WS_REDUCED_AMOUNT = watch("WS_REDUCED_AMOUNT");
41055
41746
  const WS_ADDITIONAL_AMOUNT = watch("WS_ADDITIONAL_AMOUNT");
41056
- const SW_REDUCED_AMOUNT = watch("SW_REDUCED_AMOUNT");
41057
- const SW_ADDITIONAL_AMOUNT = watch("SW_ADDITIONAL_AMOUNT");
41058
41747
  const history = reactRouterDom.useHistory();
41059
41748
  const uploadFile = function (data, fname, props) {
41060
41749
  try {
@@ -41178,11 +41867,10 @@ const ApplicationBillAmendment = () => {
41178
41867
  });
41179
41868
  };
41180
41869
  const getDemandDetailsComparingUpdates = d => {
41181
- var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _d$SW_REDUCED_AMOUNT, _actionPerformed, _actionPerformedInArr;
41182
- let actionPerformed;
41870
+ var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _actionPerformedInArr;
41183
41871
  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";
41184
- 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));
41185
- (_actionPerformed = actionPerformed) === null || _actionPerformed === void 0 ? true : delete _actionPerformed.VALUE;
41872
+ 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));
41873
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41186
41874
  const actionPerformedInArray = Object.entries(actionPerformed);
41187
41875
  if (d !== null && d !== void 0 && d[`${servicev1}_REBATE`]) {
41188
41876
  actionPerformedInArray.push([`${servicev1}_TIME_ADHOC_REBATE`, d === null || d === void 0 ? void 0 : d[`${servicev1}_REBATE`]]);
@@ -41199,15 +41887,14 @@ const ApplicationBillAmendment = () => {
41199
41887
  });
41200
41888
  };
41201
41889
  const getTotalDetailsOfUpdatedData = d => {
41202
- var _d5, _d$WS_REDUCED_AMOUNT2, _d$SW_REDUCED_AMOUNT2, _actionPerformed2;
41890
+ var _d5, _d$WS_REDUCED_AMOUNT2;
41203
41891
  const action = d !== null && d !== void 0 && (_d5 = d[`${servicev1}_REDUCED_AMOUNT`]) !== null && _d5 !== void 0 && _d5.VALUE ? "REBATE" : "PENALTY";
41204
41892
  const originalDemand = {};
41205
41893
  billSearchData.map(el => {
41206
41894
  originalDemand[el.taxHeadCode] = el.amount;
41207
41895
  });
41208
- let actionPerformed;
41209
- 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));
41210
- (_actionPerformed2 = actionPerformed) === null || _actionPerformed2 === void 0 ? true : delete _actionPerformed2.VALUE;
41896
+ 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));
41897
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41211
41898
  actionPerformed[`${servicev1}_${action}`] = d !== null && d !== void 0 && d[`${servicev1}_${action}`] ? d === null || d === void 0 ? void 0 : d[`${servicev1}_${action}`] : 0;
41212
41899
  return {
41213
41900
  ...actionPerformed,
@@ -41222,13 +41909,13 @@ const ApplicationBillAmendment = () => {
41222
41909
  };
41223
41910
  React.useEffect(() => {
41224
41911
  const timer = setTimeout(() => {
41225
- var _state3;
41226
- 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}`;
41912
+ var _state4;
41913
+ 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}`;
41227
41914
  }, 5000);
41228
41915
  return () => clearTimeout(timer);
41229
41916
  }, [goToAppDetailsPage]);
41230
41917
  const onFormSubmit = d => {
41231
- var _state4, _state4$data;
41918
+ var _state5, _state5$data;
41232
41919
  const data = {
41233
41920
  Amendment: {
41234
41921
  consumerCode: connectionNumber,
@@ -41255,17 +41942,17 @@ const ApplicationBillAmendment = () => {
41255
41942
  }
41256
41943
  }
41257
41944
  };
41258
- 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") {
41259
- 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;
41945
+ 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") {
41946
+ var _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2, _state7, _state7$data, _state7$data$applicat, _state7$data$applicat2;
41260
41947
  const workflow = {
41261
- 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,
41948
+ 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,
41262
41949
  action: "RE-SUBMIT",
41263
41950
  tenantId: tenantId,
41264
- 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",
41265
- 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"
41951
+ businessService: "WS.AMENDMENT",
41952
+ moduleName: "WS"
41266
41953
  };
41267
41954
  const AmendmentUpdate = {
41268
- ...((_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),
41955
+ ...((_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),
41269
41956
  workflow,
41270
41957
  ...(data === null || data === void 0 ? void 0 : data.Amendment)
41271
41958
  };
@@ -41287,7 +41974,7 @@ const ApplicationBillAmendment = () => {
41287
41974
  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")) {
41288
41975
  setShowToast({
41289
41976
  key: "success",
41290
- label: t("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41977
+ label: t("ES_MODIFYWSCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41291
41978
  });
41292
41979
  }
41293
41980
  setGoToAppDetailsPage(true);
@@ -41318,13 +42005,16 @@ const ApplicationBillAmendment = () => {
41318
42005
  var _ob$taxHeadCode2;
41319
42006
  return !(ob !== null && ob !== void 0 && (_ob$taxHeadCode2 = ob.taxHeadCode) !== null && _ob$taxHeadCode2 !== void 0 && _ob$taxHeadCode2.includes("ADHOC"));
41320
42007
  });
42008
+ const onFormError = formErrors => {
42009
+ console.warn("Bill Amendment form errors:", formErrors);
42010
+ };
41321
42011
  return /*#__PURE__*/React__default.createElement("form", {
41322
- onSubmit: handleSubmit(onFormSubmit)
42012
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41323
42013
  }, /*#__PURE__*/React__default.createElement("div", {
41324
42014
  style: {
41325
42015
  marginLeft: "20px"
41326
42016
  }
41327
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.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__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
42017
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.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__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, {
41328
42018
  style: {
41329
42019
  marginBottom: "20px"
41330
42020
  }
@@ -41368,74 +42058,108 @@ const ApplicationBillAmendment = () => {
41368
42058
  name: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41369
42059
  key: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41370
42060
  control: control,
42061
+ defaultValue: false,
41371
42062
  rules: {
41372
42063
  validate: value => {
41373
- 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));
42064
+ return !!value || ischeckedAddition || !!getValues(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`);
41374
42065
  }
41375
42066
  },
41376
- render: props => {
41377
- 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;
42067
+ render: _ref2 => {
42068
+ let {
42069
+ value,
42070
+ onChange
42071
+ } = _ref2;
41378
42072
  return /*#__PURE__*/React__default.createElement("div", {
41379
42073
  style: {
41380
- paddingTop: "20px"
42074
+ paddingTop: "20px",
42075
+ marginLeft: "35px",
42076
+ cursor: "pointer"
42077
+ },
42078
+ onClick: e => {
42079
+ if (e.target.tagName !== "INPUT") {
42080
+ const nextVal = !value;
42081
+ onChange(nextVal);
42082
+ setischeckedReduce(nextVal);
42083
+ if (nextVal) {
42084
+ setischeckedAddition(false);
42085
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
42086
+ setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
42087
+ }
42088
+ }
41381
42089
  }
41382
42090
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
41383
- style: {
41384
- "marginLeft": "35px"
41385
- },
41386
42091
  label: t(`${servicev1}_REDUCED_AMOUNT`),
42092
+ checked: !!value,
41387
42093
  onChange: e => {
41388
- if (e.target.checked) {
41389
- props.onChange(true);
41390
- setischeckedReduce(true);
42094
+ const isChecked = e.target.checked;
42095
+ onChange(isChecked);
42096
+ setischeckedReduce(isChecked);
42097
+ if (isChecked) {
41391
42098
  setischeckedAddition(false);
42099
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
41392
42100
  setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
41393
- } else {
41394
- setischeckedReduce(false);
41395
- props.onChange(false);
41396
42101
  }
41397
- },
41398
- 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,
41399
- checked: props === null || props === void 0 ? void 0 : props.value
42102
+ }
41400
42103
  }));
41401
42104
  }
41402
- }), 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__default.createElement(digitUiReactComponents.CardLabelError, null, t("WS_REQUIRED_FIELD")) : null)), /*#__PURE__*/React__default.createElement("th", null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
42105
+ }), 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__default.createElement(digitUiReactComponents.CardLabelError, {
42106
+ style: {
42107
+ marginLeft: "35px"
42108
+ }
42109
+ }, t("WS_REQUIRED_FIELD")) : null)), /*#__PURE__*/React__default.createElement("th", null, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
41403
42110
  name: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41404
42111
  key: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41405
42112
  control: control,
42113
+ defaultValue: false,
41406
42114
  rules: {
41407
42115
  validate: value => {
41408
- 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));
42116
+ return !!value || ischeckedReduce || !!getValues(`${servicev1}_REDUCED_AMOUNT.VALUE`);
41409
42117
  }
41410
42118
  },
41411
- render: props => {
41412
- 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;
42119
+ render: _ref3 => {
42120
+ let {
42121
+ value,
42122
+ onChange
42123
+ } = _ref3;
41413
42124
  return /*#__PURE__*/React__default.createElement("div", {
41414
42125
  style: {
41415
- paddingTop: "17px"
42126
+ paddingTop: "17px",
42127
+ marginLeft: "35px",
42128
+ cursor: "pointer"
42129
+ },
42130
+ onClick: e => {
42131
+ if (e.target.tagName !== "INPUT") {
42132
+ const nextVal = !value;
42133
+ onChange(nextVal);
42134
+ setischeckedAddition(nextVal);
42135
+ if (nextVal) {
42136
+ setischeckedReduce(false);
42137
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
42138
+ setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
42139
+ }
42140
+ }
41416
42141
  }
41417
42142
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
41418
- style: {
41419
- "marginLeft": "35px"
41420
- },
41421
42143
  label: t(`${servicev1}_ADDITIONAL_AMOUNT`),
42144
+ checked: !!value,
41422
42145
  onChange: e => {
41423
- if (e.target.checked) {
41424
- props.onChange(true);
41425
- setischeckedAddition(true);
42146
+ const isChecked = e.target.checked;
42147
+ onChange(isChecked);
42148
+ setischeckedAddition(isChecked);
42149
+ if (isChecked) {
41426
42150
  setischeckedReduce(false);
42151
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
41427
42152
  setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
41428
- } else {
41429
- setischeckedAddition(false);
41430
- props.onChange(false);
41431
42153
  }
41432
- },
41433
- 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,
41434
- checked: props === null || props === void 0 ? void 0 : props.value
42154
+ }
41435
42155
  }));
41436
42156
  }
41437
- }), 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__default.createElement(digitUiReactComponents.CardLabelError, null, t("WS_REQUIRED_FIELD")) : null))), (_billSearchData3 = billSearchData) === null || _billSearchData3 === void 0 ? void 0 : _billSearchData3.map(node => {
41438
- 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;
42157
+ }), 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__default.createElement(digitUiReactComponents.CardLabelError, {
42158
+ style: {
42159
+ marginLeft: "35px"
42160
+ }
42161
+ }, t("WS_REQUIRED_FIELD")) : null))), (_billSearchData3 = billSearchData) === null || _billSearchData3 === void 0 ? void 0 : _billSearchData3.map(node => {
42162
+ var _errors$WS_REDUCED_AM2, _errors$WS_REDUCED_AM3, _errors$WS_REDUCED_AM4, _errors$WS_ADDITIONAL2, _errors$WS_ADDITIONAL3, _errors$WS_ADDITIONAL4;
41439
42163
  return /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
41440
42164
  style: {
41441
42165
  paddingRight: "60px",
@@ -41451,7 +42175,7 @@ const ApplicationBillAmendment = () => {
41451
42175
  paddingLeft: "150px"
41452
42176
  }
41453
42177
  }, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
41454
- 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),
42178
+ disabled: !ischeckedReduce,
41455
42179
  type: "number",
41456
42180
  name: `${servicev1}_REDUCED_AMOUNT.${node.taxHeadCode}`,
41457
42181
  inputRef: register({
@@ -41464,24 +42188,18 @@ const ApplicationBillAmendment = () => {
41464
42188
  message: t("CS_INVALID_INPUT")
41465
42189
  }
41466
42190
  })
41467
- }))), 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__default.createElement(digitUiReactComponents.CardLabelError, {
42191
+ }))), (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__default.createElement(digitUiReactComponents.CardLabelError, {
41468
42192
  style: {
41469
42193
  marginBottom: "-20px",
41470
42194
  marginTop: "-30px",
41471
42195
  marginLeft: "150px"
41472
42196
  }
41473
- }, 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__default.createElement(digitUiReactComponents.CardLabelError, {
41474
- style: {
41475
- marginBottom: "-20px",
41476
- marginTop: "-30px",
41477
- marginLeft: "150px"
41478
- }
41479
- }, 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__default.createElement("td", {
42197
+ }, 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__default.createElement("td", {
41480
42198
  style: {
41481
42199
  paddingRight: "60px"
41482
42200
  }
41483
42201
  }, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
41484
- 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),
42202
+ disabled: !ischeckedAddition,
41485
42203
  type: "number",
41486
42204
  name: `${servicev1}_ADDITIONAL_AMOUNT.${node.taxHeadCode}`,
41487
42205
  inputRef: register({
@@ -41490,15 +42208,11 @@ const ApplicationBillAmendment = () => {
41490
42208
  message: t("CS_INVALID_INPUT")
41491
42209
  }
41492
42210
  })
41493
- })), 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__default.createElement(digitUiReactComponents.CardLabelError, {
42211
+ })), (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__default.createElement(digitUiReactComponents.CardLabelError, {
41494
42212
  style: {
41495
42213
  marginTop: "-19px"
41496
42214
  }
41497
- }, 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__default.createElement(digitUiReactComponents.CardLabelError, {
41498
- style: {
41499
- marginTop: "-19px"
41500
- }
41501
- }, 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)));
42215
+ }, 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)));
41502
42216
  }), /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
41503
42217
  style: {
41504
42218
  paddingRight: "60px",
@@ -41529,7 +42243,7 @@ const ApplicationBillAmendment = () => {
41529
42243
  paddingLeft: "150px"
41530
42244
  }
41531
42245
  }, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
41532
- 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),
42246
+ disabled: !ischeckedReduce,
41533
42247
  name: `${servicev1}_REBATE`,
41534
42248
  inputRef: register()
41535
42249
  }))), /*#__PURE__*/React__default.createElement("td", {
@@ -41537,7 +42251,7 @@ const ApplicationBillAmendment = () => {
41537
42251
  paddingRight: "60px"
41538
42252
  }
41539
42253
  }, /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
41540
- 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),
42254
+ disabled: !ischeckedAddition,
41541
42255
  name: `${servicev1}_PENALTY`,
41542
42256
  inputRef: register()
41543
42257
  }))))))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null), BillAmendmentMDMSLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
@@ -41716,8 +42430,8 @@ const ApplicationBillAmendment = () => {
41716
42430
  onClose: closeToast
41717
42431
  }) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
41718
42432
  submit: true,
41719
- 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"),
41720
- 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)
42433
+ 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"),
42434
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41721
42435
  })));
41722
42436
  };
41723
42437
 
@@ -41926,7 +42640,7 @@ const createOption = (code, name) => ({
41926
42640
  code,
41927
42641
  name
41928
42642
  });
41929
- const PROPERTY_CATEGORY_OPTIONS = [createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
42643
+ const PROPERTY_CATEGORY_OPTIONS = [createOption("RESIDENTIAL", "Residential"), createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
41930
42644
  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")];
41931
42645
  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")];
41932
42646
  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")];
@@ -42601,7 +43315,7 @@ const FileUploadField = _ref6 => {
42601
43315
  })))));
42602
43316
  };
42603
43317
  const NewApplication = () => {
42604
- 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;
43318
+ 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;
42605
43319
  const {
42606
43320
  t
42607
43321
  } = reactI18next.useTranslation();
@@ -42760,8 +43474,15 @@ const NewApplication = () => {
42760
43474
  const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
42761
43475
  const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
42762
43476
  const selectedPropertyType = watch("useDetails.propertyType");
42763
- const dwellingPropertyTypes = ["Apartment", "DDAFlats", "GovtFlats", "Bungalows", "FlatOrApartment", "GroupHousingSociety", "JJSLUMS", "IndividualHouse", "BuiltUp.GroupHousingSociety", "BuiltUp.JJSLUMS", "BuiltUp.IndividualHouse"];
42764
- const isDwellingUnit = dwellingPropertyTypes.includes(selectedPropertyType === null || selectedPropertyType === void 0 ? void 0 : selectedPropertyType.code);
43477
+ const selectedPropertyCategory = watch("useDetails.propertyCategory");
43478
+ 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");
43479
+ const isDwellingUnit = isResidential;
43480
+ React.useEffect(() => {
43481
+ if (!isDwellingUnit) {
43482
+ setValue("useDetails.NumberofDwellingUnits", "");
43483
+ clearErrors("useDetails.NumberofDwellingUnits");
43484
+ }
43485
+ }, [isDwellingUnit]);
42765
43486
  const selectedLocality = watch("propertyAddress.locality");
42766
43487
  const selectedSubLocality = watch("propertyAddress.subLocality");
42767
43488
  const pCode = watch("propertyAddress.pinCode");
@@ -44877,18 +45598,18 @@ const NewApplication = () => {
44877
45598
  }), /*#__PURE__*/React__default.createElement(PreviewItem, {
44878
45599
  label: "Number of Floors",
44879
45600
  value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail5 = formValues.useDetails) === null || _formValues$useDetail5 === void 0 ? void 0 : _formValues$useDetail5.noOfFloors
44880
- }), 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__default.createElement(PreviewItem, {
45601
+ }), 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__default.createElement(PreviewItem, {
44881
45602
  label: "Number of Dwelling Units",
44882
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail8 = formValues.useDetails) === null || _formValues$useDetail8 === void 0 ? void 0 : _formValues$useDetail8.NumberofDwellingUnits
44883
- }) : 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__default.createElement(PreviewItem, {
45603
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.NumberofDwellingUnits
45604
+ }) : 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__default.createElement(PreviewItem, {
44884
45605
  label: "No. of Beds",
44885
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail11 = formValues.useDetails) === null || _formValues$useDetail11 === void 0 ? void 0 : _formValues$useDetail11.hospitalBeds
45606
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail14 = formValues.useDetails) === null || _formValues$useDetail14 === void 0 ? void 0 : _formValues$useDetail14.hospitalBeds
44886
45607
  }) : null, /*#__PURE__*/React__default.createElement(PreviewItem, {
44887
45608
  label: "Year of Construction",
44888
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail12 = formValues.useDetails) === null || _formValues$useDetail12 === void 0 ? void 0 : _formValues$useDetail12.SelectYearofConstruction
45609
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail15 = formValues.useDetails) === null || _formValues$useDetail15 === void 0 ? void 0 : _formValues$useDetail15.SelectYearofConstruction
44889
45610
  }), /*#__PURE__*/React__default.createElement(PreviewItem, {
44890
45611
  label: "Water Connection Usage Type",
44891
- value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail13 = formValues.useDetails) === null || _formValues$useDetail13 === void 0 ? void 0 : _formValues$useDetail13.WaterConnectionUsageType
45612
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail16 = formValues.useDetails) === null || _formValues$useDetail16 === void 0 ? void 0 : _formValues$useDetail16.WaterConnectionUsageType
44892
45613
  })), /*#__PURE__*/React__default.createElement(SectionCard, {
44893
45614
  description: "Uploaded supporting documents.",
44894
45615
  isOpen: collapsedSections.documents,
@@ -51488,7 +52209,16 @@ function ApplicationDetailsContent(_ref) {
51488
52209
  if (index === void 0) {
51489
52210
  index = 0;
51490
52211
  }
51491
- if (checkpoint.state === "OPEN" || checkpoint.status === "INITIATED" && !window.location.href.includes("/obps/")) {
52212
+ let actualIndex = 0;
52213
+ let actualTimeline = [];
52214
+ if (Array.isArray(index)) {
52215
+ actualTimeline = index;
52216
+ actualIndex = 0;
52217
+ } else {
52218
+ actualIndex = typeof index === "number" ? index : 0;
52219
+ actualTimeline = Array.isArray(timeline) ? timeline : [];
52220
+ }
52221
+ 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/")) {
51492
52222
  var _applicationData$audi;
51493
52223
  const caption = {
51494
52224
  date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime),
@@ -51498,7 +52228,7 @@ function ApplicationDetailsContent(_ref) {
51498
52228
  data: caption
51499
52229
  });
51500
52230
  } else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
51501
- 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;
52231
+ 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;
51502
52232
  const privacy = {
51503
52233
  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,
51504
52234
  fieldName: "mobileNumber",
@@ -51516,12 +52246,12 @@ function ApplicationDetailsContent(_ref) {
51516
52246
  isArray: false,
51517
52247
  d: res => {
51518
52248
  let resultstring = "";
51519
- resultstring = `+91 ${_.get(res, `ProcessInstances[${index}].assignes[0].mobileNumber`)}`;
52249
+ resultstring = `+91 ${_.get(res, `ProcessInstances[${actualIndex}].assignes[0].mobileNumber`)}`;
51520
52250
  return resultstring;
51521
52251
  }
51522
52252
  }
51523
52253
  };
51524
- const previousCheckpoint = timeline[index - 1];
52254
+ const previousCheckpoint = (_actualTimeline = actualTimeline) === null || _actualTimeline === void 0 ? void 0 : _actualTimeline[actualIndex - 1];
51525
52255
  const caption = {
51526
52256
  date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
51527
52257
  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,
@@ -51936,7 +52666,7 @@ function ApplicationDetailsContent(_ref) {
51936
52666
  }, 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__default.createElement(digitUiReactComponents.CheckPoint, {
51937
52667
  isCompleted: true,
51938
52668
  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}`),
51939
- 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)
52669
+ 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)
51940
52670
  }) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.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) => {
51941
52671
  var _workflowDetails$data28;
51942
52672
  let timelineStatusPostfix = "";
@@ -52123,10 +52853,10 @@ function ApplicationDetailsActionBar(_ref) {
52123
52853
  if (completelySatisfied !== undefined) {
52124
52854
  if (completelySatisfied === true) {
52125
52855
  var _actions;
52126
- actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52856
+ actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52127
52857
  } else if (completelySatisfied === false) {
52128
52858
  var _actions2;
52129
- actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52859
+ actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52130
52860
  }
52131
52861
  }
52132
52862
  const closeMenu = () => {
@@ -52657,7 +53387,7 @@ const ApplicationDetails = props => {
52657
53387
  };
52658
53388
 
52659
53389
  const ApplicationDetails$1 = () => {
52660
- 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;
53390
+ 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;
52661
53391
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
52662
53392
  try {
52663
53393
  let response = null;
@@ -52818,15 +53548,23 @@ const ApplicationDetails$1 = () => {
52818
53548
  };
52819
53549
  let dowloadOptions = [],
52820
53550
  appStatus = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a9 = applicationDetails.applicationData) === null || _applicationDetails$a9 === void 0 ? void 0 : _applicationDetails$a9.applicationStatus) || "";
52821
- 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";
53551
+ 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) || [];
53552
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline) || [];
53553
+ 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");
53554
+ const hasPaymentInTimeline = Array.isArray(timeline) && timeline.some(step => {
53555
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
53556
+ 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";
53557
+ }) || 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");
53558
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
53559
+ 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";
52822
53560
  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");
52823
53561
  if (feeEstimationSection !== null && feeEstimationSection !== void 0 && feeEstimationSection.additionalDetails && isFeePaid) {
52824
53562
  feeEstimationSection.additionalDetails.isPaid = true;
52825
53563
  }
52826
53564
  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") {
52827
- var _applicationDetails$p0, _applicationDetails$p1, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3;
53565
+ var _applicationDetails$p0, _applicationDetails$p1, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
52828
53566
  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);
52829
- 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) {
53567
+ 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) {
52830
53568
  workflowDetails.data.actionState.nextActions = workflowDetails.data.actionState.nextActions.filter(action => {
52831
53569
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52832
53570
  return plotArea > 200;
@@ -52837,7 +53575,7 @@ const ApplicationDetails$1 = () => {
52837
53575
  return true;
52838
53576
  });
52839
53577
  }
52840
- if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data3 = workflowDetails.data) !== null && _workflowDetails$data3 !== void 0 && _workflowDetails$data3.nextActions) {
53578
+ if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data5 = workflowDetails.data) !== null && _workflowDetails$data5 !== void 0 && _workflowDetails$data5.nextActions) {
52841
53579
  workflowDetails.data.nextActions = workflowDetails.data.nextActions.filter(action => {
52842
53580
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52843
53581
  return plotArea > 200;
@@ -52849,7 +53587,7 @@ const ApplicationDetails$1 = () => {
52849
53587
  });
52850
53588
  }
52851
53589
  }
52852
- 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 => {
53590
+ 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 => {
52853
53591
  if ((action === null || action === void 0 ? void 0 : action.action) === "ACTIVATE_CONNECTION") {
52854
53592
  action.redirectionUrll = {
52855
53593
  action: "ACTIVATE_CONNECTION",
@@ -52891,7 +53629,7 @@ const ApplicationDetails$1 = () => {
52891
53629
  };
52892
53630
  }
52893
53631
  });
52894
- 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 => {
53632
+ 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 => {
52895
53633
  if ((action === null || action === void 0 ? void 0 : action.action) === "EDIT") {
52896
53634
  var _applicationDetails$a11, _applicationDetails$a12, _applicationDetails$p14, _applicationDetails$p15, _servicesMasterData$w2, _userConfig$3, _userConfig$4;
52897
53635
  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");
@@ -52918,27 +53656,27 @@ const ApplicationDetails$1 = () => {
52918
53656
  };
52919
53657
  }
52920
53658
  });
52921
- 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 => {
53659
+ 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 => {
52922
53660
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52923
53661
  action.isToast = true;
52924
53662
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52925
53663
  }
52926
53664
  });
52927
- 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 => {
53665
+ 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 => {
52928
53666
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52929
53667
  action.isToast = true;
52930
53668
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52931
53669
  }
52932
53670
  });
52933
- 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 => {
53671
+ 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 => {
52934
53672
  if ((action === null || action === void 0 ? void 0 : action.action) === "PAY") {
52935
- var _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20;
52936
- 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") {
53673
+ var _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data22;
53674
+ 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") {
52937
53675
  action.redirectionUrll = {
52938
53676
  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}`,
52939
53677
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52940
53678
  };
52941
- } 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") {
53679
+ } 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") {
52942
53680
  action.redirectionUrll = {
52943
53681
  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}`,
52944
53682
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -52951,15 +53689,15 @@ const ApplicationDetails$1 = () => {
52951
53689
  }
52952
53690
  }
52953
53691
  });
52954
- 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 => {
53692
+ 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 => {
52955
53693
  if ((action === null || action === void 0 ? void 0 : action.action) === "PAY") {
52956
- var _workflowDetails$data24, _workflowDetails$data25, _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29;
52957
- 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") {
53694
+ var _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29, _workflowDetails$data30, _workflowDetails$data31;
53695
+ 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") {
52958
53696
  action.redirectionUrll = {
52959
53697
  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}`,
52960
53698
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52961
53699
  };
52962
- } 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") {
53700
+ } 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") {
52963
53701
  action.redirectionUrll = {
52964
53702
  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}`,
52965
53703
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -53161,16 +53899,16 @@ const ApplicationDetails$1 = () => {
53161
53899
  };
53162
53900
 
53163
53901
  const GetConnectionDetails = () => {
53164
- 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;
53902
+ 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;
53165
53903
  const getBillSearch = function () {
53166
53904
  try {
53167
53905
  const _temp = function (_applicationDetails$f8) {
53168
53906
  if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f8 = applicationDetails.fetchBillsData) === null || _applicationDetails$f8 === void 0 ? void 0 : _applicationDetails$f8.length) > 0) {
53169
- var _applicationDetails$a24;
53907
+ var _applicationDetails$a25;
53170
53908
  const service = serviceType === "WATER" ? "WS" : "SW";
53171
53909
  let wsSearchFilters = {
53172
53910
  isConnectionSearch: true,
53173
- connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a24 = applicationDetails.applicationData) === null || _applicationDetails$a24 === void 0 ? void 0 : _applicationDetails$a24.connectionNo
53911
+ connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo
53174
53912
  };
53175
53913
  return Promise.resolve(Digit.WSService.search({
53176
53914
  tenantId,
@@ -53183,8 +53921,8 @@ const GetConnectionDetails = () => {
53183
53921
  bussinessService: service
53184
53922
  };
53185
53923
  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) {
53186
- var _applicationDetails$a25;
53187
- downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo, filters);
53924
+ var _applicationDetails$a26;
53925
+ downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a26 = applicationDetails.applicationData) === null || _applicationDetails$a26 === void 0 ? void 0 : _applicationDetails$a26.connectionNo, filters);
53188
53926
  }
53189
53927
  });
53190
53928
  }
@@ -53208,7 +53946,7 @@ const GetConnectionDetails = () => {
53208
53946
  const getTenantId = filters === null || filters === void 0 ? void 0 : filters.tenantId;
53209
53947
  const [showOptions, setShowOptions] = React.useState(false);
53210
53948
  const stateCode = Digit.ULBService.getStateId();
53211
- const actionConfig = ["DISCONNECTION_BUTTON"];
53949
+ const actionConfig = ["BILL_AMENDMENT_BUTTON", "DISCONNECTION_BUTTON"];
53212
53950
  const {
53213
53951
  isLoading,
53214
53952
  isError,
@@ -53225,11 +53963,11 @@ const GetConnectionDetails = () => {
53225
53963
  isLoading: isLoadingDemand,
53226
53964
  data: demandData
53227
53965
  } = Digit.Hooks.useDemandSearch({
53228
- consumerCode: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo,
53966
+ consumerCode: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo) || applicationNumber,
53229
53967
  businessService: serviceType === "WATER" ? "WS" : "SW",
53230
53968
  tenantId
53231
53969
  }, {
53232
- enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.applicationNo)
53970
+ enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.connectionNo || applicationNumber)
53233
53971
  });
53234
53972
  const [showModal, setshowModal] = React.useState(false);
53235
53973
  const [billData, setBilldata] = React.useState([]);
@@ -53295,6 +54033,35 @@ const GetConnectionDetails = () => {
53295
54033
  }, 10000);
53296
54034
  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;
53297
54035
  const checkWorkflow = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isApplicationApproved;
54036
+ const getBillAmendmentButton = () => {
54037
+ var _demandData$Demands, _applicationDetails$a16, _applicationDetails$a17;
54038
+ let isBillAmendNotApplicable = false;
54039
+ billData === null || billData === void 0 ? void 0 : billData.map(bill => {
54040
+ if ((bill === null || bill === void 0 ? void 0 : bill.status) === "INWORKFLOW") {
54041
+ isBillAmendNotApplicable = true;
54042
+ return;
54043
+ }
54044
+ });
54045
+ if ((demandData === null || demandData === void 0 ? void 0 : (_demandData$Demands = demandData.Demands) === null || _demandData$Demands === void 0 ? void 0 : _demandData$Demands.length) === 0) {
54046
+ setshowActionToast({
54047
+ key: "error",
54048
+ label: "No_Bills_Found"
54049
+ });
54050
+ return;
54051
+ } else if (isBillAmendNotApplicable) {
54052
+ setshowActionToast({
54053
+ key: "error",
54054
+ label: "WORKFLOW_IN_PROGRESS"
54055
+ });
54056
+ return;
54057
+ }
54058
+ 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);
54059
+ const connNo = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) || applicationNumber;
54060
+ const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
54061
+ history.push(`/digit-ui/employee/ws/required-documents?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
54062
+ data: applicationDetails
54063
+ }));
54064
+ };
53298
54065
  const closeMenu = () => {
53299
54066
  setShowOptions(false);
53300
54067
  };
@@ -53312,11 +54079,10 @@ const GetConnectionDetails = () => {
53312
54079
  });
53313
54080
  } else {
53314
54081
  var _billData$, _applicationDetails$f3;
53315
- console.log("due", due, applicationDetails);
53316
54082
  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) {
53317
- var _applicationDetails$a17;
54083
+ var _applicationDetails$a18;
53318
54084
  Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
53319
- const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) || applicationNumber;
54085
+ const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
53320
54086
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53321
54087
  } else {
53322
54088
  setshowModal(true);
@@ -53333,12 +54099,12 @@ const GetConnectionDetails = () => {
53333
54099
  } else {
53334
54100
  var _billData$2, _applicationDetails$f4;
53335
54101
  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) {
53336
- var _applicationDetails$a18;
54102
+ var _applicationDetails$a19;
53337
54103
  Digit.SessionStorage.set("WS_DISCONNECTION", {
53338
54104
  ...applicationDetails,
53339
54105
  serviceType
53340
54106
  });
53341
- const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
54107
+ const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : _applicationDetails$a19.connectionNo) || applicationNumber;
53342
54108
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53343
54109
  } else {
53344
54110
  setshowModal(true);
@@ -53346,14 +54112,16 @@ const GetConnectionDetails = () => {
53346
54112
  }
53347
54113
  };
53348
54114
  function onActionSelect(action) {
53349
- if (action === "DISCONNECTION_BUTTON") {
54115
+ if (action === "BILL_AMENDMENT_BUTTON") {
54116
+ getBillAmendmentButton();
54117
+ } else if (action === "DISCONNECTION_BUTTON") {
53350
54118
  getDisconnectionButton();
53351
54119
  } else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
53352
54120
  getRestorationButton();
53353
54121
  }
53354
54122
  }
53355
- 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;
53356
- 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);
54123
+ 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;
54124
+ 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);
53357
54125
  const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
53358
54126
  const showActionRestoration = ["RESTORATION_BUTTON"];
53359
54127
  let dowloadOptions = [];
@@ -53535,7 +54303,11 @@ const newConfig$2 = [{
53535
54303
  type: "component",
53536
54304
  key: "supportingDocuments",
53537
54305
  component: "WSActivationSupportingDocuments",
53538
- withoutLabel: true
54306
+ withoutLabel: true,
54307
+ isMandatory: true,
54308
+ validation: {
54309
+ required: true
54310
+ }
53539
54311
  }]
53540
54312
  }]
53541
54313
  }];
@@ -53666,6 +54438,15 @@ const ActivateConnection = () => {
53666
54438
  component: "WSActivationDetails"
53667
54439
  };
53668
54440
  }
54441
+ if (item.key === "supportingDocuments") {
54442
+ return {
54443
+ ...item,
54444
+ isMandatory: true,
54445
+ validation: {
54446
+ required: true
54447
+ }
54448
+ };
54449
+ }
53669
54450
  return item;
53670
54451
  });
53671
54452
  flattenedBody = [...flattenedBody, ...mappedSectionBody];
@@ -53693,7 +54474,9 @@ const ActivateConnection = () => {
53693
54474
  return () => clearTimeout(timer);
53694
54475
  }, [isAppDetailsPage]);
53695
54476
  const onFormValueChange = (setValue, formData, formState) => {
53696
- 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);
54477
+ var _formData$supportingD, _formData$supportingD2, _formData$supportingD3, _formData$supportingD4, _formData$supportingD5;
54478
+ 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);
54479
+ 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);
53697
54480
  };
53698
54481
  const getConvertedDate = function (dateOfTime) {
53699
54482
  try {
@@ -53717,8 +54500,10 @@ const ActivateConnection = () => {
53717
54500
  };
53718
54501
  const onSubmit = function (data) {
53719
54502
  try {
53720
- const _temp5 = function () {
53721
- if (!canSubmit) {
54503
+ var _data$supportingDocum, _data$supportingDocum2, _data$supportingDocum3, _data$supportingDocum4, _data$supportingDocum5;
54504
+ 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);
54505
+ return Promise.resolve(function () {
54506
+ if (!canSubmit || !docFileStoreId) {
53722
54507
  setShowToast({
53723
54508
  warning: true,
53724
54509
  message: "PLEASE_FILL_MANDATORY_DETAILS"
@@ -53730,19 +54515,19 @@ const ActivateConnection = () => {
53730
54515
  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;
53731
54516
  function _temp4() {
53732
54517
  function _temp2() {
53733
- 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;
54518
+ var _formDetails$comments, _formDetails$comments2, _formData$application, _formData$application2;
53734
54519
  formData.comment = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments = formDetails.comments) === null || _formDetails$comments === void 0 ? void 0 : _formDetails$comments.comments) || "";
53735
54520
  formData.action = filters === null || filters === void 0 ? void 0 : filters.action;
53736
- 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 ? [{
54521
+ formData.wfDocuments = docFileStoreId ? [{
53737
54522
  documentType: "Document - 1",
53738
- 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
54523
+ fileStoreId: docFileStoreId
53739
54524
  }] : [];
53740
54525
  formData.processInstance = {
53741
54526
  action: filters === null || filters === void 0 ? void 0 : filters.action,
53742
54527
  comment: (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments2 = formDetails.comments) === null || _formDetails$comments2 === void 0 ? void 0 : _formDetails$comments2.comments) || "",
53743
- 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 ? [{
54528
+ documents: docFileStoreId ? [{
53744
54529
  documentType: "Document - 1",
53745
- 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
54530
+ fileStoreId: docFileStoreId
53746
54531
  }] : []
53747
54532
  };
53748
54533
  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);
@@ -53843,8 +54628,7 @@ const ActivateConnection = () => {
53843
54628
  }();
53844
54629
  return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
53845
54630
  }
53846
- }();
53847
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
54631
+ }());
53848
54632
  } catch (e) {
53849
54633
  return Promise.reject(e);
53850
54634
  }
@@ -53886,29 +54670,31 @@ const ActivateConnection = () => {
53886
54670
  };
53887
54671
 
53888
54672
  const ApplicationDetailsBillAmendment = () => {
53889
- 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;
53890
- const {
53891
- applicationNumber
53892
- } = Digit.Hooks.useQueryParams();
54673
+ var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2;
54674
+ const queryParams = Digit.Hooks.useQueryParams();
54675
+ const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
53893
54676
  const tenantId = Digit.ULBService.getCurrentTenantId();
53894
54677
  const {
53895
54678
  t
53896
54679
  } = reactI18next.useTranslation();
53897
54680
  let serviceType = "WATER";
53898
- if (applicationNumber.includes("SW")) serviceType = "SEWERAGE";
54681
+ if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
53899
54682
  const [showToast, setShowToast] = React.useState(false);
53900
54683
  const {
53901
54684
  isLoading,
53902
54685
  isError,
53903
54686
  data: applicationDetails,
53904
54687
  error
53905
- } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType);
54688
+ } = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType, {
54689
+ enabled: !!applicationNumber
54690
+ });
54691
+ 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");
53906
54692
  const workflowDetails = Digit.Hooks.useWorkflowDetails({
53907
54693
  tenantId,
53908
54694
  id: applicationNumber,
53909
- 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,
54695
+ moduleCode: businessService,
53910
54696
  config: {
53911
- 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
54697
+ enabled: !!applicationNumber
53912
54698
  }
53913
54699
  });
53914
54700
  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 => {
@@ -53984,12 +54770,12 @@ const ApplicationDetailsBillAmendment = () => {
53984
54770
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
53985
54771
  mutate: mutate,
53986
54772
  workflowDetails: workflowDetails,
53987
- 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,
54773
+ businessService: businessService,
53988
54774
  moduleCode: "WS",
53989
54775
  showToast: showToast,
53990
54776
  setShowToast: setShowToast,
53991
54777
  closeToast: () => setShowToast(null),
53992
- 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()}_`
54778
+ timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
53993
54779
  })), showToast ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
53994
54780
  isDleteBtn: true,
53995
54781
  error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
@@ -56522,8 +57308,6 @@ const Step2_NewConsumerDetails = _ref => {
56522
57308
  name: "reasonForNameChange"
56523
57309
  });
56524
57310
  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");
56525
- console.log("selectedReason in Step2:", selectedReason);
56526
- console.log("isDevolutionOrInheritance:", isDevolutionOrInheritance);
56527
57311
  const genderOptions = [{
56528
57312
  code: "MALE",
56529
57313
  i18nKey: "Male"
@@ -58240,7 +59024,6 @@ const MutationApplication = () => {
58240
59024
  }
58241
59025
  }, [location.pathname, path]);
58242
59026
  const editApplicationNumber = (details === null || details === void 0 ? void 0 : details.applicationNo) || applicationNumber;
58243
- console.log(editApplicationNumber, "editApplicationNumber");
58244
59027
  const {
58245
59028
  isLoading: isWorkflowLoading,
58246
59029
  data: workflowData
@@ -58256,7 +59039,6 @@ const MutationApplication = () => {
58256
59039
  }, {
58257
59040
  enabled: !!editApplicationNumber
58258
59041
  });
58259
- console.log(workflowData, "workflowData");
58260
59042
  const isEmployee = window.location.href.includes("/employee/");
58261
59043
  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");
58262
59044
  const querySearchParam = isEditFlow ? editApplicationNumber : authKNumber;
@@ -60354,7 +61136,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60354
61136
  businessService,
60355
61137
  isLoading
60356
61138
  } = _ref;
60357
- console.log("dafff", data);
60358
61139
  const convertEpochToDate = dateEpoch => {
60359
61140
  if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
60360
61141
  return "NA";
@@ -60413,7 +61194,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60413
61194
  }
60414
61195
  const downloadIntegratedBill = function () {
60415
61196
  try {
60416
- console.log("integrated", data);
60417
61197
  const _temp2 = function () {
60418
61198
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
60419
61199
  const _temp = _catch(function () {
@@ -60426,9 +61206,7 @@ const SearchWaterConnectionIntegrated = _ref => {
60426
61206
  type: "application/pdf"
60427
61207
  }), `IntegratedBill.pdf`);
60428
61208
  });
60429
- }, function (e) {
60430
- console.log("errorrrrrr", e);
60431
- });
61209
+ }, function () {});
60432
61210
  if (_temp && _temp.then) return _temp.then(function () {});
60433
61211
  } else {
60434
61212
  alert("NO Pdf");
@@ -60816,7 +61594,7 @@ const openFilePDF = fileId => {
60816
61594
  }).catch(error => console.error("Error fetching file:", error));
60817
61595
  };
60818
61596
  const CheckPage$4 = _ref2 => {
60819
- 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;
61597
+ 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;
60820
61598
  let {
60821
61599
  data,
60822
61600
  onSubmit,
@@ -60858,7 +61636,7 @@ const CheckPage$4 = _ref2 => {
60858
61636
  }
60859
61637
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60860
61638
  label: t("WS_PROPERTY_ID_LABEL"),
60861
- text: `${t(checkForNA(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
61639
+ text: `${t(checkForNA$1(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
60862
61640
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60863
61641
  onClick: onEdit
60864
61642
  })
@@ -60869,13 +61647,19 @@ const CheckPage$4 = _ref2 => {
60869
61647
  }
60870
61648
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60871
61649
  label: t("WS_SERVICE_TYPE"),
60872
- 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)))}`,
61650
+ 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)))}`,
60873
61651
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60874
61652
  onClick: onEdit
60875
61653
  })
60876
61654
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60877
61655
  label: t("WS_APPLICANT_TYPE"),
60878
- 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)))}`
61656
+ 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)))}`
61657
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61658
+ label: t("WS_Billing_Address_Type"),
61659
+ 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)))}`
61660
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61661
+ label: t("Complete Address"),
61662
+ 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))}`
60879
61663
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60880
61664
  style: {
60881
61665
  marginTop: "10px",
@@ -60883,28 +61667,28 @@ const CheckPage$4 = _ref2 => {
60883
61667
  }
60884
61668
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60885
61669
  label: t("WS_OWN_DETAIL_NAME"),
60886
- text: `${t(checkForNA((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
61670
+ text: `${t(checkForNA$1((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
60887
61671
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60888
61672
  onClick: onEdit
60889
61673
  })
60890
61674
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60891
61675
  label: t("WS_OWN_DETAIL_MIDDLE_NAME"),
60892
- text: `${t(checkForNA((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
61676
+ text: `${t(checkForNA$1((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
60893
61677
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60894
61678
  label: t("WS_OWN_DETAIL_LAST_NAME"),
60895
- text: `${t(checkForNA((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
61679
+ text: `${t(checkForNA$1((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
60896
61680
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60897
61681
  label: t("WS_CONN_HOLDER_OWN_DETAIL_GENDER_LABEL"),
60898
- 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)))}`
61682
+ 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)))}`
60899
61683
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60900
61684
  label: t("CORE_COMMON_MOBILE_NUMBER"),
60901
- text: `${t(checkForNA((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
61685
+ text: `${t(checkForNA$1((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
60902
61686
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60903
61687
  label: t("CORE_COMMON_WHATSAPP_MOBILE_NUMBER"),
60904
- text: `${t(checkForNA((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
61688
+ text: `${t(checkForNA$1((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
60905
61689
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60906
61690
  label: t("WS_EMAIL_ID"),
60907
- text: `${t(checkForNA((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
61691
+ text: `${t(checkForNA$1((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
60908
61692
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60909
61693
  style: {
60910
61694
  marginTop: "10px",
@@ -60912,64 +61696,64 @@ const CheckPage$4 = _ref2 => {
60912
61696
  }
60913
61697
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60914
61698
  label: t("WS_ZRO_LOCATION"),
60915
- 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)))}`,
61699
+ 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)))}`,
60916
61700
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60917
61701
  onClick: onEdit
60918
61702
  })
60919
61703
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60920
61704
  label: t("COMMON_ADDRESS_TYPE"),
60921
- 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)))}`
61705
+ 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)))}`
60922
61706
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60923
61707
  label: t("CORE_COMMON_PROFILE_CITY"),
60924
- 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)))}`
61708
+ 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)))}`
60925
61709
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60926
61710
  label: t("PINCODE"),
60927
- text: `${t(checkForNA(((_propertyAddress1 = propertyAddress) === null || _propertyAddress1 === void 0 ? void 0 : _propertyAddress1.pincode) || ((_propertyAddress10 = propertyAddress) === null || _propertyAddress10 === void 0 ? void 0 : _propertyAddress10.pinCode)))}`
61711
+ text: `${t(checkForNA$1(((_propertyAddress1 = propertyAddress) === null || _propertyAddress1 === void 0 ? void 0 : _propertyAddress1.pincode) || ((_propertyAddress10 = propertyAddress) === null || _propertyAddress10 === void 0 ? void 0 : _propertyAddress10.pinCode)))}`
60928
61712
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60929
61713
  label: t("LOCALITY"),
60930
- 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)))}`
61714
+ 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)))}`
60931
61715
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60932
61716
  label: t("SubLocality"),
60933
- 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)))}`
61717
+ 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)))}`
60934
61718
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60935
61719
  label: t("STREET_NAME"),
60936
- text: `${t(checkForNA(((_propertyAddress17 = propertyAddress) === null || _propertyAddress17 === void 0 ? void 0 : _propertyAddress17.streetName) || ((_propertyAddress18 = propertyAddress) === null || _propertyAddress18 === void 0 ? void 0 : _propertyAddress18.street)))}`
61720
+ text: `${t(checkForNA$1(((_propertyAddress17 = propertyAddress) === null || _propertyAddress17 === void 0 ? void 0 : _propertyAddress17.streetName) || ((_propertyAddress18 = propertyAddress) === null || _propertyAddress18 === void 0 ? void 0 : _propertyAddress18.street)))}`
60937
61721
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60938
61722
  label: t("ADDRESS_LINE1"),
60939
- text: `${t(checkForNA(((_propertyAddress19 = propertyAddress) === null || _propertyAddress19 === void 0 ? void 0 : _propertyAddress19.addressLine1) || ((_propertyAddress20 = propertyAddress) === null || _propertyAddress20 === void 0 ? void 0 : _propertyAddress20.street)))}`
61723
+ text: `${t(checkForNA$1(((_propertyAddress19 = propertyAddress) === null || _propertyAddress19 === void 0 ? void 0 : _propertyAddress19.addressLine1) || ((_propertyAddress20 = propertyAddress) === null || _propertyAddress20 === void 0 ? void 0 : _propertyAddress20.street)))}`
60940
61724
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60941
61725
  label: t("ADDRESS_LINE2"),
60942
- text: `${t(checkForNA((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
61726
+ text: `${t(checkForNA$1((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
60943
61727
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60944
61728
  label: t("HOUSE_NO"),
60945
- text: `${t(checkForNA(((_propertyAddress22 = propertyAddress) === null || _propertyAddress22 === void 0 ? void 0 : _propertyAddress22.houseNo) || ((_propertyAddress23 = propertyAddress) === null || _propertyAddress23 === void 0 ? void 0 : _propertyAddress23.doorNo)))}`
61729
+ text: `${t(checkForNA$1(((_propertyAddress22 = propertyAddress) === null || _propertyAddress22 === void 0 ? void 0 : _propertyAddress22.houseNo) || ((_propertyAddress23 = propertyAddress) === null || _propertyAddress23 === void 0 ? void 0 : _propertyAddress23.doorNo)))}`
60946
61730
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60947
61731
  label: t("LATITUDE_GEOTAG"),
60948
- text: `${t(checkForNA((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
61732
+ text: `${t(checkForNA$1((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
60949
61733
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60950
61734
  label: t("LONGITUDE_GEOTAG"),
60951
- text: `${t(checkForNA((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
61735
+ text: `${t(checkForNA$1((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
60952
61736
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60953
61737
  label: t("COMMON_ASSEMBLY"),
60954
- 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)))}`
61738
+ 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)))}`
60955
61739
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60956
61740
  label: t("COMMON_WARD"),
60957
- 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)))}`
61741
+ 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)))}`
60958
61742
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60959
61743
  label: t("COMMON_ZONE"),
60960
- 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)))}`
61744
+ 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)))}`
60961
61745
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60962
61746
  label: t("COMMON_CURRENT_ASSEMBLY"),
60963
- text: `${t(checkForNA(((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : _propertyAddress38.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
61747
+ text: `${t(checkForNA$1(((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : _propertyAddress38.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
60964
61748
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60965
61749
  label: t("COMMON_CURRENT_WARD"),
60966
- text: `${t(checkForNA(((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
61750
+ text: `${t(checkForNA$1(((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
60967
61751
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60968
61752
  label: t("COMMON_CURRENT_ZONE"),
60969
- text: `${t(checkForNA(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : _propertyAddress40.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
61753
+ text: `${t(checkForNA$1(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : _propertyAddress40.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
60970
61754
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60971
61755
  label: t("LANDMARK"),
60972
- text: `${t(checkForNA((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
61756
+ text: `${t(checkForNA$1((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
60973
61757
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60974
61758
  style: {
60975
61759
  marginTop: "10px",
@@ -60977,38 +61761,49 @@ const CheckPage$4 = _ref2 => {
60977
61761
  }
60978
61762
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60979
61763
  label: t("WS_CATEGORY_TYPE"),
60980
- 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)))}`,
61764
+ 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)))}`,
60981
61765
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60982
61766
  onClick: onEdit
60983
61767
  })
60984
61768
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60985
61769
  label: t("WS_PROPERTY_CATEGORY"),
60986
- 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)))}`
61770
+ 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)))}`
60987
61771
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60988
61772
  label: t("WS_PROPERTY_TYPE"),
60989
- 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)))}`
61773
+ 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)))}`
60990
61774
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60991
61775
  label: t("WS_WATER_CONNECTION_USAGE_TYPE"),
60992
- 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)))}`
61776
+ 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)))}`
60993
61777
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60994
61778
  label: t("WS_NUMBER_OF_FLOORS"),
60995
- 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)))}`
61779
+ 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)))}`
60996
61780
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60997
61781
  label: t("WS_PLOT_AREA"),
60998
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
61782
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
60999
61783
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61000
61784
  label: t("WS_BUILT_UP_AREA"),
61001
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
61785
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
61002
61786
  }), (useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61003
61787
  label: t("WS_HEIGHT_OF_THE_BUILDING(meters)"),
61004
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61788
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61005
61789
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61006
61790
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
61007
- 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)))}`
61008
- }), ["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__default.createElement(digitUiReactComponents.Row, {
61791
+ 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)))}`
61792
+ }), 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__default.createElement(digitUiReactComponents.Row, {
61009
61793
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
61010
- text: `${t(checkForNA((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
61011
- }) : null), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
61794
+ text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
61795
+ }) : 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) => {
61796
+ var _q$answer, _q$answer2, _q$answer3;
61797
+ 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}`;
61798
+ 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;
61799
+ const trimmedQ = String(qText || "").trim();
61800
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
61801
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61802
+ key: `question_${idx}`,
61803
+ label: displayLabel,
61804
+ text: `${t(checkForNA$1(aText))}`
61805
+ });
61806
+ })), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
61012
61807
  style: {
61013
61808
  marginTop: "10px",
61014
61809
  marginBottom: "30px"
@@ -61021,10 +61816,10 @@ const CheckPage$4 = _ref2 => {
61021
61816
  })
61022
61817
  }), ((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__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61023
61818
  label: t("WS_EMPLOYEE_ID"),
61024
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61819
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61025
61820
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61026
61821
  label: t("WS_EMPLOYEE_DESIGNATION"),
61027
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61822
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61028
61823
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61029
61824
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
61030
61825
  text: /*#__PURE__*/React__default.createElement("span", {
@@ -61056,7 +61851,7 @@ const CheckPage$4 = _ref2 => {
61056
61851
  key: index
61057
61852
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61058
61853
  label: t(`${doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.replaceAll(".", "_")}`),
61059
- text: checkForNA(doc === null || doc === void 0 ? void 0 : doc.documentUid),
61854
+ text: checkForNA$1(doc === null || doc === void 0 ? void 0 : doc.documentUid),
61060
61855
  actionButton: index === 0 ? /*#__PURE__*/React__default.createElement(ActionButton$1, {
61061
61856
  onClick: onEdit
61062
61857
  }) : null
@@ -62437,6 +63232,7 @@ const componentsToRegister = {
62437
63232
  WSCard,
62438
63233
  SWCard,
62439
63234
  WSBillIAmendMentInbox: Inbox,
63235
+ WSSearchBillAmendment: SearchBillAmendment,
62440
63236
  WSCreate: WSCreate,
62441
63237
  WSDisconnection: WSDisconnection,
62442
63238
  WSRestoration: WSDisconnection$1,