@djb25/digit-ui-module-ws 1.0.119 → 1.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1553 -550
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1553 -550
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -279,6 +279,16 @@ const TestAcknowledgment = () => {
|
|
|
279
279
|
}, "Print"));
|
|
280
280
|
};
|
|
281
281
|
|
|
282
|
+
const isRwhDocType = doc => {
|
|
283
|
+
if (!doc) return false;
|
|
284
|
+
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
285
|
+
return str.includes("RAIN") || str.includes("HARVEST");
|
|
286
|
+
};
|
|
287
|
+
const isStpDocType = doc => {
|
|
288
|
+
if (!doc) return false;
|
|
289
|
+
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
290
|
+
return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
|
|
291
|
+
};
|
|
282
292
|
const stringReplaceAll = function (str, searcher, replaceWith) {
|
|
283
293
|
if (str === void 0) {
|
|
284
294
|
str = "";
|
|
@@ -399,13 +409,88 @@ const getQueryStringParams = query => {
|
|
|
399
409
|
return params;
|
|
400
410
|
}, {}) : {};
|
|
401
411
|
};
|
|
402
|
-
const getAddress = (address, t) => {
|
|
403
|
-
var
|
|
404
|
-
|
|
412
|
+
const getAddress = (address, t, property) => {
|
|
413
|
+
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;
|
|
414
|
+
if (!address && !property) return "";
|
|
415
|
+
const addrObj = typeof address === "object" && address !== null ? address : {};
|
|
416
|
+
const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
|
|
417
|
+
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) || {};
|
|
418
|
+
const parts = [];
|
|
419
|
+
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) || "";
|
|
420
|
+
if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
|
|
421
|
+
parts.push(String(houseNo).trim());
|
|
422
|
+
}
|
|
423
|
+
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) || "";
|
|
424
|
+
if (building && String(building).trim() && String(building).trim() !== "NA") {
|
|
425
|
+
parts.push(String(building).trim());
|
|
426
|
+
}
|
|
427
|
+
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) || "";
|
|
428
|
+
if (street && String(street).trim() && String(street).trim() !== "NA") {
|
|
429
|
+
parts.push(String(street).trim());
|
|
430
|
+
}
|
|
431
|
+
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) || "";
|
|
432
|
+
if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
|
|
433
|
+
parts.push(String(addressLine2).trim());
|
|
434
|
+
}
|
|
435
|
+
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) || "";
|
|
436
|
+
if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
|
|
437
|
+
parts.push(String(landmark).trim());
|
|
438
|
+
}
|
|
439
|
+
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));
|
|
440
|
+
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);
|
|
441
|
+
const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
|
|
442
|
+
let localityText = "";
|
|
443
|
+
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) {
|
|
444
|
+
const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
|
|
445
|
+
localityText = t ? t(locLocale) : locLocale;
|
|
446
|
+
}
|
|
447
|
+
if (!localityText || localityText === localityCode) {
|
|
448
|
+
localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
|
|
449
|
+
}
|
|
450
|
+
if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
|
|
451
|
+
parts.push(String(localityText).trim());
|
|
452
|
+
}
|
|
453
|
+
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) || "";
|
|
454
|
+
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 || "");
|
|
455
|
+
if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
|
|
456
|
+
parts.push(assemblyText.trim());
|
|
457
|
+
}
|
|
458
|
+
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) || "";
|
|
459
|
+
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 || "");
|
|
460
|
+
if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
|
|
461
|
+
parts.push(zoneText.trim());
|
|
462
|
+
}
|
|
463
|
+
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) || "";
|
|
464
|
+
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 || "");
|
|
465
|
+
if (wardText && wardText.trim() && wardText.trim() !== "NA") {
|
|
466
|
+
parts.push(wardText.trim());
|
|
467
|
+
}
|
|
468
|
+
let cityText = "";
|
|
469
|
+
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) {
|
|
470
|
+
const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
|
|
471
|
+
cityText = t ? t(cityLocale) : cityLocale;
|
|
472
|
+
}
|
|
473
|
+
if (!cityText || cityText === tenantId) {
|
|
474
|
+
cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
|
|
475
|
+
}
|
|
476
|
+
if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
|
|
477
|
+
parts.push(String(cityText).trim());
|
|
478
|
+
}
|
|
479
|
+
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) || "";
|
|
480
|
+
if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
|
|
481
|
+
parts.push(String(pincode).trim());
|
|
482
|
+
}
|
|
483
|
+
const uniqueParts = [];
|
|
484
|
+
parts.forEach(p => {
|
|
485
|
+
if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
|
|
486
|
+
uniqueParts.push(p);
|
|
487
|
+
}
|
|
488
|
+
});
|
|
489
|
+
return uniqueParts.join(", ");
|
|
405
490
|
};
|
|
406
491
|
const formatPropertyAddress = (address, t) => {
|
|
407
|
-
var
|
|
408
|
-
if ((
|
|
492
|
+
var _Digit5, _Digit5$Utils, _Digit5$Utils$pt;
|
|
493
|
+
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
494
|
return Digit.Utils.pt.formatPropertyAddress(address, t) || getAddress(address, t);
|
|
410
495
|
}
|
|
411
496
|
return getAddress(address, t);
|
|
@@ -607,7 +692,7 @@ const getNormalizedBankDetails = data => {
|
|
|
607
692
|
};
|
|
608
693
|
const createPayloadOfWS = function (data) {
|
|
609
694
|
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$
|
|
695
|
+
var _Digit$UserService$ge, _userInfo$roles, _data$cpt, _data$cpt$details, _data$cpt$details$own, _data$applicationSele, _data$ConnectionDetai, _data$ConnectionDetai2, _ref, _data$waterConnection, _data$ConnectionHolde, _data$documents2, _data$DocumentsRequir, _data$djbEmployee, _data$governmentEmplo, _rwhDoc$additionalDet, _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$additionalDetai7, _data$additionalDetai8, _stpDoc$additionalDet, _data$sewerTreatmentP, _data$sewerTreatmentP2, _data$sewerTreatmentP3, _data$additionalDetai9, _data$additionalDetai0, _docWithValidity$addi, _data$documents3, _data$documents4, _data$documents5, _data$additionalDetai1, _data$additionalDetai10, _data$additionalDetai11, _connectionHolder$gen, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2, _connectionHolder$own, _connectionHolder$rel, _data$propertyAddress, _data$applicant, _data$useDetails, _data$useDetails$gend, _data$contact, _data$applicant2, _data$applicant3, _data$applicant4, _data$contact2, _data$contact3, _data$applicationSele2, _data$applicationSele3, _data$contact4, _data$cpt3, _data$cpt4, _data$cpt4$details, _data$propertyAddress2, _data$propertyAddress3, _data$propertyAddress4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$propertyAddress5, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$propertyAddress6, _data$cpt7, _data$cpt7$details, _data$cpt7$details$ad, _data$propertyAddress7, _data$cpt8, _data$cpt8$details, _data$cpt8$details$ad, _data$propertyAddress8, _data$cpt9, _data$cpt9$details, _data$cpt9$details$ad, _data$propertyAddress9, _data$cpt0, _data$cpt0$details, _data$cpt0$details$ad, _data$propertyAddress0, _data$cpt1, _data$cpt1$details, _data$cpt1$details$ad, _data$propertyAddress1, _data$cpt10, _data$cpt10$details, _data$cpt10$details$a, _data$propertyAddress10, _data$cpt11, _data$cpt11$details, _data$cpt11$details$a, _data$cpt12, _data$cpt12$details, _data$cpt12$details$a, _data$propertyAddress11, _data$cpt13, _data$cpt13$details, _data$cpt13$details$a, _data$cpt13$details$a2, _data$propertyAddress12, _data$cpt14, _data$cpt14$details, _data$cpt14$details$a, _data$cpt14$details$a2, _data$propertyAddress13, _data$cpt15, _data$cpt15$details, _data$cpt15$details$a, _data$cpt15$details$a2, _data$cpt16, _data$cpt16$details, _data$roadCuttingDeta, _data$plumberDetails, _data$disability, _data$rainWaterHarves4, _data$rainWaterHarves5, _data$rainWaterHarves6, _data$rainWaterHarves7, _data$sewerTreatmentP4, _data$sewerTreatmentP5, _data$sewerTreatmentP6, _data$sewerTreatmentP7, _data$sewerTreatmentP8, _data$sewerTreatmentP9, _data$sewerTreatmentP0, _data$sewerTreatmentP1, _data$sewerTreatmentP10, _data$djbEmployee4, _data$djbEmployee4$do, _data$djbEmployee5, _data$djbEmployee6, _allDocuments$find, _connectionDetailsObj, _data$zro, _data$propertyAddress14, _data$propertyAddress15, _data$cpt17, _data$cpt17$details, _data$cpt17$details$a, _data$cpt17$details$a2, _data$plumberDetails2, _data$plumberDetails3, _data$plumberDetails4, _data$plumberDetails5, _data$plumberDetails6, _data$applicationSele4, _data$applicationSele5, _connectionDetailsObj2, _data$applicationSele6, _data$applicationSele7, _connectionDetailsObj3, _data$applicationSele8, _useDetailsObject$cat, _data$applicationSele9, _data$applicationSele0, _connectionHolder$own2, _useDetailsObject$noO, _data$propertyAddress16, _data$propertyAddress17, _data$propertyAddress18, _data$propertyAddress19, _data$cpt18, _data$cpt18$details, _data$cpt18$details$a, _data$cpt19, _data$cpt19$details, _data$cpt19$details$a, _data$cpt20, _data$cpt20$details, _data$propertyAddress20, _data$propertyAddress21, _data$propertyAddress22, _data$propertyAddress23, _useDetailsObject$noO2, _data$cpt21, _data$cpt21$details, _data$cpt21$details$a, _data$cpt22, _data$cpt22$details, _data$propertyAddress24, _data$propertyAddress25, _data$cpt23, _data$cpt23$details, _data$cpt23$details$a, _data$cpt24, _data$cpt24$details, _data$cpt24$details$a, _data$cpt25, _data$cpt25$details, _data$propertyAddress26, _data$propertyAddress27, _data$cpt26, _data$cpt26$details, _data$cpt26$details$a, _data$cpt27, _data$cpt27$details, _data$cpt27$details$a, _data$cpt28, _data$cpt28$details, _data$applicationSele1, _data$applicationSele10, _data$applicationSele11, _data$applicationSele12, _data$applicationSele13, _data$applicationSele14, _data$applicationSele15, _data$applicationSele16, _data$applicationSele17, _data$applicationSele18, _data$applicationSele19, _data$applicationSele20, _data$applicationSele21, _data$applicationSele22, _data$applicationSele23, _data$applicationSele24, _data$applicationSele25, _data$contact5, _data$documents6, _data$documents7, _data$documents8, _data$documents9, _allDocuments$find2, _allDocuments$find3, _data$cpt29, _Digit6, _Digit6$Customization, _Digit6$Customization2, _Digit7, _Digit7$Customization, _Digit7$Customization2;
|
|
611
696
|
const userInfo = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.info;
|
|
612
697
|
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
698
|
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 => {
|
|
@@ -622,7 +707,7 @@ const createPayloadOfWS = function (data) {
|
|
|
622
707
|
const connectionDetailsObject = connectionDetail;
|
|
623
708
|
const useDetailsObject = (data === null || data === void 0 ? void 0 : (_data$waterConnection = data.waterConnection) === null || _data$waterConnection === void 0 ? void 0 : _data$waterConnection.useDetails) || (data === null || data === void 0 ? void 0 : data.useDetails) || connectionDetailsObject || {};
|
|
624
709
|
const connectionHolder = (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : _data$ConnectionHolde[0]) || (data === null || data === void 0 ? void 0 : data.ConnectionHolderDetails);
|
|
625
|
-
let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
|
|
710
|
+
let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : Array.isArray(data === null || data === void 0 ? void 0 : (_data$DocumentsRequir = data.DocumentsRequired) === null || _data$DocumentsRequir === void 0 ? void 0 : _data$DocumentsRequir.documents) ? [...data.DocumentsRequired.documents] : [];
|
|
626
711
|
const {
|
|
627
712
|
signatureFileStoreId,
|
|
628
713
|
signatureFileName
|
|
@@ -687,6 +772,47 @@ const createPayloadOfWS = function (data) {
|
|
|
687
772
|
status: "ACTIVE"
|
|
688
773
|
});
|
|
689
774
|
}
|
|
775
|
+
allDocuments = allDocuments.map(doc => {
|
|
776
|
+
var _doc$additionalDetail, _doc$additionalDetail2, _doc$additionalDetail3;
|
|
777
|
+
const vDate = (doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : doc.date) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail = doc.additionalDetails) === null || _doc$additionalDetail === void 0 ? void 0 : _doc$additionalDetail.validityDate) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail2 = doc.additionalDetails) === null || _doc$additionalDetail2 === void 0 ? void 0 : _doc$additionalDetail2.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail3 = doc.additionalDetails) === null || _doc$additionalDetail3 === void 0 ? void 0 : _doc$additionalDetail3.date);
|
|
778
|
+
const vEpoch = vDate ? convertDateToEpoch(vDate) : undefined;
|
|
779
|
+
return {
|
|
780
|
+
...doc,
|
|
781
|
+
...(vDate ? {
|
|
782
|
+
validityDate: vDate,
|
|
783
|
+
validityUpTo: vDate,
|
|
784
|
+
date: vDate
|
|
785
|
+
} : {}),
|
|
786
|
+
...(typeof vEpoch === "number" ? {
|
|
787
|
+
validityDateEpoch: vEpoch,
|
|
788
|
+
validityUpToEpoch: vEpoch
|
|
789
|
+
} : {}),
|
|
790
|
+
additionalDetails: {
|
|
791
|
+
...((doc === null || doc === void 0 ? void 0 : doc.additionalDetails) || {}),
|
|
792
|
+
...(vDate ? {
|
|
793
|
+
validityDate: vDate,
|
|
794
|
+
validityUpTo: vDate,
|
|
795
|
+
date: vDate
|
|
796
|
+
} : {}),
|
|
797
|
+
...(typeof vEpoch === "number" ? {
|
|
798
|
+
validityDateEpoch: vEpoch,
|
|
799
|
+
validityUpToEpoch: vEpoch
|
|
800
|
+
} : {})
|
|
801
|
+
}
|
|
802
|
+
};
|
|
803
|
+
});
|
|
804
|
+
const rwhDoc = allDocuments.find(d => isRwhDocType(d));
|
|
805
|
+
const stpDoc = allDocuments.find(d => isStpDocType(d));
|
|
806
|
+
const docWithValidity = allDocuments.find(d => {
|
|
807
|
+
var _d$additionalDetails, _d$additionalDetails2;
|
|
808
|
+
return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails = d.additionalDetails) === null || _d$additionalDetails === void 0 ? void 0 : _d$additionalDetails.validityDate) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails2 = d.additionalDetails) === null || _d$additionalDetails2 === void 0 ? void 0 : _d$additionalDetails2.validityUpTo);
|
|
809
|
+
});
|
|
810
|
+
const rwhValidityDate = (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityDate) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityUpTo) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.date) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : (_rwhDoc$additionalDet = rwhDoc.additionalDetails) === null || _rwhDoc$additionalDet === void 0 ? void 0 : _rwhDoc$additionalDet.validityDate) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves = data.rainWaterHarvesting) === null || _data$rainWaterHarves === void 0 ? void 0 : _data$rainWaterHarves.validityDate) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves2 = data.rainWaterHarvesting) === null || _data$rainWaterHarves2 === void 0 ? void 0 : _data$rainWaterHarves2.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$rainWaterHarves3 = data.rainWaterHarvesting) === null || _data$rainWaterHarves3 === void 0 ? void 0 : _data$rainWaterHarves3.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.rainWaterHarvestingValidityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai8 = data.additionalDetails) === null || _data$additionalDetai8 === void 0 ? void 0 : _data$additionalDetai8.rwhValidityDate) || "";
|
|
811
|
+
const stpValidityDate = (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityDate) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityUpTo) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.date) || (stpDoc === null || stpDoc === void 0 ? void 0 : (_stpDoc$additionalDet = stpDoc.additionalDetails) === null || _stpDoc$additionalDet === void 0 ? void 0 : _stpDoc$additionalDet.validityDate) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP === void 0 ? void 0 : _data$sewerTreatmentP.validityDate) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP2 = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP2 === void 0 ? void 0 : _data$sewerTreatmentP2.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP3 = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP3 === void 0 ? void 0 : _data$sewerTreatmentP3.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai9 = data.additionalDetails) === null || _data$additionalDetai9 === void 0 ? void 0 : _data$additionalDetai9.sewerTreatmentPlantValidityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai0 = data.additionalDetails) === null || _data$additionalDetai0 === void 0 ? void 0 : _data$additionalDetai0.stpValidityDate) || "";
|
|
812
|
+
const overallValidityDate = (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityUpTo) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.date) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi = docWithValidity.additionalDetails) === null || _docWithValidity$addi === void 0 ? void 0 : _docWithValidity$addi.validityDate) || rwhValidityDate || stpValidityDate || (data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.validityDate) || (data === null || data === void 0 ? void 0 : (_data$documents4 = data.documents) === null || _data$documents4 === void 0 ? void 0 : _data$documents4.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.date) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai1 = data.additionalDetails) === null || _data$additionalDetai1 === void 0 ? void 0 : _data$additionalDetai1.validityDate) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai10 = data.additionalDetails) === null || _data$additionalDetai10 === void 0 ? void 0 : _data$additionalDetai10.validityUpTo) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai11 = data.additionalDetails) === null || _data$additionalDetai11 === void 0 ? void 0 : _data$additionalDetai11.date) || "";
|
|
813
|
+
const overallValidityEpoch = overallValidityDate ? convertDateToEpoch(overallValidityDate) : undefined;
|
|
814
|
+
const rwhValidityEpoch = rwhValidityDate ? convertDateToEpoch(rwhValidityDate) : undefined;
|
|
815
|
+
const stpValidityEpoch = stpValidityDate ? convertDateToEpoch(stpValidityDate) : undefined;
|
|
690
816
|
let payload = {
|
|
691
817
|
water: !!isWater,
|
|
692
818
|
sewerage: !!isSewerage,
|
|
@@ -772,9 +898,13 @@ const createPayloadOfWS = function (data) {
|
|
|
772
898
|
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
773
899
|
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
774
900
|
...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
|
|
901
|
+
...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
|
|
775
902
|
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability = data.disability) !== null && _data$disability !== void 0 && _data$disability.isDivyangjan),
|
|
776
|
-
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$
|
|
777
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$
|
|
903
|
+
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves5 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves5 !== void 0 && _data$rainWaterHarves5.isRainwaterHarvesting),
|
|
904
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves6 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves6 !== void 0 && _data$rainWaterHarves6.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves7 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves7 !== void 0 && _data$rainWaterHarves7.isRainwaterHarvesting),
|
|
905
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP4 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP4 !== void 0 && _data$sewerTreatmentP4.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP5 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP5 !== void 0 && _data$sewerTreatmentP5.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP6 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP6 !== void 0 && _data$sewerTreatmentP6.isSewerTreatmentPlant),
|
|
906
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP7 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP7 !== void 0 && _data$sewerTreatmentP7.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP8 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP8 !== void 0 && _data$sewerTreatmentP8.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP9 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP9 !== void 0 && _data$sewerTreatmentP9.isSewerTreatmentPlant),
|
|
907
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP0 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP0 !== void 0 && _data$sewerTreatmentP0.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP1 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP1 !== void 0 && _data$sewerTreatmentP1.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP10 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP10 !== void 0 && _data$sewerTreatmentP10.isSewerTreatmentPlant),
|
|
778
908
|
document: (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : (_data$djbEmployee4$do = _data$djbEmployee4.document) === null || _data$djbEmployee4$do === void 0 ? void 0 : _data$djbEmployee4$do.fileStoreId) || (typeof (data === null || data === void 0 ? void 0 : (_data$djbEmployee5 = data.djbEmployee) === null || _data$djbEmployee5 === void 0 ? void 0 : _data$djbEmployee5.document) === "string" ? data === null || data === void 0 ? void 0 : (_data$djbEmployee6 = data.djbEmployee) === null || _data$djbEmployee6 === void 0 ? void 0 : _data$djbEmployee6.document : null) || ((_allDocuments$find = allDocuments.find(d => {
|
|
779
909
|
var _d$documentType5;
|
|
780
910
|
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType5 = d.documentType) === null || _d$documentType5 === void 0 ? void 0 : _d$documentType5.includes("DJB_EMPLOYEE_ID"));
|
|
@@ -825,16 +955,43 @@ const createPayloadOfWS = function (data) {
|
|
|
825
955
|
departmentType: data === null || data === void 0 ? void 0 : (_data$applicationSele24 = data.applicationSelection) === null || _data$applicationSele24 === void 0 ? void 0 : (_data$applicationSele25 = _data$applicationSele24.departmentType) === null || _data$applicationSele25 === void 0 ? void 0 : _data$applicationSele25.code,
|
|
826
956
|
governmentEmployee: data === null || data === void 0 ? void 0 : data.governmentEmployee,
|
|
827
957
|
whatsAppNumber: data === null || data === void 0 ? void 0 : (_data$contact5 = data.contact) === null || _data$contact5 === void 0 ? void 0 : _data$contact5.whatsAppNumber,
|
|
828
|
-
identityProofNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
829
|
-
ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
830
|
-
otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$
|
|
831
|
-
otherDocumentRemark: (data === null || data === void 0 ? void 0 : (_data$
|
|
958
|
+
identityProofNumber: data === null || data === void 0 ? void 0 : (_data$documents6 = data.documents) === null || _data$documents6 === void 0 ? void 0 : _data$documents6.identityProofNumber,
|
|
959
|
+
ownershipDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents7 = data.documents) === null || _data$documents7 === void 0 ? void 0 : _data$documents7.ownershipDocumentNumber,
|
|
960
|
+
otherDocumentNumber: data === null || data === void 0 ? void 0 : (_data$documents8 = data.documents) === null || _data$documents8 === void 0 ? void 0 : _data$documents8.otherDocumentNumber,
|
|
961
|
+
otherDocumentRemark: (data === null || data === void 0 ? void 0 : (_data$documents9 = data.documents) === null || _data$documents9 === void 0 ? void 0 : _data$documents9.otherDocumentRemark) || ((_allDocuments$find2 = allDocuments.find(d => {
|
|
832
962
|
var _d$documentType6, _d$documentType7;
|
|
833
963
|
return (d === null || d === void 0 ? void 0 : (_d$documentType6 = d.documentType) === null || _d$documentType6 === void 0 ? void 0 : _d$documentType6.includes("OTHER_DOCUMENTS")) || (d === null || d === void 0 ? void 0 : (_d$documentType7 = d.documentType) === null || _d$documentType7 === void 0 ? void 0 : _d$documentType7.includes("OTHERDOCUMENTS"));
|
|
834
964
|
})) === null || _allDocuments$find2 === void 0 ? void 0 : _allDocuments$find2.documentUid) || ((_allDocuments$find3 = allDocuments.find(d => {
|
|
835
965
|
var _d$documentType8, _d$documentType9;
|
|
836
966
|
return (d === null || d === void 0 ? void 0 : (_d$documentType8 = d.documentType) === null || _d$documentType8 === void 0 ? void 0 : _d$documentType8.includes("OTHER_DOCUMENTS")) || (d === null || d === void 0 ? void 0 : (_d$documentType9 = d.documentType) === null || _d$documentType9 === void 0 ? void 0 : _d$documentType9.includes("OTHERDOCUMENTS"));
|
|
837
967
|
})) === null || _allDocuments$find3 === void 0 ? void 0 : _allDocuments$find3.remarks),
|
|
968
|
+
validityDate: overallValidityDate || undefined,
|
|
969
|
+
validityUpTo: overallValidityDate || undefined,
|
|
970
|
+
date: overallValidityDate || undefined,
|
|
971
|
+
...(typeof overallValidityEpoch === "number" ? {
|
|
972
|
+
validityDateEpoch: overallValidityEpoch,
|
|
973
|
+
validityUpToEpoch: overallValidityEpoch
|
|
974
|
+
} : {}),
|
|
975
|
+
...(rwhValidityDate ? {
|
|
976
|
+
rwhValidityDate: rwhValidityDate,
|
|
977
|
+
rwhValidityUpTo: rwhValidityDate,
|
|
978
|
+
rainWaterHarvestingValidityDate: rwhValidityDate,
|
|
979
|
+
rainWaterHarvestingValidityUpTo: rwhValidityDate,
|
|
980
|
+
...(typeof rwhValidityEpoch === "number" ? {
|
|
981
|
+
rwhValidityDateEpoch: rwhValidityEpoch,
|
|
982
|
+
rwhValidityUpToEpoch: rwhValidityEpoch
|
|
983
|
+
} : {})
|
|
984
|
+
} : {}),
|
|
985
|
+
...(stpValidityDate ? {
|
|
986
|
+
stpValidityDate: stpValidityDate,
|
|
987
|
+
stpValidityUpTo: stpValidityDate,
|
|
988
|
+
sewerTreatmentPlantValidityDate: stpValidityDate,
|
|
989
|
+
sewerTreatmentPlantValidityUpTo: stpValidityDate,
|
|
990
|
+
...(typeof stpValidityEpoch === "number" ? {
|
|
991
|
+
stpValidityDateEpoch: stpValidityEpoch,
|
|
992
|
+
stpValidityUpToEpoch: stpValidityEpoch
|
|
993
|
+
} : {})
|
|
994
|
+
} : {}),
|
|
838
995
|
...(getNormalizedBankDetails(data) ? {
|
|
839
996
|
...getNormalizedBankDetails(data),
|
|
840
997
|
bankDetails: getNormalizedBankDetails(data)
|
|
@@ -855,7 +1012,7 @@ const createPayloadOfWS = function (data) {
|
|
|
855
1012
|
delete payload.additionalDetails.proposedWaterClosets;
|
|
856
1013
|
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify(allDocuments));
|
|
857
1014
|
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 = (
|
|
1015
|
+
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
1016
|
return Promise.resolve(payload);
|
|
860
1017
|
} catch (e) {
|
|
861
1018
|
return Promise.reject(e);
|
|
@@ -863,7 +1020,7 @@ const createPayloadOfWS = function (data) {
|
|
|
863
1020
|
};
|
|
864
1021
|
const updatePayloadOfWS = function (data, type) {
|
|
865
1022
|
try {
|
|
866
|
-
var _data$
|
|
1023
|
+
var _data$additionalDetai12, _data$additionalDetai13, _Digit8, _Digit8$Customization, _Digit8$Customization2, _Digit9, _Digit9$Customization, _Digit9$Customization2;
|
|
867
1024
|
const {
|
|
868
1025
|
signatureFileStoreId,
|
|
869
1026
|
signatureFileName
|
|
@@ -905,22 +1062,22 @@ const updatePayloadOfWS = function (data, type) {
|
|
|
905
1062
|
fileName: signatureFileName
|
|
906
1063
|
}
|
|
907
1064
|
} : {}),
|
|
908
|
-
connectionType: (data === null || data === void 0 ? void 0 : (_data$
|
|
909
|
-
waterDemandType: (data === null || data === void 0 ? void 0 : (_data$
|
|
1065
|
+
connectionType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai12 = data.additionalDetails) === null || _data$additionalDetai12 === void 0 ? void 0 : _data$additionalDetai12.connectionType) || "Permanent",
|
|
1066
|
+
waterDemandType: (data === null || data === void 0 ? void 0 : (_data$additionalDetai13 = data.additionalDetails) === null || _data$additionalDetai13 === void 0 ? void 0 : _data$additionalDetai13.waterDemandType) || {
|
|
910
1067
|
code: "NON_BULK",
|
|
911
1068
|
i18nKey: "WS_WATER_DEMAND_NON_BULK"
|
|
912
1069
|
}
|
|
913
1070
|
}
|
|
914
1071
|
};
|
|
915
|
-
payload = (
|
|
1072
|
+
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
1073
|
return Promise.resolve(payload);
|
|
917
1074
|
} catch (e) {
|
|
918
1075
|
return Promise.reject(e);
|
|
919
1076
|
}
|
|
920
1077
|
};
|
|
921
1078
|
const getAllDocumentsForUpdate = data => {
|
|
922
|
-
var _data$
|
|
923
|
-
let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$
|
|
1079
|
+
var _data$documents0, _data$governmentEmplo5;
|
|
1080
|
+
let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents0 = data.documents) === null || _data$documents0 === void 0 ? void 0 : _data$documents0.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
|
|
924
1081
|
const {
|
|
925
1082
|
signatureFileStoreId,
|
|
926
1083
|
signatureFileName
|
|
@@ -1022,7 +1179,7 @@ const getAllDocumentsForUpdate = data => {
|
|
|
1022
1179
|
return allDocuments;
|
|
1023
1180
|
};
|
|
1024
1181
|
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$
|
|
1182
|
+
var _data$WaterConnection, _data$WaterConnection2, _data$cpt30, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$djbEmployee12, _data$djbEmployee13, _data$djbEmployee14, _data$djbEmployee15, _data$djbEmployee16, _data$djbEmployee17, _data$djbEmployee18, _data$djbEmployee19, _data$djbEmployee20, _data$djbEmployee21, _data$djbEmployee22, _data$djbEmployee23, _data$djbEmployee24, _data$djbEmployee25, _data$djbEmployee25$d, _data$djbEmployee26, _data$disability2, _data$rainWaterHarves8, _data$rainWaterHarves9, _data$rainWaterHarves0, _data$rainWaterHarves1, _data$sewerTreatmentP11, _data$sewerTreatmentP12, _data$sewerTreatmentP13, _data$sewerTreatmentP14, _data$sewerTreatmentP15, _data$sewerTreatmentP16, _data$sewerTreatmentP17, _data$sewerTreatmentP18, _data$sewerTreatmentP19, _Digit0, _Digit0$Customization, _Digit0$Customization2, _Digit1, _Digit1$Customization, _Digit1$Customization2;
|
|
1026
1183
|
const {
|
|
1027
1184
|
signatureFileStoreId,
|
|
1028
1185
|
signatureFileName
|
|
@@ -1062,8 +1219,14 @@ const convertToWSUpdate = data => {
|
|
|
1062
1219
|
} : {}),
|
|
1063
1220
|
...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
|
|
1064
1221
|
...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
|
|
1065
|
-
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$
|
|
1066
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$
|
|
1222
|
+
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves8 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves8 !== void 0 && _data$rainWaterHarves8.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves9 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves9 !== void 0 && _data$rainWaterHarves9.isRainwaterHarvesting),
|
|
1223
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves0 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves0 !== void 0 && _data$rainWaterHarves0.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves1 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves1 !== void 0 && _data$rainWaterHarves1.isRainwaterHarvesting)
|
|
1224
|
+
} : {}),
|
|
1225
|
+
...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
|
|
1226
|
+
...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
|
|
1227
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP11 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP11 !== void 0 && _data$sewerTreatmentP11.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP12 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP12 !== void 0 && _data$sewerTreatmentP12.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP13 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP13 !== void 0 && _data$sewerTreatmentP13.isSewerTreatmentPlant),
|
|
1228
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP14 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP14 !== void 0 && _data$sewerTreatmentP14.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP15 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP15 !== void 0 && _data$sewerTreatmentP15.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP16 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP16 !== void 0 && _data$sewerTreatmentP16.isSewerTreatmentPlant),
|
|
1229
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP17 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP17 !== void 0 && _data$sewerTreatmentP17.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP18 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP18 !== void 0 && _data$sewerTreatmentP18.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP19 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP19 !== void 0 && _data$sewerTreatmentP19.isSewerTreatmentPlant)
|
|
1067
1230
|
} : {}),
|
|
1068
1231
|
...(getNormalizedBankDetails(data) ? {
|
|
1069
1232
|
...getNormalizedBankDetails(data),
|
|
@@ -1075,11 +1238,11 @@ const convertToWSUpdate = data => {
|
|
|
1075
1238
|
}
|
|
1076
1239
|
}
|
|
1077
1240
|
};
|
|
1078
|
-
formdata = (
|
|
1241
|
+
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
1242
|
return formdata;
|
|
1080
1243
|
};
|
|
1081
1244
|
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$
|
|
1245
|
+
var _data$WaterConnection9, _data$WaterConnection0, _data$property, _data$property$auditD, _waterResult$property, _waterResult$property2, _data$property2, _data$property2$audit, _waterResult$auditDet, _data$additionalDetai14, _data$additionalDetai15, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai16, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai17, _waterResult$addition3, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee40, _data$djbEmployee40$d, _data$djbEmployee41, _data$disability3, _data$rainWaterHarves10, _data$rainWaterHarves11, _data$rainWaterHarves12, _data$rainWaterHarves13, _data$sewerTreatmentP20, _data$sewerTreatmentP21, _data$sewerTreatmentP22, _data$sewerTreatmentP23, _data$sewerTreatmentP24, _data$sewerTreatmentP25, _data$sewerTreatmentP26, _data$sewerTreatmentP27, _data$sewerTreatmentP28, _data$waterConnection2, _data$additionalDetai18, _waterResult$addition4, _data$additionalDetai19, _waterResult$addition5, _data$additionalDetai20, _waterResult$addition6, _data$additionalDetai21, _waterResult$addition7, _data$waterConnection3, _data$additionalDetai22, _waterResult$addition8, _data$waterConnection4, _data$additionalDetai23, _waterResult$addition9, _data$waterConnection5, _data$additionalDetai24, _waterResult$addition0, _data$waterConnection6, _data$additionalDetai25, _waterResult$addition1, _data$additionalDetai26, _data$property3, _data$property3$addit, _data$cpt31, _data$cpt31$details, _data$cpt31$details$a, _waterResult$addition10, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2;
|
|
1083
1246
|
const {
|
|
1084
1247
|
signatureFileStoreId,
|
|
1085
1248
|
signatureFileName
|
|
@@ -1117,9 +1280,9 @@ const convertToEditWSUpdate = data => {
|
|
|
1117
1280
|
fileName: signatureFileName
|
|
1118
1281
|
}
|
|
1119
1282
|
} : {}),
|
|
1120
|
-
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$
|
|
1121
|
-
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : (_data$ConnectionDetai5 = _data$ConnectionDetai4.addressType) === null || _data$ConnectionDetai5 === void 0 ? void 0 : _data$ConnectionDetai5.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai6 = data.ConnectionDetails) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6[0]) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$
|
|
1122
|
-
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$
|
|
1283
|
+
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai14 = data.additionalDetails) === null || _data$additionalDetai14 === void 0 ? void 0 : _data$additionalDetai14.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai15 = data.additionalDetails) === null || _data$additionalDetai15 === void 0 ? void 0 : _data$additionalDetai15.CompletelySatisfied : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.CompletelySatisfied,
|
|
1284
|
+
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : (_data$ConnectionDetai5 = _data$ConnectionDetai4.addressType) === null || _data$ConnectionDetai5 === void 0 ? void 0 : _data$ConnectionDetai5.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai6 = data.ConnectionDetails) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6[0]) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai16 = data.additionalDetails) === null || _data$additionalDetai16 === void 0 ? void 0 : _data$additionalDetai16.addressType : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.addressType) || "",
|
|
1285
|
+
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai17 = data.additionalDetails) === null || _data$additionalDetai17 === void 0 ? void 0 : _data$additionalDetai17.completeAddress : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition3 = waterResult.additionalDetails) === null || _waterResult$addition3 === void 0 ? void 0 : _waterResult$addition3.completeAddress) || "",
|
|
1123
1286
|
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
1124
1287
|
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
1125
1288
|
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee27 = data.djbEmployee) === null || _data$djbEmployee27 === void 0 ? void 0 : _data$djbEmployee27.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee28 = data.djbEmployee) === null || _data$djbEmployee28 === void 0 ? void 0 : _data$djbEmployee28.isDjbEmployee) === true,
|
|
@@ -1134,23 +1297,29 @@ const convertToEditWSUpdate = data => {
|
|
|
1134
1297
|
} : {}),
|
|
1135
1298
|
...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
|
|
1136
1299
|
...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
|
|
1137
|
-
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$
|
|
1138
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$
|
|
1300
|
+
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves10 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves10 !== void 0 && _data$rainWaterHarves10.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves11 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves11 !== void 0 && _data$rainWaterHarves11.isRainwaterHarvesting),
|
|
1301
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves12 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves12 !== void 0 && _data$rainWaterHarves12.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves13 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves13 !== void 0 && _data$rainWaterHarves13.isRainwaterHarvesting)
|
|
1302
|
+
} : {}),
|
|
1303
|
+
...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
|
|
1304
|
+
...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
|
|
1305
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP20 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP20 !== void 0 && _data$sewerTreatmentP20.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP21 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP21 !== void 0 && _data$sewerTreatmentP21.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP22 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP22 !== void 0 && _data$sewerTreatmentP22.isSewerTreatmentPlant),
|
|
1306
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP23 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP23 !== void 0 && _data$sewerTreatmentP23.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP24 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP24 !== void 0 && _data$sewerTreatmentP24.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP25 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP25 !== void 0 && _data$sewerTreatmentP25.isSewerTreatmentPlant),
|
|
1307
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP26 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP26 !== void 0 && _data$sewerTreatmentP26.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP27 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP27 !== void 0 && _data$sewerTreatmentP27.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP28 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP28 !== void 0 && _data$sewerTreatmentP28.isSewerTreatmentPlant)
|
|
1139
1308
|
} : {}),
|
|
1140
1309
|
...(getNormalizedBankDetails(data) ? {
|
|
1141
1310
|
...getNormalizedBankDetails(data),
|
|
1142
1311
|
bankDetails: getNormalizedBankDetails(data)
|
|
1143
1312
|
} : {}),
|
|
1144
1313
|
...(data !== null && data !== void 0 && (_data$waterConnection2 = data.waterConnection) !== null && _data$waterConnection2 !== void 0 && _data$waterConnection2.useDetails ? {
|
|
1145
|
-
plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1146
|
-
plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1147
|
-
builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1148
|
-
heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$
|
|
1149
|
-
categoryType: ((_data$waterConnection3 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1150
|
-
propertyCategory: ((_data$waterConnection4 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection4 === void 0 ? void 0 : _data$waterConnection4.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$
|
|
1151
|
-
propertyType: ((_data$waterConnection5 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection5 === void 0 ? void 0 : _data$waterConnection5.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1152
|
-
waterConnectionUsageType: ((_data$waterConnection6 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1153
|
-
numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$
|
|
1314
|
+
plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai18 = data.additionalDetails) === null || _data$additionalDetai18 === void 0 ? void 0 : _data$additionalDetai18.plotArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition4 = waterResult.additionalDetails) === null || _waterResult$addition4 === void 0 ? void 0 : _waterResult$addition4.plotArea),
|
|
1315
|
+
plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai19 = data.additionalDetails) === null || _data$additionalDetai19 === void 0 ? void 0 : _data$additionalDetai19.plotSize) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition5 = waterResult.additionalDetails) === null || _waterResult$addition5 === void 0 ? void 0 : _waterResult$addition5.plotSize),
|
|
1316
|
+
builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai20 = data.additionalDetails) === null || _data$additionalDetai20 === void 0 ? void 0 : _data$additionalDetai20.builtUpArea) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition6 = waterResult.additionalDetails) === null || _waterResult$addition6 === void 0 ? void 0 : _waterResult$addition6.builtUpArea),
|
|
1317
|
+
heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai21 = data.additionalDetails) === null || _data$additionalDetai21 === void 0 ? void 0 : _data$additionalDetai21.heightOfTheBuilding) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition7 = waterResult.additionalDetails) === null || _waterResult$addition7 === void 0 ? void 0 : _waterResult$addition7.heightOfTheBuilding),
|
|
1318
|
+
categoryType: ((_data$waterConnection3 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection3 === void 0 ? void 0 : _data$waterConnection3.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai22 = data.additionalDetails) === null || _data$additionalDetai22 === void 0 ? void 0 : _data$additionalDetai22.categoryType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition8 = waterResult.additionalDetails) === null || _waterResult$addition8 === void 0 ? void 0 : _waterResult$addition8.categoryType),
|
|
1319
|
+
propertyCategory: ((_data$waterConnection4 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection4 === void 0 ? void 0 : _data$waterConnection4.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai23 = data.additionalDetails) === null || _data$additionalDetai23 === void 0 ? void 0 : _data$additionalDetai23.propertyCategory) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition9 = waterResult.additionalDetails) === null || _waterResult$addition9 === void 0 ? void 0 : _waterResult$addition9.propertyCategory),
|
|
1320
|
+
propertyType: ((_data$waterConnection5 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection5 === void 0 ? void 0 : _data$waterConnection5.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai24 = data.additionalDetails) === null || _data$additionalDetai24 === void 0 ? void 0 : _data$additionalDetai24.propertyType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition0 = waterResult.additionalDetails) === null || _waterResult$addition0 === void 0 ? void 0 : _waterResult$addition0.propertyType),
|
|
1321
|
+
waterConnectionUsageType: ((_data$waterConnection6 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection6 === void 0 ? void 0 : _data$waterConnection6.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai25 = data.additionalDetails) === null || _data$additionalDetai25 === void 0 ? void 0 : _data$additionalDetai25.waterConnectionUsageType) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition1 = waterResult.additionalDetails) === null || _waterResult$addition1 === void 0 ? void 0 : _waterResult$addition1.waterConnectionUsageType),
|
|
1322
|
+
numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai26 = data.additionalDetails) === null || _data$additionalDetai26 === void 0 ? void 0 : _data$additionalDetai26.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property3 = data.property) === null || _data$property3 === void 0 ? void 0 : (_data$property3$addit = _data$property3.additionalDetails) === null || _data$property3$addit === void 0 ? void 0 : _data$property3$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt31 = data.cpt) === null || _data$cpt31 === void 0 ? void 0 : (_data$cpt31$details = _data$cpt31.details) === null || _data$cpt31$details === void 0 ? void 0 : (_data$cpt31$details$a = _data$cpt31$details.additionalDetails) === null || _data$cpt31$details$a === void 0 ? void 0 : _data$cpt31$details$a.numberOfDwellingUnits) || (waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition10 = waterResult.additionalDetails) === null || _waterResult$addition10 === void 0 ? void 0 : _waterResult$addition10.numberOfDwellingUnits) || ""
|
|
1154
1323
|
} : {})
|
|
1155
1324
|
},
|
|
1156
1325
|
auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : waterResult === null || waterResult === void 0 ? void 0 : waterResult.auditDetails,
|
|
@@ -1248,11 +1417,11 @@ const convertToEditWSUpdate = data => {
|
|
|
1248
1417
|
assignes: []
|
|
1249
1418
|
}
|
|
1250
1419
|
};
|
|
1251
|
-
formdata = (
|
|
1420
|
+
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
1421
|
return formdata;
|
|
1253
1422
|
};
|
|
1254
1423
|
const convertToEditSWUpdate = data => {
|
|
1255
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$
|
|
1424
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai27, _data$additionalDetai28, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai29, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai30, _SewerageResult$addit3, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee55, _data$djbEmployee55$d, _data$djbEmployee56, _data$disability4, _data$rainWaterHarves14, _data$rainWaterHarves15, _data$rainWaterHarves16, _data$rainWaterHarves17, _data$sewerTreatmentP29, _data$sewerTreatmentP30, _data$sewerTreatmentP31, _data$sewerTreatmentP32, _data$sewerTreatmentP33, _data$sewerTreatmentP34, _data$sewerTreatmentP35, _data$sewerTreatmentP36, _data$sewerTreatmentP37, _data$waterConnection8, _data$additionalDetai31, _SewerageResult$addit4, _data$additionalDetai32, _SewerageResult$addit5, _data$additionalDetai33, _SewerageResult$addit6, _data$additionalDetai34, _SewerageResult$addit7, _data$waterConnection9, _data$additionalDetai35, _SewerageResult$addit8, _data$waterConnection0, _data$additionalDetai36, _SewerageResult$addit9, _data$waterConnection1, _data$additionalDetai37, _SewerageResult$addit0, _data$waterConnection10, _data$additionalDetai38, _SewerageResult$addit1, _data$additionalDetai39, _data$property4, _data$property4$addit, _data$cpt33, _data$cpt33$details, _data$cpt33$details$a, _SewerageResult$addit10, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit12, _Digit12$Customizatio, _Digit12$Customizatio2, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2;
|
|
1256
1425
|
const {
|
|
1257
1426
|
signatureFileStoreId,
|
|
1258
1427
|
signatureFileName
|
|
@@ -1289,9 +1458,9 @@ const convertToEditSWUpdate = data => {
|
|
|
1289
1458
|
fileName: signatureFileName
|
|
1290
1459
|
}
|
|
1291
1460
|
} : {}),
|
|
1292
|
-
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$
|
|
1293
|
-
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.addressType) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$
|
|
1294
|
-
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$
|
|
1461
|
+
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai27 = data.additionalDetails) === null || _data$additionalDetai27 === void 0 ? void 0 : _data$additionalDetai27.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai28 = data.additionalDetails) === null || _data$additionalDetai28 === void 0 ? void 0 : _data$additionalDetai28.CompletelySatisfied : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit = SewerageResult.additionalDetails) === null || _SewerageResult$addit === void 0 ? void 0 : _SewerageResult$addit.CompletelySatisfied,
|
|
1462
|
+
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.addressType) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai29 = data.additionalDetails) === null || _data$additionalDetai29 === void 0 ? void 0 : _data$additionalDetai29.addressType : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit2 = SewerageResult.additionalDetails) === null || _SewerageResult$addit2 === void 0 ? void 0 : _SewerageResult$addit2.addressType) || "",
|
|
1463
|
+
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai30 = data.additionalDetails) === null || _data$additionalDetai30 === void 0 ? void 0 : _data$additionalDetai30.completeAddress : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit3 = SewerageResult.additionalDetails) === null || _SewerageResult$addit3 === void 0 ? void 0 : _SewerageResult$addit3.completeAddress) || "",
|
|
1295
1464
|
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
1296
1465
|
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
1297
1466
|
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee42 = data.djbEmployee) === null || _data$djbEmployee42 === void 0 ? void 0 : _data$djbEmployee42.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee43 = data.djbEmployee) === null || _data$djbEmployee43 === void 0 ? void 0 : _data$djbEmployee43.isDjbEmployee) === true,
|
|
@@ -1306,23 +1475,29 @@ const convertToEditSWUpdate = data => {
|
|
|
1306
1475
|
} : {}),
|
|
1307
1476
|
...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
|
|
1308
1477
|
...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
|
|
1309
|
-
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$
|
|
1310
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$
|
|
1478
|
+
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves14 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves14 !== void 0 && _data$rainWaterHarves14.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves15 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves15 !== void 0 && _data$rainWaterHarves15.isRainwaterHarvesting),
|
|
1479
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves16 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves16 !== void 0 && _data$rainWaterHarves16.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves17 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves17 !== void 0 && _data$rainWaterHarves17.isRainwaterHarvesting)
|
|
1480
|
+
} : {}),
|
|
1481
|
+
...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
|
|
1482
|
+
...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
|
|
1483
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP29 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP29 !== void 0 && _data$sewerTreatmentP29.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP30 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP30 !== void 0 && _data$sewerTreatmentP30.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP31 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP31 !== void 0 && _data$sewerTreatmentP31.isSewerTreatmentPlant),
|
|
1484
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP32 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP32 !== void 0 && _data$sewerTreatmentP32.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP33 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP33 !== void 0 && _data$sewerTreatmentP33.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP34 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP34 !== void 0 && _data$sewerTreatmentP34.isSewerTreatmentPlant),
|
|
1485
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP35 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP35 !== void 0 && _data$sewerTreatmentP35.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP36 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP36 !== void 0 && _data$sewerTreatmentP36.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP37 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP37 !== void 0 && _data$sewerTreatmentP37.isSewerTreatmentPlant)
|
|
1311
1486
|
} : {}),
|
|
1312
1487
|
...(getNormalizedBankDetails(data) ? {
|
|
1313
1488
|
...getNormalizedBankDetails(data),
|
|
1314
1489
|
bankDetails: getNormalizedBankDetails(data)
|
|
1315
1490
|
} : {}),
|
|
1316
1491
|
...(data !== null && data !== void 0 && (_data$waterConnection8 = data.waterConnection) !== null && _data$waterConnection8 !== void 0 && _data$waterConnection8.useDetails ? {
|
|
1317
|
-
plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1318
|
-
plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1319
|
-
builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$
|
|
1320
|
-
heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$
|
|
1321
|
-
categoryType: ((_data$waterConnection9 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection9 === void 0 ? void 0 : _data$waterConnection9.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1322
|
-
propertyCategory: ((_data$waterConnection0 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$
|
|
1323
|
-
propertyType: ((_data$waterConnection1 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection1 === void 0 ? void 0 : _data$waterConnection1.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1324
|
-
waterConnectionUsageType: ((_data$waterConnection10 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$
|
|
1325
|
-
numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$
|
|
1492
|
+
plotArea: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai31 = data.additionalDetails) === null || _data$additionalDetai31 === void 0 ? void 0 : _data$additionalDetai31.plotArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit4 = SewerageResult.additionalDetails) === null || _SewerageResult$addit4 === void 0 ? void 0 : _SewerageResult$addit4.plotArea),
|
|
1493
|
+
plotSize: data.waterConnection.useDetails.plotArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai32 = data.additionalDetails) === null || _data$additionalDetai32 === void 0 ? void 0 : _data$additionalDetai32.plotSize) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit5 = SewerageResult.additionalDetails) === null || _SewerageResult$addit5 === void 0 ? void 0 : _SewerageResult$addit5.plotSize),
|
|
1494
|
+
builtUpArea: data.waterConnection.useDetails.builtUpArea || (data === null || data === void 0 ? void 0 : (_data$additionalDetai33 = data.additionalDetails) === null || _data$additionalDetai33 === void 0 ? void 0 : _data$additionalDetai33.builtUpArea) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit6 = SewerageResult.additionalDetails) === null || _SewerageResult$addit6 === void 0 ? void 0 : _SewerageResult$addit6.builtUpArea),
|
|
1495
|
+
heightOfTheBuilding: data.waterConnection.useDetails.heightOfTheBuilding || (data === null || data === void 0 ? void 0 : (_data$additionalDetai34 = data.additionalDetails) === null || _data$additionalDetai34 === void 0 ? void 0 : _data$additionalDetai34.heightOfTheBuilding) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit7 = SewerageResult.additionalDetails) === null || _SewerageResult$addit7 === void 0 ? void 0 : _SewerageResult$addit7.heightOfTheBuilding),
|
|
1496
|
+
categoryType: ((_data$waterConnection9 = data.waterConnection.useDetails.categoryType) === null || _data$waterConnection9 === void 0 ? void 0 : _data$waterConnection9.code) || data.waterConnection.useDetails.categoryType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai35 = data.additionalDetails) === null || _data$additionalDetai35 === void 0 ? void 0 : _data$additionalDetai35.categoryType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit8 = SewerageResult.additionalDetails) === null || _SewerageResult$addit8 === void 0 ? void 0 : _SewerageResult$addit8.categoryType),
|
|
1497
|
+
propertyCategory: ((_data$waterConnection0 = data.waterConnection.useDetails.propertyCategory) === null || _data$waterConnection0 === void 0 ? void 0 : _data$waterConnection0.code) || data.waterConnection.useDetails.propertyCategory || (data === null || data === void 0 ? void 0 : (_data$additionalDetai36 = data.additionalDetails) === null || _data$additionalDetai36 === void 0 ? void 0 : _data$additionalDetai36.propertyCategory) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit9 = SewerageResult.additionalDetails) === null || _SewerageResult$addit9 === void 0 ? void 0 : _SewerageResult$addit9.propertyCategory),
|
|
1498
|
+
propertyType: ((_data$waterConnection1 = data.waterConnection.useDetails.propertyType) === null || _data$waterConnection1 === void 0 ? void 0 : _data$waterConnection1.code) || data.waterConnection.useDetails.propertyType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai37 = data.additionalDetails) === null || _data$additionalDetai37 === void 0 ? void 0 : _data$additionalDetai37.propertyType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit0 = SewerageResult.additionalDetails) === null || _SewerageResult$addit0 === void 0 ? void 0 : _SewerageResult$addit0.propertyType),
|
|
1499
|
+
waterConnectionUsageType: ((_data$waterConnection10 = data.waterConnection.useDetails.WaterConnectionUsageType) === null || _data$waterConnection10 === void 0 ? void 0 : _data$waterConnection10.code) || data.waterConnection.useDetails.WaterConnectionUsageType || (data === null || data === void 0 ? void 0 : (_data$additionalDetai38 = data.additionalDetails) === null || _data$additionalDetai38 === void 0 ? void 0 : _data$additionalDetai38.waterConnectionUsageType) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit1 = SewerageResult.additionalDetails) === null || _SewerageResult$addit1 === void 0 ? void 0 : _SewerageResult$addit1.waterConnectionUsageType),
|
|
1500
|
+
numberOfDwellingUnits: data.waterConnection.useDetails.NumberofDwellingUnits || (data === null || data === void 0 ? void 0 : (_data$additionalDetai39 = data.additionalDetails) === null || _data$additionalDetai39 === void 0 ? void 0 : _data$additionalDetai39.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$property4 = data.property) === null || _data$property4 === void 0 ? void 0 : (_data$property4$addit = _data$property4.additionalDetails) === null || _data$property4$addit === void 0 ? void 0 : _data$property4$addit.numberOfDwellingUnits) || (data === null || data === void 0 ? void 0 : (_data$cpt33 = data.cpt) === null || _data$cpt33 === void 0 ? void 0 : (_data$cpt33$details = _data$cpt33.details) === null || _data$cpt33$details === void 0 ? void 0 : (_data$cpt33$details$a = _data$cpt33$details.additionalDetails) === null || _data$cpt33$details$a === void 0 ? void 0 : _data$cpt33$details$a.numberOfDwellingUnits) || (SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit10 = SewerageResult.additionalDetails) === null || _SewerageResult$addit10 === void 0 ? void 0 : _SewerageResult$addit10.numberOfDwellingUnits) || ""
|
|
1326
1501
|
} : {})
|
|
1327
1502
|
},
|
|
1328
1503
|
auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.auditDetails,
|
|
@@ -1420,11 +1595,11 @@ const convertToEditSWUpdate = data => {
|
|
|
1420
1595
|
assignes: []
|
|
1421
1596
|
}
|
|
1422
1597
|
};
|
|
1423
|
-
formdata = (
|
|
1598
|
+
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
1599
|
return formdata;
|
|
1425
1600
|
};
|
|
1426
1601
|
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$
|
|
1602
|
+
var _data$SewerageConnect3, _data$SewerageConnect4, _data$cpt35, _data$SewerageConnect5, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _data$djbEmployee57, _data$djbEmployee58, _data$djbEmployee59, _data$djbEmployee60, _data$djbEmployee61, _data$djbEmployee62, _data$djbEmployee63, _data$djbEmployee64, _data$djbEmployee65, _data$djbEmployee66, _data$djbEmployee67, _data$djbEmployee68, _data$djbEmployee69, _data$djbEmployee70, _data$djbEmployee70$d, _data$djbEmployee71, _data$disability5, _data$rainWaterHarves18, _data$rainWaterHarves19, _data$rainWaterHarves20, _data$rainWaterHarves21, _data$sewerTreatmentP38, _data$sewerTreatmentP39, _data$sewerTreatmentP40, _data$sewerTreatmentP41, _data$sewerTreatmentP42, _data$sewerTreatmentP43, _data$sewerTreatmentP44, _data$sewerTreatmentP45, _data$sewerTreatmentP46, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2, _Digit15, _Digit15$Customizatio, _Digit15$Customizatio2;
|
|
1428
1603
|
const {
|
|
1429
1604
|
signatureFileStoreId,
|
|
1430
1605
|
signatureFileName
|
|
@@ -1465,8 +1640,14 @@ const convertToSWUpdate = data => {
|
|
|
1465
1640
|
} : {}),
|
|
1466
1641
|
...((data === null || data === void 0 ? void 0 : data.rainWaterHarvesting) !== undefined ? {
|
|
1467
1642
|
...(data === null || data === void 0 ? void 0 : data.rainWaterHarvesting),
|
|
1468
|
-
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$
|
|
1469
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$
|
|
1643
|
+
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves18 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves18 !== void 0 && _data$rainWaterHarves18.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves19 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves19 !== void 0 && _data$rainWaterHarves19.isRainwaterHarvesting),
|
|
1644
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves20 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves20 !== void 0 && _data$rainWaterHarves20.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves21 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves21 !== void 0 && _data$rainWaterHarves21.isRainwaterHarvesting)
|
|
1645
|
+
} : {}),
|
|
1646
|
+
...((data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) !== undefined ? {
|
|
1647
|
+
...(data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant),
|
|
1648
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP38 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP38 !== void 0 && _data$sewerTreatmentP38.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP39 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP39 !== void 0 && _data$sewerTreatmentP39.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP40 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP40 !== void 0 && _data$sewerTreatmentP40.isSewerTreatmentPlant),
|
|
1649
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP41 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP41 !== void 0 && _data$sewerTreatmentP41.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP42 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP42 !== void 0 && _data$sewerTreatmentP42.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP43 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP43 !== void 0 && _data$sewerTreatmentP43.isSewerTreatmentPlant),
|
|
1650
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP44 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP44 !== void 0 && _data$sewerTreatmentP44.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP45 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP45 !== void 0 && _data$sewerTreatmentP45.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP46 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP46 !== void 0 && _data$sewerTreatmentP46.isSewerTreatmentPlant)
|
|
1470
1651
|
} : {}),
|
|
1471
1652
|
...(getNormalizedBankDetails(data) ? {
|
|
1472
1653
|
...getNormalizedBankDetails(data),
|
|
@@ -1478,12 +1659,12 @@ const convertToSWUpdate = data => {
|
|
|
1478
1659
|
}
|
|
1479
1660
|
}
|
|
1480
1661
|
};
|
|
1481
|
-
formdata = (
|
|
1662
|
+
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
1663
|
return formdata;
|
|
1483
1664
|
};
|
|
1484
1665
|
const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
1485
1666
|
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,
|
|
1667
|
+
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
1668
|
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
1669
|
let plumberInfo = [];
|
|
1489
1670
|
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 +1765,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
|
1584
1765
|
disconnectRequest: true
|
|
1585
1766
|
};
|
|
1586
1767
|
let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
|
|
1587
|
-
returnObject = (
|
|
1768
|
+
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
1769
|
return Promise.resolve(returnObject);
|
|
1589
1770
|
} catch (e) {
|
|
1590
1771
|
return Promise.reject(e);
|
|
@@ -1702,7 +1883,7 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1702
1883
|
};
|
|
1703
1884
|
const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
|
|
1704
1885
|
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,
|
|
1886
|
+
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
1887
|
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
1888
|
let wsPayload = {
|
|
1708
1889
|
WaterConnection: {
|
|
@@ -1754,7 +1935,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
|
|
|
1754
1935
|
disconnectRequest: true
|
|
1755
1936
|
};
|
|
1756
1937
|
let returnObject = (service === null || service === void 0 ? void 0 : service.toUpperCase()) === "WATER" ? wsPayload : swPayload;
|
|
1757
|
-
returnObject = (
|
|
1938
|
+
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
1939
|
return Promise.resolve(returnObject);
|
|
1759
1940
|
} catch (e) {
|
|
1760
1941
|
return Promise.reject(e);
|
|
@@ -1762,7 +1943,7 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
|
|
|
1762
1943
|
};
|
|
1763
1944
|
const updatePayloadOfWSDisconnection = function (data, type) {
|
|
1764
1945
|
try {
|
|
1765
|
-
var _data$plumberInfo, _data$plumberInfo2,
|
|
1946
|
+
var _data$plumberInfo, _data$plumberInfo2, _Digit20, _Digit20$Customizatio, _Digit20$Customizatio2, _Digit21, _Digit21$Customizatio, _Digit21$Customizatio2;
|
|
1766
1947
|
let payload = {
|
|
1767
1948
|
...data,
|
|
1768
1949
|
plumberInfo: data !== null && data !== void 0 && (_data$plumberInfo = data.plumberInfo) !== null && _data$plumberInfo !== void 0 && _data$plumberInfo[0] ? [{
|
|
@@ -1776,7 +1957,7 @@ const updatePayloadOfWSDisconnection = function (data, type) {
|
|
|
1776
1957
|
action: "SUBMIT_APPLICATION"
|
|
1777
1958
|
}
|
|
1778
1959
|
};
|
|
1779
|
-
payload = (
|
|
1960
|
+
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
1961
|
return Promise.resolve(payload);
|
|
1781
1962
|
} catch (e) {
|
|
1782
1963
|
return Promise.reject(e);
|
|
@@ -2284,12 +2465,12 @@ const mapExistingDocIdsToPayload = function (uploadingDocs, existingDocs) {
|
|
|
2284
2465
|
};
|
|
2285
2466
|
const convertEditApplicationDetails = function (data, appData, actionData) {
|
|
2286
2467
|
try {
|
|
2287
|
-
var _data$cpt47, _data$cpt47$details, _data$cpt47$details$o, _appData$applicationD, _data$
|
|
2468
|
+
var _data$cpt47, _data$cpt47$details, _data$cpt47$details$o, _appData$applicationD, _data$DocumentsRequir2, _data$cpt48, _data$cpt48$details, _data$ConnectionDetai15, _data$ConnectionDetai16, _data$ConnectionDetai17, _data$ConnectionDetai18, _data$ConnectionDetai19, _data$ConnectionDetai20, _data$ConnectionDetai21, _data$ConnectionDetai22, _data$ConnectionDetai23, _data$ConnectionDetai24, _data$ConnectionDetai25, _data$ConnectionDetai26, _data$ConnectionDetai27, _data$ConnectionDetai28, _data$ConnectionDetai29, _data$ConnectionDetai30, _data$ConnectionDetai31, _data$ConnectionDetai32, _data$ConnectionHolde58, _data$ConnectionHolde59, _appData$applicationD2, _appData$applicationD3, _data$ConnectionHolde60, _data$ConnectionHolde61, _data$ConnectionHolde62, _data$ConnectionHolde63, _data$ConnectionHolde64, _data$ConnectionHolde65, _data$ConnectionHolde66, _data$ConnectionHolde67, _data$ConnectionHolde68, _data$ConnectionHolde69, _data$ConnectionHolde70, _data$ConnectionHolde71, _data$ConnectionHolde72, _data$ConnectionHolde73, _data$ConnectionHolde74, _data$ConnectionHolde75, _data$ConnectionHolde76, _data$ConnectionHolde77, _data$ConnectionHolde78, _data$ConnectionHolde79, _data$ConnectionHolde80, _data$ConnectionHolde81, _data$ConnectionHolde82, _data$ConnectionHolde83, _data$ConnectionHolde84, _data$ConnectionHolde85, _data$ConnectionHolde86, _data$cpt49;
|
|
2288
2469
|
data === null || data === void 0 ? void 0 : (_data$cpt47 = data.cpt) === null || _data$cpt47 === void 0 ? void 0 : (_data$cpt47$details = _data$cpt47.details) === null || _data$cpt47$details === void 0 ? void 0 : (_data$cpt47$details$o = _data$cpt47$details.owners) === null || _data$cpt47$details$o === void 0 ? void 0 : _data$cpt47$details$o.forEach(owner => {
|
|
2289
2470
|
if (owner !== null && owner !== void 0 && owner.permanentAddress) owner.correspondenceAddress = owner === null || owner === void 0 ? void 0 : owner.permanentAddress;
|
|
2290
2471
|
});
|
|
2291
2472
|
const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD = appData.applicationData) === null || _appData$applicationD === void 0 ? void 0 : _appData$applicationD.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
|
|
2292
|
-
let docs = (data === null || data === void 0 ? void 0 : (_data$
|
|
2473
|
+
let docs = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : _data$DocumentsRequir2.documents) || [];
|
|
2293
2474
|
if (docs && docs.length > 0 && existingDocs && existingDocs.length > 0) {
|
|
2294
2475
|
docs = mapExistingDocIdsToPayload(docs, existingDocs);
|
|
2295
2476
|
}
|
|
@@ -2383,7 +2564,7 @@ const convertDisonnectApplicationData = function (data, serviceType, editByConfi
|
|
|
2383
2564
|
};
|
|
2384
2565
|
const convertDisonnectEditApplicationDetails = function (data, appData, actionData) {
|
|
2385
2566
|
try {
|
|
2386
|
-
var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD6, _appData$applicationD7, _appData$applicationD8, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$
|
|
2567
|
+
var _data$plumberDetails7, _data$plumberDetails8, _data$plumberDetails9, _data$plumberDetails0, _data$plumberDetails1, _data$plumberDetails10, _appData$applicationD6, _appData$applicationD7, _appData$applicationD8, _data$disConnectionDe, _data$disConnectionDe2, _data$disConnectionDe3, _data$disConnectionDe4, _data$DocumentsRequir3, _data$disConnectionDe5, _data$disConnectionDe6;
|
|
2387
2568
|
const docs = sessionStorage.getItem("DISCONNECTION_EDIT_DOCS");
|
|
2388
2569
|
const docsData = docs ? JSON.parse(docs) : "";
|
|
2389
2570
|
const documentsData = [];
|
|
@@ -2411,7 +2592,7 @@ const convertDisonnectEditApplicationDetails = function (data, appData, actionDa
|
|
|
2411
2592
|
}];
|
|
2412
2593
|
const _temp5 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe = data.disConnectionDetails) === null || _data$disConnectionDe === void 0 ? void 0 : (_data$disConnectionDe2 = _data$disConnectionDe[0]) === null || _data$disConnectionDe2 === void 0 ? void 0 : _data$disConnectionDe2.disConnectionReason) || "",
|
|
2413
2594
|
_temp4 = (data === null || data === void 0 ? void 0 : (_data$disConnectionDe3 = data.disConnectionDetails) === null || _data$disConnectionDe3 === void 0 ? void 0 : (_data$disConnectionDe4 = _data$disConnectionDe3[0]) === null || _data$disConnectionDe4 === void 0 ? void 0 : _data$disConnectionDe4.disConnectionType) == "TEMPORARY" ? true : false,
|
|
2414
|
-
_temp3 = (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$
|
|
2595
|
+
_temp3 = (documentsData === null || documentsData === void 0 ? void 0 : documentsData.length) > 0 ? documentsData : data === null || data === void 0 ? void 0 : (_data$DocumentsRequir3 = data.DocumentsRequired) === null || _data$DocumentsRequir3 === void 0 ? void 0 : _data$DocumentsRequir3.documents;
|
|
2415
2596
|
return Promise.resolve(getConvertedDate(data === null || data === void 0 ? void 0 : (_data$disConnectionDe5 = data.disConnectionDetails) === null || _data$disConnectionDe5 === void 0 ? void 0 : (_data$disConnectionDe6 = _data$disConnectionDe5[0]) === null || _data$disConnectionDe6 === void 0 ? void 0 : _data$disConnectionDe6.disConnectionProposeDate)).then(function (_getConvertedDate) {
|
|
2416
2597
|
var _data$plumberDetails11, _data$plumberDetails12, _data$plumberDetails13;
|
|
2417
2598
|
let payload = {
|
|
@@ -2465,8 +2646,8 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
|
|
|
2465
2646
|
var _data$activationDetai5, _data$activationDetai6, _data$activationDetai7, _data$activationDetai8;
|
|
2466
2647
|
function _temp9() {
|
|
2467
2648
|
function _temp7() {
|
|
2468
|
-
var _data$
|
|
2469
|
-
if (data !== null && data !== void 0 && (_data$
|
|
2649
|
+
var _data$DocumentsRequir4, _data$DocumentsRequir5, _data$DocumentsRequir6, _appData$applicationD9, _data$ConnectionHolde87, _data$ConnectionHolde88, _Digit$UserService$ge12, _Digit$UserService$ge13, _Digit$UserService$ge14, _data$DocumentsRequir7, _data$cpt50;
|
|
2650
|
+
if (data !== null && data !== void 0 && (_data$DocumentsRequir4 = data.DocumentsRequired) !== null && _data$DocumentsRequir4 !== void 0 && (_data$DocumentsRequir5 = _data$DocumentsRequir4.documents) !== null && _data$DocumentsRequir5 !== void 0 && _data$DocumentsRequir5.length) formData.documents = data === null || data === void 0 ? void 0 : (_data$DocumentsRequir6 = data.DocumentsRequired) === null || _data$DocumentsRequir6 === void 0 ? void 0 : _data$DocumentsRequir6.documents;else formData.documents = null;
|
|
2470
2651
|
const existingDocs = (appData === null || appData === void 0 ? void 0 : (_appData$applicationD9 = appData.applicationData) === null || _appData$applicationD9 === void 0 ? void 0 : _appData$applicationD9.documents) || (appData === null || appData === void 0 ? void 0 : appData.documents) || [];
|
|
2471
2652
|
if (formData.documents && formData.documents.length > 0 && existingDocs && existingDocs.length > 0) {
|
|
2472
2653
|
formData.documents = mapExistingDocIdsToPayload(formData.documents, existingDocs);
|
|
@@ -2494,7 +2675,7 @@ const convertModifyApplicationDetails = function (data, appData, actionData) {
|
|
|
2494
2675
|
};
|
|
2495
2676
|
formData.action = actionData;
|
|
2496
2677
|
formData.channel = ((_Digit$UserService$ge12 = Digit.UserService.getUser()) === null || _Digit$UserService$ge12 === void 0 ? void 0 : (_Digit$UserService$ge13 = _Digit$UserService$ge12.info) === null || _Digit$UserService$ge13 === void 0 ? void 0 : (_Digit$UserService$ge14 = _Digit$UserService$ge13.type) === null || _Digit$UserService$ge14 === void 0 ? void 0 : _Digit$UserService$ge14.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER";
|
|
2497
|
-
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$
|
|
2678
|
+
sessionStorage.setItem("WS_DOCUMENTS_INOF", JSON.stringify((data === null || data === void 0 ? void 0 : (_data$DocumentsRequir7 = data.DocumentsRequired) === null || _data$DocumentsRequir7 === void 0 ? void 0 : _data$DocumentsRequir7.documents) || []));
|
|
2498
2679
|
sessionStorage.setItem("WS_PROPERTY_INOF", JSON.stringify(data === null || data === void 0 ? void 0 : (_data$cpt50 = data.cpt) === null || _data$cpt50 === void 0 ? void 0 : _data$cpt50.details));
|
|
2499
2680
|
return formData;
|
|
2500
2681
|
}
|
|
@@ -11303,7 +11484,7 @@ const configNOCApproverApplication = _ref => {
|
|
|
11303
11484
|
};
|
|
11304
11485
|
|
|
11305
11486
|
const configWSApproverApplication = _ref => {
|
|
11306
|
-
var _action$action;
|
|
11487
|
+
var _action$action, _businessService$toUp;
|
|
11307
11488
|
let {
|
|
11308
11489
|
t,
|
|
11309
11490
|
action,
|
|
@@ -11369,12 +11550,16 @@ const configWSApproverApplication = _ref => {
|
|
|
11369
11550
|
}
|
|
11370
11551
|
}];
|
|
11371
11552
|
const isActivate = (action === null || action === void 0 ? void 0 : action.action) === "ACTIVATE_CONNECTION";
|
|
11553
|
+
const isAmendment = businessService === null || businessService === void 0 ? void 0 : (_businessService$toUp = businessService.toUpperCase()) === null || _businessService$toUp === void 0 ? void 0 : _businessService$toUp.includes("AMENDMENT");
|
|
11372
11554
|
const getHeadingLabel = () => {
|
|
11373
11555
|
if (isActivate) {
|
|
11374
11556
|
const translated = t("WF_APPROVE_APPLICATION");
|
|
11375
11557
|
if (translated && translated !== "WF_APPROVE_APPLICATION") return translated;
|
|
11376
11558
|
return "Approve Application";
|
|
11377
11559
|
}
|
|
11560
|
+
if (isAmendment) {
|
|
11561
|
+
return `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
|
|
11562
|
+
}
|
|
11378
11563
|
return `WF_${action === null || action === void 0 ? void 0 : action.action}_APPLICATION`;
|
|
11379
11564
|
};
|
|
11380
11565
|
const getSubmitLabel = () => {
|
|
@@ -11387,6 +11572,9 @@ const configWSApproverApplication = _ref => {
|
|
|
11387
11572
|
}
|
|
11388
11573
|
return "Approve Connection";
|
|
11389
11574
|
}
|
|
11575
|
+
if (isAmendment) {
|
|
11576
|
+
return `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
|
|
11577
|
+
}
|
|
11390
11578
|
return `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_${action === null || action === void 0 ? void 0 : action.action}`;
|
|
11391
11579
|
};
|
|
11392
11580
|
return {
|
|
@@ -20789,6 +20977,118 @@ const ApplicationDetails = props => {
|
|
|
20789
20977
|
})) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null));
|
|
20790
20978
|
};
|
|
20791
20979
|
|
|
20980
|
+
const CheckIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
20981
|
+
width: "14",
|
|
20982
|
+
height: "14",
|
|
20983
|
+
viewBox: "0 0 24 24",
|
|
20984
|
+
fill: "none",
|
|
20985
|
+
stroke: "currentColor",
|
|
20986
|
+
strokeWidth: "3",
|
|
20987
|
+
strokeLinecap: "round",
|
|
20988
|
+
strokeLinejoin: "round"
|
|
20989
|
+
}, /*#__PURE__*/React__default.createElement("polyline", {
|
|
20990
|
+
points: "20 6 9 17 4 12"
|
|
20991
|
+
}));
|
|
20992
|
+
const ClockIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
20993
|
+
width: "14",
|
|
20994
|
+
height: "14",
|
|
20995
|
+
viewBox: "0 0 24 24",
|
|
20996
|
+
fill: "none",
|
|
20997
|
+
stroke: "currentColor",
|
|
20998
|
+
strokeWidth: "2",
|
|
20999
|
+
strokeLinecap: "round",
|
|
21000
|
+
strokeLinejoin: "round"
|
|
21001
|
+
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
21002
|
+
cx: "12",
|
|
21003
|
+
cy: "12",
|
|
21004
|
+
r: "10"
|
|
21005
|
+
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
21006
|
+
className: "clock-hands2",
|
|
21007
|
+
points: "12 6 12 12 16 14"
|
|
21008
|
+
}));
|
|
21009
|
+
const WorkflowTimeline = _ref => {
|
|
21010
|
+
var _workflowDetails$data;
|
|
21011
|
+
let {
|
|
21012
|
+
workflowDetails,
|
|
21013
|
+
hideTimeline,
|
|
21014
|
+
setHideTimeline
|
|
21015
|
+
} = _ref;
|
|
21016
|
+
const {
|
|
21017
|
+
t
|
|
21018
|
+
} = reactI18next.useTranslation();
|
|
21019
|
+
const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
|
|
21020
|
+
if (!timeline || timeline.length === 0) {
|
|
21021
|
+
return null;
|
|
21022
|
+
}
|
|
21023
|
+
const getStatusClass = (index, checkpoint) => {
|
|
21024
|
+
var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
|
|
21025
|
+
const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.status) === "ACTIVE" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.isTerminateState);
|
|
21026
|
+
if (index === 0 && !isTerminal) return "current2";
|
|
21027
|
+
return "completed2";
|
|
21028
|
+
};
|
|
21029
|
+
const convertEpochToDateTime = epoch => {
|
|
21030
|
+
if (!epoch) return "N/A";
|
|
21031
|
+
const date = new Date(epoch);
|
|
21032
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
21033
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
21034
|
+
const year = date.getFullYear().toString().slice(-2);
|
|
21035
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
21036
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
21037
|
+
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
21038
|
+
};
|
|
21039
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
21040
|
+
className: "workflow-timeline-card2 digit-form-composer",
|
|
21041
|
+
style: {
|
|
21042
|
+
background: "#fff",
|
|
21043
|
+
padding: "16px",
|
|
21044
|
+
height: hideTimeline ? "100%" : ""
|
|
21045
|
+
}
|
|
21046
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21047
|
+
className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
|
|
21048
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
21049
|
+
style: {
|
|
21050
|
+
marginBottom: "0",
|
|
21051
|
+
fontSize: "16px",
|
|
21052
|
+
fontWeight: "700",
|
|
21053
|
+
color: "#374151"
|
|
21054
|
+
},
|
|
21055
|
+
className: hideTimeline ? "hidden-content" : ""
|
|
21056
|
+
}, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
21057
|
+
className: hideTimeline ? "hidden-content" : "timeline-container2"
|
|
21058
|
+
}, timeline.map((checkpoint, index) => {
|
|
21059
|
+
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
|
|
21060
|
+
const statusClass = getStatusClass(index, checkpoint);
|
|
21061
|
+
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
21062
|
+
const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
|
|
21063
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
21064
|
+
key: index,
|
|
21065
|
+
className: `timeline-item2 ${statusClass}`
|
|
21066
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21067
|
+
className: "timeline-marker2"
|
|
21068
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21069
|
+
className: "timeline-circle2"
|
|
21070
|
+
}, statusClass === "completed2" ? /*#__PURE__*/React__default.createElement(CheckIcon, null) : /*#__PURE__*/React__default.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React__default.createElement("div", {
|
|
21071
|
+
className: "timeline-line2"
|
|
21072
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
21073
|
+
className: "timeline-content2"
|
|
21074
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21075
|
+
className: "timeline-header2"
|
|
21076
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21077
|
+
className: "timeline-title2"
|
|
21078
|
+
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state}`)), /*#__PURE__*/React__default.createElement("span", {
|
|
21079
|
+
className: "timeline-date2"
|
|
21080
|
+
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React__default.createElement("div", {
|
|
21081
|
+
className: "timeline-body2"
|
|
21082
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
21083
|
+
className: `timeline-status-tag2 status-${statusClass}`
|
|
21084
|
+
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state6 = checkpoint.state) === null || _checkpoint$state6 === void 0 ? void 0 : _checkpoint$state6.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state7 = checkpoint.state) === null || _checkpoint$state7 === void 0 ? void 0 : _checkpoint$state7.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React__default.createElement("div", {
|
|
21085
|
+
className: "timeline-comment2"
|
|
21086
|
+
}, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React__default.createElement("div", {
|
|
21087
|
+
className: "timeline-footer2"
|
|
21088
|
+
}, /*#__PURE__*/React__default.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React__default.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
|
|
21089
|
+
})));
|
|
21090
|
+
};
|
|
21091
|
+
|
|
20792
21092
|
const ApplicationDetailsBillAmendment = () => {
|
|
20793
21093
|
var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a3;
|
|
20794
21094
|
const queryParams = Digit.Hooks.useQueryParams();
|
|
@@ -20801,6 +21101,8 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
20801
21101
|
let serviceType = "WATER";
|
|
20802
21102
|
if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
|
|
20803
21103
|
const [showToast, setShowToast] = React.useState(false);
|
|
21104
|
+
const [hideTimeline, setHideTimeline] = React__default.useState(typeof window !== "undefined" ? window.innerWidth < 768 : false);
|
|
21105
|
+
const menuRef = React.useRef();
|
|
20804
21106
|
const {
|
|
20805
21107
|
isLoading,
|
|
20806
21108
|
isError,
|
|
@@ -20847,6 +21149,10 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
20847
21149
|
}
|
|
20848
21150
|
}, [showToast]);
|
|
20849
21151
|
const [showOptions, setShowOptions] = React.useState(false);
|
|
21152
|
+
const closeMenu = () => {
|
|
21153
|
+
setShowOptions(false);
|
|
21154
|
+
};
|
|
21155
|
+
Digit.Hooks.useClickOutside(menuRef, closeMenu, showOptions);
|
|
20850
21156
|
const getAckPdf = function (amendment, tenantId, t, tableData, app) {
|
|
20851
21157
|
try {
|
|
20852
21158
|
const PDFdata = getWSAcknowledgementData$2(amendment, tenantId, t, tableData, app);
|
|
@@ -20866,25 +21172,42 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
20866
21172
|
onClick: () => getAckPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.amendment, tenantId, t, applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationDetails, applicationDetails)
|
|
20867
21173
|
}];
|
|
20868
21174
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
20869
|
-
className: "employee-main-application-details"
|
|
20870
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
20871
|
-
className: "employee-application-details",
|
|
21175
|
+
className: "employee-main-application-details",
|
|
20872
21176
|
style: {
|
|
20873
|
-
|
|
21177
|
+
display: "flex",
|
|
21178
|
+
gap: "20px"
|
|
20874
21179
|
}
|
|
20875
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
20876
|
-
|
|
20877
|
-
|
|
20878
|
-
|
|
20879
|
-
|
|
21180
|
+
}, isEmployee && /*#__PURE__*/React__default.createElement("div", {
|
|
21181
|
+
className: `workflow-timeline-wrapper no-scrollbar ${hideTimeline ? "hide-workflow" : ""}`,
|
|
21182
|
+
style: {
|
|
21183
|
+
flex: "1 1 300px",
|
|
21184
|
+
maxWidth: hideTimeline ? "fit-content" : "400px",
|
|
21185
|
+
transition: "max-width 0.3s"
|
|
20880
21186
|
}
|
|
20881
|
-
},
|
|
20882
|
-
|
|
21187
|
+
}, /*#__PURE__*/React__default.createElement(WorkflowTimeline, {
|
|
21188
|
+
workflowDetails: workflowDetails,
|
|
21189
|
+
hideTimeline: hideTimeline,
|
|
21190
|
+
setHideTimeline: setHideTimeline
|
|
21191
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
21192
|
+
style: {
|
|
21193
|
+
flex: "2 1 500px",
|
|
21194
|
+
minWidth: "300px",
|
|
21195
|
+
position: "relative"
|
|
21196
|
+
}
|
|
21197
|
+
}, dowloadOptions && dowloadOptions.length > 0 && /*#__PURE__*/React__default.createElement("div", {
|
|
21198
|
+
style: {
|
|
21199
|
+
position: "absolute",
|
|
21200
|
+
right: "24px",
|
|
21201
|
+
zIndex: 11
|
|
21202
|
+
}
|
|
21203
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.MultiLink, {
|
|
21204
|
+
className: "multilinkWrapper employee-mulitlink-main-divNew",
|
|
20883
21205
|
onHeadClick: () => setShowOptions(!showOptions),
|
|
20884
21206
|
displayOptions: showOptions,
|
|
20885
21207
|
options: dowloadOptions,
|
|
20886
21208
|
downloadBtnClassName: "employee-download-btn-className",
|
|
20887
|
-
optionsClassName: "employee-options-btn-className"
|
|
21209
|
+
optionsClassName: "employee-options-btn-className",
|
|
21210
|
+
ref: menuRef
|
|
20888
21211
|
})), /*#__PURE__*/React__default.createElement(ApplicationDetails, {
|
|
20889
21212
|
applicationDetails: applicationDetails,
|
|
20890
21213
|
isLoading: isLoading,
|
|
@@ -20897,8 +21220,9 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
20897
21220
|
showToast: showToast,
|
|
20898
21221
|
setShowToast: setShowToast,
|
|
20899
21222
|
closeToast: () => setShowToast(null),
|
|
20900
|
-
timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_
|
|
20901
|
-
|
|
21223
|
+
timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`,
|
|
21224
|
+
showTimeLine: !isEmployee
|
|
21225
|
+
}))), showToast ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
20902
21226
|
isDleteBtn: true,
|
|
20903
21227
|
error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
|
|
20904
21228
|
label: isSuccess ? showToast === null || showToast === void 0 ? void 0 : showToast.label : updateError === null || updateError === void 0 ? void 0 : updateError.Error
|
|
@@ -25395,8 +25719,9 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
25395
25719
|
isclickable: false
|
|
25396
25720
|
}, {
|
|
25397
25721
|
path: "/digit-ui/employee/ws/generate-note-bill-amendment",
|
|
25398
|
-
label: t("
|
|
25399
|
-
show: location.pathname.includes("/generate-note-bill-amendment") ? true : false
|
|
25722
|
+
label: fromScreen ? `${t(fromScreen)} / ${t("WS_APPLICATION_DETAILS_HEADER")}` : t("WS_APPLICATION_DETAILS_HEADER"),
|
|
25723
|
+
show: location.pathname.includes("/generate-note-bill-amendment") ? true : false,
|
|
25724
|
+
isBack: fromScreen && true
|
|
25400
25725
|
}, {
|
|
25401
25726
|
path: "/digit-ui/employee/ws/water/bulk-bil",
|
|
25402
25727
|
label: t("CS_TITLE_BULK_BILL"),
|
|
@@ -25625,9 +25950,11 @@ const App$1 = _ref2 => {
|
|
|
25625
25950
|
})
|
|
25626
25951
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
25627
25952
|
path: `${path}/generate-note-bill-amendment`,
|
|
25628
|
-
component: () => /*#__PURE__*/React__default.createElement(
|
|
25953
|
+
component: () => /*#__PURE__*/React__default.createElement(digitUiReactComponents.LayoutWrapper, {
|
|
25954
|
+
layoutClass: "action"
|
|
25955
|
+
}, /*#__PURE__*/React__default.createElement(WSApplicationDetailsBillAmendment, {
|
|
25629
25956
|
path
|
|
25630
|
-
})
|
|
25957
|
+
}))
|
|
25631
25958
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
25632
25959
|
path: `${path}/response`,
|
|
25633
25960
|
component: () => /*#__PURE__*/React__default.createElement(Response, {
|
|
@@ -31393,21 +31720,23 @@ const UploadFileDigiLocker = props => {
|
|
|
31393
31720
|
const handleFileUpload = e => {
|
|
31394
31721
|
const file = e.target.files[0];
|
|
31395
31722
|
if (file) {
|
|
31396
|
-
|
|
31723
|
+
const maxSize = props.maxSize || 5242880;
|
|
31724
|
+
const maxSizeText = props.maxSizeText || "5MB";
|
|
31725
|
+
if (file.size > maxSize) {
|
|
31397
31726
|
setShowToast({
|
|
31398
31727
|
error: true,
|
|
31399
|
-
label:
|
|
31728
|
+
label: props.sizeErrorMessage || `File size should not exceed ${maxSizeText}.`
|
|
31400
31729
|
});
|
|
31401
31730
|
inpRef.current.value = "";
|
|
31402
31731
|
return;
|
|
31403
31732
|
}
|
|
31404
|
-
const allowedTypes = ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
|
|
31733
|
+
const allowedTypes = props.allowedTypes || ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
|
|
31405
31734
|
const fileExtension = file.name.split('.').pop().toLowerCase();
|
|
31406
|
-
const allowedExtensions = ["pdf", "jpeg", "png", "jpg"];
|
|
31735
|
+
const allowedExtensions = props.allowedExtensions || ["pdf", "jpeg", "png", "jpg"];
|
|
31407
31736
|
if (!allowedTypes.includes(file.type) && !allowedExtensions.includes(fileExtension)) {
|
|
31408
31737
|
setShowToast({
|
|
31409
31738
|
error: true,
|
|
31410
|
-
label:
|
|
31739
|
+
label: props.formatErrorMessage || `Invalid file format. Only ${props.allowedFormatsText || "PDF, JPG, and PNG"} are allowed.`
|
|
31411
31740
|
});
|
|
31412
31741
|
inpRef.current.value = "";
|
|
31413
31742
|
return;
|
|
@@ -31551,11 +31880,16 @@ const isOtherDocument = function (code) {
|
|
|
31551
31880
|
}
|
|
31552
31881
|
return code.toUpperCase().includes("OTHER");
|
|
31553
31882
|
};
|
|
31554
|
-
const isRwhDocType = doc => {
|
|
31883
|
+
const isRwhDocType$1 = doc => {
|
|
31555
31884
|
if (!doc) return false;
|
|
31556
31885
|
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
31557
31886
|
return str.includes("RAIN") || str.includes("HARVEST");
|
|
31558
31887
|
};
|
|
31888
|
+
const isStpDocType$1 = doc => {
|
|
31889
|
+
if (!doc) return false;
|
|
31890
|
+
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
31891
|
+
return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
|
|
31892
|
+
};
|
|
31559
31893
|
const removeDuplicateOtherDocuments = function (documentList) {
|
|
31560
31894
|
if (documentList === void 0) {
|
|
31561
31895
|
documentList = [];
|
|
@@ -31568,8 +31902,51 @@ const removeDuplicateOtherDocuments = function (documentList) {
|
|
|
31568
31902
|
return true;
|
|
31569
31903
|
});
|
|
31570
31904
|
};
|
|
31905
|
+
const getDocUploadSpecs = (doc, isApplicantPhoto) => {
|
|
31906
|
+
const code = ((doc === null || doc === void 0 ? void 0 : doc.code) || "").toUpperCase();
|
|
31907
|
+
if (isApplicantPhoto || code === "OWNER.APPLICANTPHOTO" || code.includes("PHOTO")) {
|
|
31908
|
+
return {
|
|
31909
|
+
type: "PHOTO",
|
|
31910
|
+
maxSize: 200 * 1024,
|
|
31911
|
+
maxSizeText: "200KB",
|
|
31912
|
+
allowedExtensions: ["jpg", "jpeg"],
|
|
31913
|
+
allowedMimeTypes: ["image/jpeg", "image/jpg"],
|
|
31914
|
+
allowedFormatsText: "JPEG",
|
|
31915
|
+
accept: "image/jpeg, .jpg, .jpeg",
|
|
31916
|
+
uiMessage: "Allowed format: JPEG | Max file size: 200KB",
|
|
31917
|
+
formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Applicant Photo",
|
|
31918
|
+
sizeErrorMessage: "Applicant Photo size should not exceed 200KB"
|
|
31919
|
+
};
|
|
31920
|
+
}
|
|
31921
|
+
if (code === "OWNER.OWNERSHIPPROOF" || code.includes("OWNERSHIP")) {
|
|
31922
|
+
return {
|
|
31923
|
+
type: "OWNERSHIP",
|
|
31924
|
+
maxSize: 5 * 1024 * 1024,
|
|
31925
|
+
maxSizeText: "5MB",
|
|
31926
|
+
allowedExtensions: ["pdf"],
|
|
31927
|
+
allowedMimeTypes: ["application/pdf"],
|
|
31928
|
+
allowedFormatsText: "PDF",
|
|
31929
|
+
accept: ".pdf, application/pdf",
|
|
31930
|
+
uiMessage: "Allowed format: PDF | Max file size: 5MB",
|
|
31931
|
+
formatErrorMessage: "Only PDF format (.pdf) is allowed for Ownership Documents",
|
|
31932
|
+
sizeErrorMessage: "Ownership Document size should not exceed 5MB"
|
|
31933
|
+
};
|
|
31934
|
+
}
|
|
31935
|
+
return {
|
|
31936
|
+
type: "ID_OR_OTHER",
|
|
31937
|
+
maxSize: 1024 * 1024,
|
|
31938
|
+
maxSizeText: "1MB",
|
|
31939
|
+
allowedExtensions: ["pdf", "jpg", "jpeg"],
|
|
31940
|
+
allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
|
|
31941
|
+
allowedFormatsText: "PDF, JPEG",
|
|
31942
|
+
accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
|
|
31943
|
+
uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
|
|
31944
|
+
formatErrorMessage: "Only PDF and JPEG formats are allowed for this document",
|
|
31945
|
+
sizeErrorMessage: "File size should not exceed 1MB"
|
|
31946
|
+
};
|
|
31947
|
+
};
|
|
31571
31948
|
const WSDocumentsEmployee = _ref => {
|
|
31572
|
-
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;
|
|
31949
|
+
var _formData$ConnectionD, _formData$ConnectionD2, _formData$ConnectionD3, _formData$application, _formData$application2, _formData$application3, _formData$connectionH, _formData$connectionH2, _formData$ConnectionH, _formData$ConnectionH2, _formData$additionalD, _formData$rainWaterHa, _formData$rainWaterHa2, _formData$rainWaterHa3, _formData$rainWaterHa4, _formData$additionalD2, _formData$additionalD3, _formData$sewerTreatm, _formData$sewerTreatm2, _formData$sewerTreatm3, _formData$sewerTreatm4, _formData$sewerTreatm5, _formData$sewerTreatm6, _formData$additionalD4, _formData$additionalD5, _formData$additionalD6, _Digit$SessionStorage, _applicationDetailsDa, _applicationDetailsDa2, _wsDocs$wsDocsData3;
|
|
31573
31950
|
let {
|
|
31574
31951
|
t,
|
|
31575
31952
|
config,
|
|
@@ -31589,6 +31966,7 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31589
31966
|
};
|
|
31590
31967
|
const isTenant = checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : (_formData$ConnectionD2 = _formData$ConnectionD[0]) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : _formData$ConnectionD3.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application = formData.applicationSelection) === null || _formData$application === void 0 ? void 0 : _formData$application.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application2 = formData.applicationSelection) === null || _formData$application2 === void 0 ? void 0 : (_formData$application3 = _formData$application2[0]) === null || _formData$application3 === void 0 ? void 0 : _formData$application3.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH = formData.connectionHolders) === null || _formData$connectionH === void 0 ? void 0 : (_formData$connectionH2 = _formData$connectionH[0]) === null || _formData$connectionH2 === void 0 ? void 0 : _formData$connectionH2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH = formData.ConnectionHolderDetails) === null || _formData$ConnectionH === void 0 ? void 0 : (_formData$ConnectionH2 = _formData$ConnectionH[0]) === null || _formData$ConnectionH2 === void 0 ? void 0 : _formData$ConnectionH2.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.applicantType);
|
|
31591
31968
|
const isRwhMandatory = !!((formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa = formData.rainWaterHarvesting) === null || _formData$rainWaterHa === void 0 ? void 0 : _formData$rainWaterHa.hasCertificate) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa2 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa2 === void 0 ? void 0 : _formData$rainWaterHa2.hasCertificate) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa3 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa3 === void 0 ? void 0 : _formData$rainWaterHa3.isRainwaterHarvesting) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$rainWaterHa4 = formData.rainWaterHarvesting) === null || _formData$rainWaterHa4 === void 0 ? void 0 : _formData$rainWaterHa4.isRainwaterHarvesting) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasRainWaterHarvestingCertificate) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.isRainwaterHarvesting) === true);
|
|
31969
|
+
const isStpMandatory = !!((formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm === void 0 ? void 0 : _formData$sewerTreatm.hasCertificate) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm2 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm2 === void 0 ? void 0 : _formData$sewerTreatm2.hasCertificate) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm3 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm3 === void 0 ? void 0 : _formData$sewerTreatm3.hasStp) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm4 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm4 === void 0 ? void 0 : _formData$sewerTreatm4.hasStp) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm5 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm5 === void 0 ? void 0 : _formData$sewerTreatm5.isSewerTreatmentPlant) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$sewerTreatm6 = formData.sewerTreatmentPlant) === null || _formData$sewerTreatm6 === void 0 ? void 0 : _formData$sewerTreatm6.isSewerTreatmentPlant) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.hasSewerTreatmentPlant) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.hasStp) === true || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : _formData$additionalD6.isSewerTreatmentPlant) === true);
|
|
31592
31970
|
const sessionDjb = (_Digit$SessionStorage = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.djbEmployee;
|
|
31593
31971
|
const djbData = (formData === null || formData === void 0 ? void 0 : formData.djbEmployee) || sessionDjb || (formData === null || formData === void 0 ? void 0 : formData.additionalDetails);
|
|
31594
31972
|
const isDjbEmployee = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
@@ -31615,7 +31993,8 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31615
31993
|
});
|
|
31616
31994
|
const [enableSubmit, setEnableSubmit] = React.useState(true);
|
|
31617
31995
|
const [error, setError] = React.useState(null);
|
|
31618
|
-
const hasRwhUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isRwhDocType(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
|
|
31996
|
+
const hasRwhUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isRwhDocType$1(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
|
|
31997
|
+
const hasStpUploaded = documents === null || documents === void 0 ? void 0 : documents.some(item => isStpDocType$1(item) && (item === null || item === void 0 ? void 0 : item.fileStoreId));
|
|
31619
31998
|
const wsDocsData = window.location.href.includes("modify") ? "ModifyConnectionDocuments" : window.location.href.includes("disconnection") ? "DisconnectionDocuments" : "NewWSDocuments";
|
|
31620
31999
|
let action = "create";
|
|
31621
32000
|
const {
|
|
@@ -31842,6 +32221,8 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31842
32221
|
isOtherDocument: isOther,
|
|
31843
32222
|
isRwhMandatory: isRwhMandatory,
|
|
31844
32223
|
hasRwhUploaded: hasRwhUploaded,
|
|
32224
|
+
isStpMandatory: isStpMandatory,
|
|
32225
|
+
hasStpUploaded: hasStpUploaded,
|
|
31845
32226
|
isTenant: isTenant
|
|
31846
32227
|
});
|
|
31847
32228
|
}), isDjbEmployee && /*#__PURE__*/React__default.createElement(EmployeeIdDocumentUpload, {
|
|
@@ -31869,7 +32250,25 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31869
32250
|
color: "#d32f2f",
|
|
31870
32251
|
fontWeight: "600"
|
|
31871
32252
|
}
|
|
31872
|
-
}, "\u26A0\uFE0F ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
|
|
32253
|
+
}, "\u26A0\uFE0F", " ", t("WS_RWH_CERTIFICATE_MANDATORY_INSTRUCTION") || "Rain Water Harvesting Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
|
|
32254
|
+
const stpAlertBanner = !isTenant && isStpMandatory && !hasStpUploaded ? /*#__PURE__*/React__default.createElement("div", {
|
|
32255
|
+
style: {
|
|
32256
|
+
display: "flex",
|
|
32257
|
+
alignItems: "center",
|
|
32258
|
+
gap: "10px",
|
|
32259
|
+
marginBottom: "16px",
|
|
32260
|
+
padding: "10px 14px",
|
|
32261
|
+
backgroundColor: "#fff2f0",
|
|
32262
|
+
borderLeft: "4px solid #ff4d4f",
|
|
32263
|
+
borderRadius: "4px"
|
|
32264
|
+
}
|
|
32265
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
32266
|
+
style: {
|
|
32267
|
+
fontSize: "14px",
|
|
32268
|
+
color: "#d32f2f",
|
|
32269
|
+
fontWeight: "600"
|
|
32270
|
+
}
|
|
32271
|
+
}, "\u26A0\uFE0F", " ", t("WS_STP_CERTIFICATE_MANDATORY_INSTRUCTION") || "Sewer Treatment Plant (STP) Certificate is mandatory to upload. Please upload it under Other Documents.")) : null;
|
|
31873
32272
|
const nocDownloadSection = isTenant ? /*#__PURE__*/React__default.createElement("div", {
|
|
31874
32273
|
style: {
|
|
31875
32274
|
marginBottom: "20px",
|
|
@@ -31903,24 +32302,6 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31903
32302
|
whiteSpace: "nowrap"
|
|
31904
32303
|
}
|
|
31905
32304
|
}, 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
32305
|
if (userType === "citizen") {
|
|
31925
32306
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(Timeline, {
|
|
31926
32307
|
currentStep: 3
|
|
@@ -31930,19 +32311,23 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31930
32311
|
onSelect: goNext,
|
|
31931
32312
|
onSkip: () => onSelect(),
|
|
31932
32313
|
isDisabled: enableSubmit
|
|
31933
|
-
},
|
|
32314
|
+
}, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
31934
32315
|
label: error,
|
|
31935
32316
|
onClose: () => setError(null),
|
|
31936
|
-
error: true
|
|
32317
|
+
error: true,
|
|
32318
|
+
isDleteBtn: true,
|
|
32319
|
+
duration: 3000
|
|
31937
32320
|
})));
|
|
31938
32321
|
}
|
|
31939
32322
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
31940
32323
|
title: t("WS_DOCUMENTS"),
|
|
31941
32324
|
defaultOpen: true
|
|
31942
|
-
},
|
|
32325
|
+
}, rwhAlertBanner, stpAlertBanner, nocDownloadSection, innerContent, error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
31943
32326
|
label: error,
|
|
31944
32327
|
onClose: () => setError(null),
|
|
31945
|
-
error: true
|
|
32328
|
+
error: true,
|
|
32329
|
+
isDleteBtn: true,
|
|
32330
|
+
duration: 3000
|
|
31946
32331
|
}));
|
|
31947
32332
|
};
|
|
31948
32333
|
function EmployeeIdDocumentUpload(_ref2) {
|
|
@@ -31964,6 +32349,16 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
31964
32349
|
const [uploadedFile, setUploadedFile] = React.useState(initialFileId || null);
|
|
31965
32350
|
const [fileName, setFileName] = React.useState((existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileName) || "");
|
|
31966
32351
|
const [errorUpload, setErrorUpload] = React.useState(null);
|
|
32352
|
+
const specs = {
|
|
32353
|
+
maxSize: 1024 * 1024,
|
|
32354
|
+
maxSizeText: "1MB",
|
|
32355
|
+
allowedExtensions: ["pdf", "jpg", "jpeg"],
|
|
32356
|
+
allowedMimeTypes: ["application/pdf", "image/jpeg", "image/jpg"],
|
|
32357
|
+
accept: ".pdf, application/pdf, image/jpeg, .jpg, .jpeg",
|
|
32358
|
+
uiMessage: "Allowed formats: PDF, JPEG | Max file size: 1MB",
|
|
32359
|
+
formatErrorMessage: "Only PDF and JPEG formats are allowed for Employee ID Document",
|
|
32360
|
+
sizeErrorMessage: "Employee ID Document size should not exceed 1MB"
|
|
32361
|
+
};
|
|
31967
32362
|
React.useEffect(() => {
|
|
31968
32363
|
var _formData$djbEmployee7, _formData$djbEmployee8, _formData$djbEmployee9, _formData$djbEmployee0;
|
|
31969
32364
|
const doc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
|
|
@@ -31980,60 +32375,64 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
31980
32375
|
(function () {
|
|
31981
32376
|
try {
|
|
31982
32377
|
setErrorUpload(null);
|
|
31983
|
-
|
|
32378
|
+
return function () {
|
|
31984
32379
|
if (file) {
|
|
31985
|
-
const
|
|
31986
|
-
|
|
31987
|
-
|
|
31988
|
-
|
|
31989
|
-
|
|
31990
|
-
|
|
31991
|
-
|
|
31992
|
-
|
|
31993
|
-
|
|
31994
|
-
|
|
31995
|
-
|
|
31996
|
-
|
|
31997
|
-
|
|
31998
|
-
|
|
31999
|
-
|
|
32000
|
-
|
|
32001
|
-
|
|
32002
|
-
|
|
32003
|
-
|
|
32004
|
-
|
|
32005
|
-
|
|
32006
|
-
|
|
32007
|
-
|
|
32008
|
-
|
|
32009
|
-
|
|
32010
|
-
|
|
32011
|
-
|
|
32012
|
-
|
|
32013
|
-
|
|
32014
|
-
|
|
32015
|
-
|
|
32016
|
-
|
|
32017
|
-
|
|
32018
|
-
|
|
32019
|
-
|
|
32020
|
-
|
|
32021
|
-
|
|
32022
|
-
|
|
32023
|
-
}
|
|
32024
|
-
setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
|
|
32025
|
-
}
|
|
32380
|
+
const ext = (file.name || "").split(".").pop().toLowerCase();
|
|
32381
|
+
const isExtAllowed = specs.allowedExtensions.includes(ext);
|
|
32382
|
+
const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
|
|
32383
|
+
if (!isExtAllowed && !isMimeAllowed) {
|
|
32384
|
+
setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
|
|
32385
|
+
setFile(null);
|
|
32386
|
+
return;
|
|
32387
|
+
}
|
|
32388
|
+
if (file.size > specs.maxSize) {
|
|
32389
|
+
setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
|
|
32390
|
+
setFile(null);
|
|
32391
|
+
return;
|
|
32392
|
+
}
|
|
32393
|
+
const _temp = _catch(function () {
|
|
32394
|
+
setUploadedFile(null);
|
|
32395
|
+
const stateOrTenantId = (tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0]) || Digit.ULBService.getStateId();
|
|
32396
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, stateOrTenantId)).then(function (response) {
|
|
32397
|
+
var _response$data, _response$data$files;
|
|
32398
|
+
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) {
|
|
32399
|
+
var _response$data2, _response$data2$files;
|
|
32400
|
+
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;
|
|
32401
|
+
const nameOfFile = (file === null || file === void 0 ? void 0 : file.name) || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || "Employee_ID_Document";
|
|
32402
|
+
setUploadedFile(fileId);
|
|
32403
|
+
setFileName(nameOfFile);
|
|
32404
|
+
setDocuments(prevDocs => {
|
|
32405
|
+
var _formData$djbEmployee10;
|
|
32406
|
+
const filtered = (prevDocs || []).filter(d => {
|
|
32407
|
+
var _d$documentType7;
|
|
32408
|
+
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"));
|
|
32409
|
+
});
|
|
32410
|
+
return [...filtered, {
|
|
32411
|
+
documentType: "OWNER.DJB_EMPLOYEE_ID",
|
|
32412
|
+
fileStoreId: fileId,
|
|
32413
|
+
fileName: nameOfFile,
|
|
32414
|
+
documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
|
|
32415
|
+
documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
|
|
32416
|
+
i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
|
|
32417
|
+
status: "ACTIVE"
|
|
32418
|
+
}];
|
|
32026
32419
|
});
|
|
32027
|
-
|
|
32420
|
+
if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
|
|
32421
|
+
formSetValue("djbEmployee", {
|
|
32422
|
+
...formData.djbEmployee,
|
|
32423
|
+
document: fileId
|
|
32424
|
+
});
|
|
32425
|
+
}
|
|
32426
|
+
} else {
|
|
32028
32427
|
setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
|
|
32029
|
-
}
|
|
32030
|
-
|
|
32031
|
-
|
|
32032
|
-
|
|
32033
|
-
|
|
32428
|
+
}
|
|
32429
|
+
});
|
|
32430
|
+
}, function () {
|
|
32431
|
+
setErrorUpload(t("CS_FILE_UPLOAD_ERROR") || "File Upload Error");
|
|
32432
|
+
});
|
|
32433
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
32034
32434
|
}
|
|
32035
32435
|
}();
|
|
32036
|
-
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
32037
32436
|
} catch (e) {
|
|
32038
32437
|
Promise.reject(e);
|
|
32039
32438
|
}
|
|
@@ -32042,9 +32441,18 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32042
32441
|
function selectfile(e) {
|
|
32043
32442
|
var _e$target, _e$target$files;
|
|
32044
32443
|
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];
|
|
32444
|
+
setErrorUpload(null);
|
|
32045
32445
|
if (selected) {
|
|
32046
|
-
|
|
32047
|
-
|
|
32446
|
+
const ext = (selected.name || "").split(".").pop().toLowerCase();
|
|
32447
|
+
const isExtAllowed = specs.allowedExtensions.includes(ext);
|
|
32448
|
+
const isMimeAllowed = specs.allowedMimeTypes.includes(selected.type);
|
|
32449
|
+
if (!isExtAllowed && !isMimeAllowed) {
|
|
32450
|
+
setErrorUpload(t("WS_ONLY_PDF_JPEG_ALLOWED_EMP") || specs.formatErrorMessage);
|
|
32451
|
+
if (e !== null && e !== void 0 && e.target) e.target.value = "";
|
|
32452
|
+
return;
|
|
32453
|
+
}
|
|
32454
|
+
if (selected.size > specs.maxSize) {
|
|
32455
|
+
setErrorUpload(t("WS_EMP_ID_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage);
|
|
32048
32456
|
if (e !== null && e !== void 0 && e.target) e.target.value = "";
|
|
32049
32457
|
return;
|
|
32050
32458
|
}
|
|
@@ -32127,11 +32535,11 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32127
32535
|
}, "*"))), /*#__PURE__*/React__default.createElement("div", {
|
|
32128
32536
|
style: {
|
|
32129
32537
|
fontSize: "12px",
|
|
32130
|
-
color: "#
|
|
32538
|
+
color: "#555",
|
|
32131
32539
|
marginTop: "-2px",
|
|
32132
32540
|
marginBottom: "4px"
|
|
32133
32541
|
}
|
|
32134
|
-
},
|
|
32542
|
+
}, specs.uiMessage), /*#__PURE__*/React__default.createElement("div", {
|
|
32135
32543
|
className: "field",
|
|
32136
32544
|
style: {
|
|
32137
32545
|
display: "flex",
|
|
@@ -32147,7 +32555,7 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32147
32555
|
id: "employee-doc-upload",
|
|
32148
32556
|
extraStyleName: "propertyCreate",
|
|
32149
32557
|
placeholder: t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"),
|
|
32150
|
-
accept:
|
|
32558
|
+
accept: specs.accept,
|
|
32151
32559
|
onUpload: selectfile,
|
|
32152
32560
|
onDelete: handleDelete,
|
|
32153
32561
|
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
|
|
@@ -32155,7 +32563,13 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32155
32563
|
uploadedFiles: uploadedFile && !file ? [[fileName || t("WS_UPLOAD_EMPLOYEE_ID_DOC") || t("Upload Employee ID Document"), {
|
|
32156
32564
|
fileStoreId: uploadedFile
|
|
32157
32565
|
}]] : undefined
|
|
32158
|
-
}))),
|
|
32566
|
+
}))), errorUpload && /*#__PURE__*/React__default.createElement("div", {
|
|
32567
|
+
style: {
|
|
32568
|
+
fontSize: "12px",
|
|
32569
|
+
color: "#d32f2f",
|
|
32570
|
+
marginTop: "4px"
|
|
32571
|
+
}
|
|
32572
|
+
}, errorUpload), uploadedFile && /*#__PURE__*/React__default.createElement("div", {
|
|
32159
32573
|
style: {
|
|
32160
32574
|
display: "flex",
|
|
32161
32575
|
alignItems: "center",
|
|
@@ -32193,7 +32607,7 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
32193
32607
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.RemoveIcon, null)))));
|
|
32194
32608
|
}
|
|
32195
32609
|
function SelectDocument$2(_ref3) {
|
|
32196
|
-
var _doc$code4, _doc$code5, _doc$code6, _doc$code7, _selectedDocument$cod, _selectedDocument$cod2, _selectedDocument$nam, _selectedDocument$nam2, _selectedDocument$i, _formData$ConnectionD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$application4, _formData$application5, _formData$application6, _formData$connectionH3, _formData$connectionH4, _formData$ConnectionH3, _formData$ConnectionH4, _formData$
|
|
32610
|
+
var _doc$code4, _doc$code5, _doc$code6, _doc$code7, _selectedDocument$cod, _selectedDocument$cod2, _selectedDocument$nam, _selectedDocument$nam2, _selectedDocument$i, _formData$ConnectionD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$application4, _formData$application5, _formData$application6, _formData$connectionH3, _formData$connectionH4, _formData$ConnectionH3, _formData$ConnectionH4, _formData$additionalD7, _formData$ConnectionD7, _doc$i18nKey, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15, _selectedDocument$cod16, _selectedDocument$cod17, _doc$i18nKey2;
|
|
32197
32611
|
let {
|
|
32198
32612
|
t,
|
|
32199
32613
|
document: doc,
|
|
@@ -32212,6 +32626,8 @@ function SelectDocument$2(_ref3) {
|
|
|
32212
32626
|
isOtherDocument: isOther = false,
|
|
32213
32627
|
isRwhMandatory = false,
|
|
32214
32628
|
hasRwhUploaded = false,
|
|
32629
|
+
isStpMandatory = false,
|
|
32630
|
+
hasStpUploaded = false,
|
|
32215
32631
|
isTenant: isTenantProp
|
|
32216
32632
|
} = _ref3;
|
|
32217
32633
|
const fileRef = React.useRef();
|
|
@@ -32225,11 +32641,13 @@ function SelectDocument$2(_ref3) {
|
|
|
32225
32641
|
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
32642
|
})[0];
|
|
32227
32643
|
const isApplicantPhoto = (doc === null || doc === void 0 ? void 0 : doc.code) === "OWNER.APPLICANTPHOTO";
|
|
32644
|
+
const specs = getDocUploadSpecs(doc, isApplicantPhoto);
|
|
32645
|
+
const [fileError, setFileError] = React.useState(null);
|
|
32228
32646
|
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
32647
|
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
32648
|
const isDocNumberMandatory = isIdentityProof || isOwnershipProof;
|
|
32231
32649
|
const [selectedDocument, setSelectedDocument] = React.useState(() => {
|
|
32232
|
-
var _filteredDocument$doc, _doc$
|
|
32650
|
+
var _filteredDocument$doc, _doc$dropdownData4, _doc$dropdownData5;
|
|
32233
32651
|
if (filteredDocument && doc !== null && doc !== void 0 && doc.dropdownData) {
|
|
32234
32652
|
var _doc$dropdownData;
|
|
32235
32653
|
const match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.find(d => d.code === filteredDocument.documentType);
|
|
@@ -32240,12 +32658,20 @@ function SelectDocument$2(_ref3) {
|
|
|
32240
32658
|
}
|
|
32241
32659
|
if (isOther && isRwhMandatory && !hasRwhUploaded && doc !== null && doc !== void 0 && doc.dropdownData) {
|
|
32242
32660
|
var _doc$dropdownData2, _rwhMatch$code;
|
|
32243
|
-
const rwhMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.find(d => isRwhDocType(d));
|
|
32661
|
+
const rwhMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.find(d => isRwhDocType$1(d));
|
|
32244
32662
|
if (rwhMatch) return {
|
|
32245
32663
|
...rwhMatch,
|
|
32246
32664
|
i18nKey: (_rwhMatch$code = rwhMatch.code) === null || _rwhMatch$code === void 0 ? void 0 : _rwhMatch$code.replaceAll(".", "_")
|
|
32247
32665
|
};
|
|
32248
32666
|
}
|
|
32667
|
+
if (isOther && isStpMandatory && !hasStpUploaded && doc !== null && doc !== void 0 && doc.dropdownData) {
|
|
32668
|
+
var _doc$dropdownData3, _stpMatch$code;
|
|
32669
|
+
const stpMatch = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData3 = doc.dropdownData) === null || _doc$dropdownData3 === void 0 ? void 0 : _doc$dropdownData3.find(d => isStpDocType$1(d));
|
|
32670
|
+
if (stpMatch) return {
|
|
32671
|
+
...stpMatch,
|
|
32672
|
+
i18nKey: (_stpMatch$code = stpMatch.code) === null || _stpMatch$code === void 0 ? void 0 : _stpMatch$code.replaceAll(".", "_")
|
|
32673
|
+
};
|
|
32674
|
+
}
|
|
32249
32675
|
if (isApplicantPhoto) {
|
|
32250
32676
|
return filteredDocument ? {
|
|
32251
32677
|
...filteredDocument,
|
|
@@ -32261,10 +32687,14 @@ function SelectDocument$2(_ref3) {
|
|
|
32261
32687
|
...filteredDocument,
|
|
32262
32688
|
code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
|
|
32263
32689
|
i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : (_filteredDocument$doc = filteredDocument.documentType) === null || _filteredDocument$doc === void 0 ? void 0 : _filteredDocument$doc.replaceAll(".", "_")
|
|
32264
|
-
} : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$
|
|
32690
|
+
} : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData4 = doc.dropdownData) === null || _doc$dropdownData4 === void 0 ? void 0 : _doc$dropdownData4.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData5 = doc.dropdownData) === null || _doc$dropdownData5 === void 0 ? void 0 : _doc$dropdownData5.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc;
|
|
32265
32691
|
});
|
|
32266
32692
|
const [file, setFile] = React.useState(null);
|
|
32267
32693
|
const [uploadedFile, setUploadedFile] = React.useState(() => isOther ? null : (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
|
|
32694
|
+
const [validityDate, setValidityDate] = React.useState(() => {
|
|
32695
|
+
var _filteredDocument$add;
|
|
32696
|
+
return (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.validityDate) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.validityUpTo) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : (_filteredDocument$add = filteredDocument.additionalDetails) === null || _filteredDocument$add === void 0 ? void 0 : _filteredDocument$add.validityDate) || "";
|
|
32697
|
+
});
|
|
32268
32698
|
const [documentUid, setDocumentUid] = React.useState(() => {
|
|
32269
32699
|
if (isOther) return "";
|
|
32270
32700
|
const num = (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentNumber) || "";
|
|
@@ -32283,6 +32713,9 @@ function SelectDocument$2(_ref3) {
|
|
|
32283
32713
|
const [docFileType, setDocFileType] = React.useState("");
|
|
32284
32714
|
const [digiLockerUpload, setDigilockerUpload] = React.useState(false);
|
|
32285
32715
|
const [docNumberError, setDocNumberError] = React.useState(null);
|
|
32716
|
+
const isSelectedRwh = isRwhDocType$1(selectedDocument);
|
|
32717
|
+
const isSelectedStp = isStpDocType$1(selectedDocument);
|
|
32718
|
+
const showValidityDate = isOther && (isSelectedRwh || isSelectedStp || isRwhMandatory && !hasRwhUploaded || isStpMandatory && !hasStpUploaded);
|
|
32286
32719
|
const isOtherDocumentsRemark = Boolean(isOther && selectedDocument && ((selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) === "OWNER.OTHERDOCUMENTS.OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) === "OWNER_OTHERDOCUMENTS_OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) === "OWNER_OTHERDOCUMENTS_OTHER_DOCUMENTS" || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod = selectedDocument.code) === null || _selectedDocument$cod === void 0 ? void 0 : _selectedDocument$cod.endsWith(".OTHER_DOCUMENTS")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$cod2 = selectedDocument.code) === null || _selectedDocument$cod2 === void 0 ? void 0 : _selectedDocument$cod2.includes("OTHER_DOCUMENTS")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$nam = selectedDocument.name) === null || _selectedDocument$nam === void 0 ? void 0 : (_selectedDocument$nam2 = _selectedDocument$nam.toUpperCase()) === null || _selectedDocument$nam2 === void 0 ? void 0 : _selectedDocument$nam2.includes("OTHER DOCUMENT")) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : (_selectedDocument$i = selectedDocument.i18nKey) === null || _selectedDocument$i === void 0 ? void 0 : _selectedDocument$i.includes("OTHER_DOCUMENTS"))));
|
|
32287
32720
|
const validateDocumentNumber = (value, docTypeCode, isReq, hasFile) => {
|
|
32288
32721
|
const trimmed = (value || "").trim();
|
|
@@ -32316,6 +32749,14 @@ function SelectDocument$2(_ref3) {
|
|
|
32316
32749
|
setDigilockerUpload(eligible);
|
|
32317
32750
|
}, [selectedDocument]);
|
|
32318
32751
|
const handleCapture = capturedFile => {
|
|
32752
|
+
setFileError(null);
|
|
32753
|
+
if (capturedFile.size > specs.maxSize) {
|
|
32754
|
+
const msg = t("WS_PHOTO_MAX_SIZE_EXCEEDED") || specs.sizeErrorMessage;
|
|
32755
|
+
setError(msg);
|
|
32756
|
+
setFileError(msg);
|
|
32757
|
+
setShowCamera(false);
|
|
32758
|
+
return;
|
|
32759
|
+
}
|
|
32319
32760
|
setFile(capturedFile);
|
|
32320
32761
|
setIsCameraFile(true);
|
|
32321
32762
|
setShowCamera(false);
|
|
@@ -32323,10 +32764,12 @@ function SelectDocument$2(_ref3) {
|
|
|
32323
32764
|
const handleSelectDocument = value => setSelectedDocument(value);
|
|
32324
32765
|
const removeUploadedDocument = fileStoreId => {
|
|
32325
32766
|
setDocuments(previousDocuments => previousDocuments.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== fileStoreId));
|
|
32767
|
+
setFileError(null);
|
|
32326
32768
|
if (fileStoreId === uploadedFile) {
|
|
32327
32769
|
setUploadedFile(null);
|
|
32328
32770
|
setFile(null);
|
|
32329
32771
|
setDocumentUid("");
|
|
32772
|
+
setValidityDate("");
|
|
32330
32773
|
if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
|
|
32331
32774
|
setSelectedDocument({});
|
|
32332
32775
|
}
|
|
@@ -32337,9 +32780,9 @@ function SelectDocument$2(_ref3) {
|
|
|
32337
32780
|
fileStoreId = uploadedFile;
|
|
32338
32781
|
}
|
|
32339
32782
|
try {
|
|
32340
|
-
const
|
|
32783
|
+
const _temp3 = function () {
|
|
32341
32784
|
if (fileStoreId) {
|
|
32342
|
-
const
|
|
32785
|
+
const _temp2 = _catch(function () {
|
|
32343
32786
|
return Promise.resolve(Digit.UploadServices.FileFetchbyid(fileStoreId, Digit.ULBService.getStateId())).then(function (res) {
|
|
32344
32787
|
if (res !== null && res !== void 0 && res.data) {
|
|
32345
32788
|
var _res$headers, _res$headers2;
|
|
@@ -32358,21 +32801,21 @@ function SelectDocument$2(_ref3) {
|
|
|
32358
32801
|
}, function (err) {
|
|
32359
32802
|
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
32360
32803
|
});
|
|
32361
|
-
if (
|
|
32804
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
32362
32805
|
}
|
|
32363
32806
|
}();
|
|
32364
|
-
return Promise.resolve(
|
|
32807
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
32365
32808
|
} catch (e) {
|
|
32366
32809
|
return Promise.reject(e);
|
|
32367
32810
|
}
|
|
32368
32811
|
};
|
|
32369
32812
|
React.useEffect(() => {
|
|
32370
32813
|
if (filteredDocument) {
|
|
32371
|
-
var _filteredDocument$doc2, _doc$
|
|
32814
|
+
var _filteredDocument$doc2, _doc$dropdownData7, _doc$dropdownData8;
|
|
32372
32815
|
let match = null;
|
|
32373
32816
|
if (doc !== null && doc !== void 0 && doc.dropdownData) {
|
|
32374
|
-
var _doc$
|
|
32375
|
-
match = doc === null || doc === void 0 ? void 0 : (_doc$
|
|
32817
|
+
var _doc$dropdownData6;
|
|
32818
|
+
match = doc === null || doc === void 0 ? void 0 : (_doc$dropdownData6 = doc.dropdownData) === null || _doc$dropdownData6 === void 0 ? void 0 : _doc$dropdownData6.find(d => d.code === filteredDocument.documentType);
|
|
32376
32819
|
}
|
|
32377
32820
|
setSelectedDocument(match ? {
|
|
32378
32821
|
...filteredDocument,
|
|
@@ -32385,15 +32828,28 @@ function SelectDocument$2(_ref3) {
|
|
|
32385
32828
|
...doc,
|
|
32386
32829
|
code: (doc === null || doc === void 0 ? void 0 : doc.code) || "OWNER.APPLICANTPHOTO",
|
|
32387
32830
|
i18nKey: "OWNER_APPLICANTPHOTO"
|
|
32388
|
-
} : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$
|
|
32831
|
+
} : doc !== null && doc !== void 0 && doc.hasDropdown && Array.isArray(doc === null || doc === void 0 ? void 0 : doc.dropdownData) && (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData7 = doc.dropdownData) === null || _doc$dropdownData7 === void 0 ? void 0 : _doc$dropdownData7.length) > 0 ? (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData8 = doc.dropdownData) === null || _doc$dropdownData8 === void 0 ? void 0 : _doc$dropdownData8.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {} : doc);
|
|
32389
32832
|
}
|
|
32390
32833
|
}, []);
|
|
32391
32834
|
function selectfile(e, newFile) {
|
|
32392
32835
|
var _e$target2, _e$target2$files;
|
|
32393
32836
|
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]);
|
|
32837
|
+
setFileError(null);
|
|
32394
32838
|
if (selectedFile) {
|
|
32395
|
-
|
|
32396
|
-
|
|
32839
|
+
const ext = (selectedFile.name || "").split(".").pop().toLowerCase();
|
|
32840
|
+
const isExtAllowed = specs.allowedExtensions.includes(ext);
|
|
32841
|
+
const isMimeAllowed = specs.allowedMimeTypes.includes(selectedFile.type);
|
|
32842
|
+
if (!isExtAllowed && !isMimeAllowed) {
|
|
32843
|
+
const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
|
|
32844
|
+
setError(msg);
|
|
32845
|
+
setFileError(msg);
|
|
32846
|
+
if (e !== null && e !== void 0 && e.target) e.target.value = "";
|
|
32847
|
+
return;
|
|
32848
|
+
}
|
|
32849
|
+
if (selectedFile.size > specs.maxSize) {
|
|
32850
|
+
const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
|
|
32851
|
+
setError(msg);
|
|
32852
|
+
setFileError(msg);
|
|
32397
32853
|
if (e !== null && e !== void 0 && e.target) e.target.value = "";
|
|
32398
32854
|
return;
|
|
32399
32855
|
}
|
|
@@ -32410,7 +32866,7 @@ function SelectDocument$2(_ref3) {
|
|
|
32410
32866
|
const code = typeof val === "object" ? (val === null || val === void 0 ? void 0 : val.code) || (val === null || val === void 0 ? void 0 : val.name) || (val === null || val === void 0 ? void 0 : val.value) : val;
|
|
32411
32867
|
return String(code).toUpperCase() === "TENANT";
|
|
32412
32868
|
};
|
|
32413
|
-
const isTenant = isTenantProp !== undefined ? isTenantProp : checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD4 = formData.ConnectionDetails) === null || _formData$ConnectionD4 === void 0 ? void 0 : (_formData$ConnectionD5 = _formData$ConnectionD4[0]) === null || _formData$ConnectionD5 === void 0 ? void 0 : _formData$ConnectionD5.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : _formData$ConnectionD6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application4 = formData.applicationSelection) === null || _formData$application4 === void 0 ? void 0 : _formData$application4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application5 = formData.applicationSelection) === null || _formData$application5 === void 0 ? void 0 : (_formData$application6 = _formData$application5[0]) === null || _formData$application6 === void 0 ? void 0 : _formData$application6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH3 = formData.connectionHolders) === null || _formData$connectionH3 === void 0 ? void 0 : (_formData$connectionH4 = _formData$connectionH3[0]) === null || _formData$connectionH4 === void 0 ? void 0 : _formData$connectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH3 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH3 === void 0 ? void 0 : (_formData$ConnectionH4 = _formData$ConnectionH3[0]) === null || _formData$ConnectionH4 === void 0 ? void 0 : _formData$ConnectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$
|
|
32869
|
+
const isTenant = isTenantProp !== undefined ? isTenantProp : checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD4 = formData.ConnectionDetails) === null || _formData$ConnectionD4 === void 0 ? void 0 : (_formData$ConnectionD5 = _formData$ConnectionD4[0]) === null || _formData$ConnectionD5 === void 0 ? void 0 : _formData$ConnectionD5.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : _formData$ConnectionD6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application4 = formData.applicationSelection) === null || _formData$application4 === void 0 ? void 0 : _formData$application4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$application5 = formData.applicationSelection) === null || _formData$application5 === void 0 ? void 0 : (_formData$application6 = _formData$application5[0]) === null || _formData$application6 === void 0 ? void 0 : _formData$application6.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$connectionH3 = formData.connectionHolders) === null || _formData$connectionH3 === void 0 ? void 0 : (_formData$connectionH4 = _formData$connectionH3[0]) === null || _formData$connectionH4 === void 0 ? void 0 : _formData$connectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH3 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH3 === void 0 ? void 0 : (_formData$ConnectionH4 = _formData$ConnectionH3[0]) === null || _formData$ConnectionH4 === void 0 ? void 0 : _formData$ConnectionH4.applicantType) || checkIsTenant(formData === null || formData === void 0 ? void 0 : (_formData$additionalD7 = formData.additionalDetails) === null || _formData$additionalD7 === void 0 ? void 0 : _formData$additionalD7.applicantType);
|
|
32414
32870
|
if (isOther) {
|
|
32415
32871
|
if (isTenant) {
|
|
32416
32872
|
var _dropDownData;
|
|
@@ -32434,7 +32890,7 @@ function SelectDocument$2(_ref3) {
|
|
|
32434
32890
|
const name = d.name || "";
|
|
32435
32891
|
return !(code.includes("NOC_FROM_OWNER") || code === "NOC from Owner" || name.includes("NOC from Owner"));
|
|
32436
32892
|
});
|
|
32437
|
-
if (dropDownData && !dropDownData.some(d => isRwhDocType(d))) {
|
|
32893
|
+
if (dropDownData && !dropDownData.some(d => isRwhDocType$1(d))) {
|
|
32438
32894
|
dropDownData = [...dropDownData, {
|
|
32439
32895
|
code: "OWNER.OTHERDOCUMENTS.RAINWATER_HARVESTING",
|
|
32440
32896
|
i18nKey: "OWNER_OTHERDOCUMENTS_RAINWATER_HARVESTING",
|
|
@@ -32467,9 +32923,9 @@ function SelectDocument$2(_ref3) {
|
|
|
32467
32923
|
setFile(null);
|
|
32468
32924
|
} else if (isRwhMandatory && !hasRwhUploaded) {
|
|
32469
32925
|
var _dropDownData4;
|
|
32470
|
-
const isCurrentRwh = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isRwhDocType(selectedDocument);
|
|
32926
|
+
const isCurrentRwh = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isRwhDocType$1(selectedDocument);
|
|
32471
32927
|
if (!isCurrentRwh && ((_dropDownData4 = dropDownData) === null || _dropDownData4 === void 0 ? void 0 : _dropDownData4.length) > 0) {
|
|
32472
|
-
const rwhMatch = dropDownData.find(d => isRwhDocType(d));
|
|
32928
|
+
const rwhMatch = dropDownData.find(d => isRwhDocType$1(d));
|
|
32473
32929
|
if (rwhMatch && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code))) {
|
|
32474
32930
|
var _rwhMatch$code2;
|
|
32475
32931
|
setSelectedDocument({
|
|
@@ -32478,10 +32934,23 @@ function SelectDocument$2(_ref3) {
|
|
|
32478
32934
|
});
|
|
32479
32935
|
}
|
|
32480
32936
|
}
|
|
32937
|
+
} else if (isStpMandatory && !hasStpUploaded) {
|
|
32938
|
+
var _dropDownData5;
|
|
32939
|
+
const isCurrentStp = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) && isStpDocType$1(selectedDocument);
|
|
32940
|
+
if (!isCurrentStp && ((_dropDownData5 = dropDownData) === null || _dropDownData5 === void 0 ? void 0 : _dropDownData5.length) > 0) {
|
|
32941
|
+
const stpMatch = dropDownData.find(d => isStpDocType$1(d));
|
|
32942
|
+
if (stpMatch && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code))) {
|
|
32943
|
+
var _stpMatch$code2;
|
|
32944
|
+
setSelectedDocument({
|
|
32945
|
+
...stpMatch,
|
|
32946
|
+
i18nKey: (_stpMatch$code2 = stpMatch.code) === null || _stpMatch$code2 === void 0 ? void 0 : _stpMatch$code2.replaceAll(".", "_")
|
|
32947
|
+
});
|
|
32948
|
+
}
|
|
32949
|
+
}
|
|
32481
32950
|
}
|
|
32482
32951
|
}
|
|
32483
32952
|
}
|
|
32484
|
-
}, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, dropDownData]);
|
|
32953
|
+
}, [isTenant, isOther, isRwhMandatory, hasRwhUploaded, isStpMandatory, hasStpUploaded, dropDownData]);
|
|
32485
32954
|
const [isHidden, setHidden] = React.useState(false);
|
|
32486
32955
|
const documentDisplayName = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.name) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || (doc === null || doc === void 0 ? void 0 : doc.i18nKey) || (doc === null || doc === void 0 ? void 0 : doc.name) || (doc === null || doc === void 0 ? void 0 : doc.code);
|
|
32487
32956
|
const addError = () => {
|
|
@@ -32539,10 +33008,20 @@ function SelectDocument$2(_ref3) {
|
|
|
32539
33008
|
documentName: (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "",
|
|
32540
33009
|
documentUid: documentUid,
|
|
32541
33010
|
documentNumber: documentUid,
|
|
33011
|
+
validityDate: validityDate || undefined,
|
|
33012
|
+
validityUpTo: validityDate || undefined,
|
|
33013
|
+
date: validityDate || undefined,
|
|
32542
33014
|
remarks: isOtherDocumentsRemark ? documentUid : undefined,
|
|
32543
|
-
additionalDetails:
|
|
32544
|
-
|
|
32545
|
-
|
|
33015
|
+
additionalDetails: {
|
|
33016
|
+
...(isOtherDocumentsRemark ? {
|
|
33017
|
+
remark: documentUid
|
|
33018
|
+
} : {}),
|
|
33019
|
+
...(validityDate ? {
|
|
33020
|
+
validityDate,
|
|
33021
|
+
validityUpTo: validityDate,
|
|
33022
|
+
date: validityDate
|
|
33023
|
+
} : {})
|
|
33024
|
+
},
|
|
32546
33025
|
i18nKey: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
32547
33026
|
id: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.id,
|
|
32548
33027
|
status: "ACTIVE",
|
|
@@ -32553,8 +33032,11 @@ function SelectDocument$2(_ref3) {
|
|
|
32553
33032
|
});
|
|
32554
33033
|
}
|
|
32555
33034
|
const isRwhRequired = isOther && isRwhMandatory;
|
|
32556
|
-
const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType(selectedDocument);
|
|
33035
|
+
const isRwhSatisfied = hasRwhUploaded || uploadedFile && isRwhDocType$1(selectedDocument);
|
|
32557
33036
|
const rwhMissing = isRwhRequired && !isRwhSatisfied;
|
|
33037
|
+
const isStpRequired = isOther && isStpMandatory;
|
|
33038
|
+
const isStpSatisfied = hasStpUploaded || uploadedFile && isStpDocType$1(selectedDocument);
|
|
33039
|
+
const stpMissing = isStpRequired && !isStpSatisfied;
|
|
32558
33040
|
const hasOtherUploaded = isOther && (documents === null || documents === void 0 ? void 0 : documents.some(item => {
|
|
32559
33041
|
var _item$documentType4;
|
|
32560
33042
|
return item === null || item === void 0 ? void 0 : (_item$documentType4 = item.documentType) === null || _item$documentType4 === void 0 ? void 0 : _item$documentType4.includes(doc === null || doc === void 0 ? void 0 : doc.code);
|
|
@@ -32563,8 +33045,9 @@ function SelectDocument$2(_ref3) {
|
|
|
32563
33045
|
const isDocNumberMissing = isDocNumberMandatory && (!documentUid || !documentUid.trim());
|
|
32564
33046
|
const isDocMissing = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded && (!uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code));
|
|
32565
33047
|
const isPartiallyFilled = isApplicantPhoto ? false : isDocNumberMandatory ? !uploadedFile || !(selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) || isDocNumberMissing : !isCompletelyEmpty && !(uploadedFile && selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code);
|
|
32566
|
-
const effectiveRequired = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded || isPartiallyFilled || isOther && isRwhMandatory && !hasRwhUploaded || isDocNumberMandatory;
|
|
33048
|
+
const effectiveRequired = (doc === null || doc === void 0 ? void 0 : doc.required) && !hasOtherUploaded || isPartiallyFilled || isOther && isRwhMandatory && !hasRwhUploaded || isOther && isStpMandatory && !hasStpUploaded || isDocNumberMandatory;
|
|
32567
33049
|
const err = validateDocumentNumber(documentUid, selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code, isDocNumberMandatory || effectiveRequired, !!uploadedFile);
|
|
33050
|
+
const validityMissing = showValidityDate && (isRwhMandatory || isStpMandatory) && uploadedFile && !validityDate;
|
|
32568
33051
|
if (!isHidden) {
|
|
32569
33052
|
if (err) {
|
|
32570
33053
|
addError();
|
|
@@ -32574,72 +33057,80 @@ function SelectDocument$2(_ref3) {
|
|
|
32574
33057
|
addError();
|
|
32575
33058
|
} else if (rwhMissing) {
|
|
32576
33059
|
addError();
|
|
33060
|
+
} else if (stpMissing) {
|
|
33061
|
+
addError();
|
|
33062
|
+
} else if (validityMissing) {
|
|
33063
|
+
addError();
|
|
32577
33064
|
} else {
|
|
32578
33065
|
removeError();
|
|
32579
33066
|
}
|
|
32580
33067
|
} else if (isHidden) {
|
|
32581
33068
|
removeError();
|
|
32582
33069
|
}
|
|
32583
|
-
}, [uploadedFile, selectedDocument, documentUid, isHidden, effectiveRequired, isPartiallyFilled, hasOtherUploaded, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD7 = formData.ConnectionDetails) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7[0], isRwhMandatory, hasRwhUploaded]);
|
|
33070
|
+
}, [uploadedFile, selectedDocument, documentUid, validityDate, isHidden, effectiveRequired, isPartiallyFilled, hasOtherUploaded, formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD7 = formData.ConnectionDetails) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7[0], isRwhMandatory, hasRwhUploaded, isStpMandatory, hasStpUploaded]);
|
|
32584
33071
|
React.useEffect(() => {
|
|
32585
33072
|
(function () {
|
|
32586
33073
|
try {
|
|
32587
33074
|
setError(null);
|
|
32588
|
-
|
|
33075
|
+
return function () {
|
|
32589
33076
|
if (file) {
|
|
33077
|
+
setFileError(null);
|
|
32590
33078
|
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
|
-
|
|
32592
|
-
|
|
32593
|
-
|
|
32594
|
-
|
|
32595
|
-
|
|
32596
|
-
|
|
32597
|
-
|
|
32598
|
-
|
|
32599
|
-
|
|
32600
|
-
|
|
32601
|
-
|
|
32602
|
-
|
|
33079
|
+
if (isDuplicateDocument) {
|
|
33080
|
+
const documentNameKey = (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.i18nKey) || (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code) || "This";
|
|
33081
|
+
const translatedDocumentName = t(documentNameKey);
|
|
33082
|
+
const documentName = translatedDocumentName === documentNameKey ? documentNameKey.replaceAll("_", " ") : translatedDocumentName;
|
|
33083
|
+
const msg = `Document "${documentName}" has already been uploaded.`;
|
|
33084
|
+
setError(msg);
|
|
33085
|
+
setFileError(msg);
|
|
33086
|
+
setFile(null);
|
|
33087
|
+
return;
|
|
33088
|
+
}
|
|
33089
|
+
const ext = (file.name || "").split(".").pop().toLowerCase();
|
|
33090
|
+
const isExtAllowed = specs.allowedExtensions.includes(ext);
|
|
33091
|
+
const isMimeAllowed = specs.allowedMimeTypes.includes(file.type);
|
|
33092
|
+
if (!isExtAllowed && !isMimeAllowed) {
|
|
33093
|
+
const msg = t(specs.formatErrorMessageKey) || specs.formatErrorMessage;
|
|
33094
|
+
setError(msg);
|
|
33095
|
+
setFileError(msg);
|
|
33096
|
+
setFile(null);
|
|
33097
|
+
return;
|
|
33098
|
+
}
|
|
33099
|
+
if (file.size > specs.maxSize) {
|
|
33100
|
+
const msg = t(specs.sizeErrorMessageKey) || specs.sizeErrorMessage;
|
|
33101
|
+
setError(msg);
|
|
33102
|
+
setFileError(msg);
|
|
33103
|
+
setFile(null);
|
|
33104
|
+
return;
|
|
33105
|
+
}
|
|
33106
|
+
const _temp4 = _finallyRethrows(function () {
|
|
33107
|
+
return _catch(function () {
|
|
33108
|
+
setUploadedFile(null);
|
|
33109
|
+
setIsUploading(true);
|
|
33110
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
33111
|
+
var _response$data4, _response$data4$files;
|
|
33112
|
+
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) {
|
|
33113
|
+
var _response$data5, _response$data5$files;
|
|
33114
|
+
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
33115
|
} else {
|
|
32604
|
-
const
|
|
32605
|
-
|
|
32606
|
-
|
|
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 () {});
|
|
33116
|
+
const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
|
|
33117
|
+
setError(msg);
|
|
33118
|
+
setFileError(msg);
|
|
32634
33119
|
}
|
|
32635
|
-
}
|
|
32636
|
-
|
|
32637
|
-
|
|
32638
|
-
|
|
32639
|
-
|
|
33120
|
+
});
|
|
33121
|
+
}, function () {
|
|
33122
|
+
const msg = t("CS_FILE_UPLOAD_ERROR") || "File upload failed";
|
|
33123
|
+
setError(msg);
|
|
33124
|
+
setFileError(msg);
|
|
33125
|
+
});
|
|
33126
|
+
}, function (_wasThrown, _result3) {
|
|
33127
|
+
setIsUploading(false);
|
|
33128
|
+
if (_wasThrown) throw _result3;
|
|
33129
|
+
return _result3;
|
|
33130
|
+
});
|
|
33131
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
32640
33132
|
}
|
|
32641
33133
|
}();
|
|
32642
|
-
return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
|
|
32643
33134
|
} catch (e) {
|
|
32644
33135
|
Promise.reject(e);
|
|
32645
33136
|
}
|
|
@@ -32667,15 +33158,21 @@ function SelectDocument$2(_ref3) {
|
|
|
32667
33158
|
style: {
|
|
32668
33159
|
margin: 0
|
|
32669
33160
|
}
|
|
32670
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), ((doc === null || doc === void 0 ? void 0 : doc.required) || !isTenant && isOther && isRwhMandatory) && /*#__PURE__*/React__default.createElement("span", {
|
|
33161
|
+
}, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), ((doc === null || doc === void 0 ? void 0 : doc.required) || !isTenant && isOther && (isRwhMandatory || isStpMandatory)) && /*#__PURE__*/React__default.createElement("span", {
|
|
32671
33162
|
className: "check-page-link-button"
|
|
32672
|
-
}, "*")), " ", !isTenant && isOther && isRwhMandatory && !hasRwhUploaded && !(uploadedFile && isRwhDocType(selectedDocument)) && /*#__PURE__*/React__default.createElement("div", {
|
|
33163
|
+
}, "*")), " ", !isTenant && isOther && isRwhMandatory && !hasRwhUploaded && !(uploadedFile && isRwhDocType$1(selectedDocument)) && /*#__PURE__*/React__default.createElement("div", {
|
|
33164
|
+
style: {
|
|
33165
|
+
fontSize: "12px",
|
|
33166
|
+
color: "#d32f2f",
|
|
33167
|
+
marginTop: "-4px"
|
|
33168
|
+
}
|
|
33169
|
+
}, "* ", t("WS_RWH_CERTIFICATE_MANDATORY_MSG") || "Rain Water Harvesting Certificate is mandatory to upload."), !isTenant && isOther && isStpMandatory && !hasStpUploaded && !(uploadedFile && isStpDocType$1(selectedDocument)) && /*#__PURE__*/React__default.createElement("div", {
|
|
32673
33170
|
style: {
|
|
32674
33171
|
fontSize: "12px",
|
|
32675
33172
|
color: "#d32f2f",
|
|
32676
33173
|
marginTop: "-4px"
|
|
32677
33174
|
}
|
|
32678
|
-
}, "* ", t("
|
|
33175
|
+
}, "* ", t("WS_STP_CERTIFICATE_MANDATORY_MSG") || "Sewer Treatment Plant (STP) Certificate is mandatory to upload."), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
32679
33176
|
id: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
|
|
32680
33177
|
key: `doc-${doc === null || doc === void 0 ? void 0 : doc.code}`,
|
|
32681
33178
|
className: "form-field",
|
|
@@ -32691,7 +33188,36 @@ function SelectDocument$2(_ref3) {
|
|
|
32691
33188
|
optionKey: "i18nKey",
|
|
32692
33189
|
t: t,
|
|
32693
33190
|
placeholder: t("PT_MUTATION_SELECT_DOC_LABEL")
|
|
32694
|
-
})) : null,
|
|
33191
|
+
})) : null, showValidityDate && /*#__PURE__*/React__default.createElement("div", {
|
|
33192
|
+
style: {
|
|
33193
|
+
display: "flex",
|
|
33194
|
+
flexDirection: "column",
|
|
33195
|
+
gap: "8px"
|
|
33196
|
+
}
|
|
33197
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
33198
|
+
style: {
|
|
33199
|
+
margin: 0
|
|
33200
|
+
}
|
|
33201
|
+
}, t("WS_VALIDITY_UP_TO") || "Validity up to", ((doc === null || doc === void 0 ? void 0 : doc.required) || isRwhMandatory || isStpMandatory) && /*#__PURE__*/React__default.createElement("span", {
|
|
33202
|
+
className: "check-page-link-button"
|
|
33203
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
33204
|
+
className: "field",
|
|
33205
|
+
style: {
|
|
33206
|
+
width: "100%"
|
|
33207
|
+
}
|
|
33208
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
33209
|
+
date: validityDate,
|
|
33210
|
+
onChange: date => setValidityDate(date),
|
|
33211
|
+
style: {
|
|
33212
|
+
width: "100%"
|
|
33213
|
+
}
|
|
33214
|
+
})), uploadedFile && (isRwhMandatory || isStpMandatory) && !validityDate && /*#__PURE__*/React__default.createElement("div", {
|
|
33215
|
+
style: {
|
|
33216
|
+
fontSize: "12px",
|
|
33217
|
+
color: "#d32f2f",
|
|
33218
|
+
marginTop: "-4px"
|
|
33219
|
+
}
|
|
33220
|
+
}, "* ", t("CORE_COMMON_REQUIRED_ERRMSG") || "This field is required")), (doc === null || doc === void 0 ? void 0 : doc.code) !== "OWNER.APPLICANTPHOTO" && /*#__PURE__*/React__default.createElement("div", {
|
|
32695
33221
|
style: {
|
|
32696
33222
|
display: "flex",
|
|
32697
33223
|
flexDirection: "column",
|
|
@@ -32796,11 +33322,11 @@ function SelectDocument$2(_ref3) {
|
|
|
32796
33322
|
}, "*"))), /*#__PURE__*/React__default.createElement("div", {
|
|
32797
33323
|
style: {
|
|
32798
33324
|
fontSize: "12px",
|
|
32799
|
-
color: "#
|
|
33325
|
+
color: "#555",
|
|
32800
33326
|
marginTop: "-2px",
|
|
32801
33327
|
marginBottom: "4px"
|
|
32802
33328
|
}
|
|
32803
|
-
},
|
|
33329
|
+
}, specs.uiMessage), /*#__PURE__*/React__default.createElement("div", {
|
|
32804
33330
|
className: "field",
|
|
32805
33331
|
style: {
|
|
32806
33332
|
display: "flex",
|
|
@@ -32817,9 +33343,11 @@ function SelectDocument$2(_ref3) {
|
|
|
32817
33343
|
onDelete: () => {
|
|
32818
33344
|
setUploadedFile(null);
|
|
32819
33345
|
setFile(null);
|
|
33346
|
+
setFileError(null);
|
|
32820
33347
|
setIsCameraFile(false);
|
|
32821
33348
|
setIsDocumentUidLocked(false);
|
|
32822
33349
|
setDocumentUid("");
|
|
33350
|
+
setValidityDate("");
|
|
32823
33351
|
if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
|
|
32824
33352
|
setSelectedDocument({});
|
|
32825
33353
|
}
|
|
@@ -32831,11 +33359,19 @@ function SelectDocument$2(_ref3) {
|
|
|
32831
33359
|
},
|
|
32832
33360
|
buttonType: "button",
|
|
32833
33361
|
error: effectiveRequired && !uploadedFile,
|
|
32834
|
-
accept:
|
|
33362
|
+
accept: specs.accept,
|
|
33363
|
+
maxSize: specs.maxSize,
|
|
33364
|
+
maxSizeText: specs.maxSizeText,
|
|
33365
|
+
allowedExtensions: specs.allowedExtensions,
|
|
33366
|
+
allowedTypes: specs.allowedMimeTypes,
|
|
33367
|
+
allowedFormatsText: specs.allowedFormatsText,
|
|
33368
|
+
sizeErrorMessage: specs.sizeErrorMessage,
|
|
33369
|
+
formatErrorMessage: specs.formatErrorMessage,
|
|
32835
33370
|
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
33371
|
fileStoreId: uploadedFile
|
|
32837
33372
|
}]] : undefined,
|
|
32838
33373
|
removeTargetedFile: () => {
|
|
33374
|
+
setFileError(null);
|
|
32839
33375
|
if (isOther && uploadedFile) {
|
|
32840
33376
|
removeUploadedDocument(uploadedFile);
|
|
32841
33377
|
} else {
|
|
@@ -32844,6 +33380,7 @@ function SelectDocument$2(_ref3) {
|
|
|
32844
33380
|
setIsCameraFile(false);
|
|
32845
33381
|
setIsDocumentUidLocked(false);
|
|
32846
33382
|
setDocumentUid("");
|
|
33383
|
+
setValidityDate("");
|
|
32847
33384
|
if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
|
|
32848
33385
|
setSelectedDocument({});
|
|
32849
33386
|
}
|
|
@@ -32859,9 +33396,11 @@ function SelectDocument$2(_ref3) {
|
|
|
32859
33396
|
onDelete: () => {
|
|
32860
33397
|
setUploadedFile(null);
|
|
32861
33398
|
setFile(null);
|
|
33399
|
+
setFileError(null);
|
|
32862
33400
|
setIsCameraFile(false);
|
|
32863
33401
|
setIsDocumentUidLocked(false);
|
|
32864
33402
|
setDocumentUid("");
|
|
33403
|
+
setValidityDate("");
|
|
32865
33404
|
if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
|
|
32866
33405
|
setSelectedDocument({});
|
|
32867
33406
|
}
|
|
@@ -32873,11 +33412,12 @@ function SelectDocument$2(_ref3) {
|
|
|
32873
33412
|
},
|
|
32874
33413
|
buttonType: "button",
|
|
32875
33414
|
error: effectiveRequired && !uploadedFile,
|
|
32876
|
-
accept:
|
|
33415
|
+
accept: specs.accept,
|
|
32877
33416
|
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
33417
|
fileStoreId: uploadedFile
|
|
32879
33418
|
}]] : undefined,
|
|
32880
33419
|
removeTargetedFile: () => {
|
|
33420
|
+
setFileError(null);
|
|
32881
33421
|
if (isOther && uploadedFile) {
|
|
32882
33422
|
removeUploadedDocument(uploadedFile);
|
|
32883
33423
|
} else {
|
|
@@ -32886,6 +33426,7 @@ function SelectDocument$2(_ref3) {
|
|
|
32886
33426
|
setIsCameraFile(false);
|
|
32887
33427
|
setIsDocumentUidLocked(false);
|
|
32888
33428
|
setDocumentUid("");
|
|
33429
|
+
setValidityDate("");
|
|
32889
33430
|
if (isOther && doc !== null && doc !== void 0 && doc.hasDropdown) {
|
|
32890
33431
|
setSelectedDocument({});
|
|
32891
33432
|
}
|
|
@@ -32906,11 +33447,17 @@ function SelectDocument$2(_ref3) {
|
|
|
32906
33447
|
setError(docNumberError);
|
|
32907
33448
|
return;
|
|
32908
33449
|
}
|
|
33450
|
+
if (showValidityDate && (isRwhMandatory || isStpMandatory) && !validityDate) {
|
|
33451
|
+
setError(t("WS_PLEASE_SELECT_VALIDITY_DATE") || "Please select validity up to date.");
|
|
33452
|
+
return;
|
|
33453
|
+
}
|
|
32909
33454
|
pendingId.current = Date.now();
|
|
32910
33455
|
setUploadedFile(null);
|
|
32911
33456
|
setFile(null);
|
|
33457
|
+
setFileError(null);
|
|
32912
33458
|
setSelectedDocument(doc !== null && doc !== void 0 && doc.hasDropdown ? {} : doc);
|
|
32913
33459
|
setDocumentUid("");
|
|
33460
|
+
setValidityDate("");
|
|
32914
33461
|
setDocNumberError(null);
|
|
32915
33462
|
setIsDocumentUidLocked(false);
|
|
32916
33463
|
},
|
|
@@ -32924,10 +33471,17 @@ function SelectDocument$2(_ref3) {
|
|
|
32924
33471
|
fontWeight: "bold",
|
|
32925
33472
|
marginTop: "2px"
|
|
32926
33473
|
}
|
|
32927
|
-
}, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")),
|
|
33474
|
+
}, "+ ", t("NEW_DOCUMENT_TEXT") || "Add Document")), fileError && /*#__PURE__*/React__default.createElement("div", {
|
|
33475
|
+
style: {
|
|
33476
|
+
fontSize: "12px",
|
|
33477
|
+
color: "#d32f2f",
|
|
33478
|
+
marginTop: "4px"
|
|
33479
|
+
}
|
|
33480
|
+
}, fileError), (isOther ? otherUploadedDocuments : uploadedFile ? [{
|
|
32928
33481
|
fileStoreId: uploadedFile,
|
|
32929
33482
|
fileName: (file === null || file === void 0 ? void 0 : file.name) || (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileName),
|
|
32930
|
-
documentNumber: documentUid
|
|
33483
|
+
documentNumber: documentUid,
|
|
33484
|
+
validityDate: validityDate
|
|
32931
33485
|
}] : []).map((uploadedDocument, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
32932
33486
|
key: uploadedDocument.fileStoreId || index,
|
|
32933
33487
|
style: {
|
|
@@ -32941,7 +33495,12 @@ function SelectDocument$2(_ref3) {
|
|
|
32941
33495
|
style: {
|
|
32942
33496
|
fontWeight: "bold"
|
|
32943
33497
|
}
|
|
32944
|
-
}, uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName ? t((uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName).replaceAll(".", "_")) : t("CS_COMMON_DOCUMENT"), uploadedDocument.fileName ? ` - ${uploadedDocument.fileName}` : ""), uploadedDocument.documentNumber && /*#__PURE__*/React__default.createElement("span", null, uploadedDocument.documentNumber), /*#__PURE__*/React__default.createElement("
|
|
33498
|
+
}, uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName ? t((uploadedDocument.documentName || uploadedDocument.i18nKey || uploadedDocument.documentType || documentDisplayName).replaceAll(".", "_")) : t("CS_COMMON_DOCUMENT"), uploadedDocument.fileName ? ` - ${uploadedDocument.fileName}` : ""), uploadedDocument.documentNumber && /*#__PURE__*/React__default.createElement("span", null, uploadedDocument.documentNumber), (uploadedDocument.validityDate || uploadedDocument.validityUpTo) && /*#__PURE__*/React__default.createElement("span", {
|
|
33499
|
+
style: {
|
|
33500
|
+
fontSize: "13px",
|
|
33501
|
+
color: "#333"
|
|
33502
|
+
}
|
|
33503
|
+
}, "(", t("WS_VALIDITY_UP_TO") || "Validity up to", ": ", uploadedDocument.validityDate || uploadedDocument.validityUpTo, ")"), /*#__PURE__*/React__default.createElement("button", {
|
|
32945
33504
|
type: "button",
|
|
32946
33505
|
onClick: () => viewDocument(uploadedDocument.fileStoreId),
|
|
32947
33506
|
title: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
@@ -33091,7 +33650,7 @@ const CameraCaptureModal = _ref4 => {
|
|
|
33091
33650
|
React.useEffect(() => {
|
|
33092
33651
|
const startCamera = function () {
|
|
33093
33652
|
try {
|
|
33094
|
-
const
|
|
33653
|
+
const _temp5 = _catch(function () {
|
|
33095
33654
|
return Promise.resolve(navigator.mediaDevices.getUserMedia({
|
|
33096
33655
|
video: true
|
|
33097
33656
|
})).then(function (mediaStream) {
|
|
@@ -33104,7 +33663,7 @@ const CameraCaptureModal = _ref4 => {
|
|
|
33104
33663
|
setError(t("WS_CAMERA_ACCESS_ERROR") || "Camera Access Error");
|
|
33105
33664
|
console.error("Error accessing camera: ", err);
|
|
33106
33665
|
});
|
|
33107
|
-
return Promise.resolve(
|
|
33666
|
+
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
|
|
33108
33667
|
} catch (e) {
|
|
33109
33668
|
return Promise.reject(e);
|
|
33110
33669
|
}
|
|
@@ -33129,7 +33688,7 @@ const CameraCaptureModal = _ref4 => {
|
|
|
33129
33688
|
type: "image/jpeg"
|
|
33130
33689
|
});
|
|
33131
33690
|
onCapture(file);
|
|
33132
|
-
}, "image/jpeg");
|
|
33691
|
+
}, "image/jpeg", 0.7);
|
|
33133
33692
|
}
|
|
33134
33693
|
};
|
|
33135
33694
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -38858,6 +39417,17 @@ const WSDeclaration = _ref => {
|
|
|
38858
39417
|
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
39418
|
const [signatureFileStoreId, setSignatureFileStoreId] = React.useState(initialFsId);
|
|
38860
39419
|
const [localFile, setLocalFile] = React.useState(null);
|
|
39420
|
+
const [signError, setSignError] = React.useState(null);
|
|
39421
|
+
const signSpecs = {
|
|
39422
|
+
maxSize: 50 * 1024,
|
|
39423
|
+
maxSizeText: "50KB",
|
|
39424
|
+
allowedExtensions: ["jpg", "jpeg"],
|
|
39425
|
+
allowedMimeTypes: ["image/jpeg", "image/jpg"],
|
|
39426
|
+
accept: "image/jpeg, .jpg, .jpeg",
|
|
39427
|
+
uiMessage: "Allowed format: JPEG | Max file size: 50KB",
|
|
39428
|
+
formatErrorMessage: "Only JPEG format (.jpg, .jpeg) is allowed for Signature",
|
|
39429
|
+
sizeErrorMessage: "Signature size should not exceed 50KB"
|
|
39430
|
+
};
|
|
38861
39431
|
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
39432
|
fileStoreId: initialFsId,
|
|
38863
39433
|
fileName: initialFileName
|
|
@@ -38939,49 +39509,61 @@ const WSDeclaration = _ref => {
|
|
|
38939
39509
|
const onUploadSignature = function (e) {
|
|
38940
39510
|
try {
|
|
38941
39511
|
var _e$target$files;
|
|
39512
|
+
setSignError(null);
|
|
38942
39513
|
const file = (_e$target$files = e.target.files) === null || _e$target$files === void 0 ? void 0 : _e$target$files[0];
|
|
38943
|
-
|
|
39514
|
+
return Promise.resolve(function () {
|
|
38944
39515
|
if (file) {
|
|
38945
|
-
const
|
|
38946
|
-
|
|
38947
|
-
|
|
38948
|
-
|
|
38949
|
-
|
|
38950
|
-
|
|
38951
|
-
|
|
38952
|
-
|
|
38953
|
-
|
|
38954
|
-
|
|
38955
|
-
|
|
38956
|
-
|
|
38957
|
-
|
|
38958
|
-
|
|
38959
|
-
|
|
38960
|
-
|
|
38961
|
-
|
|
38962
|
-
|
|
38963
|
-
|
|
38964
|
-
|
|
38965
|
-
|
|
38966
|
-
|
|
38967
|
-
|
|
38968
|
-
|
|
38969
|
-
|
|
38970
|
-
|
|
38971
|
-
|
|
38972
|
-
|
|
39516
|
+
const ext = (file.name || "").split(".").pop().toLowerCase();
|
|
39517
|
+
const isExtAllowed = signSpecs.allowedExtensions.includes(ext);
|
|
39518
|
+
const isMimeAllowed = signSpecs.allowedMimeTypes.includes(file.type);
|
|
39519
|
+
if (!isExtAllowed && !isMimeAllowed) {
|
|
39520
|
+
setSignError(t("WS_SIGNATURE_ONLY_JPEG") || signSpecs.formatErrorMessage);
|
|
39521
|
+
if (e.target) e.target.value = "";
|
|
39522
|
+
return;
|
|
39523
|
+
}
|
|
39524
|
+
if (file.size > signSpecs.maxSize) {
|
|
39525
|
+
setSignError(t("WS_SIGNATURE_MAX_SIZE_EXCEEDED") || signSpecs.sizeErrorMessage);
|
|
39526
|
+
if (e.target) e.target.value = "";
|
|
39527
|
+
return;
|
|
39528
|
+
}
|
|
39529
|
+
setLocalFile(file);
|
|
39530
|
+
const _temp = _catch(function () {
|
|
39531
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
39532
|
+
var _response$data, _response$data$files;
|
|
39533
|
+
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) {
|
|
39534
|
+
var _response$data2, _response$data2$files;
|
|
39535
|
+
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;
|
|
39536
|
+
const sigObj = {
|
|
39537
|
+
fileStoreId: fsId,
|
|
39538
|
+
fileName: file.name
|
|
39539
|
+
};
|
|
39540
|
+
setSignatureFileStoreId(fsId);
|
|
39541
|
+
setSignatureFile(sigObj);
|
|
39542
|
+
setValue("signatureFileStoreId", fsId, {
|
|
39543
|
+
shouldDirty: true,
|
|
39544
|
+
shouldValidate: true
|
|
38973
39545
|
});
|
|
38974
|
-
|
|
38975
|
-
|
|
39546
|
+
setValue("signatureFile", sigObj, {
|
|
39547
|
+
shouldDirty: true,
|
|
39548
|
+
shouldValidate: true
|
|
39549
|
+
});
|
|
39550
|
+
setValue("signatureFileName", file.name, {
|
|
39551
|
+
shouldDirty: true,
|
|
39552
|
+
shouldValidate: true
|
|
39553
|
+
});
|
|
39554
|
+
} else {
|
|
39555
|
+
setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
|
|
38976
39556
|
setLocalFile(null);
|
|
38977
|
-
}
|
|
38978
|
-
|
|
38979
|
-
|
|
38980
|
-
|
|
38981
|
-
|
|
39557
|
+
}
|
|
39558
|
+
});
|
|
39559
|
+
}, function (err) {
|
|
39560
|
+
console.error("Signature upload failed", err);
|
|
39561
|
+
setSignError(t("CS_FILE_UPLOAD_ERROR") || "File upload failed");
|
|
39562
|
+
setLocalFile(null);
|
|
39563
|
+
});
|
|
39564
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
38982
39565
|
}
|
|
38983
|
-
}();
|
|
38984
|
-
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
39566
|
+
}());
|
|
38985
39567
|
} catch (e) {
|
|
38986
39568
|
return Promise.reject(e);
|
|
38987
39569
|
}
|
|
@@ -38991,9 +39573,9 @@ const WSDeclaration = _ref => {
|
|
|
38991
39573
|
const [docFileType, setDocFileType] = React.useState("");
|
|
38992
39574
|
const viewDocument = function () {
|
|
38993
39575
|
try {
|
|
38994
|
-
const
|
|
39576
|
+
const _temp3 = function () {
|
|
38995
39577
|
if (signatureFileStoreId) {
|
|
38996
|
-
const
|
|
39578
|
+
const _temp2 = _catch(function () {
|
|
38997
39579
|
return Promise.resolve(Digit.UploadServices.FileFetchbyid(signatureFileStoreId, Digit.ULBService.getStateId())).then(function (res) {
|
|
38998
39580
|
if (res !== null && res !== void 0 && res.data) {
|
|
38999
39581
|
const blob = res.data instanceof Blob ? res.data : new Blob([res.data], {
|
|
@@ -39013,10 +39595,10 @@ const WSDeclaration = _ref => {
|
|
|
39013
39595
|
}, function (err) {
|
|
39014
39596
|
console.error("Failed to fetch file URL via FileFetchbyid", err);
|
|
39015
39597
|
});
|
|
39016
|
-
if (
|
|
39598
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
39017
39599
|
}
|
|
39018
39600
|
}();
|
|
39019
|
-
return Promise.resolve(
|
|
39601
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
39020
39602
|
} catch (e) {
|
|
39021
39603
|
return Promise.reject(e);
|
|
39022
39604
|
}
|
|
@@ -39063,11 +39645,22 @@ const WSDeclaration = _ref => {
|
|
|
39063
39645
|
})
|
|
39064
39646
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
39065
39647
|
className: "formcomposer-section-grid"
|
|
39066
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(
|
|
39648
|
+
}, /*#__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, {
|
|
39649
|
+
style: {
|
|
39650
|
+
margin: 0
|
|
39651
|
+
}
|
|
39652
|
+
}, t("WS_UPLOAD_SIGNATURE_FILE") || "Upload Signature", " ", /*#__PURE__*/React__default.createElement("span", {
|
|
39067
39653
|
style: {
|
|
39068
39654
|
color: "red"
|
|
39069
39655
|
}
|
|
39070
39656
|
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
39657
|
+
style: {
|
|
39658
|
+
fontSize: "12px",
|
|
39659
|
+
color: "#555",
|
|
39660
|
+
marginTop: "2px",
|
|
39661
|
+
marginBottom: "4px"
|
|
39662
|
+
}
|
|
39663
|
+
}, signSpecs.uiMessage)), /*#__PURE__*/React__default.createElement("div", {
|
|
39071
39664
|
className: "field",
|
|
39072
39665
|
style: {
|
|
39073
39666
|
display: "flex",
|
|
@@ -39091,6 +39684,7 @@ const WSDeclaration = _ref => {
|
|
|
39091
39684
|
setLocalFile(null);
|
|
39092
39685
|
setSignatureFile(null);
|
|
39093
39686
|
setSignatureFileStoreId(null);
|
|
39687
|
+
setSignError(null);
|
|
39094
39688
|
setValue("signatureFile", null, {
|
|
39095
39689
|
shouldDirty: true,
|
|
39096
39690
|
shouldValidate: true
|
|
@@ -39110,14 +39704,15 @@ const WSDeclaration = _ref => {
|
|
|
39110
39704
|
width: "100%"
|
|
39111
39705
|
},
|
|
39112
39706
|
buttonType: "button",
|
|
39113
|
-
accept:
|
|
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.
|
|
39707
|
+
accept: signSpecs.accept,
|
|
39708
|
+
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
39709
|
fileStoreId: signatureFileStoreId
|
|
39116
39710
|
}]] : undefined,
|
|
39117
39711
|
removeTargetedFile: () => {
|
|
39118
39712
|
setLocalFile(null);
|
|
39119
39713
|
setSignatureFile(null);
|
|
39120
39714
|
setSignatureFileStoreId(null);
|
|
39715
|
+
setSignError(null);
|
|
39121
39716
|
setValue("signatureFile", null, {
|
|
39122
39717
|
shouldDirty: true,
|
|
39123
39718
|
shouldValidate: true
|
|
@@ -39136,7 +39731,13 @@ const WSDeclaration = _ref => {
|
|
|
39136
39731
|
style: {
|
|
39137
39732
|
cursor: "pointer"
|
|
39138
39733
|
}
|
|
39139
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null))),
|
|
39734
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ViewsIcon, null))), signError && /*#__PURE__*/React__default.createElement("div", {
|
|
39735
|
+
style: {
|
|
39736
|
+
fontSize: "12px",
|
|
39737
|
+
color: "#d32f2f",
|
|
39738
|
+
marginTop: "4px"
|
|
39739
|
+
}
|
|
39740
|
+
}, signError), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
39140
39741
|
style: {
|
|
39141
39742
|
color: "red",
|
|
39142
39743
|
fontSize: "12px",
|
|
@@ -39685,7 +40286,7 @@ const WSDivyangjan = _ref => {
|
|
|
39685
40286
|
};
|
|
39686
40287
|
|
|
39687
40288
|
const WSRainWaterHarvesting = _ref => {
|
|
39688
|
-
var _formData$
|
|
40289
|
+
var _formData$additionalD, _formData$configKey2;
|
|
39689
40290
|
let {
|
|
39690
40291
|
config,
|
|
39691
40292
|
onSelect,
|
|
@@ -39695,17 +40296,36 @@ const WSRainWaterHarvesting = _ref => {
|
|
|
39695
40296
|
const {
|
|
39696
40297
|
t
|
|
39697
40298
|
} = reactI18next.useTranslation();
|
|
40299
|
+
const getInitialValue = () => {
|
|
40300
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting";
|
|
40301
|
+
const rwh = formData === null || formData === void 0 ? void 0 : formData[configKey];
|
|
40302
|
+
const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
|
|
40303
|
+
if ((rwh === null || rwh === void 0 ? void 0 : rwh.hasCertificate) !== undefined) {
|
|
40304
|
+
return String(rwh.hasCertificate) === "true" || rwh.hasCertificate === true;
|
|
40305
|
+
}
|
|
40306
|
+
if ((rwh === null || rwh === void 0 ? void 0 : rwh.isRainwaterHarvesting) !== undefined) {
|
|
40307
|
+
return String(rwh.isRainwaterHarvesting) === "true" || rwh.isRainwaterHarvesting === true;
|
|
40308
|
+
}
|
|
40309
|
+
if ((add === null || add === void 0 ? void 0 : add.hasRainWaterHarvestingCertificate) !== undefined) {
|
|
40310
|
+
return String(add.hasRainWaterHarvestingCertificate) === "true" || add.hasRainWaterHarvestingCertificate === true;
|
|
40311
|
+
}
|
|
40312
|
+
if ((add === null || add === void 0 ? void 0 : add.isRainwaterHarvesting) !== undefined) {
|
|
40313
|
+
return String(add.isRainwaterHarvesting) === "true" || add.isRainwaterHarvesting === true;
|
|
40314
|
+
}
|
|
40315
|
+
return false;
|
|
40316
|
+
};
|
|
39698
40317
|
const {
|
|
39699
40318
|
control,
|
|
39700
|
-
watch
|
|
40319
|
+
watch,
|
|
40320
|
+
setValue
|
|
39701
40321
|
} = reactHookForm.useForm({
|
|
39702
40322
|
defaultValues: {
|
|
39703
|
-
hasCertificate:
|
|
40323
|
+
hasCertificate: getInitialValue()
|
|
39704
40324
|
}
|
|
39705
40325
|
});
|
|
39706
40326
|
const formValue = watch();
|
|
39707
40327
|
const onSelectRef = React.useRef(onSelect);
|
|
39708
|
-
const goNext = () => onSelect(config.key, {
|
|
40328
|
+
const goNext = () => onSelect((config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting", {
|
|
39709
40329
|
hasCertificate: !!formValue.hasCertificate,
|
|
39710
40330
|
isRainwaterHarvesting: !!formValue.hasCertificate
|
|
39711
40331
|
});
|
|
@@ -39713,33 +40333,193 @@ const WSRainWaterHarvesting = _ref => {
|
|
|
39713
40333
|
React.useEffect(() => {
|
|
39714
40334
|
onSelectRef.current = onSelect;
|
|
39715
40335
|
}, [onSelect]);
|
|
40336
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "rainWaterHarvesting";
|
|
40337
|
+
const hasData = !!((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.hasRainWaterHarvestingCertificate) !== undefined);
|
|
40338
|
+
const isInitializedRef = React.useRef(hasData);
|
|
39716
40339
|
React.useEffect(() => {
|
|
39717
|
-
|
|
39718
|
-
|
|
39719
|
-
|
|
40340
|
+
var _formData$additionalD2;
|
|
40341
|
+
if (!isInitializedRef.current && ((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasRainWaterHarvestingCertificate) !== undefined)) {
|
|
40342
|
+
setValue("hasCertificate", getInitialValue());
|
|
40343
|
+
isInitializedRef.current = true;
|
|
40344
|
+
}
|
|
40345
|
+
}, [formData === null || formData === void 0 ? void 0 : formData[configKey], formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
|
|
40346
|
+
React.useEffect(() => {
|
|
40347
|
+
const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
|
|
40348
|
+
if (isEmployeeMode) {
|
|
40349
|
+
var _formData$configKey;
|
|
40350
|
+
const currentVal = formData === null || formData === void 0 ? void 0 : (_formData$configKey = formData[configKey]) === null || _formData$configKey === void 0 ? void 0 : _formData$configKey.hasCertificate;
|
|
39720
40351
|
const newVal = !!formValue.hasCertificate;
|
|
39721
40352
|
if (currentVal !== newVal) {
|
|
39722
|
-
onSelectRef.current(
|
|
40353
|
+
onSelectRef.current(configKey, {
|
|
39723
40354
|
hasCertificate: newVal,
|
|
39724
40355
|
isRainwaterHarvesting: newVal
|
|
39725
40356
|
});
|
|
39726
40357
|
}
|
|
39727
40358
|
}
|
|
39728
|
-
}, [
|
|
40359
|
+
}, [configKey, formValue.hasCertificate, userType, formData === null || formData === void 0 ? void 0 : (_formData$configKey2 = formData[configKey]) === null || _formData$configKey2 === void 0 ? void 0 : _formData$configKey2.hasCertificate]);
|
|
39729
40360
|
const content = /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
39730
40361
|
title: t("Rain Water Harvesting Certificate"),
|
|
39731
40362
|
defaultOpen: true
|
|
39732
40363
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
39733
40364
|
className: "formcomposer-section-grid"
|
|
39734
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement("div", {
|
|
40365
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Rain Water Harvesting Certificate")), /*#__PURE__*/React__default.createElement("div", {
|
|
39735
40366
|
className: "field"
|
|
39736
40367
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
39737
40368
|
control: control,
|
|
39738
40369
|
name: "hasCertificate",
|
|
39739
|
-
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
39740
|
-
|
|
39741
|
-
|
|
39742
|
-
|
|
40370
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
40371
|
+
className: "form-field",
|
|
40372
|
+
style: {
|
|
40373
|
+
display: "flex",
|
|
40374
|
+
gap: "2rem",
|
|
40375
|
+
alignItems: "center"
|
|
40376
|
+
},
|
|
40377
|
+
name: "hasRainWaterHarvestingCertificateRadio",
|
|
40378
|
+
options: [{
|
|
40379
|
+
i18nKey: "CORE_COMMON_YES",
|
|
40380
|
+
code: true
|
|
40381
|
+
}, {
|
|
40382
|
+
i18nKey: "CORE_COMMON_NO",
|
|
40383
|
+
code: false
|
|
40384
|
+
}],
|
|
40385
|
+
optionsKey: "i18nKey",
|
|
40386
|
+
selectedOption: props.value ? {
|
|
40387
|
+
i18nKey: "CORE_COMMON_YES",
|
|
40388
|
+
code: true
|
|
40389
|
+
} : {
|
|
40390
|
+
i18nKey: "CORE_COMMON_NO",
|
|
40391
|
+
code: false
|
|
40392
|
+
},
|
|
40393
|
+
onSelect: e => props.onChange(e.code),
|
|
40394
|
+
t: t
|
|
40395
|
+
})
|
|
40396
|
+
})))));
|
|
40397
|
+
return userType === "citizen" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
|
|
40398
|
+
t: t,
|
|
40399
|
+
config: config,
|
|
40400
|
+
onSelect: goNext,
|
|
40401
|
+
onSkip: onSkip
|
|
40402
|
+
}, content) : content;
|
|
40403
|
+
};
|
|
40404
|
+
|
|
40405
|
+
const WSSewerTreatmentPlant = _ref => {
|
|
40406
|
+
var _formData$additionalD, _formData$additionalD2, _formData$configKey3, _formData$configKey4;
|
|
40407
|
+
let {
|
|
40408
|
+
config,
|
|
40409
|
+
onSelect,
|
|
40410
|
+
userType,
|
|
40411
|
+
formData
|
|
40412
|
+
} = _ref;
|
|
40413
|
+
const {
|
|
40414
|
+
t
|
|
40415
|
+
} = reactI18next.useTranslation();
|
|
40416
|
+
const getInitialValue = () => {
|
|
40417
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant";
|
|
40418
|
+
const stp = (formData === null || formData === void 0 ? void 0 : formData[configKey]) || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant);
|
|
40419
|
+
const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
|
|
40420
|
+
if ((stp === null || stp === void 0 ? void 0 : stp.hasCertificate) !== undefined) {
|
|
40421
|
+
return String(stp.hasCertificate) === "true" || stp.hasCertificate === true;
|
|
40422
|
+
}
|
|
40423
|
+
if ((stp === null || stp === void 0 ? void 0 : stp.hasStp) !== undefined) {
|
|
40424
|
+
return String(stp.hasStp) === "true" || stp.hasStp === true;
|
|
40425
|
+
}
|
|
40426
|
+
if ((stp === null || stp === void 0 ? void 0 : stp.isSewerTreatmentPlant) !== undefined) {
|
|
40427
|
+
return String(stp.isSewerTreatmentPlant) === "true" || stp.isSewerTreatmentPlant === true;
|
|
40428
|
+
}
|
|
40429
|
+
if ((add === null || add === void 0 ? void 0 : add.hasSewerTreatmentPlant) !== undefined) {
|
|
40430
|
+
return String(add.hasSewerTreatmentPlant) === "true" || add.hasSewerTreatmentPlant === true;
|
|
40431
|
+
}
|
|
40432
|
+
if ((add === null || add === void 0 ? void 0 : add.hasSewageTreatmentPlant) !== undefined) {
|
|
40433
|
+
return String(add.hasSewageTreatmentPlant) === "true" || add.hasSewageTreatmentPlant === true;
|
|
40434
|
+
}
|
|
40435
|
+
if ((add === null || add === void 0 ? void 0 : add.hasStp) !== undefined) {
|
|
40436
|
+
return String(add.hasStp) === "true" || add.hasStp === true;
|
|
40437
|
+
}
|
|
40438
|
+
if ((add === null || add === void 0 ? void 0 : add.isSewerTreatmentPlant) !== undefined) {
|
|
40439
|
+
return String(add.isSewerTreatmentPlant) === "true" || add.isSewerTreatmentPlant === true;
|
|
40440
|
+
}
|
|
40441
|
+
return false;
|
|
40442
|
+
};
|
|
40443
|
+
const {
|
|
40444
|
+
control,
|
|
40445
|
+
watch,
|
|
40446
|
+
setValue
|
|
40447
|
+
} = reactHookForm.useForm({
|
|
40448
|
+
defaultValues: {
|
|
40449
|
+
hasCertificate: getInitialValue()
|
|
40450
|
+
}
|
|
40451
|
+
});
|
|
40452
|
+
const formValue = watch();
|
|
40453
|
+
const onSelectRef = React.useRef(onSelect);
|
|
40454
|
+
const goNext = () => onSelect((config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant", {
|
|
40455
|
+
hasCertificate: !!formValue.hasCertificate,
|
|
40456
|
+
hasStp: !!formValue.hasCertificate,
|
|
40457
|
+
isSewerTreatmentPlant: !!formValue.hasCertificate
|
|
40458
|
+
});
|
|
40459
|
+
const onSkip = () => onSelect();
|
|
40460
|
+
React.useEffect(() => {
|
|
40461
|
+
onSelectRef.current = onSelect;
|
|
40462
|
+
}, [onSelect]);
|
|
40463
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "sewerTreatmentPlant";
|
|
40464
|
+
const hasData = !!((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.hasSewerTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.hasStp) !== undefined);
|
|
40465
|
+
const isInitializedRef = React.useRef(hasData);
|
|
40466
|
+
React.useEffect(() => {
|
|
40467
|
+
var _formData$additionalD3, _formData$additionalD4;
|
|
40468
|
+
if (!isInitializedRef.current && ((formData === null || formData === void 0 ? void 0 : formData[configKey]) !== undefined || (formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.hasSewerTreatmentPlant) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.hasStp) !== undefined)) {
|
|
40469
|
+
setValue("hasCertificate", getInitialValue());
|
|
40470
|
+
isInitializedRef.current = true;
|
|
40471
|
+
}
|
|
40472
|
+
}, [formData === null || formData === void 0 ? void 0 : formData[configKey], formData === null || formData === void 0 ? void 0 : formData.sewageTreatmentPlant, formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
|
|
40473
|
+
React.useEffect(() => {
|
|
40474
|
+
const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
|
|
40475
|
+
if (isEmployeeMode) {
|
|
40476
|
+
var _formData$configKey, _formData$configKey2;
|
|
40477
|
+
const currentVal = (formData === null || formData === void 0 ? void 0 : (_formData$configKey = formData[configKey]) === null || _formData$configKey === void 0 ? void 0 : _formData$configKey.hasCertificate) ?? (formData === null || formData === void 0 ? void 0 : (_formData$configKey2 = formData[configKey]) === null || _formData$configKey2 === void 0 ? void 0 : _formData$configKey2.hasStp);
|
|
40478
|
+
const newVal = !!formValue.hasCertificate;
|
|
40479
|
+
if (currentVal !== newVal) {
|
|
40480
|
+
onSelectRef.current(configKey, {
|
|
40481
|
+
hasCertificate: newVal,
|
|
40482
|
+
hasStp: newVal,
|
|
40483
|
+
isSewerTreatmentPlant: newVal
|
|
40484
|
+
});
|
|
40485
|
+
}
|
|
40486
|
+
}
|
|
40487
|
+
}, [configKey, formValue.hasCertificate, userType, formData === null || formData === void 0 ? void 0 : (_formData$configKey3 = formData[configKey]) === null || _formData$configKey3 === void 0 ? void 0 : _formData$configKey3.hasCertificate, formData === null || formData === void 0 ? void 0 : (_formData$configKey4 = formData[configKey]) === null || _formData$configKey4 === void 0 ? void 0 : _formData$configKey4.hasStp]);
|
|
40488
|
+
const content = /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
40489
|
+
title: t("Sewer Treatment Plant (STP)"),
|
|
40490
|
+
defaultOpen: true
|
|
40491
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
40492
|
+
className: "formcomposer-section-grid"
|
|
40493
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Sewer Treatment Plant (STP)")), /*#__PURE__*/React__default.createElement("div", {
|
|
40494
|
+
className: "field"
|
|
40495
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
40496
|
+
control: control,
|
|
40497
|
+
name: "hasCertificate",
|
|
40498
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
40499
|
+
className: "form-field",
|
|
40500
|
+
style: {
|
|
40501
|
+
display: "flex",
|
|
40502
|
+
gap: "2rem",
|
|
40503
|
+
alignItems: "center"
|
|
40504
|
+
},
|
|
40505
|
+
name: "hasSewerTreatmentPlantRadio",
|
|
40506
|
+
options: [{
|
|
40507
|
+
i18nKey: "CORE_COMMON_YES",
|
|
40508
|
+
code: true
|
|
40509
|
+
}, {
|
|
40510
|
+
i18nKey: "CORE_COMMON_NO",
|
|
40511
|
+
code: false
|
|
40512
|
+
}],
|
|
40513
|
+
optionsKey: "i18nKey",
|
|
40514
|
+
selectedOption: props.value ? {
|
|
40515
|
+
i18nKey: "CORE_COMMON_YES",
|
|
40516
|
+
code: true
|
|
40517
|
+
} : {
|
|
40518
|
+
i18nKey: "CORE_COMMON_NO",
|
|
40519
|
+
code: false
|
|
40520
|
+
},
|
|
40521
|
+
onSelect: e => props.onChange(e.code),
|
|
40522
|
+
t: t
|
|
39743
40523
|
})
|
|
39744
40524
|
})))));
|
|
39745
40525
|
return userType === "citizen" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormStep, {
|
|
@@ -43862,22 +44642,26 @@ const useInboxTableConfig$1 = _ref => {
|
|
|
43862
44642
|
Header: t("WS_MYCONNECTIONS_APPLICATION_NO"),
|
|
43863
44643
|
disableSortBy: true,
|
|
43864
44644
|
Cell: _ref3 => {
|
|
43865
|
-
var _row$original2;
|
|
44645
|
+
var _row$original2, _row$original2$servic, _row$original3, _row$original4;
|
|
43866
44646
|
let {
|
|
43867
44647
|
row
|
|
43868
44648
|
} = _ref3;
|
|
44649
|
+
const service = row !== null && row !== void 0 && (_row$original2 = row.original) !== null && _row$original2 !== void 0 && (_row$original2$servic = _row$original2.service) !== null && _row$original2$servic !== void 0 && _row$original2$servic.includes("SW") ? "SEWERAGE" : "WATER";
|
|
44650
|
+
const fromScreen = service === "WATER" ? "ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL" : "ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL";
|
|
44651
|
+
const applicationNo = row === null || row === void 0 ? void 0 : (_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3["applicationNo"];
|
|
44652
|
+
const linkUrl = `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${applicationNo}&tenantId=${tenantId}&service=${service}&from=${fromScreen}`;
|
|
43869
44653
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
43870
44654
|
style: {
|
|
43871
44655
|
display: "flex",
|
|
43872
44656
|
flexDirection: "column"
|
|
43873
44657
|
}
|
|
43874
44658
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
43875
|
-
to:
|
|
44659
|
+
to: linkUrl
|
|
43876
44660
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
43877
44661
|
className: "link"
|
|
43878
|
-
},
|
|
44662
|
+
}, applicationNo)), GetCell(t(`BILLAMENDMENT_${row === null || row === void 0 ? void 0 : (_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.amendmentReason}_HEADING`)));
|
|
43879
44663
|
}
|
|
43880
|
-
}
|
|
44664
|
+
}, {
|
|
43881
44665
|
Header: t("CORE_COMMON_NAME"),
|
|
43882
44666
|
disableSortBy: true,
|
|
43883
44667
|
accessor: "owner"
|
|
@@ -43973,14 +44757,17 @@ const useInboxMobileCardsData$1 = _ref => {
|
|
|
43973
44757
|
const GetCell = value => /*#__PURE__*/React__default.createElement("span", {
|
|
43974
44758
|
className: "cell-text styled-cell"
|
|
43975
44759
|
}, value);
|
|
43976
|
-
const getApplicationNumberCell = (value, amendmentReason) => {
|
|
44760
|
+
const getApplicationNumberCell = (value, amendmentReason, tenantId, service) => {
|
|
44761
|
+
const serviceType = service !== null && service !== void 0 && service.includes("SW") ? "SEWERAGE" : "WATER";
|
|
44762
|
+
const fromScreen = serviceType === "WATER" ? "ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL" : "ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL";
|
|
44763
|
+
const linkUrl = `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${value}&tenantId=${tenantId}&service=${serviceType}&from=${fromScreen}`;
|
|
43977
44764
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
43978
44765
|
style: {
|
|
43979
44766
|
display: "flex",
|
|
43980
44767
|
flexDirection: "column"
|
|
43981
44768
|
}
|
|
43982
44769
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
43983
|
-
to:
|
|
44770
|
+
to: linkUrl
|
|
43984
44771
|
}, /*#__PURE__*/React__default.createElement("span", {
|
|
43985
44772
|
className: "link"
|
|
43986
44773
|
}, value)), GetCell(t(`BILLAMENDMENT_${amendmentReason}_HEADING`)));
|
|
@@ -43998,7 +44785,7 @@ const useInboxMobileCardsData$1 = _ref => {
|
|
|
43998
44785
|
} = _ref2;
|
|
43999
44786
|
return {
|
|
44000
44787
|
[t("WS_COMMON_TABLE_COL_SERVICE_LABEL")]: t(`ACTION_TEST_${service}`),
|
|
44001
|
-
[t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason),
|
|
44788
|
+
[t("WS_MYCONNECTIONS_APPLICATION_NO")]: getApplicationNumberCell(applicationNo, amendmentReason, tenantId, service),
|
|
44002
44789
|
[t("CORE_COMMON_NAME")]: owner,
|
|
44003
44790
|
[t("WS_COMMON_TABLE_COL_ADDRESS")]: t(Digit.Utils.locale.getRevenueLocalityCode(address, tenantId)),
|
|
44004
44791
|
[t("WS_COMMON_TABLE_COL_APPLICATION_STATUS")]: t(status),
|
|
@@ -44416,13 +45203,15 @@ const SearchBillAmendment = () => {
|
|
|
44416
45203
|
Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
|
|
44417
45204
|
accessor: "amendmentId",
|
|
44418
45205
|
Cell: _ref => {
|
|
45206
|
+
var _row$original, _row$original$busines;
|
|
44419
45207
|
let {
|
|
44420
45208
|
row
|
|
44421
45209
|
} = _ref;
|
|
45210
|
+
const service = (_row$original = row.original) !== null && _row$original !== void 0 && (_row$original$busines = _row$original.businessService) !== null && _row$original$busines !== void 0 && _row$original$busines.includes("SW") ? "SEWERAGE" : "WATER";
|
|
44422
45211
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
44423
45212
|
className: "link"
|
|
44424
45213
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
44425
|
-
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
45214
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}&tenantId=${tenantId}&service=${service}&from=WS_BILL_AMENDMENT_SEARCH_APPLICATION`
|
|
44426
45215
|
}, row.original.amendmentId));
|
|
44427
45216
|
}
|
|
44428
45217
|
}, {
|
|
@@ -44453,13 +45242,15 @@ const SearchBillAmendment = () => {
|
|
|
44453
45242
|
}, {
|
|
44454
45243
|
Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
|
|
44455
45244
|
Cell: _ref3 => {
|
|
45245
|
+
var _row$original2, _row$original2$busine;
|
|
44456
45246
|
let {
|
|
44457
45247
|
row
|
|
44458
45248
|
} = _ref3;
|
|
45249
|
+
const service = (_row$original2 = row.original) !== null && _row$original2 !== void 0 && (_row$original2$busine = _row$original2.businessService) !== null && _row$original2$busine !== void 0 && _row$original2$busine.includes("SW") ? "SEWERAGE" : "WATER";
|
|
44459
45250
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
44460
45251
|
className: "link"
|
|
44461
45252
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
44462
|
-
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
45253
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}&tenantId=${tenantId}&service=${service}&from=WS_BILL_AMENDMENT_SEARCH_APPLICATION`
|
|
44463
45254
|
}, t("ES_COMMON_VIEW", "View")));
|
|
44464
45255
|
}
|
|
44465
45256
|
}], [t, tenantId]);
|
|
@@ -44703,12 +45494,25 @@ const newConfig = [{
|
|
|
44703
45494
|
route: "rain-water-harvesting",
|
|
44704
45495
|
component: "WSRainWaterHarvesting",
|
|
44705
45496
|
key: "rainWaterHarvesting",
|
|
45497
|
+
nextStep: "sewer-treatment-plant",
|
|
45498
|
+
WATER: "sewer-treatment-plant",
|
|
45499
|
+
hideInEmployee: true,
|
|
45500
|
+
texts: {
|
|
45501
|
+
headerCaption: "WS_COMMON_CONNECTION_DETAIL",
|
|
45502
|
+
header: "Rain Water Harvesting Certificate",
|
|
45503
|
+
cardText: "",
|
|
45504
|
+
submitBarLabel: "CS_COMMON_NEXT"
|
|
45505
|
+
}
|
|
45506
|
+
}, {
|
|
45507
|
+
route: "sewer-treatment-plant",
|
|
45508
|
+
component: "WSSewerTreatmentPlant",
|
|
45509
|
+
key: "sewerTreatmentPlant",
|
|
44706
45510
|
nextStep: "document-details",
|
|
44707
45511
|
WATER: "document-details",
|
|
44708
45512
|
hideInEmployee: true,
|
|
44709
45513
|
texts: {
|
|
44710
45514
|
headerCaption: "WS_COMMON_CONNECTION_DETAIL",
|
|
44711
|
-
header: "
|
|
45515
|
+
header: "Sewer Treatment Plant (STP)",
|
|
44712
45516
|
cardText: "",
|
|
44713
45517
|
submitBarLabel: "CS_COMMON_NEXT"
|
|
44714
45518
|
}
|
|
@@ -49577,7 +50381,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
|
|
|
49577
50381
|
};
|
|
49578
50382
|
|
|
49579
50383
|
const ConnectionDetails$5 = () => {
|
|
49580
|
-
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2,
|
|
50384
|
+
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2, _state2$applicationTy, _state3, _state6, _state9, _state0, _state1, _state10, _state11, _state11$applicationT, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state17, _state18, _state19, _state20, _state20$applicationT, _state21, _state21$waterSource, _state21$waterSource$, _state22, _state23, _state23$waterSource, _state23$waterSource$, _state24, _state25, _state26, _state27, _state27$additionalDe, _state28, _state28$applicationT, _state29, _state29$additionalDe, _state29$additionalDe2, _state30, _state30$additionalDe, _state30$additionalDe2, _state31, _state31$additionalDe, _state32, _state32$additionalDe, _state33, _state33$additionalDe, _state33$additionalDe2, _state34, _state34$additionalDe, _state35, _state36, _state37, _state37$property, _state37$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state38, _state38$additionalDe, _state38$additionalDe2, _state39, _state39$additionalDe, _state39$additionalDe2, _state40, _state40$additionalDe, _state41, _state41$additionalDe, _state42, _state42$additionalDe, _state43, _state43$additionalDe, _state43$additionalDe2, _state44, _state44$additionalDe, _state44$additionalDe2, _state45, _state45$additionalDe, _state46, _state46$additionalDe, _state47, _state47$additionalDe, _state48, _state48$additionalDe, _state49, _state49$additionalDe, _state50, _state50$additionalDe, _state51, _state51$additionalDe, _state52, _state53, _state54, _state55, _state55$connectionHo, _state55$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect48, _data$SewerageConnect49, _data$SewerageConnect50, _data$SewerageConnect51, _state56, _state57, _state60, _state60$status, _state61, _state61$applicationS, _state62, _paymentDetails$data17, _paymentDetails$data18;
|
|
49581
50385
|
const {
|
|
49582
50386
|
t
|
|
49583
50387
|
} = reactI18next.useTranslation();
|
|
@@ -49592,6 +50396,7 @@ const ConnectionDetails$5 = () => {
|
|
|
49592
50396
|
} = reactRouterDom.useLocation();
|
|
49593
50397
|
const [showModal, setshowModal] = React.useState(false);
|
|
49594
50398
|
const [showActionToast, setshowActionToast] = React.useState(null);
|
|
50399
|
+
const [activeAmendment, setActiveAmendment] = React.useState(null);
|
|
49595
50400
|
const mobileView = Digit.Utils.browser.isMobile();
|
|
49596
50401
|
const getAddress = address => {
|
|
49597
50402
|
var _address$locality, _address$locality2, _address$city;
|
|
@@ -49753,9 +50558,10 @@ const ConnectionDetails$5 = () => {
|
|
|
49753
50558
|
downloadOptions.sort(function (a, b) {
|
|
49754
50559
|
return a.order - b.order;
|
|
49755
50560
|
});
|
|
49756
|
-
const isSW = (_state = state) === null || _state === void 0 ? void 0 : (_state$applicationNo = _state.applicationNo) === null || _state$applicationNo === void 0 ? void 0 : _state$applicationNo.includes("SW");
|
|
50561
|
+
const isSW = ((_state = state) === null || _state === void 0 ? void 0 : (_state$applicationNo = _state.applicationNo) === null || _state$applicationNo === void 0 ? void 0 : _state$applicationNo.includes("SW")) || (applicationNobyData === null || applicationNobyData === void 0 ? void 0 : applicationNobyData.includes("SW"));
|
|
50562
|
+
const serviceType = (_state2 = state) !== null && _state2 !== void 0 && (_state2$applicationTy = _state2.applicationType) !== null && _state2$applicationTy !== void 0 && _state2$applicationTy.includes("WATER") || applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("WS") ? "WATER" : "SEWERAGE";
|
|
49757
50563
|
const fetchBillParams = {
|
|
49758
|
-
consumerCode: (
|
|
50564
|
+
consumerCode: (_state3 = state) === null || _state3 === void 0 ? void 0 : _state3.connectionNo
|
|
49759
50565
|
};
|
|
49760
50566
|
const paymentDetails = Digit.Hooks.useFetchBillsForBuissnessService({
|
|
49761
50567
|
businessService: isSW ? "SW" : "WS",
|
|
@@ -49831,11 +50637,45 @@ const ConnectionDetails$5 = () => {
|
|
|
49831
50637
|
}
|
|
49832
50638
|
}
|
|
49833
50639
|
};
|
|
50640
|
+
React.useEffect(() => {
|
|
50641
|
+
let isMounted = true;
|
|
50642
|
+
const checkActiveAmendment = function () {
|
|
50643
|
+
try {
|
|
50644
|
+
var _state4, _state5;
|
|
50645
|
+
const connNo = (_state4 = state) === null || _state4 === void 0 ? void 0 : _state4.connectionNo;
|
|
50646
|
+
if (!connNo) return Promise.resolve();
|
|
50647
|
+
const finalTenantId = tenantId || ((_state5 = state) === null || _state5 === void 0 ? void 0 : _state5.tenantId) || "dl.djb";
|
|
50648
|
+
const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
|
|
50649
|
+
const businessService = finalServiceType === "WATER" ? "WS" : "SW";
|
|
50650
|
+
const _temp3 = _catch(function () {
|
|
50651
|
+
return Promise.resolve(Digit.PaymentService.searchAmendment(finalTenantId, {
|
|
50652
|
+
consumerCode: connNo,
|
|
50653
|
+
businessService
|
|
50654
|
+
})).then(function (res) {
|
|
50655
|
+
var _res$Amendments;
|
|
50656
|
+
const inWorkflow = res === null || res === void 0 ? void 0 : (_res$Amendments = res.Amendments) === null || _res$Amendments === void 0 ? void 0 : _res$Amendments.find(item => (item === null || item === void 0 ? void 0 : item.status) === "INWORKFLOW");
|
|
50657
|
+
if (isMounted && inWorkflow) {
|
|
50658
|
+
setActiveAmendment(inWorkflow);
|
|
50659
|
+
}
|
|
50660
|
+
});
|
|
50661
|
+
}, function (e) {
|
|
50662
|
+
console.warn("Could not check active amendment in connection details", e);
|
|
50663
|
+
});
|
|
50664
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
50665
|
+
} catch (e) {
|
|
50666
|
+
return Promise.reject(e);
|
|
50667
|
+
}
|
|
50668
|
+
};
|
|
50669
|
+
checkActiveAmendment();
|
|
50670
|
+
return () => {
|
|
50671
|
+
isMounted = false;
|
|
50672
|
+
};
|
|
50673
|
+
}, [(_state6 = state) === null || _state6 === void 0 ? void 0 : _state6.connectionNo, applicationNobyData, serviceType, tenantId]);
|
|
49834
50674
|
const getBillAmendmentButton = function () {
|
|
49835
50675
|
try {
|
|
49836
|
-
var
|
|
50676
|
+
var _state7, _state8;
|
|
49837
50677
|
let _exit = false;
|
|
49838
|
-
function
|
|
50678
|
+
function _temp5(_result) {
|
|
49839
50679
|
if (_exit) return _result;
|
|
49840
50680
|
history.push(`/digit-ui/citizen/ws/bill-amendment?connectionNumber=${connNo}&tenantId=${finalTenantId}&service=${finalServiceType}`, JSON.stringify({
|
|
49841
50681
|
data: {
|
|
@@ -49844,32 +50684,26 @@ const ConnectionDetails$5 = () => {
|
|
|
49844
50684
|
}
|
|
49845
50685
|
}));
|
|
49846
50686
|
}
|
|
49847
|
-
const connNo = ((
|
|
49848
|
-
const finalTenantId = tenantId || ((
|
|
50687
|
+
const connNo = ((_state7 = state) === null || _state7 === void 0 ? void 0 : _state7.connectionNo) || applicationNobyData;
|
|
50688
|
+
const finalTenantId = tenantId || ((_state8 = state) === null || _state8 === void 0 ? void 0 : _state8.tenantId) || "dl.djb";
|
|
49849
50689
|
const finalServiceType = serviceType || (connNo !== null && connNo !== void 0 && connNo.includes("SW") ? "SEWERAGE" : "WATER");
|
|
49850
50690
|
const businessService = finalServiceType === "WATER" ? "WS" : "SW";
|
|
49851
|
-
const
|
|
50691
|
+
const _temp4 = _catch(function () {
|
|
49852
50692
|
return Promise.resolve(Digit.PaymentService.searchAmendment(finalTenantId, {
|
|
49853
50693
|
consumerCode: connNo,
|
|
49854
50694
|
businessService
|
|
49855
50695
|
})).then(function (res) {
|
|
49856
|
-
var _res$
|
|
49857
|
-
const inWorkflow = res === null || res === void 0 ? void 0 : (_res$
|
|
50696
|
+
var _res$Amendments2;
|
|
50697
|
+
const inWorkflow = res === null || res === void 0 ? void 0 : (_res$Amendments2 = res.Amendments) === null || _res$Amendments2 === void 0 ? void 0 : _res$Amendments2.find(item => (item === null || item === void 0 ? void 0 : item.status) === "INWORKFLOW");
|
|
49858
50698
|
if (inWorkflow) {
|
|
49859
|
-
|
|
49860
|
-
key: "error",
|
|
49861
|
-
label: "WORKFLOW_IN_PROGRESS"
|
|
49862
|
-
});
|
|
49863
|
-
setTimeout(() => {
|
|
49864
|
-
closeBillToast();
|
|
49865
|
-
}, 5000);
|
|
50699
|
+
history.push(`/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${inWorkflow.amendmentId}`);
|
|
49866
50700
|
_exit = true;
|
|
49867
50701
|
}
|
|
49868
50702
|
});
|
|
49869
50703
|
}, function (e) {
|
|
49870
50704
|
console.error("Error searching amendment", e);
|
|
49871
50705
|
});
|
|
49872
|
-
return Promise.resolve(
|
|
50706
|
+
return Promise.resolve(_temp4 && _temp4.then ? _temp4.then(_temp5) : _temp5(_temp4));
|
|
49873
50707
|
} catch (e) {
|
|
49874
50708
|
return Promise.reject(e);
|
|
49875
50709
|
}
|
|
@@ -49907,8 +50741,7 @@ const ConnectionDetails$5 = () => {
|
|
|
49907
50741
|
if (isLoading || isPTLoading) {
|
|
49908
50742
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
49909
50743
|
}
|
|
49910
|
-
sessionStorage.setItem("ApplicationNoState", (
|
|
49911
|
-
let serviceType = (_state6 = state) !== null && _state6 !== void 0 && (_state6$applicationTy = _state6.applicationType) !== null && _state6$applicationTy !== void 0 && _state6$applicationTy.includes("WATER") ? "WATER" : "SEWERAGE";
|
|
50744
|
+
sessionStorage.setItem("ApplicationNoState", (_state9 = state) === null || _state9 === void 0 ? void 0 : _state9.applicationNo);
|
|
49912
50745
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, checkifPrivacyenabled && /*#__PURE__*/React__default.createElement(WSInfoLabel, {
|
|
49913
50746
|
t: t
|
|
49914
50747
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -49929,21 +50762,64 @@ const ConnectionDetails$5 = () => {
|
|
|
49929
50762
|
options: downloadOptions,
|
|
49930
50763
|
downloadBtnClassName: "employee-download-btn-className",
|
|
49931
50764
|
optionsClassName: "employee-options-btn-className"
|
|
49932
|
-
}))),
|
|
50765
|
+
}))), activeAmendment && /*#__PURE__*/React__default.createElement("div", {
|
|
50766
|
+
style: {
|
|
50767
|
+
padding: "14px 16px",
|
|
50768
|
+
backgroundColor: "#EFF6FF",
|
|
50769
|
+
border: "1px solid #BFDBFE",
|
|
50770
|
+
borderRadius: "8px",
|
|
50771
|
+
marginBottom: "20px"
|
|
50772
|
+
}
|
|
50773
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50774
|
+
style: {
|
|
50775
|
+
display: "flex",
|
|
50776
|
+
justifyContent: "space-between",
|
|
50777
|
+
alignItems: "center",
|
|
50778
|
+
flexWrap: "wrap",
|
|
50779
|
+
gap: "10px"
|
|
50780
|
+
}
|
|
50781
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
50782
|
+
style: {
|
|
50783
|
+
fontWeight: "700",
|
|
50784
|
+
color: "#1E40AF",
|
|
50785
|
+
fontSize: "16px"
|
|
50786
|
+
}
|
|
50787
|
+
}, t("WS_ACTIVE_BILL_AMENDMENT_LABEL", "Active Bill Correction / Amendment Request")), /*#__PURE__*/React__default.createElement("div", {
|
|
50788
|
+
style: {
|
|
50789
|
+
color: "#1E3A8A",
|
|
50790
|
+
fontSize: "14px",
|
|
50791
|
+
marginTop: "4px"
|
|
50792
|
+
}
|
|
50793
|
+
}, t("WS_APPLICATION_NO_LABEL", "Application No:"), " ", /*#__PURE__*/React__default.createElement("strong", null, activeAmendment.amendmentId), " | ", t("WS_STATUS_LABEL", "Status:"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
50794
|
+
style: {
|
|
50795
|
+
fontWeight: "600",
|
|
50796
|
+
color: "#B45309"
|
|
50797
|
+
}
|
|
50798
|
+
}, t(`CS_${activeAmendment.status}`, activeAmendment.status)))), /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
50799
|
+
to: `/digit-ui/citizen/ws/bill-amendment/application-details?applicationNumber=${activeAmendment.amendmentId}`
|
|
50800
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
50801
|
+
className: "selector-button-border",
|
|
50802
|
+
style: {
|
|
50803
|
+
height: "36px",
|
|
50804
|
+
padding: "0 16px",
|
|
50805
|
+
margin: 0,
|
|
50806
|
+
cursor: "pointer"
|
|
50807
|
+
}
|
|
50808
|
+
}, t("WS_TRACK_OR_RESUBMIT_LABEL", "View Details & Track / Re-Submit"))))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49933
50809
|
className: "border-none",
|
|
49934
50810
|
label: t("WS_MYCONNECTIONS_CONSUMER_NO"),
|
|
49935
|
-
text: (
|
|
50811
|
+
text: (_state0 = state) === null || _state0 === void 0 ? void 0 : _state0.connectionNo
|
|
49936
50812
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49937
50813
|
className: "border-none",
|
|
49938
50814
|
label: t("WS_SERVICE_NAME_LABEL"),
|
|
49939
|
-
text: t(`WS_APPLICATION_TYPE_${(
|
|
50815
|
+
text: t(`WS_APPLICATION_TYPE_${(_state1 = state) === null || _state1 === void 0 ? void 0 : _state1.applicationType}`),
|
|
49940
50816
|
textStyle: {
|
|
49941
50817
|
wordBreak: "break-word"
|
|
49942
50818
|
}
|
|
49943
50819
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49944
50820
|
className: "border-none",
|
|
49945
50821
|
label: t("WS_STATUS"),
|
|
49946
|
-
text: ((
|
|
50822
|
+
text: ((_state10 = state) === null || _state10 === void 0 ? void 0 : _state10.status) || "NA",
|
|
49947
50823
|
textStyle: {
|
|
49948
50824
|
whiteSpace: "pre"
|
|
49949
50825
|
}
|
|
@@ -49951,127 +50827,127 @@ const ConnectionDetails$5 = () => {
|
|
|
49951
50827
|
styles: {
|
|
49952
50828
|
fontSize: "28px"
|
|
49953
50829
|
}
|
|
49954
|
-
}, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, ((
|
|
50830
|
+
}, t("WS_COMMON_CONNECTION_DETAIL")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, ((_state11 = state) === null || _state11 === void 0 ? void 0 : (_state11$applicationT = _state11.applicationType) === null || _state11$applicationT === void 0 ? void 0 : _state11$applicationT.includes("WATER")) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49955
50831
|
className: "border-none",
|
|
49956
50832
|
label: t("WS_COMMON_TABLE_COL_CONNECTIONTYPE_LABEL"),
|
|
49957
|
-
text: ((
|
|
50833
|
+
text: ((_state12 = state) === null || _state12 === void 0 ? void 0 : _state12.connectionType) || t("NA"),
|
|
49958
50834
|
textStyle: {
|
|
49959
50835
|
whiteSpace: "pre"
|
|
49960
50836
|
}
|
|
49961
50837
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49962
50838
|
className: "border-none",
|
|
49963
50839
|
label: t("WS_SERV_DETAIL_NO_OF_TAPS"),
|
|
49964
|
-
text: (
|
|
50840
|
+
text: (_state13 = state) === null || _state13 === void 0 ? void 0 : _state13.noOfTaps,
|
|
49965
50841
|
textStyle: {
|
|
49966
50842
|
whiteSpace: "pre"
|
|
49967
50843
|
}
|
|
49968
50844
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49969
50845
|
className: "border-none",
|
|
49970
50846
|
label: t("WS_PIPE_SIZE_IN_INCHES_LABEL"),
|
|
49971
|
-
text: ((
|
|
50847
|
+
text: ((_state14 = state) === null || _state14 === void 0 ? void 0 : _state14.pipeSize) || "NA",
|
|
49972
50848
|
textStyle: {
|
|
49973
50849
|
whiteSpace: "pre"
|
|
49974
50850
|
}
|
|
49975
|
-
})), ((
|
|
50851
|
+
})), ((_state15 = state) === null || _state15 === void 0 ? void 0 : (_state15$applicationT = _state15.applicationType) === null || _state15$applicationT === void 0 ? void 0 : _state15$applicationT.includes("SEWERAGE")) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49976
50852
|
className: "border-none",
|
|
49977
50853
|
label: t("WS_CONN_DETAIL_WATER_CLOSETS"),
|
|
49978
|
-
text: (
|
|
50854
|
+
text: (_state16 = state) === null || _state16 === void 0 ? void 0 : _state16.proposedWaterClosets,
|
|
49979
50855
|
textStyle: {
|
|
49980
50856
|
whiteSpace: "pre"
|
|
49981
50857
|
}
|
|
49982
50858
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49983
50859
|
className: "border-none",
|
|
49984
50860
|
label: t("WS_SERV_DETAIL_NO_OF_TOILETS"),
|
|
49985
|
-
text: ((
|
|
50861
|
+
text: ((_state17 = state) === null || _state17 === void 0 ? void 0 : _state17.proposedToilets) || t("CS_NA"),
|
|
49986
50862
|
textStyle: {
|
|
49987
50863
|
whiteSpace: "pre"
|
|
49988
50864
|
}
|
|
49989
50865
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49990
50866
|
className: "border-none",
|
|
49991
50867
|
label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
|
|
49992
|
-
text: (
|
|
50868
|
+
text: (_state18 = state) !== null && _state18 !== void 0 && _state18.connectionExecutionDate ? Digit.DateUtils.ConvertEpochToDate((_state19 = state) === null || _state19 === void 0 ? void 0 : _state19.connectionExecutionDate) : t("CS_NA"),
|
|
49993
50869
|
textStyle: {
|
|
49994
50870
|
whiteSpace: "pre"
|
|
49995
50871
|
}
|
|
49996
|
-
})), ((
|
|
50872
|
+
})), ((_state20 = state) === null || _state20 === void 0 ? void 0 : (_state20$applicationT = _state20.applicationType) === null || _state20$applicationT === void 0 ? void 0 : _state20$applicationT.includes("WATER")) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
49997
50873
|
className: "border-none",
|
|
49998
50874
|
label: t("WS_SERV_DETAIL_WATER_SOURCE"),
|
|
49999
|
-
text: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((
|
|
50875
|
+
text: t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state21 = state) === null || _state21 === void 0 ? void 0 : (_state21$waterSource = _state21.waterSource) === null || _state21$waterSource === void 0 ? void 0 : (_state21$waterSource$ = _state21$waterSource.split(".")) === null || _state21$waterSource$ === void 0 ? void 0 : _state21$waterSource$[0], ".", "_")}`) || t(`WS_SERVICES_MASTERS_WATERSOURCE_${stringReplaceAll((_state22 = state) === null || _state22 === void 0 ? void 0 : _state22.waterSource, ".", "_")}`) || t("CS_NA"),
|
|
50000
50876
|
textStyle: {
|
|
50001
50877
|
whiteSpace: "pre"
|
|
50002
50878
|
}
|
|
50003
50879
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50004
50880
|
className: "border-none",
|
|
50005
50881
|
label: t("WS_SERV_DETAIL_WATER_SUB_SOURCE"),
|
|
50006
|
-
text: t((
|
|
50882
|
+
text: t((_state23 = state) === null || _state23 === void 0 ? void 0 : (_state23$waterSource = _state23.waterSource) === null || _state23$waterSource === void 0 ? void 0 : (_state23$waterSource$ = _state23$waterSource.split(".")) === null || _state23$waterSource$ === void 0 ? void 0 : _state23$waterSource$[1]) || t("CS_NA"),
|
|
50007
50883
|
textStyle: {
|
|
50008
50884
|
whiteSpace: "pre"
|
|
50009
50885
|
}
|
|
50010
50886
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50011
50887
|
className: "border-none",
|
|
50012
50888
|
label: t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"),
|
|
50013
|
-
text: Digit.DateUtils.ConvertEpochToDate((
|
|
50889
|
+
text: Digit.DateUtils.ConvertEpochToDate((_state24 = state) === null || _state24 === void 0 ? void 0 : _state24.connectionExecutionDate) || t("NA"),
|
|
50014
50890
|
textStyle: {
|
|
50015
50891
|
whiteSpace: "pre"
|
|
50016
50892
|
}
|
|
50017
50893
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50018
50894
|
className: "border-none",
|
|
50019
50895
|
label: t("WS_SERV_DETAIL_METER_ID"),
|
|
50020
|
-
text: (
|
|
50896
|
+
text: (_state25 = state) === null || _state25 === void 0 ? void 0 : _state25.meterId,
|
|
50021
50897
|
textStyle: {
|
|
50022
50898
|
whiteSpace: "pre"
|
|
50023
50899
|
}
|
|
50024
50900
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50025
50901
|
className: "border-none",
|
|
50026
50902
|
label: t("WS_ADDN_DETAIL_METER_INSTALL_DATE"),
|
|
50027
|
-
text: Digit.DateUtils.ConvertEpochToDate((
|
|
50903
|
+
text: Digit.DateUtils.ConvertEpochToDate((_state26 = state) === null || _state26 === void 0 ? void 0 : _state26.meterInstallationDate) || "NA",
|
|
50028
50904
|
textStyle: {
|
|
50029
50905
|
whiteSpace: "pre"
|
|
50030
50906
|
}
|
|
50031
50907
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50032
50908
|
className: "border-none",
|
|
50033
50909
|
label: t("WS_ADDN_DETAILS_INITIAL_METER_READING"),
|
|
50034
|
-
text: ((
|
|
50910
|
+
text: ((_state27 = state) === null || _state27 === void 0 ? void 0 : (_state27$additionalDe = _state27.additionalDetails) === null || _state27$additionalDe === void 0 ? void 0 : _state27$additionalDe.initialMeterReading) || "NA",
|
|
50035
50911
|
textStyle: {
|
|
50036
50912
|
whiteSpace: "pre"
|
|
50037
50913
|
}
|
|
50038
|
-
})), ((
|
|
50914
|
+
})), ((_state28 = state) === null || _state28 === void 0 ? void 0 : (_state28$applicationT = _state28.applicationType) === null || _state28$applicationT === void 0 ? void 0 : _state28$applicationT.includes("WATER")) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50039
50915
|
className: "border-none",
|
|
50040
50916
|
label: t("WS_WATER_DEMAND_TYPE"),
|
|
50041
|
-
text: (
|
|
50917
|
+
text: (_state29 = state) !== null && _state29 !== void 0 && (_state29$additionalDe = _state29.additionalDetails) !== null && _state29$additionalDe !== void 0 && (_state29$additionalDe2 = _state29$additionalDe.waterDemandType) !== null && _state29$additionalDe2 !== void 0 && _state29$additionalDe2.i18nKey ? t((_state30 = state) === null || _state30 === void 0 ? void 0 : (_state30$additionalDe = _state30.additionalDetails) === null || _state30$additionalDe === void 0 ? void 0 : (_state30$additionalDe2 = _state30$additionalDe.waterDemandType) === null || _state30$additionalDe2 === void 0 ? void 0 : _state30$additionalDe2.i18nKey) : "NA",
|
|
50042
50918
|
textStyle: {
|
|
50043
50919
|
whiteSpace: "pre"
|
|
50044
50920
|
}
|
|
50045
50921
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50046
50922
|
className: "border-none",
|
|
50047
50923
|
label: t("WS_CATEGORY_TYPE"),
|
|
50048
|
-
text: ((
|
|
50924
|
+
text: ((_state31 = state) === null || _state31 === void 0 ? void 0 : (_state31$additionalDe = _state31.additionalDetails) === null || _state31$additionalDe === void 0 ? void 0 : _state31$additionalDe.categoryType) || "NA",
|
|
50049
50925
|
textStyle: {
|
|
50050
50926
|
whiteSpace: "pre"
|
|
50051
50927
|
}
|
|
50052
50928
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50053
50929
|
className: "border-none",
|
|
50054
50930
|
label: t("WS_ZRO_NAME"),
|
|
50055
|
-
text: ((
|
|
50931
|
+
text: ((_state32 = state) === null || _state32 === void 0 ? void 0 : (_state32$additionalDe = _state32.additionalDetails) === null || _state32$additionalDe === void 0 ? void 0 : _state32$additionalDe.zro) || "NA",
|
|
50056
50932
|
textStyle: {
|
|
50057
50933
|
whiteSpace: "pre"
|
|
50058
50934
|
}
|
|
50059
50935
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50060
50936
|
className: "border-none",
|
|
50061
50937
|
label: t("WS_CONNECTION_USAGE_TYPE"),
|
|
50062
|
-
text: ((
|
|
50938
|
+
text: ((_state33 = state) === null || _state33 === void 0 ? void 0 : (_state33$additionalDe = _state33.additionalDetails) === null || _state33$additionalDe === void 0 ? void 0 : (_state33$additionalDe2 = _state33$additionalDe.WaterConnectionUsageType) === null || _state33$additionalDe2 === void 0 ? void 0 : _state33$additionalDe2.name) || "NA",
|
|
50063
50939
|
textStyle: {
|
|
50064
50940
|
whiteSpace: "pre"
|
|
50065
50941
|
}
|
|
50066
50942
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50067
50943
|
className: "border-none",
|
|
50068
50944
|
label: t("WS_TEMPORARY_CONNECTION"),
|
|
50069
|
-
text: ((
|
|
50945
|
+
text: ((_state34 = state) === null || _state34 === void 0 ? void 0 : (_state34$additionalDe = _state34.additionalDetails) === null || _state34$additionalDe === void 0 ? void 0 : _state34$additionalDe.temporaryConnection) || "NA",
|
|
50070
50946
|
textStyle: {
|
|
50071
50947
|
whiteSpace: "pre"
|
|
50072
50948
|
}
|
|
50073
|
-
})), ((
|
|
50074
|
-
to: `/digit-ui/citizen/ws/consumption/details?applicationNo=${(
|
|
50949
|
+
})), ((_state35 = state) === null || _state35 === void 0 ? void 0 : _state35.connectionType) === "Metered" && /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
50950
|
+
to: `/digit-ui/citizen/ws/consumption/details?applicationNo=${(_state36 = state) === null || _state36 === void 0 ? void 0 : _state36.connectionNo}`
|
|
50075
50951
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
50076
50952
|
style: {
|
|
50077
50953
|
textAlign: "left",
|
|
@@ -50086,7 +50962,7 @@ const ConnectionDetails$5 = () => {
|
|
|
50086
50962
|
}, t("WS_COMMON_PROPERTY_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50087
50963
|
className: "border-none",
|
|
50088
50964
|
label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
|
|
50089
|
-
text: (
|
|
50965
|
+
text: (_state37 = state) === null || _state37 === void 0 ? void 0 : (_state37$property = _state37.property) === null || _state37$property === void 0 ? void 0 : (_state37$property$own = _state37$property.owners) === null || _state37$property$own === void 0 ? void 0 : _state37$property$own.map(owner => owner.name).join(","),
|
|
50090
50966
|
textStyle: {
|
|
50091
50967
|
whiteSpace: "pre"
|
|
50092
50968
|
}
|
|
@@ -50121,32 +50997,32 @@ const ConnectionDetails$5 = () => {
|
|
|
50121
50997
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50122
50998
|
className: "border-none",
|
|
50123
50999
|
label: t("WS_PROPERTY_TYPE"),
|
|
50124
|
-
text: ((
|
|
51000
|
+
text: ((_state38 = state) === null || _state38 === void 0 ? void 0 : (_state38$additionalDe = _state38.additionalDetails) === null || _state38$additionalDe === void 0 ? void 0 : (_state38$additionalDe2 = _state38$additionalDe.propertyType) === null || _state38$additionalDe2 === void 0 ? void 0 : _state38$additionalDe2.name) || "NA"
|
|
50125
51001
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50126
51002
|
className: "border-none",
|
|
50127
51003
|
label: t("WS_PROPERTY_CATEGORY"),
|
|
50128
|
-
text: ((
|
|
51004
|
+
text: ((_state39 = state) === null || _state39 === void 0 ? void 0 : (_state39$additionalDe = _state39.additionalDetails) === null || _state39$additionalDe === void 0 ? void 0 : (_state39$additionalDe2 = _state39$additionalDe.propertyCategory) === null || _state39$additionalDe2 === void 0 ? void 0 : _state39$additionalDe2.name) || "NA"
|
|
50129
51005
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50130
51006
|
className: "border-none",
|
|
50131
51007
|
label: t("WS_PLOT_AREA"),
|
|
50132
|
-
text: ((
|
|
51008
|
+
text: ((_state40 = state) === null || _state40 === void 0 ? void 0 : (_state40$additionalDe = _state40.additionalDetails) === null || _state40$additionalDe === void 0 ? void 0 : _state40$additionalDe.plotArea) || "NA"
|
|
50133
51009
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50134
51010
|
className: "border-none",
|
|
50135
51011
|
label: t("WS_BUILT_UP_AREA"),
|
|
50136
|
-
text: ((
|
|
51012
|
+
text: ((_state41 = state) === null || _state41 === void 0 ? void 0 : (_state41$additionalDe = _state41.additionalDetails) === null || _state41$additionalDe === void 0 ? void 0 : _state41$additionalDe.builtUpArea) || "NA"
|
|
50137
51013
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50138
51014
|
className: "border-none",
|
|
50139
51015
|
label: t("WS_NO_OF_FLOORS"),
|
|
50140
|
-
text: ((
|
|
50141
|
-
}), String(((
|
|
51016
|
+
text: ((_state42 = state) === null || _state42 === void 0 ? void 0 : (_state42$additionalDe = _state42.additionalDetails) === null || _state42$additionalDe === void 0 ? void 0 : _state42$additionalDe.noOfFloors) || "NA"
|
|
51017
|
+
}), String(((_state43 = state) === null || _state43 === void 0 ? void 0 : (_state43$additionalDe = _state43.additionalDetails) === null || _state43$additionalDe === void 0 ? void 0 : (_state43$additionalDe2 = _state43$additionalDe.propertyCategory) === null || _state43$additionalDe2 === void 0 ? void 0 : _state43$additionalDe2.code) || ((_state44 = state) === null || _state44 === void 0 ? void 0 : (_state44$additionalDe = _state44.additionalDetails) === null || _state44$additionalDe === void 0 ? void 0 : (_state44$additionalDe2 = _state44$additionalDe.propertyCategory) === null || _state44$additionalDe2 === void 0 ? void 0 : _state44$additionalDe2.name) || ((_state45 = state) === null || _state45 === void 0 ? void 0 : (_state45$additionalDe = _state45.additionalDetails) === null || _state45$additionalDe === void 0 ? void 0 : _state45$additionalDe.propertyCategory) || "").toUpperCase().includes("RESIDENTIAL") && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50142
51018
|
className: "border-none",
|
|
50143
51019
|
label: t("WS_NO_OF_DWELLING_UNITS"),
|
|
50144
|
-
text: ((
|
|
51020
|
+
text: ((_state46 = state) === null || _state46 === void 0 ? void 0 : (_state46$additionalDe = _state46.additionalDetails) === null || _state46$additionalDe === void 0 ? void 0 : _state46$additionalDe.NumberofDwellingUnits) || "NA"
|
|
50145
51021
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50146
51022
|
className: "border-none",
|
|
50147
51023
|
label: t("WS_LOCALITY"),
|
|
50148
|
-
text: ((
|
|
50149
|
-
}), (Array.isArray(((
|
|
51024
|
+
text: ((_state47 = state) === null || _state47 === void 0 ? void 0 : (_state47$additionalDe = _state47.additionalDetails) === null || _state47$additionalDe === void 0 ? void 0 : _state47$additionalDe.locality) || "NA"
|
|
51025
|
+
}), (Array.isArray(((_state48 = state) === null || _state48 === void 0 ? void 0 : (_state48$additionalDe = _state48.additionalDetails) === null || _state48$additionalDe === void 0 ? void 0 : _state48$additionalDe.questions) || ((_state49 = state) === null || _state49 === void 0 ? void 0 : (_state49$additionalDe = _state49.additionalDetails) === null || _state49$additionalDe === void 0 ? void 0 : _state49$additionalDe.questionAnswers)) ? ((_state50 = state) === null || _state50 === void 0 ? void 0 : (_state50$additionalDe = _state50.additionalDetails) === null || _state50$additionalDe === void 0 ? void 0 : _state50$additionalDe.questions) || ((_state51 = state) === null || _state51 === void 0 ? void 0 : (_state51$additionalDe = _state51.additionalDetails) === null || _state51$additionalDe === void 0 ? void 0 : _state51$additionalDe.questionAnswers) : []).map((q, idx) => {
|
|
50150
51026
|
var _q$answer, _q$answer2, _q$answer3;
|
|
50151
51027
|
const qText = typeof q === "object" ? (q === null || q === void 0 ? void 0 : q.question) || (q === null || q === void 0 ? void 0 : q.questionText) || (q === null || q === void 0 ? void 0 : q.title) || `Question ${idx + 1}` : `Question ${idx + 1}`;
|
|
50152
51028
|
const aText = typeof q === "object" ? typeof (q === null || q === void 0 ? void 0 : q.answer) === "object" ? (q === null || q === void 0 ? void 0 : (_q$answer = q.answer) === null || _q$answer === void 0 ? void 0 : _q$answer.name) || (q === null || q === void 0 ? void 0 : (_q$answer2 = q.answer) === null || _q$answer2 === void 0 ? void 0 : _q$answer2.value) || (q === null || q === void 0 ? void 0 : (_q$answer3 = q.answer) === null || _q$answer3 === void 0 ? void 0 : _q$answer3.code) : q === null || q === void 0 ? void 0 : q.answer : q;
|
|
@@ -50159,7 +51035,7 @@ const ConnectionDetails$5 = () => {
|
|
|
50159
51035
|
text: `${t(checkForNA(aText))}`
|
|
50160
51036
|
});
|
|
50161
51037
|
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
50162
|
-
to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(
|
|
51038
|
+
to: `/digit-ui/citizen/commonpt/view-property?propertyId=${(_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.propertyId}&tenantId=${(_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.tenantId}`
|
|
50163
51039
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
50164
51040
|
style: {
|
|
50165
51041
|
textAlign: "left",
|
|
@@ -50171,10 +51047,10 @@ const ConnectionDetails$5 = () => {
|
|
|
50171
51047
|
styles: {
|
|
50172
51048
|
fontSize: "28px"
|
|
50173
51049
|
}
|
|
50174
|
-
}, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (
|
|
51050
|
+
}, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), (_state54 = state) !== null && _state54 !== void 0 && _state54.connectionHolders ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
50175
51051
|
className: "border-none",
|
|
50176
51052
|
label: t("WS_OWN_DETAIL_OWN_NAME_LABEL"),
|
|
50177
|
-
text: (
|
|
51053
|
+
text: (_state55 = state) === null || _state55 === void 0 ? void 0 : (_state55$connectionHo = _state55.connectionHolders) === null || _state55$connectionHo === void 0 ? void 0 : (_state55$connectionHo2 = _state55$connectionHo[0]) === null || _state55$connectionHo2 === void 0 ? void 0 : _state55$connectionHo2.name,
|
|
50178
51054
|
textStyle: {
|
|
50179
51055
|
whiteSpace: "pre"
|
|
50180
51056
|
}
|
|
@@ -50293,15 +51169,15 @@ const ConnectionDetails$5 = () => {
|
|
|
50293
51169
|
isArray: false
|
|
50294
51170
|
}
|
|
50295
51171
|
}
|
|
50296
|
-
}))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((
|
|
50297
|
-
var _doc$documentType,
|
|
51172
|
+
}))) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, t("WS_PROPERTY_OWNER_SAME_AS_CONN_HOLDERS")), ((_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.documents) && ((_state57 = state) === null || _state57 === void 0 ? void 0 : _state57.documents.map((doc, index) => {
|
|
51173
|
+
var _doc$documentType, _state58, _state59;
|
|
50298
51174
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
50299
51175
|
key: `doc-${index}`
|
|
50300
51176
|
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split(".").slice(0, 2).join("_"))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(WSDocument, {
|
|
50301
|
-
value: (
|
|
51177
|
+
value: (_state58 = state) === null || _state58 === void 0 ? void 0 : _state58.documents,
|
|
50302
51178
|
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
50303
51179
|
index: index
|
|
50304
|
-
}), ((
|
|
51180
|
+
}), ((_state59 = state) === null || _state59 === void 0 ? void 0 : _state59.documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
|
|
50305
51181
|
style: {
|
|
50306
51182
|
color: "#cccccc",
|
|
50307
51183
|
backgroundColor: "#cccccc",
|
|
@@ -50310,7 +51186,7 @@ const ConnectionDetails$5 = () => {
|
|
|
50310
51186
|
marginBottom: "20px"
|
|
50311
51187
|
}
|
|
50312
51188
|
}) : null)));
|
|
50313
|
-
})), ((
|
|
51189
|
+
})), ((_state60 = state) === null || _state60 === void 0 ? void 0 : (_state60$status = _state60.status) === null || _state60$status === void 0 ? void 0 : _state60$status.toLowerCase()) === "inactive" || ((_state61 = state) === null || _state61 === void 0 ? void 0 : (_state61$applicationS = _state61.applicationStatus) === null || _state61$applicationS === void 0 ? void 0 : _state61$applicationS.toLowerCase()) === "inactive" || ((_state62 = state) === null || _state62 === void 0 ? void 0 : _state62.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React__default.createElement("div", {
|
|
50314
51190
|
style: {
|
|
50315
51191
|
display: "flex",
|
|
50316
51192
|
justifyContent: "flex-end",
|
|
@@ -50347,8 +51223,8 @@ const ConnectionDetails$5 = () => {
|
|
|
50347
51223
|
actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
|
|
50348
51224
|
hideSubmit: true,
|
|
50349
51225
|
actionSingleSubmit: () => {
|
|
50350
|
-
var
|
|
50351
|
-
history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((
|
|
51226
|
+
var _state63, _state64;
|
|
51227
|
+
history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state63 = state) === null || _state63 === void 0 ? void 0 : _state63.connectionNo)}/${tenantId}?consumerCode=${(_state64 = state) === null || _state64 === void 0 ? void 0 : _state64.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
|
|
50352
51228
|
setshowModal(false);
|
|
50353
51229
|
},
|
|
50354
51230
|
popupStyles: mobileView ? {
|
|
@@ -54226,8 +55102,84 @@ const getMaskedPhone = phone => {
|
|
|
54226
55102
|
if (!phone || phone.length < 10) return "NA";
|
|
54227
55103
|
return `******${phone.slice(-4)}`;
|
|
54228
55104
|
};
|
|
54229
|
-
const getAddress$1 = (address, t) => {
|
|
54230
|
-
|
|
55105
|
+
const getAddress$1 = (address, t, property) => {
|
|
55106
|
+
var _property$address, _Digit$Utils, _Digit$Utils$pt, _addrObj$additionalDe, _addrObj$additionalDe2, _addrObj$additionalDe3, _addrObj$additionalDe4, _Digit$Utils2, _Digit$Utils2$pt;
|
|
55107
|
+
if (!address && !property) return "";
|
|
55108
|
+
const addrObj = typeof address === "object" && address !== null ? address : {};
|
|
55109
|
+
const propAddr = (property === null || property === void 0 ? void 0 : property.address) || {};
|
|
55110
|
+
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) || {};
|
|
55111
|
+
const parts = [];
|
|
55112
|
+
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) || "";
|
|
55113
|
+
if (houseNo && String(houseNo).trim() && String(houseNo).trim() !== "NA") {
|
|
55114
|
+
parts.push(String(houseNo).trim());
|
|
55115
|
+
}
|
|
55116
|
+
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) || "";
|
|
55117
|
+
if (building && String(building).trim() && String(building).trim() !== "NA") {
|
|
55118
|
+
parts.push(String(building).trim());
|
|
55119
|
+
}
|
|
55120
|
+
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) || "";
|
|
55121
|
+
if (street && String(street).trim() && String(street).trim() !== "NA") {
|
|
55122
|
+
parts.push(String(street).trim());
|
|
55123
|
+
}
|
|
55124
|
+
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) || "";
|
|
55125
|
+
if (addressLine2 && String(addressLine2).trim() && String(addressLine2).trim() !== "NA") {
|
|
55126
|
+
parts.push(String(addressLine2).trim());
|
|
55127
|
+
}
|
|
55128
|
+
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) || "";
|
|
55129
|
+
if (landmark && String(landmark).trim() && String(landmark).trim() !== "NA") {
|
|
55130
|
+
parts.push(String(landmark).trim());
|
|
55131
|
+
}
|
|
55132
|
+
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();
|
|
55133
|
+
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);
|
|
55134
|
+
const localityCode = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || (typeof localityRaw === "string" ? localityRaw : null);
|
|
55135
|
+
let localityText = "";
|
|
55136
|
+
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) {
|
|
55137
|
+
const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
|
|
55138
|
+
localityText = t ? t(locLocale) : locLocale;
|
|
55139
|
+
}
|
|
55140
|
+
if (!localityText || localityText === localityCode) {
|
|
55141
|
+
localityText = (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.name) || (localityRaw === null || localityRaw === void 0 ? void 0 : localityRaw.code) || "";
|
|
55142
|
+
}
|
|
55143
|
+
if (localityText && String(localityText).trim() && String(localityText).trim() !== "NA") {
|
|
55144
|
+
parts.push(String(localityText).trim());
|
|
55145
|
+
}
|
|
55146
|
+
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) || "";
|
|
55147
|
+
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 || "");
|
|
55148
|
+
if (assemblyText && assemblyText.trim() && assemblyText.trim() !== "NA") {
|
|
55149
|
+
parts.push(assemblyText.trim());
|
|
55150
|
+
}
|
|
55151
|
+
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) || "";
|
|
55152
|
+
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 || "");
|
|
55153
|
+
if (zoneText && zoneText.trim() && zoneText.trim() !== "NA") {
|
|
55154
|
+
parts.push(zoneText.trim());
|
|
55155
|
+
}
|
|
55156
|
+
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) || "";
|
|
55157
|
+
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 || "");
|
|
55158
|
+
if (wardText && wardText.trim() && wardText.trim() !== "NA") {
|
|
55159
|
+
parts.push(wardText.trim());
|
|
55160
|
+
}
|
|
55161
|
+
let cityText = "";
|
|
55162
|
+
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) {
|
|
55163
|
+
const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
|
|
55164
|
+
cityText = t ? t(cityLocale) : cityLocale;
|
|
55165
|
+
}
|
|
55166
|
+
if (!cityText || cityText === tenantId) {
|
|
55167
|
+
cityText = (addrObj === null || addrObj === void 0 ? void 0 : addrObj.city) || (propAddr === null || propAddr === void 0 ? void 0 : propAddr.city) || tenantId || "";
|
|
55168
|
+
}
|
|
55169
|
+
if (cityText && String(cityText).trim() && String(cityText).trim() !== "NA") {
|
|
55170
|
+
parts.push(String(cityText).trim());
|
|
55171
|
+
}
|
|
55172
|
+
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) || "";
|
|
55173
|
+
if (pincode && String(pincode).trim() && String(pincode).trim() !== "NA") {
|
|
55174
|
+
parts.push(String(pincode).trim());
|
|
55175
|
+
}
|
|
55176
|
+
const uniqueParts = [];
|
|
55177
|
+
parts.forEach(p => {
|
|
55178
|
+
if (p && !uniqueParts.some(existing => existing.toLowerCase() === p.toLowerCase())) {
|
|
55179
|
+
uniqueParts.push(p);
|
|
55180
|
+
}
|
|
55181
|
+
});
|
|
55182
|
+
return uniqueParts.join(", ");
|
|
54231
55183
|
};
|
|
54232
55184
|
const WSInfoPage = () => {
|
|
54233
55185
|
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 +55221,13 @@ const WSInfoPage = () => {
|
|
|
54269
55221
|
}
|
|
54270
55222
|
return () => clearTimeout(timer);
|
|
54271
55223
|
}, [timeLeft]);
|
|
55224
|
+
React.useEffect(() => {
|
|
55225
|
+
if (!showToast) return;
|
|
55226
|
+
const timer = setTimeout(() => {
|
|
55227
|
+
setShowToast(null);
|
|
55228
|
+
}, (showToast === null || showToast === void 0 ? void 0 : showToast.duration) || 5000);
|
|
55229
|
+
return () => clearTimeout(timer);
|
|
55230
|
+
}, [showToast]);
|
|
54272
55231
|
React.useEffect(() => {
|
|
54273
55232
|
if (isFromPropertyCreate) {
|
|
54274
55233
|
var _createdProperty$owne3, _createdProperty$owne4;
|
|
@@ -54336,9 +55295,10 @@ const WSInfoPage = () => {
|
|
|
54336
55295
|
});
|
|
54337
55296
|
const target = createdPropertyId && sorted.find(p => p.propertyId === createdPropertyId) || (!hasAutoSelected.current ? sorted[0] : null);
|
|
54338
55297
|
if (target && (!selectedProperty || selectedProperty.propertyId !== target.propertyId)) {
|
|
55298
|
+
const fullAddr = getAddress$1(target.address, t, target);
|
|
54339
55299
|
const formatted = {
|
|
54340
55300
|
...target,
|
|
54341
|
-
displayName: `${target.propertyId} - ${
|
|
55301
|
+
displayName: fullAddr ? `${target.propertyId} - ${fullAddr}` : target.propertyId
|
|
54342
55302
|
};
|
|
54343
55303
|
setSelectedProperty(formatted);
|
|
54344
55304
|
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", target.propertyId);
|
|
@@ -54409,7 +55369,8 @@ const WSInfoPage = () => {
|
|
|
54409
55369
|
setTimeLeft(30);
|
|
54410
55370
|
setShowToast({
|
|
54411
55371
|
key: "success",
|
|
54412
|
-
message: t("OTP sent successfully!")
|
|
55372
|
+
message: t("OTP sent successfully!"),
|
|
55373
|
+
duration: 5000
|
|
54413
55374
|
});
|
|
54414
55375
|
});
|
|
54415
55376
|
}, function (err) {
|
|
@@ -54474,15 +55435,18 @@ const WSInfoPage = () => {
|
|
|
54474
55435
|
setIsOtpVerifying(false);
|
|
54475
55436
|
setShowToast({
|
|
54476
55437
|
key: "success",
|
|
54477
|
-
message: t("OTP verified successfully!")
|
|
55438
|
+
message: t("OTP verified successfully!"),
|
|
55439
|
+
duration: 5000
|
|
54478
55440
|
});
|
|
54479
55441
|
setShowOtpVerification(false);
|
|
54480
55442
|
setIsMobileVerified(true);
|
|
55443
|
+
setTimeLeft(0);
|
|
54481
55444
|
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
55445
|
if (fallbackProp) {
|
|
55446
|
+
const fullAddr = getAddress$1(fallbackProp.address, t, fallbackProp);
|
|
54483
55447
|
const formatted = {
|
|
54484
55448
|
...fallbackProp,
|
|
54485
|
-
displayName: `${fallbackProp.propertyId} - ${
|
|
55449
|
+
displayName: fullAddr ? `${fallbackProp.propertyId} - ${fullAddr}` : fallbackProp.propertyId
|
|
54486
55450
|
};
|
|
54487
55451
|
setSelectedProperty(formatted);
|
|
54488
55452
|
sessionStorage.setItem("WS_OTP_VERIFIED_PROPERTY_ID", fallbackProp.propertyId);
|
|
@@ -54543,12 +55507,20 @@ const WSInfoPage = () => {
|
|
|
54543
55507
|
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
55508
|
return timeB - timeA;
|
|
54545
55509
|
});
|
|
54546
|
-
const list = sortedList.map(prop =>
|
|
54547
|
-
|
|
54548
|
-
|
|
54549
|
-
|
|
55510
|
+
const list = sortedList.map(prop => {
|
|
55511
|
+
const fullAddr = getAddress$1(prop.address, t, prop);
|
|
55512
|
+
return {
|
|
55513
|
+
...prop,
|
|
55514
|
+
displayName: fullAddr ? `${prop.propertyId} - ${fullAddr}` : prop.propertyId
|
|
55515
|
+
};
|
|
55516
|
+
});
|
|
54550
55517
|
if (selectedProperty && !list.some(p => p.propertyId === selectedProperty.propertyId)) {
|
|
54551
|
-
|
|
55518
|
+
const fullAddr = getAddress$1(selectedProperty.address, t, selectedProperty);
|
|
55519
|
+
const selProp = {
|
|
55520
|
+
...selectedProperty,
|
|
55521
|
+
displayName: fullAddr ? `${selectedProperty.propertyId} - ${fullAddr}` : selectedProperty.propertyId
|
|
55522
|
+
};
|
|
55523
|
+
return [selProp, ...list];
|
|
54552
55524
|
}
|
|
54553
55525
|
return list;
|
|
54554
55526
|
}, [propertyDetails, selectedProperty, t]);
|
|
@@ -55508,7 +56480,12 @@ const WSInfoPage = () => {
|
|
|
55508
56480
|
id: "propertyId",
|
|
55509
56481
|
selected: selectedProperty,
|
|
55510
56482
|
select: val => {
|
|
55511
|
-
|
|
56483
|
+
const fullAddr = getAddress$1(val === null || val === void 0 ? void 0 : val.address, t, val);
|
|
56484
|
+
const formattedVal = val ? {
|
|
56485
|
+
...val,
|
|
56486
|
+
displayName: fullAddr ? `${val.propertyId} - ${fullAddr}` : val.propertyId
|
|
56487
|
+
} : null;
|
|
56488
|
+
setSelectedProperty(formattedVal);
|
|
55512
56489
|
setShowOtpVerification(false);
|
|
55513
56490
|
setOtp("");
|
|
55514
56491
|
if (val !== null && val !== void 0 && val.propertyId) {
|
|
@@ -55735,7 +56712,8 @@ const WSInfoPage = () => {
|
|
|
55735
56712
|
warning: showToast.key === "warning",
|
|
55736
56713
|
label: t(showToast.message),
|
|
55737
56714
|
onClose: () => setShowToast(null),
|
|
55738
|
-
isDleteBtn: true
|
|
56715
|
+
isDleteBtn: true,
|
|
56716
|
+
duration: showToast.duration || 5000
|
|
55739
56717
|
}));
|
|
55740
56718
|
};
|
|
55741
56719
|
|
|
@@ -58015,10 +58993,31 @@ const NewApplication = () => {
|
|
|
58015
58993
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
58016
58994
|
control: control,
|
|
58017
58995
|
name: "rainWaterHarvesting.hasCertificate",
|
|
58018
|
-
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
58019
|
-
|
|
58020
|
-
|
|
58021
|
-
|
|
58996
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
58997
|
+
className: "form-field",
|
|
58998
|
+
style: {
|
|
58999
|
+
display: "flex",
|
|
59000
|
+
gap: "2rem",
|
|
59001
|
+
alignItems: "center"
|
|
59002
|
+
},
|
|
59003
|
+
name: "rainWaterHarvestingRadio",
|
|
59004
|
+
options: [{
|
|
59005
|
+
i18nKey: "CORE_COMMON_YES",
|
|
59006
|
+
code: true
|
|
59007
|
+
}, {
|
|
59008
|
+
i18nKey: "CORE_COMMON_NO",
|
|
59009
|
+
code: false
|
|
59010
|
+
}],
|
|
59011
|
+
optionsKey: "i18nKey",
|
|
59012
|
+
selectedOption: props.value ? {
|
|
59013
|
+
i18nKey: "CORE_COMMON_YES",
|
|
59014
|
+
code: true
|
|
59015
|
+
} : {
|
|
59016
|
+
i18nKey: "CORE_COMMON_NO",
|
|
59017
|
+
code: false
|
|
59018
|
+
},
|
|
59019
|
+
onSelect: e => props.onChange(e.code),
|
|
59020
|
+
t: t
|
|
58022
59021
|
})
|
|
58023
59022
|
}))), /*#__PURE__*/React__default.createElement(SectionCard, {
|
|
58024
59023
|
description: t("WS_PROPERTY_ADDRESS_DESC"),
|
|
@@ -59039,118 +60038,6 @@ const NewApplication = () => {
|
|
|
59039
60038
|
}));
|
|
59040
60039
|
};
|
|
59041
60040
|
|
|
59042
|
-
const CheckIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
59043
|
-
width: "14",
|
|
59044
|
-
height: "14",
|
|
59045
|
-
viewBox: "0 0 24 24",
|
|
59046
|
-
fill: "none",
|
|
59047
|
-
stroke: "currentColor",
|
|
59048
|
-
strokeWidth: "3",
|
|
59049
|
-
strokeLinecap: "round",
|
|
59050
|
-
strokeLinejoin: "round"
|
|
59051
|
-
}, /*#__PURE__*/React__default.createElement("polyline", {
|
|
59052
|
-
points: "20 6 9 17 4 12"
|
|
59053
|
-
}));
|
|
59054
|
-
const ClockIcon = () => /*#__PURE__*/React__default.createElement("svg", {
|
|
59055
|
-
width: "14",
|
|
59056
|
-
height: "14",
|
|
59057
|
-
viewBox: "0 0 24 24",
|
|
59058
|
-
fill: "none",
|
|
59059
|
-
stroke: "currentColor",
|
|
59060
|
-
strokeWidth: "2",
|
|
59061
|
-
strokeLinecap: "round",
|
|
59062
|
-
strokeLinejoin: "round"
|
|
59063
|
-
}, /*#__PURE__*/React__default.createElement("circle", {
|
|
59064
|
-
cx: "12",
|
|
59065
|
-
cy: "12",
|
|
59066
|
-
r: "10"
|
|
59067
|
-
}), /*#__PURE__*/React__default.createElement("polyline", {
|
|
59068
|
-
className: "clock-hands2",
|
|
59069
|
-
points: "12 6 12 12 16 14"
|
|
59070
|
-
}));
|
|
59071
|
-
const WorkflowTimeline = _ref => {
|
|
59072
|
-
var _workflowDetails$data;
|
|
59073
|
-
let {
|
|
59074
|
-
workflowDetails,
|
|
59075
|
-
hideTimeline,
|
|
59076
|
-
setHideTimeline
|
|
59077
|
-
} = _ref;
|
|
59078
|
-
const {
|
|
59079
|
-
t
|
|
59080
|
-
} = reactI18next.useTranslation();
|
|
59081
|
-
const timeline = workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.processInstances;
|
|
59082
|
-
if (!timeline || timeline.length === 0) {
|
|
59083
|
-
return null;
|
|
59084
|
-
}
|
|
59085
|
-
const getStatusClass = (index, checkpoint) => {
|
|
59086
|
-
var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
|
|
59087
|
-
const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.status) === "ACTIVE" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.isTerminateState);
|
|
59088
|
-
if (index === 0 && !isTerminal) return "current2";
|
|
59089
|
-
return "completed2";
|
|
59090
|
-
};
|
|
59091
|
-
const convertEpochToDateTime = epoch => {
|
|
59092
|
-
if (!epoch) return "N/A";
|
|
59093
|
-
const date = new Date(epoch);
|
|
59094
|
-
const day = String(date.getDate()).padStart(2, "0");
|
|
59095
|
-
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
59096
|
-
const year = date.getFullYear().toString().slice(-2);
|
|
59097
|
-
const hours = String(date.getHours()).padStart(2, "0");
|
|
59098
|
-
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
59099
|
-
return `${day}/${month}/${year} ${hours}:${minutes}`;
|
|
59100
|
-
};
|
|
59101
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
59102
|
-
className: "workflow-timeline-card2 digit-form-composer",
|
|
59103
|
-
style: {
|
|
59104
|
-
background: "#fff",
|
|
59105
|
-
padding: "16px",
|
|
59106
|
-
height: hideTimeline ? "100%" : ""
|
|
59107
|
-
}
|
|
59108
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59109
|
-
className: `timeline-header-wrapper ${hideTimeline ? "collapsed" : ""}`
|
|
59110
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, {
|
|
59111
|
-
style: {
|
|
59112
|
-
marginBottom: "0",
|
|
59113
|
-
fontSize: "16px",
|
|
59114
|
-
fontWeight: "700",
|
|
59115
|
-
color: "#374151"
|
|
59116
|
-
},
|
|
59117
|
-
className: hideTimeline ? "hidden-content" : ""
|
|
59118
|
-
}, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
59119
|
-
className: hideTimeline ? "hidden-content" : "timeline-container2"
|
|
59120
|
-
}, timeline.map((checkpoint, index) => {
|
|
59121
|
-
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
|
|
59122
|
-
const statusClass = getStatusClass(index, checkpoint);
|
|
59123
|
-
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
59124
|
-
const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
|
|
59125
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
59126
|
-
key: index,
|
|
59127
|
-
className: `timeline-item2 ${statusClass}`
|
|
59128
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59129
|
-
className: "timeline-marker2"
|
|
59130
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59131
|
-
className: "timeline-circle2"
|
|
59132
|
-
}, statusClass === "completed2" ? /*#__PURE__*/React__default.createElement(CheckIcon, null) : /*#__PURE__*/React__default.createElement(ClockIcon, null)), showLine && /*#__PURE__*/React__default.createElement("div", {
|
|
59133
|
-
className: "timeline-line2"
|
|
59134
|
-
})), /*#__PURE__*/React__default.createElement("div", {
|
|
59135
|
-
className: "timeline-content2"
|
|
59136
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59137
|
-
className: "timeline-header2"
|
|
59138
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59139
|
-
className: "timeline-title2"
|
|
59140
|
-
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state}`)), /*#__PURE__*/React__default.createElement("span", {
|
|
59141
|
-
className: "timeline-date2"
|
|
59142
|
-
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React__default.createElement("div", {
|
|
59143
|
-
className: "timeline-body2"
|
|
59144
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
59145
|
-
className: `timeline-status-tag2 status-${statusClass}`
|
|
59146
|
-
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state6 = checkpoint.state) === null || _checkpoint$state6 === void 0 ? void 0 : _checkpoint$state6.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state7 = checkpoint.state) === null || _checkpoint$state7 === void 0 ? void 0 : _checkpoint$state7.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React__default.createElement("div", {
|
|
59147
|
-
className: "timeline-comment2"
|
|
59148
|
-
}, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React__default.createElement("div", {
|
|
59149
|
-
className: "timeline-footer2"
|
|
59150
|
-
}, /*#__PURE__*/React__default.createElement("span", null, t("ES_COMMON_ASSIGNED_TO"), ": ", /*#__PURE__*/React__default.createElement("strong", null, checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner2 = checkpoint.assigner) === null || _checkpoint$assigner2 === void 0 ? void 0 : _checkpoint$assigner2.name)))));
|
|
59151
|
-
})));
|
|
59152
|
-
};
|
|
59153
|
-
|
|
59154
60041
|
const ApplicationDetails$1 = () => {
|
|
59155
60042
|
var _mdmsCommonmastersDat, _commonPayInfo, _applicationDetails$p4, _applicationDetails$p5, _applicationDetails$p6, _applicationDetails$p7, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _newValueFilter$, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _workflowDetails$data, _workflowDetails$data2, _reciept_data$Payment, _applicationDetails$a0, _applicationDetails$p8, _applicationDetails$p9, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data23, _workflowDetails$data24, _workflowDetails$data25, _oldData$WaterConnect, _oldData$WaterConnect2, _oldData$SewerageConn, _oldData$SewerageConn2, _applicationDetails$a23, _applicationDetails$a24, _reciept_data$Payment3, _applicationDetails$p17, _applicationDetails$p18, _applicationDetails$p19, _applicationDetails$p20, _applicationDetails$p21, _applicationDetails$p22;
|
|
59156
60043
|
const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
|
|
@@ -67438,7 +68325,7 @@ const openFilePDF = fileId => {
|
|
|
67438
68325
|
}).catch(error => console.error("Error fetching file:", error));
|
|
67439
68326
|
};
|
|
67440
68327
|
const CheckPage$4 = _ref2 => {
|
|
67441
|
-
var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress$asse, _propertyAddress2, _propertyAddress2$ass, _propertyAddress3, _cpt$address, _cpt$details, _cpt$details$address, _propertyAddress4, _propertyAddress4$blo, _propertyAddress5, _propertyAddress5$blo, _propertyAddress6, _propertyAddress7, _propertyAddress7$war, _propertyAddress8, _propertyAddress8$war, _propertyAddress9, _cpt$address2, _cpt$address3, _cpt$details2, _cpt$details2$address, _cpt$details3, _cpt$details3$address, _propertyAddress0, _propertyAddress0$zon, _propertyAddress1, _propertyAddress1$zon, _propertyAddress10, _cpt$address4, _cpt$details4, _cpt$details4$address, _propertyAddress11, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _cpt$additionalDetail, _cpt$additionalDetail2, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ad, _data$cpt3, _data$cpt3$details, _data$cpt3$details$ad, _data$cpt4, _data$cpt4$details, _propertyAddress16, _propertyAddress17, _cpt$additionalDetail3, _cpt$additionalDetail4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$additionalDetai, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _data$rainWaterHarves, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _data$additionalDetai5, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress18, _propertyAddress18$ad, _propertyAddress19, _propertyAddress19$ad, _propertyAddress20, _propertyAddress21, _propertyAddress21$ci, _propertyAddress22, _propertyAddress22$ci, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$lo, _propertyAddress27, _propertyAddress27$lo, _propertyAddress28, _propertyAddress29, _propertyAddress29$su, _propertyAddress30, _propertyAddress30$su, _propertyAddress31, _propertyAddress32, _propertyAddress33, _propertyAddress34, _propertyAddress35, _propertyAddress36, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _propertyAddress42, _propertyAddress42$as, _propertyAddress43, _propertyAddress43$as, _propertyAddress44, _cpt$address5, _propertyAddress45, _propertyAddress45$bl, _propertyAddress46, _propertyAddress46$bl, _propertyAddress47, _propertyAddress48, _propertyAddress48$wa, _propertyAddress49, _propertyAddress49$wa, _propertyAddress50, _cpt$address6, _cpt$address7, _propertyAddress51, _propertyAddress51$zo, _propertyAddress52, _propertyAddress52$zo, _propertyAddress53, _cpt$address8, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail5, _cpt$additionalDetail6, _cpt$additionalDetail7, _cpt$propertyType, _cpt$additionalDetail8, _cpt$additionalDetail9;
|
|
68328
|
+
var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress$asse, _propertyAddress2, _propertyAddress2$ass, _propertyAddress3, _cpt$address, _cpt$details, _cpt$details$address, _propertyAddress4, _propertyAddress4$blo, _propertyAddress5, _propertyAddress5$blo, _propertyAddress6, _propertyAddress7, _propertyAddress7$war, _propertyAddress8, _propertyAddress8$war, _propertyAddress9, _cpt$address2, _cpt$address3, _cpt$details2, _cpt$details2$address, _cpt$details3, _cpt$details3$address, _propertyAddress0, _propertyAddress0$zon, _propertyAddress1, _propertyAddress1$zon, _propertyAddress10, _cpt$address4, _cpt$details4, _cpt$details4$address, _propertyAddress11, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _cpt$additionalDetail, _cpt$additionalDetail2, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ad, _data$cpt3, _data$cpt3$details, _data$cpt3$details$ad, _data$cpt4, _data$cpt4$details, _propertyAddress16, _propertyAddress17, _cpt$additionalDetail3, _cpt$additionalDetail4, _data$cpt5, _data$cpt5$details, _data$cpt5$details$ad, _data$cpt6, _data$cpt6$details, _data$cpt6$details$ad, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$bankDetails, _data$additionalDetai, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _data$rainWaterHarves, _data$sewerTreatmentP, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails1, _connectionDetails1$a, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _connectionDetails12, _data$additionalDetai5, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress18, _propertyAddress18$ad, _propertyAddress19, _propertyAddress19$ad, _propertyAddress20, _propertyAddress21, _propertyAddress21$ci, _propertyAddress22, _propertyAddress22$ci, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$lo, _propertyAddress27, _propertyAddress27$lo, _propertyAddress28, _propertyAddress29, _propertyAddress29$su, _propertyAddress30, _propertyAddress30$su, _propertyAddress31, _propertyAddress32, _propertyAddress33, _propertyAddress34, _propertyAddress35, _propertyAddress36, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _propertyAddress42, _propertyAddress42$as, _propertyAddress43, _propertyAddress43$as, _propertyAddress44, _cpt$address5, _propertyAddress45, _propertyAddress45$bl, _propertyAddress46, _propertyAddress46$bl, _propertyAddress47, _propertyAddress48, _propertyAddress48$wa, _propertyAddress49, _propertyAddress49$wa, _propertyAddress50, _cpt$address6, _cpt$address7, _propertyAddress51, _propertyAddress51$zo, _propertyAddress52, _propertyAddress52$zo, _propertyAddress53, _cpt$address8, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail5, _cpt$additionalDetail6, _cpt$additionalDetail7, _cpt$propertyType, _cpt$additionalDetail8, _cpt$additionalDetail9;
|
|
67442
68329
|
let {
|
|
67443
68330
|
data,
|
|
67444
68331
|
onSubmit,
|
|
@@ -67515,13 +68402,10 @@ const CheckPage$4 = _ref2 => {
|
|
|
67515
68402
|
const djbEmployee = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : _data$djbEmployee.djbEmployee) || (data === null || data === void 0 ? void 0 : data.djbEmployee) || {};
|
|
67516
68403
|
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
68404
|
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) || {};
|
|
68405
|
+
const sewerTreatmentPlant = (data === null || data === void 0 ? void 0 : (_data$sewerTreatmentP = data.sewerTreatmentPlant) === null || _data$sewerTreatmentP === void 0 ? void 0 : _data$sewerTreatmentP.sewerTreatmentPlant) || (data === null || data === void 0 ? void 0 : data.sewerTreatmentPlant) || (data === null || data === void 0 ? void 0 : data.additionalDetails) || {};
|
|
67518
68406
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
67519
|
-
|
|
67520
|
-
|
|
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, {
|
|
68407
|
+
className: "overflow-y-scroll"
|
|
68408
|
+
}, /*#__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
68409
|
style: {
|
|
67526
68410
|
marginTop: "10px",
|
|
67527
68411
|
marginBottom: "30px"
|
|
@@ -67602,7 +68486,10 @@ const CheckPage$4 = _ref2 => {
|
|
|
67602
68486
|
}
|
|
67603
68487
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
67604
68488
|
label: "Divyangjan/Person with Disability?",
|
|
67605
|
-
text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")
|
|
68489
|
+
text: disability !== null && disability !== void 0 && disability.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
|
|
68490
|
+
actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
|
|
68491
|
+
onClick: onEdit
|
|
68492
|
+
})
|
|
67606
68493
|
})), /*#__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
68494
|
style: {
|
|
67608
68495
|
marginTop: "10px",
|
|
@@ -67659,8 +68546,22 @@ const CheckPage$4 = _ref2 => {
|
|
|
67659
68546
|
}
|
|
67660
68547
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
67661
68548
|
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
|
-
|
|
68549
|
+
text: rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.hasCertificate || rainWaterHarvesting !== null && rainWaterHarvesting !== void 0 && rainWaterHarvesting.isRainwaterHarvesting ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
|
|
68550
|
+
actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
|
|
68551
|
+
onClick: onEdit
|
|
68552
|
+
})
|
|
68553
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("Sewer Treatment Plant (STP)")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
68554
|
+
style: {
|
|
68555
|
+
marginTop: "10px",
|
|
68556
|
+
marginBottom: "30px"
|
|
68557
|
+
}
|
|
68558
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
68559
|
+
label: t("Sewer Treatment Plant (STP)"),
|
|
68560
|
+
text: sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.hasCertificate || sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.hasStp || sewerTreatmentPlant !== null && sewerTreatmentPlant !== void 0 && sewerTreatmentPlant.isSewerTreatmentPlant ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO"),
|
|
68561
|
+
actionButton: /*#__PURE__*/React__default.createElement(ActionButton$1, {
|
|
68562
|
+
onClick: onEdit
|
|
68563
|
+
})
|
|
68564
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("PT_LOCATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
67664
68565
|
style: {
|
|
67665
68566
|
marginTop: "10px",
|
|
67666
68567
|
marginBottom: "30px"
|
|
@@ -67780,7 +68681,7 @@ const CheckPage$4 = _ref2 => {
|
|
|
67780
68681
|
marginBottom: "30px"
|
|
67781
68682
|
}
|
|
67782
68683
|
}, documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
|
|
67783
|
-
var _doc$documentType, _doc$documentType2;
|
|
68684
|
+
var _doc$documentType, _doc$documentType2, _doc$additionalDetail, _doc$additionalDetail2;
|
|
67784
68685
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
67785
68686
|
key: index
|
|
67786
68687
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
@@ -67789,6 +68690,9 @@ const CheckPage$4 = _ref2 => {
|
|
|
67789
68690
|
actionButton: index === 0 ? /*#__PURE__*/React__default.createElement(ActionButton$1, {
|
|
67790
68691
|
onClick: onEdit
|
|
67791
68692
|
}) : null
|
|
68693
|
+
}), ((doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail = doc.additionalDetails) === null || _doc$additionalDetail === void 0 ? void 0 : _doc$additionalDetail.validityDate)) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
68694
|
+
label: t("WS_VALIDITY_UP_TO") || "Validity up to",
|
|
68695
|
+
text: checkForNA$1((doc === null || doc === void 0 ? void 0 : doc.validityDate) || (doc === null || doc === void 0 ? void 0 : doc.validityUpTo) || (doc === null || doc === void 0 ? void 0 : (_doc$additionalDetail2 = doc.additionalDetails) === null || _doc$additionalDetail2 === void 0 ? void 0 : _doc$additionalDetail2.validityDate))
|
|
67792
68696
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
67793
68697
|
text: /*#__PURE__*/React__default.createElement("span", {
|
|
67794
68698
|
style: {
|
|
@@ -67827,7 +68731,7 @@ const CheckPage$4 = _ref2 => {
|
|
|
67827
68731
|
},
|
|
67828
68732
|
disabled: isSubmitDisabled
|
|
67829
68733
|
}));
|
|
67830
|
-
})()
|
|
68734
|
+
})(), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
67831
68735
|
open: showDocModal,
|
|
67832
68736
|
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
67833
68737
|
headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -67889,6 +68793,11 @@ const isRwhDoc = doc => {
|
|
|
67889
68793
|
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
67890
68794
|
return str.includes("RAIN") || str.includes("HARVEST");
|
|
67891
68795
|
};
|
|
68796
|
+
const isStpDoc = doc => {
|
|
68797
|
+
if (!doc) return false;
|
|
68798
|
+
const str = ((typeof doc === "string" ? doc : "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentType) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.code) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.i18nKey) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.name) || "") + " " + ((doc === null || doc === void 0 ? void 0 : doc.documentName) || "")).toUpperCase();
|
|
68799
|
+
return str.includes("SEWER") || str.includes("SEWAGE") || str.includes("STP") || str.includes("TREATMENT");
|
|
68800
|
+
};
|
|
67892
68801
|
const OLDApplication = () => {
|
|
67893
68802
|
var _Digit$UserService$ge;
|
|
67894
68803
|
const {
|
|
@@ -67915,6 +68824,8 @@ const OLDApplication = () => {
|
|
|
67915
68824
|
label: "WS_BANK_DETAILS"
|
|
67916
68825
|
}, {
|
|
67917
68826
|
label: "Rain Water Harvesting Certificate"
|
|
68827
|
+
}, {
|
|
68828
|
+
label: "Sewer Treatment Plant (STP)"
|
|
67918
68829
|
}, {
|
|
67919
68830
|
label: "PT_LOCATION_DETAILS"
|
|
67920
68831
|
}, {
|
|
@@ -67988,7 +68899,7 @@ const OLDApplication = () => {
|
|
|
67988
68899
|
};
|
|
67989
68900
|
const configCopy = cloneDeep_1(foundConfig);
|
|
67990
68901
|
const allCreateSections = (configCopy === null || configCopy === void 0 ? void 0 : (_configCopy$body = configCopy.body) === null || _configCopy$body === void 0 ? void 0 : _configCopy$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
|
|
67991
|
-
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSBankDetails", "WSRainWaterHarvesting", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
|
|
68902
|
+
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSBankDetails", "WSRainWaterHarvesting", "WSSewerTreatmentPlant", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
|
|
67992
68903
|
const reorderedBody = [];
|
|
67993
68904
|
desiredComponentOrder.forEach(compName => {
|
|
67994
68905
|
const section = allCreateSections.find(s => {
|
|
@@ -68070,6 +68981,19 @@ const OLDApplication = () => {
|
|
|
68070
68981
|
}
|
|
68071
68982
|
}]
|
|
68072
68983
|
});
|
|
68984
|
+
} else if (compName === "WSSewerTreatmentPlant") {
|
|
68985
|
+
reorderedBody.push({
|
|
68986
|
+
isCreateConnection: true,
|
|
68987
|
+
body: [{
|
|
68988
|
+
type: "component",
|
|
68989
|
+
key: "sewerTreatmentPlant",
|
|
68990
|
+
component: "WSSewerTreatmentPlant",
|
|
68991
|
+
withoutLabel: true,
|
|
68992
|
+
texts: {
|
|
68993
|
+
header: "Sewer Treatment Plant (STP)"
|
|
68994
|
+
}
|
|
68995
|
+
}]
|
|
68996
|
+
});
|
|
68073
68997
|
} else if (compName === "WSBankDetails") {
|
|
68074
68998
|
reorderedBody.push({
|
|
68075
68999
|
isCreateConnection: true,
|
|
@@ -68112,6 +69036,22 @@ const OLDApplication = () => {
|
|
|
68112
69036
|
setSubmitValve(true);
|
|
68113
69037
|
}
|
|
68114
69038
|
}, [propertyId, propertyDetails]);
|
|
69039
|
+
React.useEffect(() => {
|
|
69040
|
+
if (showCheckPage) {
|
|
69041
|
+
window.history.pushState({
|
|
69042
|
+
step: "check"
|
|
69043
|
+
}, "");
|
|
69044
|
+
const handlePopState = () => {
|
|
69045
|
+
setShowCheckPage(false);
|
|
69046
|
+
window.scrollTo({
|
|
69047
|
+
top: 0,
|
|
69048
|
+
behavior: "smooth"
|
|
69049
|
+
});
|
|
69050
|
+
};
|
|
69051
|
+
window.addEventListener("popstate", handlePopState);
|
|
69052
|
+
return () => window.removeEventListener("popstate", handlePopState);
|
|
69053
|
+
}
|
|
69054
|
+
}, [showCheckPage]);
|
|
68115
69055
|
const {
|
|
68116
69056
|
isLoading: creatingWaterApplicationLoading,
|
|
68117
69057
|
mutate: waterMutation
|
|
@@ -68309,10 +69249,14 @@ const OLDApplication = () => {
|
|
|
68309
69249
|
}
|
|
68310
69250
|
}
|
|
68311
69251
|
setShowCheckPage(true);
|
|
69252
|
+
window.scrollTo({
|
|
69253
|
+
top: 0,
|
|
69254
|
+
behavior: "smooth"
|
|
69255
|
+
});
|
|
68312
69256
|
};
|
|
68313
69257
|
const processSubmission = function (data) {
|
|
68314
69258
|
try {
|
|
68315
|
-
var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$djbEmployee, _data$djbEmployee$doc, _data$djbEmployee2, _data$djbEmployee3, _data$djbEmployee4, _data$DocumentsRequir2, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$documents, _data$documents$docum, _data$documents$docum2, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop9, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
|
|
69259
|
+
var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$djbEmployee, _data$djbEmployee$doc, _data$djbEmployee2, _data$djbEmployee3, _data$djbEmployee4, _data$DocumentsRequir2, _data$DocumentsRequir3, _data$DocumentsRequir4, _data$documents, _data$documents$docum, _data$documents$docum2, _data$DocumentsRequir5, _data$documents2, _generalDocWithVal$ad, _data$documents3, _rwhDocFromList$addit, _stpDocFromList$addit, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop9, _propertyDetails$Prop0, _propertyDetails$Prop1, _propertyDetails$Prop10, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
|
|
68316
69260
|
const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
|
|
68317
69261
|
if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
|
|
68318
69262
|
data.useDetails = {
|
|
@@ -68353,6 +69297,7 @@ const OLDApplication = () => {
|
|
|
68353
69297
|
};
|
|
68354
69298
|
}
|
|
68355
69299
|
if (data !== null && data !== void 0 && (_data$DocumentsRequir = data.DocumentsRequired) !== null && _data$DocumentsRequir !== void 0 && _data$DocumentsRequir.documents) {
|
|
69300
|
+
var _docWithValidity$addi, _docWithValidity$addi2, _rwhDoc$additionalDet, _stpDoc$additionalDet;
|
|
68356
69301
|
const docs = data.DocumentsRequired.documents;
|
|
68357
69302
|
const identityDoc = docs.find(d => {
|
|
68358
69303
|
var _d$documentType8;
|
|
@@ -68366,11 +69311,25 @@ const OLDApplication = () => {
|
|
|
68366
69311
|
var _d$documentType1;
|
|
68367
69312
|
return d === null || d === void 0 ? void 0 : (_d$documentType1 = d.documentType) === null || _d$documentType1 === void 0 ? void 0 : _d$documentType1.includes("OTHERDOCUMENTS");
|
|
68368
69313
|
});
|
|
69314
|
+
const docWithValidity = docs.find(d => {
|
|
69315
|
+
var _d$additionalDetails, _d$additionalDetails2;
|
|
69316
|
+
return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails = d.additionalDetails) === null || _d$additionalDetails === void 0 ? void 0 : _d$additionalDetails.validityDate) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails2 = d.additionalDetails) === null || _d$additionalDetails2 === void 0 ? void 0 : _d$additionalDetails2.validityUpTo);
|
|
69317
|
+
});
|
|
69318
|
+
const valDate = (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.validityUpTo) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : docWithValidity.date) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi = docWithValidity.additionalDetails) === null || _docWithValidity$addi === void 0 ? void 0 : _docWithValidity$addi.validityDate) || (docWithValidity === null || docWithValidity === void 0 ? void 0 : (_docWithValidity$addi2 = docWithValidity.additionalDetails) === null || _docWithValidity$addi2 === void 0 ? void 0 : _docWithValidity$addi2.validityUpTo) || "";
|
|
69319
|
+
const rwhDoc = docs.find(d => isRwhDoc(d));
|
|
69320
|
+
const stpDoc = docs.find(d => isStpDoc(d));
|
|
69321
|
+
const rwhValDate = (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityDate) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.validityUpTo) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : rwhDoc.date) || (rwhDoc === null || rwhDoc === void 0 ? void 0 : (_rwhDoc$additionalDet = rwhDoc.additionalDetails) === null || _rwhDoc$additionalDet === void 0 ? void 0 : _rwhDoc$additionalDet.validityDate) || "";
|
|
69322
|
+
const stpValDate = (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityDate) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.validityUpTo) || (stpDoc === null || stpDoc === void 0 ? void 0 : stpDoc.date) || (stpDoc === null || stpDoc === void 0 ? void 0 : (_stpDoc$additionalDet = stpDoc.additionalDetails) === null || _stpDoc$additionalDet === void 0 ? void 0 : _stpDoc$additionalDet.validityDate) || "";
|
|
68369
69323
|
data.documents = {
|
|
68370
69324
|
documents: docs,
|
|
68371
69325
|
identityProofNumber: (identityDoc === null || identityDoc === void 0 ? void 0 : identityDoc.documentUid) || "",
|
|
68372
69326
|
ownershipDocumentNumber: (ownershipDoc === null || ownershipDoc === void 0 ? void 0 : ownershipDoc.documentUid) || "",
|
|
68373
|
-
otherDocumentNumber: (otherDoc === null || otherDoc === void 0 ? void 0 : otherDoc.documentUid) || ""
|
|
69327
|
+
otherDocumentNumber: (otherDoc === null || otherDoc === void 0 ? void 0 : otherDoc.documentUid) || "",
|
|
69328
|
+
validityDate: valDate || undefined,
|
|
69329
|
+
validityUpTo: valDate || undefined,
|
|
69330
|
+
date: valDate || undefined,
|
|
69331
|
+
rwhValidityDate: rwhValDate || undefined,
|
|
69332
|
+
stpValidityDate: stpValDate || undefined
|
|
68374
69333
|
};
|
|
68375
69334
|
}
|
|
68376
69335
|
const djbDoc = (data === null || data === void 0 ? void 0 : (_data$djbEmployee = data.djbEmployee) === null || _data$djbEmployee === void 0 ? void 0 : (_data$djbEmployee$doc = _data$djbEmployee.document) === null || _data$djbEmployee$doc === void 0 ? void 0 : _data$djbEmployee$doc.fileStoreId) || typeof (data === null || data === void 0 ? void 0 : (_data$djbEmployee2 = data.djbEmployee) === null || _data$djbEmployee2 === void 0 ? void 0 : _data$djbEmployee2.document) === "string" && (data === null || data === void 0 ? void 0 : (_data$djbEmployee3 = data.djbEmployee) === null || _data$djbEmployee3 === void 0 ? void 0 : _data$djbEmployee3.document.trim()) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee4 = data.djbEmployee) === null || _data$djbEmployee4 === void 0 ? void 0 : _data$djbEmployee4.document) || (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir2 = data.DocumentsRequired) === null || _data$DocumentsRequir2 === void 0 ? void 0 : (_data$DocumentsRequir3 = _data$DocumentsRequir2.documents) === null || _data$DocumentsRequir3 === void 0 ? void 0 : (_data$DocumentsRequir4 = _data$DocumentsRequir3.find(d => {
|
|
@@ -68445,14 +69404,52 @@ const OLDApplication = () => {
|
|
|
68445
69404
|
};
|
|
68446
69405
|
}
|
|
68447
69406
|
}
|
|
69407
|
+
const docsList = (data === null || data === void 0 ? void 0 : (_data$DocumentsRequir5 = data.DocumentsRequired) === null || _data$DocumentsRequir5 === void 0 ? void 0 : _data$DocumentsRequir5.documents) || (data === null || data === void 0 ? void 0 : (_data$documents2 = data.documents) === null || _data$documents2 === void 0 ? void 0 : _data$documents2.documents) || (data === null || data === void 0 ? void 0 : data.documents) || [];
|
|
69408
|
+
const rwhDocFromList = Array.isArray(docsList) ? docsList.find(d => isRwhDoc(d)) : null;
|
|
69409
|
+
const stpDocFromList = Array.isArray(docsList) ? docsList.find(d => isStpDoc(d)) : null;
|
|
69410
|
+
const generalDocWithVal = Array.isArray(docsList) ? docsList.find(d => {
|
|
69411
|
+
var _d$additionalDetails3;
|
|
69412
|
+
return (d === null || d === void 0 ? void 0 : d.validityDate) || (d === null || d === void 0 ? void 0 : d.validityUpTo) || (d === null || d === void 0 ? void 0 : d.date) || (d === null || d === void 0 ? void 0 : (_d$additionalDetails3 = d.additionalDetails) === null || _d$additionalDetails3 === void 0 ? void 0 : _d$additionalDetails3.validityDate);
|
|
69413
|
+
}) : null;
|
|
69414
|
+
const extractedValDate = (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.validityDate) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.validityUpTo) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : generalDocWithVal.date) || (generalDocWithVal === null || generalDocWithVal === void 0 ? void 0 : (_generalDocWithVal$ad = generalDocWithVal.additionalDetails) === null || _generalDocWithVal$ad === void 0 ? void 0 : _generalDocWithVal$ad.validityDate) || (data === null || data === void 0 ? void 0 : (_data$documents3 = data.documents) === null || _data$documents3 === void 0 ? void 0 : _data$documents3.validityDate) || "";
|
|
69415
|
+
const extractedRwhDate = (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.validityDate) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.validityUpTo) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : rwhDocFromList.date) || (rwhDocFromList === null || rwhDocFromList === void 0 ? void 0 : (_rwhDocFromList$addit = rwhDocFromList.additionalDetails) === null || _rwhDocFromList$addit === void 0 ? void 0 : _rwhDocFromList$addit.validityDate) || extractedValDate;
|
|
69416
|
+
const extractedStpDate = (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.validityDate) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.validityUpTo) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : stpDocFromList.date) || (stpDocFromList === null || stpDocFromList === void 0 ? void 0 : (_stpDocFromList$addit = stpDocFromList.additionalDetails) === null || _stpDocFromList$addit === void 0 ? void 0 : _stpDocFromList$addit.validityDate) || extractedValDate;
|
|
68448
69417
|
if (data !== null && data !== void 0 && data.rainWaterHarvesting) {
|
|
68449
69418
|
var _data$rainWaterHarves, _data$rainWaterHarves2, _data$rainWaterHarves3, _data$rainWaterHarves4;
|
|
68450
69419
|
data.additionalDetails = {
|
|
68451
69420
|
...data.additionalDetails,
|
|
68452
69421
|
...data.rainWaterHarvesting,
|
|
68453
69422
|
hasRainWaterHarvestingCertificate: !!(data !== null && data !== void 0 && (_data$rainWaterHarves = data.rainWaterHarvesting) !== null && _data$rainWaterHarves !== void 0 && _data$rainWaterHarves.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves2 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves2 !== void 0 && _data$rainWaterHarves2.isRainwaterHarvesting),
|
|
68454
|
-
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves3 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves3 !== void 0 && _data$rainWaterHarves3.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.isRainwaterHarvesting)
|
|
69423
|
+
isRainwaterHarvesting: !!(data !== null && data !== void 0 && (_data$rainWaterHarves3 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves3 !== void 0 && _data$rainWaterHarves3.hasCertificate || data !== null && data !== void 0 && (_data$rainWaterHarves4 = data.rainWaterHarvesting) !== null && _data$rainWaterHarves4 !== void 0 && _data$rainWaterHarves4.isRainwaterHarvesting),
|
|
69424
|
+
validityDate: extractedRwhDate || undefined,
|
|
69425
|
+
validityUpTo: extractedRwhDate || undefined,
|
|
69426
|
+
date: extractedRwhDate || undefined,
|
|
69427
|
+
rwhValidityDate: extractedRwhDate || undefined
|
|
68455
69428
|
};
|
|
69429
|
+
if (extractedRwhDate) {
|
|
69430
|
+
data.rainWaterHarvesting.validityDate = extractedRwhDate;
|
|
69431
|
+
data.rainWaterHarvesting.validityUpTo = extractedRwhDate;
|
|
69432
|
+
data.rainWaterHarvesting.date = extractedRwhDate;
|
|
69433
|
+
}
|
|
69434
|
+
}
|
|
69435
|
+
if (data !== null && data !== void 0 && data.sewerTreatmentPlant) {
|
|
69436
|
+
var _data$sewerTreatmentP, _data$sewerTreatmentP2, _data$sewerTreatmentP3, _data$sewerTreatmentP4, _data$sewerTreatmentP5, _data$sewerTreatmentP6, _data$sewerTreatmentP7, _data$sewerTreatmentP8, _data$sewerTreatmentP9;
|
|
69437
|
+
data.additionalDetails = {
|
|
69438
|
+
...data.additionalDetails,
|
|
69439
|
+
...data.sewerTreatmentPlant,
|
|
69440
|
+
hasSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP !== void 0 && _data$sewerTreatmentP.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP2 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP2 !== void 0 && _data$sewerTreatmentP2.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP3 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP3 !== void 0 && _data$sewerTreatmentP3.isSewerTreatmentPlant),
|
|
69441
|
+
isSewerTreatmentPlant: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP4 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP4 !== void 0 && _data$sewerTreatmentP4.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP5 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP5 !== void 0 && _data$sewerTreatmentP5.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP6 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP6 !== void 0 && _data$sewerTreatmentP6.isSewerTreatmentPlant),
|
|
69442
|
+
hasStp: !!(data !== null && data !== void 0 && (_data$sewerTreatmentP7 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP7 !== void 0 && _data$sewerTreatmentP7.hasCertificate || data !== null && data !== void 0 && (_data$sewerTreatmentP8 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP8 !== void 0 && _data$sewerTreatmentP8.hasStp || data !== null && data !== void 0 && (_data$sewerTreatmentP9 = data.sewerTreatmentPlant) !== null && _data$sewerTreatmentP9 !== void 0 && _data$sewerTreatmentP9.isSewerTreatmentPlant),
|
|
69443
|
+
validityDate: extractedStpDate || undefined,
|
|
69444
|
+
validityUpTo: extractedStpDate || undefined,
|
|
69445
|
+
date: extractedStpDate || undefined,
|
|
69446
|
+
stpValidityDate: extractedStpDate || undefined
|
|
69447
|
+
};
|
|
69448
|
+
if (extractedStpDate) {
|
|
69449
|
+
data.sewerTreatmentPlant.validityDate = extractedStpDate;
|
|
69450
|
+
data.sewerTreatmentPlant.validityUpTo = extractedStpDate;
|
|
69451
|
+
data.sewerTreatmentPlant.date = extractedStpDate;
|
|
69452
|
+
}
|
|
68456
69453
|
}
|
|
68457
69454
|
if (data !== null && data !== void 0 && data.bankDetails) {
|
|
68458
69455
|
const normalizedBank = getNormalizedBankDetails(data);
|
|
@@ -68653,7 +69650,12 @@ const OLDApplication = () => {
|
|
|
68653
69650
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
|
|
68654
69651
|
config: timelineConfig,
|
|
68655
69652
|
currentActiveIndex: timelineConfig.length - 1,
|
|
68656
|
-
showFinalStep: false
|
|
69653
|
+
showFinalStep: false,
|
|
69654
|
+
onSelect: (route, idx) => {
|
|
69655
|
+
if (idx < timelineConfig.length - 1) {
|
|
69656
|
+
handleEdit();
|
|
69657
|
+
}
|
|
69658
|
+
}
|
|
68657
69659
|
}), /*#__PURE__*/React__default.createElement(CheckPage$4, {
|
|
68658
69660
|
data: formDataRef.current || sessionFormData,
|
|
68659
69661
|
onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
|
|
@@ -68679,7 +69681,7 @@ const OLDApplication = () => {
|
|
|
68679
69681
|
cardFormWrapperClassName: "new-application-card"
|
|
68680
69682
|
}), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
68681
69683
|
isDleteBtn: true,
|
|
68682
|
-
duration:
|
|
69684
|
+
duration: 3000,
|
|
68683
69685
|
error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
|
|
68684
69686
|
warning: showToast === null || showToast === void 0 ? void 0 : showToast.warning,
|
|
68685
69687
|
label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
|
|
@@ -69397,6 +70399,7 @@ const componentsToRegister = {
|
|
|
69397
70399
|
WSOLDApplication: OLDApplication,
|
|
69398
70400
|
WSDivyangjan: WSDivyangjan,
|
|
69399
70401
|
WSRainWaterHarvesting: WSRainWaterHarvesting,
|
|
70402
|
+
WSSewerTreatmentPlant: WSSewerTreatmentPlant,
|
|
69400
70403
|
WSExecuteDisconnection: WSExecuteDisconnection,
|
|
69401
70404
|
WSFieldInspection: WSFieldInspection
|
|
69402
70405
|
};
|