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

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
  }
@@ -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 {
@@ -13054,7 +13065,9 @@ const createConnectionDetails = () => ({
13054
13065
  },
13055
13066
  institutionName: "",
13056
13067
  natureOfWork: "",
13057
- orgDeptDocument: ""
13068
+ orgDeptDocument: "",
13069
+ addressType: "",
13070
+ completeAddress: ""
13058
13071
  });
13059
13072
  const WSConnectionDetails = _ref => {
13060
13073
  var _formData$ConnectionD, _formData$ConnectionD2;
@@ -13074,6 +13087,16 @@ const WSConnectionDetails = _ref => {
13074
13087
  pathname
13075
13088
  } = reactRouterDom.useLocation();
13076
13089
  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()]);
13090
+ React.useEffect(() => {
13091
+ var _formData$ConnectionD3;
13092
+ if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : _formData$ConnectionD3.length) > 0) {
13093
+ const incoming = formData.ConnectionDetails[0];
13094
+ const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
13095
+ 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)) {
13096
+ setConnectionDetails([incoming]);
13097
+ }
13098
+ }
13099
+ }, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
13077
13100
  const [focusIndex, setFocusIndex] = React.useState({
13078
13101
  index: -1,
13079
13102
  type: ""
@@ -13214,7 +13237,7 @@ const WSConnectionDetails = _ref => {
13214
13237
  }, commonProps))));
13215
13238
  };
13216
13239
  const ConnectionDetails = _props => {
13217
- var _formData$DocumentsRe;
13240
+ 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
13241
  const {
13219
13242
  connectionDetail,
13220
13243
  focusIndex,
@@ -13239,6 +13262,64 @@ const ConnectionDetails = _props => {
13239
13262
  formData,
13240
13263
  userType
13241
13264
  } = _props;
13265
+ const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || window.localStorage.getItem("user-info") || "{}");
13266
+ let addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13267
+ if (!addresses || addresses.length === 0) {
13268
+ var _formData$cpt, _formData$cpt$details, _formData$cpt$details2, _formData$cpt2, _formData$cpt2$detail, _cptAddress$locality, _cptAddress$locality2;
13269
+ 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];
13270
+ 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;
13271
+ 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(", ") : "";
13272
+ const ownerPermAddress = owner !== null && owner !== void 0 && owner.permanentAddress && (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) !== "NA" ? owner.permanentAddress : formattedPropertyAddress;
13273
+ const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : ownerPermAddress || formattedPropertyAddress;
13274
+ if (ownerPermAddress || ownerCorrAddress) {
13275
+ addresses = [{
13276
+ type: "PERMANENT",
13277
+ address: ownerPermAddress
13278
+ }, {
13279
+ type: "CORRESPONDENCE",
13280
+ address: ownerCorrAddress
13281
+ }];
13282
+ }
13283
+ }
13284
+ const getAddressTypeObj = val => {
13285
+ if (!val) return null;
13286
+ if (typeof val === "object") {
13287
+ const code = (val.code || val.i18nKey || "").toUpperCase();
13288
+ if (code === "CORRESPONDENCE") {
13289
+ return {
13290
+ i18nKey: "Correspondence",
13291
+ code: "CORRESPONDENCE"
13292
+ };
13293
+ }
13294
+ return {
13295
+ i18nKey: "Permanent",
13296
+ code: "PERMANENT"
13297
+ };
13298
+ }
13299
+ const str = String(val).toUpperCase();
13300
+ if (str === "CORRESPONDENCE") {
13301
+ return {
13302
+ i18nKey: "Correspondence",
13303
+ code: "CORRESPONDENCE"
13304
+ };
13305
+ }
13306
+ if (str === "PERMANENT") {
13307
+ return {
13308
+ i18nKey: "Permanent",
13309
+ code: "PERMANENT"
13310
+ };
13311
+ }
13312
+ return {
13313
+ i18nKey: val,
13314
+ code: val
13315
+ };
13316
+ };
13317
+ 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)) || "";
13318
+ 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) || "";
13319
+ if (!initialCompleteAddress && initialAddressType !== null && initialAddressType !== void 0 && initialAddressType.code && ((_addresses = addresses) === null || _addresses === void 0 ? void 0 : _addresses.length) > 0) {
13320
+ const matchedAddr = addresses.find(a => a.type === initialAddressType.code) || {};
13321
+ initialCompleteAddress = matchedAddr.houseNumber || matchedAddr.city || matchedAddr.pinCode ? [matchedAddr.houseNumber, matchedAddr.address, matchedAddr.city, matchedAddr.pinCode].filter(Boolean).join(", ") : matchedAddr.address || "";
13322
+ }
13242
13323
  const {
13243
13324
  control,
13244
13325
  formState: localFormState,
@@ -13287,16 +13368,36 @@ const ConnectionDetails = _props => {
13287
13368
  natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
13288
13369
  orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
13289
13370
  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) || ""
13371
+ addressType: initialAddressType || "",
13372
+ completeAddress: initialCompleteAddress || ""
13292
13373
  }
13293
13374
  });
13294
13375
  const formValue = watch();
13295
13376
  const {
13296
13377
  errors
13297
13378
  } = localFormState;
13298
- const userInfo = JSON.parse(window.localStorage.getItem("Citizen.user-info") || "{}");
13299
- const addresses = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.addresses) || [];
13379
+ React.useEffect(() => {
13380
+ 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;
13381
+ 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);
13382
+ const formattedAddrType = getAddressTypeObj(rawAddrType);
13383
+ if (formattedAddrType) {
13384
+ const currentVal = getValues("addressType");
13385
+ if (!currentVal || typeof currentVal === "object" && (currentVal === null || currentVal === void 0 ? void 0 : currentVal.code) !== formattedAddrType.code || typeof currentVal === "string" && currentVal !== formattedAddrType.code) {
13386
+ setValue("addressType", formattedAddrType);
13387
+ }
13388
+ }
13389
+ 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);
13390
+ const currentAddr = getValues("completeAddress");
13391
+ if (savedAddr && (!currentAddr || currentAddr !== savedAddr)) {
13392
+ setValue("completeAddress", savedAddr);
13393
+ } else if (!currentAddr && formattedAddrType && ((_addresses2 = addresses) === null || _addresses2 === void 0 ? void 0 : _addresses2.length) > 0) {
13394
+ const matched = addresses.find(a => a.type === formattedAddrType.code) || {};
13395
+ const fallback = matched.houseNumber || matched.city || matched.pinCode ? [matched.houseNumber, matched.address, matched.city, matched.pinCode].filter(Boolean).join(", ") : matched.address || "";
13396
+ if (fallback) {
13397
+ setValue("completeAddress", fallback);
13398
+ }
13399
+ }
13400
+ }, [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
13401
  const [uploadedFile, setUploadedFile] = React.useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
13301
13402
  const [file, setFile] = React.useState(null);
13302
13403
  const [fileUploadError, setFileUploadError] = React.useState(null);
@@ -13344,6 +13445,10 @@ const ConnectionDetails = _props => {
13344
13445
  if (!lodash.isEqual(formValue, part)) {
13345
13446
  let isErrorsFound = true;
13346
13447
  Object.keys(formValue).map(data => {
13448
+ var _formValue$domesticTy;
13449
+ 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)) {
13450
+ return;
13451
+ }
13347
13452
  if (!formValue[data] && isErrorsFound) {
13348
13453
  isErrorsFound = false;
13349
13454
  setIsErrors(true);
@@ -13455,12 +13560,12 @@ const ConnectionDetails = _props => {
13455
13560
  placeholder: t("Select Applicant Type")
13456
13561
  });
13457
13562
  }
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", {
13563
+ })), /*#__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
13564
  className: "check-page-link-button"
13460
13565
  }, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
13461
13566
  control: control,
13462
13567
  name: "addressType",
13463
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || "",
13568
+ defaultValue: initialAddressType || "",
13464
13569
  rules: {
13465
13570
  required: t("REQUIRED_FIELD")
13466
13571
  },
@@ -13469,7 +13574,7 @@ const ConnectionDetails = _props => {
13469
13574
  var _errors$addressType;
13470
13575
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
13471
13576
  className: "form-field",
13472
- selected: getValues("addressType"),
13577
+ selected: props.value || getValues("addressType") || initialAddressType,
13473
13578
  disable: false,
13474
13579
  option: [{
13475
13580
  i18nKey: "Permanent",
@@ -13482,7 +13587,7 @@ const ConnectionDetails = _props => {
13482
13587
  select: e => {
13483
13588
  props.onChange(e);
13484
13589
  const selectedAddress = addresses.find(a => a.type === e.code) || {};
13485
- const formattedAddress = [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ");
13590
+ const formattedAddress = selectedAddress.houseNumber || selectedAddress.city || selectedAddress.pinCode ? [selectedAddress.houseNumber, selectedAddress.address, selectedAddress.city, selectedAddress.pinCode].filter(Boolean).join(", ") : selectedAddress.address || "";
13486
13591
  setValue("completeAddress", formattedAddress);
13487
13592
  },
13488
13593
  optionKey: "i18nKey",
@@ -13494,18 +13599,21 @@ const ConnectionDetails = _props => {
13494
13599
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Complete Address")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
13495
13600
  control: control,
13496
13601
  name: "completeAddress",
13497
- defaultValue: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || "",
13602
+ defaultValue: initialCompleteAddress || "",
13498
13603
  render: props => /*#__PURE__*/React__default.createElement("div", {
13499
13604
  className: "field"
13500
13605
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
13501
13606
  className: "form-field",
13502
- value: getValues("completeAddress"),
13503
- disable: true,
13504
- disabled: true,
13505
- onChange: () => {},
13506
- style: {
13607
+ value: props.value ?? getValues("completeAddress") ?? initialCompleteAddress ?? "",
13608
+ disable: addresses.length > 0,
13609
+ disabled: addresses.length > 0,
13610
+ onChange: e => {
13611
+ props.onChange(e.target.value);
13612
+ setValue("completeAddress", e.target.value);
13613
+ },
13614
+ style: addresses.length > 0 ? {
13507
13615
  backgroundColor: "#eee"
13508
- }
13616
+ } : {}
13509
13617
  }))
13510
13618
  })))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
13511
13619
  open: showDocModal,
@@ -16917,39 +17025,53 @@ const WSActivationCommentsDetails = _ref => {
16917
17025
  };
16918
17026
 
16919
17027
  const WSActivationSupportingDocuments = _ref => {
16920
- var _formData$supportingD, _formData$supportingD2;
17028
+ 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
17029
  let {
16922
17030
  t,
16923
17031
  config,
16924
17032
  userType,
16925
17033
  formData,
16926
- onSelect
17034
+ onSelect,
17035
+ setError: setFormError,
17036
+ clearErrors: clearFormErrors,
17037
+ formState,
17038
+ errors: formErrors
16927
17039
  } = _ref;
16928
- const stateId = Digit.ULBService.getStateId();
16929
17040
  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]] : []);
17041
+ 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);
17042
+ const [documents, setDocuments] = React.useState(initialDoc !== null && initialDoc !== void 0 && initialDoc.fileStoreId ? [initialDoc] : []);
16931
17043
  const [error, setError] = React.useState(null);
16932
- const [uploadedFile, setUploadedFile] = React.useState(null);
17044
+ const [uploadedFile, setUploadedFile] = React.useState((initialDoc === null || initialDoc === void 0 ? void 0 : initialDoc.fileStoreId) || null);
16933
17045
  const [file, setFile] = React.useState(null);
16934
- const goNext = () => {
16935
- onSelect(config.key, {
16936
- documents
16937
- });
16938
- };
16939
17046
  function selectfile(e) {
16940
- setFile(e.target.files[0]);
17047
+ var _e$target$files;
17048
+ const selectedFile = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
17049
+ if (selectedFile) {
17050
+ setFile(selectedFile);
17051
+ }
16941
17052
  }
16942
17053
  React.useEffect(() => {
16943
- goNext();
16944
- }, [documents]);
17054
+ var _formData$supportingD5, _formData$supportingD6, _formData$supportingD7, _formData$supportingD8;
17055
+ 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);
17056
+ if (doc !== null && doc !== void 0 && doc.fileStoreId && !uploadedFile) {
17057
+ setUploadedFile(doc.fileStoreId);
17058
+ setDocuments([doc]);
17059
+ }
17060
+ }, [formData === null || formData === void 0 ? void 0 : formData.supportingDocuments]);
16945
17061
  React.useEffect(() => {
16946
- if (userType === "employee") {
16947
- onSelect(config.key, {
16948
- ...formData[config.key],
16949
- ...documents
16950
- });
17062
+ if (uploadedFile) {
17063
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17064
+ clearFormErrors(config.key);
17065
+ }
17066
+ } else {
17067
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17068
+ setFormError(config.key, {
17069
+ type: "required",
17070
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17071
+ });
17072
+ }
16951
17073
  }
16952
- }, [documents]);
17074
+ }, [uploadedFile, setFormError, clearFormErrors, config === null || config === void 0 ? void 0 : config.key]);
16953
17075
  React.useEffect(() => {
16954
17076
  (function () {
16955
17077
  try {
@@ -16970,7 +17092,21 @@ const WSActivationSupportingDocuments = _ref => {
16970
17092
  var _response$data, _response$data$files;
16971
17093
  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
17094
  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);
17095
+ 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;
17096
+ setUploadedFile(fsId);
17097
+ setDocuments([{
17098
+ fileStoreId: fsId,
17099
+ documentUid: fsId
17100
+ }]);
17101
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17102
+ onSelect(config.key, [{
17103
+ fileStoreId: fsId,
17104
+ documentUid: fsId
17105
+ }]);
17106
+ }
17107
+ if (clearFormErrors && config !== null && config !== void 0 && config.key) {
17108
+ clearFormErrors(config.key);
17109
+ }
16974
17110
  } else {
16975
17111
  setError(t("CS_FILE_UPLOAD_ERROR"));
16976
17112
  }
@@ -16993,27 +17129,38 @@ const WSActivationSupportingDocuments = _ref => {
16993
17129
  }
16994
17130
  })();
16995
17131
  }, [file]);
