@djb25/digit-ui-module-ws 1.0.119 → 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 = "";
@@ -396,13 +406,88 @@ const getQueryStringParams = query => {
396
406
  return params;
397
407
  }, {}) : {};
398
408
  };
399
- const getAddress = (address, t) => {
400
- var _address$locality, _address$locality2, _address$city;
401
- return `${address !== null && address !== void 0 && address.doorNo ? `${address === null || address === void 0 ? void 0 : address.doorNo}, ` : ""}${address !== null && address !== void 0 && address.street ? `${address === null || address === void 0 ? void 0 : address.street}, ` : ""}${address !== null && address !== void 0 && address.landmark ? `${address === null || address === void 0 ? void 0 : address.landmark}, ` : ""}${address !== null && address !== void 0 && (_address$locality = address.locality) !== null && _address$locality !== void 0 && _address$locality.code ? t(`TENANTS_MOHALLA_${address === null || address === void 0 ? void 0 : (_address$locality2 = address.locality) === null || _address$locality2 === void 0 ? void 0 : _address$locality2.code}`) : ""}${address !== null && address !== void 0 && (_address$city = address.city) !== null && _address$city !== void 0 && _address$city.code || address !== null && address !== void 0 && address.city ? `, ${t((address === null || address === void 0 ? void 0 : address.city.code) || (address === null || address === void 0 ? void 0 : address.city))}` : ""}${address !== null && address !== void 0 && address.pincode ? `, ${address.pincode}` : " "}`;
409
+ const getAddress = (address, t, property) => {
410
+ var _property$address, _Digit, _Digit$ULBService, _Digit$ULBService$get, _Digit2, _Digit2$Utils, _Digit2$Utils$pt, _addrObj$additionalDe, _propAddr$additionalD, _addrObj$additionalDe2, _propAddr$additionalD2, _addrObj$additionalDe3, _addrObj$additionalDe4, _propAddr$additionalD3, _propAddr$additionalD4, _Digit3, _Digit3$Utils, _Digit3$Utils$pt;
411
+ if (!address && !property) return "";
412
+ const addrObj = typeof address === "object" && address !== null ? address : {};
413
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
414
+ const addDetails = (property === null || property === void 0 ? void 0 : property.additionalDetails) || (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.additionalDetails) || {};
415
+ const parts = [];
416
+ const houseNo = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.doorNo) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.houseNo) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.houseDoorNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.doorNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.houseNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.houseDoorNo) || (property === null || property === void 0 ? void 0 : property.doorNo) || (property === null || property === void 0 ? void 0 : property.houseNo) || "";
417
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
418
+ parts.push(String(houseNo).trim());
419
+ }
420
+ const building = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.buildingName) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.buildingColonyName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.buildingName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.buildingColonyName) || (property === null || property === void 0 ? void 0 : property.buildingName) || "";
421
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
422
+ parts.push(String(building).trim());
423
+ }
424
+ const street = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.street) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.streetName) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.addressLine1) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.street) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.streetName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.addressLine1) || (property === null || property === void 0 ? void 0 : property.street) || (property === null || property === void 0 ? void 0 : property.addressLine1) || "";
425
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
426
+ parts.push(String(street).trim());
427
+ }
428
+ const addressLine2 = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.addressLine2) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.addressLine2) || (property === null || property === void 0 ? void 0 : property.addressLine2) || "";
429
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
430
+ parts.push(String(addressLine2).trim());
431
+ }
432
+ const landmark = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.landmark) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.landmarkName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.landmark) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.landmarkName) || (property === null || property === void 0 ? void 0 : property.landmark) || "";
433
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
434
+ parts.push(String(landmark).trim());
435
+ }
436
+ const tenantId = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.tenantId) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.tenantId) || (property === null || property === void 0 ? void 0 : property.tenantId) || ((_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ULBService = _Digit.ULBService) === null || _Digit$ULBService === void 0 ? void 0 : (_Digit$ULBService$get = _Digit$ULBService.getCurrentTenantId) === null || _Digit$ULBService$get === void 0 ? void 0 : _Digit$ULBService$get.call(_Digit$ULBService));
437
+ const localityRaw = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.locality) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.locality) || (property === null || property === void 0 ? void 0 : property.locality);
438
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
439
+ let localityText = "";
440
+ if (localityCode && (_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$Utils = _Digit2.Utils) !== null && _Digit2$Utils !== void 0 && (_Digit2$Utils$pt = _Digit2$Utils.pt) !== null && _Digit2$Utils$pt !== void 0 && _Digit2$Utils$pt.getMohallaLocale) {
441
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
442
+ localityText = t ? t(locLocale) : locLocale;
443
+ }
444
+ if (!localityText || localityText === localityCode) {
445
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
446
+ }
447
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
448
+ parts.push(String(localityText).trim());
449
+ }
450
+ const assemblyVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.assembly) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Assembly) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualAssembly) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe = addrObj.additionalDetails) === null || _addrObj$additionalDe === void 0 ? void 0 : _addrObj$additionalDe.assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualAssembly) || (propAddr === null || propAddr === void 0 ? void 0 : (_propAddr$additionalD = propAddr.additionalDetails) === null || _propAddr$additionalD === void 0 ? void 0 : _propAddr$additionalD.assembly) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.assembly) || (property === null || property === void 0 ? void 0 : property.assembly) || "";
451
+ const assemblyText = typeof assemblyVal === "object" ? (assemblyVal === null || assemblyVal === void 0 ? void 0 : assemblyVal.name) || (assemblyVal === null || assemblyVal === void 0 ? void 0 : assemblyVal.code) || "" : String(assemblyVal || "");
452
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
453
+ parts.push(assemblyText.trim());
454
+ }
455
+ const zoneVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.zone) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Zone) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualZone) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe2 = addrObj.additionalDetails) === null || _addrObj$additionalDe2 === void 0 ? void 0 : _addrObj$additionalDe2.zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualZone) || (propAddr === null || propAddr === void 0 ? void 0 : (_propAddr$additionalD2 = propAddr.additionalDetails) === null || _propAddr$additionalD2 === void 0 ? void 0 : _propAddr$additionalD2.zone) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.zone) || (property === null || property === void 0 ? void 0 : property.zone) || "";
456
+ const zoneText = typeof zoneVal === "object" ? (zoneVal === null || zoneVal === void 0 ? void 0 : zoneVal.name) || (zoneVal === null || zoneVal === void 0 ? void 0 : zoneVal.code) || "" : String(zoneVal || "");
457
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
458
+ parts.push(zoneText.trim());
459
+ }
460
+ const wardVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.ward) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Ward) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.block) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Block) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualWard) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe3 = addrObj.additionalDetails) === null || _addrObj$additionalDe3 === void 0 ? void 0 : _addrObj$additionalDe3.ward) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe4 = addrObj.additionalDetails) === null || _addrObj$additionalDe4 === void 0 ? void 0 : _addrObj$additionalDe4.block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.ward) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Ward) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualWard) || (propAddr === null || propAddr === void 0 ? void 0 : (_propAddr$additionalD3 = propAddr.additionalDetails) === null || _propAddr$additionalD3 === void 0 ? void 0 : _propAddr$additionalD3.ward) || (propAddr === null || propAddr === void 0 ? void 0 : (_propAddr$additionalD4 = propAddr.additionalDetails) === null || _propAddr$additionalD4 === void 0 ? void 0 : _propAddr$additionalD4.block) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.ward) || (property === null || property === void 0 ? void 0 : property.ward) || "";
461
+ const wardText = typeof wardVal === "object" ? (wardVal === null || wardVal === void 0 ? void 0 : wardVal.name) || (wardVal === null || wardVal === void 0 ? void 0 : wardVal.code) || "" : String(wardVal || "");
462
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
463
+ parts.push(wardText.trim());
464
+ }
465
+ let cityText = "";
466
+ if (tenantId && (_Digit3 = Digit) !== null && _Digit3 !== void 0 && (_Digit3$Utils = _Digit3.Utils) !== null && _Digit3$Utils !== void 0 && (_Digit3$Utils$pt = _Digit3$Utils.pt) !== null && _Digit3$Utils$pt !== void 0 && _Digit3$Utils$pt.getCityLocale) {
467
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
468
+ cityText = t ? t(cityLocale) : cityLocale;
469
+ }
470
+ if (!cityText || cityText === tenantId) {
471
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
472
+ }
473
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
474
+ parts.push(String(cityText).trim());
475
+ }
476
+ const pincode = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.pincode) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.pinCode) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.pincode) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.pinCode) || (property === null || property === void 0 ? void 0 : property.pincode) || "";
477
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
478
+ parts.push(String(pincode).trim());
479
+ }
480
+ const uniqueParts = [];
481
+ parts.forEach(p => {
482
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
483
+ uniqueParts.push(p);
484
+ }
485
+ });
486
+ return uniqueParts.join(", ");
402
487
  };
403
488
  const formatPropertyAddress = (address, t) => {
404
- var _Digit2, _Digit2$Utils, _Digit2$Utils$pt;
405
- if ((_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$Utils = _Digit2.Utils) !== null && _Digit2$Utils !== void 0 && (_Digit2$Utils$pt = _Digit2$Utils.pt) !== null && _Digit2$Utils$pt !== void 0 && _Digit2$Utils$pt.formatPropertyAddress) {
489
+ var _Digit5, _Digit5$Utils, _Digit5$Utils$pt;
490
+ if ((_Digit5 = Digit) !== null && _Digit5 !== void 0 && (_Digit5$Utils = _Digit5.Utils) !== null && _Digit5$Utils !== void 0 && (_Digit5$Utils$pt = _Digit5$Utils.pt) !== null && _Digit5$Utils$pt !== void 0 && _Digit5$Utils$pt.formatPropertyAddress) {
406
491
  return Digit.Utils.pt.formatPropertyAddress(address, t) || getAddress(address, t);
407
492
  }
408
493
  return getAddress(address, t);
@@ -604,7 +689,7 @@ const getNormalizedBankDetails = data => {
604
689
  };
605
690
  const createPayloadOfWS = function (data) {
606
691
  try {
607
- 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, _Digit3, _Digit3$Customization, _Digit3$Customization2, _Digit4, _Digit4$Customization, _Digit4$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;
608
693
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
609
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"));
610
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 => {
@@ -619,7 +704,7 @@ const createPayloadOfWS = function (data) {
619
704
  const connectionDetailsObject = connectionDetail;
620
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 || {};
621
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);
622
- 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] : [];
623
708
  const {
624
709
  signatureFileStoreId,
625
710
  signatureFileName
@@ -684,6 +769,47 @@ const createPayloadOfWS = function (data) {
684
769
  status: "ACTIVE"
685
770
  });
686
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;
687
813
  let payload = {
688
814
  water: !!isWater,
689
815
  sewerage: !!isSewerage,
@@ -769,9 +895,13 @@ const createPayloadOfWS = function (data) {
769
895
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
770
896
  ...(data === null || data === void 0 ? void 0 : data.disability),
771
897
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
898
+ ...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
772
899
  isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability = data.disability) !== null && _data$disability !== void 0 && _data$disability.isDivyangjan),
773
- 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),
774
- 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),
775
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 => {
776
906
  var _d$documentType5;
777
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"));
@@ -822,16 +952,43 @@ const createPayloadOfWS = function (data) {
822
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,
823
953
  governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
824
954
  whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact5 = data.contact) === null || _data$contact5 === void 0 ? void 0 : _data$contact5.whatsAppNumber,
825
- identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.identityProofNumber,
826
- ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.ownershipDocumentNumber,
827
- otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.otherDocumentNumber,
828
- 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 => {
829
959
  var _d$documentType6, _d$documentType7;
830
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"));
831
961
  })) === null || _allDocuments$find2 === void 0 ? void 0 : _allDocuments$find2.documentUid) || ((_allDocuments$find3 = allDocuments.find(d => {
832
962
  var _d$documentType8, _d$documentType9;
833
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"));
834
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
+ } : {}),
835
992
  ...(getNormalizedBankDetails(data) ? {
836
993
  ...getNormalizedBankDetails(data),
837
994
  bankDetails: getNormalizedBankDetails(data)
@@ -852,7 +1009,7 @@ const createPayloadOfWS = function (data) {
852
1009
  delete payload.additionalDetails.proposedWaterClosets;
853
1010
  sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(allDocuments));
854
1011
  sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$cpt29 = data.cpt) === null || _data$cpt29 === void 0 ? void 0 : _data$cpt29.details) || {}));
855
- payload = (_Digit3 = Digit) !== null && _Digit3 !== void 0 && (_Digit3$Customization = _Digit3.Customizations) !== null && _Digit3$Customization !== void 0 && (_Digit3$Customization2 = _Digit3$Customization.WS) !== null && _Digit3$Customization2 !== void 0 && _Digit3$Customization2.customiseCreatePayloadOfWS ? (_Digit4 = Digit) === null || _Digit4 === void 0 ? void 0 : (_Digit4$Customization = _Digit4.Customizations) === null || _Digit4$Customization === void 0 ? void 0 : (_Digit4$Customization2 = _Digit4$Customization.WS) === null || _Digit4$Customization2 === void 0 ? void 0 : _Digit4$Customization2.customiseCreatePayloadOfWS(data, payload) : payload;
1012
+ payload = (_Digit6 = Digit) !== null && _Digit6 !== void 0 && (_Digit6$Customization = _Digit6.Customizations) !== null && _Digit6$Customization !== void 0 && (_Digit6$Customization2 = _Digit6$Customization.WS) !== null && _Digit6$Customization2 !== void 0 && _Digit6$Customization2.customiseCreatePayloadOfWS ? (_Digit7 = Digit) === null || _Digit7 === void 0 ? void 0 : (_Digit7$Customization = _Digit7.Customizations) === null || _Digit7$Customization === void 0 ? void 0 : (_Digit7$Customization2 = _Digit7$Customization.WS) === null || _Digit7$Customization2 === void 0 ? void 0 : _Digit7$Customization2.customiseCreatePayloadOfWS(data, payload) : payload;
856
1013
  return Promise.resolve(payload);
857
1014
  } catch (e) {
858
1015
  return Promise.reject(e);
@@ -860,7 +1017,7 @@ const createPayloadOfWS = function (data) {
860
1017
  };
861
1018
  const updatePayloadOfWS = function (data, type) {
862
1019
  try {
863
- var _data$additionalDetai7, _data$additionalDetai8, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
1020
+ var _data$additionalDetai12, _data$additionalDetai13, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
864
1021
  const {
865
1022
  signatureFileStoreId,
866
1023
  signatureFileName
@@ -902,22 +1059,22 @@ const updatePayloadOfWS = function (data, type) {
902
1059
  fileName: signatureFileName
903
1060
  }
904
1061
  } : {}),
905
- connectionType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.connectionType) || "Permanent",
906
- 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) || {
907
1064
  code: "NON_BULK",
908
1065
  i18nKey: "WS_WATER_DEMAND_NON_BULK"
909
1066
  }
910
1067
  }
911
1068
  };
912
- payload = (_Digit5 = Digit) !== null && _Digit5 !== void 0 && (_Digit5$Customization = _Digit5.Customizations) !== null && _Digit5$Customization !== void 0 && (_Digit5$Customization2 = _Digit5$Customization.WS) !== null && _Digit5$Customization2 !== void 0 && _Digit5$Customization2.customiseUpdatePayloadOfWS ? (_Digit6 = Digit) === null || _Digit6 === void 0 ? void 0 : (_Digit6$Customization = _Digit6.Customizations) === null || _Digit6$Customization === void 0 ? void 0 : (_Digit6$Customization2 = _Digit6$Customization.WS) === null || _Digit6$Customization2 === void 0 ? void 0 : _Digit6$Customization2.customiseUpdatePayloadOfWS(data, payload, type) : payload;
1069
+ payload = (_Digit8 = Digit) !== null && _Digit8 !== void 0 && (_Digit8$Customization = _Digit8.Customizations) !== null && _Digit8$Customization !== void 0 && (_Digit8$Customization2 = _Digit8$Customization.WS) !== null && _Digit8$Customization2 !== void 0 && _Digit8$Customization2.customiseUpdatePayloadOfWS ? (_Digit9 = Digit) === null || _Digit9 === void 0 ? void 0 : (_Digit9$Customization = _Digit9.Customizations) === null || _Digit9$Customization === void 0 ? void 0 : (_Digit9$Customization2 = _Digit9$Customization.WS) === null || _Digit9$Customization2 === void 0 ? void 0 : _Digit9$Customization2.customiseUpdatePayloadOfWS(data, payload, type) : payload;
913
1070
  return Promise.resolve(payload);
914
1071
  } catch (e) {
915
1072
  return Promise.reject(e);
916
1073
  }
917
1074
  };
918
1075
  const getAllDocumentsForUpdate = data => {
919
- var _data$documents7, _data$governmentEmplo5;
920
- 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] : [];
921
1078
  const {
922
1079
  signatureFileStoreId,
923
1080
  signatureFileName
@@ -1019,7 +1176,7 @@ const getAllDocumentsForUpdate = data => {
1019
1176
  return allDocuments;
1020
1177
  };
1021
1178
  const convertToWSUpdate = data => {
1022
- 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, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$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;
1023
1180
  const {
1024
1181
  signatureFileStoreId,
1025
1182
  signatureFileName
@@ -1059,8 +1216,14 @@ const convertToWSUpdate = data => {
1059
1216
  } : {}),
1060
1217
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1061
1218
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1062
- 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),
1063
- 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)
1064
1227
  } : {}),
1065
1228
  ...(getNormalizedBankDetails(data) ? {
1066
1229
  ...getNormalizedBankDetails(data),
@@ -1072,11 +1235,11 @@ const convertToWSUpdate = data => {
1072
1235
  }
1073
1236
  }
1074
1237
  };
1075
- formdata = (_Digit7 = Digit) !== null && _Digit7 !== void 0 && (_Digit7$Customization = _Digit7.Customizations) !== null && _Digit7$Customization !== void 0 && (_Digit7$Customization2 = _Digit7$Customization.WS) !== null && _Digit7$Customization2 !== void 0 && _Digit7$Customization2.customiseWSUpdate ? (_Digit8 = Digit) === null || _Digit8 === void 0 ? void 0 : (_Digit8$Customization = _Digit8.Customizations) === null || _Digit8$Customization === void 0 ? void 0 : (_Digit8$Customization2 = _Digit8$Customization.WS) === null || _Digit8$Customization2 === void 0 ? void 0 : _Digit8$Customization2.customiseWSUpdate(data, formdata) : formdata;
1238
+ formdata = (_Digit0 = Digit) !== null && _Digit0 !== void 0 && (_Digit0$Customization = _Digit0.Customizations) !== null && _Digit0$Customization !== void 0 && (_Digit0$Customization2 = _Digit0$Customization.WS) !== null && _Digit0$Customization2 !== void 0 && _Digit0$Customization2.customiseWSUpdate ? (_Digit1 = Digit) === null || _Digit1 === void 0 ? void 0 : (_Digit1$Customization = _Digit1.Customizations) === null || _Digit1$Customization === void 0 ? void 0 : (_Digit1$Customization2 = _Digit1$Customization.WS) === null || _Digit1$Customization2 === void 0 ? void 0 : _Digit1$Customization2.customiseWSUpdate(data, formdata) : formdata;
1076
1239
  return formdata;
