@djb25/digit-ui-module-ws 1.0.120 → 1.0.121

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.
@@ -276,6 +276,16 @@ const TestAcknowledgment = () => {
276
276
  }, "Print"));
277
277
  };
278
278
 
279
+ const isRwhDocType = doc => {
280
+ if (!doc) return false;
281
+ const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
282
+ return str.includes("RAIN") || str.includes("HARVEST");
283
+ };
284
+ const isStpDocType = doc => {
285
+ if (!doc) return false;
286
+ const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
287
+ return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
288
+ };
279
289
  const stringReplaceAll = function (str, searcher, replaceWith) {
280
290
  if (str === void 0) {
281
291
  str = "";
@@ -679,7 +689,7 @@ const getNormalizedBankDetails = data => {
679
689
  };
680
690
  const createPayloadOfWS = function (data) {
681
691
  try {
682
- var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$waterConnection, _data$ConnectionHolde, _data$documents2, _data$djbEmployee, _data$governmentEmplo, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$disability, _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$rainWaterHarves4, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$djbEmployee6, _allDocuments$find, _connectionDetailsObj, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _connectionDetailsObj2, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj3, _data$applicationSele8, _useDetailsObject$cat, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _useDetailsObject$noO, _data$propertyAddress16, _data$propertyAddress17, _data$propertyAddress18, _data$propertyAddress19, _data$cpt18, _data$cpt18$details, _data$cpt18$details$a, _data$cpt19, _data$cpt19$details, _data$cpt19$details$a, _data$cpt20, _data$cpt20$details, _data$propertyAddress20, _data$propertyAddress21, _data$propertyAddress22, _data$propertyAddress23, _useDetailsObject$noO2, _data$cpt21, _data$cpt21$details, _data$cpt21$details$a, _data$cpt22, _data$cpt22$details, _data$propertyAddress24, _data$propertyAddress25, _data$cpt23, _data$cpt23$details, _data$cpt23$details$a, _data$cpt24, _data$cpt24$details, _data$cpt24$details$a, _data$cpt25, _data$cpt25$details, _data$propertyAddress26, _data$propertyAddress27, _data$cpt26, _data$cpt26$details, _data$cpt26$details$a, _data$cpt27, _data$cpt27$details, _data$cpt27$details$a, _data$cpt28, _data$cpt28$details, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$applicationSele25, _data$contact5, _data$documents3, _data$documents4, _data$documents5, _data$documents6, _allDocuments$find2, _allDocuments$find3, _data$cpt29, _Digit6, _Digit6$Customization, _Digit6$Customization2, _Digit7, _Digit7$Customization, _Digit7$Customization2;
692
+ var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$waterConnection, _data$ConnectionHolde, _data$documents2, _data$DocumentsRequir, _data$djbEmployee, _data$governmentEmplo, _rwhDoc$additionalDet, _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$additionalDetai7, _data$additionalDetai8, _stpDoc$additionalDet, _data$sewerTreatmentP, _data$sewerTreatmentP2, _data$sewerTreatmentP3, _data$additionalDetai9, _data$additionalDetai0, _docWithValidity$addi, _data$documents3, _data$documents4, _data$documents5, _data$additionalDetai1, _data$additionalDetai10, _data$additionalDetai11, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$disability, _data$rainWaterHarves4, _data$rainWaterHarves5, _data$rainWaterHarves6, _data$rainWaterHarves7, _data$sewerTreatmentP4, _data$sewerTreatmentP5, _data$sewerTreatmentP6, _data$sewerTreatmentP7, _data$sewerTreatmentP8, _data$sewerTreatmentP9, _data$sewerTreatmentP0, _data$sewerTreatmentP1, _data$sewerTreatmentP10, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$djbEmployee6, _allDocuments$find, _connectionDetailsObj, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _connectionDetailsObj2, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj3, _data$applicationSele8, _useDetailsObject$cat, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _useDetailsObject$noO, _data$propertyAddress16, _data$propertyAddress17, _data$propertyAddress18, _data$propertyAddress19, _data$cpt18, _data$cpt18$details, _data$cpt18$details$a, _data$cpt19, _data$cpt19$details, _data$cpt19$details$a, _data$cpt20, _data$cpt20$details, _data$propertyAddress20, _data$propertyAddress21, _data$propertyAddress22, _data$propertyAddress23, _useDetailsObject$noO2, _data$cpt21, _data$cpt21$details, _data$cpt21$details$a, _data$cpt22, _data$cpt22$details, _data$propertyAddress24, _data$propertyAddress25, _data$cpt23, _data$cpt23$details, _data$cpt23$details$a, _data$cpt24, _data$cpt24$details, _data$cpt24$details$a, _data$cpt25, _data$cpt25$details, _data$propertyAddress26, _data$propertyAddress27, _data$cpt26, _data$cpt26$details, _data$cpt26$details$a, _data$cpt27, _data$cpt27$details, _data$cpt27$details$a, _data$cpt28, _data$cpt28$details, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$applicationSele25, _data$contact5, _data$documents6, _data$documents7, _data$documents8, _data$documents9, _allDocuments$find2, _allDocuments$find3, _data$cpt29, _Digit6, _Digit6$Customization, _Digit6$Customization2, _Digit7, _Digit7$Customization, _Digit7$Customization2;
683
693
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
684
694
  const isCitizen = (userInfo === null || userInfo === void 0 ? void 0 : userInfo.type) === "CITIZEN" || (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$roles = userInfo.roles) === null || _userInfo$roles === void 0 ? void 0 : _userInfo$roles.some(role => role.code === "CITIZEN"));
685
695
  data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : (_data$cpt$details$own = _data$cpt$details.owners) === null || _data$cpt$details$own === void 0 ? void 0 : _data$cpt$details$own.forEach(owner => {
@@ -694,7 +704,7 @@ const createPayloadOfWS = function (data) {
694
704
  const connectionDetailsObject = connectionDetail;
695
705
  const useDetailsObject = (data === null || data === void 0 ? void 0 : (_data$waterConnection = data.waterConnection) === null || _data$waterConnection === void 0 ? void 0 : _data$waterConnection.useDetails) || (data === null || data === void 0 ? void 0 : data.useDetails) || connectionDetailsObject || {};
696
706
  const connectionHolder = (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : _data$ConnectionHolde[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionHolderDetails);
697
- let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
707
+ let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : Array.isArray(data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) ? [...data.DocumentsRequired.documents] : [];
698
708
  const {
699
709
  signatureFileStoreId,
700
710
  signatureFileName
@@ -759,6 +769,47 @@ const createPayloadOfWS = function (data) {
759
769
  status: "ACTIVE"
760
770
  });
761
771
  }
772
+ allDocuments = allDocuments.map(doc => {
773
+ var _doc$additionalDetail, _doc$additionalDetail2, _doc$additionalDetail3;
774
+ const vDate = (doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : doc.date) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail = doc.additionalDetails) === null || _doc$additionalDetail === void 0 ? void 0 : _doc$additionalDetail.validityDate) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail2 = doc.additionalDetails) === null || _doc$additionalDetail2 === void 0 ? void 0 : _doc$additionalDetail2.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail3 = doc.additionalDetails) === null || _doc$additionalDetail3 === void 0 ? void 0 : _doc$additionalDetail3.date);
775
+ const vEpoch = vDate ? convertDateToEpoch(vDate) : undefined;
776
+ return {
777
+ ...doc,
778
+ ...(vDate ? {
779
+ validityDate: vDate,
780
+ validityUpTo: vDate,
781
+ date: vDate
782
+ } : {}),
783
+ ...(typeof vEpoch === "number" ? {
784
+ validityDateEpoch: vEpoch,
785
+ validityUpToEpoch: vEpoch
786
+ } : {}),
787
+ additionalDetails: {
788
+ ...((doc === null || doc === void 0 ? void 0 : doc.additionalDetails) || {}),
789
+ ...(vDate ? {
790
+ validityDate: vDate,
791
+ validityUpTo: vDate,
792
+ date: vDate
793
+ } : {}),
794
+ ...(typeof vEpoch === "number" ? {
795
+ validityDateEpoch: vEpoch,
796
+ validityUpToEpoch: vEpoch
797
+ } : {})
798
+ }
799
+ };
800
+ });
801
+ const rwhDoc = allDocuments.find(d => isRwhDocType(d));
802
+ const stpDoc = allDocuments.find(d => isStpDocType(d));
803
+ const docWithValidity = allDocuments.find(d => {
804
+ var _d$additionalDetails, _d$additionalDetails2;
805
+ return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails = d.additionalDetails) === null || _d$additionalDetails === void 0 ? void 0 : _d$additionalDetails.validityDate) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails2 = d.additionalDetails) === null || _d$additionalDetails2 === void 0 ? void 0 : _d$additionalDetails2.validityUpTo);
806
+ });
807
+ const rwhValidityDate = (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityDate) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityUpTo) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.date) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : (_rwhDoc$additionalDet = rwhDoc.additionalDetails) === null || _rwhDoc$additionalDet === void 0 ? void 0 : _rwhDoc$additionalDet.validityDate) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves = data.rainWaterHarvesting) === null || _data$rainWaterHarves === void 0 ? void 0 : _data$rainWaterHarves.validityDate) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves2 = data.rainWaterHarvesting) === null || _data$rainWaterHarves2 === void 0 ? void 0 : _data$rainWaterHarves2.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves3 = data.rainWaterHarvesting) === null || _data$rainWaterHarves3 === void 0 ? void 0 : _data$rainWaterHarves3.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.rainWaterHarvestingValidityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai8 = data.additionalDetails) === null || _data$additionalDetai8 === void 0 ? void 0 : _data$additionalDetai8.rwhValidityDate) || "";
808
+ const stpValidityDate = (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityDate) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityUpTo) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.date) || (stpDoc === null || stpDoc === void 0 ? void 0 : (_stpDoc$additionalDet = stpDoc.additionalDetails) === null || _stpDoc$additionalDet === void 0 ? void 0 : _stpDoc$additionalDet.validityDate) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP === void 0 ? void 0 : _data$sewerTreatmentP.validityDate) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP2 = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP2 === void 0 ? void 0 : _data$sewerTreatmentP2.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP3 = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP3 === void 0 ? void 0 : _data$sewerTreatmentP3.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai9 = data.additionalDetails) === null || _data$additionalDetai9 === void 0 ? void 0 : _data$additionalDetai9.sewerTreatmentPlantValidityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai0 = data.additionalDetails) === null || _data$additionalDetai0 === void 0 ? void 0 : _data$additionalDetai0.stpValidityDate) || "";
809
+ const overallValidityDate = (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityUpTo) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.date) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi = docWithValidity.additionalDetails) === null || _docWithValidity$addi === void 0 ? void 0 : _docWithValidity$addi.validityDate) || rwhValidityDate || stpValidityDate || (data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.validityDate) || (data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai1 = data.additionalDetails) === null || _data$additionalDetai1 === void 0 ? void 0 : _data$additionalDetai1.validityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai10 = data.additionalDetails) === null || _data$additionalDetai10 === void 0 ? void 0 : _data$additionalDetai10.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai11 = data.additionalDetails) === null || _data$additionalDetai11 === void 0 ? void 0 : _data$additionalDetai11.date) || "";
810
+ const overallValidityEpoch = overallValidityDate ? convertDateToEpoch(overallValidityDate) : undefined;
811
+ const rwhValidityEpoch = rwhValidityDate ? convertDateToEpoch(rwhValidityDate) : undefined;
812
+ const stpValidityEpoch = stpValidityDate ? convertDateToEpoch(stpValidityDate) : undefined;
762
813
  let payload = {
763
814
  water: !!isWater,
764
815
  sewerage: !!isSewerage,
@@ -844,9 +895,13 @@ const createPayloadOfWS = function (data) {
844
895
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
845
896
  ...(data === null || data === void 0 ? void 0 : data.disability),
846
897
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
898
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
847
899
  isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability = data.disability) !== null && _data$disability !== void 0 && _data$disability.isDivyangjan),
848
- hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves = data.rainWaterHarvesting) !== null && _data$rainWaterHarves !== void 0 && _data$rainWaterHarves.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves2 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves2 !== void 0 && _data$rainWaterHarves2.isRainwaterHarvesting),
849
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves3 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves3 !== void 0 && _data$rainWaterHarves3.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.isRainwaterHarvesting),
900
+ hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves5 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves5 !== void 0 && _data$rainWaterHarves5.isRainwaterHarvesting),
901
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves6 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves6 !== void 0 && _data$rainWaterHarves6.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves7 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves7 !== void 0 && _data$rainWaterHarves7.isRainwaterHarvesting),
902
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP4 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP4 !== void 0 && _data$sewerTreatmentP4.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP5 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP5 !== void 0 && _data$sewerTreatmentP5.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP6 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP6 !== void 0 && _data$sewerTreatmentP6.isSewerTreatmentPlant),
903
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP7 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP7 !== void 0 && _data$sewerTreatmentP7.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP8 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP8 !== void 0 && _data$sewerTreatmentP8.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP9 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP9 !== void 0 && _data$sewerTreatmentP9.isSewerTreatmentPlant),
904
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP0 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP0 !== void 0 && _data$sewerTreatmentP0.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP1 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP1 !== void 0 && _data$sewerTreatmentP1.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP10 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP10 !== void 0 && _data$sewerTreatmentP10.isSewerTreatmentPlant),
850
905
  document: (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : (_data$djbEmployee4$do = _data$djbEmployee4.document) === null || _data$djbEmployee4$do === void 0 ? void 0 : _data$djbEmployee4$do.fileStoreId) || (typeof (data === null || data === void 0 ? void 0 : (_data$djbEmployee5 = data.djbEmployee) === null || _data$djbEmployee5 === void 0 ? void 0 : _data$djbEmployee5.document) === "string" ? data === null || data === void 0 ? void 0 : (_data$djbEmployee6 = data.djbEmployee) === null || _data$djbEmployee6 === void 0 ? void 0 : _data$djbEmployee6.document : null) || ((_allDocuments$find = allDocuments.find(d => {
851
906
  var _d$documentType5;
852
907
  return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType5 = d.documentType) === null || _d$documentType5 === void 0 ? void 0 : _d$documentType5.includes("DJB_EMPLOYEE_ID"));
@@ -897,16 +952,43 @@ const createPayloadOfWS = function (data) {
897
952
  departmentType: data === null || data === void 0 ? void 0 : (_data$applicationSele24 = data.applicationSelection) === null || _data$applicationSele24 === void 0 ? void 0 : (_data$applicationSele25 = _data$applicationSele24.departmentType) === null || _data$applicationSele25 === void 0 ? void 0 : _data$applicationSele25.code,
898
953
  governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
899
954
  whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact5 = data.contact) === null || _data$contact5 === void 0 ? void 0 : _data$contact5.whatsAppNumber,
900
- identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.identityProofNumber,
901
- ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.ownershipDocumentNumber,
902
- otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.otherDocumentNumber,
903
- otherDocumentRemark: (data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.otherDocumentRemark) || ((_allDocuments$find2 = allDocuments.find(d => {
955
+ identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.identityProofNumber,
956
+ ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.ownershipDocumentNumber,
957
+ otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.otherDocumentNumber,
958
+ otherDocumentRemark: (data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.otherDocumentRemark) || ((_allDocuments$find2 = allDocuments.find(d => {
904
959
  var _d$documentType6, _d$documentType7;
905
960
  return (d === null || d === void 0 ? void 0 : (_d$documentType6 = d.documentType) === null || _d$documentType6 === void 0 ? void 0 : _d$documentType6.includes("OTHER_DOCUMENTS")) || (d === null || d === void 0 ? void 0 : (_d$documentType7 = d.documentType) === null || _d$documentType7 === void 0 ? void 0 : _d$documentType7.includes("OTHERDOCUMENTS"));
906
961
  })) === null || _allDocuments$find2 === void 0 ? void 0 : _allDocuments$find2.documentUid) || ((_allDocuments$find3 = allDocuments.find(d => {
907
962
  var _d$documentType8, _d$documentType9;
908
963
  return (d === null || d === void 0 ? void 0 : (_d$documentType8 = d.documentType) === null || _d$documentType8 === void 0 ? void 0 : _d$documentType8.includes("OTHER_DOCUMENTS")) || (d === null || d === void 0 ? void 0 : (_d$documentType9 = d.documentType) === null || _d$documentType9 === void 0 ? void 0 : _d$documentType9.includes("OTHERDOCUMENTS"));
909
964
  })) === null || _allDocuments$find3 === void 0 ? void 0 : _allDocuments$find3.remarks),
965
+ validityDate: overallValidityDate || undefined,
966
+ validityUpTo: overallValidityDate || undefined,
967
+ date: overallValidityDate || undefined,
968
+ ...(typeof overallValidityEpoch === "number" ? {
969
+ validityDateEpoch: overallValidityEpoch,
970
+ validityUpToEpoch: overallValidityEpoch
971
+ } : {}),
972
+ ...(rwhValidityDate ? {
973
+ rwhValidityDate: rwhValidityDate,
974
+ rwhValidityUpTo: rwhValidityDate,
975
+ rainWaterHarvestingValidityDate: rwhValidityDate,
976
+ rainWaterHarvestingValidityUpTo: rwhValidityDate,
977
+ ...(typeof rwhValidityEpoch === "number" ? {
978
+ rwhValidityDateEpoch: rwhValidityEpoch,
979
+ rwhValidityUpToEpoch: rwhValidityEpoch
980
+ } : {})
981
+ } : {}),
982
+ ...(stpValidityDate ? {
983
+ stpValidityDate: stpValidityDate,
984
+ stpValidityUpTo: stpValidityDate,
985
+ sewerTreatmentPlantValidityDate: stpValidityDate,
986
+ sewerTreatmentPlantValidityUpTo: stpValidityDate,
987
+ ...(typeof stpValidityEpoch === "number" ? {
988
+ stpValidityDateEpoch: stpValidityEpoch,
989
+ stpValidityUpToEpoch: stpValidityEpoch
990
+ } : {})
991
+ } : {}),
910
992
  ...(getNormalizedBankDetails(data) ? {
911
993
  ...getNormalizedBankDetails(data),
912
994
  bankDetails: getNormalizedBankDetails(data)
@@ -935,7 +1017,7 @@ const createPayloadOfWS = function (data) {
935
1017
  };
936
1018
  const updatePayloadOfWS = function (data, type) {
937
1019
  try {
938
- var _data$additionalDetai7, _data$additionalDetai8, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
1020
+ var _data$additionalDetai12, _data$additionalDetai13, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
939
1021
  const {
940
1022
  signatureFileStoreId,
941
1023
  signatureFileName
@@ -977,8 +1059,8 @@ const updatePayloadOfWS = function (data, type) {
977
1059
  fileName: signatureFileName
978
1060
  }
979
1061
  } : {}),
980
- connectionType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.connectionType) || "Permanent",
981
- waterDemandType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai8 = data.additionalDetails) === null || _data$additionalDetai8 === void 0 ? void 0 : _data$additionalDetai8.waterDemandType) || {
1062
+ connectionType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai12 = data.additionalDetails) === null || _data$additionalDetai12 === void 0 ? void 0 : _data$additionalDetai12.connectionType) || "Permanent",
1063
+ waterDemandType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai13 = data.additionalDetails) === null || _data$additionalDetai13 === void 0 ? void 0 : _data$additionalDetai13.waterDemandType) || {
982
1064
  code: "NON_BULK",
983
1065
  i18nKey: "WS_WATER_DEMAND_NON_BULK"
984
1066
  }
@@ -991,8 +1073,8 @@ const updatePayloadOfWS = function (data, type) {
991
1073
  }
992
1074
  };
993
1075
  const getAllDocumentsForUpdate = data => {
994
- var _data$documents7, _data$governmentEmplo5;
995
- let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
1076
+ var _data$documents0, _data$governmentEmplo5;
1077
+ let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents0 = data.documents) === null || _data$documents0 === void 0 ? void 0 : _data$documents0.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
996
1078
  const {
997
1079
  signatureFileStoreId,
998
1080
  signatureFileName
@@ -1094,7 +1176,7 @@ const getAllDocumentsForUpdate = data => {
1094
1176
  return allDocuments;
1095
1177
  };
1096
1178
  const convertToWSUpdate = data => {
1097
- var _data$WaterConnection, _data$WaterConnection2, _data$cpt30, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$djbEmployee12, _data$djbEmployee13, _data$djbEmployee14, _data$djbEmployee15, _data$djbEmployee16, _data$djbEmployee17, _data$djbEmployee18, _data$djbEmployee19, _data$djbEmployee20, _data$djbEmployee21, _data$djbEmployee22, _data$djbEmployee23, _data$djbEmployee24, _data$djbEmployee25, _data$djbEmployee25$d, _data$djbEmployee26, _data$disability2, _data$rainWaterHarves5, _data$rainWaterHarves6, _data$rainWaterHarves7, _data$rainWaterHarves8, _Digit0, _Digit0$Customization, _Digit0$Customization2, _Digit1, _Digit1$Customization, _Digit1$Customization2;
1179
+ var _data$WaterConnection, _data$WaterConnection2, _data$cpt30, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$djbEmployee12, _data$djbEmployee13, _data$djbEmployee14, _data$djbEmployee15, _data$djbEmployee16, _data$djbEmployee17, _data$djbEmployee18, _data$djbEmployee19, _data$djbEmployee20, _data$djbEmployee21, _data$djbEmployee22, _data$djbEmployee23, _data$djbEmployee24, _data$djbEmployee25, _data$djbEmployee25$d, _data$djbEmployee26, _data$disability2, _data$rainWaterHarves8, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$sewerTreatmentP11, _data$sewerTreatmentP12, _data$sewerTreatmentP13, _data$sewerTreatmentP14, _data$sewerTreatmentP15, _data$sewerTreatmentP16, _data$sewerTreatmentP17, _data$sewerTreatmentP18, _data$sewerTreatmentP19, _Digit0, _Digit0$Customization, _Digit0$Customization2, _Digit1, _Digit1$Customization, _Digit1$Customization2;
1098
1180
  const {
1099
1181
  signatureFileStoreId,
1100
1182
  signatureFileName
@@ -1134,8 +1216,14 @@ const convertToWSUpdate = data => {
1134
1216
  } : {}),
1135
1217
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1136
1218
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1137
- hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves5 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves5 !== void 0 && _data$rainWaterHarves5.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves6 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves6 !== void 0 && _data$rainWaterHarves6.isRainwaterHarvesting),
1138
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves7 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves7 !== void 0 && _data$rainWaterHarves7.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves8 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves8 !== void 0 && _data$rainWaterHarves8.isRainwaterHarvesting)
1219
+ hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves8 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves8 !== void 0 && _data$rainWaterHarves8.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves9 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves9 !== void 0 && _data$rainWaterHarves9.isRainwaterHarvesting),
1220
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves0 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves0 !== void 0 && _data$rainWaterHarves0.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves1 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves1 !== void 0 && _data$rainWaterHarves1.isRainwaterHarvesting)
1221
+ } : {}),
1222
+ ...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
1223
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
1224
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP11 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP11 !== void 0 && _data$sewerTreatmentP11.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP12 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP12 !== void 0 && _data$sewerTreatmentP12.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP13 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP13 !== void 0 && _data$sewerTreatmentP13.isSewerTreatmentPlant),
1225
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP14 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP14 !== void 0 && _data$sewerTreatmentP14.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP15 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP15 !== void 0 && _data$sewerTreatmentP15.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP16 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP16 !== void 0 && _data$sewerTreatmentP16.isSewerTreatmentPlant),
1226
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP17 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP17 !== void 0 && _data$sewerTreatmentP17.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP18 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP18 !== void 0 && _data$sewerTreatmentP18.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP19 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP19 !== void 0 && _data$sewerTreatmentP19.isSewerTreatmentPlant)
1139
1227
  } : {}),