16996
- React.useEffect(() => {
16997
- if (uploadedFile) {
16998
- setDocuments(prev => {
16999
- return [{
17000
- fileStoreId: uploadedFile,
17001
- documentUid: uploadedFile
17002
- }];
17132
+ const handleDelete = () => {
17133
+ setUploadedFile(null);
17134
+ setDocuments([]);
17135
+ setFile(null);
17136
+ setError(null);
17137
+ if (onSelect && config !== null && config !== void 0 && config.key) {
17138
+ onSelect(config.key, null);
17139
+ }
17140
+ if (setFormError && config !== null && config !== void 0 && config.key) {
17141
+ setFormError(config.key, {
17142
+ type: "required",
17143
+ message: t("CORE_COMMON_REQUIRED_ERRMSG") || t("REQUIRED_FIELD") || "Required"
17003
17144
  });
17004
17145
  }
17005
- }, [uploadedFile]);
17146
+ };
17147
+ 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]));
17148
+ const errorStyle = {
17149
+ width: "100%",
17150
+ marginLeft: "0px",
17151
+ fontSize: "12px",
17152
+ marginTop: "4px"
17153
+ };
17006
17154
  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
17155
  className: "check-page-link-button"
17008
17156
  }, " *"), ":"), /*#__PURE__*/React__default.createElement("div", {
17009
17157
  className: "field"
17010
17158
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
17159
+ id: "activation-supporting-documents",
17011
17160
  onUpload: e => {
17012
17161
  selectfile(e);
17013
17162
  },
17014
- onDelete: () => {
17015
- setUploadedFile(null);
17016
- },
17163
+ onDelete: handleDelete,
17017
17164
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
17018
17165
  textStyles: {
17019
17166
  width: "100%"
@@ -17023,9 +17170,13 @@ const WSActivationSupportingDocuments = _ref => {
17023
17170
  },
17024
17171
  buttonType: "button",
17025
17172
  accept: "image/*, .pdf, .png, .jpeg, .jpg",
17026
- iserror: error,
17173
+ 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
17174
  isMandatory: true
17028
- }))));
17175
+ }), error ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
17176
+ style: errorStyle
17177
+ }, 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, {
17178
+ style: errorStyle
17179
+ }, (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
17180
  };
17030
17181
 
17031
17182
  var b = "function" === typeof Symbol && Symbol.for,
@@ -23039,7 +23190,6 @@ const WSRestorationForm = _ref => {
23039
23190
  var _data$code;
23040
23191
  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
23192
  });
23042
- console.log("disconnectionTypes", disconnectionTypes);
23043
23193
  setDisconnectionTypeList(disconnectionTypes);
23044
23194
  }, [mdmsData]);
23045
23195
  React.useEffect(() => {
@@ -23853,7 +24003,6 @@ const WSRestorationForm = _ref => {
23853
24003
  onClose: () => setError(null)
23854
24004
  }));
23855
24005
  }
23856
- console.log("applicationData", applicationData);
23857
24006
  return /*#__PURE__*/React__default.createElement("div", {
23858
24007
  style: {
23859
24008
  margin: "16px"
@@ -25640,6 +25789,7 @@ const PropertyWaterConnection = _ref => {
25640
25789
  } = reactHookForm.useForm({
25641
25790
  defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config.key]) || {
25642
25791
  useDetails: {
25792
+ categoryType: null,
25643
25793
  propertyCategory: null,
25644
25794
  propertyType: null,
25645
25795
  WaterConnectionUsageType: null,
@@ -25662,13 +25812,6 @@ const PropertyWaterConnection = _ref => {
25662
25812
  const {
25663
25813
  data: ptServicesMastersData
25664
25814
  } = 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
25815
  const {
25673
25816
  data: wsServicesMastersData
25674
25817
  } = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]);
@@ -25708,8 +25851,16 @@ const PropertyWaterConnection = _ref => {
25708
25851
  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
25852
  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
25853
  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);
25854
+ 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";
25855
+ const isDwellingUnit = isResidential;
25856
+ React.useEffect(() => {
25857
+ if (!isDwellingUnit) {
25858
+ setValue("useDetails.NumberofDwellingUnits", "");
25859
+ if (clearErrors) {
25860
+ clearErrors("useDetails.NumberofDwellingUnits");
25861
+ }
25862
+ }
25863
+ }, [isDwellingUnit]);
25713
25864
  const yearOptions = React.useMemo(() => {
25714
25865
  const currentYear = new Date().getFullYear();
25715
25866
  const years = [];
@@ -25721,25 +25872,27 @@ const PropertyWaterConnection = _ref => {
25721
25872
  }
25722
25873
  return years;
25723
25874
  }, []);
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
25875
  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;
25876
+ var _ptServicesMastersDat;
25877
+ const fromMdms = ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : _ptServicesMastersDat.PropertyType2;
25735
25878
  if (Array.isArray(fromMdms) && fromMdms.length > 0) {
25736
25879
  return fromMdms;
25737
25880
  }
25738
25881
  return [];
25739
25882
  }, [ptServicesMastersData]);
25883
+ const categoryOptions = React.useMemo(() => {
25884
+ var _ptServicesMastersDat2;
25885
+ 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) || [];
25886
+ const uniqueCats = [...new Set(list.map(item => item.propertyCategory).filter(Boolean))];
25887
+ return uniqueCats.map(cat => ({
25888
+ code: cat,
25889
+ name: cat,
25890
+ i18nKey: cat
25891
+ }));
25892
+ }, [propertyType2List, ptServicesMastersData]);
25740
25893
  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) || [];
25894
+ var _ptServicesMastersDat3;
25895
+ 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
25896
  return list.filter(item => item.active !== false).map(item => ({
25744
25897
  ...item,
25745
25898
  code: item.code,
@@ -25748,8 +25901,8 @@ const PropertyWaterConnection = _ref => {
25748
25901
  }));
25749
25902
  }, [propertyType2List, ptServicesMastersData]);
25750
25903
  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) || [];
25904
+ var _ptServicesMastersDat4;
25905
+ 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
25906
  const uniqueTypes = [...new Set(list.map(item => item.waterConnectionUsageType).filter(Boolean))];
25754
25907
  const typesToMap = uniqueTypes.length > 0 ? uniqueTypes : ["Normal", "Bulk"];
25755
25908
  return typesToMap.map(type => ({
@@ -25758,42 +25911,118 @@ const PropertyWaterConnection = _ref => {
25758
25911
  value: type
25759
25912
  }));
25760
25913
  }, [propertyType2List, ptServicesMastersData]);
25914
+ const availableCategoryOptions = React.useMemo(() => {
25915
+ var _ptServicesMastersDat5;
25916
+ const propType = watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code ? watchPropertyType : null;
25917
+ if (!propType) {
25918
+ return categoryTypeList;
25919
+ }
25920
+ 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) || [];
25921
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propType.code)) || propType;
25922
+ let rawCats = matched === null || matched === void 0 ? void 0 : matched.categoryType;
25923
+ if (!rawCats) return categoryTypeList;
25924
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25925
+ 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);
25926
+ if (rawCats.length === 0) return categoryTypeList;
25927
+ const normalizedAllowed = rawCats.map(c => normalizeCode(c));
25928
+ const matchedOptions = categoryTypeList.filter(item => normalizedAllowed.includes(normalizeCode(item.code)) || normalizedAllowed.includes(normalizeCode(item.name)));
25929
+ if (matchedOptions.length > 0) {
25930
+ return matchedOptions;
25931
+ }
25932
+ return rawCats.map(catStr => {
25933
+ const isDomestic = normalizeCode(catStr) === "DOMESTIC";
25934
+ const isNonDomestic = normalizeCode(catStr) === "NONDOMESTIC";
25935
+ const code = isDomestic ? "DOMESTIC" : isNonDomestic ? "NON_DOMESTIC" : String(catStr).toUpperCase();
25936
+ const name = isDomestic ? "Domestic" : isNonDomestic ? "Non-Domestic" : String(catStr);
25937
+ return {
25938
+ code,
25939
+ name,
25940
+ i18nKey: t && t(`WS_CATEGORY_${code}`) !== `WS_CATEGORY_${code}` ? `WS_CATEGORY_${code}` : name
25941
+ };
25942
+ });
25943
+ }, [watchPropertyType, propertyType2List, ptServicesMastersData, categoryTypeList, t]);
25944
+ const autoFillFromPropertyType = React__default.useCallback(propTypeItem => {
25945
+ var _ptServicesMastersDat6;
25946
+ if (!(propTypeItem !== null && propTypeItem !== void 0 && propTypeItem.code)) return;
25947
+ 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) || [];
25948
+ const matched = list.find(item => normalizeCode(item.code) === normalizeCode(propTypeItem.code)) || propTypeItem;
25949
+ console.log("[PropertyWaterConnection] Property Type selected:", matched === null || matched === void 0 ? void 0 : matched.code);
25950
+ console.log("[PropertyWaterConnection] Matched item from MDMS:", matched);
25951
+ if (matched !== null && matched !== void 0 && matched.categoryType) {
25952
+ let rawCats = matched.categoryType;
25953
+ if (!Array.isArray(rawCats)) rawCats = [rawCats];
25954
+ 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);
25955
+ const hasDomestic = rawCats.some(c => normalizeCode(c) === "DOMESTIC");
25956
+ const hasNonDomestic = rawCats.some(c => normalizeCode(c) === "NONDOMESTIC");
25957
+ let targetCat = null;
25958
+ if (hasDomestic) {
25959
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "DOMESTIC" || normalizeCode(c.name) === "DOMESTIC") || {
25960
+ code: "DOMESTIC",
25961
+ name: "Domestic",
25962
+ i18nKey: t && t("WS_CATEGORY_DOMESTIC") !== "WS_CATEGORY_DOMESTIC" ? "WS_CATEGORY_DOMESTIC" : "Domestic"
25963
+ };
25964
+ } else if (hasNonDomestic) {
25965
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === "NONDOMESTIC" || normalizeCode(c.name) === "NONDOMESTIC") || {
25966
+ code: "NON_DOMESTIC",
25967
+ name: "Non-Domestic",
25968
+ i18nKey: t && t("WS_CATEGORY_NON_DOMESTIC") !== "WS_CATEGORY_NON_DOMESTIC" ? "WS_CATEGORY_NON_DOMESTIC" : "Non-Domestic"
25969
+ };
25970
+ } else if (rawCats.length > 0) {
25971
+ const firstNorm = normalizeCode(rawCats[0]);
25972
+ targetCat = categoryTypeList.find(c => normalizeCode(c.code) === firstNorm || normalizeCode(c.name) === firstNorm) || {
25973
+ code: rawCats[0].toUpperCase(),
25974
+ name: rawCats[0],
25975
+ i18nKey: t && t(`WS_CATEGORY_${rawCats[0]}`) !== `WS_CATEGORY_${rawCats[0]}` ? `WS_CATEGORY_${rawCats[0]}` : rawCats[0]
25976
+ };
25977
+ }
25978
+ if (targetCat) {
25979
+ setValue("useDetails.categoryType", targetCat, {
25980
+ shouldValidate: true,
25981
+ shouldDirty: true
25982
+ });
25983
+ if (clearErrors) clearErrors("useDetails.categoryType");
25984
+ }
25985
+ }
25986
+ if (matched !== null && matched !== void 0 && matched.propertyCategory) {
25987
+ const foundPropCat = categoryOptions.find(c => normalizeCode(c.code) === normalizeCode(matched.propertyCategory) || normalizeCode(c.name) === normalizeCode(matched.propertyCategory)) || {
25988
+ code: matched.propertyCategory,
25989
+ name: matched.propertyCategory,
25990
+ i18nKey: matched.propertyCategory
25991
+ };
25992
+ setValue("useDetails.propertyCategory", foundPropCat, {
25993
+ shouldValidate: true,
25994
+ shouldDirty: true
25995
+ });
25996
+ if (clearErrors) clearErrors("useDetails.propertyCategory");
25997
+ }
25998
+ if (matched !== null && matched !== void 0 && matched.waterConnectionUsageType) {
25999
+ const foundUsage = usageTypeOptions.find(u => normalizeCode(u.code) === normalizeCode(matched.waterConnectionUsageType) || normalizeCode(u.name) === normalizeCode(matched.waterConnectionUsageType)) || {
26000
+ code: matched.waterConnectionUsageType,
26001
+ name: matched.waterConnectionUsageType,
26002
+ value: matched.waterConnectionUsageType
26003
+ };
26004
+ setValue("useDetails.WaterConnectionUsageType", foundUsage, {
26005
+ shouldValidate: true,
26006
+ shouldDirty: true
26007
+ });
26008
+ if (clearErrors) clearErrors("useDetails.WaterConnectionUsageType");
26009
+ }
26010
+ }, [propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue, clearErrors, t]);
25761
26011
  const prevPropertyTypeCode = React__default.useRef(null);
25762
26012
  React.useEffect(() => {
25763
- var _ptServicesMastersDat8;
25764
26013
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) {
25765
26014
  prevPropertyTypeCode.current = null;
25766
26015
  return;
25767
26016
  }
25768
26017
  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
- }
26018
+ if (isNewType) {
26019
+ prevPropertyTypeCode.current = watchPropertyType.code;
26020
+ autoFillFromPropertyType(watchPropertyType);
25792
26021
  }
25793
- }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, propertyType2List, ptServicesMastersData, categoryTypeList, categoryOptions, usageTypeOptions, setValue]);
26022
+ }, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
25794
26023
  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 => ({
26024
+ var _ptServicesMastersDat7, _ptServicesMastersDat8;
26025
+ return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : (_ptServicesMastersDat8 = _ptServicesMastersDat7.NoOfFloors) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.filter(item => item.active).map(item => ({
25797
26026
  code: item.code,
25798
26027
  name: item.name
25799
26028
  }));
@@ -25802,25 +26031,14 @@ const PropertyWaterConnection = _ref => {
25802
26031
  if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
25803
26032
  let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
25804
26033
  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) || [];
26034
+ var _ptServicesMastersDat9;
26035
+ const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat9 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat9 === void 0 ? void 0 : _ptServicesMastersDat9.PropertyType) || [];
25807
26036
  const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
25808
26037
  qList = matched === null || matched === void 0 ? void 0 : matched.questions;
25809
26038
  }
25810
26039
  if (!qList || !Array.isArray(qList)) return [];
25811
26040
  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