1077
1240
  };
1078
1241
  const convertToEditWSUpdate = data => {
1079
- 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, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
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;
1080
1243
  const {
1081
1244
  signatureFileStoreId,
1082
1245
  signatureFileName
@@ -1114,9 +1277,9 @@ const convertToEditWSUpdate = data => {
1114
1277
  fileName: signatureFileName
1115
1278
  }
1116
1279
  } : {}),
1117
- 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,
1118
- 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) || "",
1119
- 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) || "",
1120
1283
  ...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
1121
1284
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
1122
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,
@@ -1131,23 +1294,29 @@ const convertToEditWSUpdate = data => {
1131
1294
  } : {}),
1132
1295
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1133
1296
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1134
- 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),
1135
- 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)
1136
1305
  } : {}),
1137
1306
  ...(getNormalizedBankDetails(data) ? {
1138
1307
  ...getNormalizedBankDetails(data),
1139
1308
  bankDetails: getNormalizedBankDetails(data)
1140
1309
  } : {}),
1141
1310
  ...(data !== null && data !== void 0 && (_data$waterConnection2 = data.waterConnection) !== null && _data$waterConnection2 !== void 0 && _data$waterConnection2.useDetails ? {
1142
- 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),
1143
- 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),
1144
- 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),
1145
- 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),
1146
- 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),
1147
- 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),
1148
- 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),
1149
- 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),
1150
- 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) || ""
1151
1320
  } : {})
1152
1321
  },
1153
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,
@@ -1245,11 +1414,11 @@ const convertToEditWSUpdate = data => {
1245
1414
  assignes: []
1246
1415
  }
1247
1416
  };
1248
- formdata = (_Digit9 = Digit) !== null && _Digit9 !== void 0 && (_Digit9$Customization = _Digit9.Customizations) !== null && _Digit9$Customization !== void 0 && (_Digit9$Customization2 = _Digit9$Customization.WS) !== null && _Digit9$Customization2 !== void 0 && _Digit9$Customization2.customiseEditWSUpdate ? (_Digit0 = Digit) === null || _Digit0 === void 0 ? void 0 : (_Digit0$Customization = _Digit0.Customizations) === null || _Digit0$Customization === void 0 ? void 0 : (_Digit0$Customization2 = _Digit0$Customization.WS) === null || _Digit0$Customization2 === void 0 ? void 0 : _Digit0$Customization2.customiseEditWSUpdate(data, formdata) : formdata;
1417
+ formdata = (_Digit10 = Digit) !== null && _Digit10 !== void 0 && (_Digit10$Customizatio = _Digit10.Customizations) !== null && _Digit10$Customizatio !== void 0 && (_Digit10$Customizatio2 = _Digit10$Customizatio.WS) !== null && _Digit10$Customizatio2 !== void 0 && _Digit10$Customizatio2.customiseEditWSUpdate ? (_Digit11 = Digit) === null || _Digit11 === void 0 ? void 0 : (_Digit11$Customizatio = _Digit11.Customizations) === null || _Digit11$Customizatio === void 0 ? void 0 : (_Digit11$Customizatio2 = _Digit11$Customizatio.WS) === null || _Digit11$Customizatio2 === void 0 ? void 0 : _Digit11$Customizatio2.customiseEditWSUpdate(data, formdata) : formdata;
1249
1418
  return formdata;
1250
1419
  };
1251
1420
  const convertToEditSWUpdate = data => {
1252
- 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, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$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;
1253
1422
  const {
1254
1423
  signatureFileStoreId,
1255
1424
  signatureFileName
@@ -1286,9 +1455,9 @@ const convertToEditSWUpdate = data => {
1286
1455
  fileName: signatureFileName
1287
1456
  }
1288
1457
  } : {}),
1289
- 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,
1290
- 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) || "",
1291
- 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) || "",
1292
1461
  ...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
1293
1462
  ...(data === null || data === void 0 ? void 0 : data.djbEmployee),
1294
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,
@@ -1303,23 +1472,29 @@ const convertToEditSWUpdate = data => {
1303
1472
  } : {}),
1304
1473
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1305
1474
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1306
- 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),
1307
- 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)
1308
1483
  } : {}),
1309
1484
  ...(getNormalizedBankDetails(data) ? {
1310
1485
  ...getNormalizedBankDetails(data),
1311
1486
  bankDetails: getNormalizedBankDetails(data)
1312
1487
  } : {}),
1313
1488
  ...(data !== null && data !== void 0 && (_data$waterConnection8 = data.waterConnection) !== null && _data$waterConnection8 !== void 0 && _data$waterConnection8.useDetails ? {
1314
- 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),
1315
- 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),
1316
- 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),
1317
- 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),
1318
- 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),
1319
- 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),
1320
- 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),
1321
- 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),
1322
- 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) || ""
1323
1498
  } : {})
1324
1499
  },
1325
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,
@@ -1417,11 +1592,11 @@ const convertToEditSWUpdate = data => {
1417
1592
  assignes: []
1418
1593
  }
1419
1594
  };
1420
- formdata = (_Digit1 = Digit) !== null && _Digit1 !== void 0 && (_Digit1$Customization = _Digit1.Customizations) !== null && _Digit1$Customization !== void 0 && (_Digit1$Customization2 = _Digit1$Customization.WS) !== null && _Digit1$Customization2 !== void 0 && _Digit1$Customization2.customiseEditSWUpdate ? (_Digit10 = Digit) === null || _Digit10 === void 0 ? void 0 : (_Digit10$Customizatio = _Digit10.Customizations) === null || _Digit10$Customizatio === void 0 ? void 0 : (_Digit10$Customizatio2 = _Digit10$Customizatio.WS) === null || _Digit10$Customizatio2 === void 0 ? void 0 : _Digit10$Customizatio2.customiseEditSWUpdate(data, formdata) : formdata;
1595
+ formdata = (_Digit12 = Digit) !== null && _Digit12 !== void 0 && (_Digit12$Customizatio = _Digit12.Customizations) !== null && _Digit12$Customizatio !== void 0 && (_Digit12$Customizatio2 = _Digit12$Customizatio.WS) !== null && _Digit12$Customizatio2 !== void 0 && _Digit12$Customizatio2.customiseEditSWUpdate ? (_Digit13 = Digit) === null || _Digit13 === void 0 ? void 0 : (_Digit13$Customizatio = _Digit13.Customizations) === null || _Digit13$Customizatio === void 0 ? void 0 : (_Digit13$Customizatio2 = _Digit13$Customizatio.WS) === null || _Digit13$Customizatio2 === void 0 ? void 0 : _Digit13$Customizatio2.customiseEditSWUpdate(data, formdata) : formdata;
1421
1596
  return formdata;
1422
1597
  };
1423
1598
  const convertToSWUpdate = data => {
1424
- 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, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2, _Digit12, _Digit12$Customizatio, _Digit12$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;
1425
1600
  const {
1426
1601
  signatureFileStoreId,
1427
1602
  signatureFileName
@@ -1462,8 +1637,14 @@ const convertToSWUpdate = data => {
1462
1637
  } : {}),
1463
1638
  ...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
1464
1639
  ...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
1465
- 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),
1466
- 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)
1467
1648
  } : {}),
1468
1649
  ...(getNormalizedBankDetails(data) ? {
1469
1650
  ...getNormalizedBankDetails(data),
@@ -1475,12 +1656,12 @@ const convertToSWUpdate = data => {
1475
1656
  }
1476
1657
  }
1477
1658
  };
1478
- formdata = (_Digit11 = Digit) !== null && _Digit11 !== void 0 && (_Digit11$Customizatio = _Digit11.Customizations) !== null && _Digit11$Customizatio !== void 0 && (_Digit11$Customizatio2 = _Digit11$Customizatio.WS) !== null && _Digit11$Customizatio2 !== void 0 && _Digit11$Customizatio2.customiseSWUpdate ? (_Digit12 = Digit) === null || _Digit12 === void 0 ? void 0 : (_Digit12$Customizatio = _Digit12.Customizations) === null || _Digit12$Customizatio === void 0 ? void 0 : (_Digit12$Customizatio2 = _Digit12$Customizatio.WS) === null || _Digit12$Customizatio2 === void 0 ? void 0 : _Digit12$Customizatio2.customiseSWUpdate(data, formdata) : formdata;
1659
+ formdata = (_Digit14 = Digit) !== null && _Digit14 !== void 0 && (_Digit14$Customizatio = _Digit14.Customizations) !== null && _Digit14$Customizatio !== void 0 && (_Digit14$Customizatio2 = _Digit14$Customizatio.WS) !== null && _Digit14$Customizatio2 !== void 0 && _Digit14$Customizatio2.customiseSWUpdate ? (_Digit15 = Digit) === null || _Digit15 === void 0 ? void 0 : (_Digit15$Customizatio = _Digit15.Customizations) === null || _Digit15$Customizatio === void 0 ? void 0 : (_Digit15$Customizatio2 = _Digit15$Customizatio.WS) === null || _Digit15$Customizatio2 === void 0 ? void 0 : _Digit15$Customizatio2.customiseSWUpdate(data, formdata) : formdata;
1479
1660
  return formdata;
1480
1661
  };
1481
1662
  const createPayloadOfWSDisconnection = function (data, storeData, service) {
1482
1663
  try {
1483
- var _Digit$UserService$ge8, _Digit$UserService$ge9, _storeData$applicatio, _storeData$applicatio2, _storeData$applicatio25, _storeData$applicatio26, _storeData$applicatio27, _storeData$applicatio28, _storeData$applicatio29, _storeData$applicatio30, _data$type, _data$type$value, _data$type2, _data$type2$value, _data$reason, _data$reason$value, _data$reason2, _data$reason3, _storeData$applicatio31, _storeData$applicatio32, _storeData$applicatio33, _storeData$applicatio34, _storeData$applicatio35, _storeData$applicatio36, _storeData$applicatio37, _storeData$applicatio38, _storeData$applicatio39, _storeData$applicatio40, _plumberInfo, _storeData$applicatio41, _storeData$applicatio42, _storeData$applicatio43, _storeData$applicatio44, _storeData$applicatio45, _storeData$applicatio46, _storeData$applicatio47, _storeData$applicatio48, _storeData$applicatio49, _storeData$applicatio54, _storeData$applicatio55, _storeData$applicatio56, _storeData$applicatio57, _storeData$applicatio58, _storeData$applicatio59, _data$type3, _data$type3$value, _data$reason4, _data$reason4$value, _data$reason5, _data$reason6, _storeData$applicatio60, _storeData$applicatio61, _storeData$applicatio62, _storeData$applicatio63, _storeData$applicatio64, _storeData$applicatio65, _storeData$applicatio66, _storeData$applicatio67, _plumberInfo2, _storeData$applicatio68, _storeData$applicatio69, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio72, _storeData$applicatio73, _storeData$applicatio74, _storeData$applicatio75, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2;
1664
+ var _Digit$UserService$ge8, _Digit$UserService$ge9, _storeData$applicatio, _storeData$applicatio2, _storeData$applicatio25, _storeData$applicatio26, _storeData$applicatio27, _storeData$applicatio28, _storeData$applicatio29, _storeData$applicatio30, _data$type, _data$type$value, _data$type2, _data$type2$value, _data$reason, _data$reason$value, _data$reason2, _data$reason3, _storeData$applicatio31, _storeData$applicatio32, _storeData$applicatio33, _storeData$applicatio34, _storeData$applicatio35, _storeData$applicatio36, _storeData$applicatio37, _storeData$applicatio38, _storeData$applicatio39, _storeData$applicatio40, _plumberInfo, _storeData$applicatio41, _storeData$applicatio42, _storeData$applicatio43, _storeData$applicatio44, _storeData$applicatio45, _storeData$applicatio46, _storeData$applicatio47, _storeData$applicatio48, _storeData$applicatio49, _storeData$applicatio54, _storeData$applicatio55, _storeData$applicatio56, _storeData$applicatio57, _storeData$applicatio58, _storeData$applicatio59, _data$type3, _data$type3$value, _data$reason4, _data$reason4$value, _data$reason5, _data$reason6, _storeData$applicatio60, _storeData$applicatio61, _storeData$applicatio62, _storeData$applicatio63, _storeData$applicatio64, _storeData$applicatio65, _storeData$applicatio66, _storeData$applicatio67, _plumberInfo2, _storeData$applicatio68, _storeData$applicatio69, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio72, _storeData$applicatio73, _storeData$applicatio74, _storeData$applicatio75, _Digit16, _Digit16$Customizatio, _Digit16$Customizatio2, _Digit17, _Digit17$Customizatio, _Digit17$Customizatio2;
1484
1665
  const user = (_Digit$UserService$ge8 = Digit.UserService.getUser()) === null || _Digit$UserService$ge8 === void 0 ? void 0 : (_Digit$UserService$ge9 = _Digit$UserService$ge8.info) === null || _Digit$UserService$ge9 === void 0 ? void 0 : _Digit$UserService$ge9.type;
1485
1666
  let plumberInfo = [];
1486
1667
  if ((storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio = storeData.applicationData) === null || _storeData$applicatio === void 0 ? void 0 : (_storeData$applicatio2 = _storeData$applicatio.plumberInfo) === null || _storeData$applicatio2 === void 0 ? void 0 : _storeData$applicatio2.length) > 0) {
@@ -1581,7 +1762,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
1581
1762
  disconnectRequest: true
1582
1763
  };
1583
1764
  let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
1584
- returnObject = (_Digit13 = Digit) !== null && _Digit13 !== void 0 && (_Digit13$Customizatio = _Digit13.Customizations) !== null && _Digit13$Customizatio !== void 0 && (_Digit13$Customizatio2 = _Digit13$Customizatio.WS) !== null && _Digit13$Customizatio2 !== void 0 && _Digit13$Customizatio2.customiseCreatePayloadOfWSDisconnection ? (_Digit14 = Digit) === null || _Digit14 === void 0 ? void 0 : (_Digit14$Customizatio = _Digit14.Customizations) === null || _Digit14$Customizatio === void 0 ? void 0 : (_Digit14$Customizatio2 = _Digit14$Customizatio.WS) === null || _Digit14$Customizatio2 === void 0 ? void 0 : _Digit14$Customizatio2.customiseCreatePayloadOfWSDisconnection(data, returnObject, service) : returnObject;
1765
+ returnObject = (_Digit16 = Digit) !== null && _Digit16 !== void 0 && (_Digit16$Customizatio = _Digit16.Customizations) !== null && _Digit16$Customizatio !== void 0 && (_Digit16$Customizatio2 = _Digit16$Customizatio.WS) !== null && _Digit16$Customizatio2 !== void 0 && _Digit16$Customizatio2.customiseCreatePayloadOfWSDisconnection ? (_Digit17 = Digit) === null || _Digit17 === void 0 ? void 0 : (_Digit17$Customizatio = _Digit17.Customizations) === null || _Digit17$Customizatio === void 0 ? void 0 : (_Digit17$Customizatio2 = _Digit17$Customizatio.WS) === null || _Digit17$Customizatio2 === void 0 ? void 0 : _Digit17$Customizatio2.customiseCreatePayloadOfWSDisconnection(data, returnObject, service) : returnObject;
1585
1766
  return Promise.resolve(returnObject);
1586
1767
  } catch (e) {
1587
1768
  return Promise.reject(e);
@@ -1699,7 +1880,7 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1699
1880
  };
1700
1881
  const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