1140
1228
  ...(getNormalizedBankDetails(data) ? {
1141
1229
  ...getNormalizedBankDetails(data),
@@ -1151,7 +1239,7 @@ const convertToWSUpdate = data => {
1151
1239
  return formdata;
1152
1240
  };
1153
1241
  const convertToEditWSUpdate = data => {
1154
- var _data$WaterConnection9, _data$WaterConnection0, _data$property, _data$property$auditD, _waterResult$property, _waterResult$property2, _data$property2, _data$property2$audit, _waterResult$auditDet, _data$additionalDetai9, _data$additionalDetai0, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai1, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai10, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$rainWaterHarves10, _data$waterConnection2, _data$additionalDetai11, _waterResult$addition4, _data$additionalDetai12, _waterResult$addition5, _data$additionalDetai13, _waterResult$addition6, _data$additionalDetai14, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai15, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai16, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai17, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai18, _waterResult$addition1, _data$additionalDetai19, _data$property3, _data$property3$addit, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2;
1242
+ var _data$WaterConnection9, _data$WaterConnection0, _data$property, _data$property$auditD, _waterResult$property, _waterResult$property2, _data$property2, _data$property2$audit, _waterResult$auditDet, _data$additionalDetai14, _data$additionalDetai15, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai16, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai17, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves10, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$sewerTreatmentP20, _data$sewerTreatmentP21, _data$sewerTreatmentP22, _data$sewerTreatmentP23, _data$sewerTreatmentP24, _data$sewerTreatmentP25, _data$sewerTreatmentP26, _data$sewerTreatmentP27, _data$sewerTreatmentP28, _data$waterConnection2, _data$additionalDetai18, _waterResult$addition4, _data$additionalDetai19, _waterResult$addition5, _data$additionalDetai20, _waterResult$addition6, _data$additionalDetai21, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai22, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai23, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai24, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai25, _waterResult$addition1, _data$additionalDetai26, _data$property3, _data$property3$addit, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2;
1155
1243
  const {
1156
1244
  signatureFileStoreId,
1157
1245
  signatureFileName
@@ -1189,9 +1277,9 @@ const convertToEditWSUpdate = data => {
1189
1277
  fileName: signatureFileName
1190
1278
  }
1191
1279
  } : {}),
1192
- CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai9 = data.additionalDetails) === null || _data$additionalDetai9 === void 0 ? void 0 : _data$additionalDetai9.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai0 = data.additionalDetails) === null || _data$additionalDetai0 === void 0 ? void 0 : _data$additionalDetai0.CompletelySatisfied : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.CompletelySatisfied,
1193
- 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$additionalDetai1 = data.additionalDetails) === null || _data$additionalDetai1 === void 0 ? void 0 : _data$additionalDetai1.addressType : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.addressType) || "",
1194
- 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$additionalDetai10 = data.additionalDetails) === null || _data$additionalDetai10 === void 0 ? void 0 : _data$additionalDetai10.completeAddress : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition3 = waterResult.additionalDetails) === null || _waterResult$addition3 === void 0 ? void 0 : _waterResult$addition3.completeAddress) || "",
1280
+ CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai14 = data.additionalDetails) === null || _data$additionalDetai14 === void 0 ? void 0 : _data$additionalDetai14.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai15 = data.additionalDetails) === null || _data$additionalDetai15 === void 0 ? void 0 : _data$additionalDetai15.CompletelySatisfied : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.CompletelySatisfied,
1281
+ 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$additionalDetai16 = data.additionalDetails) === null || _data$additionalDetai16 === void 0 ? void 0 : _data$additionalDetai16.addressType : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.addressType) || "",
1282
+ 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$additionalDetai17 = data.additionalDetails) === null || _data$additionalDetai17 === void 0 ? void 0 : _data$additionalDetai17.completeAddress : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition3 = waterResult.additionalDetails) === null || _waterResult$addition3 === void 0 ? void 0 : _waterResult$addition3.completeAddress) || "",
1195
1283
  ...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
1196
1284
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
1197
1285
  isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee27 = data.djbEmployee) === null || _data$djbEmployee27 === void 0 ? void 0 : _data$djbEmployee27.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee28 = data.djbEmployee) === null || _data$djbEmployee28 === void 0 ? void 0 : _data$djbEmployee28.isDjbEmployee) === true,
@@ -1206,23 +1294,29 @@ const convertToEditWSUpdate = data => {
1206
1294
  } : {}),
1207
1295
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1208
1296
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1209
- hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves9 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves9 !== void 0 && _data$rainWaterHarves9.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves0 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves0 !== void 0 && _data$rainWaterHarves0.isRainwaterHarvesting),
1210
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves1 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves1 !== void 0 && _data$rainWaterHarves1.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves10 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves10 !== void 0 && _data$rainWaterHarves10.isRainwaterHarvesting)
1297
+ hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves10 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves10 !== void 0 && _data$rainWaterHarves10.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves11 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves11 !== void 0 && _data$rainWaterHarves11.isRainwaterHarvesting),
1298
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves12 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves12 !== void 0 && _data$rainWaterHarves12.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves13 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves13 !== void 0 && _data$rainWaterHarves13.isRainwaterHarvesting)
1299
+ } : {}),
1300
+ ...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
1301
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
1302
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP20 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP20 !== void 0 && _data$sewerTreatmentP20.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP21 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP21 !== void 0 && _data$sewerTreatmentP21.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP22 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP22 !== void 0 && _data$sewerTreatmentP22.isSewerTreatmentPlant),
1303
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP23 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP23 !== void 0 && _data$sewerTreatmentP23.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP24 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP24 !== void 0 && _data$sewerTreatmentP24.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP25 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP25 !== void 0 && _data$sewerTreatmentP25.isSewerTreatmentPlant),
1304
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP26 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP26 !== void 0 && _data$sewerTreatmentP26.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP27 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP27 !== void 0 && _data$sewerTreatmentP27.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP28 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP28 !== void 0 && _data$sewerTreatmentP28.isSewerTreatmentPlant)
1211
1305
  } : {}),
1212
1306
  ...(getNormalizedBankDetails(data) ? {
1213
1307
  ...getNormalizedBankDetails(data),
1214
1308
  bankDetails: getNormalizedBankDetails(data)
1215
1309
  } : {}),
1216
1310
  ...(data !== null && data !== void 0 && (_data$waterConnection2 = data.waterConnection) !== null && _data$waterConnection2 !== void 0 && _data$waterConnection2.useDetails ? {
1217
- plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai11 = data.additionalDetails) === null || _data$additionalDetai11 === void 0 ? void 0 : _data$additionalDetai11.plotArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.plotArea),
1218
- plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai12 = data.additionalDetails) === null || _data$additionalDetai12 === void 0 ? void 0 : _data$additionalDetai12.plotSize) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.plotSize),
1219
- builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai13 = data.additionalDetails) === null || _data$additionalDetai13 === void 0 ? void 0 : _data$additionalDetai13.builtUpArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition6 = waterResult.additionalDetails) === null || _waterResult$addition6 === void 0 ? void 0 : _waterResult$addition6.builtUpArea),
1220
- heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai14 = data.additionalDetails) === null || _data$additionalDetai14 === void 0 ? void 0 : _data$additionalDetai14.heightOfTheBuilding) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.heightOfTheBuilding),
1221
- categoryType: ((_data$waterConnection3 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai15 = data.additionalDetails) === null || _data$additionalDetai15 === void 0 ? void 0 : _data$additionalDetai15.categoryType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.categoryType),
1222
- propertyCategory: ((_data$waterConnection4 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection4 === void 0 ? void 0 : _data$waterConnection4.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai16 = data.additionalDetails) === null || _data$additionalDetai16 === void 0 ? void 0 : _data$additionalDetai16.propertyCategory) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.propertyCategory),
1223
- propertyType: ((_data$waterConnection5 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection5 === void 0 ? void 0 : _data$waterConnection5.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai17 = data.additionalDetails) === null || _data$additionalDetai17 === void 0 ? void 0 : _data$additionalDetai17.propertyType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.propertyType),
1224
- waterConnectionUsageType: ((_data$waterConnection6 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai18 = data.additionalDetails) === null || _data$additionalDetai18 === void 0 ? void 0 : _data$additionalDetai18.waterConnectionUsageType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.waterConnectionUsageType),
1225
- numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai19 = data.additionalDetails) === null || _data$additionalDetai19 === void 0 ? void 0 : _data$additionalDetai19.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property3 = data.property) === null || _data$property3 === void 0 ? void 0 : (_data$property3$addit = _data$property3.additionalDetails) === null || _data$property3$addit === void 0 ? void 0 : _data$property3$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : (_data$cpt31$details$a = _data$cpt31$details.additionalDetails) === null || _data$cpt31$details$a === void 0 ? void 0 : _data$cpt31$details$a.numberOfDwellingUnits) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.numberOfDwellingUnits) || ""
1311
+ plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai18 = data.additionalDetails) === null || _data$additionalDetai18 === void 0 ? void 0 : _data$additionalDetai18.plotArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.plotArea),
1312
+ plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai19 = data.additionalDetails) === null || _data$additionalDetai19 === void 0 ? void 0 : _data$additionalDetai19.plotSize) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.plotSize),
1313
+ builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai20 = data.additionalDetails) === null || _data$additionalDetai20 === void 0 ? void 0 : _data$additionalDetai20.builtUpArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition6 = waterResult.additionalDetails) === null || _waterResult$addition6 === void 0 ? void 0 : _waterResult$addition6.builtUpArea),
1314
+ heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai21 = data.additionalDetails) === null || _data$additionalDetai21 === void 0 ? void 0 : _data$additionalDetai21.heightOfTheBuilding) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.heightOfTheBuilding),
1315
+ categoryType: ((_data$waterConnection3 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai22 = data.additionalDetails) === null || _data$additionalDetai22 === void 0 ? void 0 : _data$additionalDetai22.categoryType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.categoryType),
1316
+ propertyCategory: ((_data$waterConnection4 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection4 === void 0 ? void 0 : _data$waterConnection4.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai23 = data.additionalDetails) === null || _data$additionalDetai23 === void 0 ? void 0 : _data$additionalDetai23.propertyCategory) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.propertyCategory),
1317
+ propertyType: ((_data$waterConnection5 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection5 === void 0 ? void 0 : _data$waterConnection5.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai24 = data.additionalDetails) === null || _data$additionalDetai24 === void 0 ? void 0 : _data$additionalDetai24.propertyType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.propertyType),
1318
+ waterConnectionUsageType: ((_data$waterConnection6 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai25 = data.additionalDetails) === null || _data$additionalDetai25 === void 0 ? void 0 : _data$additionalDetai25.waterConnectionUsageType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.waterConnectionUsageType),
1319
+ numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai26 = data.additionalDetails) === null || _data$additionalDetai26 === void 0 ? void 0 : _data$additionalDetai26.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property3 = data.property) === null || _data$property3 === void 0 ? void 0 : (_data$property3$addit = _data$property3.additionalDetails) === null || _data$property3$addit === void 0 ? void 0 : _data$property3$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : (_data$cpt31$details$a = _data$cpt31$details.additionalDetails) === null || _data$cpt31$details$a === void 0 ? void 0 : _data$cpt31$details$a.numberOfDwellingUnits) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.numberOfDwellingUnits) || ""
1226
1320
  } : {})
1227
1321
  },
1228
1322
  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,
@@ -1324,7 +1418,7 @@ const convertToEditWSUpdate = data => {
1324
1418
  return formdata;
1325
1419
  };
1326
1420
  const convertToEditSWUpdate = data => {
1327
- var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai20, _data$additionalDetai21, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai22, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai23, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$rainWaterHarves14, _data$waterConnection8, _data$additionalDetai24, _SewerageResult$addit4, _data$additionalDetai25, _SewerageResult$addit5, _data$additionalDetai26, _SewerageResult$addit6, _data$additionalDetai27, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai28, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai29, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai30, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai31, _SewerageResult$addit1, _data$additionalDetai32, _data$property4, _data$property4$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit12, _Digit12$Customizatio, _Digit12$Customizatio2, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2;
1421
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai27, _data$additionalDetai28, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai29, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai30, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves14, _data$rainWaterHarves15, _data$rainWaterHarves16, _data$rainWaterHarves17, _data$sewerTreatmentP29, _data$sewerTreatmentP30, _data$sewerTreatmentP31, _data$sewerTreatmentP32, _data$sewerTreatmentP33, _data$sewerTreatmentP34, _data$sewerTreatmentP35, _data$sewerTreatmentP36, _data$sewerTreatmentP37, _data$waterConnection8, _data$additionalDetai31, _SewerageResult$addit4, _data$additionalDetai32, _SewerageResult$addit5, _data$additionalDetai33, _SewerageResult$addit6, _data$additionalDetai34, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai35, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai36, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai37, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai38, _SewerageResult$addit1, _data$additionalDetai39, _data$property4, _data$property4$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit12, _Digit12$Customizatio, _Digit12$Customizatio2, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2;
1328
1422
  const {
1329
1423
  signatureFileStoreId,
1330
1424
  signatureFileName
@@ -1361,9 +1455,9 @@ const convertToEditSWUpdate = data => {
1361
1455
  fileName: signatureFileName
1362
1456
  }
1363
1457
  } : {}),
1364
- CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai20 = data.additionalDetails) === null || _data$additionalDetai20 === void 0 ? void 0 : _data$additionalDetai20.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai21 = data.additionalDetails) === null || _data$additionalDetai21 === void 0 ? void 0 : _data$additionalDetai21.CompletelySatisfied : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit = SewerageResult.additionalDetails) === null || _SewerageResult$addit === void 0 ? void 0 : _SewerageResult$addit.CompletelySatisfied,
1365
- 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$additionalDetai22 = data.additionalDetails) === null || _data$additionalDetai22 === void 0 ? void 0 : _data$additionalDetai22.addressType : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit2 = SewerageResult.additionalDetails) === null || _SewerageResult$addit2 === void 0 ? void 0 : _SewerageResult$addit2.addressType) || "",
1366
- 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$additionalDetai23 = data.additionalDetails) === null || _data$additionalDetai23 === void 0 ? void 0 : _data$additionalDetai23.completeAddress : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit3 = SewerageResult.additionalDetails) === null || _SewerageResult$addit3 === void 0 ? void 0 : _SewerageResult$addit3.completeAddress) || "",
1458
+ CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai27 = data.additionalDetails) === null || _data$additionalDetai27 === void 0 ? void 0 : _data$additionalDetai27.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai28 = data.additionalDetails) === null || _data$additionalDetai28 === void 0 ? void 0 : _data$additionalDetai28.CompletelySatisfied : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit = SewerageResult.additionalDetails) === null || _SewerageResult$addit === void 0 ? void 0 : _SewerageResult$addit.CompletelySatisfied,
1459
+ 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$additionalDetai29 = data.additionalDetails) === null || _data$additionalDetai29 === void 0 ? void 0 : _data$additionalDetai29.addressType : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit2 = SewerageResult.additionalDetails) === null || _SewerageResult$addit2 === void 0 ? void 0 : _SewerageResult$addit2.addressType) || "",
1460
+ 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$additionalDetai30 = data.additionalDetails) === null || _data$additionalDetai30 === void 0 ? void 0 : _data$additionalDetai30.completeAddress : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit3 = SewerageResult.additionalDetails) === null || _SewerageResult$addit3 === void 0 ? void 0 : _SewerageResult$addit3.completeAddress) || "",
1367
1461
  ...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
1368
1462
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
1369
1463
  isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee42 = data.djbEmployee) === null || _data$djbEmployee42 === void 0 ? void 0 : _data$djbEmployee42.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee43 = data.djbEmployee) === null || _data$djbEmployee43 === void 0 ? void 0 : _data$djbEmployee43.isDjbEmployee) === true,
@@ -1378,23 +1472,29 @@ const convertToEditSWUpdate = data => {
1378
1472
  } : {}),
1379
1473
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1380
1474
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1381
- hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves11 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves11 !== void 0 && _data$rainWaterHarves11.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves12 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves12 !== void 0 && _data$rainWaterHarves12.isRainwaterHarvesting),
1382
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves13 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves13 !== void 0 && _data$rainWaterHarves13.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves14 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves14 !== void 0 && _data$rainWaterHarves14.isRainwaterHarvesting)
1475
+ hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves14 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves14 !== void 0 && _data$rainWaterHarves14.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves15 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves15 !== void 0 && _data$rainWaterHarves15.isRainwaterHarvesting),
1476
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves16 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves16 !== void 0 && _data$rainWaterHarves16.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves17 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves17 !== void 0 && _data$rainWaterHarves17.isRainwaterHarvesting)
1477
+ } : {}),
1478
+ ...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
1479
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
1480
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP29 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP29 !== void 0 && _data$sewerTreatmentP29.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP30 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP30 !== void 0 && _data$sewerTreatmentP30.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP31 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP31 !== void 0 && _data$sewerTreatmentP31.isSewerTreatmentPlant),
1481
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP32 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP32 !== void 0 && _data$sewerTreatmentP32.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP33 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP33 !== void 0 && _data$sewerTreatmentP33.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP34 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP34 !== void 0 && _data$sewerTreatmentP34.isSewerTreatmentPlant),
1482
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP35 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP35 !== void 0 && _data$sewerTreatmentP35.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP36 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP36 !== void 0 && _data$sewerTreatmentP36.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP37 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP37 !== void 0 && _data$sewerTreatmentP37.isSewerTreatmentPlant)
1383
1483
  } : {}),
1384
1484
  ...(getNormalizedBankDetails(data) ? {
1385
1485
  ...getNormalizedBankDetails(data),
1386
1486
  bankDetails: getNormalizedBankDetails(data)
1387
1487
  } : {}),
1388
1488
  ...(data !== null && data !== void 0 && (_data$waterConnection8 = data.waterConnection) !== null && _data$waterConnection8 !== void 0 && _data$waterConnection8.useDetails ? {
1389
- plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai24 = data.additionalDetails) === null || _data$additionalDetai24 === void 0 ? void 0 : _data$additionalDetai24.plotArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit4 = SewerageResult.additionalDetails) === null || _SewerageResult$addit4 === void 0 ? void 0 : _SewerageResult$addit4.plotArea),
1390
- plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai25 = data.additionalDetails) === null || _data$additionalDetai25 === void 0 ? void 0 : _data$additionalDetai25.plotSize) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit5 = SewerageResult.additionalDetails) === null || _SewerageResult$addit5 === void 0 ? void 0 : _SewerageResult$addit5.plotSize),
1391
- builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai26 = data.additionalDetails) === null || _data$additionalDetai26 === void 0 ? void 0 : _data$additionalDetai26.builtUpArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit6 = SewerageResult.additionalDetails) === null || _SewerageResult$addit6 === void 0 ? void 0 : _SewerageResult$addit6.builtUpArea),
1392
- heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai27 = data.additionalDetails) === null || _data$additionalDetai27 === void 0 ? void 0 : _data$additionalDetai27.heightOfTheBuilding) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit7 = SewerageResult.additionalDetails) === null || _SewerageResult$addit7 === void 0 ? void 0 : _SewerageResult$addit7.heightOfTheBuilding),
1393
- categoryType: ((_data$waterConnection9 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection9 === void 0 ? void 0 : _data$waterConnection9.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai28 = data.additionalDetails) === null || _data$additionalDetai28 === void 0 ? void 0 : _data$additionalDetai28.categoryType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit8 = SewerageResult.additionalDetails) === null || _SewerageResult$addit8 === void 0 ? void 0 : _SewerageResult$addit8.categoryType),
1394
- propertyCategory: ((_data$waterConnection0 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai29 = data.additionalDetails) === null || _data$additionalDetai29 === void 0 ? void 0 : _data$additionalDetai29.propertyCategory) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit9 = SewerageResult.additionalDetails) === null || _SewerageResult$addit9 === void 0 ? void 0 : _SewerageResult$addit9.propertyCategory),
1395
- propertyType: ((_data$waterConnection1 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection1 === void 0 ? void 0 : _data$waterConnection1.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai30 = data.additionalDetails) === null || _data$additionalDetai30 === void 0 ? void 0 : _data$additionalDetai30.propertyType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit0 = SewerageResult.additionalDetails) === null || _SewerageResult$addit0 === void 0 ? void 0 : _SewerageResult$addit0.propertyType),
1396
- waterConnectionUsageType: ((_data$waterConnection10 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai31 = data.additionalDetails) === null || _data$additionalDetai31 === void 0 ? void 0 : _data$additionalDetai31.waterConnectionUsageType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit1 = SewerageResult.additionalDetails) === null || _SewerageResult$addit1 === void 0 ? void 0 : _SewerageResult$addit1.waterConnectionUsageType),
1397
- numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai32 = data.additionalDetails) === null || _data$additionalDetai32 === void 0 ? void 0 : _data$additionalDetai32.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property4 = data.property) === null || _data$property4 === void 0 ? void 0 : (_data$property4$addit = _data$property4.additionalDetails) === null || _data$property4$addit === void 0 ? void 0 : _data$property4$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$a = _data$cpt33$details.additionalDetails) === null || _data$cpt33$details$a === void 0 ? void 0 : _data$cpt33$details$a.numberOfDwellingUnits) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit10 = SewerageResult.additionalDetails) === null || _SewerageResult$addit10 === void 0 ? void 0 : _SewerageResult$addit10.numberOfDwellingUnits) || ""
1489
+ plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai31 = data.additionalDetails) === null || _data$additionalDetai31 === void 0 ? void 0 : _data$additionalDetai31.plotArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit4 = SewerageResult.additionalDetails) === null || _SewerageResult$addit4 === void 0 ? void 0 : _SewerageResult$addit4.plotArea),
1490
+ plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai32 = data.additionalDetails) === null || _data$additionalDetai32 === void 0 ? void 0 : _data$additionalDetai32.plotSize) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit5 = SewerageResult.additionalDetails) === null || _SewerageResult$addit5 === void 0 ? void 0 : _SewerageResult$addit5.plotSize),
1491
+ builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai33 = data.additionalDetails) === null || _data$additionalDetai33 === void 0 ? void 0 : _data$additionalDetai33.builtUpArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit6 = SewerageResult.additionalDetails) === null || _SewerageResult$addit6 === void 0 ? void 0 : _SewerageResult$addit6.builtUpArea),
1492
+ heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai34 = data.additionalDetails) === null || _data$additionalDetai34 === void 0 ? void 0 : _data$additionalDetai34.heightOfTheBuilding) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit7 = SewerageResult.additionalDetails) === null || _SewerageResult$addit7 === void 0 ? void 0 : _SewerageResult$addit7.heightOfTheBuilding),
1493
+ categoryType: ((_data$waterConnection9 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection9 === void 0 ? void 0 : _data$waterConnection9.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai35 = data.additionalDetails) === null || _data$additionalDetai35 === void 0 ? void 0 : _data$additionalDetai35.categoryType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit8 = SewerageResult.additionalDetails) === null || _SewerageResult$addit8 === void 0 ? void 0 : _SewerageResult$addit8.categoryType),
1494
+ propertyCategory: ((_data$waterConnection0 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai36 = data.additionalDetails) === null || _data$additionalDetai36 === void 0 ? void 0 : _data$additionalDetai36.propertyCategory) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit9 = SewerageResult.additionalDetails) === null || _SewerageResult$addit9 === void 0 ? void 0 : _SewerageResult$addit9.propertyCategory),
1495
+ propertyType: ((_data$waterConnection1 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection1 === void 0 ? void 0 : _data$waterConnection1.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai37 = data.additionalDetails) === null || _data$additionalDetai37 === void 0 ? void 0 : _data$additionalDetai37.propertyType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit0 = SewerageResult.additionalDetails) === null || _SewerageResult$addit0 === void 0 ? void 0 : _SewerageResult$addit0.propertyType),
1496
+ waterConnectionUsageType: ((_data$waterConnection10 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai38 = data.additionalDetails) === null || _data$additionalDetai38 === void 0 ? void 0 : _data$additionalDetai38.waterConnectionUsageType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit1 = SewerageResult.additionalDetails) === null || _SewerageResult$addit1 === void 0 ? void 0 : _SewerageResult$addit1.waterConnectionUsageType),
1497
+ numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai39 = data.additionalDetails) === null || _data$additionalDetai39 === void 0 ? void 0 : _data$additionalDetai39.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property4 = data.property) === null || _data$property4 === void 0 ? void 0 : (_data$property4$addit = _data$property4.additionalDetails) === null || _data$property4$addit === void 0 ? void 0 : _data$property4$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$a = _data$cpt33$details.additionalDetails) === null || _data$cpt33$details$a === void 0 ? void 0 : _data$cpt33$details$a.numberOfDwellingUnits) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit10 = SewerageResult.additionalDetails) === null || _SewerageResult$addit10 === void 0 ? void 0 : _SewerageResult$addit10.numberOfDwellingUnits) || ""
1398
1498
  } : {})
1399
1499
  },
1400
1500
  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,
@@ -1496,7 +1596,7 @@ const convertToEditSWUpdate = data => {
1496
1596
  return formdata;
1497
1597
  };