26041
  }, [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
26042
  const [questionAnswers, setQuestionAnswers] = React.useState(() => {
25825
26043
  var _formData$config$key, _formData$config$key$, _formData$config$key2, _formData$config$key3, _formData$config$key4;
25826
26044
  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 +26074,12 @@ const PropertyWaterConnection = _ref => {
25856
26074
  return updated;
25857
26075
  });
25858
26076
  };
26077
+ const prevQuestionsRef = React__default.useRef(null);
25859
26078
  React.useEffect(() => {
25860
- setValue("useDetails.questions", questionAnswers);
25861
- console.log("[PropertyWaterConnection] Current questions:", questionAnswers);
26079
+ if (!lodash.isEqual(prevQuestionsRef.current, questionAnswers)) {
26080
+ prevQuestionsRef.current = lodash.cloneDeep(questionAnswers);
26081
+ setValue("useDetails.questions", questionAnswers);
26082
+ }
25862
26083
  }, [questionAnswers, setValue]);
25863
26084
  const lastSentValue = React__default.useRef(null);
25864
26085
  React.useEffect(() => {
@@ -25880,23 +26101,27 @@ const PropertyWaterConnection = _ref => {
25880
26101
  if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
25881
26102
  if (!categoryTypeList.length || !ptServicesMastersData) return;
25882
26103
  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;
26104
+ var _ptServicesMastersDat0, _ptServicesMastersDat1, _ptServicesMastersDat10, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
25884
26105
  const details = formData.cpt.details;
25885
26106
  const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
25886
26107
  const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
25887
26108
  const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
25888
26109
  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));
26110
+ 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 : (_ptServicesMastersDat0 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat0 === void 0 ? void 0 : (_ptServicesMastersDat1 = _ptServicesMastersDat0.PropertyCategory) === null || _ptServicesMastersDat1 === void 0 ? void 0 : _ptServicesMastersDat1.find(o => normalizeCode(o.code) === normalizeCode(usageCategory)));
25890
26111
  setValue("useDetails.propertyCategory", propCategoryMatch ? {
25891
26112
  code: propCategoryMatch.code,
25892
26113
  name: propCategoryMatch.name
26114
+ } : usageCategory ? {
26115
+ code: usageCategory,
26116
+ name: usageCategory
25893
26117
  } : 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) || [];
26118
+ const propTypeList = (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) || [];
25895
26119
  const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
25896
26120
  setValue("useDetails.propertyType", propTypeMatch ? {
25897
26121
  code: propTypeMatch.code,
25898
26122
  name: propTypeMatch.name
25899
26123
  } : null);
26124
+ prevPropertyTypeCode.current = (propTypeMatch === null || propTypeMatch === void 0 ? void 0 : propTypeMatch.code) || null;
25900
26125
  const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
25901
26126
  const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
25902
26127
  setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
@@ -25984,7 +26209,11 @@ const PropertyWaterConnection = _ref => {
25984
26209
  option: propertyTypeOptions,
25985
26210
  optionKey: "name",
25986
26211
  selected: props.value,
25987
- select: props.onChange,
26212
+ select: selected => {
26213
+ props.onChange(selected);
26214
+ prevPropertyTypeCode.current = selected === null || selected === void 0 ? void 0 : selected.code;
26215
+ autoFillFromPropertyType(selected);
26216
+ },
25988
26217
  t: t,
25989
26218
  onBlur: props.onBlur,
25990
26219
  disable: isPropertyFound,
@@ -26003,7 +26232,7 @@ const PropertyWaterConnection = _ref => {
26003
26232
  required: t("REQUIRED_FIELD")
26004
26233
  },
26005
26234
  render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
26006
- option: categoryTypeList,
26235
+ option: availableCategoryOptions,
26007
26236
  optionKey: "i18nKey",
26008
26237
  selected: props.value,
26009
26238
  select: props.onChange,
@@ -26190,7 +26419,7 @@ const PropertyWaterConnection = _ref => {
26190
26419
  value: NUMBER_PATTERN$1,
26191
26420
  message: t("ERR_INVALID_NUMBER")
26192
26421
  },
26193
- required: t("REQUIRED_FIELD")
26422
+ required: isDwellingUnit ? t("REQUIRED_FIELD") : false
26194
26423
  }),
26195
26424
  name: "useDetails.NumberofDwellingUnits",
26196
26425
  disabled: isPropertyFound,
@@ -29147,7 +29376,11 @@ const WSCard = () => {
29147
29376
  count: isWSInboxLoading ? "-" : wsData === null || wsData === void 0 ? void 0 : wsData.totalCount,
29148
29377
  label: t("WATER_INBOX"),
29149
29378
  link: `/digit-ui/employee/ws/water/inbox`,
29150
- roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
29379
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK"]
29380
+ }, {
29381
+ label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
29382
+ link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
29383
+ roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
29151
29384
  }, ...links, {
29152
29385
  label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
29153
29386
  link: `/digit-ui/employee/ws/water/search-connection`,
@@ -33217,7 +33450,7 @@ const Rebate_menu = [{
33217
33450
  value: "Others"
33218
33451
  }];
33219
33452
  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;
33453
+ 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
33454
  let {
33222
33455
  wsAdditionalDetails,
33223
33456
  workflowDetails,
@@ -33230,27 +33463,30 @@ const WSFeeEstimation = _ref => {
33230
33463
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_ADD_REBATE_DATA", {});
33231
33464
  const [sessionBillFormData, setSessionBillFormData, clearBillSessionFormData] = Digit.Hooks.useSessionStorage("ADHOC_BILL_ADD_REBATE_DATA", {});
33232
33465
  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);
33466
+ 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) || [];
33467
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data0 = workflowDetails.data) === null || _workflowDetails$data0 === void 0 ? void 0 : _workflowDetails$data0.timeline) || [];
33468
+ 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
33469
  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;
33470
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
33471
+ 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";
33472
+ }) || 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");
33473
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
33474
+ 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";
33475
+ 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";
33476
+ 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
33477
  const [popup, showPopUp] = React.useState(false);
33242
33478
  const [fields, setFields] = React.useState(sessionFormData ? sessionFormData : {});
33243
33479
  const [showToast, setShowToast] = React.useState(null);
33244
33480
  const [billDetails, setBillDetails] = React.useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
33245
33481
  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) || "";
33482
+ 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";
33483
+ 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) || "";
33484
+ 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) || "";
33485
+ 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
33486
  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);
33487
+ 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
33488
  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);
33489
+ 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
33490
  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
33491
  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
33492
  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 +33499,9 @@ const WSFeeEstimation = _ref => {
33263
33499
  data: mdmsRes
33264
33500
  } = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
33265
33501
  React.useEffect(() => {
33266
- var _wsAdditionalDetails$16, _wsAdditionalDetails$17, _sessionFormData$bill;
33502
+ var _wsAdditionalDetails$19, _wsAdditionalDetails$20, _sessionFormData$bill;
33267
33503
  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)
33504
+ ...(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
33505
  };
33270
33506
  if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
33271
33507
  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 +33555,8 @@ const WSFeeEstimation = _ref => {
33319
33555
  const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
33320
33556
  const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
33321
33557
  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;
33558
+ var _wsAdditionalDetails$21, _wsAdditionalDetails$22;
33559
+ 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
33560
  if (rebateAmount > totalAmount) {
33325
33561
  setShowToast({
33326
33562
  isError: false,
@@ -33329,16 +33565,16 @@ const WSFeeEstimation = _ref => {
33329
33565
  message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
33330
33566
  });
33331
33567
  } 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;
33568
+ var _wsAdditionalDetails$27, _wsAdditionalDetails$28, _wsAdditionalDetails$29, _wsAdditionalDetails$30, _wsAdditionalDetails$31, _wsAdditionalDetails$32, _wsAdditionalDetails$33, _wsAdditionalDetails$34, _wsAdditionalDetails$35, _wsAdditionalDetails$36;
33569
+ 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;
33570
+ 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
33571
  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),
33572
+ ...(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
33573
  ...fields
33338
33574
  };
33339
33575
  wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
33340
33576
  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" ? [{
33577
+ 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
33578
  applicationNo: applicationNo,
33343
33579
  tenantId: tenantId,
33344
33580
  waterConnection: wsAdditionalDetails.additionalDetails.appDetails
@@ -33349,7 +33585,7 @@ const WSFeeEstimation = _ref => {
33349
33585
  }],
33350
33586
  isconnectionCalculation: false
33351
33587
  };
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";
33588
+ 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
33589
  Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
33354
33590
  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
33591
  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 +34291,11 @@ const ViewBreakup = _ref => {
34055
34291
  }))))));
34056
34292
  };
34057
34293
 
34058
- const checkForNA$1 = value => {
34294
+ const checkForNA$2 = value => {
34059
34295
  return value ? value : "CS_NA";
34060
34296
  };
34061
34297
  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;
34298
+ 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
34299
  const getDisconnectionNoticeSearch = function () {
34064
34300
  try {
34065
34301
  var _data$WaterConnection190, _data$WaterConnection191, _data$SewerageConnect182, _data$SewerageConnect183;
@@ -34105,6 +34341,75 @@ const WSApplicationDetails = () => {
34105
34341
  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
34342
  const [showOptions, setShowOptions] = React.useState(false);
34107
34343
  const [viewTimeline, setViewTimeline] = React.useState(false);
34344
+ const [showDocModal, setShowDocModal] = React.useState(false);
34345
+ const [docFileUrl, setDocFileUrl] = React.useState(null);
34346
+ const [docFileType, setDocFileType] = React.useState("image");
34347
+ const handleViewEmployeeDoc = function (fileStoreId) {
34348
+ try {
34349
+ let _exit = false;
34350
+ function _temp3(_result) {
34351
+ if (_exit) return _result;
34352
+ const _temp = _catch(function () {
34353
+ return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
34354
+ if (res !== null && res !== void 0 && res.data) {
34355
+ var _res$headers, _res$headers2, _res$headers3, _res$headers4;
34356
+ const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
34357
+ 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"
34358
+ });
34359
+ const fileURL = URL.createObjectURL(blob);
34360
+ setDocFileUrl(fileURL);
34361
+ 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"]) || "";
34362
+ if (contentType.toLowerCase().includes("pdf")) {
34363
+ setDocFileType("pdf");
34364
+ } else {
34365
+ setDocFileType("image");
34366
+ }
34367
+ setShowDocModal(true);
34368
+ }
34369
+ });
34370
+ }, function (err) {
34371
+ console.error("Failed to fetch file URL via FileFetchbyid", err);
34372
+ });
34373
+ if (_temp && _temp.then) return _temp.then(function () {});
34374
+ }
34375
+ if (!fileStoreId) return Promise.resolve();
34376
+ const _temp2 = _catch(function () {
34377
+ return Promise.resolve(Digit.UploadServices.Filefetch([fileStoreId], (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId())).then(function (response) {
34378
+ var _response$data, _response$data$fileSt, _response$data$fileSt2, _response$data2;
34379
+ 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]) || "";
34380
+ let fileURL = "";
34381
+ if (rawUrl && typeof rawUrl === "string") {
34382
+ const linkList = rawUrl.split(",");
34383
+ linkList.forEach(link => {
34384
+ const trimmed = link ? link.trim() : "";
34385
+ if (trimmed && !trimmed.includes("large") && !trimmed.includes("medium") && !trimmed.includes("small")) {
34386
+ fileURL = trimmed;
34387
+ }
34388
+ });
34389
+ if (!fileURL && linkList[0]) {
34390
+ fileURL = linkList[0].trim();
34391
+ }
34392
+ }
34393
+ if (fileURL) {
34394
+ setDocFileUrl(fileURL);
34395
+ const lowerUrl = fileURL.toLowerCase();
34396
+ if (lowerUrl.includes(".pdf")) {
34397
+ setDocFileType("pdf");
34398
+ } else {
34399
+ setDocFileType("image");
34400
+ }
34401
+ setShowDocModal(true);
34402
+ _exit = true;
34403
+ }
34404
+ });
34405
+ }, function (e) {
34406
+ console.warn("Filefetch failed, falling back to FileFetchbyid", e);
34407
+ });
34408
+ return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2));
34409
+ } catch (e) {
34410
+ return Promise.reject(e);
34411
+ }
34412
+ };
34108
34413
  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
34414
  let filter1 = {
34110
34415
  tenantId: tenantId,
@@ -34245,7 +34550,7 @@ const WSApplicationDetails = () => {
34245
34550
  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
34551
  })).then(function (payments) {
34247
34552
  var _payments$Payments$;
34248
- function _temp2() {
34553
+ function _temp5() {
34249
34554
  return Promise.resolve(Digit.PaymentService.printReciept(state, {
34250
34555
  fileStoreIds: response.filestoreIds[0]
34251
34556
  })).then(function (fileStore) {
@@ -34255,7 +34560,7 @@ const WSApplicationDetails = () => {
34255
34560
  let response = {
34256
34561
  filestoreIds: [(_payments$Payments$ = payments.Payments[0]) === null || _payments$Payments$ === void 0 ? void 0 : _payments$Payments$.fileStoreId]
34257
34562
  };
34258
- const _temp = function (_payments$Payments$2) {
34563
+ const _temp4 = function (_payments$Payments$2) {
34259
34564
  if (!((_payments$Payments$2 = payments.Payments[0]) !== null && _payments$Payments$2 !== void 0 && _payments$Payments$2.fileStoreId)) {
34260
34565
  return Promise.resolve(Digit.PaymentService.generatePdf(state, {
34261
34566
  Payments: payments.Payments
@@ -34264,7 +34569,7 @@ const WSApplicationDetails = () => {
34264
34569
  });
34265
34570
  }
34266
34571
  }();
34267
- return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
34572
+ return _temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4);
34268
34573
  });
34269
34574
  } catch (e) {
34270
34575
  return Promise.reject(e);
@@ -34477,22 +34782,28 @@ const WSApplicationDetails = () => {
34477
34782
  }
34478
34783
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34479
34784
  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"))}`
34785
+ 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
34786
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34482
34787
  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)))}`
34788
+ 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)))}`
34789
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34790
+ label: t("WS_Billing_Address_Type"),
34791
+ 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)))}`
34792
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34793
+ label: t("Complete Address"),
34794
+ 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
34795
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34485
34796
  label: t("WS_DIVYANGJAN"),
34486
34797
  text: `${connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34487
34798
  }), (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
34799
  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)))}`
34800
+ 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
34801
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34491
34802
  label: t("WS_ORGANIZATION_DEPARTMENT_NAME"),
34492
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
34803
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.institutionName))}`
34493
34804
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34494
34805
  label: t("WS_NATURE_OF_WORK"),
34495
- text: `${t(checkForNA$1(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
34806
+ text: `${t(checkForNA$2(connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.natureOfWork))}`
34496
34807
  }))), (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
34808
  styles: {
34498
34809
  fontSize: "28px"
@@ -34645,58 +34956,58 @@ const WSApplicationDetails = () => {
34645
34956
  }
34646
34957
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34647
34958
  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)))}`