1701
1882
  try {
1702
- var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type4, _data$type4$value, _data$reason13, _data$reason13$value, _data$reason14, _data$reason15, _storeData$applicatio149, _storeData$applicatio150, _storeData$applicatio151, _storeData$applicatio152, _data$type5, _data$type5$value, _data$reason16, _data$reason16$value, _data$reason17, _data$reason18, _storeData$applicatio157, _storeData$applicatio158, _storeData$applicatio159, _Digit15, _Digit15$Customizatio, _Digit15$Customizatio2, _Digit16, _Digit16$Customizatio, _Digit16$Customizatio2;
1883
+ var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type4, _data$type4$value, _data$reason13, _data$reason13$value, _data$reason14, _data$reason15, _storeData$applicatio149, _storeData$applicatio150, _storeData$applicatio151, _storeData$applicatio152, _data$type5, _data$type5$value, _data$reason16, _data$reason16$value, _data$reason17, _data$reason18, _storeData$applicatio157, _storeData$applicatio158, _storeData$applicatio159, _Digit18, _Digit18$Customizatio, _Digit18$Customizatio2, _Digit19, _Digit19$Customizatio, _Digit19$Customizatio2;
1703
1884
  const user = (_Digit$UserService$ge10 = Digit.UserService.getUser()) === null || _Digit$UserService$ge10 === void 0 ? void 0 : (_Digit$UserService$ge11 = _Digit$UserService$ge10.info) === null || _Digit$UserService$ge11 === void 0 ? void 0 : _Digit$UserService$ge11.type;
1704
1885
  let wsPayload = {
1705
1886
  WaterConnection: {
@@ -1751,7 +1932,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1751
1932
  disconnectRequest: true
1752
1933
  };
1753
1934
  let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
1754
- returnObject = (_Digit15 = Digit) !== null && _Digit15 !== void 0 && (_Digit15$Customizatio = _Digit15.Customizations) !== null && _Digit15$Customizatio !== void 0 && (_Digit15$Customizatio2 = _Digit15$Customizatio.WS) !== null && _Digit15$Customizatio2 !== void 0 && _Digit15$Customizatio2.customiseCreatePayloadOfWSReSubmitDisconnection ? (_Digit16 = Digit) === null || _Digit16 === void 0 ? void 0 : (_Digit16$Customizatio = _Digit16.Customizations) === null || _Digit16$Customizatio === void 0 ? void 0 : (_Digit16$Customizatio2 = _Digit16$Customizatio.WS) === null || _Digit16$Customizatio2 === void 0 ? void 0 : _Digit16$Customizatio2.customiseCreatePayloadOfWSReSubmitDisconnection(data, returnObject, service) : returnObject;
1935
+ returnObject = (_Digit18 = Digit) !== null && _Digit18 !== void 0 && (_Digit18$Customizatio = _Digit18.Customizations) !== null && _Digit18$Customizatio !== void 0 && (_Digit18$Customizatio2 = _Digit18$Customizatio.WS) !== null && _Digit18$Customizatio2 !== void 0 && _Digit18$Customizatio2.customiseCreatePayloadOfWSReSubmitDisconnection ? (_Digit19 = Digit) === null || _Digit19 === void 0 ? void 0 : (_Digit19$Customizatio = _Digit19.Customizations) === null || _Digit19$Customizatio === void 0 ? void 0 : (_Digit19$Customizatio2 = _Digit19$Customizatio.WS) === null || _Digit19$Customizatio2 === void 0 ? void 0 : _Digit19$Customizatio2.customiseCreatePayloadOfWSReSubmitDisconnection(data, returnObject, service) : returnObject;
1755
1936
  return Promise.resolve(returnObject);
1756
1937
  } catch (e) {
1757
1938
  return Promise.reject(e);
@@ -1759,7 +1940,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1759
1940
  };
1760
1941
  const updatePayloadOfWSDisconnection = function (data, type) {
1761
1942
  try {
1762
- var _data$plumberInfo, _data$plumberInfo2, _Digit17, _Digit17$Customizatio, _Digit17$Customizatio2, _Digit18, _Digit18$Customizatio, _Digit18$Customizatio2;
1943
+ var _data$plumberInfo, _data$plumberInfo2, _Digit20, _Digit20$Customizatio, _Digit20$Customizatio2, _Digit21, _Digit21$Customizatio, _Digit21$Customizatio2;
1763
1944
  let payload = {
1764
1945
  ...data,
1765
1946
  plumberInfo: data !== null && data !== void 0 && (_data$plumberInfo = data.plumberInfo) !== null && _data$plumberInfo !== void 0 && _data$plumberInfo[0] ? [{
@@ -1773,7 +1954,7 @@ const updatePayloadOfWSDisconnection = function (data, type) {
1773
1954
  action: "SUBMIT_APPLICATION"
1774
1955
  }
1775
1956
  };
1776
- payload = (_Digit17 = Digit) !== null && _Digit17 !== void 0 && (_Digit17$Customizatio = _Digit17.Customizations) !== null && _Digit17$Customizatio !== void 0 && (_Digit17$Customizatio2 = _Digit17$Customizatio.WS) !== null && _Digit17$Customizatio2 !== void 0 && _Digit17$Customizatio2.customiseUpdatePayloadOfWSDisconnection ? (_Digit18 = Digit) === null || _Digit18 === void 0 ? void 0 : (_Digit18$Customizatio = _Digit18.Customizations) === null || _Digit18$Customizatio === void 0 ? void 0 : (_Digit18$Customizatio2 = _Digit18$Customizatio.WS) === null || _Digit18$Customizatio2 === void 0 ? void 0 : _Digit18$Customizatio2.customiseUpdatePayloadOfWSDisconnection(data, payload, type) : payload;
1957
+ payload = (_Digit20 = Digit) !== null && _Digit20 !== void 0 && (_Digit20$Customizatio = _Digit20.Customizations) !== null && _Digit20$Customizatio !== void 0 && (_Digit20$Customizatio2 = _Digit20$Customizatio.WS) !== null && _Digit20$Customizatio2 !== void 0 && _Digit20$Customizatio2.customiseUpdatePayloadOfWSDisconnection ? (_Digit21 = Digit) === null || _Digit21 === void 0 ? void 0 : (_Digit21$Customizatio = _Digit21.Customizations) === null || _Digit21$Customizatio === void 0 ? void 0 : (_Digit21$Customizatio2 = _Digit21$Customizatio.WS) === null || _Digit21$Customizatio2 === void 0 ? void 0 : _Digit21$Customizatio2.customiseUpdatePayloadOfWSDisconnection(data, payload, type) : payload;
1777
1958
  return Promise.resolve(payload);
1778
1959
  } catch (e) {
1779
1960
  return Promise.reject(e);
@@ -2281,12 +2462,12 @@ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
2281
2462
  };
2282
2463
  const convertEditApplicationDetails = function (data, appData, actionData) {
2283
2464
  try {
2284
- 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;
2285
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 => {
2286
2467
  if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
2287
2468
  });
2288
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) || [];
2289
- 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) || [];
2290
2471
  if (docs && docs.length > 0 && existingDocs && existingDocs.length > 0) {
2291
2472
  docs = mapExistingDocIdsToPayload(docs, existingDocs);
2292
2473
  }
@@ -2380,7 +2561,7 @@ const convertDisonnectApplicationData = function (data, serviceType, editByConfi
2380
2561
  };
2381
2562
  const convertDisonnectEditApplicationDetails = function (data, appData, actionData) {
2382
2563
  try {
2383
- 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;
2384
2565
  const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
2385
2566
  const docsData = docs ? JSON.parse(docs) : "";
2386
2567
  const documentsData = [];
@@ -2408,7 +2589,7 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
2408
2589
  }];
2409
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) || "",
2410
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,
2411
- _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;
2412
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) {
2413
2594
  var _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
2414
2595
  let payload = {
@@ -2462,8 +2643,8 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2462
2643
  var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
2463
2644
  function _temp9() {
2464
2645
  function _temp7() {
2465
- 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;
2466
- 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;
2467
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) || [];
2468
2649
  if (formData.documents && formData.documents.length > 0 && existingDocs && existingDocs.length > 0) {
2469
2650
  formData.documents = mapExistingDocIdsToPayload(formData.documents, existingDocs);
@@ -2491,7 +2672,7 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
2491
2672
  };
2492
2673
  formData.action = actionData;
2493
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";
2494
- 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) || []));
2495
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));
2496
2677
  return formData;
2497
2678
  }
@@ -11300,7 +11481,7 @@ const configNOCApproverApplication = _ref => {
11300
11481
  };
11301
11482
 
11302
11483
  const configWSApproverApplication = _ref => {
11303
- var _action$action;
11484
+ var _action$action, _businessService$toUp;
11304
11485
  let {
11305
11486
  t,
11306
11487
  action,
@@ -11366,12 +11547,16 @@ const configWSApproverApplication = _ref => {
11366
11547
  }
11367
11548
  }];
11368
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");
11369
11551
  const getHeadingLabel = () => {
11370
11552
  if (isActivate) {
11371
11553
  const translated = t("WF_APPROVE_APPLICATION");
11372
11554
  if (translated && translated !== "WF_APPROVE_APPLICATION") return translated;
11373
11555
  return "Approve Application";
11374
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
+ }
11375
11560
  return `WF_${action === null || action === void 0 ? void 0 : action.action}_APPLICATION`;
11376
11561
  };