1498
1598
  const convertToSWUpdate = data => {
1499
- var _data$SewerageConnect3, _data$SewerageConnect4, _data$cpt35, _data$SewerageConnect5, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _data$djbEmployee57, _data$djbEmployee58, _data$djbEmployee59, _data$djbEmployee60, _data$djbEmployee61, _data$djbEmployee62, _data$djbEmployee63, _data$djbEmployee64, _data$djbEmployee65, _data$djbEmployee66, _data$djbEmployee67, _data$djbEmployee68, _data$djbEmployee69, _data$djbEmployee70, _data$djbEmployee70$d, _data$djbEmployee71, _data$disability5, _data$rainWaterHarves15, _data$rainWaterHarves16, _data$rainWaterHarves17, _data$rainWaterHarves18, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2, _Digit15, _Digit15$Customizatio, _Digit15$Customizatio2;
1599
+ var _data$SewerageConnect3, _data$SewerageConnect4, _data$cpt35, _data$SewerageConnect5, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _data$djbEmployee57, _data$djbEmployee58, _data$djbEmployee59, _data$djbEmployee60, _data$djbEmployee61, _data$djbEmployee62, _data$djbEmployee63, _data$djbEmployee64, _data$djbEmployee65, _data$djbEmployee66, _data$djbEmployee67, _data$djbEmployee68, _data$djbEmployee69, _data$djbEmployee70, _data$djbEmployee70$d, _data$djbEmployee71, _data$disability5, _data$rainWaterHarves18, _data$rainWaterHarves19, _data$rainWaterHarves20, _data$rainWaterHarves21, _data$sewerTreatmentP38, _data$sewerTreatmentP39, _data$sewerTreatmentP40, _data$sewerTreatmentP41, _data$sewerTreatmentP42, _data$sewerTreatmentP43, _data$sewerTreatmentP44, _data$sewerTreatmentP45, _data$sewerTreatmentP46, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2, _Digit15, _Digit15$Customizatio, _Digit15$Customizatio2;
1500
1600
  const {
1501
1601
  signatureFileStoreId,
1502
1602
  signatureFileName
@@ -1537,8 +1637,14 @@ const convertToSWUpdate = data => {
1537
1637
  } : {}),
1538
1638
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1539
1639
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1540
- hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves15 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves15 !== void 0 && _data$rainWaterHarves15.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves16 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves16 !== void 0 && _data$rainWaterHarves16.isRainwaterHarvesting),
1541
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves17 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves17 !== void 0 && _data$rainWaterHarves17.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves18 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves18 !== void 0 && _data$rainWaterHarves18.isRainwaterHarvesting)
1640
+ hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves18 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves18 !== void 0 && _data$rainWaterHarves18.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves19 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves19 !== void 0 && _data$rainWaterHarves19.isRainwaterHarvesting),
1641
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves20 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves20 !== void 0 && _data$rainWaterHarves20.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves21 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves21 !== void 0 && _data$rainWaterHarves21.isRainwaterHarvesting)
1642
+ } : {}),
1643
+ ...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
1644
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
1645
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP38 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP38 !== void 0 && _data$sewerTreatmentP38.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP39 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP39 !== void 0 && _data$sewerTreatmentP39.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP40 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP40 !== void 0 && _data$sewerTreatmentP40.isSewerTreatmentPlant),
1646
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP41 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP41 !== void 0 && _data$sewerTreatmentP41.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP42 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP42 !== void 0 && _data$sewerTreatmentP42.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP43 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP43 !== void 0 && _data$sewerTreatmentP43.isSewerTreatmentPlant),
1647
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP44 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP44 !== void 0 && _data$sewerTreatmentP44.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP45 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP45 !== void 0 && _data$sewerTreatmentP45.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP46 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP46 !== void 0 && _data$sewerTreatmentP46.isSewerTreatmentPlant)
1542
1648
  } : {}),
1543
1649
  ...(getNormalizedBankDetails(data) ? {
1544
1650
  ...getNormalizedBankDetails(data),
@@ -2356,12 +2462,12 @@ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
2356
2462
  };
2357
2463
  const convertEditApplicationDetails = function (data, appData, actionData) {
2358
2464
  try {
2359
- var _data$cpt47, _data$cpt47$details, _data$cpt47$details$o, _appData$applicationD, _data$DocumentsRequir, _data$cpt48, _data$cpt48$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$cpt49;
2465
+ var _data$cpt47, _data$cpt47$details, _data$cpt47$details$o, _appData$applicationD, _data$DocumentsRequir2, _data$cpt48, _data$cpt48$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$cpt49;
2360
2466
  data === null || data === void 0 ? void 0 : (_data$cpt47 = data.cpt) === null || _data$cpt47 === void 0 ? void 0 : (_data$cpt47$details = _data$cpt47.details) === null || _data$cpt47$details === void 0 ? void 0 : (_data$cpt47$details$o = _data$cpt47$details.owners) === null || _data$cpt47$details$o === void 0 ? void 0 : _data$cpt47$details$o.forEach(owner => {
2361
2467
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
2362
2468
  });
2363
2469
  const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : _appData$applicationD.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
2364
- let docs = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) || [];
2470
+ let docs = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents) || [];
2365
2471
  if (docs && docs.length > 0 && existingDocs && existingDocs.length > 0) {
2366
2472
  docs = mapExistingDocIdsToPayload(docs, existingDocs);
2367
2473
  }
@@ -2455,7 +2561,7 @@ const convertDisonnectApplicationData = function (data, serviceType, editByConfi
2455
2561
  };
2456
2562
  const convertDisonnectEditApplicationDetails = function (data, appData, actionData) {
2457
2563
  try {
2458
- var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD6, _appData$applicationD7, _appData$applicationD8, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$DocumentsRequir2, _data$disConnectionDe5, _data$disConnectionDe6;
2564
+ var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD6, _appData$applicationD7, _appData$applicationD8, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$DocumentsRequir3, _data$disConnectionDe5, _data$disConnectionDe6;
2459
2565
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
2460
2566
  const docsData = docs ? JSON.parse(docs) : "";
2461
2567
  const documentsData = [];
@@ -2483,7 +2589,7 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
2483
2589
  }];
2484
2590
  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) || "",
2485
2591
  _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,
2486
- _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;
2592
+ _temp3 = (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir3 = data.DocumentsRequired) === null || _data$DocumentsRequir3 === void 0 ? void 0 : _data$DocumentsRequir3.documents;
2487
2593
  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) {
2488
2594
  var _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
2489
2595
  let payload = {
@@ -2537,8 +2643,8 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2537
2643
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
2538
2644
  function _temp9() {
2539
2645
  function _temp7() {
2540
- 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$cpt50;
2541
- 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;
2646
+ var _data$DocumentsRequir4, _data$DocumentsRequir5, _data$DocumentsRequir6, _appData$applicationD9, _data$ConnectionHolde87, _data$ConnectionHolde88, _Digit$UserService$ge12, _Digit$UserService$ge13, _Digit$UserService$ge14, _data$DocumentsRequir7, _data$cpt50;
2647
+ if (data !== null && data !== void 0 && (_data$DocumentsRequir4 = data.DocumentsRequired) !== null && _data$DocumentsRequir4 !== void 0 && (_data$DocumentsRequir5 = _data$DocumentsRequir4.documents) !== null && _data$DocumentsRequir5 !== void 0 && _data$DocumentsRequir5.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents;else formData.documents = null;
2542
2648
  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) || [];
2543
2649
  if (formData.documents && formData.documents.length > 0 && existingDocs && existingDocs.length > 0) {
2544
2650
  formData.documents = mapExistingDocIdsToPayload(formData.documents, existingDocs);
@@ -2566,7 +2672,7 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2566
2672
  };
2567
2673
  formData.action = actionData;
2568
2674
  formData.channel = ((_Digit$UserService$ge12 = Digit.UserService.getUser()) === null || _Digit$UserService$ge12 === void 0 ? void 0 : (_Digit$UserService$ge13 = _Digit$UserService$ge12.info) === null || _Digit$UserService$ge13 === void 0 ? void 0 : (_Digit$UserService$ge14 = _Digit$UserService$ge13.type) === null || _Digit$UserService$ge14 === void 0 ? void 0 : _Digit$UserService$ge14.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER";
2569
- sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents) || []));
2675
+ sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir7 = data.DocumentsRequired) === null || _data$DocumentsRequir7 === void 0 ? void 0 : _data$DocumentsRequir7.documents) || []));
2570
2676
  sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt50 = data.cpt) === null || _data$cpt50 === void 0 ? void 0 : _data$cpt50.details));
2571
2677
  return formData;
2572
2678
  }
@@ -11375,7 +11481,7 @@ const configNOCApproverApplication = _ref => {
11375
11481
  };
11376
11482
 
11377
11483
  const configWSApproverApplication = _ref => {
11378
- var _action$action;
11484
+ var _action$action, _businessService$toUp;
11379
11485
  let {
11380
11486
  t,
11381
11487
  action,
@@ -11441,12 +11547,16 @@ const configWSApproverApplication = _ref => {
11441
11547
  }
11442
11548
  }];
11443
11549
  const isActivate = (action === null || action === void 0 ? void 0 : action.action) === "ACTIVATE_CONNECTION";
11550
+ const isAmendment = businessService === null || businessService === void 0 ? void 0 : (_businessService$toUp = businessService.toUpperCase()) === null || _businessService$toUp === void 0 ? void 0 : _businessService$toUp.includes("AMENDMENT");
11444
11551
  const getHeadingLabel = () => {
11445
11552
  if (isActivate) {
11446
11553
  const translated = t("WF_APPROVE_APPLICATION");
11447
11554
  if (translated && translated !== "WF_APPROVE_APPLICATION") return translated;
11448
11555
  return "Approve Application";
11449
11556
  }
11557
+ if (isAmendment) {
11558
+ return `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
11559
+ }
11450
11560
  return `WF_${action === null || action === void 0 ? void 0 : action.action}_APPLICATION`;
11451
11561
  };
11452
11562
  const getSubmitLabel = () => {
@@ -11459,6 +11569,9 @@ const configWSApproverApplication = _ref => {
11459
11569
  }
11460
11570
  return "Approve Connection";
11461
11571
  }
11572
+ if (isAmendment) {
11573
+ return `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
11574
+ }
11462
11575
  return `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
11463
11576
  };
11464
11577
  return {
@@ -20861,6 +20974,118 @@ const ApplicationDetails = props => {
20861
20974
  })) : /*#__PURE__*/React.createElement(Loader, null));
20862
20975
  };
20863
20976
 
20977
+ const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
20978
+ width: "14",
20979
+ height: "14",
20980
+ viewBox: "0 0 24 24",
20981
+ fill: "none",
20982
+ stroke: "currentColor",
20983
+ strokeWidth: "3",
20984
+ strokeLinecap: "round",
20985
+ strokeLinejoin: "round"
20986
+ }, /*#__PURE__*/React.createElement("polyline", {
20987
+ points: "20 6 9 17 4 12"
20988
+ }));
20989
+ const ClockIcon = () => /*#__PURE__*/React.createElement("svg", {
20990
+ width: "14",
20991
+ height: "14",
20992
+ viewBox: "0 0 24 24",
20993
+ fill: "none",
20994
+ stroke: "currentColor",
20995
+ strokeWidth: "2",
20996
+ strokeLinecap: "round",
20997
+ strokeLinejoin: "round"
20998
+ }, /*#__PURE__*/React.createElement("circle", {
20999
+ cx: "12",
21000
+ cy: "12",
21001
+ r: "10"
21002
+ }), /*#__PURE__*/React.createElement("polyline", {
21003
+ className: "clock-hands2",
21004
+ points: "12 6 12 12 16 14"
21005
+ }));
21006
+ const WorkflowTimeline = _ref => {
21007
+ var _workflowDetails$data;
21008
+ let {
21009
+ workflowDetails,
21010
+ hideTimeline,
21011
+ setHideTimeline
21012
+ } = _ref;
21013
+ const {
21014
+ t
21015
+ } = useTranslation();
21016
+ const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
21017
+ if (!timeline || timeline.length === 0) {
21018
+ return null;
21019
+ }
21020
+ const getStatusClass = (index, checkpoint) => {
21021
+ var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
21022
+ const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.status) === "ACTIVE" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.isTerminateState);
21023
+ if (index === 0 && !isTerminal) return "current2";
21024
+ return "completed2";
21025
+ };
21026
+ const convertEpochToDateTime = epoch => {
21027
+ if (!epoch) return "N/A";
21028
+ const date = new Date(epoch);
21029
+ const day = String(date.getDate()).padStart(2, "0");
21030
+ const month = String(date.getMonth() + 1).padStart(2, "0");
21031
+ const year = date.getFullYear().toString().slice(-2);
21032
+ const hours = String(date.getHours()).padStart(2, "0");
21033
+ const minutes = String(date.getMinutes()).padStart(2, "0");
21034
+ return `${day}/${month}/${year} ${hours}:${minutes}`;
21035
+ };
21036
+ return /*#__PURE__*/React.createElement(Card, {
21037
+ className: "workflow-timeline-card2 digit-form-composer",
21038
+ style: {
21039
+ background: "#fff",
21040
+ padding: "16px",
21041
+ height: hideTimeline ? "100%" : ""
21042
+ }
21043
+ }, /*#__PURE__*/React.createElement("div", {
21044
+ className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
21045
+ }, /*#__PURE__*/React.createElement(CardSubHeader, {
21046
+ style: {
21047
+ marginBottom: "0",
21048
+ fontSize: "16px",
21049
+ fontWeight: "700",
21050
+ color: "#374151"
21051
+ },
21052
+ className: hideTimeline ? "hidden-content" : ""
21053
+ }, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React.createElement("div", {
21054
+ className: hideTimeline ? "hidden-content" : "timeline-container2"
21055
+ }, timeline.map((checkpoint, index) => {
21056
+ var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
21057
+ const statusClass = getStatusClass(index, checkpoint);
21058
+ const showLine = index !== timeline.length - 1 && timeline.length > 1;
21059
+ const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
21060
+ return /*#__PURE__*/React.createElement("div", {
21061
+ key: index,
21062
+ className: `timeline-item2 ${statusClass}`
21063
+ }, /*#__PURE__*/React.createElement("div", {
21064
+ className: "timeline-marker2"
21065
+ }, /*#__PURE__*/React.createElement("div", {
21066
+ className: "timeline-circle2"
21067
+ }, statusClass === "completed2" ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React.createElement("div", {
21068
+ className: "timeline-line2"
21069
+ })), /*#__PURE__*/React.createElement("div", {
21070
+ className: "timeline-content2"
21071
+ }, /*#__PURE__*/React.createElement("div", {
21072
+ className: "timeline-header2"
21073
+ }, /*#__PURE__*/React.createElement("div", {
21074
+ className: "timeline-title2"
21075
+ }, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state}`)), /*#__PURE__*/React.createElement("span", {
21076
+ className: "timeline-date2"
21077
+ }, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
21078
+ className: "timeline-body2"
21079
+ }, /*#__PURE__*/React.createElement("div", {
21080
+ className: `timeline-status-tag2 status-${statusClass}`
21081
+ }, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state6 = checkpoint.state) === null || _checkpoint$state6 === void 0 ? void 0 : _checkpoint$state6.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state7 = checkpoint.state) === null || _checkpoint$state7 === void 0 ? void 0 : _checkpoint$state7.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React.createElement("div", {
21082
+ className: "timeline-comment2"
21083
+ }, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React.createElement("div", {
21084
+ className: "timeline-footer2"
21085
+ }, /*#__PURE__*/React.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
21086
+ })));
21087
+ };
21088
+
20864
21089
  const ApplicationDetailsBillAmendment = () => {
20865
21090
  var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a3;
20866
21091
  const queryParams = Digit.Hooks.useQueryParams();
@@ -20873,6 +21098,8 @@ const ApplicationDetailsBillAmendment = () => {
20873
21098
  let serviceType = "WATER";
20874
21099
  if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
20875
21100
  const [showToast, setShowToast] = useState(false);
21101
+ const [hideTimeline, setHideTimeline] = React.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false);
21102
+ const menuRef = useRef();
20876
21103
  const {
20877
21104
  isLoading,
20878
21105
  isError,
@@ -20919,6 +21146,10 @@ const ApplicationDetailsBillAmendment = () => {
20919
21146
  }
20920
21147
  }, [showToast]);
20921
21148
  const [showOptions, setShowOptions] = useState(false);
21149
+ const closeMenu = () => {
21150
+ setShowOptions(false);
21151
+ };
21152
+ Digit.Hooks.useClickOutside(menuRef, closeMenu, showOptions);
20922
21153
  const getAckPdf = function (amendment, tenantId, t, tableData, app) {
20923
21154
  try {
20924
21155
  const PDFdata = getWSAcknowledgementData$2(amendment, tenantId, t, tableData, app);
@@ -20938,25 +21169,42 @@ const ApplicationDetailsBillAmendment = () => {
20938
21169
  onClick: () => getAckPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.amendment, tenantId, t, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationDetails, applicationDetails)
20939
21170
  }];
