@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.
package/dist/index.js CHANGED
@@ -399,13 +399,88 @@ const getQueryStringParams = query => {
399
399
  return params;
400
400
  }, {}) : {};
401
401
  };
402
- const getAddress = (address, t) => {
403
- var _address$locality, _address$locality2, _address$city;
404
- 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}` : " "}`;
402
+ const getAddress = (address, t, property) => {
403
+ 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;
404
+ if (!address && !property) return "";
405
+ const addrObj = typeof address === "object" && address !== null ? address : {};
406
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
407
+ 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) || {};
408
+ const parts = [];
409
+ 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) || "";
410
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
411
+ parts.push(String(houseNo).trim());
412
+ }
413
+ 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) || "";
414
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
415
+ parts.push(String(building).trim());
416
+ }
417
+ 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) || "";
418
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
419
+ parts.push(String(street).trim());
420
+ }
421
+ 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) || "";
422
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
423
+ parts.push(String(addressLine2).trim());
424
+ }
425
+ 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) || "";
426
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
427
+ parts.push(String(landmark).trim());
428
+ }
429
+ 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));
430
+ 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);
431
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
432
+ let localityText = "";
433
+ 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) {
434
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
435
+ localityText = t ? t(locLocale) : locLocale;
436
+ }
437
+ if (!localityText || localityText === localityCode) {
438
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
439
+ }
440
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
441
+ parts.push(String(localityText).trim());
442
+ }
443
+ 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) || "";
444
+ 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 || "");
445
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
446
+ parts.push(assemblyText.trim());
447
+ }
448
+ 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) || "";
449
+ 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 || "");
450
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
451
+ parts.push(zoneText.trim());
452
+ }
453
+ 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) || "";
454
+ 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 || "");
455
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
456
+ parts.push(wardText.trim());
457
+ }
458
+ let cityText = "";
459
+ 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) {
460
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
461
+ cityText = t ? t(cityLocale) : cityLocale;
462
+ }
463
+ if (!cityText || cityText === tenantId) {
464
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
465
+ }
466
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
467
+ parts.push(String(cityText).trim());
468
+ }
469
+ 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) || "";
470
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
471
+ parts.push(String(pincode).trim());
472
+ }
473
+ const uniqueParts = [];
474
+ parts.forEach(p => {
475
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
476
+ uniqueParts.push(p);
477
+ }
478
+ });
479
+ return uniqueParts.join(", ");
405
480
  };
406
481
  const formatPropertyAddress = (address, t) => {
407
- var _Digit2, _Digit2$Utils, _Digit2$Utils$pt;
408
- 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) {
482
+ var _Digit5, _Digit5$Utils, _Digit5$Utils$pt;
483
+ 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) {
409
484
  return Digit.Utils.pt.formatPropertyAddress(address, t) || getAddress(address, t);
410
485
  }
411
486
  return getAddress(address, t);
@@ -607,7 +682,7 @@ const getNormalizedBankDetails = data => {
607
682
  };
608
683
  const createPayloadOfWS = function (data) {
609
684
  try {
610
- 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;
685
+ 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;
611
686
  const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
612
687
  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"));
613
688
  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 => {
@@ -855,7 +930,7 @@ const createPayloadOfWS = function (data) {
855
930
  delete payload.additionalDetails.proposedWaterClosets;
856
931
  sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(allDocuments));
857
932
  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) || {}));
858
- 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;
933
+ 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;
859
934
  return Promise.resolve(payload);
860
935
  } catch (e) {
861
936
  return Promise.reject(e);
@@ -863,7 +938,7 @@ const createPayloadOfWS = function (data) {
863
938
  };
864
939
  const updatePayloadOfWS = function (data, type) {
865
940
  try {
866
- var _data$additionalDetai7, _data$additionalDetai8, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
941
+ var _data$additionalDetai7, _data$additionalDetai8, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
867
942
  const {
868
943
  signatureFileStoreId,
869
944
  signatureFileName
@@ -912,7 +987,7 @@ const updatePayloadOfWS = function (data, type) {
912
987
  }
913
988
  }
914
989
  };
915
- 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;
990
+ 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;
916
991
  return Promise.resolve(payload);
917
992
  } catch (e) {
918
993
  return Promise.reject(e);
@@ -1022,7 +1097,7 @@ const getAllDocumentsForUpdate = data => {
1022
1097
  return allDocuments;
1023
1098
  };
1024
1099
  const convertToWSUpdate = data => {
1025
- 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;
1100
+ 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;
1026
1101
  const {
1027
1102
  signatureFileStoreId,
1028
1103
  signatureFileName
@@ -1075,11 +1150,11 @@ const convertToWSUpdate = data => {
1075
1150
  }
1076
1151
  }
1077
1152
  };
1078
- 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;
1153
+ 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;
1079
1154
  return formdata;
1080
1155
  };
1081
1156
  const convertToEditWSUpdate = data => {
1082
- 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;
1157
+ 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;
1083
1158
  const {
1084
1159
  signatureFileStoreId,
1085
1160
  signatureFileName
@@ -1248,11 +1323,11 @@ const convertToEditWSUpdate = data => {
1248
1323
  assignes: []
1249
1324
  }
1250
1325
  };
1251
- 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;
1326
+ 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;
1252
1327
  return formdata;
1253
1328
  };
1254
1329
  const convertToEditSWUpdate = data => {
1255
- 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;
1330
+ 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;
1256
1331
  const {
1257
1332
  signatureFileStoreId,
1258
1333
  signatureFileName
@@ -1420,11 +1495,11 @@ const convertToEditSWUpdate = data => {
1420
1495
  assignes: []
1421
1496
  }
1422
1497
  };
1423
- 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;
1498
+ 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;
1424
1499
  return formdata;
1425
1500
  };
1426
1501
  const convertToSWUpdate = data => {
1427
- 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;
1502
+ 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;
1428
1503
  const {
1429
1504
  signatureFileStoreId,
1430
1505
  signatureFileName
@@ -1478,12 +1553,12 @@ const convertToSWUpdate = data => {
1478
1553
  }
1479
1554
  }
1480
1555
  };
1481
- 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;
1556
+ 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;
1482
1557
  return formdata;
1483
1558
  };
1484
1559
  const createPayloadOfWSDisconnection = function (data, storeData, service) {
1485
1560
  try {
1486
- 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;
1561
+ 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;
1487
1562
  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;
1488
1563
  let plumberInfo = [];
1489
1564
  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) {
@@ -1584,7 +1659,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
1584
1659
  disconnectRequest: true
1585
1660
  };
1586
1661
  let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
1587
- 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;
1662
+ 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;
1588
1663
  return Promise.resolve(returnObject);
1589
1664
  } catch (e) {
1590
1665
  return Promise.reject(e);
@@ -1702,7 +1777,7 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1702
1777
  };
1703
1778
  const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