11377
11562
  const getSubmitLabel = () => {
@@ -11384,6 +11569,9 @@ const configWSApproverApplication = _ref => {
11384
11569
  }
11385
11570
  return "Approve Connection";
11386
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
+ }
11387
11575
  return `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
11388
11576
  };
11389
11577
  return {
@@ -20786,6 +20974,118 @@ const ApplicationDetails = props => {
20786
20974
  })) : /*#__PURE__*/React.createElement(Loader, null));
20787
20975
  };
20788
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
+
20789
21089
  const ApplicationDetailsBillAmendment = () => {
20790
21090
  var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a3;
20791
21091
  const queryParams = Digit.Hooks.useQueryParams();
@@ -20798,6 +21098,8 @@ const ApplicationDetailsBillAmendment = () => {
20798
21098
  let serviceType = "WATER";
20799
21099
  if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
20800
21100
  const [showToast, setShowToast] = useState(false);
21101
+ const [hideTimeline, setHideTimeline] = React.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false);
21102
+ const menuRef = useRef();
20801
21103
  const {
20802
21104
  isLoading,
20803
21105
  isError,
@@ -20844,6 +21146,10 @@ const ApplicationDetailsBillAmendment = () => {
20844
21146
  }
20845
21147
  }, [showToast]);
20846
21148
  const [showOptions, setShowOptions] = useState(false);
21149
+ const closeMenu = () => {
21150
+ setShowOptions(false);
21151
+ };
21152
+ Digit.Hooks.useClickOutside(menuRef, closeMenu, showOptions);
20847
21153
  const getAckPdf = function (amendment, tenantId, t, tableData, app) {
20848
21154
  try {
20849
21155
  const PDFdata = getWSAcknowledgementData$2(amendment, tenantId, t, tableData, app);
@@ -20863,25 +21169,42 @@ const ApplicationDetailsBillAmendment = () => {
20863
21169
  onClick: () => getAckPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.amendment, tenantId, t, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationDetails, applicationDetails)
20864
21170
  }];
20865
21171
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
20866
- className: "employee-main-application-details"
20867
- }, /*#__PURE__*/React.createElement("div", {
20868
- className: "employee-application-details",
21172
+ className: "employee-main-application-details",
20869
21173
  style: {
20870
- marginBottom: "15px"
21174
+ display: "flex",
21175
+ gap: "20px"
20871
21176
  }
20872
- }, /*#__PURE__*/React.createElement(Header, {
20873
- styles: {
20874
- marginLeft: "0px",
20875
- paddingTop: "10px",
20876
- 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"
20877
21183
  }
20878
- }, isEmployee ? t("CS_TITLE_GENERATE_NOTE") : t("WS_BILL_AMEND_APP_DETAILS", "Bill Amendment Application Details")), dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React.createElement(MultiLink, {
20879
- 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",
20880
21202
  onHeadClick: () => setShowOptions(!showOptions),
20881
21203
  displayOptions: showOptions,
20882
21204
  options: dowloadOptions,
20883
21205
  downloadBtnClassName: "employee-download-btn-className",
20884
- optionsClassName: "employee-options-btn-className"
21206
+ optionsClassName: "employee-options-btn-className",
21207
+ ref: menuRef
20885
21208
  })), /*#__PURE__*/React.createElement(ApplicationDetails, {
20886
21209
  applicationDetails: applicationDetails,
20887
21210
  isLoading: isLoading,
@@ -20894,8 +21217,9 @@ const ApplicationDetailsBillAmendment = () => {
20894
21217
  showToast: showToast,
20895
21218
  setShowToast: setShowToast,
20896
21219
  closeToast: () => setShowToast(null),
20897
- timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
20898
- })), 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, {
20899
21223
  isDleteBtn: true,
20900
21224
  error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
20901
21225
  label: isSuccess ? showToast === null || showToast === void 0 ? void 0 : showToast.label : updateError === null || updateError === void 0 ? void 0 : updateError.Error
@@ -25392,8 +25716,9 @@ const BILLSBreadCrumbs = _ref => {
25392
25716
  isclickable: false
25393
25717
  }, {
25394
25718
  path: "/digit-ui/employee/ws/generate-note-bill-amendment",
25395
- label: t("CS_TITLE_GENERATE_NOTE"),
25396
- 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
25397
25722
  }, {
25398
25723
  path: "/digit-ui/employee/ws/water/bulk-bil",
25399
25724
  label: t("CS_TITLE_BULK_BILL"),
@@ -25622,9 +25947,11 @@ const App$1 = _ref2 => {
25622
25947
  })
25623
25948
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
25624
25949
  path: `${path}/generate-note-bill-amendment`,
25625
- component: () => /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, {
25950
+ component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
25951
+ layoutClass: "action"
25952
+ }, /*#__PURE__*/React.createElement(WSApplicationDetailsBillAmendment, {
25626
25953
  path
25627
- })
25954
+ }))
25628
25955
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
25629
25956
  path: `${path}/response`,
25630
25957
  component: () => /*#__PURE__*/React.createElement(Response, {
@@ -31390,21 +31717,23 @@ const UploadFileDigiLocker = props => {
31390
31717
  const handleFileUpload = e => {
31391
31718
  const file = e.target.files[0];
31392
31719
  if (file) {
31393
- if (file.size > 5242880) {
31720
+ const maxSize = props.maxSize || 5242880;
31721
+ const maxSizeText = props.maxSizeText || "5MB";
31722
+ if (file.size > maxSize) {
31394
31723
  setShowToast({
31395
31724
  error: true,
31396
- label: "File size should not exceed 5MB."
31725
+ label: props.sizeErrorMessage || `File size should not exceed ${maxSizeText}.`
31397
31726
  });
31398
31727
  inpRef.current.value = "";
31399
31728
  return;
31400
31729
  }
31401
- const allowedTypes = ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31730
+ const allowedTypes = props.allowedTypes || ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31402
31731
  const fileExtension = file.name.split('.').pop().toLowerCase();
31403
- const allowedExtensions = ["pdf", "jpeg", "png", "jpg"];
31732
+ const allowedExtensions = props.allowedExtensions || ["pdf", "jpeg", "png", "jpg"];
31404
31733
  if (!allowedTypes.includes(file.type) && !allowedExtensions.includes(fileExtension)) {
31405
31734
  setShowToast({
31406
31735
  error: true,
31407
- label: "Invalid file format. Only PDF, JPG, and PNG are allowed."
31736
+ label: props.formatErrorMessage || `Invalid file format. Only ${props.allowedFormatsText || "PDF, JPG, and PNG"} are allowed.`
31408
31737
  });
31409
31738
  inpRef.current.value = "";
31410
31739
  return;
@@ -31548,11 +31877,16 @@ const isOtherDocument = function (code) {
31548
31877
  }
31549
31878
  return code.toUpperCase().includes("OTHER");
31550
31879
  };
31551
- const isRwhDocType = doc => {
31880
+ const isRwhDocType$1 = doc => {
31552
31881
  if (!doc) return false;
31553
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();
31554
31883
  return str.includes("RAIN") || str.includes("HARVEST");
31555
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
+ };
31556
31890
  const removeDuplicateOtherDocuments = function (documentList) {
31557
31891
  if (documentList === void 0) {
31558
31892
  documentList = [];
@@ -31565,8 +31899,51 @@ const removeDuplicateOtherDocuments = function (documentList) {
31565
31899
  return true;
31566
31900
  });
31567
31901
  };
31902
+ const getDocUploadSpecs = (doc, isApplicantPhoto) => {
31903
+ const code = ((doc === null || doc === void 0 ? void 0 : doc.code) || "").toUpperCase();
31904
+ if (isApplicantPhoto || code === "OWNER.APPLICANTPHOTO" || code.includes("PHOTO")) {
31905
+ return {
31906
+ type: "PHOTO",
31907
+ maxSize: 200 * 1024,
31908
+ maxSizeText: "200KB",
31909
+ allowedExtensions: ["jpg", "jpeg"],
31910
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
31911
+ allowedFormatsText: "JPEG",
31912
+ accept: "image/jpeg, .jpg, .jpeg",
31913
+ uiMessage: "Allowed format: JPEG | Max file size: 200KB",
31914
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Applicant Photo",
31915
+ sizeErrorMessage: "Applicant Photo size should not exceed 200KB"
31916
+ };
31917
+ }
31918
+ if (code === "OWNER.OWNERSHIPPROOF" || code.includes("OWNERSHIP")) {
31919
+ return {
31920
+ type: "OWNERSHIP",
31921
+ maxSize: 5 * 1024 * 1024,
31922
+ maxSizeText: "5MB",
31923
+ allowedExtensions: ["pdf"],
31924
+ allowedMimeTypes: ["application/pdf"],
31925
+ allowedFormatsText: "PDF",
31926
+ accept: ".pdf, application/pdf",
31927
+ uiMessage: "Allowed format: PDF | Max file size: 5MB",
31928
+ formatErrorMessage: "Only PDF format (.pdf) is allowed for Ownership Documents",
31929
+ sizeErrorMessage: "Ownership Document size should not exceed 5MB"
31930
+ };
31931
+ }
31932
+ return {
31933
+ type: "ID_OR_OTHER",
31934
+ maxSize: 1024 * 1024,
31935
+ maxSizeText: "1MB",
31936
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
31937
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
31938
+ allowedFormatsText: "PDF, JPEG",
31939
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
31940
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
31941
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for this document",
31942
+ sizeErrorMessage: "File size should not exceed 1MB"
31943
+ };
31944
+ };
31568
31945
  const WSDocumentsEmployee = _ref => {
31569
- 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;
31570
31947
  let {
31571
31948
  t,
31572
31949
  config,
@@ -31586,6 +31963,7 @@ const WSDocumentsEmployee = _ref => {
31586
31963
  };
31587
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);
31588
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);
31589
31967
  const sessionDjb = (_Digit$SessionStorage = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.djbEmployee;
31590
31968
  const djbData = (formData === null || formData === void 0 ? void 0 : formData.djbEmployee) || sessionDjb || (formData === null || formData === void 0 ? void 0 : formData.additionalDetails);
31591
31969
  const isDjbEmployee = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
@@ -31612,7 +31990,8 @@ const WSDocumentsEmployee = _ref => {
31612
31990
  });
31613
31991
  const [enableSubmit, setEnableSubmit] = useState(true);
31614
31992
  const [error, setError] = useState(null);
31615
- 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));
31616
31995
  const wsDocsData = window.location.href.includes("modify") ? "ModifyConnectionDocuments" : window.location.href.includes("disconnection") ? "DisconnectionDocuments" : "NewWSDocuments";
31617
31996
  let action = "create";
31618
31997
  const {
@@ -31839,6 +32218,8 @@ const WSDocumentsEmployee = _ref => {
31839
32218
  isOtherDocument: isOther,
31840
32219
  isRwhMandatory: isRwhMandatory,
31841
32220
  hasRwhUploaded: hasRwhUploaded,
32221
+ isStpMandatory: isStpMandatory,
32222
+ hasStpUploaded: hasStpUploaded,
31842
32223
  isTenant: isTenant
31843
32224
  });
31844
32225
  }), isDjbEmployee && /*#__PURE__*/React.createElement(EmployeeIdDocumentUpload, {
@@ -31866,7 +32247,25 @@ const WSDocumentsEmployee = _ref => {
31866
32247
  color: "#d32f2f",
31867
32248
  fontWeight: "600"
31868
32249
  }
31869
- }, "\u26A0\uFE0F ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
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;
31870
32269
  const nocDownloadSection = isTenant ? /*#__PURE__*/React.createElement("div", {
31871
32270
  style: {
31872
32271
  marginBottom: "20px",
@@ -31900,24 +32299,6 @@ const WSDocumentsEmployee = _ref => {
31900
32299
  whiteSpace: "nowrap"
31901
32300
  }
31902
32301
  }, t("WS_DOWNLOAD_DOCUMENT"))) : null;
31903
- const uploadInfoBanner = /*#__PURE__*/React.createElement("div", {
31904
- style: {
31905
- display: "flex",
31906
- alignItems: "center",
31907
- gap: "10px",
31908
- marginBottom: "16px",
31909
- padding: "10px 14px",
31910
- backgroundColor: "#e8f4fd",
31911
- borderLeft: "4px solid #00497e",
31912
- borderRadius: "4px"
31913
- }
31914
- }, /*#__PURE__*/React.createElement("span", {
31915
- style: {
31916
- fontSize: "14px",
31917
- color: "#00497e",
31918
- fontWeight: "600"
31919
- }
31920
- }, "\u2139\uFE0F ", t("WS_DOCUMENT_UPLOAD_INSTRUCTION") || "Maximum upload size: 5MB per document. Supported formats: PDF, JPG, PNG."));
31921
32302
  if (userType === "citizen") {
31922
32303
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Timeline, {
31923
32304
  currentStep: 3
@@ -31927,19 +32308,23 @@ const WSDocumentsEmployee = _ref => {
31927
32308
  onSelect: goNext,
31928
32309
  onSkip: () => onSelect(),
31929
32310
  isDisabled: enableSubmit
31930
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32311
+ }, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
31931
32312
  label: error,
31932
32313
  onClose: () => setError(null),
31933
- error: true
32314
+ error: true,
32315
+ isDleteBtn: true,
32316
+ duration: 3000
31934
32317
  })));
31935
32318
  }
31936
32319
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31937
32320
  title: t("WS_DOCUMENTS"),
31938
32321
  defaultOpen: true
31939
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32322
+ }, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
31940
32323
  label: error,
31941
32324
  onClose: () => setError(null),
31942
- error: true
32325
+ error: true,
32326
+ isDleteBtn: true,
32327
+ duration: 3000
31943
32328
  }));
31944
32329
  };
31945
32330
  function EmployeeIdDocumentUpload(_ref2) {
@@ -31961,6 +32346,16 @@ function EmployeeIdDocumentUpload(_ref2) {
31961
32346
  const [uploadedFile, setUploadedFile] = useState(initialFileId || null);
31962
32347
  const [fileName, setFileName] = useState((existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileName) || "");
31963
32348
  const [errorUpload, setErrorUpload] = useState(null);
32349
+ const specs = {
32350
+ maxSize: 1024 * 1024,
32351
+ maxSizeText: "1MB",
32352
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
32353
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
32354
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
32355
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
32356
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for Employee ID Document",
32357
+ sizeErrorMessage: "Employee ID Document size should not exceed 1MB"
32358
+ };
31964
32359
  useEffect(() => {
31965
32360
  var _formData$djbEmployee7, _formData$djbEmployee8, _formData$djbEmployee9, _formData$djbEmployee0;
31966
32361
  const doc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
@@ -31977,60 +32372,64 @@ function EmployeeIdDocumentUpload(_ref2) {
31977
32372
  (function () {
31978
32373
  try {
31979
32374
  setErrorUpload(null);
31980
- const _temp3 = function () {
32375
+ return function () {
31981
32376
  if (file) {
31982
- const _temp2 = function () {
31983
- if (file.size > 5242880) {
31984
- setErrorUpload(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
31985
- setFile(null);
31986
- } else {
31987
- const _temp = _catch(function () {
31988
- setUploadedFile(null);
31989
- const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
31990
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
31991
- var _response$data, _response$data$files;
31992
- if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
31993
- var _response$data2, _response$data2$files;
31994
- const fileId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
31995
- const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
31996
- setUploadedFile(fileId);
31997
- setFileName(nameOfFile);
31998
- setDocuments(prevDocs => {
31999
- var _formData$djbEmployee10;
32000
- const filtered = (prevDocs || []).filter(d => {
32001
- var _d$documentType7;
32002
- return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$documentType7 = d.documentType) !== null && _d$documentType7 !== void 0 && _d$documentType7.includes("DJB_EMPLOYEE_ID"));
32003
- });
32004
- return [...filtered, {
32005
- documentType: "OWNER.DJB_EMPLOYEE_ID",
32006
- fileStoreId: fileId,
32007
- fileName: nameOfFile,
32008
- documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32009
- documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
32010
- i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32011
- status: "ACTIVE"
32012
- }];
32013
- });
32014
- if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
32015
- formSetValue("djbEmployee", {
32016
- ...formData.djbEmployee,
32017
- document: fileId
32018
- });
32019
- }
32020
- } else {
32021
- setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32022
- }
32377
+ const ext = (file.name || "").split(".").pop().toLowerCase();
32378
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32379
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
32380
+ if (!isExtAllowed && !isMimeAllowed) {
32381
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32382
+ setFile(null);
32383
+ return;
32384
+ }
32385
+ if (file.size > specs.maxSize) {
32386
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32387
+ setFile(null);
32388
+ return;
32389
+ }
32390
+ const _temp = _catch(function () {
32391
+ setUploadedFile(null);
32392
+ const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
32393
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
32394
+ var _response$data, _response$data$files;
32395
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
32396
+ var _response$data2, _response$data2$files;
32397
+ const fileId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
32398
+ const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
32399
+ setUploadedFile(fileId);
32400
+ setFileName(nameOfFile);
32401
+ setDocuments(prevDocs => {
32402
+ var _formData$djbEmployee10;
32403
+ const filtered = (prevDocs || []).filter(d => {
32404
+ var _d$documentType7;
32405
+ return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$documentType7 = d.documentType) !== null && _d$documentType7 !== void 0 && _d$documentType7.includes("DJB_EMPLOYEE_ID"));
32406
+ });
32407
+ return [...filtered, {
32408
+ documentType: "OWNER.DJB_EMPLOYEE_ID",
32409
+ fileStoreId: fileId,
32410
+ fileName: nameOfFile,
32411
+ documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32412
+ documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
32413
+ i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32414
+ status: "ACTIVE"
32415
+ }];
32023
32416
  });
32024
- }, function () {
32417
+ if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
32418
+ formSetValue("djbEmployee", {
32419
+ ...formData.djbEmployee,
32420
+ document: fileId
32421
+ });
32422
+ }
32423
+ } else {
32025
32424
  setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32026
- });
32027
- if (_temp && _temp.then) return _temp.then(function () {});
32028
- }
32029
- }();
32030
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
32425
+ }
32426
+ });
32427
+ }, function () {
32428
+ setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32429
+ });
32430
+ if (_temp && _temp.then) return _temp.then(function () {});
32031
32431
  }
32032
32432
  }();
32033
- return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
32034
32433
  } catch (e) {
32035
32434
  Promise.reject(e);
32036
32435
  }
@@ -32039,9 +32438,18 @@ function EmployeeIdDocumentUpload(_ref2) {
32039
32438
  function selectfile(e) {
32040
32439
  var _e$target, _e$target$files;
32041
32440
  const selected = e === null || e === void 0 ? void 0 : (_e$target = e.target) === null || _e$target === void 0 ? void 0 : (_e$target$files = _e$target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
32441
+ setErrorUpload(null);
32042
32442
  if (selected) {
32043
- if (selected.size > 5242880) {
32044
- setErrorUpload(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32443
+ const ext = (selected.name || "").split(".").pop().toLowerCase();
32444
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32445
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selected.type);
32446
+ if (!isExtAllowed && !isMimeAllowed) {
32447
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32448
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32449
+ return;
32450
+ }
32451
+ if (selected.size > specs.maxSize) {
32452
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32045
32453
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32046
32454
  return;
32047
32455
  }
@@ -32124,11 +32532,11 @@ function EmployeeIdDocumentUpload(_ref2) {
32124
32532
  }, "*"))), /*#__PURE__*/React.createElement("div", {
32125
32533
  style: {
32126
32534
  fontSize: "12px",
32127
- color: "#666",
32535
+ color: "#555",
32128
32536
  marginTop: "-2px",
32129
32537
  marginBottom: "4px"
32130
32538
  }
32131
- }, t("WS_DOCUMENT_MAX_SIZE_MESSAGE") || "Allowed formats: PDF, JPG, PNG | Max file size: 5MB"), /*#__PURE__*/React.createElement("div", {
32539
+ }, specs.uiMessage), /*#__PURE__*/React.createElement("div", {
32132
32540
  className: "field",
32133
32541
  style: {
32134
32542
  display: "flex",
@@ -32144,7 +32552,7 @@ function EmployeeIdDocumentUpload(_ref2) {
32144
32552
  id: "employee-doc-upload",
32145
32553
  extraStyleName: "propertyCreate",
32146
32554
  placeholder: t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"),
32147
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
32555
+ accept: specs.accept,
32148
32556
  onUpload: selectfile,
32149
32557
  onDelete: handleDelete,
32150
32558
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
@@ -32152,7 +32560,13 @@ function EmployeeIdDocumentUpload(_ref2) {
32152
32560
  uploadedFiles: uploadedFile && !file ? [[fileName || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"), {
32153
32561
  fileStoreId: uploadedFile
32154
32562
  }]] : undefined
32155
- }))), uploadedFile && /*#__PURE__*/React.createElement("div", {
32563
+ }))), errorUpload && /*#__PURE__*/React.createElement("div", {
32564
+ style: {
32565
+ fontSize: "12px",
32566
+ color: "#d32f2f",
32567
+ marginTop: "4px"
32568
+ }
32569
+ }, errorUpload), uploadedFile && /*#__PURE__*/React.createElement("div", {
32156
32570
  style: {
32157
32571
  display: "flex",
32158
32572
  alignItems: "center",
@@ -32190,7 +32604,7 @@ function EmployeeIdDocumentUpload(_ref2) {
32190
32604
  }, /*#__PURE__*/React.createElement(RemoveIcon, null)))));
32191
32605
  }
32192
32606
  function SelectDocument$2(_ref3) {
32193
- 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;
32194
32608
  let {
32195
32609
  t,
32196
32610
  document: doc,
@@ -32209,6 +32623,8 @@ function SelectDocument$2(_ref3) {
32209
32623
  isOtherDocument: isOther = false,
32210
32624
  isRwhMandatory = false,
32211
32625
  hasRwhUploaded = false,
32626
+ isStpMandatory = false,
32627
+ hasStpUploaded = false,
32212
32628
  isTenant: isTenantProp
32213
32629
  } = _ref3;
32214
32630
  const fileRef = useRef();
@@ -32222,11 +32638,13 @@ function SelectDocument$2(_ref3) {
32222
32638
  return item === null || item === void 0 ? void 0 : (_item$documentType2 = item.documentType) === null || _item$documentType2 === void 0 ? void 0 : _item$documentType2.includes(doc === null || doc === void 0 ? void 0 : doc.code);
32223
32639
  })[0];
32224
32640
  const isApplicantPhoto = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO";
32641
+ const specs = getDocUploadSpecs(doc, isApplicantPhoto);
32642
+ const [fileError, setFileError] = useState(null);
32225
32643
  const isIdentityProof = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.IDENTITYPROOF" || (doc === null || doc === void 0 ? void 0 : (_doc$code4 = doc.code) === null || _doc$code4 === void 0 ? void 0 : _doc$code4.includes("IDENTITYPROOF")) || (doc === null || doc === void 0 ? void 0 : (_doc$code5 = doc.code) === null || _doc$code5 === void 0 ? void 0 : _doc$code5.includes("IDENTITY"));
32226
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"));
32227
32645
  const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
32228
32646
  const [selectedDocument, setSelectedDocument] = useState(() => {
32229
- var _filteredDocument$doc, _doc$dropdownData3, _doc$dropdownData4;
32647
+ var _filteredDocument$doc, _doc$dropdownData4, _doc$dropdownData5;
32230
32648
  if (filteredDocument && doc !== null && doc !== void 0 && doc.dropdownData) {
32231
32649
  var _doc$dropdownData;
32232
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);
@@ -32237,12 +32655,20 @@ function SelectDocument$2(_ref3) {
32237
32655
  }
32238
32656
  if (isOther && isRwhMandatory && !hasRwhUploaded && doc !== null && doc !== void 0 && doc.dropdownData) {
32239
32657
  var _doc$dropdownData2, _rwhMatch$code;
32240
- 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));
32241
32659
  if (rwhMatch) return {
32242
32660
  ...rwhMatch,
32243
32661
  i18nKey: (_rwhMatch$code = rwhMatch.code) === null || _rwhMatch$code === void 0 ? void 0 : _rwhMatch$code.replaceAll(".", "_")
32244
32662
  };
32245
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
+ }
32246
32672
  if (isApplicantPhoto) {
32247
32673
  return filteredDocument ? {
32248
32674
  ...filteredDocument,
@@ -32258,10 +32684,14 @@ function SelectDocument$2(_ref3) {
32258
32684
  ...filteredDocument,
32259
32685
  code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
32260
32686
  i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : (_filteredDocument$doc = filteredDocument.documentType) === null || _filteredDocument$doc === void 0 ? void 0 : _filteredDocument$doc.replaceAll(".", "_")
32261
- } : 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;
32262
32688
  });
32263
32689
  const [file, setFile] = useState(null);
32264
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
+ });
32265
32695
  const [documentUid, setDocumentUid] = useState(() => {
32266
32696
  if (isOther) return "";
32267
32697
  const num = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || "";
@@ -32280,6 +32710,9 @@ function SelectDocument$2(_ref3) {
32280
32710
  const [docFileType, setDocFileType] = useState("");
32281
32711
  const [digiLockerUpload, setDigilockerUpload] = useState(false);
32282
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);
32283
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"))));
32284
32717
  const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
32285
32718
  const trimmed = (value || "").trim();
@@ -32313,6 +32746,14 @@ function SelectDocument$2(_ref3) {
32313
32746
  setDigilockerUpload(eligible);
32314
32747
  }, [selectedDocument]);
32315
32748
  const handleCapture = capturedFile => {
32749
+ setFileError(null);
32750
+ if (capturedFile.size > specs.maxSize) {
32751
+ const msg = t("WS_PHOTO_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage;
32752
+ setError(msg);
32753
+ setFileError(msg);
32754
+ setShowCamera(false);
32755
+ return;
32756
+ }
32316
32757
  setFile(capturedFile);
32317
32758
  setIsCameraFile(true);
32318
32759
  setShowCamera(false);
@@ -32320,10 +32761,12 @@ function SelectDocument$2(_ref3) {
32320
32761
  const handleSelectDocument = value => setSelectedDocument(value);
32321
32762
  const removeUploadedDocument = fileStoreId => {
32322
32763
  setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
32764
+ setFileError(null);
32323
32765
  if (fileStoreId === uploadedFile) {
32324
32766
  setUploadedFile(null);
32325
32767
  setFile(null);
32326
32768
  setDocumentUid("");
32769
+ setValidityDate("");
32327
32770
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32328
32771
  setSelectedDocument({});
32329
32772
  }
@@ -32334,9 +32777,9 @@ function SelectDocument$2(_ref3) {
32334
32777
  fileStoreId = uploadedFile;
32335
32778
  }
32336
32779
  try {
32337
- const _temp5 = function () {
32780
+ const _temp3 = function () {
32338
32781
  if (fileStoreId) {
32339
- const _temp4 = _catch(function () {
32782
+ const _temp2 = _catch(function () {
32340
32783
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
32341
32784
  if (res !== null && res !== void 0 && res.data) {
32342
32785
  var _res$headers, _res$headers2;
@@ -32355,21 +32798,21 @@ function SelectDocument$2(_ref3) {
32355
32798
  }, function (err) {
32356
32799
  console.error("Failed to fetch file URL via FileFetchbyid", err);
32357
32800
  });
32358
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
32801
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
32359
32802
  }
32360
32803
  }();
32361
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
32804
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
32362
32805
  } catch (e) {
32363
32806
  return Promise.reject(e);
32364
32807
  }
32365
32808
  };
32366
32809
  useEffect(() => {
32367
32810
  if (filteredDocument) {
32368
- var _filteredDocument$doc2, _doc$dropdownData6, _doc$dropdownData7;
32811
+ var _filteredDocument$doc2, _doc$dropdownData7, _doc$dropdownData8;
32369
32812
  let match = null;
32370
32813
  if (doc !== null && doc !== void 0 && doc.dropdownData) {
32371
- var _doc$dropdownData5;
32372
- 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);
32373
32816
  }
32374
32817
  setSelectedDocument(match ? {
32375
32818
  ...filteredDocument,
@@ -32382,15 +32825,28 @@ function SelectDocument$2(_ref3) {
32382
32825
  ...doc,
32383
32826
  code: (doc === null || doc === void 0 ? void 0 : doc.code) || "OWNER.APPLICANTPHOTO",
32384
32827
  i18nKey: "OWNER_APPLICANTPHOTO"
32385
- } : 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);
32386
32829
  }
32387
32830
  }, []);
32388
32831
  function selectfile(e, newFile) {
32389
32832
  var _e$target2, _e$target2$files;
32390
32833
  const selectedFile = newFile || (e === null || e === void 0 ? void 0 : (_e$target2 = e.target) === null || _e$target2 === void 0 ? void 0 : (_e$target2$files = _e$target2.files) === null || _e$target2$files === void 0 ? void 0 : _e$target2$files[0]);
32834
+ setFileError(null);
32391
32835
  if (selectedFile) {
32392
- if (selectedFile.size > 5242880) {
32393
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32836
+ const ext = (selectedFile.name || "").split(".").pop().toLowerCase();
32837
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32838
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selectedFile.type);
32839
+ if (!isExtAllowed && !isMimeAllowed) {
32840
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
32841
+ setError(msg);
32842
+ setFileError(msg);
32843
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32844
+ return;
32845
+ }
32846
+ if (selectedFile.size > specs.maxSize) {
32847
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
32848
+ setError(msg);
32849
+ setFileError(msg);
32394
32850
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32395
32851
  return;
32396
32852
  }
@@ -32407,7 +32863,7 @@ function SelectDocument$2(_ref3) {
32407
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;
32408
32864
  return String(code).toUpperCase() === "TENANT";
32409
32865
  };
32410
- 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);
32411
32867
  if (isOther) {
32412
32868
  if (isTenant) {
32413
32869
  var _dropDownData;
@@ -32431,7 +32887,7 @@ function SelectDocument$2(_ref3) {
32431
32887
  const name = d.name || "";
32432
32888
  return !(code.includes("NOC_FROM_OWNER") || code === "NOC from Owner" || name.includes("NOC from Owner"));
32433
32889
  });
32434
- if (dropDownData && !dropDownData.some(d => isRwhDocType(d))) {
32890
+ if (dropDownData && !dropDownData.some(d => isRwhDocType$1(d))) {
32435
32891
  dropDownData = [...dropDownData, {
32436
32892
  code: "OWNER.OTHERDOCUMENTS.RAINWATER_HARVESTING",
32437
32893
  i18nKey: "OWNER_OTHERDOCUMENTS_RAINWATER_HARVESTING",
@@ -32464,9 +32920,9 @@ function SelectDocument$2(_ref3) {
32464
32920
  setFile(null);
32465
32921
  } else if (isRwhMandatory && !hasRwhUploaded) {
32466
32922
  var _dropDownData4;
32467
- 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);
32468
32924
  if (!isCurrentRwh && ((_dropDownData4 = dropDownData) === null || _dropDownData4 === void 0 ? void 0 : _dropDownData4.length) > 0) {
32469
- const rwhMatch = dropDownData.find(d => isRwhDocType(d));
32925
+ const rwhMatch = dropDownData.find(d => isRwhDocType$1(d));
32470
32926
  if (rwhMatch && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code))) {
32471
32927
  var _rwhMatch$code2;
32472
32928
  setSelectedDocument({
@@ -32475,10 +32931,23 @@ function SelectDocument$2(_ref3) {
32475
32931
  });
32476
32932
  }
32477
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
+ }
32478
32947
  }
32479
32948
  }
32480
32949
  }
32481
- }, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, dropDownData]);
32950
+ }, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, isStpMandatory, hasStpUploaded, dropDownData]);
32482
32951
  const [isHidden, setHidden] = useState(false);
32483
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);
32484
32953
  const addError = () => {
@@ -32536,10 +33005,20 @@ function SelectDocument$2(_ref3) {
32536
33005
  documentName: (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "",
32537
33006
  documentUid: documentUid,
32538
33007
  documentNumber: documentUid,
33008
+ validityDate: validityDate || undefined,
33009
+ validityUpTo: validityDate || undefined,
33010
+ date: validityDate || undefined,
32539
33011
  remarks: isOtherDocumentsRemark ? documentUid : undefined,
32540
- additionalDetails: isOtherDocumentsRemark ? {
32541
- remark: documentUid
32542
- } : undefined,
33012
+ additionalDetails: {
33013
+ ...(isOtherDocumentsRemark ? {
33014
+ remark: documentUid
33015
+ } : {}),
33016
+ ...(validityDate ? {
33017
+ validityDate,
33018
+ validityUpTo: validityDate,
33019
+ date: validityDate
33020
+ } : {})
33021
+ },
32543
33022
  i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
32544
33023
  id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
32545
33024
  status: "ACTIVE",
@@ -32550,8 +33029,11 @@ function SelectDocument$2(_ref3) {
32550
33029
  });
32551
33030
  }
32552
33031
  const isRwhRequired = isOther && isRwhMandatory;
32553
- const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType(selectedDocument);
33032
+ const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType$1(selectedDocument);
32554
33033
  const rwhMissing = isRwhRequired && !isRwhSatisfied;
33034
+ const isStpRequired = isOther && isStpMandatory;
33035
+ const isStpSatisfied = hasStpUploaded || uploadedFile && isStpDocType$1(selectedDocument);
33036
+ const stpMissing = isStpRequired && !isStpSatisfied;
32555
33037
  const hasOtherUploaded = isOther && (documents === null || documents === void 0 ? void 0 : documents.some(item => {
32556
33038
  var _item$documentType4;
32557
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);
@@ -32560,8 +33042,9 @@ function SelectDocument$2(_ref3) {
32560
33042
  const isDocNumberMissing = isDocNumberMandatory && (!documentUid || !documentUid.trim());
32561
33043
  const isDocMissing = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code));
32562
33044
  const isPartiallyFilled = isApplicantPhoto ? false : isDocNumberMandatory ? !uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) || isDocNumberMissing : !isCompletelyEmpty && !(uploadedFile && selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code);
32563
- 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;
32564
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;
32565
33048
  if (!isHidden) {
32566
33049
  if (err) {
32567
33050
  addError();
@@ -32571,72 +33054,80 @@ function SelectDocument$2(_ref3) {
32571
33054
  addError();
32572
33055
  } else if (rwhMissing) {
32573
33056
  addError();
33057
+ } else if (stpMissing) {
33058
+ addError();
33059
+ } else if (validityMissing) {
33060
+ addError();
32574
33061
  } else {
32575
33062
  removeError();
32576
33063
  }
32577
33064
  } else if (isHidden) {
32578
33065
  removeError();
32579
33066
  }
32580
- }, [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]);
32581
33068
  useEffect(() => {
32582
33069
  (function () {
32583
33070
  try {
32584
33071
  setError(null);
32585
- const _temp0 = function () {
33072
+ return function () {
32586
33073
  if (file) {
33074
+ setFileError(null);
32587
33075
  const isDuplicateDocument = isOther && documents.some(item => (item === null || item === void 0 ? void 0 : item.documentType) === (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
32588
- const _temp9 = function () {
32589
- if (isDuplicateDocument) {
32590
- const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
32591
- const translatedDocumentName = t(documentNameKey);
32592
- const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
32593
- setError(`Document "${documentName}" has already been uploaded.`);
32594
- setFile(null);
32595
- } else {
32596
- const _temp8 = function () {
32597
- if (file.size > 5242880) {
32598
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32599
- setFile(null);
33076
+ if (isDuplicateDocument) {
33077
+ const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
33078
+ const translatedDocumentName = t(documentNameKey);
33079
+ const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
33080
+ const msg = `Document "${documentName}" has already been uploaded.`;
33081
+ setError(msg);
33082
+ setFileError(msg);
33083
+ setFile(null);
33084
+ return;
33085
+ }
33086
+ const ext = (file.name || "").split(".").pop().toLowerCase();
33087
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
33088
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
33089
+ if (!isExtAllowed && !isMimeAllowed) {
33090
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
33091
+ setError(msg);
33092
+ setFileError(msg);
33093
+ setFile(null);
33094
+ return;
33095
+ }
33096
+ if (file.size > specs.maxSize) {
33097
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
33098
+ setError(msg);
33099
+ setFileError(msg);
33100
+ setFile(null);
33101
+ return;
33102
+ }
33103
+ const _temp4 = _finallyRethrows(function () {
33104
+ return _catch(function () {
33105
+ setUploadedFile(null);
33106
+ setIsUploading(true);
33107
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
33108
+ var _response$data4, _response$data4$files;
33109
+ if ((response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : _response$data4$files.length) > 0) {
33110
+ var _response$data5, _response$data5$files;
33111
+ setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data5 = response.data) === null || _response$data5 === void 0 ? void 0 : (_response$data5$files = _response$data5.files[0]) === null || _response$data5$files === void 0 ? void 0 : _response$data5$files.fileStoreId);
32600
33112
  } else {
32601
- const _temp7 = function () {
32602
- if ((doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" && !file.type.match(/image\/(jpeg|png)/i) && !file.name.match(/\.(jpg|jpeg|png)$/i)) {
32603
- setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
32604
- setFile(null);
32605
- } else {
32606
- const _temp6 = _finallyRethrows(function () {
32607
- return _catch(function () {
32608
- setUploadedFile(null);
32609
- setIsUploading(true);
32610
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
32611
- var _response$data4, _response$data4$files;
32612
- if ((response === null || response === void 0 ? void 0 : (_response$data4 = response.data) === null || _response$data4 === void 0 ? void 0 : (_response$data4$files = _response$data4.files) === null || _response$data4$files === void 0 ? void 0 : _response$data4$files.length) > 0) {
32613
- var _response$data5, _response$data5$files;
32614
- setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data5 = response.data) === null || _response$data5 === void 0 ? void 0 : (_response$data5$files = _response$data5.files[0]) === null || _response$data5$files === void 0 ? void 0 : _response$data5$files.fileStoreId);
32615
- } else {
32616
- setError(t("CS_FILE_UPLOAD_ERROR"));
32617
- }
32618
- });
32619
- }, function () {
32620
- setError(t("CS_FILE_UPLOAD_ERROR"));
32621
- });
32622
- }, function (_wasThrown, _result2) {
32623
- setIsUploading(false);
32624
- if (_wasThrown) throw _result2;
32625
- return _result2;
32626
- });
32627
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
32628
- }
32629
- }();
32630
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
33113
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
33114
+ setError(msg);
33115
+ setFileError(msg);
32631
33116
  }
32632
- }();
32633
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
32634
- }
32635
- }();
32636
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
33117
+ });
33118
+ }, function () {
33119
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
33120
+ setError(msg);
33121
+ setFileError(msg);
33122
+ });
33123
+ }, function (_wasThrown, _result3) {
33124
+ setIsUploading(false);
33125
+ if (_wasThrown) throw _result3;
33126
+ return _result3;
33127
+ });
33128
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
32637
33129
  }
32638
33130
  }();
32639
- return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
32640
33131
  } catch (e) {
32641
33132
  Promise.reject(e);
32642
33133
  }
@@ -32664,15 +33155,21 @@ function SelectDocument$2(_ref3) {
32664
33155
  style: {
32665
33156
  margin: 0
32666
33157
  }
32667
- }, 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", {
32668
33159
  className: "check-page-link-button"
32669
- }, "*")), " ", !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", {
32670
33167
  style: {
32671
33168
  fontSize: "12px",
32672
33169
  color: "#d32f2f",
32673
33170
  marginTop: "-4px"
32674
33171
  }
32675
- }, "* ", 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, {
32676
33173
  id: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
32677
33174
  key: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
32678
33175
  className: "form-field",
@@ -32688,7 +33185,36 @@ function SelectDocument$2(_ref3) {
32688
33185
  optionKey: "i18nKey",
32689
33186
  t: t,
32690
33187
  placeholder: t("PT_MUTATION_SELECT_DOC_LABEL")
32691
- })) : 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", {
32692
33218
  style: {
32693
33219
  display: "flex",
32694
33220
  flexDirection: "column",
@@ -32793,11 +33319,11 @@ function SelectDocument$2(_ref3) {
32793
33319
  }, "*"))), /*#__PURE__*/React.createElement("div", {
32794
33320
  style: {
32795
33321
  fontSize: "12px",
32796
- color: "#666",
33322
+ color: "#555",
32797
33323
  marginTop: "-2px",
32798
33324
  marginBottom: "4px"
32799
33325
  }
32800
- }, (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? t("WS_PHOTO_MAX_SIZE_MESSAGE") || "Allowed formats: JPG, PNG | Max file size: 5MB" : t("WS_DOCUMENT_MAX_SIZE_MESSAGE") || "Allowed formats: PDF, JPG, PNG | Max file size: 5MB"), /*#__PURE__*/React.createElement("div", {
33326
+ }, specs.uiMessage), /*#__PURE__*/React.createElement("div", {
32801
33327
  className: "field",
32802
33328
  style: {
32803
33329
  display: "flex",
@@ -32814,9 +33340,11 @@ function SelectDocument$2(_ref3) {
32814
33340
  onDelete: () => {
32815
33341
  setUploadedFile(null);
32816
33342
  setFile(null);
33343
+ setFileError(null);
32817
33344
  setIsCameraFile(false);
32818
33345
  setIsDocumentUidLocked(false);
32819
33346
  setDocumentUid("");
33347
+ setValidityDate("");
32820
33348
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32821
33349
  setSelectedDocument({});
32822
33350
  }
@@ -32828,11 +33356,19 @@ function SelectDocument$2(_ref3) {
32828
33356
  },
32829
33357
  buttonType: "button",
32830
33358
  error: effectiveRequired && !uploadedFile,
32831
- accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
33359
+ accept: specs.accept,
33360
+ maxSize: specs.maxSize,
33361
+ maxSizeText: specs.maxSizeText,
33362
+ allowedExtensions: specs.allowedExtensions,
33363
+ allowedTypes: specs.allowedMimeTypes,
33364
+ allowedFormatsText: specs.allowedFormatsText,
33365
+ sizeErrorMessage: specs.sizeErrorMessage,
33366
+ formatErrorMessage: specs.formatErrorMessage,
32832
33367
  uploadedFiles: uploadedFile && !file ? [[(filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || (file === null || file === void 0 ? void 0 : file.name) || t(documentDisplayName || "CS_COMMON_DOCUMENT"), {
32833
33368
  fileStoreId: uploadedFile
32834
33369
  }]] : undefined,
32835
33370
  removeTargetedFile: () => {
33371
+ setFileError(null);
32836
33372
  if (isOther && uploadedFile) {
32837
33373
  removeUploadedDocument(uploadedFile);
32838
33374
  } else {
@@ -32841,6 +33377,7 @@ function SelectDocument$2(_ref3) {
32841
33377
  setIsCameraFile(false);
32842
33378
  setIsDocumentUidLocked(false);
32843
33379
  setDocumentUid("");
33380
+ setValidityDate("");
32844
33381
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32845
33382
  setSelectedDocument({});
32846
33383
  }
@@ -32856,9 +33393,11 @@ function SelectDocument$2(_ref3) {
32856
33393
  onDelete: () => {
32857
33394
  setUploadedFile(null);
32858
33395
  setFile(null);
33396
+ setFileError(null);
32859
33397
  setIsCameraFile(false);
32860
33398
  setIsDocumentUidLocked(false);
32861
33399
  setDocumentUid("");
33400
+ setValidityDate("");
32862
33401
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32863
33402
  setSelectedDocument({});
32864
33403
  }
@@ -32870,11 +33409,12 @@ function SelectDocument$2(_ref3) {
32870
33409
  },
32871
33410
  buttonType: "button",
32872
33411
  error: effectiveRequired && !uploadedFile,
32873
- accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
33412
+ accept: specs.accept,
32874
33413
  uploadedFiles: uploadedFile && !file ? [[(filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName) || (file === null || file === void 0 ? void 0 : file.name) || t(documentDisplayName || "CS_COMMON_DOCUMENT"), {
32875
33414
  fileStoreId: uploadedFile
32876
33415
  }]] : undefined,
32877
33416
  removeTargetedFile: () => {
33417
+ setFileError(null);
32878
33418
  if (isOther && uploadedFile) {
32879
33419
  removeUploadedDocument(uploadedFile);
32880
33420
  } else {
@@ -32883,6 +33423,7 @@ function SelectDocument$2(_ref3) {
32883
33423
  setIsCameraFile(false);
32884
33424
  setIsDocumentUidLocked(false);
32885
33425
  setDocumentUid("");
33426
+ setValidityDate("");
32886
33427
  if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
32887
33428
  setSelectedDocument({});
32888
33429
  }
@@ -32903,11 +33444,17 @@ function SelectDocument$2(_ref3) {
32903
33444
  setError(docNumberError);
32904
33445
  return;
32905
33446
  }
33447
+ if (showValidityDate && (isRwhMandatory || isStpMandatory) && !validityDate) {
33448
+ setError(t("WS_PLEASE_SELECT_VALIDITY_DATE") || "Please select validity up to date.");
33449
+ return;
33450
+ }
32906
33451
  pendingId.current = Date.now();
32907
33452
  setUploadedFile(null);
32908
33453
  setFile(null);
33454
+ setFileError(null);
32909
33455
  setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
32910
33456
  setDocumentUid("");
33457
+ setValidityDate("");
32911
33458
  setDocNumberError(null);
32912
33459
  setIsDocumentUidLocked(false);
32913
33460
  },
@@ -32921,10 +33468,17 @@ function SelectDocument$2(_ref3) {
32921
33468
  fontWeight: "bold",
32922
33469
  marginTop: "2px"
32923
33470
  }
32924
- }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), (isOther ? otherUploadedDocuments : uploadedFile ? [{
33471
+ }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), fileError && /*#__PURE__*/React.createElement("div", {
33472
+ style: {
33473
+ fontSize: "12px",
33474
+ color: "#d32f2f",
33475
+ marginTop: "4px"
33476
+ }
33477
+ }, fileError), (isOther ? otherUploadedDocuments : uploadedFile ? [{
32925
33478
  fileStoreId: uploadedFile,
32926
33479
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
32927
- documentNumber: documentUid
33480
+ documentNumber: documentUid,
33481
+ validityDate: validityDate
32928
33482
  }] : []).map((uploadedDocument, index) => /*#__PURE__*/React.createElement("div", {
32929
33483
  key: uploadedDocument.fileStoreId || index,
32930
33484
  style: {
@@ -32938,7 +33492,12 @@ function SelectDocument$2(_ref3) {
32938
33492
  style: {
32939
33493
  fontWeight: "bold"
32940
33494
  }
32941
- }, 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", {
32942
33501
  type: "button",
32943
33502
  onClick: () => viewDocument(uploadedDocument.fileStoreId),
32944
33503
  title: t("WS_VIEW_DOCUMENT") || "View Document",
@@ -33088,7 +33647,7 @@ const CameraCaptureModal = _ref4 => {
33088
33647
  useEffect(() => {
33089
33648
  const startCamera = function () {
33090
33649
  try {
33091
- const _temp1 = _catch(function () {
33650
+ const _temp5 = _catch(function () {
33092
33651
  return Promise.resolve(navigator.mediaDevices.getUserMedia({
33093
33652
  video: true
33094
33653
  })).then(function (mediaStream) {
@@ -33101,7 +33660,7 @@ const CameraCaptureModal = _ref4 => {
33101
33660
  setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
33102
33661
  console.error("Error accessing camera: ", err);
33103
33662
  });
33104
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
33663
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
33105
33664
  } catch (e) {
33106
33665
  return Promise.reject(e);
33107
33666
  }
@@ -33126,7 +33685,7 @@ const CameraCaptureModal = _ref4 => {
33126
33685
  type: "image/jpeg"
33127
33686
  });
33128
33687
  onCapture(file);
33129
- }, "image/jpeg");
33688
+ }, "image/jpeg", 0.7);
33130
33689
  }
33131
33690
  };
33132
33691
  return /*#__PURE__*/React.createElement("div", {
@@ -38855,6 +39414,17 @@ const WSDeclaration = _ref => {
38855
39414
  const initialFileName = (formData === null || formData === void 0 ? void 0 : (_formData$declaration1 = formData.declarationData) === null || _formData$declaration1 === void 0 ? void 0 : _formData$declaration1.signatureFileName) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration10 = formData.declaration) === null || _formData$declaration10 === void 0 ? void 0 : _formData$declaration10.signatureFileName) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration11 = formData.declarationData) === null || _formData$declaration11 === void 0 ? void 0 : (_formData$declaration12 = _formData$declaration11.signatureFile) === null || _formData$declaration12 === void 0 ? void 0 : _formData$declaration12.fileName) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration13 = formData.declaration) === null || _formData$declaration13 === void 0 ? void 0 : (_formData$declaration14 = _formData$declaration13.signatureFile) === null || _formData$declaration14 === void 0 ? void 0 : _formData$declaration14.fileName) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration15 = formData.declarationData) === null || _formData$declaration15 === void 0 ? void 0 : (_formData$declaration16 = _formData$declaration15.signatureFile) === null || _formData$declaration16 === void 0 ? void 0 : _formData$declaration16.name) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration17 = formData.declaration) === null || _formData$declaration17 === void 0 ? void 0 : (_formData$declaration18 = _formData$declaration17.signatureFile) === null || _formData$declaration18 === void 0 ? void 0 : _formData$declaration18.name) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.signatureFileName) || (initialFsId ? "signature.png" : "");
38856
39415
  const [signatureFileStoreId, setSignatureFileStoreId] = useState(initialFsId);
38857
39416
  const [localFile, setLocalFile] = useState(null);
39417
+ const [signError, setSignError] = useState(null);
39418
+ const signSpecs = {
39419
+ maxSize: 50 * 1024,
39420
+ maxSizeText: "50KB",
39421
+ allowedExtensions: ["jpg", "jpeg"],
39422
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
39423
+ accept: "image/jpeg, .jpg, .jpeg",
39424
+ uiMessage: "Allowed format: JPEG | Max file size: 50KB",
39425
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Signature",
39426
+ sizeErrorMessage: "Signature size should not exceed 50KB"
39427
+ };
38858
39428
  const [signatureFile, setSignatureFile] = useState((formData === null || formData === void 0 ? void 0 : (_formData$declaration19 = formData.declarationData) === null || _formData$declaration19 === void 0 ? void 0 : _formData$declaration19.signatureFile) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration20 = formData.declaration) === null || _formData$declaration20 === void 0 ? void 0 : _formData$declaration20.signatureFile) || (initialFsId ? {
38859
39429
  fileStoreId: initialFsId,
38860
39430
  fileName: initialFileName
@@ -38936,49 +39506,61 @@ const WSDeclaration = _ref => {
38936
39506
  const onUploadSignature = function (e) {
38937
39507
  try {
38938
39508
  var _e$target$files;
39509
+ setSignError(null);
38939
39510
  const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
38940
- const _temp3 = function () {
39511
+ return Promise.resolve(function () {
38941
39512
  if (file) {
38942
- const _temp2 = function () {
38943
- if (file.size >= 5242880) {} else {
38944
- setLocalFile(file);
38945
- const _temp = _catch(function () {
38946
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
38947
- var _response$data, _response$data$files;
38948
- if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
38949
- var _response$data2, _response$data2$files;
38950
- const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
38951
- const sigObj = {
38952
- fileStoreId: fsId,
38953
- fileName: file.name
38954
- };
38955
- setSignatureFileStoreId(fsId);
38956
- setSignatureFile(sigObj);
38957
- setValue("signatureFileStoreId", fsId, {
38958
- shouldDirty: true,
38959
- shouldValidate: true
38960
- });
38961
- setValue("signatureFile", sigObj, {
38962
- shouldDirty: true,
38963
- shouldValidate: true
38964
- });
38965
- setValue("signatureFileName", file.name, {
38966
- shouldDirty: true,
38967
- shouldValidate: true
38968
- });
38969
- }
39513
+ const ext = (file.name || "").split(".").pop().toLowerCase();
39514
+ const isExtAllowed = signSpecs.allowedExtensions.includes(ext);
39515
+ const isMimeAllowed = signSpecs.allowedMimeTypes.includes(file.type);
39516
+ if (!isExtAllowed && !isMimeAllowed) {
39517
+ setSignError(t("WS_SIGNATURE_ONLY_JPEG") || signSpecs.formatErrorMessage);
39518
+ if (e.target) e.target.value = "";
39519
+ return;
39520
+ }
39521
+ if (file.size > signSpecs.maxSize) {
39522
+ setSignError(t("WS_SIGNATURE_MAX_SIZE_EXCEEDED") || signSpecs.sizeErrorMessage);
39523
+ if (e.target) e.target.value = "";
39524
+ return;
39525
+ }
39526
+ setLocalFile(file);
39527
+ const _temp = _catch(function () {
39528
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
39529
+ var _response$data, _response$data$files;
39530
+ if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
39531
+ var _response$data2, _response$data2$files;
39532
+ const fsId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId;
39533
+ const sigObj = {
39534
+ fileStoreId: fsId,
39535
+ fileName: file.name
39536
+ };
39537
+ setSignatureFileStoreId(fsId);
39538
+ setSignatureFile(sigObj);
39539
+ setValue("signatureFileStoreId", fsId, {
39540
+ shouldDirty: true,
39541
+ shouldValidate: true
38970
39542
  });
38971
- }, function (err) {
38972
- console.error("Signature upload failed", err);
39543
+ setValue("signatureFile", sigObj, {
39544
+ shouldDirty: true,
39545
+ shouldValidate: true
39546
+ });
39547
+ setValue("signatureFileName", file.name, {
39548
+ shouldDirty: true,
39549
+ shouldValidate: true
39550
+ });
39551
+ } else {
39552
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
38973
39553
  setLocalFile(null);
38974
- });
38975
- if (_temp && _temp.then) return _temp.then(function () {});
38976
- }
38977
- }();
38978
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
39554
+ }
39555
+ });
39556
+ }, function (err) {
39557
+ console.error("Signature upload failed", err);
39558
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
39559
+ setLocalFile(null);
39560
+ });
39561
+ if (_temp && _temp.then) return _temp.then(function () {});
38979
39562
  }
38980
- }();
38981
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39563
+ }());
38982
39564
  } catch (e) {
38983
39565
  return Promise.reject(e);
38984
39566
  }
@@ -38988,9 +39570,9 @@ const WSDeclaration = _ref => {
38988
39570
  const [docFileType, setDocFileType] = useState("");
38989
39571
  const viewDocument = function () {
38990
39572
  try {
38991
- const _temp5 = function () {
39573
+ const _temp3 = function () {
38992
39574
  if (signatureFileStoreId) {
38993
- const _temp4 = _catch(function () {
39575
+ const _temp2 = _catch(function () {
38994
39576
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId())).then(function (res) {
38995
39577
  if (res !== null && res !== void 0 && res.data) {
38996
39578
  const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
@@ -39010,10 +39592,10 @@ const WSDeclaration = _ref => {
39010
39592
  }, function (err) {
39011
39593
  console.error("Failed to fetch file URL via FileFetchbyid", err);
39012
39594
  });
39013
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
39595
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
39014
39596
  }
39015
39597
  }();
39016
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
39598
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39017
39599
  } catch (e) {
39018
39600
  return Promise.reject(e);
39019
39601
  }
@@ -39060,11 +39642,22 @@ const WSDeclaration = _ref => {
39060
39642
  })
39061
39643
  })), /*#__PURE__*/React.createElement("div", {
39062
39644
  className: "formcomposer-section-grid"
39063
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_UPLOAD_SIGNATURE_FILE"), " ", /*#__PURE__*/React.createElement("span", {
39645
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
39646
+ style: {
39647
+ margin: 0
39648
+ }
39649
+ }, t("WS_UPLOAD_SIGNATURE_FILE") || "Upload Signature", " ", /*#__PURE__*/React.createElement("span", {
39064
39650
  style: {
39065
39651
  color: "red"
39066
39652
  }
39067
39653
  }, "*")), /*#__PURE__*/React.createElement("div", {
39654
+ style: {
39655
+ fontSize: "12px",
39656
+ color: "#555",
39657
+ marginTop: "2px",
39658
+ marginBottom: "4px"
39659
+ }
39660
+ }, signSpecs.uiMessage)), /*#__PURE__*/React.createElement("div", {
39068
39661
  className: "field",
39069
39662
  style: {
39070
39663
  display: "flex",
@@ -39088,6 +39681,7 @@ const WSDeclaration = _ref => {
39088
39681
  setLocalFile(null);
39089
39682
  setSignatureFile(null);
39090
39683
  setSignatureFileStoreId(null);
39684
+ setSignError(null);
39091
39685
  setValue("signatureFile", null, {
39092
39686
  shouldDirty: true,
39093
39687
  shouldValidate: true
@@ -39107,14 +39701,15 @@ const WSDeclaration = _ref => {
39107
39701
  width: "100%"
39108
39702
  },
39109
39703
  buttonType: "button",
39110
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
39111
- uploadedFiles: signatureFileStoreId && !localFile ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.fileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.name) || "signature.png", {
39704
+ accept: signSpecs.accept,
39705
+ uploadedFiles: signatureFileStoreId && !localFile ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.fileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.name) || "signature.jpg", {
39112
39706
  fileStoreId: signatureFileStoreId
39113
39707
  }]] : undefined,
39114
39708
  removeTargetedFile: () => {
39115
39709
  setLocalFile(null);
39116
39710
  setSignatureFile(null);
39117
39711
  setSignatureFileStoreId(null);
39712
+ setSignError(null);
39118
39713
  setValue("signatureFile", null, {
39119
39714
  shouldDirty: true,
39120
39715
  shouldValidate: true
@@ -39133,7 +39728,13 @@ const WSDeclaration = _ref => {
39133
39728
  style: {
39134
39729
  cursor: "pointer"
39135
39730
  }
39136
- }, /*#__PURE__*/React.createElement(ViewsIcon, null))), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React.createElement(CardLabelError, {
39731
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null))), signError && /*#__PURE__*/React.createElement("div", {
39732
+ style: {
39733
+ fontSize: "12px",
39734
+ color: "#d32f2f",
39735
+ marginTop: "4px"
39736
+ }
39737
+ }, signError), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React.createElement(CardLabelError, {
39137
39738
  style: {
39138
39739
  color: "red",
39139
39740
  fontSize: "12px",
@@ -39682,7 +40283,7 @@ const WSDivyangjan = _ref => {
39682
40283
  };
39683
40284
 
39684
40285
  const WSRainWaterHarvesting = _ref => {
39685
- var _formData$rainWaterHa, _formData$rainWaterHa2, _formData$additionalD, _formData$additionalD2, _formData$config$key2;
40286
+ var _formData$additionalD, _formData$configKey2;
39686
40287
  let {
39687
40288
  config,
39688
40289
  onSelect,
@@ -39692,17 +40293,36 @@ const WSRainWaterHarvesting = _ref => {
39692
40293
  const {
39693
40294
  t
39694
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
+ };
39695
40314
  const {
39696
40315
  control,
39697
- watch
40316
+ watch,
40317
+ setValue
39698
40318
  } = useForm({
39699
40319
  defaultValues: {
39700
- 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()
39701
40321
  }
39702
40322
  });
39703
40323
  const formValue = watch();
39704
40324
  const onSelectRef = useRef(onSelect);
39705
- const goNext = () => onSelect(config.key, {
40325
+ const goNext = () => onSelect((config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting", {
39706
40326
  hasCertificate: !!formValue.hasCertificate,
39707
40327
  isRainwaterHarvesting: !!formValue.hasCertificate
39708
40328
  });
@@ -39710,33 +40330,193 @@ const WSRainWaterHarvesting = _ref => {
39710
40330
  useEffect(() => {
39711
40331
  onSelectRef.current = onSelect;
39712
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);
39713
40336
  useEffect(() => {
39714
- if (userType === "employee") {
39715
- var _formData$config$key;
39716
- 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;
39717
40348
  const newVal = !!formValue.hasCertificate;
39718
40349
  if (currentVal !== newVal) {
39719
- onSelectRef.current(config.key, {
40350
+ onSelectRef.current(configKey, {
39720
40351
  hasCertificate: newVal,
39721
40352
  isRainwaterHarvesting: newVal
39722
40353
  });
39723
40354
  }
39724
40355
  }
39725
- }, [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]);
39726
40357
  const content = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
39727
40358
  title: t("Rain Water Harvesting Certificate"),
39728
40359
  defaultOpen: true
39729
40360
  }, /*#__PURE__*/React.createElement("div", {
39730
40361
  className: "formcomposer-section-grid"
39731
- }, /*#__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", {
39732
40363
  className: "field"
39733
40364
  }, /*#__PURE__*/React.createElement(Controller, {
39734
40365
  control: control,
39735
40366
  name: "hasCertificate",
39736
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
39737
- label: t("Rain Water Harvesting Certificate"),
39738
- checked: !!props.value,
39739
- 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
39740
40520
  })
39741
40521
  })))));
39742
40522
  return userType === "citizen" ? /*#__PURE__*/React.createElement(FormStep, {
@@ -43859,22 +44639,26 @@ const useInboxTableConfig$1 = _ref => {
43859
44639
  Header: t("WS_MYCONNECTIONS_APPLICATION_NO"),
43860
44640
  disableSortBy: true,
43861
44641
  Cell: _ref3 => {
43862
- var _row$original2;
44642
+ var _row$original2, _row$original2$servic, _row$original3, _row$original4;
43863
44643
  let {
43864
44644
  row
43865
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}`;
43866
44650
  return /*#__PURE__*/React.createElement("div", {
43867
44651
  style: {
43868
44652
  display: "flex",
43869
44653
  flexDirection: "column"
43870
44654
  }
43871
44655
  }, /*#__PURE__*/React.createElement(Link, {
43872
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original["applicationNo"]}`
44656
+ to: linkUrl
43873
44657
  }, /*#__PURE__*/React.createElement("span", {
43874
44658
  className: "link"
43875
- }, 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`)));
43876
44660
  }