20940
21171
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
20941
- className: "employee-main-application-details"
20942
- }, /*#__PURE__*/React.createElement("div", {
20943
- className: "employee-application-details",
21172
+ className: "employee-main-application-details",
20944
21173
  style: {
20945
- marginBottom: "15px"
21174
+ display: "flex",
21175
+ gap: "20px"
20946
21176
  }
20947
- }, /*#__PURE__*/React.createElement(Header, {
20948
- styles: {
20949
- marginLeft: "0px",
20950
- paddingTop: "10px",
20951
- fontSize: "32px"
21177
+ }, isEmployee && /*#__PURE__*/React.createElement("div", {
21178
+ className: `workflow-timeline-wrapper no-scrollbar ${hideTimeline ? "hide-workflow" : ""}`,
21179
+ style: {
21180
+ flex: "1 1 300px",
21181
+ maxWidth: hideTimeline ? "fit-content" : "400px",
21182
+ transition: "max-width 0.3s"
20952
21183
  }
20953
- }, isEmployee ? t("CS_TITLE_GENERATE_NOTE") : t("WS_BILL_AMEND_APP_DETAILS", "Bill Amendment Application Details")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
20954
- className: "multilinkWrapper employee-mulitlink-main-div",
21184
+ }, /*#__PURE__*/React.createElement(WorkflowTimeline, {
21185
+ workflowDetails: workflowDetails,
21186
+ hideTimeline: hideTimeline,
21187
+ setHideTimeline: setHideTimeline
21188
+ })), /*#__PURE__*/React.createElement("div", {
21189
+ style: {
21190
+ flex: "2 1 500px",
21191
+ minWidth: "300px",
21192
+ position: "relative"
21193
+ }
21194
+ }, dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement("div", {
21195
+ style: {
21196
+ position: "absolute",
21197
+ right: "24px",
21198
+ zIndex: 11
21199
+ }
21200
+ }, /*#__PURE__*/React.createElement(MultiLink, {
21201
+ className: "multilinkWrapper employee-mulitlink-main-divNew",
20955
21202
  onHeadClick: () => setShowOptions(!showOptions),
20956
21203
  displayOptions: showOptions,
20957
21204
  options: dowloadOptions,
20958
21205
  downloadBtnClassName: "employee-download-btn-className",
20959
- optionsClassName: "employee-options-btn-className"
21206
+ optionsClassName: "employee-options-btn-className",
21207
+ ref: menuRef
20960
21208
  })), /*#__PURE__*/React.createElement(ApplicationDetails, {
20961
21209
  applicationDetails: applicationDetails,
20962
21210
  isLoading: isLoading,
@@ -20969,8 +21217,9 @@ const ApplicationDetailsBillAmendment = () => {
20969
21217
  showToast: showToast,
20970
21218
  setShowToast: setShowToast,
20971
21219
  closeToast: () => setShowToast(null),
20972
- timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
20973
- })), showToast ? /*#__PURE__*/React.createElement(Toast, {
21220
+ timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`,
21221
+ showTimeLine: !isEmployee
21222
+ }))), showToast ? /*#__PURE__*/React.createElement(Toast, {
20974
21223
  isDleteBtn: true,
20975
21224
  error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
20976
21225
  label: isSuccess ? showToast === null || showToast === void 0 ? void 0 : showToast.label : updateError === null || updateError === void 0 ? void 0 : updateError.Error
@@ -25467,8 +25716,9 @@ const BILLSBreadCrumbs = _ref => {
25467
25716
  isclickable: false
25468
25717
  }, {
25469
25718
  path: "/digit-ui/employee/ws/generate-note-bill-amendment",
25470
- label: t("CS_TITLE_GENERATE_NOTE"),
25471
- show: location.pathname.includes("/generate-note-bill-amendment") ? true : false
25719
+ label: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
25720
+ show: location.pathname.includes("/generate-note-bill-amendment") ? true : false,
25721
+ isBack: fromScreen && true
25472
25722
  }, {
25473
25723
  path: "/digit-ui/employee/ws/water/bulk-bil",
25474
25724
  label: t("CS_TITLE_BULK_BILL"),
@@ -25697,9 +25947,11 @@ const App$1 = _ref2 => {
25697
25947
  })
25698
25948
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
25699
25949
  path: `${path}/generate-note-bill-amendment`,
25700
- component: () => /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, {
25950
+ component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
25951
+ layoutClass: "action"
25952
+ }, /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, {
25701
25953
  path
25702
- })
25954
+ }))
25703
25955
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
25704
25956
  path: `${path}/response`,
25705
25957
  component: () => /*#__PURE__*/React.createElement(Response, {
@@ -31625,11 +31877,16 @@ const isOtherDocument = function (code) {
31625
31877
  }
31626
31878
  return code.toUpperCase().includes("OTHER");
31627
31879
  };
31628
- const isRwhDocType = doc => {
31880
+ const isRwhDocType$1 = doc => {
31629
31881
  if (!doc) return false;
31630
31882
  const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
31631
31883
  return str.includes("RAIN") || str.includes("HARVEST");
31632
31884
  };
31885
+ const isStpDocType$1 = doc => {
31886
+ if (!doc) return false;
31887
+ const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
31888
+ return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
31889
+ };
31633
31890
  const removeDuplicateOtherDocuments = function (documentList) {
31634
31891
  if (documentList === void 0) {
31635
31892
  documentList = [];
@@ -31686,7 +31943,7 @@ const getDocUploadSpecs = (doc, isApplicantPhoto) => {
31686
31943
  };
31687
31944
  };
31688
31945
  const WSDocumentsEmployee = _ref => {
31689
- var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
31946
+ var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _formData$sewerTreatm, _formData$sewerTreatm2, _formData$sewerTreatm3, _formData$sewerTreatm4, _formData$sewerTreatm5, _formData$sewerTreatm6, _formData$additionalD4, _formData$additionalD5, _formData$additionalD6, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
31690
31947
  let {
31691
31948
  t,
31692
31949
  config,
@@ -31706,6 +31963,7 @@ const WSDocumentsEmployee = _ref => {
31706
31963
  };
31707
31964
  const isTenant = checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : (_formData$ConnectionD2 = _formData$ConnectionD[0]) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : _formData$ConnectionD3.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application = formData.applicationSelection) === null || _formData$application === void 0 ? void 0 : _formData$application.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application2 = formData.applicationSelection) === null || _formData$application2 === void 0 ? void 0 : (_formData$application3 = _formData$application2[0]) === null || _formData$application3 === void 0 ? void 0 : _formData$application3.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH = formData.connectionHolders) === null || _formData$connectionH === void 0 ? void 0 : (_formData$connectionH2 = _formData$connectionH[0]) === null || _formData$connectionH2 === void 0 ? void 0 : _formData$connectionH2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH = formData.ConnectionHolderDetails) === null || _formData$ConnectionH === void 0 ? void 0 : (_formData$ConnectionH2 = _formData$ConnectionH[0]) === null || _formData$ConnectionH2 === void 0 ? void 0 : _formData$ConnectionH2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.applicantType);
31708
31965
  const isRwhMandatory = !!((formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa = formData.rainWaterHarvesting) === null || _formData$rainWaterHa === void 0 ? void 0 : _formData$rainWaterHa.hasCertificate) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa2 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa2 === void 0 ? void 0 : _formData$rainWaterHa2.hasCertificate) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa3 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa3 === void 0 ? void 0 : _formData$rainWaterHa3.isRainwaterHarvesting) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa4 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa4 === void 0 ? void 0 : _formData$rainWaterHa4.isRainwaterHarvesting) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasRainWaterHarvestingCertificate) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.isRainwaterHarvesting) === true);
31966
+ const isStpMandatory = !!((formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm === void 0 ? void 0 : _formData$sewerTreatm.hasCertificate) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm2 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm2 === void 0 ? void 0 : _formData$sewerTreatm2.hasCertificate) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm3 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm3 === void 0 ? void 0 : _formData$sewerTreatm3.hasStp) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm4 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm4 === void 0 ? void 0 : _formData$sewerTreatm4.hasStp) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm5 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm5 === void 0 ? void 0 : _formData$sewerTreatm5.isSewerTreatmentPlant) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm6 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm6 === void 0 ? void 0 : _formData$sewerTreatm6.isSewerTreatmentPlant) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.hasSewerTreatmentPlant) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.hasStp) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : _formData$additionalD6.isSewerTreatmentPlant) === true);
31709
31967
  const sessionDjb = (_Digit$SessionStorage = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.djbEmployee;
31710
31968
  const djbData = (formData === null || formData === void 0 ? void 0 : formData.djbEmployee) || sessionDjb || (formData === null || formData === void 0 ? void 0 : formData.additionalDetails);
31711
31969
  const isDjbEmployee = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
@@ -31732,7 +31990,8 @@ const WSDocumentsEmployee = _ref => {
31732
31990
  });
31733
31991
  const [enableSubmit, setEnableSubmit] = useState(true);
31734
31992
  const [error, setError] = useState(null);
31735
- const hasRwhUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isRwhDocType(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
31993
+ const hasRwhUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isRwhDocType$1(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
31994
+ const hasStpUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isStpDocType$1(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
31736
31995
  const wsDocsData = window.location.href.includes("modify") ? "ModifyConnectionDocuments" : window.location.href.includes("disconnection") ? "DisconnectionDocuments" : "NewWSDocuments";
31737
31996
  let action = "create";
31738
31997
  const {
@@ -31959,6 +32218,8 @@ const WSDocumentsEmployee = _ref => {
31959
32218
  isOtherDocument: isOther,
31960
32219
  isRwhMandatory: isRwhMandatory,
31961
32220
  hasRwhUploaded: hasRwhUploaded,
32221
+ isStpMandatory: isStpMandatory,
32222
+ hasStpUploaded: hasStpUploaded,
31962
32223
  isTenant: isTenant
31963
32224
  });
31964
32225
  }), isDjbEmployee && /*#__PURE__*/React.createElement(EmployeeIdDocumentUpload, {
@@ -31987,6 +32248,24 @@ const WSDocumentsEmployee = _ref => {
31987
32248
  fontWeight: "600"
31988
32249
  }
31989
32250
  }, "\u26A0\uFE0F", " ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
32251
+ const stpAlertBanner = !isTenant && isStpMandatory && !hasStpUploaded ? /*#__PURE__*/React.createElement("div", {
32252
+ style: {
32253
+ display: "flex",
32254
+ alignItems: "center",
32255
+ gap: "10px",
32256
+ marginBottom: "16px",
32257
+ padding: "10px 14px",
32258
+ backgroundColor: "#fff2f0",
32259
+ borderLeft: "4px solid #ff4d4f",
32260
+ borderRadius: "4px"
32261
+ }
32262
+ }, /*#__PURE__*/React.createElement("span", {
32263
+ style: {
32264
+ fontSize: "14px",
32265
+ color: "#d32f2f",
32266
+ fontWeight: "600"
32267
+ }
32268
+ }, "\u26A0\uFE0F", " ", t("WS_STP_CERTIFICATE_MANDATORY_INSTRUCTION") || "Sewer Treatment Plant (STP) Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
31990
32269
  const nocDownloadSection = isTenant ? /*#__PURE__*/React.createElement("div", {
31991
32270
  style: {
31992
32271
  marginBottom: "20px",
@@ -32029,7 +32308,7 @@ const WSDocumentsEmployee = _ref => {
32029
32308
  onSelect: goNext,
32030
32309
  onSkip: () => onSelect(),
32031
32310
  isDisabled: enableSubmit
32032
- }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32311
+ }, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32033
32312
  label: error,
32034
32313
  onClose: () => setError(null),
32035
32314
  error: true,
@@ -32040,7 +32319,7 @@ const WSDocumentsEmployee = _ref => {
32040
32319
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
32041
32320
  title: t("WS_DOCUMENTS"),
32042
32321
  defaultOpen: true
32043
- }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32322
+ }, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32044
32323
  label: error,
32045
32324
  onClose: () => setError(null),
32046
32325
  error: true,
@@ -32325,7 +32604,7 @@ function EmployeeIdDocumentUpload(_ref2) {
32325
32604
  }, /*#__PURE__*/React.createElement(RemoveIcon, null)))));
32326
32605
  }
32327
32606
  function SelectDocument$2(_ref3) {
32328
- var _doc$code4, _doc$code5, _doc$code6, _doc$code7, _selectedDocument$cod, _selectedDocument$cod2, _selectedDocument$nam, _selectedDocument$nam2, _selectedDocument$i, _formData$ConnectionD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$application4, _formData$application5, _formData$application6, _formData$connectionH3, _formData$connectionH4, _formData$ConnectionH3, _formData$ConnectionH4, _formData$additionalD4, _formData$ConnectionD7, _doc$i18nKey, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _selectedDocument$cod16, _selectedDocument$cod17, _doc$i18nKey2;
32607
+ var _doc$code4, _doc$code5, _doc$code6, _doc$code7, _selectedDocument$cod, _selectedDocument$cod2, _selectedDocument$nam, _selectedDocument$nam2, _selectedDocument$i, _formData$ConnectionD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$application4, _formData$application5, _formData$application6, _formData$connectionH3, _formData$connectionH4, _formData$ConnectionH3, _formData$ConnectionH4, _formData$additionalD7, _formData$ConnectionD7, _doc$i18nKey, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _selectedDocument$cod16, _selectedDocument$cod17, _doc$i18nKey2;
32329
32608
  let {
32330
32609
  t,
32331
32610
  document: doc,
@@ -32344,6 +32623,8 @@ function SelectDocument$2(_ref3) {
32344
32623
  isOtherDocument: isOther = false,
32345
32624
  isRwhMandatory = false,
32346
32625
  hasRwhUploaded = false,
32626
+ isStpMandatory = false,
32627
+ hasStpUploaded = false,
32347
32628
  isTenant: isTenantProp
32348
32629
  } = _ref3;
32349
32630
  const fileRef = useRef();
@@ -32363,7 +32644,7 @@ function SelectDocument$2(_ref3) {
32363
32644
  const isOwnershipProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.ADDRESSPROOF" || (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.OWNERSHIPPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$code6 = doc.code) === null || _doc$code6 === void 0 ? void 0 : _doc$code6.includes("ADDRESSPROOF")) || (doc === null || doc === void 0 ? void 0 : (_doc$code7 = doc.code) === null || _doc$code7 === void 0 ? void 0 : _doc$code7.includes("OWNERSHIP"));
32364
32645
  const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
32365
32646
  const [selectedDocument, setSelectedDocument] = useState(() => {
32366
- var _filteredDocument$doc, _doc$dropdownData3, _doc$dropdownData4;
32647
+ var _filteredDocument$doc, _doc$dropdownData4, _doc$dropdownData5;
32367
32648
  if (filteredDocument && doc !== null && doc !== void 0 && doc.dropdownData) {
32368
32649
  var _doc$dropdownData;
32369
32650
  const match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.find(d => d.code === filteredDocument.documentType);
@@ -32374,12 +32655,20 @@ function SelectDocument$2(_ref3) {
32374
32655
  }
32375
32656
  if (isOther && isRwhMandatory && !hasRwhUploaded && doc !== null && doc !== void 0 && doc.dropdownData) {
32376
32657
  var _doc$dropdownData2, _rwhMatch$code;
32377
- const rwhMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.find(d => isRwhDocType(d));
32658
+ const rwhMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.find(d => isRwhDocType$1(d));
32378
32659
  if (rwhMatch) return {
32379
32660
  ...rwhMatch,
32380
32661
  i18nKey: (_rwhMatch$code = rwhMatch.code) === null || _rwhMatch$code === void 0 ? void 0 : _rwhMatch$code.replaceAll(".", "_")
32381
32662
  };
32382
32663
  }
32664
+ if (isOther && isStpMandatory && !hasStpUploaded && doc !== null && doc !== void 0 && doc.dropdownData) {
32665
+ var _doc$dropdownData3, _stpMatch$code;
32666
+ const stpMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData3 = doc.dropdownData) === null || _doc$dropdownData3 === void 0 ? void 0 : _doc$dropdownData3.find(d => isStpDocType$1(d));
32667
+ if (stpMatch) return {
32668
+ ...stpMatch,
32669
+ i18nKey: (_stpMatch$code = stpMatch.code) === null || _stpMatch$code === void 0 ? void 0 : _stpMatch$code.replaceAll(".", "_")
32670
+ };
32671
+ }
32383
32672
  if (isApplicantPhoto) {
32384
32673
  return filteredDocument ? {
32385
32674
  ...filteredDocument,
@@ -32395,10 +32684,14 @@ function SelectDocument$2(_ref3) {
32395
32684
  ...filteredDocument,
32396
32685
  code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
32397
32686
  i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : (_filteredDocument$doc = filteredDocument.documentType) === null || _filteredDocument$doc === void 0 ? void 0 : _filteredDocument$doc.replaceAll(".", "_")
32398
- } : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData3 = doc.dropdownData) === null || _doc$dropdownData3 === void 0 ? void 0 : _doc$dropdownData3.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData4 = doc.dropdownData) === null || _doc$dropdownData4 === void 0 ? void 0 : _doc$dropdownData4.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc;
32687
+ } : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData4 = doc.dropdownData) === null || _doc$dropdownData4 === void 0 ? void 0 : _doc$dropdownData4.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData5 = doc.dropdownData) === null || _doc$dropdownData5 === void 0 ? void 0 : _doc$dropdownData5.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc;
32399
32688
  });
32400
32689
  const [file, setFile] = useState(null);
32401
32690
  const [uploadedFile, setUploadedFile] = useState(() => isOther ? null : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
32691
+ const [validityDate, setValidityDate] = useState(() => {
32692
+ var _filteredDocument$add;
32693
+ return (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.validityDate) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.validityUpTo) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : (_filteredDocument$add = filteredDocument.additionalDetails) === null || _filteredDocument$add === void 0 ? void 0 : _filteredDocument$add.validityDate) || "";
32694
+ });
32402
32695
  const [documentUid, setDocumentUid] = useState(() => {
32403
32696
  if (isOther) return "";
32404
32697
  const num = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || "";
@@ -32417,6 +32710,9 @@ function SelectDocument$2(_ref3) {
32417
32710
  const [docFileType, setDocFileType] = useState("");
32418
32711
  const [digiLockerUpload, setDigilockerUpload] = useState(false);
32419
32712
  const [docNumberError, setDocNumberError] = useState(null);
32713
+ const isSelectedRwh = isRwhDocType$1(selectedDocument);
32714
+ const isSelectedStp = isStpDocType$1(selectedDocument);
32715
+ const showValidityDate = isOther && (isSelectedRwh || isSelectedStp || isRwhMandatory && !hasRwhUploaded || isStpMandatory && !hasStpUploaded);
32420
32716
  const isOtherDocumentsRemark = Boolean(isOther && selectedDocument && ((selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) === "OWNER.OTHERDOCUMENTS.OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) === "OWNER_OTHERDOCUMENTS_OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) === "OWNER_OTHERDOCUMENTS_OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod = selectedDocument.code) === null || _selectedDocument$cod === void 0 ? void 0 : _selectedDocument$cod.endsWith(".OTHER_DOCUMENTS")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod2 = selectedDocument.code) === null || _selectedDocument$cod2 === void 0 ? void 0 : _selectedDocument$cod2.includes("OTHER_DOCUMENTS")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$nam = selectedDocument.name) === null || _selectedDocument$nam === void 0 ? void 0 : (_selectedDocument$nam2 = _selectedDocument$nam.toUpperCase()) === null || _selectedDocument$nam2 === void 0 ? void 0 : _selectedDocument$nam2.includes("OTHER DOCUMENT")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$i = selectedDocument.i18nKey) === null || _selectedDocument$i === void 0 ? void 0 : _selectedDocument$i.includes("OTHER_DOCUMENTS"))));
32421
32717
  const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
32422
32718
  const trimmed = (value || "").trim();
@@ -32470,6 +32766,7 @@ function SelectDocument$2(_ref3) {
32470
32766
  setUploadedFile(null);
32471
32767
  setFile(null);
32472
32768
  setDocumentUid("");
32769
+ setValidityDate("");
32473
32770
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32474
32771
  setSelectedDocument({});
32475
32772
  }
@@ -32511,11 +32808,11 @@ function SelectDocument$2(_ref3) {
32511
32808
  };
32512
32809
  useEffect(() => {
32513
32810
  if (filteredDocument) {
32514
- var _filteredDocument$doc2, _doc$dropdownData6, _doc$dropdownData7;
32811
+ var _filteredDocument$doc2, _doc$dropdownData7, _doc$dropdownData8;
32515
32812
  let match = null;
32516
32813
  if (doc !== null && doc !== void 0 && doc.dropdownData) {
32517
- var _doc$dropdownData5;
32518
- match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData5 = doc.dropdownData) === null || _doc$dropdownData5 === void 0 ? void 0 : _doc$dropdownData5.find(d => d.code === filteredDocument.documentType);
32814
+ var _doc$dropdownData6;
32815
+ match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData6 = doc.dropdownData) === null || _doc$dropdownData6 === void 0 ? void 0 : _doc$dropdownData6.find(d => d.code === filteredDocument.documentType);
32519
32816
  }
32520
32817
  setSelectedDocument(match ? {
32521
32818
  ...filteredDocument,
@@ -32528,7 +32825,7 @@ function SelectDocument$2(_ref3) {
32528
32825
  ...doc,
32529
32826
  code: (doc === null || doc === void 0 ? void 0 : doc.code) || "OWNER.APPLICANTPHOTO",
32530
32827
  i18nKey: "OWNER_APPLICANTPHOTO"
32531
- } : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData6 = doc.dropdownData) === null || _doc$dropdownData6 === void 0 ? void 0 : _doc$dropdownData6.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData7 = doc.dropdownData) === null || _doc$dropdownData7 === void 0 ? void 0 : _doc$dropdownData7.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc);
32828
+ } : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData7 = doc.dropdownData) === null || _doc$dropdownData7 === void 0 ? void 0 : _doc$dropdownData7.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData8 = doc.dropdownData) === null || _doc$dropdownData8 === void 0 ? void 0 : _doc$dropdownData8.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc);
32532
32829
  }
32533
32830
  }, []);
32534
32831
  function selectfile(e, newFile) {
@@ -32566,7 +32863,7 @@ function SelectDocument$2(_ref3) {
32566
32863
  const code = typeof val === "object" ? (val === null || val === void 0 ? void 0 : val.code) || (val === null || val === void 0 ? void 0 : val.name) || (val === null || val === void 0 ? void 0 : val.value) : val;
32567
32864
  return String(code).toUpperCase() === "TENANT";
32568
32865
  };
32569
- const isTenant = isTenantProp !== undefined ? isTenantProp : checkIsTenant(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.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : _formData$ConnectionD6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application4 = formData.applicationSelection) === null || _formData$application4 === void 0 ? void 0 : _formData$application4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application5 = formData.applicationSelection) === null || _formData$application5 === void 0 ? void 0 : (_formData$application6 = _formData$application5[0]) === null || _formData$application6 === void 0 ? void 0 : _formData$application6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH3 = formData.connectionHolders) === null || _formData$connectionH3 === void 0 ? void 0 : (_formData$connectionH4 = _formData$connectionH3[0]) === null || _formData$connectionH4 === void 0 ? void 0 : _formData$connectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH3 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH3 === void 0 ? void 0 : (_formData$ConnectionH4 = _formData$ConnectionH3[0]) === null || _formData$ConnectionH4 === void 0 ? void 0 : _formData$ConnectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.applicantType);
32866
+ const isTenant = isTenantProp !== undefined ? isTenantProp : checkIsTenant(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.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : _formData$ConnectionD6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application4 = formData.applicationSelection) === null || _formData$application4 === void 0 ? void 0 : _formData$application4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application5 = formData.applicationSelection) === null || _formData$application5 === void 0 ? void 0 : (_formData$application6 = _formData$application5[0]) === null || _formData$application6 === void 0 ? void 0 : _formData$application6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH3 = formData.connectionHolders) === null || _formData$connectionH3 === void 0 ? void 0 : (_formData$connectionH4 = _formData$connectionH3[0]) === null || _formData$connectionH4 === void 0 ? void 0 : _formData$connectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH3 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH3 === void 0 ? void 0 : (_formData$ConnectionH4 = _formData$ConnectionH3[0]) === null || _formData$ConnectionH4 === void 0 ? void 0 : _formData$ConnectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$additionalD7 = formData.additionalDetails) === null || _formData$additionalD7 === void 0 ? void 0 : _formData$additionalD7.applicantType);
32570
32867
  if (isOther) {
32571
32868
  if (isTenant) {
32572
32869
  var _dropDownData;
@@ -32590,7 +32887,7 @@ function SelectDocument$2(_ref3) {
32590
32887
  const name = d.name || "";
32591
32888
  return !(code.includes("NOC_FROM_OWNER") || code === "NOC from Owner" || name.includes("NOC from Owner"));
32592
32889
  });
32593
- if (dropDownData && !dropDownData.some(d => isRwhDocType(d))) {
32890
+ if (dropDownData && !dropDownData.some(d => isRwhDocType$1(d))) {
32594
32891
  dropDownData = [...dropDownData, {
32595
32892
  code: "OWNER.OTHERDOCUMENTS.RAINWATER_HARVESTING",
32596
32893
  i18nKey: "OWNER_OTHERDOCUMENTS_RAINWATER_HARVESTING",
@@ -32623,9 +32920,9 @@ function SelectDocument$2(_ref3) {
32623
32920
  setFile(null);
32624
32921
  } else if (isRwhMandatory && !hasRwhUploaded) {
32625
32922
  var _dropDownData4;
32626
- const isCurrentRwh = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isRwhDocType(selectedDocument);
32923
+ const isCurrentRwh = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isRwhDocType$1(selectedDocument);
32627
32924
  if (!isCurrentRwh && ((_dropDownData4 = dropDownData) === null || _dropDownData4 === void 0 ? void 0 : _dropDownData4.length) > 0) {
32628
- const rwhMatch = dropDownData.find(d => isRwhDocType(d));
32925
+ const rwhMatch = dropDownData.find(d => isRwhDocType$1(d));
32629
32926
  if (rwhMatch && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code))) {
32630
32927
  var _rwhMatch$code2;
32631
32928
  setSelectedDocument({
@@ -32634,10 +32931,23 @@ function SelectDocument$2(_ref3) {
32634
32931
  });
32635
32932
  }
32636
32933
  }
32934
+ } else if (isStpMandatory && !hasStpUploaded) {
32935
+ var _dropDownData5;
32936
+ const isCurrentStp = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isStpDocType$1(selectedDocument);
32937
+ if (!isCurrentStp && ((_dropDownData5 = dropDownData) === null || _dropDownData5 === void 0 ? void 0 : _dropDownData5.length) > 0) {
32938
+ const stpMatch = dropDownData.find(d => isStpDocType$1(d));
32939
+ if (stpMatch && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code))) {
32940
+ var _stpMatch$code2;
32941
+ setSelectedDocument({
32942
+ ...stpMatch,
32943
+ i18nKey: (_stpMatch$code2 = stpMatch.code) === null || _stpMatch$code2 === void 0 ? void 0 : _stpMatch$code2.replaceAll(".", "_")
32944
+ });
32945
+ }
32946
+ }
32637
32947
  }
32638
32948
  }
32639
32949
  }
32640
- }, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, dropDownData]);
32950
+ }, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, isStpMandatory, hasStpUploaded, dropDownData]);
32641
32951
  const [isHidden, setHidden] = useState(false);
32642
32952
  const documentDisplayName = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.name) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || (doc === null || doc === void 0 ? void 0 : doc.i18nKey) || (doc === null || doc === void 0 ? void 0 : doc.name) || (doc === null || doc === void 0 ? void 0 : doc.code);
32643
32953
  const addError = () => {
@@ -32695,10 +33005,20 @@ function SelectDocument$2(_ref3) {
32695
33005
  documentName: (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "",
32696
33006
  documentUid: documentUid,
32697
33007
  documentNumber: documentUid,
33008
+ validityDate: validityDate || undefined,
33009
+ validityUpTo: validityDate || undefined,
33010
+ date: validityDate || undefined,
32698
33011
  remarks: isOtherDocumentsRemark ? documentUid : undefined,
32699
- additionalDetails: isOtherDocumentsRemark ? {
32700
- remark: documentUid
32701
- } : undefined,
33012
+ additionalDetails: {
33013
+ ...(isOtherDocumentsRemark ? {
33014
+ remark: documentUid
33015
+ } : {}),
33016
+ ...(validityDate ? {
33017
+ validityDate,
33018
+ validityUpTo: validityDate,
33019
+ date: validityDate
33020
+ } : {})
33021
+ },
32702
33022
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
32703
33023
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
32704
33024
  status: "ACTIVE",
@@ -32709,8 +33029,11 @@ function SelectDocument$2(_ref3) {
32709
33029
  });
32710
33030
  }
32711
33031
  const isRwhRequired = isOther && isRwhMandatory;
32712
- const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType(selectedDocument);
33032
+ const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType$1(selectedDocument);
32713
33033
  const rwhMissing = isRwhRequired && !isRwhSatisfied;
33034
+ const isStpRequired = isOther && isStpMandatory;
33035
+ const isStpSatisfied = hasStpUploaded || uploadedFile && isStpDocType$1(selectedDocument);
33036
+ const stpMissing = isStpRequired && !isStpSatisfied;
32714
33037
  const hasOtherUploaded = isOther && (documents === null || documents === void 0 ? void 0 : documents.some(item => {
32715
33038
  var _item$documentType4;
32716
33039
  return item === null || item === void 0 ? void 0 : (_item$documentType4 = item.documentType) === null || _item$documentType4 === void 0 ? void 0 : _item$documentType4.includes(doc === null || doc === void 0 ? void 0 : doc.code);
@@ -32719,8 +33042,9 @@ function SelectDocument$2(_ref3) {
32719
33042
  const isDocNumberMissing = isDocNumberMandatory && (!documentUid || !documentUid.trim());
32720
33043
  const isDocMissing = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code));
32721
33044
  const isPartiallyFilled = isApplicantPhoto ? false : isDocNumberMandatory ? !uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) || isDocNumberMissing : !isCompletelyEmpty && !(uploadedFile && selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code);
32722
- const effectiveRequired = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded || isPartiallyFilled || isOther && isRwhMandatory && !hasRwhUploaded || isDocNumberMandatory;
33045
+ const effectiveRequired = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded || isPartiallyFilled || isOther && isRwhMandatory && !hasRwhUploaded || isOther && isStpMandatory && !hasStpUploaded || isDocNumberMandatory;
32723
33046
  const err = validateDocumentNumber(documentUid, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, isDocNumberMandatory || effectiveRequired, !!uploadedFile);
33047
+ const validityMissing = showValidityDate && (isRwhMandatory || isStpMandatory) && uploadedFile && !validityDate;
32724
33048
  if (!isHidden) {
32725
33049
  if (err) {
32726
33050
  addError();
@@ -32730,13 +33054,17 @@ function SelectDocument$2(_ref3) {
32730
33054
  addError();
32731
33055
  } else if (rwhMissing) {
32732
33056
  addError();
33057
+ } else if (stpMissing) {
33058
+ addError();
33059
+ } else if (validityMissing) {
33060
+ addError();
32733
33061
  } else {
32734
33062
  removeError();
32735
33063
  }
32736
33064
  } else if (isHidden) {
32737
33065
  removeError();
32738
33066
  }
32739
- }, [uploadedFile, selectedDocument, documentUid, isHidden, effectiveRequired, isPartiallyFilled, hasOtherUploaded, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD7 = formData.ConnectionDetails) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7[0], isRwhMandatory, hasRwhUploaded]);
33067
+ }, [uploadedFile, selectedDocument, documentUid, validityDate, isHidden, effectiveRequired, isPartiallyFilled, hasOtherUploaded, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD7 = formData.ConnectionDetails) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7[0], isRwhMandatory, hasRwhUploaded, isStpMandatory, hasStpUploaded]);
32740
33068
  useEffect(() => {
32741
33069
  (function () {
32742
33070
  try {
@@ -32827,15 +33155,21 @@ function SelectDocument$2(_ref3) {
32827
33155
  style: {
32828
33156
  margin: 0
32829
33157
  }
32830
- }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), ((doc === null || doc === void 0 ? void 0 : doc.required) || !isTenant && isOther && isRwhMandatory) && /*#__PURE__*/React.createElement("span", {
33158
+ }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), ((doc === null || doc === void 0 ? void 0 : doc.required) || !isTenant && isOther && (isRwhMandatory || isStpMandatory)) && /*#__PURE__*/React.createElement("span", {
32831
33159
  className: "check-page-link-button"
32832
- }, "*")), " ", !isTenant && isOther && isRwhMandatory && !hasRwhUploaded && !(uploadedFile && isRwhDocType(selectedDocument)) && /*#__PURE__*/React.createElement("div", {
33160
+ }, "*")), " ", !isTenant && isOther && isRwhMandatory && !hasRwhUploaded && !(uploadedFile && isRwhDocType$1(selectedDocument)) && /*#__PURE__*/React.createElement("div", {
33161
+ style: {
33162
+ fontSize: "12px",
33163
+ color: "#d32f2f",
33164
+ marginTop: "-4px"
33165
+ }
33166
+ }, "* ", t("WS_RWH_CERTIFICATE_MANDATORY_MSG") || "Rain Water Harvesting Certificate is mandatory to upload."), !isTenant && isOther && isStpMandatory && !hasStpUploaded && !(uploadedFile && isStpDocType$1(selectedDocument)) && /*#__PURE__*/React.createElement("div", {
32833
33167
  style: {
32834
33168
  fontSize: "12px",
32835
33169
  color: "#d32f2f",
32836
33170
  marginTop: "-4px"
32837
33171
  }
32838
- }, "* ", t("WS_RWH_CERTIFICATE_MANDATORY_MSG") || "Rain Water Harvesting Certificate is mandatory to upload."), /*#__PURE__*/React.createElement(Dropdown, {
33172
+ }, "* ", t("WS_STP_CERTIFICATE_MANDATORY_MSG") || "Sewer Treatment Plant (STP) Certificate is mandatory to upload."), /*#__PURE__*/React.createElement(Dropdown, {
32839
33173
  id: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
32840
33174
  key: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
32841
33175
  className: "form-field",
@@ -32851,7 +33185,36 @@ function SelectDocument$2(_ref3) {
32851
33185
  optionKey: "i18nKey",
32852
33186
  t: t,
32853
33187
  placeholder: t("PT_MUTATION_SELECT_DOC_LABEL")
32854
- })) : null, (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React.createElement("div", {
33188
+ })) : null, showValidityDate && /*#__PURE__*/React.createElement("div", {
33189
+ style: {
33190
+ display: "flex",
33191
+ flexDirection: "column",
33192
+ gap: "8px"
33193
+ }
33194
+ }, /*#__PURE__*/React.createElement(CardLabel, {
33195
+ style: {
33196
+ margin: 0
33197
+ }
33198
+ }, t("WS_VALIDITY_UP_TO") || "Validity up to", ((doc === null || doc === void 0 ? void 0 : doc.required) || isRwhMandatory || isStpMandatory) && /*#__PURE__*/React.createElement("span", {
33199
+ className: "check-page-link-button"
33200
+ }, "*")), /*#__PURE__*/React.createElement("div", {
33201
+ className: "field",
33202
+ style: {
33203
+ width: "100%"
33204
+ }
33205
+ }, /*#__PURE__*/React.createElement(DatePicker, {
33206
+ date: validityDate,
33207
+ onChange: date => setValidityDate(date),
33208
+ style: {
33209
+ width: "100%"
33210
+ }
33211
+ })), uploadedFile && (isRwhMandatory || isStpMandatory) && !validityDate && /*#__PURE__*/React.createElement("div", {
33212
+ style: {
33213
+ fontSize: "12px",
33214
+ color: "#d32f2f",
33215
+ marginTop: "-4px"
33216
+ }
33217
+ }, "* ", t("CORE_COMMON_REQUIRED_ERRMSG") || "This field is required")), (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React.createElement("div", {
32855
33218
  style: {
32856
33219
  display: "flex",
32857
33220
  flexDirection: "column",
@@ -32981,6 +33344,7 @@ function SelectDocument$2(_ref3) {
32981
33344
  setIsCameraFile(false);
32982
33345
  setIsDocumentUidLocked(false);
32983
33346
  setDocumentUid("");
33347
+ setValidityDate("");
32984
33348
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32985
33349
  setSelectedDocument({});
32986
33350
  }
@@ -33013,6 +33377,7 @@ function SelectDocument$2(_ref3) {
33013
33377
  setIsCameraFile(false);
33014
33378
  setIsDocumentUidLocked(false);
33015
33379
  setDocumentUid("");
33380
+ setValidityDate("");
33016
33381
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
33017
33382
  setSelectedDocument({});
33018
33383
  }
@@ -33032,6 +33397,7 @@ function SelectDocument$2(_ref3) {
33032
33397
  setIsCameraFile(false);
33033
33398
  setIsDocumentUidLocked(false);
33034
33399
  setDocumentUid("");
33400
+ setValidityDate("");
33035
33401
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
33036
33402
  setSelectedDocument({});
33037
33403
  }
@@ -33057,6 +33423,7 @@ function SelectDocument$2(_ref3) {
33057
33423
  setIsCameraFile(false);
33058
33424
  setIsDocumentUidLocked(false);
33059
33425
  setDocumentUid("");
33426
+ setValidityDate("");
33060
33427
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
33061
33428
  setSelectedDocument({});
33062
33429
  }
@@ -33077,12 +33444,17 @@ function SelectDocument$2(_ref3) {
33077
33444
  setError(docNumberError);
33078
33445
  return;
33079
33446
  }
33447
+ if (showValidityDate && (isRwhMandatory || isStpMandatory) && !validityDate) {
33448
+ setError(t("WS_PLEASE_SELECT_VALIDITY_DATE") || "Please select validity up to date.");
33449
+ return;
33450
+ }
33080
33451
  pendingId.current = Date.now();
33081
33452
  setUploadedFile(null);
33082
33453
  setFile(null);
33083
33454
  setFileError(null);
33084
33455
  setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
33085
33456
  setDocumentUid("");
33457
+ setValidityDate("");
33086
33458
  setDocNumberError(null);
33087
33459
  setIsDocumentUidLocked(false);
33088
33460
  },
@@ -33105,7 +33477,8 @@ function SelectDocument$2(_ref3) {
33105
33477
  }, fileError), (isOther ? otherUploadedDocuments : uploadedFile ? [{
33106
33478
  fileStoreId: uploadedFile,
33107
33479
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
33108
- documentNumber: documentUid
33480
+ documentNumber: documentUid,
33481
+ validityDate: validityDate
33109
33482
  }] : []).map((uploadedDocument, index) => /*#__PURE__*/React.createElement("div", {
33110
33483
  key: uploadedDocument.fileStoreId || index,
33111
33484
  style: {
@@ -33119,7 +33492,12 @@ function SelectDocument$2(_ref3) {
33119
33492
  style: {
33120
33493
  fontWeight: "bold"
33121
33494
  }
33122
- }, uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName ? t((uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName).replaceAll(".", "_")) : t("CS_COMMON_DOCUMENT"), uploadedDocument.fileName ? ` - ${uploadedDocument.fileName}` : ""), uploadedDocument.documentNumber && /*#__PURE__*/React.createElement("span", null, uploadedDocument.documentNumber), /*#__PURE__*/React.createElement("button", {
33495
+ }, uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName ? t((uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName).replaceAll(".", "_")) : t("CS_COMMON_DOCUMENT"), uploadedDocument.fileName ? ` - ${uploadedDocument.fileName}` : ""), uploadedDocument.documentNumber && /*#__PURE__*/React.createElement("span", null, uploadedDocument.documentNumber), (uploadedDocument.validityDate || uploadedDocument.validityUpTo) && /*#__PURE__*/React.createElement("span", {
33496
+ style: {
33497
+ fontSize: "13px",
33498
+ color: "#333"
33499
+ }
33500
+ }, "(", t("WS_VALIDITY_UP_TO") || "Validity up to", ": ", uploadedDocument.validityDate || uploadedDocument.validityUpTo, ")"), /*#__PURE__*/React.createElement("button", {
33123
33501
  type: "button",
33124
33502
  onClick: () => viewDocument(uploadedDocument.fileStoreId),
33125
33503
  title: t("WS_VIEW_DOCUMENT") || "View Document",
@@ -39905,7 +40283,7 @@ const WSDivyangjan = _ref => {
39905
40283
  };
39906
40284
 
39907
40285
  const WSRainWaterHarvesting = _ref => {
39908
- var _formData$rainWaterHa, _formData$rainWaterHa2, _formData$additionalD, _formData$additionalD2, _formData$config$key2;
40286
+ var _formData$additionalD, _formData$configKey2;
39909
40287
  let {
39910
40288
  config,
39911
40289
  onSelect,
@@ -39915,17 +40293,36 @@ const WSRainWaterHarvesting = _ref => {
39915
40293
  const {
39916
40294
  t
39917
40295
  } = useTranslation();
40296
+ const getInitialValue = () => {
40297
+ const configKey = (config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting";
40298
+ const rwh = formData === null || formData === void 0 ? void 0 : formData[configKey];
40299
+ const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
40300
+ if ((rwh === null || rwh === void 0 ? void 0 : rwh.hasCertificate) !== undefined) {
40301
+ return String(rwh.hasCertificate) === "true" || rwh.hasCertificate === true;
40302
+ }
40303
+ if ((rwh === null || rwh === void 0 ? void 0 : rwh.isRainwaterHarvesting) !== undefined) {
40304
+ return String(rwh.isRainwaterHarvesting) === "true" || rwh.isRainwaterHarvesting === true;
40305
+ }
40306
+ if ((add === null || add === void 0 ? void 0 : add.hasRainWaterHarvestingCertificate) !== undefined) {
40307
+ return String(add.hasRainWaterHarvestingCertificate) === "true" || add.hasRainWaterHarvestingCertificate === true;
40308
+ }
40309
+ if ((add === null || add === void 0 ? void 0 : add.isRainwaterHarvesting) !== undefined) {
40310
+ return String(add.isRainwaterHarvesting) === "true" || add.isRainwaterHarvesting === true;
40311
+ }
40312
+ return false;
40313
+ };
39918
40314
  const {
39919
40315
  control,
39920
- watch
40316
+ watch,
40317
+ setValue
39921
40318
  } = useForm({
39922
40319
  defaultValues: {
39923
- hasCertificate: !!(formData !== null && formData !== void 0 && (_formData$rainWaterHa = formData.rainWaterHarvesting) !== null && _formData$rainWaterHa !== void 0 && _formData$rainWaterHa.hasCertificate || formData !== null && formData !== void 0 && (_formData$rainWaterHa2 = formData.rainWaterHarvesting) !== null && _formData$rainWaterHa2 !== void 0 && _formData$rainWaterHa2.isRainwaterHarvesting || formData !== null && formData !== void 0 && (_formData$additionalD = formData.additionalDetails) !== null && _formData$additionalD !== void 0 && _formData$additionalD.hasRainWaterHarvestingCertificate || formData !== null && formData !== void 0 && (_formData$additionalD2 = formData.additionalDetails) !== null && _formData$additionalD2 !== void 0 && _formData$additionalD2.isRainwaterHarvesting)
40320
+ hasCertificate: getInitialValue()
39924
40321
  }
39925
40322
  });
39926
40323
  const formValue = watch();
39927
40324
  const onSelectRef = useRef(onSelect);
39928
- const goNext = () => onSelect(config.key, {
40325
+ const goNext = () => onSelect((config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting", {
39929
40326
  hasCertificate: !!formValue.hasCertificate,
39930
40327
  isRainwaterHarvesting: !!formValue.hasCertificate
39931
40328
  });
@@ -39933,33 +40330,193 @@ const WSRainWaterHarvesting = _ref => {
39933
40330
  useEffect(() => {
39934
40331
  onSelectRef.current = onSelect;
39935
40332
  }, [onSelect]);
40333
+ const configKey = (config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting";
40334
+ const hasData = !!((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.hasRainWaterHarvestingCertificate) !== undefined);
40335
+ const isInitializedRef = useRef(hasData);
39936
40336
  useEffect(() => {
39937
- if (userType === "employee") {
39938
- var _formData$config$key;
39939
- const currentVal = formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.hasCertificate;
40337
+ var _formData$additionalD2;
40338
+ if (!isInitializedRef.current && ((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasRainWaterHarvestingCertificate) !== undefined)) {
40339
+ setValue("hasCertificate", getInitialValue());
40340
+ isInitializedRef.current = true;
40341
+ }
40342
+ }, [formData === null || formData === void 0 ? void 0 : formData[configKey], formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
40343
+ useEffect(() => {
40344
+ const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
40345
+ if (isEmployeeMode) {
40346
+ var _formData$configKey;
40347
+ const currentVal = formData === null || formData === void 0 ? void 0 : (_formData$configKey = formData[configKey]) === null || _formData$configKey === void 0 ? void 0 : _formData$configKey.hasCertificate;
39940
40348
  const newVal = !!formValue.hasCertificate;
39941
40349
  if (currentVal !== newVal) {
39942
- onSelectRef.current(config.key, {
40350
+ onSelectRef.current(configKey, {
39943
40351
  hasCertificate: newVal,
39944
40352
  isRainwaterHarvesting: newVal
39945
40353
  });
39946
40354
  }
39947
40355
  }
39948
- }, [config.key, formValue.hasCertificate, userType, formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.hasCertificate]);
40356
+ }, [configKey, formValue.hasCertificate, userType, formData === null || formData === void 0 ? void 0 : (_formData$configKey2 = formData[configKey]) === null || _formData$configKey2 === void 0 ? void 0 : _formData$configKey2.hasCertificate]);
39949
40357
  const content = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
39950
40358
  title: t("Rain Water Harvesting Certificate"),
39951
40359
  defaultOpen: true
39952
40360
  }, /*#__PURE__*/React.createElement("div", {
39953
40361
  className: "formcomposer-section-grid"
39954
- }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
40362
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Rain Water Harvesting Certificate")), /*#__PURE__*/React.createElement("div", {
39955
40363
  className: "field"
39956
40364
  }, /*#__PURE__*/React.createElement(Controller, {
39957
40365
  control: control,
39958
40366
  name: "hasCertificate",
39959
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
39960
- label: t("Rain Water Harvesting Certificate"),
39961
- checked: !!props.value,
39962
- onChange: e => props.onChange(e.target.checked)
40367
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
40368
+ className: "form-field",
40369
+ style: {
40370
+ display: "flex",
40371
+ gap: "2rem",
40372
+ alignItems: "center"
40373
+ },
40374
+ name: "hasRainWaterHarvestingCertificateRadio",
40375
+ options: [{
40376
+ i18nKey: "CORE_COMMON_YES",
40377
+ code: true
40378
+ }, {
40379
+ i18nKey: "CORE_COMMON_NO",
40380
+ code: false
40381
+ }],
40382
+ optionsKey: "i18nKey",
40383
+ selectedOption: props.value ? {
40384
+ i18nKey: "CORE_COMMON_YES",
40385
+ code: true
40386
+ } : {
40387
+ i18nKey: "CORE_COMMON_NO",
40388
+ code: false
40389
+ },
40390
+ onSelect: e => props.onChange(e.code),
40391
+ t: t
40392
+ })
40393
+ })))));
40394
+ return userType === "citizen" ? /*#__PURE__*/React.createElement(FormStep, {
40395
+ t: t,
40396
+ config: config,
40397
+ onSelect: goNext,
40398
+ onSkip: onSkip
40399
+ }, content) : content;
40400
+ };
40401
+
40402
+ const WSSewerTreatmentPlant = _ref => {
40403
+ var _formData$additionalD, _formData$additionalD2, _formData$configKey3, _formData$configKey4;
40404
+ let {
40405
+ config,
40406
+ onSelect,
40407
+ userType,
40408
+ formData
40409
+ } = _ref;
40410
+ const {
40411
+ t
40412
+ } = useTranslation();
40413
+ const getInitialValue = () => {
40414
+ const configKey = (config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant";
40415
+ const stp = (formData === null || formData === void 0 ? void 0 : formData[configKey]) || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant);
40416
+ const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
40417
+ if ((stp === null || stp === void 0 ? void 0 : stp.hasCertificate) !== undefined) {
40418
+ return String(stp.hasCertificate) === "true" || stp.hasCertificate === true;
40419
+ }
40420
+ if ((stp === null || stp === void 0 ? void 0 : stp.hasStp) !== undefined) {
40421
+ return String(stp.hasStp) === "true" || stp.hasStp === true;
40422
+ }
40423
+ if ((stp === null || stp === void 0 ? void 0 : stp.isSewerTreatmentPlant) !== undefined) {
40424
+ return String(stp.isSewerTreatmentPlant) === "true" || stp.isSewerTreatmentPlant === true;
40425
+ }
40426
+ if ((add === null || add === void 0 ? void 0 : add.hasSewerTreatmentPlant) !== undefined) {
40427
+ return String(add.hasSewerTreatmentPlant) === "true" || add.hasSewerTreatmentPlant === true;
40428
+ }
40429
+ if ((add === null || add === void 0 ? void 0 : add.hasSewageTreatmentPlant) !== undefined) {
40430
+ return String(add.hasSewageTreatmentPlant) === "true" || add.hasSewageTreatmentPlant === true;
40431
+ }
40432
+ if ((add === null || add === void 0 ? void 0 : add.hasStp) !== undefined) {
40433
+ return String(add.hasStp) === "true" || add.hasStp === true;
40434
+ }
40435
+ if ((add === null || add === void 0 ? void 0 : add.isSewerTreatmentPlant) !== undefined) {
40436
+ return String(add.isSewerTreatmentPlant) === "true" || add.isSewerTreatmentPlant === true;
40437
+ }
40438
+ return false;
40439
+ };
40440
+ const {
40441
+ control,
40442
+ watch,
40443
+ setValue
40444
+ } = useForm({
40445
+ defaultValues: {
40446
+ hasCertificate: getInitialValue()
40447
+ }
40448
+ });
40449
+ const formValue = watch();
40450
+ const onSelectRef = useRef(onSelect);
40451
+ const goNext = () => onSelect((config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant", {
40452
+ hasCertificate: !!formValue.hasCertificate,
40453
+ hasStp: !!formValue.hasCertificate,
40454
+ isSewerTreatmentPlant: !!formValue.hasCertificate
40455
+ });
40456
+ const onSkip = () => onSelect();
40457
+ useEffect(() => {
40458
+ onSelectRef.current = onSelect;
40459
+ }, [onSelect]);
40460
+ const configKey = (config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant";
40461
+ const hasData = !!((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.hasSewerTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasStp) !== undefined);
40462
+ const isInitializedRef = useRef(hasData);
40463
+ useEffect(() => {
40464
+ var _formData$additionalD3, _formData$additionalD4;
40465
+ if (!isInitializedRef.current && ((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.hasSewerTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.hasStp) !== undefined)) {
40466
+ setValue("hasCertificate", getInitialValue());
40467
+ isInitializedRef.current = true;
40468
+ }
40469
+ }, [formData === null || formData === void 0 ? void 0 : formData[configKey], formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant, formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
40470
+ useEffect(() => {
40471
+ const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
40472
+ if (isEmployeeMode) {
40473
+ var _formData$configKey, _formData$configKey2;
40474
+ const currentVal = (formData === null || formData === void 0 ? void 0 : (_formData$configKey = formData[configKey]) === null || _formData$configKey === void 0 ? void 0 : _formData$configKey.hasCertificate) ?? (formData === null || formData === void 0 ? void 0 : (_formData$configKey2 = formData[configKey]) === null || _formData$configKey2 === void 0 ? void 0 : _formData$configKey2.hasStp);
40475
+ const newVal = !!formValue.hasCertificate;
40476
+ if (currentVal !== newVal) {
40477
+ onSelectRef.current(configKey, {
40478
+ hasCertificate: newVal,
40479
+ hasStp: newVal,
40480
+ isSewerTreatmentPlant: newVal
40481
+ });
40482
+ }
40483
+ }
40484
+ }, [configKey, formValue.hasCertificate, userType, formData === null || formData === void 0 ? void 0 : (_formData$configKey3 = formData[configKey]) === null || _formData$configKey3 === void 0 ? void 0 : _formData$configKey3.hasCertificate, formData === null || formData === void 0 ? void 0 : (_formData$configKey4 = formData[configKey]) === null || _formData$configKey4 === void 0 ? void 0 : _formData$configKey4.hasStp]);
40485
+ const content = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
40486
+ title: t("Sewer Treatment Plant (STP)"),
40487
+ defaultOpen: true
40488
+ }, /*#__PURE__*/React.createElement("div", {
40489
+ className: "formcomposer-section-grid"
40490
+ }, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Sewer Treatment Plant (STP)")), /*#__PURE__*/React.createElement("div", {
40491
+ className: "field"
40492
+ }, /*#__PURE__*/React.createElement(Controller, {
40493
+ control: control,
40494
+ name: "hasCertificate",
40495
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
40496
+ className: "form-field",
40497
+ style: {
40498
+ display: "flex",
40499
+ gap: "2rem",
40500
+ alignItems: "center"
40501
+ },
40502
+ name: "hasSewerTreatmentPlantRadio",
40503
+ options: [{
40504
+ i18nKey: "CORE_COMMON_YES",
40505
+ code: true
40506
+ }, {
40507
+ i18nKey: "CORE_COMMON_NO",
40508
+ code: false
40509
+ }],
40510
+ optionsKey: "i18nKey",
40511
+ selectedOption: props.value ? {
40512
+ i18nKey: "CORE_COMMON_YES",
40513
+ code: true
40514
+ } : {
40515
+ i18nKey: "CORE_COMMON_NO",
40516
+ code: false
40517
+ },
40518
+ onSelect: e => props.onChange(e.code),
40519
+ t: t
39963
40520
  })
39964
40521
  })))));
39965
40522
  return userType === "citizen" ? /*#__PURE__*/React.createElement(FormStep, {
@@ -44082,22 +44639,26 @@ const useInboxTableConfig$1 = _ref => {
44082
44639
  Header: t("WS_MYCONNECTIONS_APPLICATION_NO"),
44083
44640
  disableSortBy: true,
44084
44641
  Cell: _ref3 => {
44085
- var _row$original2;
44642
+ var _row$original2, _row$original2$servic, _row$original3, _row$original4;
44086
44643
  let {
44087
44644
  row
44088
44645
  } = _ref3;
44646
+ const service = row !== null && row !== void 0 && (_row$original2 = row.original) !== null && _row$original2 !== void 0 && (_row$original2$servic = _row$original2.service) !== null && _row$original2$servic !== void 0 && _row$original2$servic.includes("SW") ? "SEWERAGE" : "WATER";
44647
+ const fromScreen = service === "WATER" ? "ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL" : "ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL";
44648
+ const applicationNo = row === null || row === void 0 ? void 0 : (_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3["applicationNo"];
44649
+ const linkUrl = `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${applicationNo}&tenantId=${tenantId}&service=${service}&from=${fromScreen}`;
44089
44650
  return /*#__PURE__*/React.createElement("div", {
44090
44651
  style: {
44091
44652
  display: "flex",
44092
44653
  flexDirection: "column"
44093
44654
  }
44094
44655
  }, /*#__PURE__*/React.createElement(Link, {
44095
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original["applicationNo"]}`
44656
+ to: linkUrl
44096
44657
  }, /*#__PURE__*/React.createElement("span", {
44097
44658
  className: "link"
44098
- }, row.original["applicationNo"])), GetCell(t(`BILLAMENDMENT_${row === null || row === void 0 ? void 0 : (_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.amendmentReason}_HEADING`)));
44659
+ }, applicationNo)), GetCell(t(`BILLAMENDMENT_${row === null || row === void 0 ? void 0 : (_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.amendmentReason}_HEADING`)));
44099
44660
  }