34959
+ 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
34960
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34650
34961
  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)))}`
34962
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
34652
34963
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34653
34964
  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)))}`
34965
+ 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
34966
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34656
34967
  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)))}`
34968
+ 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
34969
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34659
34970
  label: t("COMMON_COLONY_MCD_CATEGORY"),
34660
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
34971
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.colonyMcdCategory))}`
34661
34972
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34662
34973
  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)))}`
34974
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.streetName) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34664
34975
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34665
34976
  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)))}`
34977
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine1) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.street)))}`
34667
34978
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34668
34979
  label: t("ADDRESS_LINE2"),
34669
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
34980
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.addressLine2))}`
34670
34981
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34671
34982
  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)))}`
34983
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.houseNo) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.doorNo)))}`
34673
34984
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34674
34985
  label: t("LATITUDE_GEOTAG"),
34675
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
34986
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.latitude))}`
34676
34987
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34677
34988
  label: t("LONGITUDE_GEOTAG"),
34678
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
34989
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
34679
34990
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34680
34991
  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)))}`
34992
+ 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
34993
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34683
34994
  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)))}`
34995
+ 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
34996
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34686
34997
  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)))}`
34998
+ 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
34999
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34689
35000
  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)))}`
35001
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
34691
35002
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34692
35003
  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)))}`
35004
+ text: `${t(checkForNA$2((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
34694
35005
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34695
35006
  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)))}`
35007
+ 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
35008
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34698
35009
  label: t("LANDMARK"),
34699
- text: `${t(checkForNA$1(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
35010
+ text: `${t(checkForNA$2(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
34700
35011
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34701
35012
  styles: {
34702
35013
  fontSize: "28px"
@@ -34708,35 +35019,46 @@ const WSApplicationDetails = () => {
34708
35019
  }
34709
35020
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34710
35021
  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)))}`
35022
+ 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
35023
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34713
35024
  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)))}`
35025
+ 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
35026
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34716
35027
  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)))}`
35028
+ 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
35029
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34719
35030
  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)))}`
35031
+ 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
35032
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34722
35033
  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)))}`
35034
+ 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
35035
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34725
35036
  label: t("WS_PLOT_AREA"),
34726
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
35037
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
34727
35038
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34728
35039
  label: t("WS_BUILT_UP_AREA"),
34729
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
35040
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
34730
35041
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34731
35042
  label: t("WS_HEIGHT_OF_THE_BUILDING"),
34732
- text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
35043
+ text: `${t(checkForNA$2(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
34733
35044
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34734
35045
  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, {
35046
+ 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)))}`
35047
+ }), 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
35048
  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, {
35049
+ text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
35050
+ }) : 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) => {
35051
+ var _q$answer, _q$answer2, _q$answer3;
35052
+ 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}`;
35053
+ 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;
35054
+ const trimmedQ = String(qText || "").trim();
35055
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
35056
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35057
+ key: `question_${idx}`,
35058
+ label: displayLabel,
35059
+ text: `${t(checkForNA$2(aText))}`
35060
+ });
35061
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
34740
35062
  styles: {
34741
35063
  fontSize: "28px"
34742
35064
  }