43877
- },, {
44661
+ }, {
43878
44662
  Header: t("CORE_COMMON_NAME"),
43879
44663
  disableSortBy: true,
43880
44664
  accessor: "owner"
@@ -43970,14 +44754,17 @@ const useInboxMobileCardsData$1 = _ref => {
43970
44754
  const GetCell = value => /*#__PURE__*/React.createElement("span", {
43971
44755
  className: "cell-text styled-cell"
43972
44756
  }, value);
43973
- 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}`;
43974
44761
  return /*#__PURE__*/React.createElement("div", {
43975
44762
  style: {
43976
44763
  display: "flex",
43977
44764
  flexDirection: "column"
43978
44765
  }
43979
44766
  }, /*#__PURE__*/React.createElement(Link, {
43980
- to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${value}`
44767
+ to: linkUrl
43981
44768
  }, /*#__PURE__*/React.createElement("span", {
43982
44769
  className: "link"
43983
44770
  }, value)), GetCell(t(`BILLAMENDMENT_${amendmentReason}_HEADING`)));
@@ -43995,7 +44782,7 @@ const useInboxMobileCardsData$1 = _ref => {
43995
44782
  } = _ref2;
43996
44783
  return {
43997
44784
  [t("WS_COMMON_TABLE_COL_SERVICE_LABEL")]: t(`ACTION_TEST_${service}`),
43998
- [t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason),
44785
+ [t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason, tenantId, service),
43999
44786
  [t("CORE_COMMON_NAME")]: owner,
44000
44787
  [t("WS_COMMON_TABLE_COL_ADDRESS")]: t(Digit.Utils.locale.getRevenueLocalityCode(address, tenantId)),
44001
44788
  [t("WS_COMMON_TABLE_COL_APPLICATION_STATUS")]: t(status),
@@ -44413,13 +45200,15 @@ const SearchBillAmendment = () => {
44413
45200
  Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
44414
45201
  accessor: "amendmentId",
44415
45202
  Cell: _ref => {
45203
+ var _row$original, _row$original$busines;
44416
45204
  let {
44417
45205
  row
44418
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";
44419
45208
  return /*#__PURE__*/React.createElement("span", {
44420
45209
  className: "link"
44421
45210
  }, /*#__PURE__*/React.createElement(Link, {
44422
- 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`
44423
45212
  }, row.original.amendmentId));
44424
45213
  }
44425
45214
  }, {
@@ -44450,13 +45239,15 @@ const SearchBillAmendment = () => {
44450
45239
  }, {
44451
45240
  Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
44452
45241
  Cell: _ref3 => {
45242
+ var _row$original2, _row$original2$busine;
44453
45243
  let {
44454
45244
  row
44455
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";
44456
45247
  return /*#__PURE__*/React.createElement("span", {
44457
45248
  className: "link"
44458
45249
  }, /*#__PURE__*/React.createElement(Link, {
44459
- 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`
44460
45251
  }, t("ES_COMMON_VIEW", "View")));
44461
45252
  }
44462
45253
  }], [t, tenantId]);