1704
1779
  try {
1705
- 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;
1780
+ 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;
1706
1781
  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;
1707
1782
  let wsPayload = {
1708
1783
  WaterConnection: {
@@ -1754,7 +1829,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1754
1829
  disconnectRequest: true
1755
1830
  };
1756
1831
  let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
1757
- 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;
1832
+ 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;
1758
1833
  return Promise.resolve(returnObject);
1759
1834
  } catch (e) {
1760
1835
  return Promise.reject(e);
@@ -1762,7 +1837,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1762
1837
  };
1763
1838
  const updatePayloadOfWSDisconnection = function (data, type) {
1764
1839
  try {
1765
- var _data$plumberInfo, _data$plumberInfo2, _Digit17, _Digit17$Customizatio, _Digit17$Customizatio2, _Digit18, _Digit18$Customizatio, _Digit18$Customizatio2;
1840
+ var _data$plumberInfo, _data$plumberInfo2, _Digit20, _Digit20$Customizatio, _Digit20$Customizatio2, _Digit21, _Digit21$Customizatio, _Digit21$Customizatio2;
1766
1841
  let payload = {
1767
1842
  ...data,
1768
1843
  plumberInfo: data !== null && data !== void 0 && (_data$plumberInfo = data.plumberInfo) !== null && _data$plumberInfo !== void 0 && _data$plumberInfo[0] ? [{
@@ -1776,7 +1851,7 @@ const updatePayloadOfWSDisconnection = function (data, type) {
1776
1851
  action: "SUBMIT_APPLICATION"
1777
1852
  }
1778
1853
  };
1779
- 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;
1854
+ 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;
1780
1855
  return Promise.resolve(payload);
1781
1856
  } catch (e) {
1782
1857
  return Promise.reject(e);
@@ -31393,21 +31468,23 @@ const UploadFileDigiLocker = props => {
31393
31468
  const handleFileUpload = e => {
31394
31469
  const file = e.target.files[0];
31395
31470
  if (file) {
31396
- if (file.size > 5242880) {
31471
+ const maxSize = props.maxSize || 5242880;
31472
+ const maxSizeText = props.maxSizeText || "5MB";
31473
+ if (file.size > maxSize) {
31397
31474
  setShowToast({
31398
31475
  error: true,
31399
- label: "File size should not exceed 5MB."
31476
+ label: props.sizeErrorMessage || `File size should not exceed ${maxSizeText}.`
31400
31477
  });
31401
31478
  inpRef.current.value = "";
31402
31479
  return;
31403
31480
  }
31404
- const allowedTypes = ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31481
+ const allowedTypes = props.allowedTypes || ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
31405
31482
  const fileExtension = file.name.split('.').pop().toLowerCase();
31406
- const allowedExtensions = ["pdf", "jpeg", "png", "jpg"];
31483
+ const allowedExtensions = props.allowedExtensions || ["pdf", "jpeg", "png", "jpg"];
31407
31484
  if (!allowedTypes.includes(file.type) && !allowedExtensions.includes(fileExtension)) {
31408
31485
  setShowToast({
31409
31486
  error: true,
31410
- label: "Invalid file format. Only PDF, JPG, and PNG are allowed."
31487
+ label: props.formatErrorMessage || `Invalid file format. Only ${props.allowedFormatsText || "PDF, JPG, and PNG"} are allowed.`
31411
31488
  });
31412
31489
  inpRef.current.value = "";
31413
31490
  return;
@@ -31568,6 +31645,49 @@ const removeDuplicateOtherDocuments = function (documentList) {
31568
31645
  return true;
31569
31646
  });
31570
31647
  };
31648
+ const getDocUploadSpecs = (doc, isApplicantPhoto) => {
31649
+ const code = ((doc === null || doc === void 0 ? void 0 : doc.code) || "").toUpperCase();
31650
+ if (isApplicantPhoto || code === "OWNER.APPLICANTPHOTO" || code.includes("PHOTO")) {
31651
+ return {
31652
+ type: "PHOTO",
31653
+ maxSize: 200 * 1024,
31654
+ maxSizeText: "200KB",
31655
+ allowedExtensions: ["jpg", "jpeg"],
31656
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
31657
+ allowedFormatsText: "JPEG",
31658
+ accept: "image/jpeg, .jpg, .jpeg",
31659
+ uiMessage: "Allowed format: JPEG | Max file size: 200KB",
31660
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Applicant Photo",
31661
+ sizeErrorMessage: "Applicant Photo size should not exceed 200KB"
31662
+ };
31663
+ }
31664
+ if (code === "OWNER.OWNERSHIPPROOF" || code.includes("OWNERSHIP")) {
31665
+ return {
31666
+ type: "OWNERSHIP",
31667
+ maxSize: 5 * 1024 * 1024,
31668
+ maxSizeText: "5MB",
31669
+ allowedExtensions: ["pdf"],
31670
+ allowedMimeTypes: ["application/pdf"],
31671
+ allowedFormatsText: "PDF",
31672
+ accept: ".pdf, application/pdf",
31673
+ uiMessage: "Allowed format: PDF | Max file size: 5MB",
31674
+ formatErrorMessage: "Only PDF format (.pdf) is allowed for Ownership Documents",
31675
+ sizeErrorMessage: "Ownership Document size should not exceed 5MB"
31676
+ };
31677
+ }
31678
+ return {
31679
+ type: "ID_OR_OTHER",
31680
+ maxSize: 1024 * 1024,
31681
+ maxSizeText: "1MB",
31682
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
31683
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
31684
+ allowedFormatsText: "PDF, JPEG",
31685
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
31686
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
31687
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for this document",
31688
+ sizeErrorMessage: "File size should not exceed 1MB"
31689
+ };
31690
+ };
31571
31691
  const WSDocumentsEmployee = _ref => {
31572
31692
  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;
31573
31693
  let {
@@ -31869,7 +31989,7 @@ const WSDocumentsEmployee = _ref => {
31869
31989
  color: "#d32f2f",
31870
31990
  fontWeight: "600"
31871
31991
  }
31872
- }, "\u26A0\uFE0F ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
31992
+ }, "\u26A0\uFE0F", " ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
31873
31993
  const nocDownloadSection = isTenant ? /*#__PURE__*/React__default.createElement("div", {
31874
31994
  style: {
31875
31995
  marginBottom: "20px",
@@ -31903,24 +32023,6 @@ const WSDocumentsEmployee = _ref => {
31903
32023
  whiteSpace: "nowrap"
31904
32024
  }
31905
32025
  }, t("WS_DOWNLOAD_DOCUMENT"))) : null;
31906
- const uploadInfoBanner = /*#__PURE__*/React__default.createElement("div", {
31907
- style: {
31908
- display: "flex",
31909
- alignItems: "center",
31910
- gap: "10px",
31911
- marginBottom: "16px",
31912
- padding: "10px 14px",
31913
- backgroundColor: "#e8f4fd",
31914
- borderLeft: "4px solid #00497e",
31915
- borderRadius: "4px"
31916
- }
31917
- }, /*#__PURE__*/React__default.createElement("span", {
31918
- style: {
31919
- fontSize: "14px",
31920
- color: "#00497e",
31921
- fontWeight: "600"
31922
- }
31923
- }, "\u2139\uFE0F ", t("WS_DOCUMENT_UPLOAD_INSTRUCTION") || "Maximum upload size: 5MB per document. Supported formats: PDF, JPG, PNG."));
31924
32026
  if (userType === "citizen") {
31925
32027
  return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Timeline, {
31926
32028
  currentStep: 3
@@ -31930,19 +32032,23 @@ const WSDocumentsEmployee = _ref => {
31930
32032
  onSelect: goNext,
31931
32033
  onSkip: () => onSelect(),
31932
32034
  isDisabled: enableSubmit
31933
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
32035
+ }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
31934
32036
  label: error,
31935
32037
  onClose: () => setError(null),
31936
- error: true
32038
+ error: true,
32039
+ isDleteBtn: true,
32040
+ duration: 3000
31937
32041
  })));
31938
32042
  }
31939
32043
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
31940
32044
  title: t("WS_DOCUMENTS"),
31941
32045
  defaultOpen: true
31942
- }, uploadInfoBanner, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
32046
+ }, rwhAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
31943
32047
  label: error,
31944
32048
  onClose: () => setError(null),
31945
- error: true
32049
+ error: true,
32050
+ isDleteBtn: true,
32051
+ duration: 3000
31946
32052
  }));