@@ -34750,10 +35072,10 @@ const WSApplicationDetails = () => {
34750
35072
  text: `${djbEmployee !== null && djbEmployee !== void 0 && djbEmployee.isDjbEmployee ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
34751
35073
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.isDjbEmployee) && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34752
35074
  label: t("WS_EMPLOYEE_ID"),
34753
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
35075
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
34754
35076
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34755
35077
  label: t("WS_EMPLOYEE_DESIGNATION"),
34756
- text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
35078
+ text: `${t(checkForNA$2(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
34757
35079
  }), !isDisconnectionExecuted && (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
34758
35080
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
34759
35081
  text: /*#__PURE__*/React__default.createElement("span", {
@@ -34764,7 +35086,7 @@ const WSApplicationDetails = () => {
34764
35086
  cursor: "pointer",
34765
35087
  color: "#f47738"
34766
35088
  },
34767
- onClick: () => getFiles([djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document], tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])
35089
+ onClick: () => handleViewEmployeeDoc(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document)
34768
35090
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.GenericFileIcon, null), " ", t("CS_COMMON_VIEW"))
34769
35091
  }))), (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
35092
  styles: {
@@ -34832,27 +35154,27 @@ const WSApplicationDetails = () => {
34832
35154
  style: {
34833
35155
  padding: "12px 8px"
34834
35156
  }
34835
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React__default.createElement("td", {
35157
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React__default.createElement("td", {
34836
35158
  style: {
34837
35159
  padding: "12px 8px"
34838
35160
  }
34839
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React__default.createElement("td", {
35161
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React__default.createElement("td", {
34840
35162
  style: {
34841
35163
  padding: "12px 8px"
34842
35164
  }
34843
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React__default.createElement("td", {
35165
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React__default.createElement("td", {
34844
35166
  style: {
34845
35167
  padding: "12px 8px"
34846
35168
  }
34847
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React__default.createElement("td", {
35169
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React__default.createElement("td", {
34848
35170
  style: {
34849
35171
  padding: "12px 8px"
34850
35172
  }
34851
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React__default.createElement("td", {
35173
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React__default.createElement("td", {
34852
35174
  style: {
34853
35175
  padding: "12px 8px"
34854
35176
  }
34855
- }, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React__default.createElement("td", {
35177
+ }, checkForNA$2(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React__default.createElement("td", {
34856
35178
  style: {
34857
35179
  padding: "12px 8px"
34858
35180
  }
@@ -35028,7 +35350,59 @@ const WSApplicationDetails = () => {
35028
35350
  }
35029
35351
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
35030
35352
  label: t("WS_ACTIVATE_CONNECTION")
35031
- })) : null)))));
35353
+ })) : null)))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
35354
+ open: showDocModal,
35355
+ headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
35356
+ headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
35357
+ onClick: () => setShowDocModal(false),
35358
+ style: {
35359
+ cursor: "pointer",
35360
+ padding: "5px"
35361
+ }
35362
+ }, /*#__PURE__*/React__default.createElement("svg", {
35363
+ xmlns: "http://www.w3.org/2000/svg",
35364
+ viewBox: "0 0 24 24",
35365
+ fill: "#505A5F",
35366
+ width: "24",
35367
+ height: "24"
35368
+ }, /*#__PURE__*/React__default.createElement("path", {
35369
+ d: "M0 0h24v24H0V0z",
35370
+ fill: "none"
35371
+ }), /*#__PURE__*/React__default.createElement("path", {
35372
+ 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"
35373
+ }))),
35374
+ actionCancelOnSubmit: () => setShowDocModal(false),
35375
+ actionCancelLabel: t("CS_COMMON_CLOSE") || "Close",
35376
+ actionSaveOnSubmit: () => window.open(docFileUrl, "_blank"),
35377
+ actionSaveLabel: t("CS_COMMON_OPEN_IN_NEW_TAB") || "Open Full",
35378
+ hideSubmit: !docFileUrl,
35379
+ width: "800px"
35380
+ }, /*#__PURE__*/React__default.createElement("div", {
35381
+ style: {
35382
+ display: "flex",
35383
+ justifyContent: "center",
35384
+ alignItems: "center",
35385
+ padding: "20px",
35386
+ minHeight: "300px"
35387
+ }
35388
+ }, docFileType === "pdf" ? /*#__PURE__*/React__default.createElement("iframe", {
35389
+ src: docFileUrl,
35390
+ title: "Document Preview",
35391
+ width: "100%",
35392
+ height: "500px",
35393
+ style: {
35394
+ border: "none"
35395
+ }
35396
+ }) : /*#__PURE__*/React__default.createElement("img", {
35397
+ src: docFileUrl,
35398
+ alt: "Document Preview",
35399
+ style: {
35400
+ maxWidth: "100%",
35401
+ maxHeight: "500px",
35402
+ objectFit: "contain",
35403
+ borderRadius: "4px"
35404
+ }
35405
+ }))));
35032
35406
  };
35033
35407
 
35034
35408
  const WSAdditionalDetails = () => {
@@ -35391,7 +35765,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
35391
35765
  };
35392
35766
 
35393
35767
  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;
35768
+ 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
35769
  const {
35396
35770
  t
35397
35771
  } = reactI18next.useTranslation();
@@ -35609,8 +35983,6 @@ const ConnectionDetails$5 = () => {
35609
35983
  }
35610
35984
  };
35611
35985
  const getRestorationButton = () => {
35612
- console.log("getRestorationButton", data, !(data !== null && data !== void 0 && data.checkWorkFlow));
35613
- console.log("Payment", paymentDetails);
35614
35986
  if (!(data !== null && data !== void 0 && data.checkWorkFlow)) {
35615
35987
  setshowActionToast({
35616
35988
  key: "error",
@@ -35622,7 +35994,6 @@ const ConnectionDetails$5 = () => {
35622
35994
  } else {
35623
35995
  var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
35624
35996
  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
35997
  let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
35627
35998
  Digit.SessionStorage.set("WS_DISCONNECTION", {
35628
35999
  ...state,
@@ -35916,16 +36287,28 @@ const ConnectionDetails$5 = () => {
35916
36287
  className: "border-none",
35917
36288
  label: t("WS_NO_OF_FLOORS"),
35918
36289
  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, {
36290
+ }), 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
36291
  className: "border-none",
35921
36292
  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"
36293
+ 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
36294
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
35924
36295
  className: "border-none",
35925
36296
  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"
36297
+ text: ((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : _state43$additionalDe.locality) || "NA"
36298
+ }), (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) => {
36299
+ var _q$answer, _q$answer2, _q$answer3;
36300
+ 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}`;
36301
+ 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;
36302
+ const trimmedQ = String(qText || "").trim();
36303
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
36304
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
36305
+ key: `question_${idx}`,
36306
+ className: "border-none",
36307
+ label: displayLabel,
36308
+ text: `${t(checkForNA(aText))}`
36309
+ });
35927
36310
  }), /*#__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}`
36311
+ 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
36312
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
35930
36313
  style: {
35931
36314
  textAlign: "left",
@@ -35937,10 +36320,10 @@ const ConnectionDetails$5 = () => {
35937
36320
  styles: {
35938
36321
  fontSize: "28px"
35939
36322
  }
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, {
36323
+ }, 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
36324
  className: "border-none",
35942
36325
  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,
36326
+ 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
36327
  textStyle: {
35945
36328
  whiteSpace: "pre"
35946
36329
  }
@@ -36059,15 +36442,15 @@ const ConnectionDetails$5 = () => {
36059
36442
  isArray: false
36060
36443
  }
36061
36444
  }
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;
36445
+ }))) : /*#__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) => {
36446
+ var _doc$documentType, _state54, _state55;
36064
36447
  return /*#__PURE__*/React__default.createElement("div", {
36065
36448
  key: `doc-${index}`
36066
36449
  }, /*#__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,
36450
+ value: (_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.documents,
36068
36451
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
36069
36452
  index: index
36070
- }), ((_state48 = state) === null || _state48 === void 0 ? void 0 : _state48.documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
36453
+ }), ((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
36071
36454
  style: {
36072
36455
  color: "#cccccc",
36073
36456
  backgroundColor: "#cccccc",
@@ -36076,7 +36459,7 @@ const ConnectionDetails$5 = () => {
36076
36459
  marginBottom: "20px"
36077
36460
  }
36078
36461
  }) : 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", {
36462
+ })), ((_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
36463
  style: {
36081
36464
  display: "flex",
36082
36465
  justifyContent: "flex-end",
@@ -36109,8 +36492,8 @@ const ConnectionDetails$5 = () => {
36109
36492
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
36110
36493
  hideSubmit: true,
36111
36494
  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`);
36495
+ var _state59, _state60;
36496
+ 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
36497
  setshowModal(false);
36115
36498
  },
36116
36499
  popupStyles: mobileView ? {
@@ -36991,7 +37374,7 @@ const getPath$3 = (path, params) => {
36991
37374
  };
36992
37375
  const getEditDetails = (waterResult, sewerageresult, t) => {
36993
37376
  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;
37377
+ 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
37378
  waterResult.ConnectionHolderDetails = waterResult !== null && waterResult !== void 0 && waterResult.connectionHolders ? [{
36996
37379
  ...(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$connecti = waterResult.connectionHolders) === null || _waterResult$connecti === void 0 ? void 0 : _waterResult$connecti[0]),
36997
37380
  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 +37457,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37074
37457
  },
37075
37458
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37076
37459
  };
37460
+ 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);
37461
+ const addressTypeObj = typeof rawAddressType === "object" && rawAddressType !== null && rawAddressType !== void 0 && rawAddressType.code ? rawAddressType : String(rawAddressType).toUpperCase() === "PERMANENT" ? {
37462
+ i18nKey: "Permanent",
37463
+ code: "PERMANENT"
37464
+ } : String(rawAddressType).toUpperCase() === "CORRESPONDENCE" ? {
37465
+ i18nKey: "Correspondence",
37466
+ code: "CORRESPONDENCE"
37467
+ } : rawAddressType ? {
37468
+ i18nKey: rawAddressType,
37469
+ code: rawAddressType
37470
+ } : null;
37471
+ 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
37472
  waterResult.ConnectionDetails = [{
37078
37473
  water: true,
37079
37474
  sewerage: false,
@@ -37085,18 +37480,20 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37085
37480
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType,
37086
37481
  i18nKey: `WS_CONNECTION_${waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType}`
37087
37482
  } : 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}`
37483
+ waterDemandType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition3 = waterResult.additionalDetails) !== null && _waterResult$addition3 !== void 0 && _waterResult$addition3.waterDemandType ? {
37484
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.waterDemandType,
37485
+ 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
37486
  } : 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}`
37487
+ applicantType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition6 = waterResult.additionalDetails) !== null && _waterResult$addition6 !== void 0 && _waterResult$addition6.applicantType ? {
37488
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.applicantType,
37489
+ 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
37490
  } : 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}`
37491
+ categoryType: waterResult !== null && waterResult !== void 0 && (_waterResult$addition9 = waterResult.additionalDetails) !== null && _waterResult$addition9 !== void 0 && _waterResult$addition9.categoryType ? {
37492
+ code: waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.categoryType,
37493
+ 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
37494
  } : null,
37495
+ addressType: addressTypeObj,
37496
+ completeAddress: completeAddressStr,
37100
37497
  proposedPipeSize: waterResult !== null && waterResult !== void 0 && waterResult.proposedPipeSize ? {
37101
37498
  code: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize,
37102
37499
  i18nKey: `${waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedPipeSize} ${t("WS_INCHES_LABEL")}`,
@@ -37104,23 +37501,25 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37104
37501
  } : null,
37105
37502
  proposedTaps: waterResult === null || waterResult === void 0 ? void 0 : waterResult.proposedTaps
37106
37503
  }];
37504
+ waterResult.addressType = addressTypeObj;
37505
+ waterResult.completeAddress = completeAddressStr;
37107
37506
  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) || ""
37507
+ bankName: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.bankName) || "",
37508
+ 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) || "",
37509
+ ifscCode: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition13 = waterResult.additionalDetails) === null || _waterResult$addition13 === void 0 ? void 0 : _waterResult$addition13.ifscCode) || "",
37510
+ 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) || "",
37511
+ 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) || "",
37512
+ 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
37513
  };
37115
37514
  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) || ""
37515
+ isDjbEmployee: String(waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition21 = waterResult.additionalDetails) === null || _waterResult$addition21 === void 0 ? void 0 : _waterResult$addition21.isDjbEmployee) === "true",
37516
+ employeeId: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition22 = waterResult.additionalDetails) === null || _waterResult$addition22 === void 0 ? void 0 : _waterResult$addition22.employeeId) || "",
37517
+ designation: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition23 = waterResult.additionalDetails) === null || _waterResult$addition23 === void 0 ? void 0 : _waterResult$addition23.designation) || "",
37518
+ 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) || "",
37519
+ document: (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition26 = waterResult.additionalDetails) === null || _waterResult$addition26 === void 0 ? void 0 : _waterResult$addition26.document) || ""
37121
37520
  };
37122
37521
  } 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;
37522
+ 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
37523
  sewerageresult.ConnectionHolderDetails = sewerageresult !== null && sewerageresult !== void 0 && sewerageresult.connectionHolders ? [{
37125
37524
  ...(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$conne = sewerageresult.connectionHolders) === null || _sewerageresult$conne === void 0 ? void 0 : _sewerageresult$conne[0]),
37126
37525
  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 +37598,18 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37199
37598
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37200
37599
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37201
37600
  };
37601
+ 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);
37602
+ const addressTypeObjSewerage = typeof rawAddressTypeSewerage === "object" && rawAddressTypeSewerage !== null && rawAddressTypeSewerage !== void 0 && rawAddressTypeSewerage.code ? rawAddressTypeSewerage : String(rawAddressTypeSewerage).toUpperCase() === "PERMANENT" ? {
37603
+ i18nKey: "Permanent",
37604
+ code: "PERMANENT"
37605
+ } : String(rawAddressTypeSewerage).toUpperCase() === "CORRESPONDENCE" ? {
37606
+ i18nKey: "Correspondence",
37607
+ code: "CORRESPONDENCE"
37608
+ } : rawAddressTypeSewerage ? {
37609
+ i18nKey: rawAddressTypeSewerage,
37610
+ code: rawAddressTypeSewerage
37611
+ } : null;
37612
+ 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
37613
  sewerageresult.ConnectionDetails = [{
37203
37614
  water: false,
37204
37615
  sewerage: true,
@@ -37213,35 +37624,39 @@ const getEditDetails = (waterResult, sewerageresult, t) => {
37213
37624
  code: "Non Metered",
37214
37625
  i18nKey: "WS_CONNECTION_Non Metered"
37215
37626
  },
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}`
37627
+ waterDemandType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit3 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit3 !== void 0 && _sewerageresult$addit3.waterDemandType ? {
37628
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit4 = sewerageresult.additionalDetails) === null || _sewerageresult$addit4 === void 0 ? void 0 : _sewerageresult$addit4.waterDemandType,
37629
+ 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
37630
  } : 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}`
37631
+ applicantType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit6 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit6 !== void 0 && _sewerageresult$addit6.applicantType ? {
37632
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit7 = sewerageresult.additionalDetails) === null || _sewerageresult$addit7 === void 0 ? void 0 : _sewerageresult$addit7.applicantType,
37633
+ 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
37634
  } : 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}`
37635
+ categoryType: sewerageresult !== null && sewerageresult !== void 0 && (_sewerageresult$addit9 = sewerageresult.additionalDetails) !== null && _sewerageresult$addit9 !== void 0 && _sewerageresult$addit9.categoryType ? {
37636
+ code: sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit0 = sewerageresult.additionalDetails) === null || _sewerageresult$addit0 === void 0 ? void 0 : _sewerageresult$addit0.categoryType,
37637
+ 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
37638
  } : null,
37639
+ addressType: addressTypeObjSewerage,
37640
+ completeAddress: completeAddressStrSewerage,
37228
37641
  proposedToilets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedToilets,
37229
37642
  proposedWaterClosets: sewerageresult === null || sewerageresult === void 0 ? void 0 : sewerageresult.proposedWaterClosets
37230
37643
  }];
37644
+ sewerageresult.addressType = addressTypeObjSewerage;
37645
+ sewerageresult.completeAddress = completeAddressStrSewerage;
37231
37646
  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) || ""
37647
+ bankName: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit10 = sewerageresult.additionalDetails) === null || _sewerageresult$addit10 === void 0 ? void 0 : _sewerageresult$addit10.bankName) || "",
37648
+ 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) || "",
37649
+ ifscCode: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit13 = sewerageresult.additionalDetails) === null || _sewerageresult$addit13 === void 0 ? void 0 : _sewerageresult$addit13.ifscCode) || "",
37650
+ 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) || "",
37651
+ 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) || "",
37652
+ 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
37653
  };
37239
37654
  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) || ""
37655
+ isDjbEmployee: String(sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit21 = sewerageresult.additionalDetails) === null || _sewerageresult$addit21 === void 0 ? void 0 : _sewerageresult$addit21.isDjbEmployee) === "true",
37656
+ employeeId: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit22 = sewerageresult.additionalDetails) === null || _sewerageresult$addit22 === void 0 ? void 0 : _sewerageresult$addit22.employeeId) || "",
37657
+ designation: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit23 = sewerageresult.additionalDetails) === null || _sewerageresult$addit23 === void 0 ? void 0 : _sewerageresult$addit23.designation) || "",
37658
+ 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) || "",
37659
+ document: (sewerageresult === null || sewerageresult === void 0 ? void 0 : (_sewerageresult$addit26 = sewerageresult.additionalDetails) === null || _sewerageresult$addit26 === void 0 ? void 0 : _sewerageresult$addit26.document) || ""
37245
37660
  };
37246
37661
  }
37247
37662
  if (waterResult) return {
@@ -37315,10 +37730,10 @@ const EditApplication = _ref => {
37315
37730
  });
37316
37731
  let isModifyEdit = window.location.href.includes("/modify-connection") || window.location.href.includes("/edit-application");
37317
37732
  React.useEffect(() => {
37318
- var _waterapplication, _sewerageapplication;
37733
+ var _waterapplication, _params$ConnectionDet, _params$ConnectionDet2, _sewerageapplication, _params$ConnectionDet3, _params$ConnectionDet4;
37319
37734
  waterapplication = Waterresult;
37320
37735
  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)))) {
37736
+ 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
37737
  waterapplication = Waterresult;
37323
37738
  sewerageapplication = Sewarageresult;
37324
37739
  if (window.location.href.includes("edit-application")) {
@@ -37352,12 +37767,44 @@ const EditApplication = _ref => {
37352
37767
  ...EditDetails
37353
37768
  });
37354
37769
  } else if (Object.keys(params).length > 0 && (Waterresult || Sewarageresult)) {
37770
+ var _currentApp$additiona, _currentApp$Connectio, _currentApp$Connectio2, _currentApp$additiona2, _currentApp$Connectio3, _currentApp$Connectio4, _params$ConnectionDet5, _params$ConnectionDet6, _params$ConnectionDet7, _params$ConnectionDet8;
37355
37771
  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
- });
37772
+ 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);
37773
+ 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);
37774
+ 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;
37775
+ const needsDueSync = currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification);
37776
+ if (needsAddressSync || needsDueSync) {
37777
+ let updatedParams = {
37778
+ ...params
37779
+ };
37780
+ if (needsAddressSync) {
37781
+ var _params$ConnectionDet9, _params$ConnectionDet0;
37782
+ const addrTypeObj = typeof addrType === "object" && addrType !== null && addrType !== void 0 && addrType.code ? addrType : String(addrType).toUpperCase() === "PERMANENT" ? {
37783
+ i18nKey: "Permanent",
37784
+ code: "PERMANENT"
37785
+ } : String(addrType).toUpperCase() === "CORRESPONDENCE" ? {
37786
+ i18nKey: "Correspondence",
37787
+ code: "CORRESPONDENCE"
37788
+ } : addrType ? {
37789
+ i18nKey: addrType,
37790
+ code: addrType
37791
+ } : null;
37792
+ const updatedConnDetails = params !== null && params !== void 0 && params.ConnectionDetails ? [{
37793
+ ...params.ConnectionDetails[0],
37794
+ addressType: ((_params$ConnectionDet9 = params.ConnectionDetails[0]) === null || _params$ConnectionDet9 === void 0 ? void 0 : _params$ConnectionDet9.addressType) || addrTypeObj,
37795
+ completeAddress: ((_params$ConnectionDet0 = params.ConnectionDetails[0]) === null || _params$ConnectionDet0 === void 0 ? void 0 : _params$ConnectionDet0.completeAddress) || compAddr || ""
37796
+ }] : [{
37797
+ addressType: addrTypeObj,
37798
+ completeAddress: compAddr || ""
37799
+ }];
37800
+ updatedParams.ConnectionDetails = updatedConnDetails;
37801
+ updatedParams.addressType = updatedParams.addressType || addrTypeObj;
37802
+ updatedParams.completeAddress = updatedParams.completeAddress || compAddr || "";
37803
+ }
37804
+ if (needsDueSync) {
37805
+ updatedParams.dueVerification = currentApp.dueVerification;
37806
+ }
37807
+ setParams(updatedParams);
37361
37808
  }
37362
37809
  }
37363
37810
  }, [Waterresult, Sewarageresult]);
@@ -37381,6 +37828,9 @@ const EditApplication = _ref => {
37381
37828
  const handleSelect = (key, data, skipStep, isFromCreateApi) => {
37382
37829
  if (isFromCreateApi) setParams(data);else if (key === "") setParams({
37383
37830
  ...data
37831
+ });else if (Array.isArray(data)) setParams({
37832
+ ...params,
37833
+ [key]: data
37384
37834
  });else setParams({
37385
37835
  ...params,
37386
37836
  ...{
@@ -37600,7 +38050,7 @@ const ReSubmitDisconnectionApplication = () => {
37600
38050
  };
37601
38051
 
37602
38052
  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;
38053
+ 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
38054
  let {
37605
38055
  onSubmit,
37606
38056
  value
@@ -37742,6 +38192,12 @@ const CheckPage = _ref => {
37742
38192
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37743
38193
  label: t("WS_APPLICANT_TYPE"),
37744
38194
  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)))}`
38195
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38196
+ label: t("WS_Billing_Address_Type"),
38197
+ 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)))}`
38198
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38199
+ label: t("Complete Address"),
38200
+ 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
38201
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37746
38202
  label: t("WS_SERVICE_TYPE"),
37747
38203
  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 +38360,21 @@ const CheckPage = _ref => {
37904
38360
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
37905
38361
  label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
37906
38362
  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, {
38363
+ }), 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
38364
  label: t("WS_NUMBER_OF_DWELLING_UNITS"),
37909
38365
  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, {
38366
+ }) : 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) => {
38367
+ var _q$answer, _q$answer2, _q$answer3;
38368
+ 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}`;
38369
+ 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;
38370
+ const trimmedQ = String(qText || "").trim();
38371
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
38372
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
38373
+ key: `question_${idx}`,
38374
+ label: displayLabel,
38375
+ text: `${t(checkForNA(aText))}`
38376
+ });
38377
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
37911
38378
  style: {
37912
38379
  marginTop: "10px",
37913
38380
  marginBottom: "30px"
@@ -40976,7 +41443,7 @@ const WSPropertyLocationDetails = props => {
40976
41443
  };
40977
41444
 
40978
41445
  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;
41446
+ 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
41447
  const [showToast, setShowToast] = React.useState(null);
40981
41448
  const {
40982
41449
  t
@@ -41004,7 +41471,7 @@ const ApplicationBillAmendment = () => {
41004
41471
  } = Digit.Hooks.ws.WSSearchMdmsTypes.useWSMDMSBillAmendment({
41005
41472
  tenantId: stateId
41006
41473
  });
41007
- const servicev1 = connectionNumber.includes("WS") ? "WS" : "SW";
41474
+ const servicev1 = "WS";
41008
41475
  const billSearchFilters = {
41009
41476
  tenantId,
41010
41477
  consumerCode: connectionNumber,
@@ -41014,6 +41481,15 @@ const ApplicationBillAmendment = () => {
41014
41481
  data: preBillSearchData,
41015
41482
  isLoading: isBillSearchLoading
41016
41483
  } = Digit.Hooks.usePaymentSearch(tenantId, billSearchFilters);
41484
+ 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;
41485
+ React.useEffect(() => {
41486
+ var _editFormData, _editFormData2;
41487
+ if (editFormData !== null && editFormData !== void 0 && (_editFormData = editFormData[`${servicev1}_REDUCED_AMOUNT`]) !== null && _editFormData !== void 0 && _editFormData.VALUE) {
41488
+ setischeckedReduce(true);
41489
+ } else if (editFormData !== null && editFormData !== void 0 && (_editFormData2 = editFormData[`${servicev1}_ADDITIONAL_AMOUNT`]) !== null && _editFormData2 !== void 0 && _editFormData2.VALUE) {
41490
+ setischeckedAddition(true);
41491
+ }
41492
+ }, [editFormData, servicev1]);
41017
41493
  const {
41018
41494
  data,
41019
41495
  isFetched
@@ -41026,6 +41502,7 @@ const ApplicationBillAmendment = () => {
41026
41502
  control,
41027
41503
  watch,
41028
41504
  setValue,
41505
+ clearErrors,
41029
41506
  unregister,
41030
41507
  handleSubmit,
41031
41508
  formState: {
@@ -41036,8 +41513,15 @@ const ApplicationBillAmendment = () => {
41036
41513
  reset,
41037
41514
  ...methods
41038
41515
  } = reactHookForm.useForm({
41516
+ mode: "onChange",
41039
41517
  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)
41518
+ WS_REDUCED_AMOUNT: {
41519
+ VALUE: false
41520
+ },
41521
+ WS_ADDITIONAL_AMOUNT: {
41522
+ VALUE: false
41523
+ },
41524
+ ...((_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
41525
  }
41042
41526
  });
41043
41527
  const {
@@ -41053,8 +41537,6 @@ const ApplicationBillAmendment = () => {
41053
41537
  const amendmentReason = watch("amendmentReason");
41054
41538
  const WS_REDUCED_AMOUNT = watch("WS_REDUCED_AMOUNT");
41055
41539
  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
41540
  const history = reactRouterDom.useHistory();
41059
41541
  const uploadFile = function (data, fname, props) {
41060
41542
  try {
@@ -41178,11 +41660,10 @@ const ApplicationBillAmendment = () => {
41178
41660
  });
41179
41661
  };
41180
41662
  const getDemandDetailsComparingUpdates = d => {
41181
- var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _d$SW_REDUCED_AMOUNT, _actionPerformed, _actionPerformedInArr;
41182
- let actionPerformed;
41663
+ var _d, _d2, _d3, _d4, _d$WS_REDUCED_AMOUNT, _actionPerformedInArr;
41183
41664
  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;
41665
+ 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));
41666
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41186
41667
  const actionPerformedInArray = Object.entries(actionPerformed);
41187
41668
  if (d !== null && d !== void 0 && d[`${servicev1}_REBATE`]) {
41188
41669
  actionPerformedInArray.push([`${servicev1}_TIME_ADHOC_REBATE`, d === null || d === void 0 ? void 0 : d[`${servicev1}_REBATE`]]);
@@ -41199,15 +41680,14 @@ const ApplicationBillAmendment = () => {
41199
41680
  });
41200
41681
  };
41201
41682
  const getTotalDetailsOfUpdatedData = d => {
41202
- var _d5, _d$WS_REDUCED_AMOUNT2, _d$SW_REDUCED_AMOUNT2, _actionPerformed2;
41683
+ var _d5, _d$WS_REDUCED_AMOUNT2;
41203
41684
  const action = d !== null && d !== void 0 && (_d5 = d[`${servicev1}_REDUCED_AMOUNT`]) !== null && _d5 !== void 0 && _d5.VALUE ? "REBATE" : "PENALTY";
41204
41685
  const originalDemand = {};
41205
41686
  billSearchData.map(el => {
41206
41687
  originalDemand[el.taxHeadCode] = el.amount;
41207
41688
  });
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;
41689
+ 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));
41690
+ actionPerformed === null || actionPerformed === void 0 ? true : delete actionPerformed.VALUE;
41211
41691
  actionPerformed[`${servicev1}_${action}`] = d !== null && d !== void 0 && d[`${servicev1}_${action}`] ? d === null || d === void 0 ? void 0 : d[`${servicev1}_${action}`] : 0;
41212
41692
  return {
41213
41693
  ...actionPerformed,
@@ -41222,13 +41702,13 @@ const ApplicationBillAmendment = () => {
41222
41702
  };
41223
41703
  React.useEffect(() => {
41224
41704
  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}`;
41705
+ var _state4;
41706
+ 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
41707
  }, 5000);
41228
41708
  return () => clearTimeout(timer);
41229
41709
  }, [goToAppDetailsPage]);
41230
41710
  const onFormSubmit = d => {
41231
- var _state4, _state4$data;
41711
+ var _state5, _state5$data;
41232
41712
  const data = {
41233
41713
  Amendment: {
41234
41714
  consumerCode: connectionNumber,
@@ -41255,17 +41735,17 @@ const ApplicationBillAmendment = () => {
41255
41735
  }
41256
41736
  }
41257
41737
  };
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;
41738
+ 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") {
41739
+ var _state6, _state6$data, _state6$data$applicat, _state6$data$applicat2, _state7, _state7$data, _state7$data$applicat, _state7$data$applicat2;
41260
41740
  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,
41741
+ 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
41742
  action: "RE-SUBMIT",
41263
41743
  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"
41744
+ businessService: "WS.AMENDMENT",
41745
+ moduleName: "WS"
41266
41746
  };
41267
41747
  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),
41748
+ ...((_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
41749
  workflow,
41270
41750
  ...(data === null || data === void 0 ? void 0 : data.Amendment)
41271
41751
  };
@@ -41287,7 +41767,7 @@ const ApplicationBillAmendment = () => {
41287
41767
  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
41768
  setShowToast({
41289
41769
  key: "success",
41290
- label: t("ES_MODIFYSWCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41770
+ label: t("ES_MODIFYWSCONNECTION_RE_SUBMIT_UPDATE_SUCCESS")
41291
41771
  });
41292
41772
  }
41293
41773
  setGoToAppDetailsPage(true);
@@ -41318,13 +41798,16 @@ const ApplicationBillAmendment = () => {
41318
41798
  var _ob$taxHeadCode2;
41319
41799
  return !(ob !== null && ob !== void 0 && (_ob$taxHeadCode2 = ob.taxHeadCode) !== null && _ob$taxHeadCode2 !== void 0 && _ob$taxHeadCode2.includes("ADHOC"));
41320
41800
  });
41801
+ const onFormError = formErrors => {
41802
+ console.warn("Bill Amendment form errors:", formErrors);
41803
+ };
41321
41804
  return /*#__PURE__*/React__default.createElement("form", {
41322
- onSubmit: handleSubmit(onFormSubmit)
41805
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41323
41806
  }, /*#__PURE__*/React__default.createElement("div", {
41324
41807
  style: {
41325
41808
  marginLeft: "20px"
41326
41809
  }
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, {
41810
+ }, /*#__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
41811
  style: {
41329
41812
  marginBottom: "20px"
41330
41813
  }
@@ -41368,74 +41851,108 @@ const ApplicationBillAmendment = () => {
41368
41851
  name: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41369
41852
  key: `${servicev1}_REDUCED_AMOUNT.VALUE`,
41370
41853
  control: control,
41854
+ defaultValue: false,
41371
41855
  rules: {
41372
41856
  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));
41857
+ return !!value || ischeckedAddition || !!getValues(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`);
41374
41858
  }
41375
41859
  },
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;
41860
+ render: _ref2 => {
41861
+ let {
41862
+ value,
41863
+ onChange
41864
+ } = _ref2;
41378
41865
  return /*#__PURE__*/React__default.createElement("div", {
41379
41866
  style: {
41380
- paddingTop: "20px"
41867
+ paddingTop: "20px",
41868
+ marginLeft: "35px",
41869
+ cursor: "pointer"
41870
+ },
41871
+ onClick: e => {
41872
+ if (e.target.tagName !== "INPUT") {
41873
+ const nextVal = !value;
41874
+ onChange(nextVal);
41875
+ setischeckedReduce(nextVal);
41876
+ if (nextVal) {
41877
+ setischeckedAddition(false);
41878
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
41879
+ setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
41880
+ }
41881
+ }
41381
41882
  }
41382
41883
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
41383
- style: {
41384
- "marginLeft": "35px"
41385
- },
41386
41884
  label: t(`${servicev1}_REDUCED_AMOUNT`),
41885
+ checked: !!value,
41387
41886
  onChange: e => {
41388
- if (e.target.checked) {
41389
- props.onChange(true);
41390
- setischeckedReduce(true);
41887
+ const isChecked = e.target.checked;
41888
+ onChange(isChecked);
41889
+ setischeckedReduce(isChecked);
41890
+ if (isChecked) {
41391
41891
  setischeckedAddition(false);
41892
+ setValue(`${servicev1}_ADDITIONAL_AMOUNT.VALUE`, false);
41392
41893
  setOtherTextFieldsAndActionToNull(`${servicev1}_ADDITIONAL_AMOUNT`);
41393
- } else {
41394
- setischeckedReduce(false);
41395
- props.onChange(false);
41396
41894
  }
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
41895
+ }
41400
41896
  }));
41401
41897
  }
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, {
41898
+ }), 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, {
41899
+ style: {
41900
+ marginLeft: "35px"
41901
+ }
41902
+ }, 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
41903
  name: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41404
41904
  key: `${servicev1}_ADDITIONAL_AMOUNT.VALUE`,
41405
41905
  control: control,
41906
+ defaultValue: false,
41406
41907
  rules: {
41407
41908
  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));
41909
+ return !!value || ischeckedReduce || !!getValues(`${servicev1}_REDUCED_AMOUNT.VALUE`);
41409
41910
  }
41410
41911
  },
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;
41912
+ render: _ref3 => {
41913
+ let {
41914
+ value,
41915
+ onChange
41916
+ } = _ref3;
41413
41917
  return /*#__PURE__*/React__default.createElement("div", {
41414
41918
  style: {
41415
- paddingTop: "17px"
41919
+ paddingTop: "17px",
41920
+ marginLeft: "35px",
41921
+ cursor: "pointer"
41922
+ },
41923
+ onClick: e => {
41924
+ if (e.target.tagName !== "INPUT") {
41925
+ const nextVal = !value;
41926
+ onChange(nextVal);
41927
+ setischeckedAddition(nextVal);
41928
+ if (nextVal) {
41929
+ setischeckedReduce(false);
41930
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
41931
+ setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
41932
+ }
41933
+ }
41416
41934
  }
41417
41935
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
41418
- style: {
41419
- "marginLeft": "35px"
41420
- },
41421
41936
  label: t(`${servicev1}_ADDITIONAL_AMOUNT`),
41937
+ checked: !!value,
41422
41938
  onChange: e => {
41423
- if (e.target.checked) {
41424
- props.onChange(true);
41425
- setischeckedAddition(true);
41939
+ const isChecked = e.target.checked;
41940
+ onChange(isChecked);
41941
+ setischeckedAddition(isChecked);
41942
+ if (isChecked) {
41426
41943
  setischeckedReduce(false);
41944
+ setValue(`${servicev1}_REDUCED_AMOUNT.VALUE`, false);
41427
41945
  setOtherTextFieldsAndActionToNull(`${servicev1}_REDUCED_AMOUNT`);
41428
- } else {
41429
- setischeckedAddition(false);
41430
- props.onChange(false);
41431
41946
  }
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
41947
+ }
41435
41948
  }));
41436
41949
  }
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;
41950
+ }), 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, {
41951
+ style: {
41952
+ marginLeft: "35px"
41953
+ }
41954
+ }, t("WS_REQUIRED_FIELD")) : null))), (_billSearchData3 = billSearchData) === null || _billSearchData3 === void 0 ? void 0 : _billSearchData3.map(node => {
41955
+ var _errors$WS_REDUCED_AM2, _errors$WS_REDUCED_AM3, _errors$WS_REDUCED_AM4, _errors$WS_ADDITIONAL2, _errors$WS_ADDITIONAL3, _errors$WS_ADDITIONAL4;
41439
41956
  return /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
41440
41957
  style: {
41441
41958
  paddingRight: "60px",
@@ -41451,7 +41968,7 @@ const ApplicationBillAmendment = () => {
41451
41968
  paddingLeft: "150px"
41452
41969
  }
41453
41970
  }, /*#__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),
41971
+ disabled: !ischeckedReduce,
41455
41972
  type: "number",
41456
41973
  name: `${servicev1}_REDUCED_AMOUNT.${node.taxHeadCode}`,
41457
41974
  inputRef: register({
@@ -41464,24 +41981,18 @@ const ApplicationBillAmendment = () => {
41464
41981
  message: t("CS_INVALID_INPUT")
41465
41982
  }
41466
41983
  })
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, {
41468
- style: {
41469
- marginBottom: "-20px",
41470
- marginTop: "-30px",
41471
- marginLeft: "150px"
41472
- }
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, {
41984
+ }))), (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, {
41474
41985
  style: {
41475
41986
  marginBottom: "-20px",
41476
41987
  marginTop: "-30px",
41477
41988
  marginLeft: "150px"
41478
41989
  }
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", {
41990
+ }, 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
41991
  style: {
41481
41992
  paddingRight: "60px"
41482
41993
  }
41483
41994
  }, /*#__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),
41995
+ disabled: !ischeckedAddition,
41485
41996
  type: "number",
41486
41997
  name: `${servicev1}_ADDITIONAL_AMOUNT.${node.taxHeadCode}`,
41487
41998
  inputRef: register({
@@ -41490,15 +42001,11 @@ const ApplicationBillAmendment = () => {
41490
42001
  message: t("CS_INVALID_INPUT")
41491
42002
  }
41492
42003
  })
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, {
41494
- style: {
41495
- marginTop: "-19px"
41496
- }
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, {
42004
+ })), (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, {
41498
42005
  style: {
41499
42006
  marginTop: "-19px"
41500
42007
  }
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)));
42008
+ }, 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
42009
  }), /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("td", {
41503
42010
  style: {
41504
42011
  paddingRight: "60px",
@@ -41529,7 +42036,7 @@ const ApplicationBillAmendment = () => {
41529
42036
  paddingLeft: "150px"
41530
42037
  }
41531
42038
  }, /*#__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),
42039
+ disabled: !ischeckedReduce,
41533
42040
  name: `${servicev1}_REBATE`,
41534
42041
  inputRef: register()
41535
42042
  }))), /*#__PURE__*/React__default.createElement("td", {
@@ -41537,7 +42044,7 @@ const ApplicationBillAmendment = () => {
41537
42044
  paddingRight: "60px"
41538
42045
  }
41539
42046
  }, /*#__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),
42047
+ disabled: !ischeckedAddition,
41541
42048
  name: `${servicev1}_PENALTY`,
41542
42049
  inputRef: register()
41543
42050
  }))))))) : /*#__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 +42223,8 @@ const ApplicationBillAmendment = () => {
41716
42223
  onClose: closeToast
41717
42224
  }) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
41718
42225
  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)
42226
+ 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"),
42227
+ onSubmit: handleSubmit(onFormSubmit, onFormError)
41721
42228
  })));
41722
42229
  };
41723
42230
 
@@ -41926,7 +42433,7 @@ const createOption = (code, name) => ({
41926
42433
  code,
41927
42434
  name
41928
42435
  });
41929
- const PROPERTY_CATEGORY_OPTIONS = [createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
42436
+ const PROPERTY_CATEGORY_OPTIONS = [createOption("RESIDENTIAL", "Residential"), createOption("COMMERCIAL", "Commercial"), createOption("INDUSTRIAL", "Industrial"), createOption("INSTITUTIONAL", "Institutional"), createOption("MIXED", "Mixed")];
41930
42437
  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
42438
  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
42439
  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 +43108,7 @@ const FileUploadField = _ref6 => {
42601
43108
  })))));
42602
43109
  };
42603
43110
  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;
43111
+ 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
43112
  const {
42606
43113
  t
42607
43114
  } = reactI18next.useTranslation();
@@ -42760,8 +43267,15 @@ const NewApplication = () => {
42760
43267
  const isDjbEmployee = watch("djbEmployee.isDjbEmployee");
42761
43268
  const isGovernmentEmployee = watch("governmentEmployee.isGovernmentEmployee");
42762
43269
  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);
43270
+ const selectedPropertyCategory = watch("useDetails.propertyCategory");
43271
+ 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");
43272
+ const isDwellingUnit = isResidential;
43273
+ React.useEffect(() => {
43274
+ if (!isDwellingUnit) {
43275
+ setValue("useDetails.NumberofDwellingUnits", "");
43276
+ clearErrors("useDetails.NumberofDwellingUnits");
43277
+ }
43278
+ }, [isDwellingUnit]);
42765
43279
  const selectedLocality = watch("propertyAddress.locality");
42766
43280
  const selectedSubLocality = watch("propertyAddress.subLocality");
42767
43281
  const pCode = watch("propertyAddress.pinCode");
@@ -44877,18 +45391,18 @@ const NewApplication = () => {
44877
45391
  }), /*#__PURE__*/React__default.createElement(PreviewItem, {
44878
45392
  label: "Number of Floors",
44879
45393
  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, {
45394
+ }), 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
45395
  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, {
45396
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail1 = formValues.useDetails) === null || _formValues$useDetail1 === void 0 ? void 0 : _formValues$useDetail1.NumberofDwellingUnits
45397
+ }) : 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
45398
  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
45399
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail14 = formValues.useDetails) === null || _formValues$useDetail14 === void 0 ? void 0 : _formValues$useDetail14.hospitalBeds
44886
45400
  }) : null, /*#__PURE__*/React__default.createElement(PreviewItem, {
44887
45401
  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
45402
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail15 = formValues.useDetails) === null || _formValues$useDetail15 === void 0 ? void 0 : _formValues$useDetail15.SelectYearofConstruction
44889
45403
  }), /*#__PURE__*/React__default.createElement(PreviewItem, {
44890
45404
  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
45405
+ value: formValues === null || formValues === void 0 ? void 0 : (_formValues$useDetail16 = formValues.useDetails) === null || _formValues$useDetail16 === void 0 ? void 0 : _formValues$useDetail16.WaterConnectionUsageType
44892
45406
  })), /*#__PURE__*/React__default.createElement(SectionCard, {
44893
45407
  description: "Uploaded supporting documents.",
44894
45408
  isOpen: collapsedSections.documents,
@@ -52123,10 +52637,10 @@ function ApplicationDetailsActionBar(_ref) {
52123
52637
  if (completelySatisfied !== undefined) {
52124
52638
  if (completelySatisfied === true) {
52125
52639
  var _actions;
52126
- actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52640
+ actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52127
52641
  } else if (completelySatisfied === false) {
52128
52642
  var _actions2;
52129
- actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
52643
+ actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
52130
52644
  }
52131
52645
  }
52132
52646
  const closeMenu = () => {
@@ -52657,7 +53171,7 @@ const ApplicationDetails = props => {
52657
53171
  };
52658
53172
 
52659
53173
  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;
53174
+ 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
53175
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
52662
53176
  try {
52663
53177
  let response = null;
@@ -52818,15 +53332,23 @@ const ApplicationDetails$1 = () => {
52818
53332
  };
52819
53333
  let dowloadOptions = [],
52820
53334
  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";
53335
+ 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) || [];
53336
+ const allTimelineSteps = (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data2 = workflowDetails.data) === null || _workflowDetails$data2 === void 0 ? void 0 : _workflowDetails$data2.timeline) || [];
53337
+ 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");
53338
+ const hasPaymentInTimeline = Array.isArray(timeline) && timeline.some(step => {
53339
+ var _step$state, _step$state2, _step$state3, _step$state4, _step$state5, _step$state6;
53340
+ 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";
53341
+ }) || 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");
53342
+ const isCitizenActionPostPayment = (appStatus === "PENDING_FOR_CITIZEN_ACTION" || appStatus === "PENDING FOR CITIZEN ACTION") && (isSendBackToCitizen || hasPaymentInTimeline);
53343
+ 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
53344
  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
53345
  if (feeEstimationSection !== null && feeEstimationSection !== void 0 && feeEstimationSection.additionalDetails && isFeePaid) {
52824
53346
  feeEstimationSection.additionalDetails.isPaid = true;
52825
53347
  }
52826
53348
  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;
53349
+ var _applicationDetails$p0, _applicationDetails$p1, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5;
52828
53350
  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) {
53351
+ 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
53352
  workflowDetails.data.actionState.nextActions = workflowDetails.data.actionState.nextActions.filter(action => {
52831
53353
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52832
53354
  return plotArea > 200;
@@ -52837,7 +53359,7 @@ const ApplicationDetails$1 = () => {
52837
53359
  return true;
52838
53360
  });
52839
53361
  }
52840
- if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data3 = workflowDetails.data) !== null && _workflowDetails$data3 !== void 0 && _workflowDetails$data3.nextActions) {
53362
+ if (workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data5 = workflowDetails.data) !== null && _workflowDetails$data5 !== void 0 && _workflowDetails$data5.nextActions) {
52841
53363
  workflowDetails.data.nextActions = workflowDetails.data.nextActions.filter(action => {
52842
53364
  if (action.action === "VERIFY_AND_FORWARD_TO_AE") {
52843
53365
  return plotArea > 200;
@@ -52849,7 +53371,7 @@ const ApplicationDetails$1 = () => {
52849
53371
  });
52850
53372
  }
52851
53373
  }
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 => {
53374
+ 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
53375
  if ((action === null || action === void 0 ? void 0 : action.action) === "ACTIVATE_CONNECTION") {
52854
53376
  action.redirectionUrll = {
52855
53377
  action: "ACTIVATE_CONNECTION",
@@ -52891,7 +53413,7 @@ const ApplicationDetails$1 = () => {
52891
53413
  };
52892
53414
  }
52893
53415
  });
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 => {
53416
+ 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
53417
  if ((action === null || action === void 0 ? void 0 : action.action) === "EDIT") {
52896
53418
  var _applicationDetails$a11, _applicationDetails$a12, _applicationDetails$p14, _applicationDetails$p15, _servicesMasterData$w2, _userConfig$3, _userConfig$4;
52897
53419
  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 +53440,27 @@ const ApplicationDetails$1 = () => {
52918
53440
  };
52919
53441
  }
52920
53442
  });
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 => {
53443
+ 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
53444
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52923
53445
  action.isToast = true;
52924
53446
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52925
53447
  }
52926
53448
  });
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 => {
53449
+ 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
53450
  if ((action === null || action === void 0 ? void 0 : action.action) === "VERIFY_AND_FORWARD" && appStatus === "PENDING_FOR_FIELD_INSPECTION" && !checkWSAdditionalDetails()) {
52929
53451
  action.isToast = true;
52930
53452
  action.toastMessage = "MISSING_ADDITIONAL_DETAILS";
52931
53453
  }
52932
53454
  });
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 => {
53455
+ 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
53456
  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") {
53457
+ var _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data22;
53458
+ 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
53459
  action.redirectionUrll = {
52938
53460
  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
53461
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52940
53462
  };
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") {
53463
+ } 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
53464
  action.redirectionUrll = {
52943
53465
  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
53466
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -52951,15 +53473,15 @@ const ApplicationDetails$1 = () => {
52951
53473
  }
52952
53474
  }