@@ -44700,12 +45491,25 @@ const newConfig = [{
44700
45491
  route: "rain-water-harvesting",
44701
45492
  component: "WSRainWaterHarvesting",
44702
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",
44703
45507
  nextStep: "document-details",
44704
45508
  WATER: "document-details",
44705
45509
  hideInEmployee: true,
44706
45510
  texts: {
44707
45511
  headerCaption: "WS_COMMON_CONNECTION_DETAIL",
44708
- header: "Rain Water Harvesting Certificate",
45512
+ header: "Sewer Treatment Plant (STP)",
44709
45513
  cardText: "",
44710
45514
  submitBarLabel: "CS_COMMON_NEXT"
44711
45515
  }
@@ -49574,7 +50378,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
49574
50378
  };
49575
50379
 
49576
50380
  const ConnectionDetails$5 = () => {
49577
- 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;
49578
50382
  const {
49579
50383
  t
49580
50384
  } = useTranslation();
@@ -49589,6 +50393,7 @@ const ConnectionDetails$5 = () => {
49589
50393
  } = useLocation();
49590
50394
  const [showModal, setshowModal] = useState(false);
49591
50395
  const [showActionToast, setshowActionToast] = useState(null);
50396
+ const [activeAmendment, setActiveAmendment] = useState(null);
49592
50397
  const mobileView = Digit.Utils.browser.isMobile();
49593
50398
  const getAddress = address => {
49594
50399
  var _address$locality, _address$locality2, _address$city;
@@ -49750,9 +50555,10 @@ const ConnectionDetails$5 = () => {
49750
50555
  downloadOptions.sort(function (a, b) {
49751
50556
  return a.order - b.order;
49752
50557
  });
49753
- 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";
49754
50560
  const fetchBillParams = {
49755
- consumerCode: (_state2 = state) === null || _state2 === void 0 ? void 0 : _state2.connectionNo
50561
+ consumerCode: (_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.connectionNo
49756
50562
  };
49757
50563
  const paymentDetails = Digit.Hooks.useFetchBillsForBuissnessService({
49758
50564
  businessService: isSW ? "SW" : "WS",
@@ -49828,11 +50634,45 @@ const ConnectionDetails$5 = () => {
49828
50634
  }
49829
50635
  }
49830
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]);
49831
50671
  const getBillAmendmentButton = function () {
49832
50672
  try {
49833
- var _state3, _state4;
50673
+ var _state7, _state8;
49834
50674
  let _exit = false;
49835
- function _temp4(_result) {
50675
+ function _temp5(_result) {
49836
50676
  if (_exit) return _result;
49837
50677
  history.push(`/digit-ui/citizen/ws/bill-amendment?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
49838
50678
  data: {
@@ -49841,32 +50681,26 @@ const ConnectionDetails$5 = () => {
49841
50681
  }
49842
50682
  }));
49843
50683
  }
49844
- const connNo = ((_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.connectionNo) || applicationNobyData;
49845
- 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";
49846
50686
  const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
49847
50687
  const businessService = finalServiceType === "WATER" ? "WS" : "SW";
49848
- const _temp3 = _catch(function () {
50688
+ const _temp4 = _catch(function () {
49849
50689
  return Promise.resolve(Digit.PaymentService.searchAmendment(finalTenantId, {
49850
50690
  consumerCode: connNo,
49851
50691
  businessService
49852
50692
  })).then(function (res) {
49853
- var _res$Amendments;
49854
- 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");
49855
50695
  if (inWorkflow) {
49856
- setshowActionToast({
49857
- key: "error",
49858
- label: "WORKFLOW_IN_PROGRESS"
49859
- });
49860
- setTimeout(() => {
49861
- closeBillToast();
49862
- }, 5000);
50696
+ history.push(`/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${inWorkflow.amendmentId}`);
49863
50697
  _exit = true;
49864
50698
  }
49865
50699
  });
49866
50700
  }, function (e) {
49867
50701
  console.error("Error searching amendment", e);
49868
50702
  });
49869
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3));
50703
+ return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
49870
50704
  } catch (e) {
49871
50705
  return Promise.reject(e);
49872
50706
  }
@@ -49904,8 +50738,7 @@ const ConnectionDetails$5 = () => {
49904
50738
  if (isLoading || isPTLoading) {
49905
50739
  return /*#__PURE__*/React.createElement(Loader, null);
49906
50740
  }
49907
- sessionStorage.setItem("ApplicationNoState", (_state5 = state) === null || _state5 === void 0 ? void 0 : _state5.applicationNo);
49908
- 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);
49909
50742
  return /*#__PURE__*/React.createElement(React.Fragment, null, checkifPrivacyenabled && /*#__PURE__*/React.createElement(WSInfoLabel, {
49910
50743
  t: t
49911
50744
  }), /*#__PURE__*/React.createElement("div", {
@@ -49926,21 +50759,64 @@ const ConnectionDetails$5 = () => {
49926
50759
  options: downloadOptions,
49927
50760
  downloadBtnClassName: "employee-download-btn-className",
49928
50761
  optionsClassName: "employee-options-btn-className"
49929
- }))), /*#__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, {
49930
50806
  className: "border-none",
49931
50807
  label: t("WS_MYCONNECTIONS_CONSUMER_NO"),
49932
- text: (_state7 = state) === null || _state7 === void 0 ? void 0 : _state7.connectionNo
50808
+ text: (_state0 = state) === null || _state0 === void 0 ? void 0 : _state0.connectionNo
49933
50809
  }), /*#__PURE__*/React.createElement(Row, {
49934
50810
  className: "border-none",
49935
50811
  label: t("WS_SERVICE_NAME_LABEL"),
49936
- 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}`),
49937
50813
  textStyle: {
49938
50814
  wordBreak: "break-word"
49939
50815
  }
49940
50816
  }), /*#__PURE__*/React.createElement(Row, {
49941
50817
  className: "border-none",
49942
50818
  label: t("WS_STATUS"),
49943
- 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",
49944
50820
  textStyle: {
49945
50821
  whiteSpace: "pre"
49946
50822
  }
@@ -49948,127 +50824,127 @@ const ConnectionDetails$5 = () => {
49948
50824
  styles: {
49949
50825
  fontSize: "28px"
49950
50826
  }
49951
- }, 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, {
49952
50828
  className: "border-none",
49953
50829
  label: t("WS_COMMON_TABLE_COL_CONNECTIONTYPE_LABEL"),
49954
- 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"),
49955
50831
  textStyle: {
49956
50832
  whiteSpace: "pre"
49957
50833
  }
49958
50834
  }), /*#__PURE__*/React.createElement(Row, {
49959
50835
  className: "border-none",
49960
50836
  label: t("WS_SERV_DETAIL_NO_OF_TAPS"),
49961
- text: (_state10 = state) === null || _state10 === void 0 ? void 0 : _state10.noOfTaps,
50837
+ text: (_state13 = state) === null || _state13 === void 0 ? void 0 : _state13.noOfTaps,
49962
50838
  textStyle: {
49963
50839
  whiteSpace: "pre"
49964
50840
  }
49965
50841
  }), /*#__PURE__*/React.createElement(Row, {
49966
50842
  className: "border-none",
49967
50843
  label: t("WS_PIPE_SIZE_IN_INCHES_LABEL"),
49968
- 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",
49969
50845
  textStyle: {
49970
50846
  whiteSpace: "pre"
49971
50847
  }
49972
- })), ((_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, {
49973
50849
  className: "border-none",
49974
50850
  label: t("WS_CONN_DETAIL_WATER_CLOSETS"),
49975
- text: (_state13 = state) === null || _state13 === void 0 ? void 0 : _state13.proposedWaterClosets,
50851
+ text: (_state16 = state) === null || _state16 === void 0 ? void 0 : _state16.proposedWaterClosets,
49976
50852
  textStyle: {
49977
50853
  whiteSpace: "pre"
49978
50854
  }
49979
50855
  }), /*#__PURE__*/React.createElement(Row, {
49980
50856
  className: "border-none",
49981
50857
  label: t("WS_SERV_DETAIL_NO_OF_TOILETS"),
49982
- 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"),
49983
50859
  textStyle: {
49984
50860
  whiteSpace: "pre"
49985
50861
  }
49986
50862
  }), /*#__PURE__*/React.createElement(Row, {
49987
50863
  className: "border-none",
49988
50864
  label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
49989
- 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"),
49990
50866
  textStyle: {
49991
50867
  whiteSpace: "pre"
49992
50868
  }
49993
- })), ((_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, {
49994
50870
  className: "border-none",
49995
50871
  label: t("WS_SERV_DETAIL_WATER_SOURCE"),
49996
- 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"),
49997
50873
  textStyle: {
49998
50874
  whiteSpace: "pre"
49999
50875
  }
50000
50876
  }), /*#__PURE__*/React.createElement(Row, {
50001
50877
  className: "border-none",
50002
50878
  label: t("WS_SERV_DETAIL_WATER_SUB_SOURCE"),
50003
- 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"),
50004
50880
  textStyle: {
50005
50881
  whiteSpace: "pre"
50006
50882
  }
50007
50883
  }), /*#__PURE__*/React.createElement(Row, {
50008
50884
  className: "border-none",
50009
50885
  label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
50010
- 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"),
50011
50887
  textStyle: {
50012
50888
  whiteSpace: "pre"
50013
50889
  }
50014
50890
  }), /*#__PURE__*/React.createElement(Row, {
50015
50891
  className: "border-none",
50016
50892
  label: t("WS_SERV_DETAIL_METER_ID"),
50017
- text: (_state22 = state) === null || _state22 === void 0 ? void 0 : _state22.meterId,
50893
+ text: (_state25 = state) === null || _state25 === void 0 ? void 0 : _state25.meterId,
50018
50894
  textStyle: {
50019
50895
  whiteSpace: "pre"
50020
50896
  }
50021
50897
  }), /*#__PURE__*/React.createElement(Row, {
50022
50898
  className: "border-none",
50023
50899
  label: t("WS_ADDN_DETAIL_METER_INSTALL_DATE"),
50024
- 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",
50025
50901
  textStyle: {
50026
50902
  whiteSpace: "pre"
50027
50903
  }
50028
50904
  }), /*#__PURE__*/React.createElement(Row, {
50029
50905
  className: "border-none",
50030
50906
  label: t("WS_ADDN_DETAILS_INITIAL_METER_READING"),
50031
- 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",
50032
50908
  textStyle: {
50033
50909
  whiteSpace: "pre"
50034
50910
  }
50035
- })), ((_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, {
50036
50912
  className: "border-none",
50037
50913
  label: t("WS_WATER_DEMAND_TYPE"),
50038
- 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",
50039
50915
  textStyle: {
50040
50916
  whiteSpace: "pre"
50041
50917
  }
50042
50918
  }), /*#__PURE__*/React.createElement(Row, {
50043
50919
  className: "border-none",
50044
50920
  label: t("WS_CATEGORY_TYPE"),
50045
- 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",
50046
50922
  textStyle: {
50047
50923
  whiteSpace: "pre"
50048
50924
  }
50049
50925
  }), /*#__PURE__*/React.createElement(Row, {
50050
50926
  className: "border-none",
50051
50927
  label: t("WS_ZRO_NAME"),
50052
- 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",
50053
50929
  textStyle: {
50054
50930
  whiteSpace: "pre"
50055
50931
  }
50056
50932
  }), /*#__PURE__*/React.createElement(Row, {
50057
50933
  className: "border-none",
50058
50934
  label: t("WS_CONNECTION_USAGE_TYPE"),
50059
- 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",
50060
50936
  textStyle: {
50061
50937
  whiteSpace: "pre"
50062
50938
  }
50063
50939
  }), /*#__PURE__*/React.createElement(Row, {
50064
50940
  className: "border-none",
50065
50941
  label: t("WS_TEMPORARY_CONNECTION"),
50066
- 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",
50067
50943
  textStyle: {
50068
50944
  whiteSpace: "pre"
50069
50945
  }
50070
- })), ((_state32 = state) === null || _state32 === void 0 ? void 0 : _state32.connectionType) === "Metered" && /*#__PURE__*/React.createElement(Link, {
50071
- 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}`
50072
50948
  }, /*#__PURE__*/React.createElement(LinkButton, {
50073
50949
  style: {
50074
50950
  textAlign: "left",
@@ -50083,7 +50959,7 @@ const ConnectionDetails$5 = () => {
50083
50959
  }, t("WS_COMMON_PROPERTY_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
50084
50960
  className: "border-none",
50085
50961
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
50086
- 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(","),
50087
50963
  textStyle: {
50088
50964
  whiteSpace: "pre"
50089
50965
  }
@@ -50118,32 +50994,32 @@ const ConnectionDetails$5 = () => {
50118
50994
  }), /*#__PURE__*/React.createElement(Row, {
50119
50995
  className: "border-none",
50120
50996
  label: t("WS_PROPERTY_TYPE"),
50121
- 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"
50122
50998
  }), /*#__PURE__*/React.createElement(Row, {
50123
50999
  className: "border-none",
50124
51000
  label: t("WS_PROPERTY_CATEGORY"),
50125
- 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"
50126
51002
  }), /*#__PURE__*/React.createElement(Row, {
50127
51003
  className: "border-none",
50128
51004
  label: t("WS_PLOT_AREA"),
50129
- 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"
50130
51006
  }), /*#__PURE__*/React.createElement(Row, {
50131
51007
  className: "border-none",
50132
51008
  label: t("WS_BUILT_UP_AREA"),
50133
- 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"
50134
51010
  }), /*#__PURE__*/React.createElement(Row, {
50135
51011
  className: "border-none",
50136
51012
  label: t("WS_NO_OF_FLOORS"),
50137
- text: ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : _state39$additionalDe.noOfFloors) || "NA"
50138
- }), 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, {
50139
51015
  className: "border-none",
50140
51016
  label: t("WS_NO_OF_DWELLING_UNITS"),
50141
- 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"
50142
51018
  }), /*#__PURE__*/React.createElement(Row, {
50143
51019
  className: "border-none",
50144
51020
  label: t("WS_LOCALITY"),
50145
- text: ((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$additionalDe = _state44.additionalDetails) === null || _state44$additionalDe === void 0 ? void 0 : _state44$additionalDe.locality) || "NA"
50146
- }), (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) => {
50147
51023
  var _q$answer, _q$answer2, _q$answer3;
50148
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}`;
50149
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;
@@ -50156,7 +51032,7 @@ const ConnectionDetails$5 = () => {
50156
51032
  text: `${t(checkForNA(aText))}`
50157
51033
  });
50158
51034
  }), /*#__PURE__*/React.createElement(Link, {
50159
- 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}`
50160
51036
  }, /*#__PURE__*/React.createElement(LinkButton, {
50161
51037
  style: {
50162
51038
  textAlign: "left",
@@ -50168,10 +51044,10 @@ const ConnectionDetails$5 = () => {
50168
51044
  styles: {
50169
51045
  fontSize: "28px"
50170
51046
  }
50171
- }, 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, {
50172
51048
  className: "border-none",
50173
51049
  label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
50174
- 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,
50175
51051
  textStyle: {
50176
51052
  whiteSpace: "pre"
50177
51053
  }
@@ -50290,15 +51166,15 @@ const ConnectionDetails$5 = () => {
50290
51166
  isArray: false
50291
51167
  }
50292
51168
  }
50293
- }))) : /*#__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) => {
50294
- 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;
50295
51171
  return /*#__PURE__*/React.createElement("div", {
50296
51172
  key: `doc-${index}`
50297
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, {
50298
- value: (_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.documents,
51174
+ value: (_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.documents,
50299
51175
  Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
50300
51176
  index: index
50301
- }), ((_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", {
50302
51178
  style: {
50303
51179
  color: "#cccccc",
50304
51180
  backgroundColor: "#cccccc",
@@ -50307,7 +51183,7 @@ const ConnectionDetails$5 = () => {
50307
51183
  marginBottom: "20px"
50308
51184
  }
50309
51185
  }) : null)));
50310
- })), ((_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", {
50311
51187
  style: {
50312
51188
  display: "flex",
50313
51189
  justifyContent: "flex-end",
@@ -50344,8 +51220,8 @@ const ConnectionDetails$5 = () => {
50344
51220
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
50345
51221
  hideSubmit: true,
50346
51222
  actionSingleSubmit: () => {
50347
- var _state60, _state61;
50348
- 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`);
50349
51225
  setshowModal(false);
50350
51226
  },
50351
51227
  popupStyles: mobileView ? {
@@ -54223,8 +55099,84 @@ const getMaskedPhone = phone => {
54223
55099
  if (!phone || phone.length < 10) return "NA";
54224
55100
  return `******${phone.slice(-4)}`;
54225
55101
  };
54226
- const getAddress$1 = (address, t) => {
54227
- return `${address !== null && address !== void 0 && address.doorNo ? `${address === null || address === void 0 ? void 0 : address.doorNo}, ` : ""} ${address !== null && address !== void 0 && address.street ? `${address === null || address === void 0 ? void 0 : address.street}, ` : ""}${address !== null && address !== void 0 && address.landmark ? `${address === null || address === void 0 ? void 0 : address.landmark}, ` : ""}${t(Digit.Utils.pt.getMohallaLocale(address === null || address === void 0 ? void 0 : address.locality.code, address === null || address === void 0 ? void 0 : address.tenantId))}, ${t(Digit.Utils.pt.getCityLocale(address === null || address === void 0 ? void 0 : address.tenantId))}${address !== null && address !== void 0 && address.pincode && t(address === null || address === void 0 ? void 0 : address.pincode) ? `, ${address.pincode}` : " "}`;
55102
+ const getAddress$1 = (address, t, property) => {
55103
+ var _property$address, _Digit$Utils, _Digit$Utils$pt, _addrObj$additionalDe, _addrObj$additionalDe2, _addrObj$additionalDe3, _addrObj$additionalDe4, _Digit$Utils2, _Digit$Utils2$pt;
55104
+ if (!address && !property) return "";
55105
+ const addrObj = typeof address === "object" && address !== null ? address : {};
55106
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
55107
+ const addDetails = (property === null || property === void 0 ? void 0 : property.additionalDetails) || (property === null || property === void 0 ? void 0 : (_property$address = property.address) === null || _property$address === void 0 ? void 0 : _property$address.additionalDetails) || {};
55108
+ const parts = [];
55109
+ const houseNo = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.doorNo) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.houseNo) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.houseDoorNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.doorNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.houseNo) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.houseDoorNo) || (property === null || property === void 0 ? void 0 : property.doorNo) || (property === null || property === void 0 ? void 0 : property.houseNo) || "";
55110
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
55111
+ parts.push(String(houseNo).trim());
55112
+ }
55113
+ const building = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.buildingName) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.buildingColonyName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.buildingName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.buildingColonyName) || (property === null || property === void 0 ? void 0 : property.buildingName) || "";
55114
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
55115
+ parts.push(String(building).trim());
55116
+ }
55117
+ const street = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.street) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.streetName) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.addressLine1) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.street) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.streetName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.addressLine1) || (property === null || property === void 0 ? void 0 : property.street) || (property === null || property === void 0 ? void 0 : property.addressLine1) || "";
55118
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
55119
+ parts.push(String(street).trim());
55120
+ }
55121
+ const addressLine2 = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.addressLine2) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.addressLine2) || (property === null || property === void 0 ? void 0 : property.addressLine2) || "";
55122
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
55123
+ parts.push(String(addressLine2).trim());
55124
+ }
55125
+ const landmark = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.landmark) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.landmarkName) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.landmark) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.landmarkName) || (property === null || property === void 0 ? void 0 : property.landmark) || "";
55126
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
55127
+ parts.push(String(landmark).trim());
55128
+ }
55129
+ const tenantId = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.tenantId) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.tenantId) || (property === null || property === void 0 ? void 0 : property.tenantId) || Digit.ULBService.getCurrentTenantId();
55130
+ const localityRaw = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.locality) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.locality) || (property === null || property === void 0 ? void 0 : property.locality);
55131
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
55132
+ let localityText = "";
55133
+ if (localityCode && (_Digit$Utils = Digit.Utils) !== null && _Digit$Utils !== void 0 && (_Digit$Utils$pt = _Digit$Utils.pt) !== null && _Digit$Utils$pt !== void 0 && _Digit$Utils$pt.getMohallaLocale) {
55134
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
55135
+ localityText = t ? t(locLocale) : locLocale;
55136
+ }
55137
+ if (!localityText || localityText === localityCode) {
55138
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
55139
+ }
55140
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
55141
+ parts.push(String(localityText).trim());
55142
+ }
55143
+ const assemblyVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.assembly) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Assembly) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualAssembly) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe = addrObj.additionalDetails) === null || _addrObj$additionalDe === void 0 ? void 0 : _addrObj$additionalDe.assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Assembly) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualAssembly) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.assembly) || (property === null || property === void 0 ? void 0 : property.assembly) || "";
55144
+ const assemblyText = typeof assemblyVal === "object" ? (assemblyVal === null || assemblyVal === void 0 ? void 0 : assemblyVal.name) || (assemblyVal === null || assemblyVal === void 0 ? void 0 : assemblyVal.code) || "" : String(assemblyVal || "");
55145
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
55146
+ parts.push(assemblyText.trim());
55147
+ }
55148
+ const zoneVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.zone) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Zone) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualZone) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe2 = addrObj.additionalDetails) === null || _addrObj$additionalDe2 === void 0 ? void 0 : _addrObj$additionalDe2.zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Zone) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualZone) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.zone) || (property === null || property === void 0 ? void 0 : property.zone) || "";
55149
+ const zoneText = typeof zoneVal === "object" ? (zoneVal === null || zoneVal === void 0 ? void 0 : zoneVal.name) || (zoneVal === null || zoneVal === void 0 ? void 0 : zoneVal.code) || "" : String(zoneVal || "");
55150
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
55151
+ parts.push(zoneText.trim());
55152
+ }
55153
+ const wardVal = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.ward) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Ward) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.block) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.Block) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.actualWard) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe3 = addrObj.additionalDetails) === null || _addrObj$additionalDe3 === void 0 ? void 0 : _addrObj$additionalDe3.ward) || (addrObj === null || addrObj === void 0 ? void 0 : (_addrObj$additionalDe4 = addrObj.additionalDetails) === null || _addrObj$additionalDe4 === void 0 ? void 0 : _addrObj$additionalDe4.block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.ward) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Ward) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.Block) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.actualWard) || (addDetails === null || addDetails === void 0 ? void 0 : addDetails.ward) || (property === null || property === void 0 ? void 0 : property.ward) || "";
55154
+ const wardText = typeof wardVal === "object" ? (wardVal === null || wardVal === void 0 ? void 0 : wardVal.name) || (wardVal === null || wardVal === void 0 ? void 0 : wardVal.code) || "" : String(wardVal || "");
55155
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
55156
+ parts.push(wardText.trim());
55157
+ }
55158
+ let cityText = "";
55159
+ if (tenantId && (_Digit$Utils2 = Digit.Utils) !== null && _Digit$Utils2 !== void 0 && (_Digit$Utils2$pt = _Digit$Utils2.pt) !== null && _Digit$Utils2$pt !== void 0 && _Digit$Utils2$pt.getCityLocale) {
55160
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
55161
+ cityText = t ? t(cityLocale) : cityLocale;
55162
+ }
55163
+ if (!cityText || cityText === tenantId) {
55164
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
55165
+ }
55166
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
55167
+ parts.push(String(cityText).trim());
55168
+ }
55169
+ const pincode = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.pincode) || (addrObj === null || addrObj === void 0 ? void 0 : addrObj.pinCode) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.pincode) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.pinCode) || (property === null || property === void 0 ? void 0 : property.pincode) || "";
55170
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
55171
+ parts.push(String(pincode).trim());
55172
+ }
55173
+ const uniqueParts = [];
55174
+ parts.forEach(p => {
55175
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
55176
+ uniqueParts.push(p);
55177
+ }
55178
+ });
55179
+ return uniqueParts.join(", ");
54228
55180
  };