31947
32053
  };
31948
32054
  function EmployeeIdDocumentUpload(_ref2) {
@@ -31964,6 +32070,16 @@ function EmployeeIdDocumentUpload(_ref2) {
31964
32070
  const [uploadedFile, setUploadedFile] = React.useState(initialFileId || null);
31965
32071
  const [fileName, setFileName] = React.useState((existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileName) || "");
31966
32072
  const [errorUpload, setErrorUpload] = React.useState(null);
32073
+ const specs = {
32074
+ maxSize: 1024 * 1024,
32075
+ maxSizeText: "1MB",
32076
+ allowedExtensions: ["pdf", "jpg", "jpeg"],
32077
+ allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
32078
+ accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
32079
+ uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
32080
+ formatErrorMessage: "Only PDF and JPEG formats are allowed for Employee ID Document",
32081
+ sizeErrorMessage: "Employee ID Document size should not exceed 1MB"
32082
+ };
31967
32083
  React.useEffect(() => {
31968
32084
  var _formData$djbEmployee7, _formData$djbEmployee8, _formData$djbEmployee9, _formData$djbEmployee0;
31969
32085
  const doc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
@@ -31980,60 +32096,64 @@ function EmployeeIdDocumentUpload(_ref2) {
31980
32096
  (function () {
31981
32097
  try {
31982
32098
  setErrorUpload(null);
31983
- const _temp3 = function () {
32099
+ return function () {
31984
32100
  if (file) {
31985
- const _temp2 = function () {
31986
- if (file.size > 5242880) {
31987
- setErrorUpload(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
31988
- setFile(null);
31989
- } else {
31990
- const _temp = _catch(function () {
31991
- setUploadedFile(null);
31992
- const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
31993
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
31994
- var _response$data, _response$data$files;
31995
- 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) {
31996
- var _response$data2, _response$data2$files;
31997
- 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;
31998
- const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
31999
- setUploadedFile(fileId);
32000
- setFileName(nameOfFile);
32001
- setDocuments(prevDocs => {
32002
- var _formData$djbEmployee10;
32003
- const filtered = (prevDocs || []).filter(d => {
32004
- var _d$documentType7;
32005
- 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"));
32006
- });
32007
- return [...filtered, {
32008
- documentType: "OWNER.DJB_EMPLOYEE_ID",
32009
- fileStoreId: fileId,
32010
- fileName: nameOfFile,
32011
- documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32012
- documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
32013
- i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32014
- status: "ACTIVE"
32015
- }];
32016
- });
32017
- if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
32018
- formSetValue("djbEmployee", {
32019
- ...formData.djbEmployee,
32020
- document: fileId
32021
- });
32022
- }
32023
- } else {
32024
- setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32025
- }
32101
+ const ext = (file.name || "").split(".").pop().toLowerCase();
32102
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32103
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
32104
+ if (!isExtAllowed && !isMimeAllowed) {
32105
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32106
+ setFile(null);
32107
+ return;
32108
+ }
32109
+ if (file.size > specs.maxSize) {
32110
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32111
+ setFile(null);
32112
+ return;
32113
+ }
32114
+ const _temp = _catch(function () {
32115
+ setUploadedFile(null);
32116
+ const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
32117
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
32118
+ var _response$data, _response$data$files;
32119
+ 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) {
32120
+ var _response$data2, _response$data2$files;
32121
+ 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;
32122
+ const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
32123
+ setUploadedFile(fileId);
32124
+ setFileName(nameOfFile);
32125
+ setDocuments(prevDocs => {
32126
+ var _formData$djbEmployee10;
32127
+ const filtered = (prevDocs || []).filter(d => {
32128
+ var _d$documentType7;
32129
+ 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"));
32130
+ });
32131
+ return [...filtered, {
32132
+ documentType: "OWNER.DJB_EMPLOYEE_ID",
32133
+ fileStoreId: fileId,
32134
+ fileName: nameOfFile,
32135
+ documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32136
+ documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
32137
+ i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
32138
+ status: "ACTIVE"
32139
+ }];
32026
32140
  });
32027
- }, function () {
32141
+ if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
32142
+ formSetValue("djbEmployee", {
32143
+ ...formData.djbEmployee,
32144
+ document: fileId
32145
+ });
32146
+ }
32147
+ } else {
32028
32148
  setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32029
- });
32030
- if (_temp && _temp.then) return _temp.then(function () {});
32031
- }
32032
- }();
32033
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
32149
+ }
32150
+ });
32151
+ }, function () {
32152
+ setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
32153
+ });
32154
+ if (_temp && _temp.then) return _temp.then(function () {});
32034
32155
  }
32035
32156
  }();
32036
- return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
32037
32157
  } catch (e) {
32038
32158
  Promise.reject(e);
32039
32159
  }
@@ -32042,9 +32162,18 @@ function EmployeeIdDocumentUpload(_ref2) {
32042
32162
  function selectfile(e) {
32043
32163
  var _e$target, _e$target$files;
32044
32164
  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];
32165
+ setErrorUpload(null);
32045
32166
  if (selected) {
32046
- if (selected.size > 5242880) {
32047
- setErrorUpload(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32167
+ const ext = (selected.name || "").split(".").pop().toLowerCase();
32168
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32169
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selected.type);
32170
+ if (!isExtAllowed && !isMimeAllowed) {
32171
+ setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
32172
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32173
+ return;
32174
+ }
32175
+ if (selected.size > specs.maxSize) {
32176
+ setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
32048
32177
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32049
32178
  return;
32050
32179
  }
@@ -32127,11 +32256,11 @@ function EmployeeIdDocumentUpload(_ref2) {
32127
32256
  }, "*"))), /*#__PURE__*/React__default.createElement("div", {
32128
32257
  style: {
32129
32258
  fontSize: "12px",
32130
- color: "#666",
32259
+ color: "#555",
32131
32260
  marginTop: "-2px",
32132
32261
  marginBottom: "4px"
32133
32262
  }
32134
- }, t("WS_DOCUMENT_MAX_SIZE_MESSAGE") || "Allowed formats: PDF, JPG, PNG | Max file size: 5MB"), /*#__PURE__*/React__default.createElement("div", {
32263
+ }, specs.uiMessage), /*#__PURE__*/React__default.createElement("div", {
32135
32264
  className: "field",
32136
32265
  style: {
32137
32266
  display: "flex",
@@ -32147,7 +32276,7 @@ function EmployeeIdDocumentUpload(_ref2) {
32147
32276
  id: "employee-doc-upload",
32148
32277
  extraStyleName: "propertyCreate",
32149
32278
  placeholder: t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"),
32150
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
32279
+ accept: specs.accept,
32151
32280
  onUpload: selectfile,
32152
32281
  onDelete: handleDelete,
32153
32282
  message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
@@ -32155,7 +32284,13 @@ function EmployeeIdDocumentUpload(_ref2) {
32155
32284
  uploadedFiles: uploadedFile && !file ? [[fileName || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"), {
32156
32285
  fileStoreId: uploadedFile
32157
32286
  }]] : undefined
32158
- }))), uploadedFile && /*#__PURE__*/React__default.createElement("div", {
32287
+ }))), errorUpload && /*#__PURE__*/React__default.createElement("div", {
32288
+ style: {
32289
+ fontSize: "12px",
32290
+ color: "#d32f2f",
32291
+ marginTop: "4px"
32292
+ }
32293
+ }, errorUpload), uploadedFile && /*#__PURE__*/React__default.createElement("div", {
32159
32294
  style: {
32160
32295
  display: "flex",
32161
32296
  alignItems: "center",
@@ -32225,6 +32360,8 @@ function SelectDocument$2(_ref3) {
32225
32360
  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);
32226
32361
  })[0];
32227
32362
  const isApplicantPhoto = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO";
32363
+ const specs = getDocUploadSpecs(doc, isApplicantPhoto);
32364
+ const [fileError, setFileError] = React.useState(null);
32228
32365
  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"));
32229
32366
  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"));
32230
32367
  const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
@@ -32316,6 +32453,14 @@ function SelectDocument$2(_ref3) {
32316
32453
  setDigilockerUpload(eligible);
32317
32454
  }, [selectedDocument]);
32318
32455
  const handleCapture = capturedFile => {
32456
+ setFileError(null);
32457
+ if (capturedFile.size > specs.maxSize) {
32458
+ const msg = t("WS_PHOTO_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage;
32459
+ setError(msg);
32460
+ setFileError(msg);
32461
+ setShowCamera(false);
32462
+ return;
32463
+ }
32319
32464
  setFile(capturedFile);
32320
32465
  setIsCameraFile(true);
32321
32466
  setShowCamera(false);
@@ -32323,6 +32468,7 @@ function SelectDocument$2(_ref3) {
32323
32468
  const handleSelectDocument = value => setSelectedDocument(value);
32324
32469
  const removeUploadedDocument = fileStoreId => {
32325
32470
  setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
32471
+ setFileError(null);
32326
32472
  if (fileStoreId === uploadedFile) {
32327
32473
  setUploadedFile(null);
32328
32474
  setFile(null);
@@ -32337,9 +32483,9 @@ function SelectDocument$2(_ref3) {
32337
32483
  fileStoreId = uploadedFile;
32338
32484
  }
32339
32485
  try {
32340
- const _temp5 = function () {
32486
+ const _temp3 = function () {
32341
32487
  if (fileStoreId) {
32342
- const _temp4 = _catch(function () {
32488
+ const _temp2 = _catch(function () {
32343
32489
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
32344
32490
  if (res !== null && res !== void 0 && res.data) {
32345
32491
  var _res$headers, _res$headers2;
@@ -32358,10 +32504,10 @@ function SelectDocument$2(_ref3) {
32358
32504
  }, function (err) {
32359
32505
  console.error("Failed to fetch file URL via FileFetchbyid", err);
32360
32506
  });
32361
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
32507
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
32362
32508
  }
32363
32509
  }();
32364
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
32510
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
32365
32511
  } catch (e) {
32366
32512
  return Promise.reject(e);
32367
32513
  }
@@ -32391,9 +32537,22 @@ function SelectDocument$2(_ref3) {
32391
32537
  function selectfile(e, newFile) {
32392
32538
  var _e$target2, _e$target2$files;
32393
32539
  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]);
32540
+ setFileError(null);
32394
32541
  if (selectedFile) {
32395
- if (selectedFile.size > 5242880) {
32396
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32542
+ const ext = (selectedFile.name || "").split(".").pop().toLowerCase();
32543
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32544
+ const isMimeAllowed = specs.allowedMimeTypes.includes(selectedFile.type);
32545
+ if (!isExtAllowed && !isMimeAllowed) {
32546
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
32547
+ setError(msg);
32548
+ setFileError(msg);
32549
+ if (e !== null && e !== void 0 && e.target) e.target.value = "";
32550
+ return;
32551
+ }
32552
+ if (selectedFile.size > specs.maxSize) {
32553
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
32554
+ setError(msg);
32555
+ setFileError(msg);
32397
32556
  if (e !== null && e !== void 0 && e.target) e.target.value = "";
32398
32557
  return;
32399
32558
  }
@@ -32585,61 +32744,65 @@ function SelectDocument$2(_ref3) {
32585
32744
  (function () {
32586
32745
  try {
32587
32746
  setError(null);
32588
- const _temp0 = function () {
32747
+ return function () {
32589
32748
  if (file) {
32749
+ setFileError(null);
32590
32750
  const isDuplicateDocument = isOther && documents.some(item => (item === null || item === void 0 ? void 0 : item.documentType) === (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
32591
- const _temp9 = function () {
32592
- if (isDuplicateDocument) {
32593
- const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
32594
- const translatedDocumentName = t(documentNameKey);
32595
- const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
32596
- setError(`Document "${documentName}" has already been uploaded.`);
32597
- setFile(null);
32598
- } else {
32599
- const _temp8 = function () {
32600
- if (file.size > 5242880) {
32601
- setError(t("CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED") || "File size should not exceed 5MB");
32602
- setFile(null);
32751
+ if (isDuplicateDocument) {
32752
+ const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
32753
+ const translatedDocumentName = t(documentNameKey);
32754
+ const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
32755
+ const msg = `Document "${documentName}" has already been uploaded.`;
32756
+ setError(msg);
32757
+ setFileError(msg);
32758
+ setFile(null);
32759
+ return;
32760
+ }
32761
+ const ext = (file.name || "").split(".").pop().toLowerCase();
32762
+ const isExtAllowed = specs.allowedExtensions.includes(ext);
32763
+ const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
32764
+ if (!isExtAllowed && !isMimeAllowed) {
32765
+ const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
32766
+ setError(msg);
32767
+ setFileError(msg);
32768
+ setFile(null);
32769
+ return;
32770
+ }
32771
+ if (file.size > specs.maxSize) {
32772
+ const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
32773
+ setError(msg);
32774
+ setFileError(msg);
32775
+ setFile(null);
32776
+ return;
32777
+ }
32778
+ const _temp4 = _finallyRethrows(function () {
32779
+ return _catch(function () {
32780
+ setUploadedFile(null);
32781
+ setIsUploading(true);
32782
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
32783
+ var _response$data4, _response$data4$files;
32784
+ 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) {
32785
+ var _response$data5, _response$data5$files;
32786
+ 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);
32603
32787
  } else {
32604
- const _temp7 = function () {
32605
- 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)) {
32606
- setError(t("WS_ONLY_JPG_PNG_ALLOWED") || "Only JPG and PNG files are allowed for Applicant Photo");
32607
- setFile(null);
32608
- } else {
32609
- const _temp6 = _finallyRethrows(function () {
32610
- return _catch(function () {
32611
- setUploadedFile(null);
32612
- setIsUploading(true);
32613
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
32614
- var _response$data4, _response$data4$files;
32615
- 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) {
32616
- var _response$data5, _response$data5$files;
32617
- 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);
32618
- } else {
32619
- setError(t("CS_FILE_UPLOAD_ERROR"));
32620
- }
32621
- });
32622
- }, function () {
32623
- setError(t("CS_FILE_UPLOAD_ERROR"));
32624
- });
32625
- }, function (_wasThrown, _result2) {
32626
- setIsUploading(false);
32627
- if (_wasThrown) throw _result2;
32628
- return _result2;
32629
- });
32630
- if (_temp6 && _temp6.then) return _temp6.then(function () {});
32631
- }
32632
- }();
32633
- if (_temp7 && _temp7.then) return _temp7.then(function () {});
32788
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
32789
+ setError(msg);
32790
+ setFileError(msg);
32634
32791
  }
32635
- }();
32636
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
32637
- }
32638
- }();
32639
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
32792
+ });
32793
+ }, function () {
32794
+ const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
32795
+ setError(msg);
32796
+ setFileError(msg);
32797
+ });
32798
+ }, function (_wasThrown, _result3) {
32799
+ setIsUploading(false);
32800
+ if (_wasThrown) throw _result3;
32801
+ return _result3;
32802
+ });
32803
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
32640
32804
  }
32641
32805
  }();
32642
- return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
32643
32806
  } catch (e) {
32644
32807
  Promise.reject(e);
32645
32808
  }
@@ -32796,11 +32959,11 @@ function SelectDocument$2(_ref3) {
32796
32959
  }, "*"))), /*#__PURE__*/React__default.createElement("div", {
32797
32960
  style: {
32798
32961
  fontSize: "12px",
32799
- color: "#666",
32962
+ color: "#555",
32800
32963
  marginTop: "-2px",
32801
32964
  marginBottom: "4px"
32802
32965
  }
32803
- }, (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__default.createElement("div", {
32966
+ }, specs.uiMessage), /*#__PURE__*/React__default.createElement("div", {
32804
32967
  className: "field",
32805
32968
  style: {
32806
32969
  display: "flex",
@@ -32817,6 +32980,7 @@ function SelectDocument$2(_ref3) {
32817
32980
  onDelete: () => {
32818
32981
  setUploadedFile(null);
32819
32982
  setFile(null);
32983
+ setFileError(null);
32820
32984
  setIsCameraFile(false);
32821
32985
  setIsDocumentUidLocked(false);
32822
32986
  setDocumentUid("");
@@ -32831,11 +32995,19 @@ function SelectDocument$2(_ref3) {
32831
32995
  },
32832
32996
  buttonType: "button",
32833
32997
  error: effectiveRequired && !uploadedFile,
32834
- accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
32998
+ accept: specs.accept,
32999
+ maxSize: specs.maxSize,
33000
+ maxSizeText: specs.maxSizeText,
33001
+ allowedExtensions: specs.allowedExtensions,
33002
+ allowedTypes: specs.allowedMimeTypes,
33003
+ allowedFormatsText: specs.allowedFormatsText,
33004
+ sizeErrorMessage: specs.sizeErrorMessage,
33005
+ formatErrorMessage: specs.formatErrorMessage,
32835
33006
  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"), {
32836
33007
  fileStoreId: uploadedFile
32837
33008
  }]] : undefined,
32838
33009
  removeTargetedFile: () => {
33010
+ setFileError(null);
32839
33011
  if (isOther && uploadedFile) {
32840
33012
  removeUploadedDocument(uploadedFile);
32841
33013
  } else {
@@ -32859,6 +33031,7 @@ function SelectDocument$2(_ref3) {
32859
33031
  onDelete: () => {
32860
33032
  setUploadedFile(null);
32861
33033
  setFile(null);
33034
+ setFileError(null);
32862
33035
  setIsCameraFile(false);
32863
33036
  setIsDocumentUidLocked(false);
32864
33037
  setDocumentUid("");
@@ -32873,11 +33046,12 @@ function SelectDocument$2(_ref3) {
32873
33046
  },
32874
33047
  buttonType: "button",
32875
33048
  error: effectiveRequired && !uploadedFile,
32876
- accept: (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO" ? "image/jpeg, image/png, .jpg, .jpeg, .png" : "image/*, .pdf, .png, .jpeg, .jpg",
33049
+ accept: specs.accept,
32877
33050
  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"), {
32878
33051
  fileStoreId: uploadedFile
32879
33052
  }]] : undefined,
32880
33053
  removeTargetedFile: () => {
33054
+ setFileError(null);
32881
33055
  if (isOther && uploadedFile) {
32882
33056
  removeUploadedDocument(uploadedFile);
32883
33057
  } else {
@@ -32909,6 +33083,7 @@ function SelectDocument$2(_ref3) {
32909
33083
  pendingId.current = Date.now();
32910
33084
  setUploadedFile(null);
32911
33085
  setFile(null);
33086
+ setFileError(null);
32912
33087
  setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
32913
33088
  setDocumentUid("");
32914
33089
  setDocNumberError(null);
@@ -32924,7 +33099,13 @@ function SelectDocument$2(_ref3) {
32924
33099
  fontWeight: "bold",
32925
33100
  marginTop: "2px"
32926
33101
  }
32927
- }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), (isOther ? otherUploadedDocuments : uploadedFile ? [{
33102
+ }, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), fileError && /*#__PURE__*/React__default.createElement("div", {
33103
+ style: {
33104
+ fontSize: "12px",
33105
+ color: "#d32f2f",
33106
+ marginTop: "4px"
33107
+ }
33108
+ }, fileError), (isOther ? otherUploadedDocuments : uploadedFile ? [{
32928
33109
  fileStoreId: uploadedFile,
32929
33110
  fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
32930
33111
  documentNumber: documentUid
@@ -33091,7 +33272,7 @@ const CameraCaptureModal = _ref4 => {
33091
33272
  React.useEffect(() => {
33092
33273
  const startCamera = function () {
33093
33274
  try {
33094
- const _temp1 = _catch(function () {
33275
+ const _temp5 = _catch(function () {
33095
33276
  return Promise.resolve(navigator.mediaDevices.getUserMedia({
33096
33277
  video: true
33097
33278
  })).then(function (mediaStream) {
@@ -33104,7 +33285,7 @@ const CameraCaptureModal = _ref4 => {
33104
33285
  setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
33105
33286
  console.error("Error accessing camera: ", err);
33106
33287
  });
33107
- return Promise.resolve(_temp1 && _temp1.then ? _temp1.then(function () {}) : void 0);
33288
+ return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
33108
33289
  } catch (e) {
33109
33290
  return Promise.reject(e);
33110
33291
  }
@@ -33129,7 +33310,7 @@ const CameraCaptureModal = _ref4 => {
33129
33310
  type: "image/jpeg"
33130
33311
  });
33131
33312
  onCapture(file);
33132
- }, "image/jpeg");
33313
+ }, "image/jpeg", 0.7);
33133
33314
  }
33134
33315
  };
33135
33316
  return /*#__PURE__*/React__default.createElement("div", {
@@ -38858,6 +39039,17 @@ const WSDeclaration = _ref => {
38858
39039
  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" : "");
38859
39040
  const [signatureFileStoreId, setSignatureFileStoreId] = React.useState(initialFsId);
38860
39041
  const [localFile, setLocalFile] = React.useState(null);
39042
+ const [signError, setSignError] = React.useState(null);
39043
+ const signSpecs = {
39044
+ maxSize: 50 * 1024,
39045
+ maxSizeText: "50KB",
39046
+ allowedExtensions: ["jpg", "jpeg"],
39047
+ allowedMimeTypes: ["image/jpeg", "image/jpg"],
39048
+ accept: "image/jpeg, .jpg, .jpeg",
39049
+ uiMessage: "Allowed format: JPEG | Max file size: 50KB",
39050
+ formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Signature",
39051
+ sizeErrorMessage: "Signature size should not exceed 50KB"
39052
+ };
38861
39053
  const [signatureFile, setSignatureFile] = React.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 ? {
38862
39054
  fileStoreId: initialFsId,
38863
39055
  fileName: initialFileName
@@ -38939,49 +39131,61 @@ const WSDeclaration = _ref => {
38939
39131
  const onUploadSignature = function (e) {
38940
39132
  try {
38941
39133
  var _e$target$files;
39134
+ setSignError(null);
38942
39135
  const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
38943
- const _temp3 = function () {
39136
+ return Promise.resolve(function () {
38944
39137
  if (file) {
38945
- const _temp2 = function () {
38946
- if (file.size >= 5242880) {} else {
38947
- setLocalFile(file);
38948
- const _temp = _catch(function () {
38949
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
38950
- var _response$data, _response$data$files;
38951
- 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) {
38952
- var _response$data2, _response$data2$files;
38953
- 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;
38954
- const sigObj = {
38955
- fileStoreId: fsId,
38956
- fileName: file.name
38957
- };
38958
- setSignatureFileStoreId(fsId);
38959
- setSignatureFile(sigObj);
38960
- setValue("signatureFileStoreId", fsId, {
38961
- shouldDirty: true,
38962
- shouldValidate: true
38963
- });
38964
- setValue("signatureFile", sigObj, {
38965
- shouldDirty: true,
38966
- shouldValidate: true
38967
- });
38968
- setValue("signatureFileName", file.name, {
38969
- shouldDirty: true,
38970
- shouldValidate: true
38971
- });
38972
- }
39138
+ const ext = (file.name || "").split(".").pop().toLowerCase();
39139
+ const isExtAllowed = signSpecs.allowedExtensions.includes(ext);
39140
+ const isMimeAllowed = signSpecs.allowedMimeTypes.includes(file.type);
39141
+ if (!isExtAllowed && !isMimeAllowed) {
39142
+ setSignError(t("WS_SIGNATURE_ONLY_JPEG") || signSpecs.formatErrorMessage);
39143
+ if (e.target) e.target.value = "";
39144
+ return;
39145
+ }
39146
+ if (file.size > signSpecs.maxSize) {
39147
+ setSignError(t("WS_SIGNATURE_MAX_SIZE_EXCEEDED") || signSpecs.sizeErrorMessage);
39148
+ if (e.target) e.target.value = "";
39149
+ return;
39150
+ }
39151
+ setLocalFile(file);
39152
+ const _temp = _catch(function () {
39153
+ return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
39154
+ var _response$data, _response$data$files;
39155
+ 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) {
39156
+ var _response$data2, _response$data2$files;
39157
+ 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;
39158
+ const sigObj = {
39159
+ fileStoreId: fsId,
39160
+ fileName: file.name
39161
+ };
39162
+ setSignatureFileStoreId(fsId);
39163
+ setSignatureFile(sigObj);
39164
+ setValue("signatureFileStoreId", fsId, {
39165
+ shouldDirty: true,
39166
+ shouldValidate: true
38973
39167
  });
38974
- }, function (err) {
38975
- console.error("Signature upload failed", err);
39168
+ setValue("signatureFile", sigObj, {
39169
+ shouldDirty: true,
39170
+ shouldValidate: true
39171
+ });
39172
+ setValue("signatureFileName", file.name, {
39173
+ shouldDirty: true,
39174
+ shouldValidate: true
39175
+ });
39176
+ } else {
39177
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
38976
39178
  setLocalFile(null);
38977
- });
38978
- if (_temp && _temp.then) return _temp.then(function () {});
38979
- }
38980
- }();
38981
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
39179
+ }
39180
+ });
39181
+ }, function (err) {
39182
+ console.error("Signature upload failed", err);
39183
+ setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
39184
+ setLocalFile(null);
39185
+ });
39186
+ if (_temp && _temp.then) return _temp.then(function () {});
38982
39187
  }
38983
- }();
38984
- return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39188
+ }());
38985
39189
  } catch (e) {
38986
39190
  return Promise.reject(e);
38987
39191
  }
@@ -38991,9 +39195,9 @@ const WSDeclaration = _ref => {
38991
39195
  const [docFileType, setDocFileType] = React.useState("");
38992
39196
  const viewDocument = function () {
38993
39197
  try {
38994
- const _temp5 = function () {
39198
+ const _temp3 = function () {
38995
39199
  if (signatureFileStoreId) {
38996
- const _temp4 = _catch(function () {
39200
+ const _temp2 = _catch(function () {
38997
39201
  return Promise.resolve(Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId())).then(function (res) {
38998
39202
  if (res !== null && res !== void 0 && res.data) {
38999
39203
  const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
@@ -39013,10 +39217,10 @@ const WSDeclaration = _ref => {
39013
39217
  }, function (err) {
39014
39218
  console.error("Failed to fetch file URL via FileFetchbyid", err);
39015
39219
  });
39016
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
39220
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
39017
39221
  }
39018
39222
  }();
39019
- return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
39223
+ return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
39020
39224
  } catch (e) {
39021
39225
  return Promise.reject(e);
39022
39226
  }
@@ -39063,11 +39267,22 @@ const WSDeclaration = _ref => {
39063
39267
  })
39064
39268
  })), /*#__PURE__*/React__default.createElement("div", {
39065
39269
  className: "formcomposer-section-grid"
39066
- }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_UPLOAD_SIGNATURE_FILE"), " ", /*#__PURE__*/React__default.createElement("span", {
39270
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
39271
+ style: {
39272
+ margin: 0
39273
+ }
39274
+ }, t("WS_UPLOAD_SIGNATURE_FILE") || "Upload Signature", " ", /*#__PURE__*/React__default.createElement("span", {
39067
39275
  style: {
39068
39276
  color: "red"
39069
39277
  }
39070
39278
  }, "*")), /*#__PURE__*/React__default.createElement("div", {
39279
+ style: {
39280
+ fontSize: "12px",
39281
+ color: "#555",
39282
+ marginTop: "2px",
39283
+ marginBottom: "4px"
39284
+ }
39285
+ }, signSpecs.uiMessage)), /*#__PURE__*/React__default.createElement("div", {
39071
39286
  className: "field",
39072
39287
  style: {
39073
39288
  display: "flex",
@@ -39091,6 +39306,7 @@ const WSDeclaration = _ref => {
39091
39306
  setLocalFile(null);
39092
39307
  setSignatureFile(null);
39093
39308
  setSignatureFileStoreId(null);
39309
+ setSignError(null);
39094
39310
  setValue("signatureFile", null, {
39095
39311
  shouldDirty: true,
39096
39312
  shouldValidate: true
@@ -39110,14 +39326,15 @@ const WSDeclaration = _ref => {
39110
39326
  width: "100%"
39111
39327
  },
39112
39328
  buttonType: "button",
39113
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
39114
- 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", {
39329
+ accept: signSpecs.accept,
39330
+ 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", {
39115
39331
  fileStoreId: signatureFileStoreId
39116
39332
  }]] : undefined,
39117
39333
  removeTargetedFile: () => {
39118
39334
  setLocalFile(null);
39119
39335
  setSignatureFile(null);
39120
39336
  setSignatureFileStoreId(null);
39337
+ setSignError(null);
39121
39338
  setValue("signatureFile", null, {
39122
39339
  shouldDirty: true,
39123
39340
  shouldValidate: true
@@ -39136,7 +39353,13 @@ const WSDeclaration = _ref => {
39136
39353
  style: {
39137
39354
  cursor: "pointer"
39138
39355
  }
39139
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null))), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
39356
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null))), signError && /*#__PURE__*/React__default.createElement("div", {
39357
+ style: {
39358
+ fontSize: "12px",
39359
+ color: "#d32f2f",
39360
+ marginTop: "4px"
39361
+ }
39362
+ }, signError), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
39140
39363
  style: {
39141
39364
  color: "red",
39142
39365
  fontSize: "12px",
@@ -54226,8 +54449,84 @@ const getMaskedPhone = phone => {
54226
54449
  if (!phone || phone.length < 10) return "NA";
54227
54450
  return `******${phone.slice(-4)}`;
54228
54451
  };
54229
- const getAddress$1 = (address, t) => {
54230
- 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}` : " "}`;
54452
+ const getAddress$1 = (address, t, property) => {
54453
+ var _property$address, _Digit$Utils, _Digit$Utils$pt, _addrObj$additionalDe, _addrObj$additionalDe2, _addrObj$additionalDe3, _addrObj$additionalDe4, _Digit$Utils2, _Digit$Utils2$pt;
54454
+ if (!address && !property) return "";
54455
+ const addrObj = typeof address === "object" && address !== null ? address : {};
54456
+ const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
54457
+ 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) || {};
54458
+ const parts = [];
54459
+ 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) || "";
54460
+ if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
54461
+ parts.push(String(houseNo).trim());
54462
+ }
54463
+ 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) || "";
54464
+ if (building && String(building).trim() && String(building).trim() !== "NA") {
54465
+ parts.push(String(building).trim());
54466
+ }
54467
+ 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) || "";
54468
+ if (street && String(street).trim() && String(street).trim() !== "NA") {
54469
+ parts.push(String(street).trim());
54470
+ }
54471
+ 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) || "";
54472
+ if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
54473
+ parts.push(String(addressLine2).trim());
54474
+ }
54475
+ 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) || "";
54476
+ if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
54477
+ parts.push(String(landmark).trim());
54478
+ }
54479
+ 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();
54480
+ 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);
54481
+ const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
54482
+ let localityText = "";
54483
+ 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) {
54484
+ const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
54485
+ localityText = t ? t(locLocale) : locLocale;
54486
+ }
54487
+ if (!localityText || localityText === localityCode) {
54488
+ localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
54489
+ }
54490
+ if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
54491
+ parts.push(String(localityText).trim());
54492
+ }
54493
+ 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) || "";
54494
+ 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 || "");
54495
+ if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
54496
+ parts.push(assemblyText.trim());
54497
+ }
54498
+ 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) || "";
54499
+ 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 || "");
54500
+ if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
54501
+ parts.push(zoneText.trim());
54502
+ }
54503
+ 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) || "";
54504
+ 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 || "");
54505
+ if (wardText && wardText.trim() && wardText.trim() !== "NA") {
54506
+ parts.push(wardText.trim());
54507
+ }
54508
+ let cityText = "";
54509
+ 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) {
54510
+ const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
54511
+ cityText = t ? t(cityLocale) : cityLocale;
54512
+ }
54513
+ if (!cityText || cityText === tenantId) {
54514
+ cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
54515
+ }
54516
+ if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
54517
+ parts.push(String(cityText).trim());
54518
+ }
54519
+ 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) || "";
54520
+ if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
54521
+ parts.push(String(pincode).trim());
54522
+ }
54523
+ const uniqueParts = [];
54524
+ parts.forEach(p => {
54525
+ if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
54526
+ uniqueParts.push(p);
54527
+ }
54528
+ });
54529
+ return uniqueParts.join(", ");
54231
54530
  };
54232
54531
  const WSInfoPage = () => {
54233
54532
  var _user$info, _user$info$userName, _user$info2, _location$state, _location$state2, _location$state3, _location$state4, _location$state5, _location$state6, _createdProperty$owne, _createdProperty$owne2;
@@ -54269,6 +54568,13 @@ const WSInfoPage = () => {
54269
54568
  }
54270
54569
  return () => clearTimeout(timer);
54271
54570
  }, [timeLeft]);
54571
+ React.useEffect(() => {
54572
+ if (!showToast) return;
54573
+ const timer = setTimeout(() => {
54574
+ setShowToast(null);
54575
+ }, (showToast === null || showToast === void 0 ? void 0 : showToast.duration) || 5000);
54576
+ return () => clearTimeout(timer);
54577
+ }, [showToast]);
54272
54578
  React.useEffect(() => {
54273
54579
  if (isFromPropertyCreate) {
54274
54580
  var _createdProperty$owne3, _createdProperty$owne4;
@@ -54336,9 +54642,10 @@ const WSInfoPage = () => {
54336
54642
  });
54337
54643
  const target = createdPropertyId && sorted.find(p => p.propertyId === createdPropertyId) || (!hasAutoSelected.current ? sorted[0] : null);
54338
54644
  if (target && (!selectedProperty || selectedProperty.propertyId !== target.propertyId)) {
54645
+ const fullAddr = getAddress$1(target.address, t, target);
54339
54646
  const formatted = {
54340
54647
  ...target,
54341
- displayName: `${target.propertyId} - ${getAddress$1(target.address, t)}`
54648
+ displayName: fullAddr ? `${target.propertyId} - ${fullAddr}` : target.propertyId
54342
54649
  };
54343
54650
  setSelectedProperty(formatted);
54344
54651
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", target.propertyId);
@@ -54409,7 +54716,8 @@ const WSInfoPage = () => {
54409
54716
  setTimeLeft(30);
54410
54717
  setShowToast({
54411
54718
  key: "success",
54412
- message: t("OTP sent successfully!")
54719
+ message: t("OTP sent successfully!"),
54720
+ duration: 5000
54413
54721
  });
54414
54722
  });
54415
54723
  }, function (err) {
@@ -54474,15 +54782,18 @@ const WSInfoPage = () => {
54474
54782
  setIsOtpVerifying(false);
54475
54783
  setShowToast({
54476
54784
  key: "success",
54477
- message: t("OTP verified successfully!")
54785
+ message: t("OTP verified successfully!"),
54786
+ duration: 5000
54478
54787
  });
54479
54788
  setShowOtpVerification(false);
54480
54789
  setIsMobileVerified(true);
54790
+ setTimeLeft(0);
54481
54791
  const fallbackProp = createdProperty || (propByIdData === null || propByIdData === void 0 ? void 0 : (_propByIdData$Propert2 = propByIdData.Properties) === null || _propByIdData$Propert2 === void 0 ? void 0 : _propByIdData$Propert2[0]);
54482
54792
  if (fallbackProp) {
54793
+ const fullAddr = getAddress$1(fallbackProp.address, t, fallbackProp);
54483
54794
  const formatted = {
54484
54795
  ...fallbackProp,
54485
- displayName: `${fallbackProp.propertyId} - ${getAddress$1(fallbackProp.address, t)}`
54796
+ displayName: fullAddr ? `${fallbackProp.propertyId} - ${fullAddr}` : fallbackProp.propertyId
54486
54797
  };
54487
54798
  setSelectedProperty(formatted);
54488
54799
  sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", fallbackProp.propertyId);
@@ -54543,12 +54854,20 @@ const WSInfoPage = () => {
54543
54854
  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;
54544
54855
  return timeB - timeA;
54545
54856
  });
54546
- const list = sortedList.map(prop => ({
54547
- ...prop,
54548
- displayName: getAddress$1(prop.address, t) || prop.propertyId
54549
- }));
54857
+ const list = sortedList.map(prop => {
54858
+ const fullAddr = getAddress$1(prop.address, t, prop);
54859
+ return {
54860
+ ...prop,
54861
+ displayName: fullAddr ? `${prop.propertyId} - ${fullAddr}` : prop.propertyId
54862
+ };
54863
+ });
54550
54864
  if (selectedProperty && !list.some(p => p.propertyId === selectedProperty.propertyId)) {
54551
- return [selectedProperty, ...list];
54865
+ const fullAddr = getAddress$1(selectedProperty.address, t, selectedProperty);
54866
+ const selProp = {
54867
+ ...selectedProperty,
54868
+ displayName: fullAddr ? `${selectedProperty.propertyId} - ${fullAddr}` : selectedProperty.propertyId
54869
+ };
54870
+ return [selProp, ...list];
54552
54871
  }
54553
54872
  return list;
54554
54873
  }, [propertyDetails, selectedProperty, t]);
@@ -55508,7 +55827,12 @@ const WSInfoPage = () => {
55508
55827
  id: "propertyId",
55509
55828
  selected: selectedProperty,
55510
55829
  select: val => {
55511
- setSelectedProperty(val);
55830
+ const fullAddr = getAddress$1(val === null || val === void 0 ? void 0 : val.address, t, val);
55831
+ const formattedVal = val ? {
55832
+ ...val,
55833
+ displayName: fullAddr ? `${val.propertyId} - ${fullAddr}` : val.propertyId
55834
+ } : null;
55835
+ setSelectedProperty(formattedVal);
55512
55836
  setShowOtpVerification(false);
55513
55837
  setOtp("");
55514
55838
  if (val !== null && val !== void 0 && val.propertyId) {
@@ -55735,7 +56059,8 @@ const WSInfoPage = () => {
55735
56059
  warning: showToast.key === "warning",
55736
56060
  label: t(showToast.message),
55737
56061
  onClose: () => setShowToast(null),
55738
- isDleteBtn: true
56062
+ isDleteBtn: true,
56063
+ duration: showToast.duration || 5000
55739
56064
  }));
55740
56065
  };
55741
56066
 
@@ -67516,12 +67841,8 @@ const CheckPage$4 = _ref2 => {
67516
67841
  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) || {};
67517
67842
  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) || {};
67518
67843
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
67519
- style: {
67520
- paddingRight: "16px",
67521
- height: "auto",
67522
- overflow: "visible"
67523
- }
67524
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
67844
+ className: "overflow-y-scroll"
67845
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
67525
67846
  style: {
67526
67847
  marginTop: "10px",
67527
67848
  marginBottom: "30px"
@@ -67602,7 +67923,10 @@ const CheckPage$4 = _ref2 => {
67602
67923
  }
67603
67924
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
67604
67925
  label: "Divyangjan/Person with Disability?",
67605
- text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
67926
+ text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
67927
+ actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
67928
+ onClick: onEdit
67929
+ })
67606
67930
  })), /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_DJB_EMPLOYEE")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