44100
- },, {
44661
+ }, {
44101
44662
  Header: t("CORE_COMMON_NAME"),
44102
44663
  disableSortBy: true,
44103
44664
  accessor: "owner"
@@ -44193,14 +44754,17 @@ const useInboxMobileCardsData$1 = _ref => {
44193
44754
  const GetCell = value => /*#__PURE__*/React.createElement("span", {
44194
44755
  className: "cell-text styled-cell"
44195
44756
  }, value);
44196
- const getApplicationNumberCell = (value, amendmentReason) => {
44757
+ const getApplicationNumberCell = (value, amendmentReason, tenantId, service) => {
44758
+ const serviceType = service !== null && service !== void 0 && service.includes("SW") ? "SEWERAGE" : "WATER";
44759
+ const fromScreen = serviceType === "WATER" ? "ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL" : "ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL";
44760
+ const linkUrl = `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${value}&tenantId=${tenantId}&service=${serviceType}&from=${fromScreen}`;
44197
44761
  return /*#__PURE__*/React.createElement("div", {
44198
44762
  style: {
44199
44763
  display: "flex",
44200
44764
  flexDirection: "column"
44201
44765
  }
44202
44766
  }, /*#__PURE__*/React.createElement(Link, {
44203
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${value}`
44767
+ to: linkUrl
44204
44768
  }, /*#__PURE__*/React.createElement("span", {
44205
44769
  className: "link"
44206
44770
  }, value)), GetCell(t(`BILLAMENDMENT_${amendmentReason}_HEADING`)));
@@ -44218,7 +44782,7 @@ const useInboxMobileCardsData$1 = _ref => {
44218
44782
  } = _ref2;
44219
44783
  return {
44220
44784
  [t("WS_COMMON_TABLE_COL_SERVICE_LABEL")]: t(`ACTION_TEST_${service}`),
44221
- [t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason),
44785
+ [t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason, tenantId, service),
44222
44786
  [t("CORE_COMMON_NAME")]: owner,
44223
44787
  [t("WS_COMMON_TABLE_COL_ADDRESS")]: t(Digit.Utils.locale.getRevenueLocalityCode(address, tenantId)),
44224
44788
  [t("WS_COMMON_TABLE_COL_APPLICATION_STATUS")]: t(status),
@@ -44636,13 +45200,15 @@ const SearchBillAmendment = () => {
44636
45200
  Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
44637
45201
  accessor: "amendmentId",
44638
45202
  Cell: _ref => {
45203
+ var _row$original, _row$original$busines;
44639
45204
  let {
44640
45205
  row
44641
45206
  } = _ref;
45207
+ const service = (_row$original = row.original) !== null && _row$original !== void 0 && (_row$original$busines = _row$original.businessService) !== null && _row$original$busines !== void 0 && _row$original$busines.includes("SW") ? "SEWERAGE" : "WATER";
44642
45208
  return /*#__PURE__*/React.createElement("span", {
44643
45209
  className: "link"
44644
45210
  }, /*#__PURE__*/React.createElement(Link, {
44645
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
45211
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}&tenantId=${tenantId}&service=${service}&from=WS_BILL_AMENDMENT_SEARCH_APPLICATION`
44646
45212
  }, row.original.amendmentId));
44647
45213
  }
44648
45214
  }, {
@@ -44673,13 +45239,15 @@ const SearchBillAmendment = () => {
44673
45239
  }, {
44674
45240
  Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
44675
45241
  Cell: _ref3 => {
45242
+ var _row$original2, _row$original2$busine;
44676
45243
  let {
44677
45244
  row
44678
45245
  } = _ref3;
45246
+ const service = (_row$original2 = row.original) !== null && _row$original2 !== void 0 && (_row$original2$busine = _row$original2.businessService) !== null && _row$original2$busine !== void 0 && _row$original2$busine.includes("SW") ? "SEWERAGE" : "WATER";
44679
45247
  return /*#__PURE__*/React.createElement("span", {
44680
45248
  className: "link"
44681
45249
  }, /*#__PURE__*/React.createElement(Link, {
44682
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
45250
+ to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}&tenantId=${tenantId}&service=${service}&from=WS_BILL_AMENDMENT_SEARCH_APPLICATION`
44683
45251
  }, t("ES_COMMON_VIEW", "View")));
44684
45252
  }
44685
45253
  }], [t, tenantId]);
@@ -44923,12 +45491,25 @@ const newConfig = [{
44923
45491
  route: "rain-water-harvesting",
44924
45492
  component: "WSRainWaterHarvesting",
44925
45493
  key: "rainWaterHarvesting",
45494
+ nextStep: "sewer-treatment-plant",
45495
+ WATER: "sewer-treatment-plant",
45496
+ hideInEmployee: true,
45497
+ texts: {
45498
+ headerCaption: "WS_COMMON_CONNECTION_DETAIL",
45499
+ header: "Rain Water Harvesting Certificate",
45500
+ cardText: "",
45501
+ submitBarLabel: "CS_COMMON_NEXT"
45502
+ }
45503
+ }, {
45504
+ route: "sewer-treatment-plant",
45505
+ component: "WSSewerTreatmentPlant",
45506
+ key: "sewerTreatmentPlant",
44926
45507
  nextStep: "document-details",
44927
45508
  WATER: "document-details",
44928
45509
  hideInEmployee: true,
44929
45510
  texts: {
44930
45511
  headerCaption: "WS_COMMON_CONNECTION_DETAIL",
44931
- header: "Rain Water Harvesting Certificate",
45512
+ header: "Sewer Treatment Plant (STP)",
44932
45513
  cardText: "",
44933
45514
  submitBarLabel: "CS_COMMON_NEXT"
44934
45515
  }
@@ -49797,7 +50378,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
49797
50378
  };
49798
50379
 
49799
50380
  const ConnectionDetails$5 = () => {
49800
- 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, _state5, _state6, _state6$applicationTy, _state7, _state8, _state9, _state0, _state0$applicationTy, _state1, _state10, _state11, _state12, _state12$applicationT, _state13, _state14, _state15, _state16, _state17, _state17$applicationT, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state20$waterSource, _state20$waterSource$, _state21, _state22, _state23, _state24, _state24$additionalDe, _state25, _state25$applicationT, _state26, _state26$additionalDe, _state26$additionalDe2, _state27, _state27$additionalDe, _state27$additionalDe2, _state28, _state28$additionalDe, _state29, _state29$additionalDe, _state30, _state30$additionalDe, _state30$additionalDe2, _state31, _state31$additionalDe, _state32, _state33, _state34, _state34$property, _state34$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, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state36$additionalDe2, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state40$additionalDe2, _state41, _state41$additionalDe, _state41$additionalDe2, _state42, _state42$additionalDe, _state43, _state43$additionalDe, _state44, _state44$additionalDe, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state48$additionalDe, _state49, _state50, _state51, _state52, _state52$connectionHo, _state52$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, _state53, _state54, _state57, _state57$status, _state58, _state58$applicationS, _state59, _paymentDetails$data17, _paymentDetails$data18;
50381
+ 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, _state2$applicationTy, _state3, _state6, _state9, _state0, _state1, _state10, _state11, _state11$applicationT, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state17, _state18, _state19, _state20, _state20$applicationT, _state21, _state21$waterSource, _state21$waterSource$, _state22, _state23, _state23$waterSource, _state23$waterSource$, _state24, _state25, _state26, _state27, _state27$additionalDe, _state28, _state28$applicationT, _state29, _state29$additionalDe, _state29$additionalDe2, _state30, _state30$additionalDe, _state30$additionalDe2, _state31, _state31$additionalDe, _state32, _state32$additionalDe, _state33, _state33$additionalDe, _state33$additionalDe2, _state34, _state34$additionalDe, _state35, _state36, _state37, _state37$property, _state37$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, _state38, _state38$additionalDe, _state38$additionalDe2, _state39, _state39$additionalDe, _state39$additionalDe2, _state40, _state40$additionalDe, _state41, _state41$additionalDe, _state42, _state42$additionalDe, _state43, _state43$additionalDe, _state43$additionalDe2, _state44, _state44$additionalDe, _state44$additionalDe2, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state48$additionalDe, _state49, _state49$additionalDe, _state50, _state50$additionalDe, _state51, _state51$additionalDe, _state52, _state53, _state54, _state55, _state55$connectionHo, _state55$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, _state56, _state57, _state60, _state60$status, _state61, _state61$applicationS, _state62, _paymentDetails$data17, _paymentDetails$data18;
49801
50382
  const {
49802
50383
  t
49803
50384
  } = useTranslation();
@@ -49812,6 +50393,7 @@ const ConnectionDetails$5 = () => {
49812
50393
  } = useLocation();
49813
50394
  const [showModal, setshowModal] = useState(false);
49814
50395
  const [showActionToast, setshowActionToast] = useState(null);
50396
+ const [activeAmendment, setActiveAmendment] = useState(null);
49815
50397
  const mobileView = Digit.Utils.browser.isMobile();
49816
50398
  const getAddress = address => {
49817
50399
  var _address$locality, _address$locality2, _address$city;
@@ -49973,9 +50555,10 @@ const ConnectionDetails$5 = () => {
49973
50555
  downloadOptions.sort(function (a, b) {
49974
50556
  return a.order - b.order;
49975
50557
  });
49976
- const isSW = (_state = state) === null || _state === void 0 ? void 0 : (_state$applicationNo = _state.applicationNo) === null || _state$applicationNo === void 0 ? void 0 : _state$applicationNo.includes("SW");
50558
+ const isSW = ((_state = state) === null || _state === void 0 ? void 0 : (_state$applicationNo = _state.applicationNo) === null || _state$applicationNo === void 0 ? void 0 : _state$applicationNo.includes("SW")) || (applicationNobyData === null || applicationNobyData === void 0 ? void 0 : applicationNobyData.includes("SW"));
50559
+ const serviceType = (_state2 = state) !== null && _state2 !== void 0 && (_state2$applicationTy = _state2.applicationType) !== null && _state2$applicationTy !== void 0 && _state2$applicationTy.includes("WATER") || applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("WS") ? "WATER" : "SEWERAGE";
49977
50560
  const fetchBillParams = {
49978
- consumerCode: (_state2 = state) === null || _state2 === void 0 ? void 0 : _state2.connectionNo
50561
+ consumerCode: (_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.connectionNo
49979
50562
  };
49980
50563
  const paymentDetails = Digit.Hooks.useFetchBillsForBuissnessService({
49981
50564
  businessService: isSW ? "SW" : "WS",
@@ -50051,11 +50634,45 @@ const ConnectionDetails$5 = () => {
50051
50634
  }
50052
50635
  }
50053
50636
  };
50637
+ useEffect(() => {
50638
+ let isMounted = true;
50639
+ const checkActiveAmendment = function () {
50640
+ try {
50641
+ var _state4, _state5;
50642
+ const connNo = (_state4 = state) === null || _state4 === void 0 ? void 0 : _state4.connectionNo;
50643
+ if (!connNo) return Promise.resolve();
50644
+ const finalTenantId = tenantId || ((_state5 = state) === null || _state5 === void 0 ? void 0 : _state5.tenantId) || "dl.djb";
50645
+ const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
50646
+ const businessService = finalServiceType === "WATER" ? "WS" : "SW";
50647
+ const _temp3 = _catch(function () {
50648
+ return Promise.resolve(Digit.PaymentService.searchAmendment(finalTenantId, {
50649
+ consumerCode: connNo,
50650
+ businessService
50651
+ })).then(function (res) {
50652
+ var _res$Amendments;
50653
+ const inWorkflow = res === null || res === void 0 ? void 0 : (_res$Amendments = res.Amendments) === null || _res$Amendments === void 0 ? void 0 : _res$Amendments.find(item => (item === null || item === void 0 ? void 0 : item.status) === "INWORKFLOW");
50654
+ if (isMounted && inWorkflow) {
50655
+ setActiveAmendment(inWorkflow);
50656
+ }
50657
+ });
50658
+ }, function (e) {
50659
+ console.warn("Could not check active amendment in connection details", e);
50660
+ });
50661
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
50662
+ } catch (e) {
50663
+ return Promise.reject(e);
50664
+ }
50665
+ };
50666
+ checkActiveAmendment();
50667
+ return () => {
50668
+ isMounted = false;
50669
+ };
50670
+ }, [(_state6 = state) === null || _state6 === void 0 ? void 0 : _state6.connectionNo, applicationNobyData, serviceType, tenantId]);
50054
50671
  const getBillAmendmentButton = function () {
50055
50672
  try {
50056
- var _state3, _state4;
50673
+ var _state7, _state8;
50057
50674
  let _exit = false;
50058
- function _temp4(_result) {
50675
+ function _temp5(_result) {
50059
50676
  if (_exit) return _result;
50060
50677
  history.push(`/digit-ui/citizen/ws/bill-amendment?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
50061
50678
  data: {
@@ -50064,32 +50681,26 @@ const ConnectionDetails$5 = () => {
50064
50681
  }
50065
50682
  }));
50066
50683
  }
50067
- const connNo = ((_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.connectionNo) || applicationNobyData;
50068
- const finalTenantId = tenantId || ((_state4 = state) === null || _state4 === void 0 ? void 0 : _state4.tenantId) || "dl.djb";
50684
+ const connNo = ((_state7 = state) === null || _state7 === void 0 ? void 0 : _state7.connectionNo) || applicationNobyData;
50685
+ const finalTenantId = tenantId || ((_state8 = state) === null || _state8 === void 0 ? void 0 : _state8.tenantId) || "dl.djb";
50069
50686
  const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
50070
50687
  const businessService = finalServiceType === "WATER" ? "WS" : "SW";
50071
- const _temp3 = _catch(function () {
50688
+ const _temp4 = _catch(function () {
50072
50689
  return Promise.resolve(Digit.PaymentService.searchAmendment(finalTenantId, {
50073
50690
  consumerCode: connNo,
50074
50691
  businessService
50075
50692
  })).then(function (res) {
50076
- var _res$Amendments;
50077
- const inWorkflow = res === null || res === void 0 ? void 0 : (_res$Amendments = res.Amendments) === null || _res$Amendments === void 0 ? void 0 : _res$Amendments.some(item => (item === null || item === void 0 ? void 0 : item.status) === "INWORKFLOW");
50693
+ var _res$Amendments2;
50694
+ const inWorkflow = res === null || res === void 0 ? void 0 : (_res$Amendments2 = res.Amendments) === null || _res$Amendments2 === void 0 ? void 0 : _res$Amendments2.find(item => (item === null || item === void 0 ? void 0 : item.status) === "INWORKFLOW");
50078
50695
  if (inWorkflow) {
50079
- setshowActionToast({
50080
- key: "error",
50081
- label: "WORKFLOW_IN_PROGRESS"
50082
- });
50083
- setTimeout(() => {
50084
- closeBillToast();
50085
- }, 5000);
50696
+ history.push(`/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${inWorkflow.amendmentId}`);
50086
50697
  _exit = true;
50087
50698
  }
50088
50699
  });
50089
50700
  }, function (e) {
50090
50701
  console.error("Error searching amendment", e);
50091
50702
  });
50092
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3));
50703
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
50093
50704
  } catch (e) {
50094
50705
  return Promise.reject(e);
50095
50706
  }
@@ -50127,8 +50738,7 @@ const ConnectionDetails$5 = () => {
50127
50738
  if (isLoading || isPTLoading) {
50128
50739
  return /*#__PURE__*/React.createElement(Loader, null);
50129
50740
  }
50130
- sessionStorage.setItem("ApplicationNoState", (_state5 = state) === null || _state5 === void 0 ? void 0 : _state5.applicationNo);
50131
- let serviceType = (_state6 = state) !== null && _state6 !== void 0 && (_state6$applicationTy = _state6.applicationType) !== null && _state6$applicationTy !== void 0 && _state6$applicationTy.includes("WATER") ? "WATER" : "SEWERAGE";
50741
+ sessionStorage.setItem("ApplicationNoState", (_state9 = state) === null || _state9 === void 0 ? void 0 : _state9.applicationNo);
50132
50742
  return /*#__PURE__*/React.createElement(React.Fragment, null, checkifPrivacyenabled && /*#__PURE__*/React.createElement(WSInfoLabel, {
50133
50743
  t: t
50134
50744
  }), /*#__PURE__*/React.createElement("div", {
@@ -50149,21 +50759,64 @@ const ConnectionDetails$5 = () => {
50149
50759
  options: downloadOptions,
50150
50760
  downloadBtnClassName: "employee-download-btn-className",
50151
50761
  optionsClassName: "employee-options-btn-className"
50152
- }))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
50762
+ }))), activeAmendment && /*#__PURE__*/React.createElement("div", {
50763
+ style: {
50764
+ padding: "14px 16px",
50765
+ backgroundColor: "#EFF6FF",
50766
+ border: "1px solid #BFDBFE",
50767
+ borderRadius: "8px",
50768
+ marginBottom: "20px"
50769
+ }
50770
+ }, /*#__PURE__*/React.createElement("div", {
50771
+ style: {
50772
+ display: "flex",
50773
+ justifyContent: "space-between",
50774
+ alignItems: "center",
50775
+ flexWrap: "wrap",
50776
+ gap: "10px"
50777
+ }
50778
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
50779
+ style: {
50780
+ fontWeight: "700",
50781
+ color: "#1E40AF",
50782
+ fontSize: "16px"
50783
+ }
50784
+ }, t("WS_ACTIVE_BILL_AMENDMENT_LABEL", "Active Bill Correction / Amendment Request")), /*#__PURE__*/React.createElement("div", {
50785
+ style: {
50786
+ color: "#1E3A8A",
50787
+ fontSize: "14px",
50788
+ marginTop: "4px"
50789
+ }
50790
+ }, t("WS_APPLICATION_NO_LABEL", "Application No:"), " ", /*#__PURE__*/React.createElement("strong", null, activeAmendment.amendmentId), " | ", t("WS_STATUS_LABEL", "Status:"), " ", /*#__PURE__*/React.createElement("span", {
50791
+ style: {
50792
+ fontWeight: "600",
50793
+ color: "#B45309"
50794
+ }
50795
+ }, t(`CS_${activeAmendment.status}`, activeAmendment.status)))), /*#__PURE__*/React.createElement(Link, {
50796
+ to: `/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${activeAmendment.amendmentId}`
50797
+ }, /*#__PURE__*/React.createElement("button", {
50798
+ className: "selector-button-border",
50799
+ style: {
50800
+ height: "36px",
50801
+ padding: "0 16px",
50802
+ margin: 0,
50803
+ cursor: "pointer"
50804
+ }
50805
+ }, t("WS_TRACK_OR_RESUBMIT_LABEL", "View Details & Track / Re-Submit"))))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
50153
50806
  className: "border-none",
50154
50807
  label: t("WS_MYCONNECTIONS_CONSUMER_NO"),
50155
- text: (_state7 = state) === null || _state7 === void 0 ? void 0 : _state7.connectionNo
50808
+ text: (_state0 = state) === null || _state0 === void 0 ? void 0 : _state0.connectionNo
50156
50809
  }), /*#__PURE__*/React.createElement(Row, {
50157
50810
  className: "border-none",
50158
50811
  label: t("WS_SERVICE_NAME_LABEL"),
50159
- text: t(`WS_APPLICATION_TYPE_${(_state8 = state) === null || _state8 === void 0 ? void 0 : _state8.applicationType}`),
50812
+ text: t(`WS_APPLICATION_TYPE_${(_state1 = state) === null || _state1 === void 0 ? void 0 : _state1.applicationType}`),
50160
50813
  textStyle: {
50161
50814
  wordBreak: "break-word"
50162
50815
  }
50163
50816
  }), /*#__PURE__*/React.createElement(Row, {
50164
50817
  className: "border-none",
50165
50818
  label: t("WS_STATUS"),
50166
- text: ((_state9 = state) === null || _state9 === void 0 ? void 0 : _state9.status) || "NA",
50819
+ text: ((_state10 = state) === null || _state10 === void 0 ? void 0 : _state10.status) || "NA",
50167
50820
  textStyle: {
50168
50821
  whiteSpace: "pre"
50169
50822
  }
@@ -50171,127 +50824,127 @@ const ConnectionDetails$5 = () => {
50171
50824
  styles: {
50172
50825
  fontSize: "28px"
50173
50826
  }
50174
- }, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, null, ((_state0 = state) === null || _state0 === void 0 ? void 0 : (_state0$applicationTy = _state0.applicationType) === null || _state0$applicationTy === void 0 ? void 0 : _state0$applicationTy.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50827
+ }, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, null, ((_state11 = state) === null || _state11 === void 0 ? void 0 : (_state11$applicationT = _state11.applicationType) === null || _state11$applicationT === void 0 ? void 0 : _state11$applicationT.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50175
50828
  className: "border-none",
50176
50829
  label: t("WS_COMMON_TABLE_COL_CONNECTIONTYPE_LABEL"),
50177
- text: ((_state1 = state) === null || _state1 === void 0 ? void 0 : _state1.connectionType) || t("NA"),
50830
+ text: ((_state12 = state) === null || _state12 === void 0 ? void 0 : _state12.connectionType) || t("NA"),
50178
50831
  textStyle: {
50179
50832
  whiteSpace: "pre"
50180
50833
  }
50181
50834
  }), /*#__PURE__*/React.createElement(Row, {
50182
50835
  className: "border-none",
50183
50836
  label: t("WS_SERV_DETAIL_NO_OF_TAPS"),
50184
- text: (_state10 = state) === null || _state10 === void 0 ? void 0 : _state10.noOfTaps,
50837
+ text: (_state13 = state) === null || _state13 === void 0 ? void 0 : _state13.noOfTaps,
50185
50838
  textStyle: {
50186
50839
  whiteSpace: "pre"
50187
50840
  }
50188
50841
  }), /*#__PURE__*/React.createElement(Row, {
50189
50842
  className: "border-none",
50190
50843
  label: t("WS_PIPE_SIZE_IN_INCHES_LABEL"),
50191
- text: ((_state11 = state) === null || _state11 === void 0 ? void 0 : _state11.pipeSize) || "NA",
50844
+ text: ((_state14 = state) === null || _state14 === void 0 ? void 0 : _state14.pipeSize) || "NA",
50192
50845
  textStyle: {
50193
50846
  whiteSpace: "pre"
50194
50847
  }
50195
- })), ((_state12 = state) === null || _state12 === void 0 ? void 0 : (_state12$applicationT = _state12.applicationType) === null || _state12$applicationT === void 0 ? void 0 : _state12$applicationT.includes("SEWERAGE")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50848
+ })), ((_state15 = state) === null || _state15 === void 0 ? void 0 : (_state15$applicationT = _state15.applicationType) === null || _state15$applicationT === void 0 ? void 0 : _state15$applicationT.includes("SEWERAGE")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50196
50849
  className: "border-none",
50197
50850
  label: t("WS_CONN_DETAIL_WATER_CLOSETS"),
50198
- text: (_state13 = state) === null || _state13 === void 0 ? void 0 : _state13.proposedWaterClosets,
50851
+ text: (_state16 = state) === null || _state16 === void 0 ? void 0 : _state16.proposedWaterClosets,
50199
50852
  textStyle: {
50200
50853
  whiteSpace: "pre"
50201
50854
  }
50202
50855
  }), /*#__PURE__*/React.createElement(Row, {
50203
50856
  className: "border-none",
50204
50857
  label: t("WS_SERV_DETAIL_NO_OF_TOILETS"),
50205
- text: ((_state14 = state) === null || _state14 === void 0 ? void 0 : _state14.proposedToilets) || t("CS_NA"),
50858
+ text: ((_state17 = state) === null || _state17 === void 0 ? void 0 : _state17.proposedToilets) || t("CS_NA"),
50206
50859
  textStyle: {
50207
50860
  whiteSpace: "pre"
50208
50861
  }
50209
50862
  }), /*#__PURE__*/React.createElement(Row, {
50210
50863
  className: "border-none",
50211
50864
  label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
50212
- text: (_state15 = state) !== null && _state15 !== void 0 && _state15.connectionExecutionDate ? Digit.DateUtils.ConvertEpochToDate((_state16 = state) === null || _state16 === void 0 ? void 0 : _state16.connectionExecutionDate) : t("CS_NA"),
50865
+ text: (_state18 = state) !== null && _state18 !== void 0 && _state18.connectionExecutionDate ? Digit.DateUtils.ConvertEpochToDate((_state19 = state) === null || _state19 === void 0 ? void 0 : _state19.connectionExecutionDate) : t("CS_NA"),
50213
50866
  textStyle: {
50214
50867
  whiteSpace: "pre"
50215
50868
  }
50216
- })), ((_state17 = state) === null || _state17 === void 0 ? void 0 : (_state17$applicationT = _state17.applicationType) === null || _state17$applicationT === void 0 ? void 0 : _state17$applicationT.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50869
+ })), ((_state20 = state) === null || _state20 === void 0 ? void 0 : (_state20$applicationT = _state20.applicationType) === null || _state20$applicationT === void 0 ? void 0 : _state20$applicationT.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50217
50870
  className: "border-none",
50218
50871
  label: t("WS_SERV_DETAIL_WATER_SOURCE"),
50219
- text: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state18 = state) === null || _state18 === void 0 ? void 0 : (_state18$waterSource = _state18.waterSource) === null || _state18$waterSource === void 0 ? void 0 : (_state18$waterSource$ = _state18$waterSource.split(".")) === null || _state18$waterSource$ === void 0 ? void 0 : _state18$waterSource$[0], ".", "_")}`) || t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state19 = state) === null || _state19 === void 0 ? void 0 : _state19.waterSource, ".", "_")}`) || t("CS_NA"),
50872
+ text: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state21 = state) === null || _state21 === void 0 ? void 0 : (_state21$waterSource = _state21.waterSource) === null || _state21$waterSource === void 0 ? void 0 : (_state21$waterSource$ = _state21$waterSource.split(".")) === null || _state21$waterSource$ === void 0 ? void 0 : _state21$waterSource$[0], ".", "_")}`) || t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state22 = state) === null || _state22 === void 0 ? void 0 : _state22.waterSource, ".", "_")}`) || t("CS_NA"),
50220
50873
  textStyle: {
50221
50874
  whiteSpace: "pre"
50222
50875
  }