54229
55181
  const WSInfoPage = () => {
54230
55182
  var _user$info, _user$info$userName, _user$info2, _location$state, _location$state2, _location$state3, _location$state4, _location$state5, _location$state6, _createdProperty$owne, _createdProperty$owne2;
@@ -54266,6 +55218,13 @@ const WSInfoPage = () => {
54266
55218
  }
54267
55219
  return () => clearTimeout(timer);
54268
55220
  }, [timeLeft]);
55221
+ useEffect(() => {
55222
+ if (!showToast) return;
55223
+ const timer = setTimeout(() => {
55224
+ setShowToast(null);
55225
+ }, (showToast === null || showToast === void 0 ? void 0 : showToast.duration) || 5000);
55226
+ return () => clearTimeout(timer);
55227
+ }, [showToast]);
54269
55228
  useEffect(() => {
54270
55229
  if (isFromPropertyCreate) {
54271
55230
  var _createdProperty$owne3, _createdProperty$owne4;
@@ -54333,9 +55292,10 @@ const WSInfoPage = () => {
54333
55292
  });
54334
55293
  const target = createdPropertyId && sorted.find(p => p.propertyId === createdPropertyId) || (!hasAutoSelected.current ? sorted[0] : null);
54335
55294
  if (target && (!selectedProperty || selectedProperty.propertyId !== target.propertyId)) {
55295
+ const fullAddr = getAddress$1(target.address, t, target);
54336
55296
  const formatted = {
54337
55297
  ...target,
54338
- displayName: `${target.propertyId} - ${getAddress$1(target.address, t)}`
55298
+ displayName: fullAddr ? `${target.propertyId} - ${fullAddr}` : target.propertyId
54339
55299
  };
54340
55300
  setSelectedProperty(formatted);
54341
55301
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", target.propertyId);
@@ -54406,7 +55366,8 @@ const WSInfoPage = () => {
54406
55366
  setTimeLeft(30);
54407
55367
  setShowToast({
54408
55368
  key: "success",
54409
- message: t("OTP sent successfully!")
55369
+ message: t("OTP sent successfully!"),
55370
+ duration: 5000
54410
55371
  });
54411
55372
  });
54412
55373
  }, function (err) {
@@ -54471,15 +55432,18 @@ const WSInfoPage = () => {
54471
55432
  setIsOtpVerifying(false);
54472
55433
  setShowToast({
54473
55434
  key: "success",
54474
- message: t("OTP verified successfully!")
55435
+ message: t("OTP verified successfully!"),
55436
+ duration: 5000
54475
55437
  });
54476
55438
  setShowOtpVerification(false);
54477
55439
  setIsMobileVerified(true);
55440
+ setTimeLeft(0);
54478
55441
  const fallbackProp = createdProperty || (propByIdData === null || propByIdData === void 0 ? void 0 : (_propByIdData$Propert2 = propByIdData.Properties) === null || _propByIdData$Propert2 === void 0 ? void 0 : _propByIdData$Propert2[0]);
54479
55442
  if (fallbackProp) {
55443
+ const fullAddr = getAddress$1(fallbackProp.address, t, fallbackProp);
54480
55444
  const formatted = {
54481
55445
  ...fallbackProp,
54482
- displayName: `${fallbackProp.propertyId} - ${getAddress$1(fallbackProp.address, t)}`
55446
+ displayName: fullAddr ? `${fallbackProp.propertyId} - ${fullAddr}` : fallbackProp.propertyId
54483
55447
  };
54484
55448
  setSelectedProperty(formatted);
54485
55449
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", fallbackProp.propertyId);
@@ -54540,12 +55504,20 @@ const WSInfoPage = () => {
54540
55504
  const timeB = (b === null || b === void 0 ? void 0 : (_b$auditDetails2 = b.auditDetails) === null || _b$auditDetails2 === void 0 ? void 0 : _b$auditDetails2.createdTime) || (b === null || b === void 0 ? void 0 : b.createdTime) || 0;
54541
55505
  return timeB - timeA;
54542
55506
  });
54543
- const list = sortedList.map(prop => ({
54544
- ...prop,
54545
- displayName: getAddress$1(prop.address, t) || prop.propertyId
54546
- }));
55507
+ const list = sortedList.map(prop => {
55508
+ const fullAddr = getAddress$1(prop.address, t, prop);
55509
+ return {
55510
+ ...prop,
55511
+ displayName: fullAddr ? `${prop.propertyId} - ${fullAddr}` : prop.propertyId
55512
+ };
55513
+ });
54547
55514
  if (selectedProperty && !list.some(p => p.propertyId === selectedProperty.propertyId)) {
54548
- return [selectedProperty, ...list];
55515
+ const fullAddr = getAddress$1(selectedProperty.address, t, selectedProperty);
55516
+ const selProp = {
55517
+ ...selectedProperty,
55518
+ displayName: fullAddr ? `${selectedProperty.propertyId} - ${fullAddr}` : selectedProperty.propertyId
55519
+ };
55520
+ return [selProp, ...list];
54549
55521
  }
54550
55522
  return list;
54551
55523
  }, [propertyDetails, selectedProperty, t]);
@@ -55505,7 +56477,12 @@ const WSInfoPage = () => {
55505
56477
  id: "propertyId",
55506
56478
  selected: selectedProperty,
55507
56479
  select: val => {
55508
- setSelectedProperty(val);
56480
+ const fullAddr = getAddress$1(val === null || val === void 0 ? void 0 : val.address, t, val);
56481
+ const formattedVal = val ? {
56482
+ ...val,
56483
+ displayName: fullAddr ? `${val.propertyId} - ${fullAddr}` : val.propertyId
56484
+ } : null;
56485
+ setSelectedProperty(formattedVal);
55509
56486
  setShowOtpVerification(false);
55510
56487
  setOtp("");
55511
56488
  if (val !== null && val !== void 0 && val.propertyId) {
@@ -55732,7 +56709,8 @@ const WSInfoPage = () => {
55732
56709
  warning: showToast.key === "warning",
55733
56710
  label: t(showToast.message),
55734
56711
  onClose: () => setShowToast(null),
55735
- isDleteBtn: true
56712
+ isDleteBtn: true,
56713
+ duration: showToast.duration || 5000
55736
56714
  }));
55737
56715
  };
55738
56716
 
@@ -58012,10 +58990,31 @@ const NewApplication = () => {
58012
58990
  }, /*#__PURE__*/React.createElement(Controller, {
58013
58991
  control: control,
58014
58992
  name: "rainWaterHarvesting.hasCertificate",
58015
- render: props => /*#__PURE__*/React.createElement(CheckBox, {
58016
- checked: !!props.value,
58017
- label: "Rain Water Harvesting Certificate",
58018
- 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
58019
59018
  })
58020
59019
  }))), /*#__PURE__*/React.createElement(SectionCard, {
58021
59020
  description: t("WS_PROPERTY_ADDRESS_DESC"),
@@ -59036,118 +60035,6 @@ const NewApplication = () => {
59036
60035
  }));
