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

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.
@@ -396,13 +396,88 @@ const getQueryStringParams = query => {
396
396
  return params;
397
397
  }, {}) : {};
398
398
  };
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}` : " "}`;
399
+ const getAddress = (address, t, property) => {
400
+ 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;
401
+ if (!address && !property) return "";
402
+ const addrObj = typeof address === "object" && address !== null ? address : {};
403
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
404
+ 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) || {};
405
+ const parts = [];
406
+ 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) || "";
407
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
408
+ parts.push(String(houseNo).trim());
409
+ }
410
+ 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) || "";
411
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
412
+ parts.push(String(building).trim());
413
+ }
414
+ 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) || "";
415
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
416
+ parts.push(String(street).trim());
417
+ }
418
+ 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) || "";
419
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
420
+ parts.push(String(addressLine2).trim());
421
+ }
422
+ 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) || "";
423
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
424
+ parts.push(String(landmark).trim());
425
+ }
426
+ 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));
427
+ 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);
428
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
429
+ let localityText = "";
430
+ 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) {
431
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
432
+ localityText = t ? t(locLocale) : locLocale;
433
+ }
434
+ if (!localityText || localityText === localityCode) {
435
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
436
+ }
437
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
438
+ parts.push(String(localityText).trim());
439
+ }
440
+ 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) || "";
441
+ 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 || "");
442
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
443
+ parts.push(assemblyText.trim());
444
+ }
445
+ 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) || "";
446
+ 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 || "");
447
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
448
+ parts.push(zoneText.trim());
449
+ }
450
+ 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) || "";
451
+ 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 || "");
452
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
453
+ parts.push(wardText.trim());
454
+ }
455
+ let cityText = "";
456
+ 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) {
457
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
458
+ cityText = t ? t(cityLocale) : cityLocale;
459
+ }
460
+ if (!cityText || cityText === tenantId) {
461
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
462
+ }
463
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
464
+ parts.push(String(cityText).trim());
465
+ }
466
+ 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) || "";
467
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
468
+ parts.push(String(pincode).trim());
469
+ }
470
+ const uniqueParts = [];
471
+ parts.forEach(p => {
472
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
473
+ uniqueParts.push(p);
474
+ }
475
+ });
476
+ return uniqueParts.join(", ");
402
477
  };
403
478
  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) {
479
+ var _Digit5, _Digit5$Utils, _Digit5$Utils$pt;
480
+ 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
481
  return Digit.Utils.pt.formatPropertyAddress(address, t) || getAddress(address, t);
407
482
  }
408
483
  return getAddress(address, t);
@@ -604,7 +679,7 @@ const getNormalizedBankDetails = data => {
604
679
  };
605
680
  const createPayloadOfWS = function (data) {
606
681
  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;
682
+ var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$waterConnection, _data$ConnectionHolde, _data$documents2, _data$djbEmployee, _data$governmentEmplo, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$disability, _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$rainWaterHarves4, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$djbEmployee6, _allDocuments$find, _connectionDetailsObj, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _connectionDetailsObj2, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj3, _data$applicationSele8, _useDetailsObject$cat, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _useDetailsObject$noO, _data$propertyAddress16, _data$propertyAddress17, _data$propertyAddress18, _data$propertyAddress19, _data$cpt18, _data$cpt18$details, _data$cpt18$details$a, _data$cpt19, _data$cpt19$details, _data$cpt19$details$a, _data$cpt20, _data$cpt20$details, _data$propertyAddress20, _data$propertyAddress21, _data$propertyAddress22, _data$propertyAddress23, _useDetailsObject$noO2, _data$cpt21, _data$cpt21$details, _data$cpt21$details$a, _data$cpt22, _data$cpt22$details, _data$propertyAddress24, _data$propertyAddress25, _data$cpt23, _data$cpt23$details, _data$cpt23$details$a, _data$cpt24, _data$cpt24$details, _data$cpt24$details$a, _data$cpt25, _data$cpt25$details, _data$propertyAddress26, _data$propertyAddress27, _data$cpt26, _data$cpt26$details, _data$cpt26$details$a, _data$cpt27, _data$cpt27$details, _data$cpt27$details$a, _data$cpt28, _data$cpt28$details, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$applicationSele25, _data$contact5, _data$documents3, _data$documents4, _data$documents5, _data$documents6, _allDocuments$find2, _allDocuments$find3, _data$cpt29, _Digit6, _Digit6$Customization, _Digit6$Customization2, _Digit7, _Digit7$Customization, _Digit7$Customization2;
608
683
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
609
684
  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
685
  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 => {
@@ -852,7 +927,7 @@ const createPayloadOfWS = function (data) {
852
927
  delete payload.additionalDetails.proposedWaterClosets;
853
928
  sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(allDocuments));
854
929
  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;
930
+ 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
931
  return Promise.resolve(payload);
857
932
  } catch (e) {
858
933
  return Promise.reject(e);
@@ -860,7 +935,7 @@ const createPayloadOfWS = function (data) {
860
935
  };
861
936
  const updatePayloadOfWS = function (data, type) {
862
937
  try {
863
- var _data$additionalDetai7, _data$additionalDetai8, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
938
+ var _data$additionalDetai7, _data$additionalDetai8, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
864
939
  const {
865
940
  signatureFileStoreId,
866
941
  signatureFileName
@@ -909,7 +984,7 @@ const updatePayloadOfWS = function (data, type) {
909
984
  }
910
985
  }
911
986
  };
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;
987
+ 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
988
  return Promise.resolve(payload);
914
989
  } catch (e) {
915
990
  return Promise.reject(e);
@@ -1019,7 +1094,7 @@ const getAllDocumentsForUpdate = data => {
1019
1094
  return allDocuments;
1020
1095
  };
1021
1096
  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;
1097
+ var _data$WaterConnection, _data$WaterConnection2, _data$cpt30, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$djbEmployee12, _data$djbEmployee13, _data$djbEmployee14, _data$djbEmployee15, _data$djbEmployee16, _data$djbEmployee17, _data$djbEmployee18, _data$djbEmployee19, _data$djbEmployee20, _data$djbEmployee21, _data$djbEmployee22, _data$djbEmployee23, _data$djbEmployee24, _data$djbEmployee25, _data$djbEmployee25$d, _data$djbEmployee26, _data$disability2, _data$rainWaterHarves5, _data$rainWaterHarves6, _data$rainWaterHarves7, _data$rainWaterHarves8, _Digit0, _Digit0$Customization, _Digit0$Customization2, _Digit1, _Digit1$Customization, _Digit1$Customization2;
1023
1098
  const {
1024
1099
  signatureFileStoreId,
1025
1100
  signatureFileName
@@ -1072,11 +1147,11 @@ const convertToWSUpdate = data => {
1072
1147
  }
1073
1148
  }
1074
1149
  };
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;
1150
+ 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
1151
  return formdata;
1077
1152
  };
1078
1153
  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;
1154
+ var _data$WaterConnection9, _data$WaterConnection0, _data$property, _data$property$auditD, _waterResult$property, _waterResult$property2, _data$property2, _data$property2$audit, _waterResult$auditDet, _data$additionalDetai9, _data$additionalDetai0, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai1, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai10, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$rainWaterHarves10, _data$waterConnection2, _data$additionalDetai11, _waterResult$addition4, _data$additionalDetai12, _waterResult$addition5, _data$additionalDetai13, _waterResult$addition6, _data$additionalDetai14, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai15, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai16, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai17, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai18, _waterResult$addition1, _data$additionalDetai19, _data$property3, _data$property3$addit, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2;
1080
1155
  const {
1081
1156
  signatureFileStoreId,
1082
1157
  signatureFileName
@@ -1245,11 +1320,11 @@ const convertToEditWSUpdate = data => {
1245
1320
  assignes: []
1246
1321
  }
1247
1322
  };
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;
1323
+ 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
1324
  return formdata;
1250
1325
  };