50223
50876
  }), /*#__PURE__*/React.createElement(Row, {
50224
50877
  className: "border-none",
50225
50878
  label: t("WS_SERV_DETAIL_WATER_SUB_SOURCE"),
50226
- text: t((_state20 = state) === null || _state20 === void 0 ? void 0 : (_state20$waterSource = _state20.waterSource) === null || _state20$waterSource === void 0 ? void 0 : (_state20$waterSource$ = _state20$waterSource.split(".")) === null || _state20$waterSource$ === void 0 ? void 0 : _state20$waterSource$[1]) || t("CS_NA"),
50879
+ text: t((_state23 = state) === null || _state23 === void 0 ? void 0 : (_state23$waterSource = _state23.waterSource) === null || _state23$waterSource === void 0 ? void 0 : (_state23$waterSource$ = _state23$waterSource.split(".")) === null || _state23$waterSource$ === void 0 ? void 0 : _state23$waterSource$[1]) || t("CS_NA"),
50227
50880
  textStyle: {
50228
50881
  whiteSpace: "pre"
50229
50882
  }
50230
50883
  }), /*#__PURE__*/React.createElement(Row, {
50231
50884
  className: "border-none",
50232
50885
  label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
50233
- text: Digit.DateUtils.ConvertEpochToDate((_state21 = state) === null || _state21 === void 0 ? void 0 : _state21.connectionExecutionDate) || t("NA"),
50886
+ text: Digit.DateUtils.ConvertEpochToDate((_state24 = state) === null || _state24 === void 0 ? void 0 : _state24.connectionExecutionDate) || t("NA"),
50234
50887
  textStyle: {
50235
50888
  whiteSpace: "pre"
50236
50889
  }
50237
50890
  }), /*#__PURE__*/React.createElement(Row, {
50238
50891
  className: "border-none",
50239
50892
  label: t("WS_SERV_DETAIL_METER_ID"),
50240
- text: (_state22 = state) === null || _state22 === void 0 ? void 0 : _state22.meterId,
50893
+ text: (_state25 = state) === null || _state25 === void 0 ? void 0 : _state25.meterId,
50241
50894
  textStyle: {
50242
50895
  whiteSpace: "pre"
50243
50896
  }
50244
50897
  }), /*#__PURE__*/React.createElement(Row, {
50245
50898
  className: "border-none",
50246
50899
  label: t("WS_ADDN_DETAIL_METER_INSTALL_DATE"),
50247
- text: Digit.DateUtils.ConvertEpochToDate((_state23 = state) === null || _state23 === void 0 ? void 0 : _state23.meterInstallationDate) || "NA",
50900
+ text: Digit.DateUtils.ConvertEpochToDate((_state26 = state) === null || _state26 === void 0 ? void 0 : _state26.meterInstallationDate) || "NA",
50248
50901
  textStyle: {
50249
50902
  whiteSpace: "pre"
50250
50903
  }
50251
50904
  }), /*#__PURE__*/React.createElement(Row, {
50252
50905
  className: "border-none",
50253
50906
  label: t("WS_ADDN_DETAILS_INITIAL_METER_READING"),
50254
- text: ((_state24 = state) === null || _state24 === void 0 ? void 0 : (_state24$additionalDe = _state24.additionalDetails) === null || _state24$additionalDe === void 0 ? void 0 : _state24$additionalDe.initialMeterReading) || "NA",
50907
+ text: ((_state27 = state) === null || _state27 === void 0 ? void 0 : (_state27$additionalDe = _state27.additionalDetails) === null || _state27$additionalDe === void 0 ? void 0 : _state27$additionalDe.initialMeterReading) || "NA",
50255
50908
  textStyle: {
50256
50909
  whiteSpace: "pre"
50257
50910
  }
50258
- })), ((_state25 = state) === null || _state25 === void 0 ? void 0 : (_state25$applicationT = _state25.applicationType) === null || _state25$applicationT === void 0 ? void 0 : _state25$applicationT.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50911
+ })), ((_state28 = state) === null || _state28 === void 0 ? void 0 : (_state28$applicationT = _state28.applicationType) === null || _state28$applicationT === void 0 ? void 0 : _state28$applicationT.includes("WATER")) && /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Row, {
50259
50912
  className: "border-none",
50260
50913
  label: t("WS_WATER_DEMAND_TYPE"),
50261
- text: (_state26 = state) !== null && _state26 !== void 0 && (_state26$additionalDe = _state26.additionalDetails) !== null && _state26$additionalDe !== void 0 && (_state26$additionalDe2 = _state26$additionalDe.waterDemandType) !== null && _state26$additionalDe2 !== void 0 && _state26$additionalDe2.i18nKey ? t((_state27 = state) === null || _state27 === void 0 ? void 0 : (_state27$additionalDe = _state27.additionalDetails) === null || _state27$additionalDe === void 0 ? void 0 : (_state27$additionalDe2 = _state27$additionalDe.waterDemandType) === null || _state27$additionalDe2 === void 0 ? void 0 : _state27$additionalDe2.i18nKey) : "NA",
50914
+ text: (_state29 = state) !== null && _state29 !== void 0 && (_state29$additionalDe = _state29.additionalDetails) !== null && _state29$additionalDe !== void 0 && (_state29$additionalDe2 = _state29$additionalDe.waterDemandType) !== null && _state29$additionalDe2 !== void 0 && _state29$additionalDe2.i18nKey ? t((_state30 = state) === null || _state30 === void 0 ? void 0 : (_state30$additionalDe = _state30.additionalDetails) === null || _state30$additionalDe === void 0 ? void 0 : (_state30$additionalDe2 = _state30$additionalDe.waterDemandType) === null || _state30$additionalDe2 === void 0 ? void 0 : _state30$additionalDe2.i18nKey) : "NA",
50262
50915
  textStyle: {
50263
50916
  whiteSpace: "pre"
50264
50917
  }
50265
50918
  }), /*#__PURE__*/React.createElement(Row, {
50266
50919
  className: "border-none",
50267
50920
  label: t("WS_CATEGORY_TYPE"),
50268
- text: ((_state28 = state) === null || _state28 === void 0 ? void 0 : (_state28$additionalDe = _state28.additionalDetails) === null || _state28$additionalDe === void 0 ? void 0 : _state28$additionalDe.categoryType) || "NA",
50921
+ text: ((_state31 = state) === null || _state31 === void 0 ? void 0 : (_state31$additionalDe = _state31.additionalDetails) === null || _state31$additionalDe === void 0 ? void 0 : _state31$additionalDe.categoryType) || "NA",
50269
50922
  textStyle: {
50270
50923
  whiteSpace: "pre"
50271
50924
  }
50272
50925
  }), /*#__PURE__*/React.createElement(Row, {
50273
50926
  className: "border-none",
50274
50927
  label: t("WS_ZRO_NAME"),
50275
- text: ((_state29 = state) === null || _state29 === void 0 ? void 0 : (_state29$additionalDe = _state29.additionalDetails) === null || _state29$additionalDe === void 0 ? void 0 : _state29$additionalDe.zro) || "NA",
50928
+ text: ((_state32 = state) === null || _state32 === void 0 ? void 0 : (_state32$additionalDe = _state32.additionalDetails) === null || _state32$additionalDe === void 0 ? void 0 : _state32$additionalDe.zro) || "NA",
50276
50929
  textStyle: {
50277
50930
  whiteSpace: "pre"
50278
50931
  }
50279
50932
  }), /*#__PURE__*/React.createElement(Row, {
50280
50933
  className: "border-none",
50281
50934
  label: t("WS_CONNECTION_USAGE_TYPE"),
50282
- text: ((_state30 = state) === null || _state30 === void 0 ? void 0 : (_state30$additionalDe = _state30.additionalDetails) === null || _state30$additionalDe === void 0 ? void 0 : (_state30$additionalDe2 = _state30$additionalDe.WaterConnectionUsageType) === null || _state30$additionalDe2 === void 0 ? void 0 : _state30$additionalDe2.name) || "NA",
50935
+ text: ((_state33 = state) === null || _state33 === void 0 ? void 0 : (_state33$additionalDe = _state33.additionalDetails) === null || _state33$additionalDe === void 0 ? void 0 : (_state33$additionalDe2 = _state33$additionalDe.WaterConnectionUsageType) === null || _state33$additionalDe2 === void 0 ? void 0 : _state33$additionalDe2.name) || "NA",
50283
50936
  textStyle: {
50284
50937
  whiteSpace: "pre"
50285
50938
  }
50286
50939
  }), /*#__PURE__*/React.createElement(Row, {
50287
50940
  className: "border-none",
50288
50941
  label: t("WS_TEMPORARY_CONNECTION"),
50289
- text: ((_state31 = state) === null || _state31 === void 0 ? void 0 : (_state31$additionalDe = _state31.additionalDetails) === null || _state31$additionalDe === void 0 ? void 0 : _state31$additionalDe.temporaryConnection) || "NA",
50942
+ text: ((_state34 = state) === null || _state34 === void 0 ? void 0 : (_state34$additionalDe = _state34.additionalDetails) === null || _state34$additionalDe === void 0 ? void 0 : _state34$additionalDe.temporaryConnection) || "NA",
50290
50943
  textStyle: {
50291
50944
  whiteSpace: "pre"
50292
50945
  }
50293
- })), ((_state32 = state) === null || _state32 === void 0 ? void 0 : _state32.connectionType) === "Metered" && /*#__PURE__*/React.createElement(Link, {
50294
- to: `/digit-ui/citizen/ws/consumption/details?applicationNo=${(_state33 = state) === null || _state33 === void 0 ? void 0 : _state33.connectionNo}`
50946
+ })), ((_state35 = state) === null || _state35 === void 0 ? void 0 : _state35.connectionType) === "Metered" && /*#__PURE__*/React.createElement(Link, {
50947
+ to: `/digit-ui/citizen/ws/consumption/details?applicationNo=${(_state36 = state) === null || _state36 === void 0 ? void 0 : _state36.connectionNo}`
50295
50948
  }, /*#__PURE__*/React.createElement(LinkButton, {
50296
50949
  style: {
50297
50950
  textAlign: "left",
@@ -50306,7 +50959,7 @@ const ConnectionDetails$5 = () => {
50306
50959
  }, t("WS_COMMON_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
50307
50960
  className: "border-none",
50308
50961
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
50309
- text: (_state34 = state) === null || _state34 === void 0 ? void 0 : (_state34$property = _state34.property) === null || _state34$property === void 0 ? void 0 : (_state34$property$own = _state34$property.owners) === null || _state34$property$own === void 0 ? void 0 : _state34$property$own.map(owner => owner.name).join(","),
50962
+ text: (_state37 = state) === null || _state37 === void 0 ? void 0 : (_state37$property = _state37.property) === null || _state37$property === void 0 ? void 0 : (_state37$property$own = _state37$property.owners) === null || _state37$property$own === void 0 ? void 0 : _state37$property$own.map(owner => owner.name).join(","),
50310
50963
  textStyle: {
50311
50964
  whiteSpace: "pre"
50312
50965
  }
@@ -50341,32 +50994,32 @@ const ConnectionDetails$5 = () => {
50341
50994
  }), /*#__PURE__*/React.createElement(Row, {
50342
50995
  className: "border-none",
50343
50996
  label: t("WS_PROPERTY_TYPE"),
50344
- text: ((_state35 = state) === null || _state35 === void 0 ? void 0 : (_state35$additionalDe = _state35.additionalDetails) === null || _state35$additionalDe === void 0 ? void 0 : (_state35$additionalDe2 = _state35$additionalDe.propertyType) === null || _state35$additionalDe2 === void 0 ? void 0 : _state35$additionalDe2.name) || "NA"
50997
+ text: ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$additionalDe = _state38.additionalDetails) === null || _state38$additionalDe === void 0 ? void 0 : (_state38$additionalDe2 = _state38$additionalDe.propertyType) === null || _state38$additionalDe2 === void 0 ? void 0 : _state38$additionalDe2.name) || "NA"
50345
50998
  }), /*#__PURE__*/React.createElement(Row, {
50346
50999
  className: "border-none",
50347
51000
  label: t("WS_PROPERTY_CATEGORY"),
50348
- text: ((_state36 = state) === null || _state36 === void 0 ? void 0 : (_state36$additionalDe = _state36.additionalDetails) === null || _state36$additionalDe === void 0 ? void 0 : (_state36$additionalDe2 = _state36$additionalDe.propertyCategory) === null || _state36$additionalDe2 === void 0 ? void 0 : _state36$additionalDe2.name) || "NA"
51001
+ text: ((_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.name) || "NA"
50349
51002
  }), /*#__PURE__*/React.createElement(Row, {
50350
51003
  className: "border-none",
50351
51004
  label: t("WS_PLOT_AREA"),
50352
- text: ((_state37 = state) === null || _state37 === void 0 ? void 0 : (_state37$additionalDe = _state37.additionalDetails) === null || _state37$additionalDe === void 0 ? void 0 : _state37$additionalDe.plotArea) || "NA"
51005
+ text: ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$additionalDe = _state40.additionalDetails) === null || _state40$additionalDe === void 0 ? void 0 : _state40$additionalDe.plotArea) || "NA"
50353
51006
  }), /*#__PURE__*/React.createElement(Row, {
50354
51007
  className: "border-none",
50355
51008
  label: t("WS_BUILT_UP_AREA"),
50356
- text: ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$additionalDe = _state38.additionalDetails) === null || _state38$additionalDe === void 0 ? void 0 : _state38$additionalDe.builtUpArea) || "NA"
51009
+ text: ((_state41 = state) === null || _state41 === void 0 ? void 0 : (_state41$additionalDe = _state41.additionalDetails) === null || _state41$additionalDe === void 0 ? void 0 : _state41$additionalDe.builtUpArea) || "NA"
50357
51010
  }), /*#__PURE__*/React.createElement(Row, {
50358
51011
  className: "border-none",
50359
51012
  label: t("WS_NO_OF_FLOORS"),
50360
- text: ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : _state39$additionalDe.noOfFloors) || "NA"
50361
- }), String(((_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.code) || ((_state41 = state) === null || _state41 === void 0 ? void 0 : (_state41$additionalDe = _state41.additionalDetails) === null || _state41$additionalDe === void 0 ? void 0 : (_state41$additionalDe2 = _state41$additionalDe.propertyCategory) === null || _state41$additionalDe2 === void 0 ? void 0 : _state41$additionalDe2.name) || ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$additionalDe = _state42.additionalDetails) === null || _state42$additionalDe === void 0 ? void 0 : _state42$additionalDe.propertyCategory) || "").toUpperCase().includes("RESIDENTIAL") && /*#__PURE__*/React.createElement(Row, {
51013
+ text: ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$additionalDe = _state42.additionalDetails) === null || _state42$additionalDe === void 0 ? void 0 : _state42$additionalDe.noOfFloors) || "NA"
51014
+ }), String(((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : (_state43$additionalDe2 = _state43$additionalDe.propertyCategory) === null || _state43$additionalDe2 === void 0 ? void 0 : _state43$additionalDe2.code) || ((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$additionalDe = _state44.additionalDetails) === null || _state44$additionalDe === void 0 ? void 0 : (_state44$additionalDe2 = _state44$additionalDe.propertyCategory) === null || _state44$additionalDe2 === void 0 ? void 0 : _state44$additionalDe2.name) || ((_state45 = state) === null || _state45 === void 0 ? void 0 : (_state45$additionalDe = _state45.additionalDetails) === null || _state45$additionalDe === void 0 ? void 0 : _state45$additionalDe.propertyCategory) || "").toUpperCase().includes("RESIDENTIAL") && /*#__PURE__*/React.createElement(Row, {
50362
51015
  className: "border-none",
50363
51016
  label: t("WS_NO_OF_DWELLING_UNITS"),
50364
- text: ((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : _state43$additionalDe.NumberofDwellingUnits) || "NA"
51017
+ text: ((_state46 = state) === null || _state46 === void 0 ? void 0 : (_state46$additionalDe = _state46.additionalDetails) === null || _state46$additionalDe === void 0 ? void 0 : _state46$additionalDe.NumberofDwellingUnits) || "NA"
50365
51018
  }), /*#__PURE__*/React.createElement(Row, {
50366
51019
  className: "border-none",
50367
51020
  label: t("WS_LOCALITY"),
50368
- text: ((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$additionalDe = _state44.additionalDetails) === null || _state44$additionalDe === void 0 ? void 0 : _state44$additionalDe.locality) || "NA"
50369
- }), (Array.isArray(((_state45 = state) === null || _state45 === void 0 ? void 0 : (_state45$additionalDe = _state45.additionalDetails) === null || _state45$additionalDe === void 0 ? void 0 : _state45$additionalDe.questions) || ((_state46 = state) === null || _state46 === void 0 ? void 0 : (_state46$additionalDe = _state46.additionalDetails) === null || _state46$additionalDe === void 0 ? void 0 : _state46$additionalDe.questionAnswers)) ? ((_state47 = state) === null || _state47 === void 0 ? void 0 : (_state47$additionalDe = _state47.additionalDetails) === null || _state47$additionalDe === void 0 ? void 0 : _state47$additionalDe.questions) || ((_state48 = state) === null || _state48 === void 0 ? void 0 : (_state48$additionalDe = _state48.additionalDetails) === null || _state48$additionalDe === void 0 ? void 0 : _state48$additionalDe.questionAnswers) : []).map((q, idx) => {
51021
+ text: ((_state47 = state) === null || _state47 === void 0 ? void 0 : (_state47$additionalDe = _state47.additionalDetails) === null || _state47$additionalDe === void 0 ? void 0 : _state47$additionalDe.locality) || "NA"
51022
+ }), (Array.isArray(((_state48 = state) === null || _state48 === void 0 ? void 0 : (_state48$additionalDe = _state48.additionalDetails) === null || _state48$additionalDe === void 0 ? void 0 : _state48$additionalDe.questions) || ((_state49 = state) === null || _state49 === void 0 ? void 0 : (_state49$additionalDe = _state49.additionalDetails) === null || _state49$additionalDe === void 0 ? void 0 : _state49$additionalDe.questionAnswers)) ? ((_state50 = state) === null || _state50 === void 0 ? void 0 : (_state50$additionalDe = _state50.additionalDetails) === null || _state50$additionalDe === void 0 ? void 0 : _state50$additionalDe.questions) || ((_state51 = state) === null || _state51 === void 0 ? void 0 : (_state51$additionalDe = _state51.additionalDetails) === null || _state51$additionalDe === void 0 ? void 0 : _state51$additionalDe.questionAnswers) : []).map((q, idx) => {
50370
51023
  var _q$answer, _q$answer2, _q$answer3;
50371
51024
  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}`;
50372
51025
  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;
@@ -50379,7 +51032,7 @@ const ConnectionDetails$5 = () => {
50379
51032
  text: `${t(checkForNA(aText))}`
50380
51033
  });
50381
51034
  }), /*#__PURE__*/React.createElement(Link, {
50382
- to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(_state49 = state) === null || _state49 === void 0 ? void 0 : _state49.propertyId}&tenantId=${(_state50 = state) === null || _state50 === void 0 ? void 0 : _state50.tenantId}`
51035
+ to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.propertyId}&tenantId=${(_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.tenantId}`
50383
51036
  }, /*#__PURE__*/React.createElement(LinkButton, {
50384
51037
  style: {
50385
51038
  textAlign: "left",
@@ -50391,10 +51044,10 @@ const ConnectionDetails$5 = () => {
50391
51044
  styles: {
50392
51045
  fontSize: "28px"
50393
51046
  }
50394
- }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state51 = state) !== null && _state51 !== void 0 && _state51.connectionHolders ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
51047
+ }, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state54 = state) !== null && _state54 !== void 0 && _state54.connectionHolders ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
50395
51048
  className: "border-none",
50396
51049
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
50397
- text: (_state52 = state) === null || _state52 === void 0 ? void 0 : (_state52$connectionHo = _state52.connectionHolders) === null || _state52$connectionHo === void 0 ? void 0 : (_state52$connectionHo2 = _state52$connectionHo[0]) === null || _state52$connectionHo2 === void 0 ? void 0 : _state52$connectionHo2.name,
51050
+ text: (_state55 = state) === null || _state55 === void 0 ? void 0 : (_state55$connectionHo = _state55.connectionHolders) === null || _state55$connectionHo === void 0 ? void 0 : (_state55$connectionHo2 = _state55$connectionHo[0]) === null || _state55$connectionHo2 === void 0 ? void 0 : _state55$connectionHo2.name,
50398
51051
  textStyle: {
50399
51052
  whiteSpace: "pre"
50400
51053
  }
@@ -50513,15 +51166,15 @@ const ConnectionDetails$5 = () => {
50513
51166
  isArray: false
50514
51167
  }
50515
51168
  }
50516
- }))) : /*#__PURE__*/React.createElement(CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.documents) && ((_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.documents.map((doc, index) => {
50517
- var _doc$documentType, _state55, _state56;
51169
+ }))) : /*#__PURE__*/React.createElement(CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.documents) && ((_state57 = state) === null || _state57 === void 0 ? void 0 : _state57.documents.map((doc, index) => {
51170
+ var _doc$documentType, _state58, _state59;
50518
51171
  return /*#__PURE__*/React.createElement("div", {
50519
51172
  key: `doc-${index}`
50520
51173
  }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split(".").slice(0, 2).join("_"))), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(WSDocument, {
50521
- value: (_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.documents,
51174
+ value: (_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.documents,
50522
51175
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
50523
51176
  index: index
50524
- }), ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
51177
+ }), ((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
50525
51178
  style: {
50526
51179
  color: "#cccccc",
50527
51180
  backgroundColor: "#cccccc",
@@ -50530,7 +51183,7 @@ const ConnectionDetails$5 = () => {
50530
51183
  marginBottom: "20px"
50531
51184
  }
50532
51185
  }) : null)));
50533
- })), ((_state57 = state) === null || _state57 === void 0 ? void 0 : (_state57$status = _state57.status) === null || _state57$status === void 0 ? void 0 : _state57$status.toLowerCase()) === "inactive" || ((_state58 = state) === null || _state58 === void 0 ? void 0 : (_state58$applicationS = _state58.applicationStatus) === null || _state58$applicationS === void 0 ? void 0 : _state58$applicationS.toLowerCase()) === "inactive" || ((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React.createElement("div", {
51186
+ })), ((_state60 = state) === null || _state60 === void 0 ? void 0 : (_state60$status = _state60.status) === null || _state60$status === void 0 ? void 0 : _state60$status.toLowerCase()) === "inactive" || ((_state61 = state) === null || _state61 === void 0 ? void 0 : (_state61$applicationS = _state61.applicationStatus) === null || _state61$applicationS === void 0 ? void 0 : _state61$applicationS.toLowerCase()) === "inactive" || ((_state62 = state) === null || _state62 === void 0 ? void 0 : _state62.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React.createElement("div", {
50534
51187
  style: {
50535
51188
  display: "flex",
50536
51189
  justifyContent: "flex-end",
@@ -50567,8 +51220,8 @@ const ConnectionDetails$5 = () => {
50567
51220
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
50568
51221
  hideSubmit: true,
50569
51222
  actionSingleSubmit: () => {
50570
- var _state60, _state61;
50571
- history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state60 = state) === null || _state60 === void 0 ? void 0 : _state60.connectionNo)}/${tenantId}?consumerCode=${(_state61 = state) === null || _state61 === void 0 ? void 0 : _state61.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
51223
+ var _state63, _state64;
51224
+ history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state63 = state) === null || _state63 === void 0 ? void 0 : _state63.connectionNo)}/${tenantId}?consumerCode=${(_state64 = state) === null || _state64 === void 0 ? void 0 : _state64.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
50572
51225
  setshowModal(false);
50573
51226
  },
50574
51227
  popupStyles: mobileView ? {
@@ -58337,10 +58990,31 @@ const NewApplication = () => {
58337
58990
  }, /*#__PURE__*/React.createElement(Controller, {
58338
58991
  control: control,
58339
58992
  name: "rainWaterHarvesting.hasCertificate",
58340
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
58341
- checked: !!props.value,
58342
- label: "Rain Water Harvesting Certificate",
58343
- onChange: event => props.onChange(event.target.checked)
58993
+ render: props => /*#__PURE__*/React.createElement(RadioButtons, {
58994
+ className: "form-field",
58995
+ style: {
58996
+ display: "flex",
58997
+ gap: "2rem",
58998
+ alignItems: "center"
58999
+ },
59000
+ name: "rainWaterHarvestingRadio",
59001
+ options: [{
59002
+ i18nKey: "CORE_COMMON_YES",
59003
+ code: true
59004
+ }, {
59005
+ i18nKey: "CORE_COMMON_NO",
59006
+ code: false
59007
+ }],
59008
+ optionsKey: "i18nKey",
59009
+ selectedOption: props.value ? {
59010
+ i18nKey: "CORE_COMMON_YES",
59011
+ code: true
59012
+ } : {
59013
+ i18nKey: "CORE_COMMON_NO",
59014
+ code: false
59015
+ },
59016
+ onSelect: e => props.onChange(e.code),
59017
+ t: t
58344
59018
  })
58345
59019
  }))), /*#__PURE__*/React.createElement(SectionCard, {
58346
59020
  description: t("WS_PROPERTY_ADDRESS_DESC"),
@@ -59361,118 +60035,6 @@ const NewApplication = () => {
59361
60035
  }));
59362
60036
  };
59363
60037
 
59364
- const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
59365
- width: "14",
59366
- height: "14",
59367
- viewBox: "0 0 24 24",
59368
- fill: "none",
59369
- stroke: "currentColor",
59370
- strokeWidth: "3",
59371
- strokeLinecap: "round",
59372
- strokeLinejoin: "round"
59373
- }, /*#__PURE__*/React.createElement("polyline", {
59374
- points: "20 6 9 17 4 12"
59375
- }));
59376
- const ClockIcon = () => /*#__PURE__*/React.createElement("svg", {
59377
- width: "14",
59378
- height: "14",
59379
- viewBox: "0 0 24 24",
59380
- fill: "none",
59381
- stroke: "currentColor",
59382
- strokeWidth: "2",
59383
- strokeLinecap: "round",
59384
- strokeLinejoin: "round"
59385
- }, /*#__PURE__*/React.createElement("circle", {
59386
- cx: "12",
59387
- cy: "12",
59388
- r: "10"
59389
- }), /*#__PURE__*/React.createElement("polyline", {
59390
- className: "clock-hands2",
59391
- points: "12 6 12 12 16 14"
59392
- }));
59393
- const WorkflowTimeline = _ref => {
59394
- var _workflowDetails$data;
59395
- let {
59396
- workflowDetails,
59397
- hideTimeline,
59398
- setHideTimeline
59399
- } = _ref;
59400
- const {
59401
- t
59402
- } = useTranslation();
59403
- const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
59404
- if (!timeline || timeline.length === 0) {
59405
- return null;
59406
- }
59407
- const getStatusClass = (index, checkpoint) => {
59408
- var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
59409
- const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.status) === "ACTIVE" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.isTerminateState);
59410
- if (index === 0 && !isTerminal) return "current2";
59411
- return "completed2";
59412
- };
59413
- const convertEpochToDateTime = epoch => {
59414
- if (!epoch) return "N/A";
59415
- const date = new Date(epoch);
59416
- const day = String(date.getDate()).padStart(2, "0");
59417
- const month = String(date.getMonth() + 1).padStart(2, "0");
59418
- const year = date.getFullYear().toString().slice(-2);
59419
- const hours = String(date.getHours()).padStart(2, "0");
59420
- const minutes = String(date.getMinutes()).padStart(2, "0");
59421
- return `${day}/${month}/${year} ${hours}:${minutes}`;
59422
- };
59423
- return /*#__PURE__*/React.createElement(Card, {
59424
- className: "workflow-timeline-card2 digit-form-composer",
59425
- style: {
59426
- background: "#fff",
59427
- padding: "16px",
59428
- height: hideTimeline ? "100%" : ""
59429
- }
59430
- }, /*#__PURE__*/React.createElement("div", {
59431
- className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
59432
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
59433
- style: {
59434
- marginBottom: "0",
59435
- fontSize: "16px",
59436
- fontWeight: "700",
59437
- color: "#374151"
59438
- },
59439
- className: hideTimeline ? "hidden-content" : ""
59440
- }, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React.createElement("div", {
59441
- className: hideTimeline ? "hidden-content" : "timeline-container2"
59442
- }, timeline.map((checkpoint, index) => {
59443
- var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
59444
- const statusClass = getStatusClass(index, checkpoint);
59445
- const showLine = index !== timeline.length - 1 && timeline.length > 1;
59446
- const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
59447
- return /*#__PURE__*/React.createElement("div", {
59448
- key: index,
59449
- className: `timeline-item2 ${statusClass}`
59450
- }, /*#__PURE__*/React.createElement("div", {
59451
- className: "timeline-marker2"
59452
- }, /*#__PURE__*/React.createElement("div", {
59453
- className: "timeline-circle2"
59454
- }, statusClass === "completed2" ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React.createElement("div", {
59455
- className: "timeline-line2"
59456
- })), /*#__PURE__*/React.createElement("div", {
59457
- className: "timeline-content2"
59458
- }, /*#__PURE__*/React.createElement("div", {
59459
- className: "timeline-header2"
59460
- }, /*#__PURE__*/React.createElement("div", {
59461
- className: "timeline-title2"
59462
- }, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state}`)), /*#__PURE__*/React.createElement("span", {
59463
- className: "timeline-date2"
59464
- }, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
59465
- className: "timeline-body2"
59466
- }, /*#__PURE__*/React.createElement("div", {
59467
- className: `timeline-status-tag2 status-${statusClass}`
59468
- }, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state6 = checkpoint.state) === null || _checkpoint$state6 === void 0 ? void 0 : _checkpoint$state6.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state7 = checkpoint.state) === null || _checkpoint$state7 === void 0 ? void 0 : _checkpoint$state7.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React.createElement("div", {
59469
- className: "timeline-comment2"
59470
- }, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React.createElement("div", {
59471
- className: "timeline-footer2"
59472
- }, /*#__PURE__*/React.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
59473
- })));
59474
- };
59475
-
59476
60038
  const ApplicationDetails$1 = () => {
59477
60039
  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;
59478
60040
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
@@ -67760,7 +68322,7 @@ const openFilePDF = fileId => {
67760
68322
  }).catch(error => console.error("Error fetching file:", error));