52953
53475
  });
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 => {
53476
+ 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
53477
  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") {
53478
+ var _workflowDetails$data26, _workflowDetails$data27, _workflowDetails$data28, _workflowDetails$data29, _workflowDetails$data30, _workflowDetails$data31;
53479
+ 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
53480
  action.redirectionUrll = {
52959
53481
  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
53482
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
52961
53483
  };
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") {
53484
+ } 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
53485
  action.redirectionUrll = {
52964
53486
  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
53487
  state: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.tenantId
@@ -53161,16 +53683,16 @@ const ApplicationDetails$1 = () => {
53161
53683
  };
53162
53684
 
53163
53685
  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;
53686
+ 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
53687
  const getBillSearch = function () {
53166
53688
  try {
53167
53689
  const _temp = function (_applicationDetails$f8) {
53168
53690
  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;
53691
+ var _applicationDetails$a25;
53170
53692
  const service = serviceType === "WATER" ? "WS" : "SW";
53171
53693
  let wsSearchFilters = {
53172
53694
  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
53695
+ connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo
53174
53696
  };
53175
53697
  return Promise.resolve(Digit.WSService.search({
53176
53698
  tenantId,
@@ -53183,8 +53705,8 @@ const GetConnectionDetails = () => {
53183
53705
  bussinessService: service
53184
53706
  };
53185
53707
  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);
53708
+ var _applicationDetails$a26;
53709
+ downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a26 = applicationDetails.applicationData) === null || _applicationDetails$a26 === void 0 ? void 0 : _applicationDetails$a26.connectionNo, filters);
53188
53710
  }
53189
53711
  });
53190
53712
  }