1251
1326
  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;
1327
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai20, _data$additionalDetai21, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai22, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai23, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$rainWaterHarves14, _data$waterConnection8, _data$additionalDetai24, _SewerageResult$addit4, _data$additionalDetai25, _SewerageResult$addit5, _data$additionalDetai26, _SewerageResult$addit6, _data$additionalDetai27, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai28, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai29, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai30, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai31, _SewerageResult$addit1, _data$additionalDetai32, _data$property4, _data$property4$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit12, _Digit12$Customizatio, _Digit12$Customizatio2, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2;
1253
1328
  const {
1254
1329
  signatureFileStoreId,
1255
1330
  signatureFileName
@@ -1417,11 +1492,11 @@ const convertToEditSWUpdate = data => {
1417
1492
  assignes: []
1418
1493
  }
1419
1494
  };
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;
1495
+ 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
1496
  return formdata;
1422
1497
  };
1423
1498
  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;
1499
+ var _data$SewerageConnect3, _data$SewerageConnect4, _data$cpt35, _data$SewerageConnect5, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _data$djbEmployee57, _data$djbEmployee58, _data$djbEmployee59, _data$djbEmployee60, _data$djbEmployee61, _data$djbEmployee62, _data$djbEmployee63, _data$djbEmployee64, _data$djbEmployee65, _data$djbEmployee66, _data$djbEmployee67, _data$djbEmployee68, _data$djbEmployee69, _data$djbEmployee70, _data$djbEmployee70$d, _data$djbEmployee71, _data$disability5, _data$rainWaterHarves15, _data$rainWaterHarves16, _data$rainWaterHarves17, _data$rainWaterHarves18, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2, _Digit15, _Digit15$Customizatio, _Digit15$Customizatio2;
1425
1500
  const {
1426
1501
  signatureFileStoreId,
1427
1502
  signatureFileName
@@ -1475,12 +1550,12 @@ const convertToSWUpdate = data => {
1475
1550
  }
1476
1551
  }
1477
1552
  };
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;
1553
+ 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
1554
  return formdata;
1480
1555
  };
1481
1556
  const createPayloadOfWSDisconnection = function (data, storeData, service) {
1482
1557
  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;
1558
+ 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
1559
  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
1560
  let plumberInfo = [];
1486
1561
  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 +1656,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
1581
1656
  disconnectRequest: true
1582
1657
  };
1583
1658
  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;
1659
+ 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
1660
  return Promise.resolve(returnObject);
1586
1661
  } catch (e) {
1587
1662
  return Promise.reject(e);
@@ -1699,7 +1774,7 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1699
1774
  };
1700
1775
  const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
1701
1776
  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;
1777
+ 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
1778
  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
1779
  let wsPayload = {
1705
1780
  WaterConnection: {
@@ -1751,7 +1826,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1751
1826
  disconnectRequest: true
1752
1827
  };
1753
1828
  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;
1829
+ 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
1830
  return Promise.resolve(returnObject);
1756
1831
  } catch (e) {
1757
1832
  return Promise.reject(e);
@@ -1759,7 +1834,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1759
1834
  };