67761
68323
  };
67762
68324
  const CheckPage$4 = _ref2 => {
67763
- var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress$asse, _propertyAddress2, _propertyAddress2$ass, _propertyAddress3, _cpt$address, _cpt$details, _cpt$details$address, _propertyAddress4, _propertyAddress4$blo, _propertyAddress5, _propertyAddress5$blo, _propertyAddress6, _propertyAddress7, _propertyAddress7$war, _propertyAddress8, _propertyAddress8$war, _propertyAddress9, _cpt$address2, _cpt$address3, _cpt$details2, _cpt$details2$address, _cpt$details3, _cpt$details3$address, _propertyAddress0, _propertyAddress0$zon, _propertyAddress1, _propertyAddress1$zon, _propertyAddress10, _cpt$address4, _cpt$details4, _cpt$details4$address, _propertyAddress11, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _cpt$additionalDetail, _cpt$additionalDetail2, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ad, _data$cpt3, _data$cpt3$details, _data$cpt3$details$ad, _data$cpt4, _data$cpt4$details, _propertyAddress16, _propertyAddress17, _cpt$additionalDetail3, _cpt$additionalDetail4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$additionalDetai, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _data$rainWaterHarves, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _data$additionalDetai5, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress18, _propertyAddress18$ad, _propertyAddress19, _propertyAddress19$ad, _propertyAddress20, _propertyAddress21, _propertyAddress21$ci, _propertyAddress22, _propertyAddress22$ci, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$lo, _propertyAddress27, _propertyAddress27$lo, _propertyAddress28, _propertyAddress29, _propertyAddress29$su, _propertyAddress30, _propertyAddress30$su, _propertyAddress31, _propertyAddress32, _propertyAddress33, _propertyAddress34, _propertyAddress35, _propertyAddress36, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _propertyAddress42, _propertyAddress42$as, _propertyAddress43, _propertyAddress43$as, _propertyAddress44, _cpt$address5, _propertyAddress45, _propertyAddress45$bl, _propertyAddress46, _propertyAddress46$bl, _propertyAddress47, _propertyAddress48, _propertyAddress48$wa, _propertyAddress49, _propertyAddress49$wa, _propertyAddress50, _cpt$address6, _cpt$address7, _propertyAddress51, _propertyAddress51$zo, _propertyAddress52, _propertyAddress52$zo, _propertyAddress53, _cpt$address8, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail5, _cpt$additionalDetail6, _cpt$additionalDetail7, _cpt$propertyType, _cpt$additionalDetail8, _cpt$additionalDetail9;
68325
+ var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress$asse, _propertyAddress2, _propertyAddress2$ass, _propertyAddress3, _cpt$address, _cpt$details, _cpt$details$address, _propertyAddress4, _propertyAddress4$blo, _propertyAddress5, _propertyAddress5$blo, _propertyAddress6, _propertyAddress7, _propertyAddress7$war, _propertyAddress8, _propertyAddress8$war, _propertyAddress9, _cpt$address2, _cpt$address3, _cpt$details2, _cpt$details2$address, _cpt$details3, _cpt$details3$address, _propertyAddress0, _propertyAddress0$zon, _propertyAddress1, _propertyAddress1$zon, _propertyAddress10, _cpt$address4, _cpt$details4, _cpt$details4$address, _propertyAddress11, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _cpt$additionalDetail, _cpt$additionalDetail2, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ad, _data$cpt3, _data$cpt3$details, _data$cpt3$details$ad, _data$cpt4, _data$cpt4$details, _propertyAddress16, _propertyAddress17, _cpt$additionalDetail3, _cpt$additionalDetail4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$additionalDetai, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _data$rainWaterHarves, _data$sewerTreatmentP, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _data$additionalDetai5, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress18, _propertyAddress18$ad, _propertyAddress19, _propertyAddress19$ad, _propertyAddress20, _propertyAddress21, _propertyAddress21$ci, _propertyAddress22, _propertyAddress22$ci, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$lo, _propertyAddress27, _propertyAddress27$lo, _propertyAddress28, _propertyAddress29, _propertyAddress29$su, _propertyAddress30, _propertyAddress30$su, _propertyAddress31, _propertyAddress32, _propertyAddress33, _propertyAddress34, _propertyAddress35, _propertyAddress36, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _propertyAddress42, _propertyAddress42$as, _propertyAddress43, _propertyAddress43$as, _propertyAddress44, _cpt$address5, _propertyAddress45, _propertyAddress45$bl, _propertyAddress46, _propertyAddress46$bl, _propertyAddress47, _propertyAddress48, _propertyAddress48$wa, _propertyAddress49, _propertyAddress49$wa, _propertyAddress50, _cpt$address6, _cpt$address7, _propertyAddress51, _propertyAddress51$zo, _propertyAddress52, _propertyAddress52$zo, _propertyAddress53, _cpt$address8, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail5, _cpt$additionalDetail6, _cpt$additionalDetail7, _cpt$propertyType, _cpt$additionalDetail8, _cpt$additionalDetail9;
67764
68326
  let {
67765
68327
  data,
67766
68328
  onSubmit,
@@ -67837,6 +68399,7 @@ const CheckPage$4 = _ref2 => {
67837
68399
  const djbEmployee = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : _data$djbEmployee.djbEmployee) || (data === null || data === void 0 ? void 0 : data.djbEmployee) || {};
67838
68400
  const disability = (data === null || data === void 0 ? void 0 : (_data$disability = data.disability) === null || _data$disability === void 0 ? void 0 : _data$disability.disability) || (data === null || data === void 0 ? void 0 : data.disability) || (data === null || data === void 0 ? void 0 : data.additionalDetails) || {};
67839
68401
  const rainWaterHarvesting = (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves = data.rainWaterHarvesting) === null || _data$rainWaterHarves === void 0 ? void 0 : _data$rainWaterHarves.rainWaterHarvesting) || (data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) || (data === null || data === void 0 ? void 0 : data.additionalDetails) || {};
68402
+ const sewerTreatmentPlant = (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP === void 0 ? void 0 : _data$sewerTreatmentP.sewerTreatmentPlant) || (data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) || (data === null || data === void 0 ? void 0 : data.additionalDetails) || {};
67840
68403
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
67841
68404
  className: "overflow-y-scroll"
67842
68405
  }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, {
@@ -67984,6 +68547,17 @@ const CheckPage$4 = _ref2 => {
67984
68547
  actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
67985
68548
  onClick: onEdit
67986
68549
  })