59037
60036
  };
59038
60037
 
59039
- const CheckIcon = () => /*#__PURE__*/React.createElement("svg", {
59040
- width: "14",
59041
- height: "14",
59042
- viewBox: "0 0 24 24",
59043
- fill: "none",
59044
- stroke: "currentColor",
59045
- strokeWidth: "3",
59046
- strokeLinecap: "round",
59047
- strokeLinejoin: "round"
59048
- }, /*#__PURE__*/React.createElement("polyline", {
59049
- points: "20 6 9 17 4 12"
59050
- }));
59051
- const ClockIcon = () => /*#__PURE__*/React.createElement("svg", {
59052
- width: "14",
59053
- height: "14",
59054
- viewBox: "0 0 24 24",
59055
- fill: "none",
59056
- stroke: "currentColor",
59057
- strokeWidth: "2",
59058
- strokeLinecap: "round",
59059
- strokeLinejoin: "round"
59060
- }, /*#__PURE__*/React.createElement("circle", {
59061
- cx: "12",
59062
- cy: "12",
59063
- r: "10"
59064
- }), /*#__PURE__*/React.createElement("polyline", {
59065
- className: "clock-hands2",
59066
- points: "12 6 12 12 16 14"
59067
- }));
59068
- const WorkflowTimeline = _ref => {
59069
- var _workflowDetails$data;
59070
- let {
59071
- workflowDetails,
59072
- hideTimeline,
59073
- setHideTimeline
59074
- } = _ref;
59075
- const {
59076
- t
59077
- } = useTranslation();
59078
- const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
59079
- if (!timeline || timeline.length === 0) {
59080
- return null;
59081
- }
59082
- const getStatusClass = (index, checkpoint) => {
59083
- var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
59084
- 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);
59085
- if (index === 0 && !isTerminal) return "current2";
59086
- return "completed2";
59087
- };
59088
- const convertEpochToDateTime = epoch => {
59089
- if (!epoch) return "N/A";
59090
- const date = new Date(epoch);
59091
- const day = String(date.getDate()).padStart(2, "0");
59092
- const month = String(date.getMonth() + 1).padStart(2, "0");
59093
- const year = date.getFullYear().toString().slice(-2);
59094
- const hours = String(date.getHours()).padStart(2, "0");
59095
- const minutes = String(date.getMinutes()).padStart(2, "0");
59096
- return `${day}/${month}/${year} ${hours}:${minutes}`;
59097
- };
59098
- return /*#__PURE__*/React.createElement(Card, {
59099
- className: "workflow-timeline-card2 digit-form-composer",
59100
- style: {
59101
- background: "#fff",
59102
- padding: "16px",
59103
- height: hideTimeline ? "100%" : ""
59104
- }
59105
- }, /*#__PURE__*/React.createElement("div", {
59106
- className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
59107
- }, /*#__PURE__*/React.createElement(CardSubHeader, {
59108
- style: {
59109
- marginBottom: "0",
59110
- fontSize: "16px",
59111
- fontWeight: "700",
59112
- color: "#374151"
59113
- },
59114
- className: hideTimeline ? "hidden-content" : ""
59115
- }, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React.createElement("div", {
59116
- className: hideTimeline ? "hidden-content" : "timeline-container2"
59117
- }, timeline.map((checkpoint, index) => {
59118
- var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
59119
- const statusClass = getStatusClass(index, checkpoint);
59120
- const showLine = index !== timeline.length - 1 && timeline.length > 1;
59121
- 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);
59122
- return /*#__PURE__*/React.createElement("div", {
59123
- key: index,
59124
- className: `timeline-item2 ${statusClass}`
59125
- }, /*#__PURE__*/React.createElement("div", {
59126
- className: "timeline-marker2"
59127
- }, /*#__PURE__*/React.createElement("div", {
59128
- className: "timeline-circle2"
59129
- }, statusClass === "completed2" ? /*#__PURE__*/React.createElement(CheckIcon, null) : /*#__PURE__*/React.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React.createElement("div", {
59130
- className: "timeline-line2"
59131
- })), /*#__PURE__*/React.createElement("div", {
59132
- className: "timeline-content2"
59133
- }, /*#__PURE__*/React.createElement("div", {
59134
- className: "timeline-header2"
59135
- }, /*#__PURE__*/React.createElement("div", {
59136
- className: "timeline-title2"
59137
- }, 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", {
59138
- className: "timeline-date2"
59139
- }, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
59140
- className: "timeline-body2"
59141
- }, /*#__PURE__*/React.createElement("div", {
59142
- className: `timeline-status-tag2 status-${statusClass}`
59143
- }, 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", {
59144
- className: "timeline-comment2"
59145
- }, 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", {
59146
- className: "timeline-footer2"
59147
- }, /*#__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)))));
59148
- })));
59149
- };
59150
-
59151
60038
  const ApplicationDetails$1 = () => {
59152
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;
59153
60040
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
@@ -67435,7 +68322,7 @@ const openFilePDF = fileId => {
67435
68322
  }).catch(error => console.error("Error fetching file:", error));
67436
68323
  };
67437
68324
  const CheckPage$4 = _ref2 => {
67438
- 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;
67439
68326
  let {
67440
68327
  data,
67441
68328
  onSubmit,
@@ -67512,13 +68399,10 @@ const CheckPage$4 = _ref2 => {
67512
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) || {};
67513
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) || {};
67514
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) || {};
67515
68403
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Card, {
67516
- style: {
67517
- paddingRight: "16px",
67518
- height: "auto",
67519
- overflow: "visible"
67520
- }
67521
- }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, {
68404
+ className: "overflow-y-scroll"
68405
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, {
67522
68406
  style: {
67523
68407
  marginTop: "10px",
67524
68408
  marginBottom: "30px"
@@ -67599,7 +68483,10 @@ const CheckPage$4 = _ref2 => {
67599
68483
  }
67600
68484
  }, /*#__PURE__*/React.createElement(Row, {
67601
68485
  label: "Divyangjan/Person with Disability?",
67602
- text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
68486
+ text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
68487
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
68488
+ onClick: onEdit
68489
+ })
67603
68490
  })), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
67604
68491
  style: {
67605
68492
  marginTop: "10px",
@@ -67656,8 +68543,22 @@ const CheckPage$4 = _ref2 => {
67656
68543
  }
67657
68544
  }, /*#__PURE__*/React.createElement(Row, {
67658
68545
  label: t("Rain Water Harvesting Certificate"),
67659
- text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
67660
- })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
68546
+ text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
68547
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
68548
+ onClick: onEdit
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
+ })
68561
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("PT_LOCATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
67661
68562
  style: {
67662
68563
  marginTop: "10px",
67663
68564
  marginBottom: "30px"
@@ -67777,7 +68678,7 @@ const CheckPage$4 = _ref2 => {
67777
68678
  marginBottom: "30px"
67778
68679
  }
67779
68680
  }, documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
67780
- var _doc$documentType, _doc$documentType2;
68681
+ var _doc$documentType, _doc$documentType2, _doc$additionalDetail, _doc$additionalDetail2;
67781
68682
  return /*#__PURE__*/React.createElement(React.Fragment, {
67782
68683
  key: index
67783
68684
  }, /*#__PURE__*/React.createElement(Row, {
@@ -67786,6 +68687,9 @@ const CheckPage$4 = _ref2 => {
67786
68687
  actionButton: index === 0 ? /*#__PURE__*/React.createElement(ActionButton$1, {
67787
68688
  onClick: onEdit
67788
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))
67789
68693
  }), /*#__PURE__*/React.createElement(Row, {
67790
68694
  text: /*#__PURE__*/React.createElement("span", {
67791
68695
  style: {
@@ -67824,7 +68728,7 @@ const CheckPage$4 = _ref2 => {
67824
68728
  },
67825
68729
  disabled: isSubmitDisabled
67826
68730
  }));
67827
- })()), showDocModal && /*#__PURE__*/React.createElement(Modal, {
68731
+ })(), showDocModal && /*#__PURE__*/React.createElement(Modal, {
67828
68732
  open: showDocModal,
67829
68733
  headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
67830
68734
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
@@ -67886,6 +68790,11 @@ const isRwhDoc = doc => {
67886
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();
67887
68791
  return str.includes("RAIN") || str.includes("HARVEST");
67888
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
+ };
67889
68798
  const OLDApplication = () => {
67890
68799
  var _Digit$UserService$ge;
67891
68800
  const {
@@ -67912,6 +68821,8 @@ const OLDApplication = () => {
67912
68821
  label: "WS_BANK_DETAILS"
67913
68822
  }, {
67914
68823
  label: "Rain Water Harvesting Certificate"
68824
+ }, {
68825
+ label: "Sewer Treatment Plant (STP)"
67915
68826
  }, {
67916
68827
  label: "PT_LOCATION_DETAILS"
67917
68828
  }, {
@@ -67985,7 +68896,7 @@ const OLDApplication = () => {
67985
68896
  };
67986
68897
  const configCopy = cloneDeep_1(foundConfig);
67987
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)) || [];
67988
- 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"];
67989
68900
  const reorderedBody = [];
67990
68901
  desiredComponentOrder.forEach(compName => {
67991
68902
  const section = allCreateSections.find(s => {
@@ -68067,6 +68978,19 @@ const OLDApplication = () => {
68067
68978
  }
68068
68979
  }]
68069
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
+ });
68070
68994
  } else if (compName === "WSBankDetails") {
68071
68995
  reorderedBody.push({
68072
68996
  isCreateConnection: true,
@@ -68109,6 +69033,22 @@ const OLDApplication = () => {
68109
69033
  setSubmitValve(true);
68110
69034
  }
68111
69035
  }, [propertyId, propertyDetails]);
69036
+ useEffect(() => {
69037
+ if (showCheckPage) {
69038
+ window.history.pushState({
69039
+ step: "check"
69040
+ }, "");
69041
+ const handlePopState = () => {
69042
+ setShowCheckPage(false);
69043
+ window.scrollTo({
69044
+ top: 0,
69045
+ behavior: "smooth"
69046
+ });
69047
+ };
69048
+ window.addEventListener("popstate", handlePopState);
69049
+ return () => window.removeEventListener("popstate", handlePopState);
69050
+ }
69051
+ }, [showCheckPage]);
68112
69052
  const {
68113
69053
  isLoading: creatingWaterApplicationLoading,
68114
69054
  mutate: waterMutation
@@ -68306,10 +69246,14 @@ const OLDApplication = () => {
68306
69246
  }
68307
69247
  }
68308
69248
  setShowCheckPage(true);
69249
+ window.scrollTo({
69250
+ top: 0,
69251
+ behavior: "smooth"
69252
+ });
68309
69253
  };
68310
69254
  const processSubmission = function (data) {
68311
69255
  try {
68312
- 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;
68313
69257
  const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
68314
69258
  if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
68315
69259
  data.useDetails = {
@@ -68350,6 +69294,7 @@ const OLDApplication = () => {
68350
69294
  };
68351
69295
  }
68352
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;
68353
69298
  const docs = data.DocumentsRequired.documents;
68354
69299
  const identityDoc = docs.find(d => {
68355
69300
  var _d$documentType8;
@@ -68363,11 +69308,25 @@ const OLDApplication = () => {
68363
69308
  var _d$documentType1;
68364
69309
  return d === null || d === void 0 ? void 0 : (_d$documentType1 = d.documentType) === null || _d$documentType1 === void 0 ? void 0 : _d$documentType1.includes("OTHERDOCUMENTS");
68365
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) || "";
68366
69320
  data.documents = {
68367
69321
  documents: docs,
68368
69322
  identityProofNumber: (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || "",
68369
69323
  ownershipDocumentNumber: (ownershipDoc === null || ownershipDoc === void 0 ? void 0 : ownershipDoc.documentUid) || "",
68370
- 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
68371
69330
  };
68372
69331
  }
68373
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 => {
@@ -68442,14 +69401,52 @@ const OLDApplication = () => {
68442
69401
  };
68443
69402
  }
68444
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;
68445
69414
  if (data !== null && data !== void 0 && data.rainWaterHarvesting) {
68446
69415
  var _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$rainWaterHarves4;
68447
69416
  data.additionalDetails = {
68448
69417
  ...data.additionalDetails,
68449
69418
  ...data.rainWaterHarvesting,
68450
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),
68451
- 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
68452
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
+ }
68453
69450
  }
68454
69451
  if (data !== null && data !== void 0 && data.bankDetails) {
68455
69452
  const normalizedBank = getNormalizedBankDetails(data);
@@ -68650,7 +69647,12 @@ const OLDApplication = () => {
68650
69647
  }, /*#__PURE__*/React.createElement(VerticalTimeline, {
68651
69648
  config: timelineConfig,
68652
69649
  currentActiveIndex: timelineConfig.length - 1,
68653
- showFinalStep: false
69650
+ showFinalStep: false,
69651
+ onSelect: (route, idx) => {
69652
+ if (idx < timelineConfig.length - 1) {
69653
+ handleEdit();
69654
+ }
69655
+ }
68654
69656
  }), /*#__PURE__*/React.createElement(CheckPage$4, {
68655
69657
  data: formDataRef.current || sessionFormData,
68656
69658
  onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
@@ -68676,7 +69678,7 @@ const OLDApplication = () => {
68676
69678
  cardFormWrapperClassName: "new-application-card"
68677
69679
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
68678
69680
  isDleteBtn: true,
68679
- duration: 5000,
69681
+ duration: 3000,
68680
69682
  error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
68681
69683
  warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning,
68682
69684
  label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
@@ -69394,6 +70396,7 @@ const componentsToRegister = {
69394
70396
  WSOLDApplication: OLDApplication,
69395
70397
  WSDivyangjan: WSDivyangjan,
69396
70398
  WSRainWaterHarvesting: WSRainWaterHarvesting,
70399
+ WSSewerTreatmentPlant: WSSewerTreatmentPlant,
69397
70400
  WSExecuteDisconnection: WSExecuteDisconnection,
69398
70401
  WSFieldInspection: WSFieldInspection
69399
70402
  };