1760
1835
  const updatePayloadOfWSDisconnection = function (data, type) {
1761
1836
  try {
1762
- var _data$plumberInfo, _data$plumberInfo2, _Digit17, _Digit17$Customizatio, _Digit17$Customizatio2, _Digit18, _Digit18$Customizatio, _Digit18$Customizatio2;
1837
+ var _data$plumberInfo, _data$plumberInfo2, _Digit20, _Digit20$Customizatio, _Digit20$Customizatio2, _Digit21, _Digit21$Customizatio, _Digit21$Customizatio2;
1763
1838
  let payload = {
1764
1839
  ...data,
1765
1840
  plumberInfo: data !== null && data !== void 0 && (_data$plumberInfo = data.plumberInfo) !== null && _data$plumberInfo !== void 0 && _data$plumberInfo[0] ? [{
@@ -1773,7 +1848,7 @@ const updatePayloadOfWSDisconnection = function (data, type) {
1773
1848
  action: "SUBMIT_APPLICATION"
1774
1849
  }
1775
1850
  };
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;
1851
+ 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
1852
  return Promise.resolve(payload);
1778
1853
  } catch (e) {
1779
1854
  return Promise.reject(e);
@@ -31390,21 +31465,23 @@ const UploadFileDigiLocker = props => {
31390
31465
  const handleFileUpload = e => {
31391
31466
  const file = e.target.files[0];
31392
31467
  if (file) {
31393
- if (file.size > 5242880) {
31468
+ const maxSize = props.maxSize || 5242880;
31469
+ const maxSizeText = props.maxSizeText || "5MB";
31470
+ if (file.size > maxSize) {
31394
31471
  setShowToast({
31395
31472
  error: true,
31396
- label: "File size should not exceed 5MB."
31473
+ label: props.sizeErrorMessage || `File size should not exceed ${maxSizeText}.`
31397
31474
  });
31398
31475
  inpRef.current.value = "";
31399
31476
  return;
31400
31477
  }
31401
- const allowedTypes = ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31478
+ const allowedTypes = props.allowedTypes || ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31402
31479
  const fileExtension = file.name.split('.').pop().toLowerCase();
31403
- const allowedExtensions = ["pdf", "jpeg", "png", "jpg"];
31480
+ const allowedExtensions = props.allowedExtensions || ["pdf", "jpeg", "png", "jpg"];
31404
31481
  if (!allowedTypes.includes(file.type) && !allowedExtensions.includes(fileExtension)) {
31405
31482
  setShowToast({
31406
31483
  error: true,
31407
- label: "Invalid file format. Only PDF, JPG, and PNG are allowed."
31484
+ label: props.formatErrorMessage || `Invalid file format. Only ${props.allowedFormatsText || "PDF, JPG, and PNG"} are allowed.`
31408
31485
  });
31409
31486
  inpRef.current.value = "";
31410
31487
  return;
@@ -31565,6 +31642,49 @@ const removeDuplicateOtherDocuments = function (documentList) {
31565
31642
  return true;
31566
31643
  });
31567
31644
  };
31645
+ const getDocUploadSpecs = (doc, isApplicantPhoto) => {
31646
+ const code = ((doc === null || doc === void 0 ? void 0 : doc.code) || "").toUpperCase();
31647
+ if (isApplicantPhoto || code === "OWNER.APPLICANTPHOTO" || code.includes("PHOTO")) {
31648
+ return {
31649
+ type: "PHOTO",
31650
+ maxSize: 200 * 1024,
31651
+ maxSizeText: "200KB",
31652
+ allowedExtensions: ["jpg", "jpeg"],
31653
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
31654
+ allowedFormatsText: "JPEG",
31655
+ accept: "image/jpeg, .jpg, .jpeg",
31656
+ uiMessage: "Allowed format: JPEG | Max file size: 200KB",
31657
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Applicant Photo",
31658
+ sizeErrorMessage: "Applicant Photo size should not exceed 200KB"
31659
+ };
31660
+ }
31661
+ if (code === "OWNER.OWNERSHIPPROOF" || code.includes("OWNERSHIP")) {
31662
+ return {
31663
+ type: "OWNERSHIP",
31664
+ maxSize: 5 * 1024 * 1024,
31665
+ maxSizeText: "5MB",
31666
+ allowedExtensions: ["pdf"],
31667
+ allowedMimeTypes: ["application/pdf"],
31668
+ allowedFormatsText: "PDF",
31669
+ accept: ".pdf, application/pdf",
31670
+ uiMessage: "Allowed format: PDF | Max file size: 5MB",
31671
+ formatErrorMessage: "Only PDF format (.pdf) is allowed for Ownership Documents",
31672
+ sizeErrorMessage: "Ownership Document size should not exceed 5MB"
31673
+ };
31674
+ }
31675
+ return {
31676
+ type: "ID_OR_OTHER",
31677
+ maxSize: 1024 * 1024,
31678
+ maxSizeText: "1MB",
31679
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
31680
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
31681
+ allowedFormatsText: "PDF, JPEG",
31682
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
31683
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
31684
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for this document",
31685
+ sizeErrorMessage: "File size should not exceed 1MB"
31686
+ };
31687
+ };
31568
31688
  const WSDocumentsEmployee = _ref => {
31569
31689
  var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
31570
31690
  let {
@@ -31866,7 +31986,7 @@ const WSDocumentsEmployee = _ref => {
31866
31986
  color: "#d32f2f",
31867
31987
  fontWeight: "600"
31868
31988
  }
31869
- }, "\u26A0\uFE0F ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
31989
+ }, "\u26A0\uFE0F", " ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
31870
31990
  const nocDownloadSection = isTenant ? /*#__PURE__*/React.createElement("div", {
31871
31991
  style: {
31872
31992
  marginBottom: "20px",
@@ -31900,24 +32020,6 @@ const WSDocumentsEmployee = _ref => {
31900
32020
  whiteSpace: "nowrap"
31901
32021
  }
31902
32022
  }, 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
32023
  if (userType === "citizen") {
31922
32024
  return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Timeline, {
31923
32025
  currentStep: 3
@@ -31927,19 +32029,23 @@ const WSDocumentsEmployee = _ref => {
31927
32029
  onSelect: goNext,
31928
32030
  onSkip: () => onSelect(),
31929
32031
  isDisabled: enableSubmit
31930
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32032
+ }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
31931
32033
  label: error,
31932
32034
  onClose: () => setError(null),
31933
- error: true
32035
+ error: true,
32036
+ isDleteBtn: true,
32037
+ duration: 3000
31934
32038
  })));
31935
32039
  }
31936
32040
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
31937
32041
  title: t("WS_DOCUMENTS"),
31938
32042
  defaultOpen: true
31939
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
32043
+ }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React.createElement(Toast, {
31940
32044
  label: error,
31941
32045
  onClose: () => setError(null),
31942
- error: true
32046
+ error: true,
32047
+ isDleteBtn: true,
32048
+ duration: 3000
31943
32049
  }));
31944
32050
  };
31945
32051
  function EmployeeIdDocumentUpload(_ref2) {
@@ -31961,6 +32067,16 @@ function EmployeeIdDocumentUpload(_ref2) {
31961
32067
  const [uploadedFile, setUploadedFile] = useState(initialFileId || null);
31962
32068
  const [fileName, setFileName] = useState((existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileName) || "");
31963
32069
  const [errorUpload, setErrorUpload] = useState(null);
32070
+ const specs = {
32071
+ maxSize: 1024 * 1024,
32072
+ maxSizeText: "1MB",
32073
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
32074
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
32075
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
32076
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
32077
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for Employee ID Document",
32078
+ sizeErrorMessage: "Employee ID Document size should not exceed 1MB"
32079
+ };
31964
32080
  useEffect(() => {
31965
32081
  var _formData$djbEmployee7, _formData$djbEmployee8, _formData$djbEmployee9, _formData$djbEmployee0;
31966
32082
  const doc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
@@ -31977,60 +32093,64 @@ function EmployeeIdDocumentUpload(_ref2) {
31977
32093
  (function () {
31978
32094
  try {
31979
32095
  setErrorUpload(null);
31980
- const _temp3 = function () {
32096
+ return function () {
31981
32097
  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
- }
32098
+ const ext = (file.name || "").split(".").pop().toLowerCase();
32099
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32100
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
32101
+ if (!isExtAllowed && !isMimeAllowed) {
32102
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32103
+ setFile(null);
32104
+ return;
32105
+ }
32106
+ if (file.size > specs.maxSize) {
32107
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32108
+ setFile(null);
32109
+ return;
32110
+ }
32111
+ const _temp = _catch(function () {
32112
+ setUploadedFile(null);
32113
+ const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
32114
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
32115
+ var _response$data, _response$data$files;
32116
+ 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) {
32117
+ var _response$data2, _response$data2$files;
32118
+ 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;
32119
+ const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
32120
+ setUploadedFile(fileId);
32121
+ setFileName(nameOfFile);
32122
+ setDocuments(prevDocs => {
32123
+ var _formData$djbEmployee10;
32124
+ const filtered = (prevDocs || []).filter(d => {
32125
+ var _d$documentType7;
32126
+ 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"));
32127
+ });
32128
+ return [...filtered, {
32129
+ documentType: "OWNER.DJB_EMPLOYEE_ID",
32130
+ fileStoreId: fileId,
32131
+ fileName: nameOfFile,
32132
+ documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32133
+ documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
32134
+ i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32135
+ status: "ACTIVE"
32136
+ }];
32023
32137
  });
32024
- }, function () {
32138
+ if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
32139
+ formSetValue("djbEmployee", {
32140
+ ...formData.djbEmployee,
32141
+ document: fileId
32142
+ });
32143
+ }
32144
+ } else {
32025
32145
  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 () {});
32146
+ }
32147
+ });
32148
+ }, function () {
32149
+ setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32150
+ });
32151
+ if (_temp && _temp.then) return _temp.then(function () {});
32031
32152
  }
32032
32153
  }();
32033
- return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
32034
32154
  } catch (e) {
32035
32155
  Promise.reject(e);
32036
32156
  }
@@ -32039,9 +32159,18 @@ function EmployeeIdDocumentUpload(_ref2) {
32039
32159
  function selectfile(e) {
32040
32160
  var _e$target, _e$target$files;
32041
32161
  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];
32162
+ setErrorUpload(null);
32042
32163
  if (selected) {
32043
- if (selected.size > 5242880) {
32044
- setErrorUpload(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32164
+ const ext = (selected.name || "").split(".").pop().toLowerCase();
32165
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32166
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selected.type);
32167
+ if (!isExtAllowed && !isMimeAllowed) {
32168
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32169
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32170
+ return;
32171
+ }
32172
+ if (selected.size > specs.maxSize) {
32173
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32045
32174
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32046
32175
  return;
32047
32176
  }
@@ -32124,11 +32253,11 @@ function EmployeeIdDocumentUpload(_ref2) {
32124
32253
  }, "*"))), /*#__PURE__*/React.createElement("div", {
32125
32254
  style: {
32126
32255
  fontSize: "12px",
32127
- color: "#666",
32256
+ color: "#555",
32128
32257
  marginTop: "-2px",
32129
32258
  marginBottom: "4px"
32130
32259
  }
32131
- }, t("WS_DOCUMENT_MAX_SIZE_MESSAGE") || "Allowed formats: PDF, JPG, PNG | Max file size: 5MB"), /*#__PURE__*/React.createElement("div", {
32260
+ }, specs.uiMessage), /*#__PURE__*/React.createElement("div", {
32132
32261
  className: "field",
32133
32262
  style: {
32134
32263
  display: "flex",
@@ -32144,7 +32273,7 @@ function EmployeeIdDocumentUpload(_ref2) {
32144
32273
  id: "employee-doc-upload",
32145
32274
  extraStyleName: "propertyCreate",
32146
32275
  placeholder: t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"),
32147
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
32276
+ accept: specs.accept,
32148
32277
  onUpload: selectfile,
32149
32278
  onDelete: handleDelete,
32150
32279
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
@@ -32152,7 +32281,13 @@ function EmployeeIdDocumentUpload(_ref2) {
32152
32281
  uploadedFiles: uploadedFile && !file ? [[fileName || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"), {
32153
32282
  fileStoreId: uploadedFile
32154
32283
  }]] : undefined
32155
- }))), uploadedFile && /*#__PURE__*/React.createElement("div", {
32284
+ }))), errorUpload && /*#__PURE__*/React.createElement("div", {
32285
+ style: {
32286
+ fontSize: "12px",
32287
+ color: "#d32f2f",
32288
+ marginTop: "4px"
32289
+ }
32290
+ }, errorUpload), uploadedFile && /*#__PURE__*/React.createElement("div", {
32156
32291
  style: {
32157
32292
  display: "flex",
32158
32293
  alignItems: "center",
@@ -32222,6 +32357,8 @@ function SelectDocument$2(_ref3) {
32222
32357
  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
32358
  })[0];
32224
32359
  const isApplicantPhoto = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO";
32360
+ const specs = getDocUploadSpecs(doc, isApplicantPhoto);
32361
+ const [fileError, setFileError] = useState(null);
32225
32362
  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
32363
  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
32364
  const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
@@ -32313,6 +32450,14 @@ function SelectDocument$2(_ref3) {
32313
32450
  setDigilockerUpload(eligible);
32314
32451
  }, [selectedDocument]);
32315
32452
  const handleCapture = capturedFile => {
32453
+ setFileError(null);
32454
+ if (capturedFile.size > specs.maxSize) {
32455
+ const msg = t("WS_PHOTO_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage;
32456
+ setError(msg);
32457
+ setFileError(msg);
32458
+ setShowCamera(false);
32459
+ return;
32460
+ }
32316
32461
  setFile(capturedFile);
32317
32462
  setIsCameraFile(true);
32318
32463
  setShowCamera(false);
@@ -32320,6 +32465,7 @@ function SelectDocument$2(_ref3) {
32320
32465
  const handleSelectDocument = value => setSelectedDocument(value);
32321
32466
  const removeUploadedDocument = fileStoreId => {
32322
32467
  setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
32468
+ setFileError(null);
32323
32469
  if (fileStoreId === uploadedFile) {
32324
32470
  setUploadedFile(null);
32325
32471
  setFile(null);
@@ -32334,9 +32480,9 @@ function SelectDocument$2(_ref3) {
32334
32480
  fileStoreId = uploadedFile;
32335
32481
  }
32336
32482
  try {
32337
- const _temp5 = function () {
32483
+ const _temp3 = function () {
32338
32484
  if (fileStoreId) {
32339
- const _temp4 = _catch(function () {
32485
+ const _temp2 = _catch(function () {
32340
32486
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
32341
32487
  if (res !== null && res !== void 0 && res.data) {
32342
32488
  var _res$headers, _res$headers2;
@@ -32355,10 +32501,10 @@ function SelectDocument$2(_ref3) {
32355
32501
  }, function (err) {
32356
32502
  console.error("Failed to fetch file URL via FileFetchbyid", err);
32357
32503
  });
32358
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
32504
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
32359
32505
  }
32360
32506
  }();
32361
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
32507
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
32362
32508
  } catch (e) {
32363
32509
  return Promise.reject(e);
32364
32510
  }
@@ -32388,9 +32534,22 @@ function SelectDocument$2(_ref3) {
32388
32534
  function selectfile(e, newFile) {
32389
32535
  var _e$target2, _e$target2$files;
32390
32536
  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]);
32537
+ setFileError(null);
32391
32538
  if (selectedFile) {
32392
- if (selectedFile.size > 5242880) {
32393
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32539
+ const ext = (selectedFile.name || "").split(".").pop().toLowerCase();
32540
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32541
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selectedFile.type);
32542
+ if (!isExtAllowed && !isMimeAllowed) {
32543
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
32544
+ setError(msg);
32545
+ setFileError(msg);
32546
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32547
+ return;
32548
+ }
32549
+ if (selectedFile.size > specs.maxSize) {
32550
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
32551
+ setError(msg);
32552
+ setFileError(msg);
32394
32553
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32395
32554
  return;
32396
32555
  }
@@ -32582,61 +32741,65 @@ function SelectDocument$2(_ref3) {
32582
32741
  (function () {
32583
32742
  try {
32584
32743
  setError(null);
32585
- const _temp0 = function () {
32744
+ return function () {
32586
32745
  if (file) {
32746
+ setFileError(null);
32587
32747
  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);
32748
+ if (isDuplicateDocument) {
32749
+ const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
32750
+ const translatedDocumentName = t(documentNameKey);
32751
+ const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
32752
+ const msg = `Document "${documentName}" has already been uploaded.`;
32753
+ setError(msg);
32754
+ setFileError(msg);
32755
+ setFile(null);
32756
+ return;
32757
+ }
32758
+ const ext = (file.name || "").split(".").pop().toLowerCase();
32759
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32760
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
32761
+ if (!isExtAllowed && !isMimeAllowed) {
32762
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
32763
+ setError(msg);
32764
+ setFileError(msg);
32765
+ setFile(null);
32766
+ return;
32767
+ }
32768
+ if (file.size > specs.maxSize) {
32769
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
32770
+ setError(msg);
32771
+ setFileError(msg);
32772
+ setFile(null);
32773
+ return;
32774
+ }
32775
+ const _temp4 = _finallyRethrows(function () {
32776
+ return _catch(function () {
32777
+ setUploadedFile(null);
32778
+ setIsUploading(true);
32779
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
32780
+ var _response$data4, _response$data4$files;
32781
+ 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) {
32782
+ var _response$data5, _response$data5$files;
32783
+ 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
32784
  } 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 () {});
32785
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
32786
+ setError(msg);
32787
+ setFileError(msg);
32631
32788
  }
32632
- }();
32633
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
32634
- }
32635
- }();
32636
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
32789
+ });
32790
+ }, function () {
32791
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
32792
+ setError(msg);
32793
+ setFileError(msg);
32794
+ });
32795
+ }, function (_wasThrown, _result3) {
32796
+ setIsUploading(false);
32797
+ if (_wasThrown) throw _result3;
32798
+ return _result3;
32799
+ });
32800
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
32637
32801
  }
32638
32802
  }();
32639
- return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
32640
32803
  } catch (e) {
32641
32804
  Promise.reject(e);
32642
32805
  }
@@ -32793,11 +32956,11 @@ function SelectDocument$2(_ref3) {
32793
32956
  }, "*"))), /*#__PURE__*/React.createElement("div", {
32794
32957
  style: {
32795
32958
  fontSize: "12px",
32796
- color: "#666",
32959
+ color: "#555",
32797
32960
  marginTop: "-2px",
32798
32961
  marginBottom: "4px"
32799
32962
  }
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", {
32963
+ }, specs.uiMessage), /*#__PURE__*/React.createElement("div", {
32801
32964
  className: "field",
32802
32965
  style: {
32803
32966
  display: "flex",
@@ -32814,6 +32977,7 @@ function SelectDocument$2(_ref3) {
32814
32977
  onDelete: () => {
32815
32978
  setUploadedFile(null);
32816
32979
  setFile(null);
32980
+ setFileError(null);
32817
32981
  setIsCameraFile(false);
32818
32982
  setIsDocumentUidLocked(false);
32819
32983
  setDocumentUid("");
@@ -32828,11 +32992,19 @@ function SelectDocument$2(_ref3) {
32828
32992
  },
32829
32993
  buttonType: "button",
32830
32994
  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",
32995
+ accept: specs.accept,
32996
+ maxSize: specs.maxSize,
32997
+ maxSizeText: specs.maxSizeText,
32998
+ allowedExtensions: specs.allowedExtensions,
32999
+ allowedTypes: specs.allowedMimeTypes,
33000
+ allowedFormatsText: specs.allowedFormatsText,
33001
+ sizeErrorMessage: specs.sizeErrorMessage,
33002
+ formatErrorMessage: specs.formatErrorMessage,
32832
33003
  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
33004
  fileStoreId: uploadedFile
32834
33005
  }]] : undefined,
32835
33006
  removeTargetedFile: () => {
33007
+ setFileError(null);
32836
33008
  if (isOther && uploadedFile) {
32837
33009
  removeUploadedDocument(uploadedFile);
32838
33010
  } else {
@@ -32856,6 +33028,7 @@ function SelectDocument$2(_ref3) {
32856
33028
  onDelete: () => {
32857
33029
  setUploadedFile(null);
32858
33030
  setFile(null);
33031
+ setFileError(null);
32859
33032
  setIsCameraFile(false);
32860
33033
  setIsDocumentUidLocked(false);
32861
33034
  setDocumentUid("");
@@ -32870,11 +33043,12 @@ function SelectDocument$2(_ref3) {
32870
33043
  },
32871
33044
  buttonType: "button",
32872
33045
  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",
33046
+ accept: specs.accept,
32874
33047
  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
33048
  fileStoreId: uploadedFile
32876
33049
  }]] : undefined,
32877
33050
  removeTargetedFile: () => {
33051
+ setFileError(null);
32878
33052
  if (isOther && uploadedFile) {
32879
33053
  removeUploadedDocument(uploadedFile);
32880
33054
  } else {
@@ -32906,6 +33080,7 @@ function SelectDocument$2(_ref3) {
32906
33080
  pendingId.current = Date.now();
32907
33081
  setUploadedFile(null);
32908
33082
  setFile(null);
33083
+ setFileError(null);
32909
33084
  setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
32910
33085
  setDocumentUid("");
32911
33086
  setDocNumberError(null);
@@ -32921,7 +33096,13 @@ function SelectDocument$2(_ref3) {
32921
33096
  fontWeight: "bold",
32922
33097
  marginTop: "2px"
32923
33098
  }
32924
- }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), (isOther ? otherUploadedDocuments : uploadedFile ? [{
33099
+ }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), fileError && /*#__PURE__*/React.createElement("div", {
33100
+ style: {
33101
+ fontSize: "12px",
33102
+ color: "#d32f2f",
33103
+ marginTop: "4px"
33104
+ }
33105
+ }, fileError), (isOther ? otherUploadedDocuments : uploadedFile ? [{
32925
33106
  fileStoreId: uploadedFile,
32926
33107
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
32927
33108
  documentNumber: documentUid
@@ -33088,7 +33269,7 @@ const CameraCaptureModal = _ref4 => {
33088
33269
  useEffect(() => {
33089
33270
  const startCamera = function () {
33090
33271
  try {
33091
- const _temp1 = _catch(function () {
33272
+ const _temp5 = _catch(function () {
33092
33273
  return Promise.resolve(navigator.mediaDevices.getUserMedia({
33093
33274
  video: true
33094
33275
  })).then(function (mediaStream) {
@@ -33101,7 +33282,7 @@ const CameraCaptureModal = _ref4 => {
33101
33282
  setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
33102
33283
  console.error("Error accessing camera: ", err);
33103
33284
  });
33104
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
33285
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
33105
33286
  } catch (e) {
33106
33287
  return Promise.reject(e);
33107
33288
  }
@@ -33126,7 +33307,7 @@ const CameraCaptureModal = _ref4 => {
33126
33307
  type: "image/jpeg"
33127
33308
  });
33128
33309
  onCapture(file);
33129
- }, "image/jpeg");
33310
+ }, "image/jpeg", 0.7);
33130
33311
  }
33131
33312
  };
33132
33313
  return /*#__PURE__*/React.createElement("div", {
@@ -38855,6 +39036,17 @@ const WSDeclaration = _ref => {
38855
39036
  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
39037
  const [signatureFileStoreId, setSignatureFileStoreId] = useState(initialFsId);
38857
39038
  const [localFile, setLocalFile] = useState(null);
39039
+ const [signError, setSignError] = useState(null);
39040
+ const signSpecs = {
39041
+ maxSize: 50 * 1024,
39042
+ maxSizeText: "50KB",
39043
+ allowedExtensions: ["jpg", "jpeg"],
39044
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
39045
+ accept: "image/jpeg, .jpg, .jpeg",
39046
+ uiMessage: "Allowed format: JPEG | Max file size: 50KB",
39047
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Signature",
39048
+ sizeErrorMessage: "Signature size should not exceed 50KB"
39049
+ };
38858
39050
  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
39051
  fileStoreId: initialFsId,
38860
39052
  fileName: initialFileName
@@ -38936,49 +39128,61 @@ const WSDeclaration = _ref => {
38936
39128
  const onUploadSignature = function (e) {
38937
39129
  try {
38938
39130
  var _e$target$files;
39131
+ setSignError(null);
38939
39132
  const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
38940
- const _temp3 = function () {
39133
+ return Promise.resolve(function () {
38941
39134
  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
- }
39135
+ const ext = (file.name || "").split(".").pop().toLowerCase();
39136
+ const isExtAllowed = signSpecs.allowedExtensions.includes(ext);
39137
+ const isMimeAllowed = signSpecs.allowedMimeTypes.includes(file.type);
39138
+ if (!isExtAllowed && !isMimeAllowed) {
39139
+ setSignError(t("WS_SIGNATURE_ONLY_JPEG") || signSpecs.formatErrorMessage);
39140
+ if (e.target) e.target.value = "";
39141
+ return;
39142
+ }
39143
+ if (file.size > signSpecs.maxSize) {
39144
+ setSignError(t("WS_SIGNATURE_MAX_SIZE_EXCEEDED") || signSpecs.sizeErrorMessage);
39145
+ if (e.target) e.target.value = "";
39146
+ return;
39147
+ }
39148
+ setLocalFile(file);
39149
+ const _temp = _catch(function () {
39150
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
39151
+ var _response$data, _response$data$files;
39152
+ 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) {
39153
+ var _response$data2, _response$data2$files;
39154
+ 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;
39155
+ const sigObj = {
39156
+ fileStoreId: fsId,
39157
+ fileName: file.name
39158
+ };
39159
+ setSignatureFileStoreId(fsId);
39160
+ setSignatureFile(sigObj);
39161
+ setValue("signatureFileStoreId", fsId, {
39162
+ shouldDirty: true,
39163
+ shouldValidate: true
38970
39164
  });
38971
- }, function (err) {
38972
- console.error("Signature upload failed", err);
39165
+ setValue("signatureFile", sigObj, {
39166
+ shouldDirty: true,
39167
+ shouldValidate: true
39168
+ });
39169
+ setValue("signatureFileName", file.name, {
39170
+ shouldDirty: true,
39171
+ shouldValidate: true
39172
+ });
39173
+ } else {
39174
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
38973
39175
  setLocalFile(null);
38974
- });
38975
- if (_temp && _temp.then) return _temp.then(function () {});
38976
- }
38977
- }();
38978
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
39176
+ }
39177
+ });
39178
+ }, function (err) {
39179
+ console.error("Signature upload failed", err);
39180
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
39181
+ setLocalFile(null);
39182
+ });
39183
+ if (_temp && _temp.then) return _temp.then(function () {});
38979
39184
  }
38980
- }();
38981
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39185
+ }());
38982
39186
  } catch (e) {
38983
39187
  return Promise.reject(e);
38984
39188
  }
@@ -38988,9 +39192,9 @@ const WSDeclaration = _ref => {
38988
39192
  const [docFileType, setDocFileType] = useState("");
38989
39193
  const viewDocument = function () {
38990
39194
  try {
38991
- const _temp5 = function () {
39195
+ const _temp3 = function () {
38992
39196
  if (signatureFileStoreId) {
38993
- const _temp4 = _catch(function () {
39197
+ const _temp2 = _catch(function () {
38994
39198
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId())).then(function (res) {
38995
39199
  if (res !== null && res !== void 0 && res.data) {
38996
39200
  const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
@@ -39010,10 +39214,10 @@ const WSDeclaration = _ref => {
39010
39214
  }, function (err) {
39011
39215
  console.error("Failed to fetch file URL via FileFetchbyid", err);
39012
39216
  });
39013
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
39217
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
39014
39218
  }
39015
39219
  }();
39016
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
39220
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39017
39221
  } catch (e) {
39018
39222
  return Promise.reject(e);
39019
39223
  }
@@ -39060,11 +39264,22 @@ const WSDeclaration = _ref => {
39060
39264
  })
39061
39265
  })), /*#__PURE__*/React.createElement("div", {
39062
39266
  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", {
39267
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(CardLabel, {
39268
+ style: {
39269
+ margin: 0
39270
+ }
39271
+ }, t("WS_UPLOAD_SIGNATURE_FILE") || "Upload Signature", " ", /*#__PURE__*/React.createElement("span", {
39064
39272
  style: {
39065
39273
  color: "red"
39066
39274
  }
39067
39275
  }, "*")), /*#__PURE__*/React.createElement("div", {
39276
+ style: {
39277
+ fontSize: "12px",
39278
+ color: "#555",
39279
+ marginTop: "2px",
39280
+ marginBottom: "4px"
39281
+ }
39282
+ }, signSpecs.uiMessage)), /*#__PURE__*/React.createElement("div", {
39068
39283
  className: "field",
39069
39284
  style: {
39070
39285
  display: "flex",
@@ -39088,6 +39303,7 @@ const WSDeclaration = _ref => {
39088
39303
  setLocalFile(null);
39089
39304
  setSignatureFile(null);
39090
39305
  setSignatureFileStoreId(null);
39306
+ setSignError(null);
39091
39307
  setValue("signatureFile", null, {
39092
39308
  shouldDirty: true,
39093
39309
  shouldValidate: true
@@ -39107,14 +39323,15 @@ const WSDeclaration = _ref => {
39107
39323
  width: "100%"
39108
39324
  },
39109
39325
  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", {
39326
+ accept: signSpecs.accept,
39327
+ 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
39328
  fileStoreId: signatureFileStoreId
39113
39329
  }]] : undefined,
39114
39330
  removeTargetedFile: () => {
39115
39331
  setLocalFile(null);
39116
39332
  setSignatureFile(null);
39117
39333
  setSignatureFileStoreId(null);
39334
+ setSignError(null);
39118
39335
  setValue("signatureFile", null, {
39119
39336
  shouldDirty: true,
39120
39337
  shouldValidate: true
@@ -39133,7 +39350,13 @@ const WSDeclaration = _ref => {
39133
39350
  style: {
39134
39351
  cursor: "pointer"
39135
39352
  }
39136
- }, /*#__PURE__*/React.createElement(ViewsIcon, null))), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React.createElement(CardLabelError, {
39353
+ }, /*#__PURE__*/React.createElement(ViewsIcon, null))), signError && /*#__PURE__*/React.createElement("div", {
39354
+ style: {
39355
+ fontSize: "12px",
39356
+ color: "#d32f2f",
39357
+ marginTop: "4px"
39358
+ }
39359
+ }, signError), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React.createElement(CardLabelError, {
39137
39360
  style: {
39138
39361
  color: "red",
39139
39362
  fontSize: "12px",
@@ -54223,8 +54446,84 @@ const getMaskedPhone = phone => {
54223
54446
  if (!phone || phone.length < 10) return "NA";
54224
54447
  return `******${phone.slice(-4)}`;
54225
54448
  };
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}` : " "}`;
54449
+ const getAddress$1 = (address, t, property) => {
54450
+ var _property$address, _Digit$Utils, _Digit$Utils$pt, _addrObj$additionalDe, _addrObj$additionalDe2, _addrObj$additionalDe3, _addrObj$additionalDe4, _Digit$Utils2, _Digit$Utils2$pt;
54451
+ if (!address && !property) return "";
54452
+ const addrObj = typeof address === "object" && address !== null ? address : {};
54453
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
54454
+ 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) || {};
54455
+ const parts = [];
54456
+ 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) || "";
54457
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
54458
+ parts.push(String(houseNo).trim());
54459
+ }
54460
+ 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) || "";
54461
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
54462
+ parts.push(String(building).trim());
54463
+ }
54464
+ 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) || "";
54465
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
54466
+ parts.push(String(street).trim());
54467
+ }
54468
+ 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) || "";
54469
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
54470
+ parts.push(String(addressLine2).trim());
54471
+ }
54472
+ 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) || "";
54473
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
54474
+ parts.push(String(landmark).trim());
54475
+ }
54476
+ 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();
54477
+ 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);
54478
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
54479
+ let localityText = "";
54480
+ 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) {
54481
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
54482
+ localityText = t ? t(locLocale) : locLocale;
54483
+ }
54484
+ if (!localityText || localityText === localityCode) {
54485
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
54486
+ }
54487
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
54488
+ parts.push(String(localityText).trim());
54489
+ }
54490
+ 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) || "";
54491
+ 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 || "");
54492
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
54493
+ parts.push(assemblyText.trim());
54494
+ }
54495
+ 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) || "";
54496
+ 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 || "");
54497
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
54498
+ parts.push(zoneText.trim());
54499
+ }
54500
+ 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) || "";
54501
+ 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 || "");
54502
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
54503
+ parts.push(wardText.trim());
54504
+ }
54505
+ let cityText = "";
54506
+ 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) {
54507
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
54508
+ cityText = t ? t(cityLocale) : cityLocale;
54509
+ }
54510
+ if (!cityText || cityText === tenantId) {
54511
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
54512
+ }
54513
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
54514
+ parts.push(String(cityText).trim());
54515
+ }
54516
+ 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) || "";
54517
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
54518
+ parts.push(String(pincode).trim());
54519
+ }
54520
+ const uniqueParts = [];
54521
+ parts.forEach(p => {
54522
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
54523
+ uniqueParts.push(p);
54524
+ }
54525
+ });
54526
+ return uniqueParts.join(", ");
54228
54527
  };