68550
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("Sewer Treatment Plant (STP)")), /*#__PURE__*/React.createElement(StatusTable, {
68551
+ style: {
68552
+ marginTop: "10px",
68553
+ marginBottom: "30px"
68554
+ }
68555
+ }, /*#__PURE__*/React.createElement(Row, {
68556
+ label: t("Sewer Treatment Plant (STP)"),
68557
+ text: sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.hasCertificate || sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.hasStp || sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.isSewerTreatmentPlant ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
68558
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
68559
+ onClick: onEdit
68560
+ })
67987
68561
  })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("PT_LOCATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
67988
68562
  style: {
67989
68563
  marginTop: "10px",
@@ -68104,7 +68678,7 @@ const CheckPage$4 = _ref2 => {
68104
68678
  marginBottom: "30px"
68105
68679
  }
68106
68680
  }, documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
68107
- var _doc$documentType, _doc$documentType2;
68681
+ var _doc$documentType, _doc$documentType2, _doc$additionalDetail, _doc$additionalDetail2;
68108
68682
  return /*#__PURE__*/React.createElement(React.Fragment, {
68109
68683
  key: index
68110
68684
  }, /*#__PURE__*/React.createElement(Row, {
@@ -68113,6 +68687,9 @@ const CheckPage$4 = _ref2 => {
68113
68687
  actionButton: index === 0 ? /*#__PURE__*/React.createElement(ActionButton$1, {
68114
68688
  onClick: onEdit
68115
68689
  }) : null
68690
+ }), ((doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail = doc.additionalDetails) === null || _doc$additionalDetail === void 0 ? void 0 : _doc$additionalDetail.validityDate)) && /*#__PURE__*/React.createElement(Row, {
68691
+ label: t("WS_VALIDITY_UP_TO") || "Validity up to",
68692
+ text: checkForNA$1((doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail2 = doc.additionalDetails) === null || _doc$additionalDetail2 === void 0 ? void 0 : _doc$additionalDetail2.validityDate))
68116
68693
  }), /*#__PURE__*/React.createElement(Row, {
68117
68694
  text: /*#__PURE__*/React.createElement("span", {
68118
68695
  style: {
@@ -68213,6 +68790,11 @@ const isRwhDoc = doc => {
68213
68790
  const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
68214
68791
  return str.includes("RAIN") || str.includes("HARVEST");
68215
68792
  };
68793
+ const isStpDoc = doc => {
68794
+ if (!doc) return false;
68795
+ const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
68796
+ return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
68797
+ };
68216
68798
  const OLDApplication = () => {
68217
68799
  var _Digit$UserService$ge;
68218
68800
  const {
@@ -68239,6 +68821,8 @@ const OLDApplication = () => {
68239
68821
  label: "WS_BANK_DETAILS"
68240
68822
  }, {
68241
68823
  label: "Rain Water Harvesting Certificate"
68824
+ }, {
68825
+ label: "Sewer Treatment Plant (STP)"
68242
68826
  }, {
68243
68827
  label: "PT_LOCATION_DETAILS"
68244
68828
  }, {
@@ -68312,7 +68896,7 @@ const OLDApplication = () => {
68312
68896
  };
68313
68897
  const configCopy = cloneDeep_1(foundConfig);
68314
68898
  const allCreateSections = (configCopy === null || configCopy === void 0 ? void 0 : (_configCopy$body = configCopy.body) === null || _configCopy$body === void 0 ? void 0 : _configCopy$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
68315
- const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSBankDetails", "WSRainWaterHarvesting", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
68899
+ const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSBankDetails", "WSRainWaterHarvesting", "WSSewerTreatmentPlant", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
68316
68900
  const reorderedBody = [];
68317
68901
  desiredComponentOrder.forEach(compName => {
68318
68902
  const section = allCreateSections.find(s => {
@@ -68394,6 +68978,19 @@ const OLDApplication = () => {
68394
68978
  }
68395
68979
  }]
68396
68980
  });
68981
+ } else if (compName === "WSSewerTreatmentPlant") {
68982
+ reorderedBody.push({
68983
+ isCreateConnection: true,
68984
+ body: [{
68985
+ type: "component",
68986
+ key: "sewerTreatmentPlant",
68987
+ component: "WSSewerTreatmentPlant",
68988
+ withoutLabel: true,
68989
+ texts: {
68990
+ header: "Sewer Treatment Plant (STP)"
68991
+ }
68992
+ }]
68993
+ });
68397
68994
  } else if (compName === "WSBankDetails") {
68398
68995
  reorderedBody.push({
68399
68996
  isCreateConnection: true,
@@ -68656,7 +69253,7 @@ const OLDApplication = () => {
68656
69253
  };
68657
69254
  const processSubmission = function (data) {
68658
69255
  try {
68659
- var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$djbEmployee, _data$djbEmployee$doc, _data$djbEmployee2, _data$djbEmployee3, _data$djbEmployee4, _data$DocumentsRequir2, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$documents, _data$documents$docum, _data$documents$docum2, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop9, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
69256
+ var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$djbEmployee, _data$djbEmployee$doc, _data$djbEmployee2, _data$djbEmployee3, _data$djbEmployee4, _data$DocumentsRequir2, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$documents, _data$documents$docum, _data$documents$docum2, _data$DocumentsRequir5, _data$documents2, _generalDocWithVal$ad, _data$documents3, _rwhDocFromList$addit, _stpDocFromList$addit, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop9, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
68660
69257
  const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
68661
69258
  if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
68662
69259
  data.useDetails = {
@@ -68697,6 +69294,7 @@ const OLDApplication = () => {
68697
69294
  };
68698
69295
  }
68699
69296
  if (data !== null && data !== void 0 && (_data$DocumentsRequir = data.DocumentsRequired) !== null && _data$DocumentsRequir !== void 0 && _data$DocumentsRequir.documents) {
69297
+ var _docWithValidity$addi, _docWithValidity$addi2, _rwhDoc$additionalDet, _stpDoc$additionalDet;
68700
69298
  const docs = data.DocumentsRequired.documents;
68701
69299
  const identityDoc = docs.find(d => {
68702
69300
  var _d$documentType8;
@@ -68710,11 +69308,25 @@ const OLDApplication = () => {
68710
69308
  var _d$documentType1;
68711
69309
  return d === null || d === void 0 ? void 0 : (_d$documentType1 = d.documentType) === null || _d$documentType1 === void 0 ? void 0 : _d$documentType1.includes("OTHERDOCUMENTS");
68712
69310
  });
69311
+ const docWithValidity = docs.find(d => {
69312
+ var _d$additionalDetails, _d$additionalDetails2;
69313
+ return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails = d.additionalDetails) === null || _d$additionalDetails === void 0 ? void 0 : _d$additionalDetails.validityDate) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails2 = d.additionalDetails) === null || _d$additionalDetails2 === void 0 ? void 0 : _d$additionalDetails2.validityUpTo);
69314
+ });
69315
+ const valDate = (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityUpTo) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.date) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi = docWithValidity.additionalDetails) === null || _docWithValidity$addi === void 0 ? void 0 : _docWithValidity$addi.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi2 = docWithValidity.additionalDetails) === null || _docWithValidity$addi2 === void 0 ? void 0 : _docWithValidity$addi2.validityUpTo) || "";
69316
+ const rwhDoc = docs.find(d => isRwhDoc(d));
69317
+ const stpDoc = docs.find(d => isStpDoc(d));
69318
+ const rwhValDate = (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityDate) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityUpTo) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.date) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : (_rwhDoc$additionalDet = rwhDoc.additionalDetails) === null || _rwhDoc$additionalDet === void 0 ? void 0 : _rwhDoc$additionalDet.validityDate) || "";
69319
+ const stpValDate = (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityDate) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityUpTo) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.date) || (stpDoc === null || stpDoc === void 0 ? void 0 : (_stpDoc$additionalDet = stpDoc.additionalDetails) === null || _stpDoc$additionalDet === void 0 ? void 0 : _stpDoc$additionalDet.validityDate) || "";
68713
69320
  data.documents = {
68714
69321
  documents: docs,
68715
69322
  identityProofNumber: (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || "",
68716
69323
  ownershipDocumentNumber: (ownershipDoc === null || ownershipDoc === void 0 ? void 0 : ownershipDoc.documentUid) || "",
68717
- otherDocumentNumber: (otherDoc === null || otherDoc === void 0 ? void 0 : otherDoc.documentUid) || ""
69324
+ otherDocumentNumber: (otherDoc === null || otherDoc === void 0 ? void 0 : otherDoc.documentUid) || "",
69325
+ validityDate: valDate || undefined,
69326
+ validityUpTo: valDate || undefined,
69327
+ date: valDate || undefined,
69328
+ rwhValidityDate: rwhValDate || undefined,
69329
+ stpValidityDate: stpValDate || undefined
68718
69330
  };
68719
69331
  }
68720
69332
  const djbDoc = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : (_data$djbEmployee$doc = _data$djbEmployee.document) === null || _data$djbEmployee$doc === void 0 ? void 0 : _data$djbEmployee$doc.fileStoreId) || typeof (data === null || data === void 0 ? void 0 : (_data$djbEmployee2 = data.djbEmployee) === null || _data$djbEmployee2 === void 0 ? void 0 : _data$djbEmployee2.document) === "string" && (data === null || data === void 0 ? void 0 : (_data$djbEmployee3 = data.djbEmployee) === null || _data$djbEmployee3 === void 0 ? void 0 : _data$djbEmployee3.document.trim()) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : _data$djbEmployee4.document) || (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : (_data$DocumentsRequir3 = _data$DocumentsRequir2.documents) === null || _data$DocumentsRequir3 === void 0 ? void 0 : (_data$DocumentsRequir4 = _data$DocumentsRequir3.find(d => {
@@ -68789,14 +69401,52 @@ const OLDApplication = () => {
68789
69401
  };
68790
69402
  }
68791
69403
  }
69404
+ const docsList = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents) || (data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) || (data === null || data === void 0 ? void 0 : data.documents) || [];
69405
+ const rwhDocFromList = Array.isArray(docsList) ? docsList.find(d => isRwhDoc(d)) : null;
69406
+ const stpDocFromList = Array.isArray(docsList) ? docsList.find(d => isStpDoc(d)) : null;
69407
+ const generalDocWithVal = Array.isArray(docsList) ? docsList.find(d => {
69408
+ var _d$additionalDetails3;
69409
+ return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails3 = d.additionalDetails) === null || _d$additionalDetails3 === void 0 ? void 0 : _d$additionalDetails3.validityDate);
69410
+ }) : null;
69411
+ const extractedValDate = (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.validityDate) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.validityUpTo) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.date) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : (_generalDocWithVal$ad = generalDocWithVal.additionalDetails) === null || _generalDocWithVal$ad === void 0 ? void 0 : _generalDocWithVal$ad.validityDate) || (data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.validityDate) || "";
69412
+ const extractedRwhDate = (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.validityDate) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.validityUpTo) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.date) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : (_rwhDocFromList$addit = rwhDocFromList.additionalDetails) === null || _rwhDocFromList$addit === void 0 ? void 0 : _rwhDocFromList$addit.validityDate) || extractedValDate;
69413
+ const extractedStpDate = (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.validityDate) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.validityUpTo) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.date) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : (_stpDocFromList$addit = stpDocFromList.additionalDetails) === null || _stpDocFromList$addit === void 0 ? void 0 : _stpDocFromList$addit.validityDate) || extractedValDate;
68792
69414
  if (data !== null && data !== void 0 && data.rainWaterHarvesting) {
68793
69415
  var _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$rainWaterHarves4;
68794
69416
  data.additionalDetails = {
68795
69417
  ...data.additionalDetails,
68796
69418
  ...data.rainWaterHarvesting,
68797
69419
  hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves = data.rainWaterHarvesting) !== null && _data$rainWaterHarves !== void 0 && _data$rainWaterHarves.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves2 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves2 !== void 0 && _data$rainWaterHarves2.isRainwaterHarvesting),
68798
- isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves3 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves3 !== void 0 && _data$rainWaterHarves3.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.isRainwaterHarvesting)
69420
+ isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves3 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves3 !== void 0 && _data$rainWaterHarves3.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.isRainwaterHarvesting),
69421
+ validityDate: extractedRwhDate || undefined,
69422
+ validityUpTo: extractedRwhDate || undefined,
69423
+ date: extractedRwhDate || undefined,
69424
+ rwhValidityDate: extractedRwhDate || undefined
68799
69425
  };
69426
+ if (extractedRwhDate) {
69427
+ data.rainWaterHarvesting.validityDate = extractedRwhDate;
69428
+ data.rainWaterHarvesting.validityUpTo = extractedRwhDate;
69429
+ data.rainWaterHarvesting.date = extractedRwhDate;
69430
+ }
69431
+ }
69432
+ if (data !== null && data !== void 0 && data.sewerTreatmentPlant) {
69433
+ var _data$sewerTreatmentP, _data$sewerTreatmentP2, _data$sewerTreatmentP3, _data$sewerTreatmentP4, _data$sewerTreatmentP5, _data$sewerTreatmentP6, _data$sewerTreatmentP7, _data$sewerTreatmentP8, _data$sewerTreatmentP9;
69434
+ data.additionalDetails = {
69435
+ ...data.additionalDetails,
69436
+ ...data.sewerTreatmentPlant,
69437
+ hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP !== void 0 && _data$sewerTreatmentP.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP2 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP2 !== void 0 && _data$sewerTreatmentP2.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP3 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP3 !== void 0 && _data$sewerTreatmentP3.isSewerTreatmentPlant),
69438
+ isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP4 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP4 !== void 0 && _data$sewerTreatmentP4.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP5 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP5 !== void 0 && _data$sewerTreatmentP5.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP6 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP6 !== void 0 && _data$sewerTreatmentP6.isSewerTreatmentPlant),
69439
+ hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP7 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP7 !== void 0 && _data$sewerTreatmentP7.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP8 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP8 !== void 0 && _data$sewerTreatmentP8.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP9 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP9 !== void 0 && _data$sewerTreatmentP9.isSewerTreatmentPlant),
69440
+ validityDate: extractedStpDate || undefined,
69441
+ validityUpTo: extractedStpDate || undefined,
69442
+ date: extractedStpDate || undefined,
69443
+ stpValidityDate: extractedStpDate || undefined
69444
+ };
69445
+ if (extractedStpDate) {
69446
+ data.sewerTreatmentPlant.validityDate = extractedStpDate;
69447
+ data.sewerTreatmentPlant.validityUpTo = extractedStpDate;
69448
+ data.sewerTreatmentPlant.date = extractedStpDate;
69449
+ }
68800
69450
  }
68801
69451
  if (data !== null && data !== void 0 && data.bankDetails) {
68802
69452
  const normalizedBank = getNormalizedBankDetails(data);
@@ -69746,6 +70396,7 @@ const componentsToRegister = {
69746
70396
  WSOLDApplication: OLDApplication,
69747
70397
  WSDivyangjan: WSDivyangjan,
69748
70398
  WSRainWaterHarvesting: WSRainWaterHarvesting,
70399
+ WSSewerTreatmentPlant: WSSewerTreatmentPlant,
69749
70400
  WSExecuteDisconnection: WSExecuteDisconnection,
69750
70401
  WSFieldInspection: WSFieldInspection
69751
70402
  };