67607
67931
  style: {
67608
67932
  marginTop: "10px",
@@ -67659,8 +67983,11 @@ const CheckPage$4 = _ref2 => {
67659
67983
  }
67660
67984
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
67661
67985
  label: t("Rain Water Harvesting Certificate"),
67662
- text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
67663
- })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
67986
+ text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
67987
+ actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
67988
+ onClick: onEdit
67989
+ })
67990
+ })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("PT_LOCATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
67664
67991
  style: {
67665
67992
  marginTop: "10px",
67666
67993
  marginBottom: "30px"
@@ -67827,7 +68154,7 @@ const CheckPage$4 = _ref2 => {
67827
68154
  },
67828
68155
  disabled: isSubmitDisabled
67829
68156
  }));
67830
- })()), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
68157
+ })(), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
67831
68158
  open: showDocModal,
67832
68159
  headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
67833
68160
  headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
@@ -68112,6 +68439,22 @@ const OLDApplication = () => {
68112
68439
  setSubmitValve(true);
68113
68440
  }
68114
68441
  }, [propertyId, propertyDetails]);
68442
+ React.useEffect(() => {
68443
+ if (showCheckPage) {
68444
+ window.history.pushState({
68445
+ step: "check"
68446
+ }, "");
68447
+ const handlePopState = () => {
68448
+ setShowCheckPage(false);
68449
+ window.scrollTo({
68450
+ top: 0,
68451
+ behavior: "smooth"
68452
+ });
68453
+ };
68454
+ window.addEventListener("popstate", handlePopState);
68455
+ return () => window.removeEventListener("popstate", handlePopState);
68456
+ }
68457
+ }, [showCheckPage]);
68115
68458
  const {
68116
68459
  isLoading: creatingWaterApplicationLoading,
68117
68460
  mutate: waterMutation
@@ -68309,6 +68652,10 @@ const OLDApplication = () => {
68309
68652
  }
68310
68653
  }
68311
68654
  setShowCheckPage(true);
68655
+ window.scrollTo({
68656
+ top: 0,
68657
+ behavior: "smooth"
68658
+ });
68312
68659
  };
68313
68660
  const processSubmission = function (data) {
68314
68661
  try {
@@ -68653,7 +69000,12 @@ const OLDApplication = () => {
68653
69000
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
68654
69001
  config: timelineConfig,
68655
69002
  currentActiveIndex: timelineConfig.length - 1,
68656
- showFinalStep: false
69003
+ showFinalStep: false,
69004
+ onSelect: (route, idx) => {
69005
+ if (idx < timelineConfig.length - 1) {
69006
+ handleEdit();
69007
+ }
69008
+ }
68657
69009
  }), /*#__PURE__*/React__default.createElement(CheckPage$4, {
68658
69010
  data: formDataRef.current || sessionFormData,
68659
69011
  onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
@@ -68679,7 +69031,7 @@ const OLDApplication = () => {
68679
69031
  cardFormWrapperClassName: "new-application-card"
68680
69032
  }), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
68681
69033
  isDleteBtn: true,
68682
- duration: 5000,
69034
+ duration: 3000,
68683
69035
  error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
68684
69036
  warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning,
68685
69037
  label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),