54229
54528
  const WSInfoPage = () => {
54230
54529
  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 +54565,13 @@ const WSInfoPage = () => {
54266
54565
  }
54267
54566
  return () => clearTimeout(timer);
54268
54567
  }, [timeLeft]);
54568
+ useEffect(() => {
54569
+ if (!showToast) return;
54570
+ const timer = setTimeout(() => {
54571
+ setShowToast(null);
54572
+ }, (showToast === null || showToast === void 0 ? void 0 : showToast.duration) || 5000);
54573
+ return () => clearTimeout(timer);
54574
+ }, [showToast]);
54269
54575
  useEffect(() => {
54270
54576
  if (isFromPropertyCreate) {
54271
54577
  var _createdProperty$owne3, _createdProperty$owne4;
@@ -54333,9 +54639,10 @@ const WSInfoPage = () => {
54333
54639
  });
54334
54640
  const target = createdPropertyId && sorted.find(p => p.propertyId === createdPropertyId) || (!hasAutoSelected.current ? sorted[0] : null);
54335
54641
  if (target && (!selectedProperty || selectedProperty.propertyId !== target.propertyId)) {
54642
+ const fullAddr = getAddress$1(target.address, t, target);
54336
54643
  const formatted = {
54337
54644
  ...target,
54338
- displayName: `${target.propertyId} - ${getAddress$1(target.address, t)}`
54645
+ displayName: fullAddr ? `${target.propertyId} - ${fullAddr}` : target.propertyId
54339
54646
  };
54340
54647
  setSelectedProperty(formatted);
54341
54648
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", target.propertyId);
@@ -54406,7 +54713,8 @@ const WSInfoPage = () => {
54406
54713
  setTimeLeft(30);
54407
54714
  setShowToast({
54408
54715
  key: "success",
54409
- message: t("OTP sent successfully!")
54716
+ message: t("OTP sent successfully!"),
54717
+ duration: 5000
54410
54718
  });
54411
54719
  });
54412
54720
  }, function (err) {
@@ -54471,15 +54779,18 @@ const WSInfoPage = () => {
54471
54779
  setIsOtpVerifying(false);
54472
54780
  setShowToast({
54473
54781
  key: "success",
54474
- message: t("OTP verified successfully!")
54782
+ message: t("OTP verified successfully!"),
54783
+ duration: 5000
54475
54784
  });
54476
54785
  setShowOtpVerification(false);
54477
54786
  setIsMobileVerified(true);
54787
+ setTimeLeft(0);
54478
54788
  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
54789
  if (fallbackProp) {
54790
+ const fullAddr = getAddress$1(fallbackProp.address, t, fallbackProp);
54480
54791
  const formatted = {
54481
54792
  ...fallbackProp,
54482
- displayName: `${fallbackProp.propertyId} - ${getAddress$1(fallbackProp.address, t)}`
54793
+ displayName: fullAddr ? `${fallbackProp.propertyId} - ${fullAddr}` : fallbackProp.propertyId
54483
54794
  };
54484
54795
  setSelectedProperty(formatted);
54485
54796
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", fallbackProp.propertyId);
@@ -54540,12 +54851,20 @@ const WSInfoPage = () => {
54540
54851
  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
54852
  return timeB - timeA;
54542
54853
  });
54543
- const list = sortedList.map(prop => ({
54544
- ...prop,
54545
- displayName: getAddress$1(prop.address, t) || prop.propertyId
54546
- }));
54854
+ const list = sortedList.map(prop => {
54855
+ const fullAddr = getAddress$1(prop.address, t, prop);
54856
+ return {
54857
+ ...prop,
54858
+ displayName: fullAddr ? `${prop.propertyId} - ${fullAddr}` : prop.propertyId
54859
+ };
54860
+ });
54547
54861
  if (selectedProperty && !list.some(p => p.propertyId === selectedProperty.propertyId)) {
54548
- return [selectedProperty, ...list];
54862
+ const fullAddr = getAddress$1(selectedProperty.address, t, selectedProperty);
54863
+ const selProp = {
54864
+ ...selectedProperty,
54865
+ displayName: fullAddr ? `${selectedProperty.propertyId} - ${fullAddr}` : selectedProperty.propertyId
54866
+ };
54867
+ return [selProp, ...list];
54549
54868
  }
54550
54869
  return list;
54551
54870
  }, [propertyDetails, selectedProperty, t]);
@@ -55505,7 +55824,12 @@ const WSInfoPage = () => {
55505
55824
  id: "propertyId",
55506
55825
  selected: selectedProperty,
55507
55826
  select: val => {
55508
- setSelectedProperty(val);
55827
+ const fullAddr = getAddress$1(val === null || val === void 0 ? void 0 : val.address, t, val);
55828
+ const formattedVal = val ? {
55829
+ ...val,
55830
+ displayName: fullAddr ? `${val.propertyId} - ${fullAddr}` : val.propertyId
55831
+ } : null;
55832
+ setSelectedProperty(formattedVal);
55509
55833
  setShowOtpVerification(false);
55510
55834
  setOtp("");
55511
55835
  if (val !== null && val !== void 0 && val.propertyId) {
@@ -55732,7 +56056,8 @@ const WSInfoPage = () => {
55732
56056
  warning: showToast.key === "warning",
55733
56057
  label: t(showToast.message),
55734
56058
  onClose: () => setShowToast(null),
55735
- isDleteBtn: true
56059
+ isDleteBtn: true,
56060
+ duration: showToast.duration || 5000
55736
56061
  }));
55737
56062
  };
55738
56063
 
@@ -67513,12 +67838,8 @@ const CheckPage$4 = _ref2 => {
67513
67838
  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
67839
  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) || {};
67515
67840
  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, {
67841
+ className: "overflow-y-scroll"
67842
+ }, /*#__PURE__*/React.createElement(CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React.createElement(StatusTable, {
67522
67843
  style: {
67523
67844
  marginTop: "10px",
67524
67845
  marginBottom: "30px"
@@ -67599,7 +67920,10 @@ const CheckPage$4 = _ref2 => {
67599
67920
  }
67600
67921
  }, /*#__PURE__*/React.createElement(Row, {
67601
67922
  label: "Divyangjan/Person with Disability?",
67602
- text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
67923
+ text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
67924
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
67925
+ onClick: onEdit
67926
+ })
67603
67927
  })), /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React.createElement(StatusTable, {
67604
67928
  style: {
67605
67929
  marginTop: "10px",
@@ -67656,8 +67980,11 @@ const CheckPage$4 = _ref2 => {
67656
67980
  }
67657
67981
  }, /*#__PURE__*/React.createElement(Row, {
67658
67982
  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, {
67983
+ text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
67984
+ actionButton: /*#__PURE__*/React.createElement(ActionButton$1, {
67985
+ onClick: onEdit
67986
+ })
67987
+ })), /*#__PURE__*/React.createElement(CardSubHeader, null, t("PT_LOCATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
67661
67988
  style: {
67662
67989
  marginTop: "10px",
67663
67990
  marginBottom: "30px"
@@ -67824,7 +68151,7 @@ const CheckPage$4 = _ref2 => {
67824
68151
  },
67825
68152
  disabled: isSubmitDisabled
67826
68153
  }));
67827
- })()), showDocModal && /*#__PURE__*/React.createElement(Modal, {
68154
+ })(), showDocModal && /*#__PURE__*/React.createElement(Modal, {
67828
68155
  open: showDocModal,
67829
68156
  headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
67830
68157
  headerBarEnd: /*#__PURE__*/React.createElement("div", {
@@ -68109,6 +68436,22 @@ const OLDApplication = () => {
68109
68436
  setSubmitValve(true);
68110
68437
  }
68111
68438
  }, [propertyId, propertyDetails]);
68439
+ useEffect(() => {
68440
+ if (showCheckPage) {
68441
+ window.history.pushState({
68442
+ step: "check"
68443
+ }, "");
68444
+ const handlePopState = () => {
68445
+ setShowCheckPage(false);
68446
+ window.scrollTo({
68447
+ top: 0,
68448
+ behavior: "smooth"
68449
+ });
68450
+ };
68451
+ window.addEventListener("popstate", handlePopState);
68452
+ return () => window.removeEventListener("popstate", handlePopState);
68453
+ }
68454
+ }, [showCheckPage]);
68112
68455
  const {
68113
68456
  isLoading: creatingWaterApplicationLoading,
68114
68457
  mutate: waterMutation
@@ -68306,6 +68649,10 @@ const OLDApplication = () => {
68306
68649
  }
68307
68650
  }
68308
68651
  setShowCheckPage(true);
68652
+ window.scrollTo({
68653
+ top: 0,
68654
+ behavior: "smooth"
68655
+ });
68309
68656
  };
68310
68657
  const processSubmission = function (data) {
68311
68658
  try {
@@ -68650,7 +68997,12 @@ const OLDApplication = () => {
68650
68997
  }, /*#__PURE__*/React.createElement(VerticalTimeline, {
68651
68998
  config: timelineConfig,
68652
68999
  currentActiveIndex: timelineConfig.length - 1,
68653
- showFinalStep: false
69000
+ showFinalStep: false,
69001
+ onSelect: (route, idx) => {
69002
+ if (idx < timelineConfig.length - 1) {
69003
+ handleEdit();
69004
+ }
69005
+ }
68654
69006
  }), /*#__PURE__*/React.createElement(CheckPage$4, {
68655
69007
  data: formDataRef.current || sessionFormData,
68656
69008
  onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
@@ -68676,7 +69028,7 @@ const OLDApplication = () => {
68676
69028
  cardFormWrapperClassName: "new-application-card"
68677
69029
  }), showToast && /*#__PURE__*/React.createElement(Toast, {
68678
69030
  isDleteBtn: true,
68679
- duration: 5000,
69031
+ duration: 3000,
68680
69032
  error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
68681
69033
  warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning,
68682
69034
  label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),