@@ -53208,7 +53730,7 @@ const GetConnectionDetails = () => {
53208
53730
  const getTenantId = filters === null || filters === void 0 ? void 0 : filters.tenantId;
53209
53731
  const [showOptions, setShowOptions] = React.useState(false);
53210
53732
  const stateCode = Digit.ULBService.getStateId();
53211
- const actionConfig = ["DISCONNECTION_BUTTON"];
53733
+ const actionConfig = ["BILL_AMENDMENT_BUTTON", "DISCONNECTION_BUTTON"];
53212
53734
  const {
53213
53735
  isLoading,
53214
53736
  isError,
@@ -53225,11 +53747,11 @@ const GetConnectionDetails = () => {
53225
53747
  isLoading: isLoadingDemand,
53226
53748
  data: demandData
53227
53749
  } = 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,
53750
+ consumerCode: (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : _applicationDetails$a.connectionNo) || applicationNumber,
53229
53751
  businessService: serviceType === "WATER" ? "WS" : "SW",
53230
53752
  tenantId
53231
53753
  }, {
53232
- enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.applicationNo)
53754
+ enabled: !!(applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a2 = applicationDetails.applicationData) !== null && _applicationDetails$a2 !== void 0 && _applicationDetails$a2.connectionNo || applicationNumber)
53233
53755
  });
53234
53756
  const [showModal, setshowModal] = React.useState(false);
53235
53757
  const [billData, setBilldata] = React.useState([]);
@@ -53295,6 +53817,35 @@ const GetConnectionDetails = () => {
53295
53817
  }, 10000);
53296
53818
  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
53819
  const checkWorkflow = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isApplicationApproved;
53820
+ const getBillAmendmentButton = () => {
53821
+ var _demandData$Demands, _applicationDetails$a16, _applicationDetails$a17;
53822
+ let isBillAmendNotApplicable = false;
53823
+ billData === null || billData === void 0 ? void 0 : billData.map(bill => {
53824
+ if ((bill === null || bill === void 0 ? void 0 : bill.status) === "INWORKFLOW") {
53825
+ isBillAmendNotApplicable = true;
53826
+ return;
53827
+ }
53828
+ });
53829
+ if ((demandData === null || demandData === void 0 ? void 0 : (_demandData$Demands = demandData.Demands) === null || _demandData$Demands === void 0 ? void 0 : _demandData$Demands.length) === 0) {
53830
+ setshowActionToast({
53831
+ key: "error",
53832
+ label: "No_Bills_Found"
53833
+ });
53834
+ return;
53835
+ } else if (isBillAmendNotApplicable) {
53836
+ setshowActionToast({
53837
+ key: "error",
53838
+ label: "WORKFLOW_IN_PROGRESS"
53839
+ });
53840
+ return;
53841
+ }
53842
+ 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);
53843
+ const connNo = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) || applicationNumber;
53844
+ const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
53845
+ history.push(`/digit-ui/employee/ws/required-documents?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
53846
+ data: applicationDetails
53847
+ }));
53848
+ };
53298
53849
  const closeMenu = () => {
53299
53850
  setShowOptions(false);
53300
53851
  };
@@ -53312,11 +53863,10 @@ const GetConnectionDetails = () => {
53312
53863
  });
53313
53864
  } else {
53314
53865
  var _billData$, _applicationDetails$f3;
53315
- console.log("due", due, applicationDetails);
53316
53866
  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;
53867
+ var _applicationDetails$a18;
53318
53868
  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;
53869
+ 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
53870
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53321
53871
  } else {
53322
53872
  setshowModal(true);
@@ -53333,12 +53883,12 @@ const GetConnectionDetails = () => {
53333
53883
  } else {
53334
53884
  var _billData$2, _applicationDetails$f4;
53335
53885
  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;
53886
+ var _applicationDetails$a19;
53337
53887
  Digit.SessionStorage.set("WS_DISCONNECTION", {
53338
53888
  ...applicationDetails,
53339
53889
  serviceType
53340
53890
  });
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;
53891
+ 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
53892
  history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
53343
53893
  } else {
53344
53894
  setshowModal(true);
@@ -53346,14 +53896,16 @@ const GetConnectionDetails = () => {
53346
53896
  }
53347
53897
  };
53348
53898
  function onActionSelect(action) {
53349
- if (action === "DISCONNECTION_BUTTON") {
53899
+ if (action === "BILL_AMENDMENT_BUTTON") {
53900
+ getBillAmendmentButton();
53901
+ } else if (action === "DISCONNECTION_BUTTON") {
53350
53902
  getDisconnectionButton();
53351
53903
  } else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
53352
53904
  getRestorationButton();
53353
53905
  }
53354
53906
  }
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);
53907
+ 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;
53908
+ 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
53909
  const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
53358
53910
  const showActionRestoration = ["RESTORATION_BUTTON"];
53359
53911
  let dowloadOptions = [];
@@ -53535,7 +54087,11 @@ const newConfig$2 = [{
53535
54087
  type: "component",
53536
54088
  key: "supportingDocuments",
53537
54089
  component: "WSActivationSupportingDocuments",
53538
- withoutLabel: true
54090
+ withoutLabel: true,
54091
+ isMandatory: true,
54092
+ validation: {
54093
+ required: true
54094
+ }
53539
54095
  }]
53540
54096
  }]
53541
54097
  }];
@@ -53666,6 +54222,15 @@ const ActivateConnection = () => {
53666
54222
  component: "WSActivationDetails"
53667
54223
  };
53668
54224
  }
54225
+ if (item.key === "supportingDocuments") {
54226
+ return {
54227
+ ...item,
54228
+ isMandatory: true,
54229
+ validation: {
54230
+ required: true
54231
+ }
54232
+ };
54233
+ }
53669
54234
  return item;
53670
54235
  });
53671
54236
  flattenedBody = [...flattenedBody, ...mappedSectionBody];
@@ -53693,7 +54258,9 @@ const ActivateConnection = () => {
53693
54258
  return () => clearTimeout(timer);
53694
54259
  }, [isAppDetailsPage]);
53695
54260
  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);
54261
+ var _formData$supportingD, _formData$supportingD2, _formData$supportingD3, _formData$supportingD4, _formData$supportingD5;
54262
+ 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);
54263
+ 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
54264
  };
53698
54265
  const getConvertedDate = function (dateOfTime) {
53699
54266
  try {
@@ -53717,8 +54284,10 @@ const ActivateConnection = () => {
53717
54284
  };
53718
54285
  const onSubmit = function (data) {
53719
54286
  try {
53720
- const _temp5 = function () {
53721
- if (!canSubmit) {
54287
+ var _data$supportingDocum, _data$supportingDocum2, _data$supportingDocum3, _data$supportingDocum4, _data$supportingDocum5;
54288
+ 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);
54289
+ return Promise.resolve(function () {
54290
+ if (!canSubmit || !docFileStoreId) {
53722
54291
  setShowToast({
53723
54292
  warning: true,
53724
54293
  message: "PLEASE_FILL_MANDATORY_DETAILS"
@@ -53730,19 +54299,19 @@ const ActivateConnection = () => {
53730
54299
  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
54300
  function _temp4() {
53732
54301
  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;
54302
+ var _formDetails$comments, _formDetails$comments2, _formData$application, _formData$application2;
53734
54303
  formData.comment = (formDetails === null || formDetails === void 0 ? void 0 : (_formDetails$comments = formDetails.comments) === null || _formDetails$comments === void 0 ? void 0 : _formDetails$comments.comments) || "";
53735
54304
  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 ? [{
54305
+ formData.wfDocuments = docFileStoreId ? [{
53737
54306
  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
54307
+ fileStoreId: docFileStoreId
53739
54308
  }] : [];
53740
54309
  formData.processInstance = {
53741
54310
  action: filters === null || filters === void 0 ? void 0 : filters.action,
53742
54311
  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 ? [{
54312
+ documents: docFileStoreId ? [{
53744
54313
  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
54314
+ fileStoreId: docFileStoreId
53746
54315
  }] : []
53747
54316
  };
53748
54317
  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 +54412,7 @@ const ActivateConnection = () => {
53843
54412
  }();
53844
54413
  return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
53845
54414
  }
53846
- }();
53847
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
54415
+ }());
53848
54416
  } catch (e) {
53849
54417
  return Promise.reject(e);
53850
54418
  }
@@ -56522,8 +57090,6 @@ const Step2_NewConsumerDetails = _ref => {
56522
57090
  name: "reasonForNameChange"
56523
57091
  });
56524
57092
  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
57093
  const genderOptions = [{
56528
57094
  code: "MALE",
56529
57095
  i18nKey: "Male"
@@ -58240,7 +58806,6 @@ const MutationApplication = () => {
58240
58806
  }
58241
58807
  }, [location.pathname, path]);
58242
58808
  const editApplicationNumber = (details === null || details === void 0 ? void 0 : details.applicationNo) || applicationNumber;
58243
- console.log(editApplicationNumber, "editApplicationNumber");
58244
58809
  const {
58245
58810
  isLoading: isWorkflowLoading,
58246
58811
  data: workflowData
@@ -58256,7 +58821,6 @@ const MutationApplication = () => {
58256
58821
  }, {
58257
58822
  enabled: !!editApplicationNumber
58258
58823
  });
58259
- console.log(workflowData, "workflowData");
58260
58824
  const isEmployee = window.location.href.includes("/employee/");
58261
58825
  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
58826
  const querySearchParam = isEditFlow ? editApplicationNumber : authKNumber;
@@ -60354,7 +60918,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60354
60918
  businessService,
60355
60919
  isLoading
60356
60920
  } = _ref;
60357
- console.log("dafff", data);
60358
60921
  const convertEpochToDate = dateEpoch => {
60359
60922
  if (dateEpoch == null || dateEpoch == undefined || dateEpoch == "") {
60360
60923
  return "NA";
@@ -60413,7 +60976,6 @@ const SearchWaterConnectionIntegrated = _ref => {
60413
60976
  }
60414
60977
  const downloadIntegratedBill = function () {
60415
60978
  try {
60416
- console.log("integrated", data);
60417
60979
  const _temp2 = function () {
60418
60980
  if ((data === null || data === void 0 ? void 0 : data.length) > 0) {
60419
60981
  const _temp = _catch(function () {
@@ -60426,9 +60988,7 @@ const SearchWaterConnectionIntegrated = _ref => {
60426
60988
  type: "application/pdf"
60427
60989
  }), `IntegratedBill.pdf`);
60428
60990
  });
60429
- }, function (e) {
60430
- console.log("errorrrrrr", e);
60431
- });
60991
+ }, function () {});
60432
60992
  if (_temp && _temp.then) return _temp.then(function () {});
60433
60993
  } else {
60434
60994
  alert("NO Pdf");
@@ -60816,7 +61376,7 @@ const openFilePDF = fileId => {
60816
61376
  }).catch(error => console.error("Error fetching file:", error));
60817
61377
  };
60818
61378
  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;
61379
+ 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
61380
  let {
60821
61381
  data,
60822
61382
  onSubmit,
@@ -60858,7 +61418,7 @@ const CheckPage$4 = _ref2 => {
60858
61418
  }
60859
61419
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60860
61420
  label: t("WS_PROPERTY_ID_LABEL"),
60861
- text: `${t(checkForNA(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
61421
+ text: `${t(checkForNA$1(cpt === null || cpt === void 0 ? void 0 : cpt.propertyId))}`,
60862
61422
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60863
61423
  onClick: onEdit
60864
61424
  })
@@ -60869,13 +61429,19 @@ const CheckPage$4 = _ref2 => {
60869
61429
  }
60870
61430
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60871
61431
  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)))}`,
61432
+ 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
61433
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60874
61434
  onClick: onEdit
60875
61435
  })
60876
61436
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60877
61437
  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)))}`
61438
+ 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)))}`
61439
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61440
+ label: t("WS_Billing_Address_Type"),
61441
+ 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)))}`
61442
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61443
+ label: t("Complete Address"),
61444
+ 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
61445
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60880
61446
  style: {
60881
61447
  marginTop: "10px",
@@ -60883,28 +61449,28 @@ const CheckPage$4 = _ref2 => {
60883
61449
  }
60884
61450
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60885
61451
  label: t("WS_OWN_DETAIL_NAME"),
60886
- text: `${t(checkForNA((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
61452
+ text: `${t(checkForNA$1((_holderDetails = holderDetails) === null || _holderDetails === void 0 ? void 0 : _holderDetails.name))}`,
60887
61453
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60888
61454
  onClick: onEdit
60889
61455
  })
60890
61456
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60891
61457
  label: t("WS_OWN_DETAIL_MIDDLE_NAME"),
60892
- text: `${t(checkForNA((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
61458
+ text: `${t(checkForNA$1((_holderDetails2 = holderDetails) === null || _holderDetails2 === void 0 ? void 0 : _holderDetails2.middleName))}`
60893
61459
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60894
61460
  label: t("WS_OWN_DETAIL_LAST_NAME"),
60895
- text: `${t(checkForNA((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
61461
+ text: `${t(checkForNA$1((_holderDetails3 = holderDetails) === null || _holderDetails3 === void 0 ? void 0 : _holderDetails3.lastName))}`
60896
61462
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60897
61463
  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)))}`
61464
+ 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
61465
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60900
61466
  label: t("CORE_COMMON_MOBILE_NUMBER"),
60901
- text: `${t(checkForNA((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
61467
+ text: `${t(checkForNA$1((_holderDetails7 = holderDetails) === null || _holderDetails7 === void 0 ? void 0 : _holderDetails7.mobileNumber))}`
60902
61468
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60903
61469
  label: t("CORE_COMMON_WHATSAPP_MOBILE_NUMBER"),
60904
- text: `${t(checkForNA((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
61470
+ text: `${t(checkForNA$1((_holderDetails8 = holderDetails) === null || _holderDetails8 === void 0 ? void 0 : _holderDetails8.watsAppMobileNumber))}`
60905
61471
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60906
61472
  label: t("WS_EMAIL_ID"),
60907
- text: `${t(checkForNA((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
61473
+ text: `${t(checkForNA$1((_holderDetails9 = holderDetails) === null || _holderDetails9 === void 0 ? void 0 : _holderDetails9.emailId))}`
60908
61474
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60909
61475
  style: {
60910
61476
  marginTop: "10px",
@@ -60912,64 +61478,64 @@ const CheckPage$4 = _ref2 => {
60912
61478
  }
60913
61479
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60914
61480
  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)))}`,
61481
+ 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
61482
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60917
61483
  onClick: onEdit
60918
61484
  })
60919
61485
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60920
61486
  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)))}`
61487
+ 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
61488
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60923
61489
  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)))}`
61490
+ 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
61491
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60926
61492
  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)))}`
61493
+ 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
61494
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60929
61495
  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)))}`
61496
+ 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
61497
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60932
61498
  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)))}`
61499
+ 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
61500
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60935
61501
  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)))}`
61502
+ 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
61503
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60938
61504
  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)))}`
61505
+ 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
61506
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60941
61507
  label: t("ADDRESS_LINE2"),
60942
- text: `${t(checkForNA((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
61508
+ text: `${t(checkForNA$1((_propertyAddress21 = propertyAddress) === null || _propertyAddress21 === void 0 ? void 0 : _propertyAddress21.addressLine2))}`
60943
61509
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60944
61510
  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)))}`
61511
+ 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
61512
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60947
61513
  label: t("LATITUDE_GEOTAG"),
60948
- text: `${t(checkForNA((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
61514
+ text: `${t(checkForNA$1((_propertyAddress24 = propertyAddress) === null || _propertyAddress24 === void 0 ? void 0 : _propertyAddress24.latitude))}`
60949
61515
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60950
61516
  label: t("LONGITUDE_GEOTAG"),
60951
- text: `${t(checkForNA((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
61517
+ text: `${t(checkForNA$1((_propertyAddress25 = propertyAddress) === null || _propertyAddress25 === void 0 ? void 0 : _propertyAddress25.longitude))}`
60952
61518
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60953
61519
  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)))}`
61520
+ 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
61521
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60956
61522
  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)))}`
61523
+ 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
61524
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60959
61525
  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)))}`
61526
+ 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
61527
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60962
61528
  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)))}`
61529
+ text: `${t(checkForNA$1(((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : _propertyAddress38.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
60964
61530
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60965
61531
  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)))}`
61532
+ text: `${t(checkForNA$1(((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
60967
61533
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60968
61534
  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)))}`
61535
+ text: `${t(checkForNA$1(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : _propertyAddress40.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
60970
61536
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60971
61537
  label: t("LANDMARK"),
60972
- text: `${t(checkForNA((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
61538
+ text: `${t(checkForNA$1((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : _propertyAddress41.landmark))}`
60973
61539
  })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
60974
61540
  style: {
60975
61541
  marginTop: "10px",
@@ -60977,38 +61543,49 @@ const CheckPage$4 = _ref2 => {
60977
61543
  }
60978
61544
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60979
61545
  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)))}`,
61546
+ 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
61547
  actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
60982
61548
  onClick: onEdit
60983
61549
  })
60984
61550
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60985
61551
  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)))}`
61552
+ 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
61553
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60988
61554
  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)))}`
61555
+ 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
61556
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60991
61557
  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)))}`
61558
+ 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
61559
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60994
61560
  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)))}`
61561
+ 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
61562
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
60997
61563
  label: t("WS_PLOT_AREA"),
60998
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
61564
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.plotArea))}`
60999
61565
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61000
61566
  label: t("WS_BUILT_UP_AREA"),
61001
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
61567
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.builtUpArea))}`
61002
61568
  }), (useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61003
61569
  label: t("WS_HEIGHT_OF_THE_BUILDING(meters)"),
61004
- text: `${t(checkForNA(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61570
+ text: `${t(checkForNA$1(useDetails === null || useDetails === void 0 ? void 0 : useDetails.heightOfTheBuilding))}`
61005
61571
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61006
61572
  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, {
61573
+ 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)))}`
61574
+ }), 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
61575
  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, {
61576
+ text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
61577
+ }) : 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) => {
61578
+ var _q$answer, _q$answer2, _q$answer3;
61579
+ 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}`;
61580
+ 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;
61581
+ const trimmedQ = String(qText || "").trim();
61582
+ const displayLabel = trimmedQ.toLowerCase().startsWith("question") ? trimmedQ : `${trimmedQ}`;
61583
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61584
+ key: `question_${idx}`,
61585
+ label: displayLabel,
61586
+ text: `${t(checkForNA$1(aText))}`
61587
+ });
61588
+ })), /*#__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
61589
  style: {
61013
61590
  marginTop: "10px",
61014
61591
  marginBottom: "30px"
@@ -61021,10 +61598,10 @@ const CheckPage$4 = _ref2 => {
61021
61598
  })
61022
61599
  }), ((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
61600
  label: t("WS_EMPLOYEE_ID"),
61024
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61601
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.employeeId))}`
61025
61602
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61026
61603
  label: t("WS_EMPLOYEE_DESIGNATION"),
61027
- text: `${t(checkForNA(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61604
+ text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
61028
61605
  }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61029
61606
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
61030
61607
  text: /*#__PURE__*/React__default.createElement("span", {
@@ -61056,7 +61633,7 @@ const CheckPage$4 = _ref2 => {
61056
61633
  key: index
61057
61634
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
61058
61635
  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),
61636
+ text: checkForNA$1(doc === null || doc === void 0 ? void 0 : doc.documentUid),
61060
61637
  actionButton: index === 0 ? /*#__PURE__*/React__default.createElement(ActionButton$1, {
61061
61638
  onClick: onEdit
61062
61639
  }) : null