@djb25/digit-ui-module-ws 1.0.116 → 1.0.118
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 +304 -126
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +304 -126
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -27829,10 +27829,15 @@ const WSConnectionHolderDetails = _ref => {
|
|
|
27829
27829
|
} = useLocation();
|
|
27830
27830
|
const filters = getQueryStringParams(location.search);
|
|
27831
27831
|
const [connectionHolderDetails, setConnectionHolderDetails] = useState(() => {
|
|
27832
|
-
|
|
27833
|
-
|
|
27832
|
+
var _Digit$SessionStorage, _formData$ConnectionH, _sessionDetails$;
|
|
27833
|
+
const sessionDetails = (_Digit$SessionStorage = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.ConnectionHolderDetails;
|
|
27834
|
+
if (formData !== null && formData !== void 0 && formData.ConnectionHolderDetails && formData.ConnectionHolderDetails.length > 0 && (_formData$ConnectionH = formData.ConnectionHolderDetails[0]) !== null && _formData$ConnectionH !== void 0 && _formData$ConnectionH.name) {
|
|
27834
27835
|
return [{
|
|
27835
|
-
...
|
|
27836
|
+
...formData.ConnectionHolderDetails[0]
|
|
27837
|
+
}];
|
|
27838
|
+
} else if (sessionDetails && sessionDetails.length > 0 && (_sessionDetails$ = sessionDetails[0]) !== null && _sessionDetails$ !== void 0 && _sessionDetails$.name) {
|
|
27839
|
+
return [{
|
|
27840
|
+
...sessionDetails[0]
|
|
27836
27841
|
}];
|
|
27837
27842
|
} else {
|
|
27838
27843
|
var _Digit$UserService$ge;
|
|
@@ -27902,6 +27907,17 @@ const WSConnectionHolderDetails = _ref => {
|
|
|
27902
27907
|
}
|
|
27903
27908
|
}
|
|
27904
27909
|
}, [connectionHolderDetails, config === null || config === void 0 ? void 0 : config.key]);
|
|
27910
|
+
useEffect(() => {
|
|
27911
|
+
if (formData !== null && formData !== void 0 && formData.ConnectionHolderDetails && formData.ConnectionHolderDetails.length > 0) {
|
|
27912
|
+
const incoming = formData.ConnectionHolderDetails[0];
|
|
27913
|
+
const current = connectionHolderDetails === null || connectionHolderDetails === void 0 ? void 0 : connectionHolderDetails[0];
|
|
27914
|
+
if (incoming && (incoming.name || incoming.middleName || incoming.lastName) && !lodash.isEqual(current, incoming)) {
|
|
27915
|
+
setConnectionHolderDetails([{
|
|
27916
|
+
...incoming
|
|
27917
|
+
}]);
|
|
27918
|
+
}
|
|
27919
|
+
}
|
|
27920
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.ConnectionHolderDetails]);
|
|
27905
27921
|
function ispagereloadingenabled(eyeclick) {
|
|
27906
27922
|
var _Object$values, _formData$ConnectionH2;
|
|
27907
27923
|
if ((window.location.href.includes("edit") || window.location.href.includes("modify")) && formData !== null && formData !== void 0 && formData.ConnectionHolderDetails && ((_Object$values = Object.values(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH2 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH2 === void 0 ? void 0 : _formData$ConnectionH2[0])) === null || _Object$values === void 0 ? void 0 : _Object$values.length) > 1) {
|
|
@@ -28047,6 +28063,23 @@ const ConnectionDetails$1 = _props => {
|
|
|
28047
28063
|
watsAppMobileNumber,
|
|
28048
28064
|
isWatsappSameAsMobile
|
|
28049
28065
|
}), [name, middleName, lastName, gender, mobileNumber, guardian, relationship, ownerType, sameAsOwnerDetails, address, uuid, emailId, watsAppMobileNumber, isWatsappSameAsMobile]);
|
|
28066
|
+
useEffect(() => {
|
|
28067
|
+
if (connectionHolderDetail) {
|
|
28068
|
+
if (connectionHolderDetail.name !== undefined && connectionHolderDetail.name !== name) setName(connectionHolderDetail.name);
|
|
28069
|
+
if (connectionHolderDetail.middleName !== undefined && connectionHolderDetail.middleName !== middleName) setMiddleName(connectionHolderDetail.middleName);
|
|
28070
|
+
if (connectionHolderDetail.lastName !== undefined && connectionHolderDetail.lastName !== lastName) setLastName(connectionHolderDetail.lastName);
|
|
28071
|
+
if (connectionHolderDetail.gender !== undefined && connectionHolderDetail.gender !== gender) setGender(connectionHolderDetail.gender);
|
|
28072
|
+
if (connectionHolderDetail.mobileNumber !== undefined && connectionHolderDetail.mobileNumber !== mobileNumber) setMobileNumber(connectionHolderDetail.mobileNumber);
|
|
28073
|
+
if (connectionHolderDetail.guardian !== undefined && connectionHolderDetail.guardian !== guardian) setGuardian(connectionHolderDetail.guardian);
|
|
28074
|
+
if (connectionHolderDetail.relationship !== undefined && connectionHolderDetail.relationship !== relationship) setRelationship(connectionHolderDetail.relationship);
|
|
28075
|
+
if (connectionHolderDetail.address !== undefined && connectionHolderDetail.address !== address) setAddress(connectionHolderDetail.address);
|
|
28076
|
+
if (connectionHolderDetail.ownerType !== undefined && connectionHolderDetail.ownerType !== ownerType) setOwnerType(connectionHolderDetail.ownerType);
|
|
28077
|
+
if (connectionHolderDetail.sameAsOwnerDetails !== undefined && connectionHolderDetail.sameAsOwnerDetails !== sameAsOwnerDetails) setSameAsOwnerDetails(connectionHolderDetail.sameAsOwnerDetails);
|
|
28078
|
+
if (connectionHolderDetail.emailId !== undefined && connectionHolderDetail.emailId !== emailId) setEmailId(connectionHolderDetail.emailId);
|
|
28079
|
+
if (connectionHolderDetail.watsAppMobileNumber !== undefined && connectionHolderDetail.watsAppMobileNumber !== watsAppMobileNumber) setWatsAppMobileNumber(connectionHolderDetail.watsAppMobileNumber);
|
|
28080
|
+
if (connectionHolderDetail.isWatsappSameAsMobile !== undefined && connectionHolderDetail.isWatsappSameAsMobile !== isWatsappSameAsMobile) setIsWatsappSameAsMobile(connectionHolderDetail.isWatsappSameAsMobile);
|
|
28081
|
+
}
|
|
28082
|
+
}, [connectionHolderDetail]);
|
|
28050
28083
|
const {
|
|
28051
28084
|
errors
|
|
28052
28085
|
} = localFormState;
|
|
@@ -28121,7 +28154,7 @@ const ConnectionDetails$1 = _props => {
|
|
|
28121
28154
|
const emailPattern = /^[a-zA-Z0-9._%+-]+@[a-z.-]+\.(com|org|in)$/;
|
|
28122
28155
|
const errors = sessionStorage.getItem("FORMSTATE_ERRORS");
|
|
28123
28156
|
let formStateErros = typeof errors === "string" ? JSON.parse(errors) : {};
|
|
28124
|
-
if (emailPattern.test(value)) {
|
|
28157
|
+
if (!value || !value.trim() || emailPattern.test(value)) {
|
|
28125
28158
|
var _formStateErros$Conne, _formStateErros$Conne2, _formStateErros$Conne3, _formStateErros$Conne4;
|
|
28126
28159
|
if (clearErrors) clearErrors("emailId");
|
|
28127
28160
|
if (formStateErros["ConnectionHolderDetails"] && (_formStateErros$Conne = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne !== void 0 && _formStateErros$Conne.type && (_formStateErros$Conne2 = formStateErros["ConnectionHolderDetails"]) !== null && _formStateErros$Conne2 !== void 0 && (_formStateErros$Conne3 = _formStateErros$Conne2.type) !== null && _formStateErros$Conne3 !== void 0 && _formStateErros$Conne3.emailId) {
|
|
@@ -31463,7 +31496,7 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31463
31496
|
} = Digit.Hooks.ws.WSSearchMdmsTypes.useWSServicesNewMasters(tenantId, wsDocsData);
|
|
31464
31497
|
const hasDjbEmployeeDoc = (documents || []).some(d => {
|
|
31465
31498
|
var _d$documentType2;
|
|
31466
|
-
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType2 = d.documentType) === null || _d$documentType2 === void 0 ? void 0 : _d$documentType2.includes("DJB_EMPLOYEE_ID"))) && (d === null || d === void 0 ? void 0 : d.fileStoreId);
|
|
31499
|
+
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType2 = d.documentType) === null || _d$documentType2 === void 0 ? void 0 : _d$documentType2.includes("DJB_EMPLOYEE_ID"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file));
|
|
31467
31500
|
});
|
|
31468
31501
|
const addEmployeeDocError = () => {
|
|
31469
31502
|
var _formState$errors, _formState$errors$con;
|
|
@@ -31497,21 +31530,35 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31497
31530
|
addEmployeeDocError();
|
|
31498
31531
|
} else {
|
|
31499
31532
|
removeEmployeeDocError();
|
|
31533
|
+
if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
|
|
31534
|
+
var _formData$djbEmployee;
|
|
31535
|
+
const djbItem = (documents || []).find(d => {
|
|
31536
|
+
var _d$documentType3;
|
|
31537
|
+
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType3 = d.documentType) === null || _d$documentType3 === void 0 ? void 0 : _d$documentType3.includes("DJB_EMPLOYEE_ID"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file));
|
|
31538
|
+
});
|
|
31539
|
+
const fsId = (djbItem === null || djbItem === void 0 ? void 0 : djbItem.fileStoreId) || (djbItem === null || djbItem === void 0 ? void 0 : djbItem.file);
|
|
31540
|
+
if (fsId && (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee = formData.djbEmployee) === null || _formData$djbEmployee === void 0 ? void 0 : _formData$djbEmployee.document) !== fsId) {
|
|
31541
|
+
formSetValue("djbEmployee", {
|
|
31542
|
+
...formData.djbEmployee,
|
|
31543
|
+
document: fsId
|
|
31544
|
+
});
|
|
31545
|
+
}
|
|
31546
|
+
}
|
|
31500
31547
|
}
|
|
31501
31548
|
} else {
|
|
31502
|
-
var _formData$
|
|
31549
|
+
var _formData$djbEmployee2;
|
|
31503
31550
|
removeEmployeeDocError();
|
|
31504
31551
|
setDocuments(prevDocs => {
|
|
31505
31552
|
const filtered = (prevDocs || []).filter(d => {
|
|
31506
|
-
var _d$
|
|
31507
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$
|
|
31553
|
+
var _d$documentType4;
|
|
31554
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$documentType4 = d.documentType) !== null && _d$documentType4 !== void 0 && _d$documentType4.includes("DJB_EMPLOYEE_ID"));
|
|
31508
31555
|
});
|
|
31509
31556
|
if (filtered.length !== (prevDocs || []).length) {
|
|
31510
31557
|
return filtered;
|
|
31511
31558
|
}
|
|
31512
31559
|
return prevDocs;
|
|
31513
31560
|
});
|
|
31514
|
-
if (formSetValue && formData !== null && formData !== void 0 && (_formData$
|
|
31561
|
+
if (formSetValue && formData !== null && formData !== void 0 && (_formData$djbEmployee2 = formData.djbEmployee) !== null && _formData$djbEmployee2 !== void 0 && _formData$djbEmployee2.document) {
|
|
31515
31562
|
formSetValue("djbEmployee", {
|
|
31516
31563
|
...formData.djbEmployee,
|
|
31517
31564
|
document: ""
|
|
@@ -31746,7 +31793,7 @@ const WSDocumentsEmployee = _ref => {
|
|
|
31746
31793
|
}));
|
|
31747
31794
|
};
|
|
31748
31795
|
function EmployeeIdDocumentUpload(_ref2) {
|
|
31749
|
-
var _formData$
|
|
31796
|
+
var _formData$djbEmployee3, _formData$djbEmployee4, _formData$djbEmployee5, _formData$djbEmployee6, _formData$djbEmployee1;
|
|
31750
31797
|
let {
|
|
31751
31798
|
t,
|
|
31752
31799
|
documents,
|
|
@@ -31756,26 +31803,26 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
31756
31803
|
tenantId
|
|
31757
31804
|
} = _ref2;
|
|
31758
31805
|
const existingEmployeeDoc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
|
|
31759
|
-
var _d$
|
|
31760
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$
|
|
31806
|
+
var _d$documentType5;
|
|
31807
|
+
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"));
|
|
31761
31808
|
});
|
|
31762
|
-
const initialFileId = (existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
31809
|
+
const initialFileId = (existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee3 = formData.djbEmployee) === null || _formData$djbEmployee3 === void 0 ? void 0 : (_formData$djbEmployee4 = _formData$djbEmployee3.document) === null || _formData$djbEmployee4 === void 0 ? void 0 : _formData$djbEmployee4.fileStoreId) || (typeof (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee5 = formData.djbEmployee) === null || _formData$djbEmployee5 === void 0 ? void 0 : _formData$djbEmployee5.document) === "string" ? formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee6 = formData.djbEmployee) === null || _formData$djbEmployee6 === void 0 ? void 0 : _formData$djbEmployee6.document : null);
|
|
31763
31810
|
const [file, setFile] = useState(null);
|
|
31764
31811
|
const [uploadedFile, setUploadedFile] = useState(initialFileId || null);
|
|
31765
31812
|
const [fileName, setFileName] = useState((existingEmployeeDoc === null || existingEmployeeDoc === void 0 ? void 0 : existingEmployeeDoc.fileName) || "");
|
|
31766
31813
|
const [errorUpload, setErrorUpload] = useState(null);
|
|
31767
31814
|
useEffect(() => {
|
|
31768
|
-
var _formData$
|
|
31815
|
+
var _formData$djbEmployee7, _formData$djbEmployee8, _formData$djbEmployee9, _formData$djbEmployee0;
|
|
31769
31816
|
const doc = documents === null || documents === void 0 ? void 0 : documents.find(d => {
|
|
31770
|
-
var _d$
|
|
31771
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$
|
|
31817
|
+
var _d$documentType6;
|
|
31818
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType6 = d.documentType) === null || _d$documentType6 === void 0 ? void 0 : _d$documentType6.includes("DJB_EMPLOYEE_ID"));
|
|
31772
31819
|
});
|
|
31773
|
-
const currentId = (doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
31820
|
+
const currentId = (doc === null || doc === void 0 ? void 0 : doc.fileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee7 = formData.djbEmployee) === null || _formData$djbEmployee7 === void 0 ? void 0 : (_formData$djbEmployee8 = _formData$djbEmployee7.document) === null || _formData$djbEmployee8 === void 0 ? void 0 : _formData$djbEmployee8.fileStoreId) || (typeof (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee9 = formData.djbEmployee) === null || _formData$djbEmployee9 === void 0 ? void 0 : _formData$djbEmployee9.document) === "string" ? formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee0 = formData.djbEmployee) === null || _formData$djbEmployee0 === void 0 ? void 0 : _formData$djbEmployee0.document : null);
|
|
31774
31821
|
if (currentId !== uploadedFile) {
|
|
31775
31822
|
setUploadedFile(currentId || null);
|
|
31776
31823
|
if (doc !== null && doc !== void 0 && doc.fileName) setFileName(doc.fileName);
|
|
31777
31824
|
}
|
|
31778
|
-
}, [documents, formData === null || formData === void 0 ? void 0 : (_formData$
|
|
31825
|
+
}, [documents, formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee1 = formData.djbEmployee) === null || _formData$djbEmployee1 === void 0 ? void 0 : _formData$djbEmployee1.document]);
|
|
31779
31826
|
useEffect(() => {
|
|
31780
31827
|
(function () {
|
|
31781
31828
|
try {
|
|
@@ -31799,17 +31846,17 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
31799
31846
|
setUploadedFile(fileId);
|
|
31800
31847
|
setFileName(nameOfFile);
|
|
31801
31848
|
setDocuments(prevDocs => {
|
|
31802
|
-
var _formData$
|
|
31849
|
+
var _formData$djbEmployee10;
|
|
31803
31850
|
const filtered = (prevDocs || []).filter(d => {
|
|
31804
|
-
var _d$
|
|
31805
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$
|
|
31851
|
+
var _d$documentType7;
|
|
31852
|
+
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"));
|
|
31806
31853
|
});
|
|
31807
31854
|
return [...filtered, {
|
|
31808
31855
|
documentType: "OWNER.DJB_EMPLOYEE_ID",
|
|
31809
31856
|
fileStoreId: fileId,
|
|
31810
31857
|
fileName: nameOfFile,
|
|
31811
31858
|
documentName: "WS_UPLOAD_EMPLOYEE_ID_DOC",
|
|
31812
|
-
documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
31859
|
+
documentUid: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.employeeId) || "",
|
|
31813
31860
|
i18nKey: "WS_UPLOAD_EMPLOYEE_ID_DOC",
|
|
31814
31861
|
status: "ACTIVE"
|
|
31815
31862
|
}];
|
|
@@ -31859,8 +31906,8 @@ function EmployeeIdDocumentUpload(_ref2) {
|
|
|
31859
31906
|
const fileInput = document.getElementById("employee-doc-upload");
|
|
31860
31907
|
if (fileInput) fileInput.value = "";
|
|
31861
31908
|
setDocuments(prevDocs => (prevDocs || []).filter(d => {
|
|
31862
|
-
var _d$
|
|
31863
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$
|
|
31909
|
+
var _d$documentType8;
|
|
31910
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) !== "OWNER.DJB_EMPLOYEE_ID" && !(d !== null && d !== void 0 && (_d$documentType8 = d.documentType) !== null && _d$documentType8 !== void 0 && _d$documentType8.includes("DJB_EMPLOYEE_ID"));
|
|
31864
31911
|
}));
|
|
31865
31912
|
if (formSetValue && formData !== null && formData !== void 0 && formData.djbEmployee) {
|
|
31866
31913
|
formSetValue("djbEmployee", {
|
|
@@ -38483,6 +38530,7 @@ const WSDeclaration = _ref => {
|
|
|
38483
38530
|
const initialFsId = (formData === null || formData === void 0 ? void 0 : (_formData$declaration = formData.declarationData) === null || _formData$declaration === void 0 ? void 0 : _formData$declaration.signatureFileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration2 = formData.declaration) === null || _formData$declaration2 === void 0 ? void 0 : _formData$declaration2.signatureFileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration3 = formData.declarationData) === null || _formData$declaration3 === void 0 ? void 0 : (_formData$declaration4 = _formData$declaration3.signatureFile) === null || _formData$declaration4 === void 0 ? void 0 : _formData$declaration4.fileStoreId) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration5 = formData.declaration) === null || _formData$declaration5 === void 0 ? void 0 : (_formData$declaration6 = _formData$declaration5.signatureFile) === null || _formData$declaration6 === void 0 ? void 0 : _formData$declaration6.fileStoreId) || (typeof (formData === null || formData === void 0 ? void 0 : (_formData$declaration7 = formData.declarationData) === null || _formData$declaration7 === void 0 ? void 0 : _formData$declaration7.signatureFile) === "string" ? formData === null || formData === void 0 ? void 0 : (_formData$declaration8 = formData.declarationData) === null || _formData$declaration8 === void 0 ? void 0 : _formData$declaration8.signatureFile : null) || (typeof (formData === null || formData === void 0 ? void 0 : (_formData$declaration9 = formData.declaration) === null || _formData$declaration9 === void 0 ? void 0 : _formData$declaration9.signatureFile) === "string" ? formData === null || formData === void 0 ? void 0 : (_formData$declaration0 = formData.declaration) === null || _formData$declaration0 === void 0 ? void 0 : _formData$declaration0.signatureFile : null) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.signatureFileStoreId) || null;
|
|
38484
38531
|
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" : "");
|
|
38485
38532
|
const [signatureFileStoreId, setSignatureFileStoreId] = useState(initialFsId);
|
|
38533
|
+
const [localFile, setLocalFile] = useState(null);
|
|
38486
38534
|
const [signatureFile, setSignatureFile] = useState((formData === null || formData === void 0 ? void 0 : (_formData$declaration19 = formData.declarationData) === null || _formData$declaration19 === void 0 ? void 0 : _formData$declaration19.signatureFile) || (formData === null || formData === void 0 ? void 0 : (_formData$declaration20 = formData.declaration) === null || _formData$declaration20 === void 0 ? void 0 : _formData$declaration20.signatureFile) || (initialFsId ? {
|
|
38487
38535
|
fileStoreId: initialFsId,
|
|
38488
38536
|
fileName: initialFileName
|
|
@@ -38557,11 +38605,8 @@ const WSDeclaration = _ref => {
|
|
|
38557
38605
|
} : null
|
|
38558
38606
|
};
|
|
38559
38607
|
if (!lodash.isEqual(lastSentValue.current, currentValues)) {
|
|
38560
|
-
|
|
38561
|
-
|
|
38562
|
-
onSelect(config === null || config === void 0 ? void 0 : config.key, currentValues);
|
|
38563
|
-
}, 200);
|
|
38564
|
-
return () => clearTimeout(timer);
|
|
38608
|
+
lastSentValue.current = currentValues;
|
|
38609
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, currentValues);
|
|
38565
38610
|
}
|
|
38566
38611
|
}, [formValue, signatureFileStoreId, signatureFile, config === null || config === void 0 ? void 0 : config.key, onSelect]);
|
|
38567
38612
|
const onUploadSignature = function (e) {
|
|
@@ -38572,6 +38617,7 @@ const WSDeclaration = _ref => {
|
|
|
38572
38617
|
if (file) {
|
|
38573
38618
|
const _temp2 = function () {
|
|
38574
38619
|
if (file.size >= 5242880) {} else {
|
|
38620
|
+
setLocalFile(file);
|
|
38575
38621
|
const _temp = _catch(function () {
|
|
38576
38622
|
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, Digit.ULBService.getStateId())).then(function (response) {
|
|
38577
38623
|
var _response$data, _response$data$files;
|
|
@@ -38584,13 +38630,23 @@ const WSDeclaration = _ref => {
|
|
|
38584
38630
|
};
|
|
38585
38631
|
setSignatureFileStoreId(fsId);
|
|
38586
38632
|
setSignatureFile(sigObj);
|
|
38587
|
-
setValue("signatureFileStoreId", fsId
|
|
38588
|
-
|
|
38589
|
-
|
|
38633
|
+
setValue("signatureFileStoreId", fsId, {
|
|
38634
|
+
shouldDirty: true,
|
|
38635
|
+
shouldValidate: true
|
|
38636
|
+
});
|
|
38637
|
+
setValue("signatureFile", sigObj, {
|
|
38638
|
+
shouldDirty: true,
|
|
38639
|
+
shouldValidate: true
|
|
38640
|
+
});
|
|
38641
|
+
setValue("signatureFileName", file.name, {
|
|
38642
|
+
shouldDirty: true,
|
|
38643
|
+
shouldValidate: true
|
|
38644
|
+
});
|
|
38590
38645
|
}
|
|
38591
38646
|
});
|
|
38592
38647
|
}, function (err) {
|
|
38593
38648
|
console.error("Signature upload failed", err);
|
|
38649
|
+
setLocalFile(null);
|
|
38594
38650
|
});
|
|
38595
38651
|
if (_temp && _temp.then) return _temp.then(function () {});
|
|
38596
38652
|
}
|
|
@@ -38680,12 +38736,23 @@ const WSDeclaration = _ref => {
|
|
|
38680
38736
|
})
|
|
38681
38737
|
})), /*#__PURE__*/React.createElement("div", {
|
|
38682
38738
|
className: "formcomposer-section-grid"
|
|
38683
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_UPLOAD_SIGNATURE_FILE")
|
|
38739
|
+
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_UPLOAD_SIGNATURE_FILE"), " ", /*#__PURE__*/React.createElement("span", {
|
|
38740
|
+
style: {
|
|
38741
|
+
color: "red"
|
|
38742
|
+
}
|
|
38743
|
+
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
38684
38744
|
className: "field",
|
|
38745
|
+
style: {
|
|
38746
|
+
display: "flex",
|
|
38747
|
+
flexDirection: "column",
|
|
38748
|
+
gap: "6px"
|
|
38749
|
+
}
|
|
38750
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38685
38751
|
style: {
|
|
38686
38752
|
display: "flex",
|
|
38687
38753
|
gap: "10px",
|
|
38688
|
-
alignItems: "center"
|
|
38754
|
+
alignItems: "center",
|
|
38755
|
+
width: "100%"
|
|
38689
38756
|
}
|
|
38690
38757
|
}, /*#__PURE__*/React.createElement("div", {
|
|
38691
38758
|
style: {
|
|
@@ -38694,10 +38761,21 @@ const WSDeclaration = _ref => {
|
|
|
38694
38761
|
}, /*#__PURE__*/React.createElement(UploadFile, {
|
|
38695
38762
|
onUpload: onUploadSignature,
|
|
38696
38763
|
onDelete: () => {
|
|
38764
|
+
setLocalFile(null);
|
|
38697
38765
|
setSignatureFile(null);
|
|
38698
38766
|
setSignatureFileStoreId(null);
|
|
38699
|
-
setValue("signatureFile", null
|
|
38700
|
-
|
|
38767
|
+
setValue("signatureFile", null, {
|
|
38768
|
+
shouldDirty: true,
|
|
38769
|
+
shouldValidate: true
|
|
38770
|
+
});
|
|
38771
|
+
setValue("signatureFileStoreId", null, {
|
|
38772
|
+
shouldDirty: true,
|
|
38773
|
+
shouldValidate: true
|
|
38774
|
+
});
|
|
38775
|
+
setValue("signatureFileName", "", {
|
|
38776
|
+
shouldDirty: true,
|
|
38777
|
+
shouldValidate: true
|
|
38778
|
+
});
|
|
38701
38779
|
},
|
|
38702
38780
|
id: "ws-declaration-signature",
|
|
38703
38781
|
message: signatureFileStoreId ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`CS_ACTION_NO_FILEUPLOADED`),
|
|
@@ -38706,22 +38784,38 @@ const WSDeclaration = _ref => {
|
|
|
38706
38784
|
},
|
|
38707
38785
|
buttonType: "button",
|
|
38708
38786
|
accept: "image/*, .pdf, .png, .jpeg, .jpg",
|
|
38709
|
-
uploadedFiles: signatureFileStoreId ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || "
|
|
38787
|
+
uploadedFiles: signatureFileStoreId && !localFile ? [[(formValue === null || formValue === void 0 ? void 0 : formValue.signatureFileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.fileName) || (signatureFile === null || signatureFile === void 0 ? void 0 : signatureFile.name) || "signature.png", {
|
|
38710
38788
|
fileStoreId: signatureFileStoreId
|
|
38711
38789
|
}]] : undefined,
|
|
38712
38790
|
removeTargetedFile: () => {
|
|
38791
|
+
setLocalFile(null);
|
|
38713
38792
|
setSignatureFile(null);
|
|
38714
38793
|
setSignatureFileStoreId(null);
|
|
38715
|
-
setValue("signatureFile", null
|
|
38716
|
-
|
|
38717
|
-
|
|
38794
|
+
setValue("signatureFile", null, {
|
|
38795
|
+
shouldDirty: true,
|
|
38796
|
+
shouldValidate: true
|
|
38797
|
+
});
|
|
38798
|
+
setValue("signatureFileStoreId", null, {
|
|
38799
|
+
shouldDirty: true,
|
|
38800
|
+
shouldValidate: true
|
|
38801
|
+
});
|
|
38802
|
+
setValue("signatureFileName", "", {
|
|
38803
|
+
shouldDirty: true,
|
|
38804
|
+
shouldValidate: true
|
|
38805
|
+
});
|
|
38718
38806
|
}
|
|
38719
38807
|
})), signatureFileStoreId && /*#__PURE__*/React.createElement("div", {
|
|
38720
38808
|
onClick: viewDocument,
|
|
38721
38809
|
style: {
|
|
38722
38810
|
cursor: "pointer"
|
|
38723
38811
|
}
|
|
38724
|
-
}, /*#__PURE__*/React.createElement(ViewsIcon, null)))
|
|
38812
|
+
}, /*#__PURE__*/React.createElement(ViewsIcon, null))), !signatureFileStoreId && (formValue === null || formValue === void 0 ? void 0 : formValue.agree) && /*#__PURE__*/React.createElement(CardLabelError, {
|
|
38813
|
+
style: {
|
|
38814
|
+
color: "red",
|
|
38815
|
+
fontSize: "12px",
|
|
38816
|
+
marginTop: "4px"
|
|
38817
|
+
}
|
|
38818
|
+
}, t("WS_SIGNATURE_MANDATORY_ERROR") || "Signature is mandatory to submit application")))))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
38725
38819
|
open: showDocModal,
|
|
38726
38820
|
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
38727
38821
|
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
@@ -38779,7 +38873,7 @@ const WSDeclaration = _ref => {
|
|
|
38779
38873
|
};
|
|
38780
38874
|
|
|
38781
38875
|
const WSDjbEmployee = _ref => {
|
|
38782
|
-
var _formData$additionalD, _localFormState$touch, _formValue$employeeId, _formValue$employeeId2, _localFormState$touch2, _formValue$designatio, _formValue$designatio2, _formData$dueVerifica;
|
|
38876
|
+
var _formData$additionalD, _formData$djbEmployee3, _localFormState$touch, _formValue$employeeId, _formValue$employeeId2, _localFormState$touch2, _formValue$designatio, _formValue$designatio2, _formData$dueVerifica;
|
|
38783
38877
|
let {
|
|
38784
38878
|
config,
|
|
38785
38879
|
onSelect,
|
|
@@ -38877,20 +38971,27 @@ const WSDjbEmployee = _ref => {
|
|
|
38877
38971
|
useEffect(() => {
|
|
38878
38972
|
const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
|
|
38879
38973
|
if (isEmployeeMode) {
|
|
38880
|
-
|
|
38974
|
+
var _formData$djbEmployee;
|
|
38975
|
+
const currentDoc = (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee = formData.djbEmployee) === null || _formData$djbEmployee === void 0 ? void 0 : _formData$djbEmployee.document) || (formValue === null || formValue === void 0 ? void 0 : formValue.document) || "";
|
|
38976
|
+
const formValueComparable = {
|
|
38977
|
+
...formValue,
|
|
38978
|
+
document: currentDoc
|
|
38979
|
+
};
|
|
38980
|
+
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formValueComparable);
|
|
38881
38981
|
if (isDifferent) {
|
|
38882
|
-
var _formData$
|
|
38883
|
-
const isImmediate = (formData === null || formData === void 0 ? void 0 : (_formData$
|
|
38982
|
+
var _formData$djbEmployee2;
|
|
38983
|
+
const isImmediate = (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee2 = formData.djbEmployee) === null || _formData$djbEmployee2 === void 0 ? void 0 : _formData$djbEmployee2.isDjbEmployee) !== (formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee);
|
|
38884
38984
|
const delay = isImmediate ? 0 : 100;
|
|
38885
38985
|
const timer = setTimeout(() => {
|
|
38886
38986
|
onSelect((config === null || config === void 0 ? void 0 : config.key) || "djbEmployee", {
|
|
38887
|
-
...formValue
|
|
38987
|
+
...formValue,
|
|
38988
|
+
document: currentDoc
|
|
38888
38989
|
});
|
|
38889
38990
|
}, delay);
|
|
38890
38991
|
return () => clearTimeout(timer);
|
|
38891
38992
|
}
|
|
38892
38993
|
}
|
|
38893
|
-
}, [formValue, userType]);
|
|
38994
|
+
}, [formValue, userType, formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee3 = formData.djbEmployee) === null || _formData$djbEmployee3 === void 0 ? void 0 : _formData$djbEmployee3.document]);
|
|
38894
38995
|
useEffect(() => {
|
|
38895
38996
|
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "djbEmployee";
|
|
38896
38997
|
if (hasDjbErrors) {
|
|
@@ -51620,7 +51721,7 @@ const ReSubmitDisconnectionApplication = () => {
|
|
|
51620
51721
|
};
|
|
51621
51722
|
|
|
51622
51723
|
const CheckPage = _ref => {
|
|
51623
|
-
var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _reversedOwners$, _cpt$details14, _cpt$details15, _cpt$details16, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$co, _connectionDetails$co2, _connectionDetails$wa, _connectionDetails$wa2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _data, _data$additionalDetai, _connectionDetails$do, _connectionDetails$do2, _connectionDetails$do3, _connectionDetails$de, _connectionDetails$de2, _ConnectionHolderDeta, _ConnectionHolderDeta2, _ConnectionHolderDeta3, _ConnectionHolderDeta4, _ConnectionHolderDeta5, _ConnectionHolderDeta6, _ConnectionHolderDeta7, _ConnectionHolderDeta8, _ConnectionHolderDeta9, _ConnectionHolderDeta0, _propertyAddress$zro, _propertyAddress$addi, _propertyAddress$addr, _propertyAddress$addr2, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2,
|
|
51724
|
+
var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _reversedOwners$, _cpt$details14, _cpt$details15, _cpt$details16, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$co, _connectionDetails$co2, _connectionDetails$wa, _connectionDetails$wa2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _data, _data$additionalDetai, _connectionDetails$do, _connectionDetails$do2, _connectionDetails$do3, _connectionDetails$de, _connectionDetails$de2, _ConnectionHolderDeta, _ConnectionHolderDeta2, _ConnectionHolderDeta3, _ConnectionHolderDeta4, _ConnectionHolderDeta5, _ConnectionHolderDeta6, _ConnectionHolderDeta7, _ConnectionHolderDeta8, _ConnectionHolderDeta9, _ConnectionHolderDeta0, _propertyAddress$zro, _propertyAddress$addi, _propertyAddress$addr, _propertyAddress$addr2, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _cpt$details17, _cpt$details17$addres, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _cpt$details18, _cpt$details18$addres, _cpt$details19, _cpt$details19$addres, _propertyAddress$zone, _propertyAddress$zone2, _cpt$details20, _cpt$details20$addres, _cpt$details21, _cpt$details21$addres, _cpt$details22, _cpt$details22$addres, _cpt$details23, _cpt$details23$addres, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$numberOfF, _useDetails$numberOfF2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _property, _property$additionalD, _property2, _property2$additional, _property3, _property4, _property5, _property6, _property6$additional, _property7, _property7$additional, _property8, _property9, _property0, _property0$additional, _property1, _property1$additional, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _cpt$additionalDetail, _cpt$additionalDetail2, _cpt$additionalDetail3, _cpt$propertyType, _cpt$additionalDetail4, _cpt$additionalDetail5;
|
|
51624
51725
|
let {
|
|
51625
51726
|
onSubmit,
|
|
51626
51727
|
value
|
|
@@ -51880,22 +51981,22 @@ const CheckPage = _ref => {
|
|
|
51880
51981
|
text: `${t(checkForNA(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.longitude))}`
|
|
51881
51982
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51882
51983
|
label: t("COMMON_ASSEMBLY"),
|
|
51883
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse = propertyAddress.assembly) === null || _propertyAddress$asse === void 0 ? void 0 : _propertyAddress$asse.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse2 = propertyAddress.assembly) === null || _propertyAddress$asse2 === void 0 ? void 0 : _propertyAddress$asse2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
|
|
51984
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse = propertyAddress.assembly) === null || _propertyAddress$asse === void 0 ? void 0 : _propertyAddress$asse.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$asse2 = propertyAddress.assembly) === null || _propertyAddress$asse2 === void 0 ? void 0 : _propertyAddress$asse2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.assembly) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details17 = cpt.details) === null || _cpt$details17 === void 0 ? void 0 : (_cpt$details17$addres = _cpt$details17.address) === null || _cpt$details17$addres === void 0 ? void 0 : _cpt$details17$addres.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
|
|
51884
51985
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51885
51986
|
label: t("COMMON_WARD"),
|
|
51886
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc = propertyAddress.block) === null || _propertyAddress$bloc === void 0 ? void 0 : _propertyAddress$bloc.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc2 = propertyAddress.block) === null || _propertyAddress$bloc2 === void 0 ? void 0 : _propertyAddress$bloc2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.block) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward = propertyAddress.ward) === null || _propertyAddress$ward === void 0 ? void 0 : _propertyAddress$ward.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward2 = propertyAddress.ward) === null || _propertyAddress$ward2 === void 0 ? void 0 : _propertyAddress$ward2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
|
|
51987
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc = propertyAddress.block) === null || _propertyAddress$bloc === void 0 ? void 0 : _propertyAddress$bloc.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$bloc2 = propertyAddress.block) === null || _propertyAddress$bloc2 === void 0 ? void 0 : _propertyAddress$bloc2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.block) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward = propertyAddress.ward) === null || _propertyAddress$ward === void 0 ? void 0 : _propertyAddress$ward.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$ward2 = propertyAddress.ward) === null || _propertyAddress$ward2 === void 0 ? void 0 : _propertyAddress$ward2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.ward) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details18 = cpt.details) === null || _cpt$details18 === void 0 ? void 0 : (_cpt$details18$addres = _cpt$details18.address) === null || _cpt$details18$addres === void 0 ? void 0 : _cpt$details18$addres.ward) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details19 = cpt.details) === null || _cpt$details19 === void 0 ? void 0 : (_cpt$details19$addres = _cpt$details19.address) === null || _cpt$details19$addres === void 0 ? void 0 : _cpt$details19$addres.block) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
|
|
51887
51988
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51888
51989
|
label: t("COMMON_ZONE"),
|
|
51889
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone = propertyAddress.zone) === null || _propertyAddress$zone === void 0 ? void 0 : _propertyAddress$zone.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone2 = propertyAddress.zone) === null || _propertyAddress$zone2 === void 0 ? void 0 : _propertyAddress$zone2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
|
|
51990
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone = propertyAddress.zone) === null || _propertyAddress$zone === void 0 ? void 0 : _propertyAddress$zone.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$zone2 = propertyAddress.zone) === null || _propertyAddress$zone2 === void 0 ? void 0 : _propertyAddress$zone2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.zone) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details20 = cpt.details) === null || _cpt$details20 === void 0 ? void 0 : (_cpt$details20$addres = _cpt$details20.address) === null || _cpt$details20$addres === void 0 ? void 0 : _cpt$details20$addres.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
|
|
51890
51991
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51891
|
-
label: t("COMMON_CURRENT_ASSEMBLY"),
|
|
51892
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
|
|
51992
|
+
label: t("COMMON_CURRENT_ASSEMBLY") && t("COMMON_CURRENT_ASSEMBLY") !== "Assembly" && t("COMMON_CURRENT_ASSEMBLY") !== "COMMON_CURRENT_ASSEMBLY" ? t("COMMON_CURRENT_ASSEMBLY") : "Actual Assembly",
|
|
51993
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualAssembly) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details21 = cpt.details) === null || _cpt$details21 === void 0 ? void 0 : (_cpt$details21$addres = _cpt$details21.address) === null || _cpt$details21$addres === void 0 ? void 0 : _cpt$details21$addres.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
|
|
51893
51994
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51894
|
-
label: t("COMMON_CURRENT_WARD"),
|
|
51895
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
|
|
51995
|
+
label: t("COMMON_CURRENT_WARD") && t("COMMON_CURRENT_WARD") !== "Ward" && t("COMMON_CURRENT_WARD") !== "COMMON_CURRENT_WARD" ? t("COMMON_CURRENT_WARD") : "Actual Ward",
|
|
51996
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualWard) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details22 = cpt.details) === null || _cpt$details22 === void 0 ? void 0 : (_cpt$details22$addres = _cpt$details22.address) === null || _cpt$details22$addres === void 0 ? void 0 : _cpt$details22$addres.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
|
|
51896
51997
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51897
|
-
label: t("COMMON_CURRENT_ZONE"),
|
|
51898
|
-
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 :
|
|
51998
|
+
label: t("COMMON_CURRENT_ZONE") && t("COMMON_CURRENT_ZONE") !== "Zone" && t("COMMON_CURRENT_ZONE") !== "COMMON_CURRENT_ZONE" ? t("COMMON_CURRENT_ZONE") : "Actual Zone",
|
|
51999
|
+
text: `${t(checkForNA((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.actualZone) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$details23 = cpt.details) === null || _cpt$details23 === void 0 ? void 0 : (_cpt$details23$addres = _cpt$details23.address) === null || _cpt$details23$addres === void 0 ? void 0 : _cpt$details23$addres.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
|
|
51899
52000
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
51900
52001
|
label: t("LANDMARK"),
|
|
51901
52002
|
text: `${t(checkForNA(propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.landmark))}`
|
|
@@ -66571,7 +66672,7 @@ const openFilePDF = fileId => {
|
|
|
66571
66672
|
}).catch(error => console.error("Error fetching file:", error));
|
|
66572
66673
|
};
|
|
66573
66674
|
const CheckPage$4 = _ref2 => {
|
|
66574
|
-
var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress2, _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, _propertyAddress3, _propertyAddress4, _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$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$additionalDetai4, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress5, _propertyAddress5$zro, _propertyAddress6, _propertyAddress7, _propertyAddress8, _propertyAddress8$add, _propertyAddress9, _propertyAddress9$add, _propertyAddress0, _propertyAddress0$add, _propertyAddress1, _propertyAddress10, _propertyAddress10$ci, _propertyAddress11, _propertyAddress11$ci, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _propertyAddress15$lo, _propertyAddress16, _propertyAddress16$lo, _propertyAddress17, _propertyAddress18, _propertyAddress18$su, _propertyAddress19, _propertyAddress19$su, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress27, _propertyAddress28, _propertyAddress29, _propertyAddress30, _propertyAddress31, _propertyAddress31$as, _propertyAddress32, _propertyAddress32$as, _propertyAddress33, _propertyAddress34, _propertyAddress34$bl, _propertyAddress35, _propertyAddress35$bl, _propertyAddress36, _propertyAddress37, _propertyAddress37$wa, _propertyAddress38, _propertyAddress38$wa, _propertyAddress39, _propertyAddress40, _propertyAddress40$zo, _propertyAddress41, _propertyAddress41$zo, _propertyAddress42, _propertyAddress43, _propertyAddress44, _propertyAddress45, _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$
|
|
66675
|
+
var _Digit$UserService$ge, _data$cpt, _propertyAddress, _propertyAddress2, _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, _propertyAddress3, _propertyAddress4, _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$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$additionalDetai4, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress5, _propertyAddress5$zro, _propertyAddress6, _propertyAddress7, _propertyAddress8, _propertyAddress8$add, _propertyAddress9, _propertyAddress9$add, _propertyAddress0, _propertyAddress0$add, _propertyAddress1, _propertyAddress10, _propertyAddress10$ci, _propertyAddress11, _propertyAddress11$ci, _propertyAddress12, _propertyAddress13, _propertyAddress14, _propertyAddress15, _propertyAddress15$lo, _propertyAddress16, _propertyAddress16$lo, _propertyAddress17, _propertyAddress18, _propertyAddress18$su, _propertyAddress19, _propertyAddress19$su, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress27, _propertyAddress28, _propertyAddress29, _propertyAddress30, _propertyAddress31, _propertyAddress31$as, _propertyAddress32, _propertyAddress32$as, _propertyAddress33, _cpt$address, _propertyAddress34, _propertyAddress34$bl, _propertyAddress35, _propertyAddress35$bl, _propertyAddress36, _propertyAddress37, _propertyAddress37$wa, _propertyAddress38, _propertyAddress38$wa, _propertyAddress39, _cpt$address2, _cpt$address3, _propertyAddress40, _propertyAddress40$zo, _propertyAddress41, _propertyAddress41$zo, _propertyAddress42, _cpt$address4, _propertyAddress43, _cpt$address5, _cpt$additionalDetail5, _propertyAddress44, _cpt$address6, _cpt$additionalDetail6, _propertyAddress45, _cpt$address7, _cpt$additionalDetail7, _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$additionalDetail8, _cpt$additionalDetail9, _cpt$additionalDetail0, _cpt$propertyType, _cpt$additionalDetail1, _cpt$additionalDetail10;
|
|
66575
66676
|
let {
|
|
66576
66677
|
data,
|
|
66577
66678
|
onSubmit,
|
|
@@ -66764,22 +66865,22 @@ const CheckPage$4 = _ref2 => {
|
|
|
66764
66865
|
text: `${t(checkForNA$1((_propertyAddress30 = propertyAddress) === null || _propertyAddress30 === void 0 ? void 0 : _propertyAddress30.longitude))}`
|
|
66765
66866
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66766
66867
|
label: t("COMMON_ASSEMBLY"),
|
|
66767
|
-
text: `${t(checkForNA$1(((_propertyAddress31 = propertyAddress) === null || _propertyAddress31 === void 0 ? void 0 : (_propertyAddress31$as = _propertyAddress31.assembly) === null || _propertyAddress31$as === void 0 ? void 0 : _propertyAddress31$as.name) || ((_propertyAddress32 = propertyAddress) === null || _propertyAddress32 === void 0 ? void 0 : (_propertyAddress32$as = _propertyAddress32.assembly) === null || _propertyAddress32$as === void 0 ? void 0 : _propertyAddress32$as.code) || ((_propertyAddress33 = propertyAddress) === null || _propertyAddress33 === void 0 ? void 0 : _propertyAddress33.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
|
|
66868
|
+
text: `${t(checkForNA$1(((_propertyAddress31 = propertyAddress) === null || _propertyAddress31 === void 0 ? void 0 : (_propertyAddress31$as = _propertyAddress31.assembly) === null || _propertyAddress31$as === void 0 ? void 0 : _propertyAddress31$as.name) || ((_propertyAddress32 = propertyAddress) === null || _propertyAddress32 === void 0 ? void 0 : (_propertyAddress32$as = _propertyAddress32.assembly) === null || _propertyAddress32$as === void 0 ? void 0 : _propertyAddress32$as.code) || ((_propertyAddress33 = propertyAddress) === null || _propertyAddress33 === void 0 ? void 0 : _propertyAddress33.assembly) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address = cpt.address) === null || _cpt$address === void 0 ? void 0 : _cpt$address.assembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.assembly)))}`
|
|
66768
66869
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66769
66870
|
label: t("COMMON_WARD"),
|
|
66770
|
-
text: `${t(checkForNA$1(((_propertyAddress34 = propertyAddress) === null || _propertyAddress34 === void 0 ? void 0 : (_propertyAddress34$bl = _propertyAddress34.block) === null || _propertyAddress34$bl === void 0 ? void 0 : _propertyAddress34$bl.name) || ((_propertyAddress35 = propertyAddress) === null || _propertyAddress35 === void 0 ? void 0 : (_propertyAddress35$bl = _propertyAddress35.block) === null || _propertyAddress35$bl === void 0 ? void 0 : _propertyAddress35$bl.code) || ((_propertyAddress36 = propertyAddress) === null || _propertyAddress36 === void 0 ? void 0 : _propertyAddress36.block) || ((_propertyAddress37 = propertyAddress) === null || _propertyAddress37 === void 0 ? void 0 : (_propertyAddress37$wa = _propertyAddress37.ward) === null || _propertyAddress37$wa === void 0 ? void 0 : _propertyAddress37$wa.name) || ((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : (_propertyAddress38$wa = _propertyAddress38.ward) === null || _propertyAddress38$wa === void 0 ? void 0 : _propertyAddress38$wa.code) || ((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.ward) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
|
|
66871
|
+
text: `${t(checkForNA$1(((_propertyAddress34 = propertyAddress) === null || _propertyAddress34 === void 0 ? void 0 : (_propertyAddress34$bl = _propertyAddress34.block) === null || _propertyAddress34$bl === void 0 ? void 0 : _propertyAddress34$bl.name) || ((_propertyAddress35 = propertyAddress) === null || _propertyAddress35 === void 0 ? void 0 : (_propertyAddress35$bl = _propertyAddress35.block) === null || _propertyAddress35$bl === void 0 ? void 0 : _propertyAddress35$bl.code) || ((_propertyAddress36 = propertyAddress) === null || _propertyAddress36 === void 0 ? void 0 : _propertyAddress36.block) || ((_propertyAddress37 = propertyAddress) === null || _propertyAddress37 === void 0 ? void 0 : (_propertyAddress37$wa = _propertyAddress37.ward) === null || _propertyAddress37$wa === void 0 ? void 0 : _propertyAddress37$wa.name) || ((_propertyAddress38 = propertyAddress) === null || _propertyAddress38 === void 0 ? void 0 : (_propertyAddress38$wa = _propertyAddress38.ward) === null || _propertyAddress38$wa === void 0 ? void 0 : _propertyAddress38$wa.code) || ((_propertyAddress39 = propertyAddress) === null || _propertyAddress39 === void 0 ? void 0 : _propertyAddress39.ward) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address2 = cpt.address) === null || _cpt$address2 === void 0 ? void 0 : _cpt$address2.ward) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address3 = cpt.address) === null || _cpt$address3 === void 0 ? void 0 : _cpt$address3.block) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.ward)))}`
|
|
66771
66872
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66772
66873
|
label: t("COMMON_ZONE"),
|
|
66773
|
-
text: `${t(checkForNA$1(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : (_propertyAddress40$zo = _propertyAddress40.zone) === null || _propertyAddress40$zo === void 0 ? void 0 : _propertyAddress40$zo.name) || ((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : (_propertyAddress41$zo = _propertyAddress41.zone) === null || _propertyAddress41$zo === void 0 ? void 0 : _propertyAddress41$zo.code) || ((_propertyAddress42 = propertyAddress) === null || _propertyAddress42 === void 0 ? void 0 : _propertyAddress42.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
|
|
66874
|
+
text: `${t(checkForNA$1(((_propertyAddress40 = propertyAddress) === null || _propertyAddress40 === void 0 ? void 0 : (_propertyAddress40$zo = _propertyAddress40.zone) === null || _propertyAddress40$zo === void 0 ? void 0 : _propertyAddress40$zo.name) || ((_propertyAddress41 = propertyAddress) === null || _propertyAddress41 === void 0 ? void 0 : (_propertyAddress41$zo = _propertyAddress41.zone) === null || _propertyAddress41$zo === void 0 ? void 0 : _propertyAddress41$zo.code) || ((_propertyAddress42 = propertyAddress) === null || _propertyAddress42 === void 0 ? void 0 : _propertyAddress42.zone) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address4 = cpt.address) === null || _cpt$address4 === void 0 ? void 0 : _cpt$address4.zone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.zone)))}`
|
|
66774
66875
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66775
|
-
label: t("COMMON_CURRENT_ASSEMBLY"),
|
|
66776
|
-
text: `${t(checkForNA$1(((_propertyAddress43 = propertyAddress) === null || _propertyAddress43 === void 0 ? void 0 : _propertyAddress43.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly)))}`
|
|
66876
|
+
label: t("COMMON_CURRENT_ASSEMBLY") && t("COMMON_CURRENT_ASSEMBLY") !== "Assembly" && t("COMMON_CURRENT_ASSEMBLY") !== "COMMON_CURRENT_ASSEMBLY" ? t("COMMON_CURRENT_ASSEMBLY") : "Actual Assembly",
|
|
66877
|
+
text: `${t(checkForNA$1(((_propertyAddress43 = propertyAddress) === null || _propertyAddress43 === void 0 ? void 0 : _propertyAddress43.actualAssembly) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address5 = cpt.address) === null || _cpt$address5 === void 0 ? void 0 : _cpt$address5.actualAssembly) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualAssembly) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail5 = cpt.additionalDetails) === null || _cpt$additionalDetail5 === void 0 ? void 0 : _cpt$additionalDetail5.actualAssembly)))}`
|
|
66777
66878
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66778
|
-
label: t("COMMON_CURRENT_WARD"),
|
|
66779
|
-
text: `${t(checkForNA$1(((_propertyAddress44 = propertyAddress) === null || _propertyAddress44 === void 0 ? void 0 : _propertyAddress44.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard)))}`
|
|
66879
|
+
label: t("COMMON_CURRENT_WARD") && t("COMMON_CURRENT_WARD") !== "Ward" && t("COMMON_CURRENT_WARD") !== "COMMON_CURRENT_WARD" ? t("COMMON_CURRENT_WARD") : "Actual Ward",
|
|
66880
|
+
text: `${t(checkForNA$1(((_propertyAddress44 = propertyAddress) === null || _propertyAddress44 === void 0 ? void 0 : _propertyAddress44.actualWard) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address6 = cpt.address) === null || _cpt$address6 === void 0 ? void 0 : _cpt$address6.actualWard) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualWard) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail6 = cpt.additionalDetails) === null || _cpt$additionalDetail6 === void 0 ? void 0 : _cpt$additionalDetail6.actualWard)))}`
|
|
66780
66881
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66781
|
-
label: t("COMMON_CURRENT_ZONE"),
|
|
66782
|
-
text: `${t(checkForNA$1(((_propertyAddress45 = propertyAddress) === null || _propertyAddress45 === void 0 ? void 0 : _propertyAddress45.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone)))}`
|
|
66882
|
+
label: t("COMMON_CURRENT_ZONE") && t("COMMON_CURRENT_ZONE") !== "Zone" && t("COMMON_CURRENT_ZONE") !== "COMMON_CURRENT_ZONE" ? t("COMMON_CURRENT_ZONE") : "Actual Zone",
|
|
66883
|
+
text: `${t(checkForNA$1(((_propertyAddress45 = propertyAddress) === null || _propertyAddress45 === void 0 ? void 0 : _propertyAddress45.actualZone) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$address7 = cpt.address) === null || _cpt$address7 === void 0 ? void 0 : _cpt$address7.actualZone) || (additionalDetails === null || additionalDetails === void 0 ? void 0 : additionalDetails.actualZone) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail7 = cpt.additionalDetails) === null || _cpt$additionalDetail7 === void 0 ? void 0 : _cpt$additionalDetail7.actualZone)))}`
|
|
66783
66884
|
})), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, {
|
|
66784
66885
|
style: {
|
|
66785
66886
|
marginTop: "10px",
|
|
@@ -66812,10 +66913,10 @@ const CheckPage$4 = _ref2 => {
|
|
|
66812
66913
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
66813
66914
|
label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
|
|
66814
66915
|
text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea === void 0 ? void 0 : _useDetails$SelectYea.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea2 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea2 === void 0 ? void 0 : _useDetails$SelectYea2.value) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$SelectYea3 = useDetails.SelectYearofConstruction) === null || _useDetails$SelectYea3 === void 0 ? void 0 : _useDetails$SelectYea3.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.SelectYearofConstruction) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct = useDetails.constructionYear) === null || _useDetails$construct === void 0 ? void 0 : _useDetails$construct.i18nKey) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$construct2 = useDetails.constructionYear) === null || _useDetails$construct2 === void 0 ? void 0 : _useDetails$construct2.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.constructionYear)))}`
|
|
66815
|
-
}), String((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC3 = useDetails.propertyCategory) === null || _useDetails$propertyC3 === void 0 ? void 0 : _useDetails$propertyC3.code) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC4 = useDetails.propertyCategory) === null || _useDetails$propertyC4 === void 0 ? void 0 : _useDetails$propertyC4.name) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$
|
|
66916
|
+
}), String((useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC3 = useDetails.propertyCategory) === null || _useDetails$propertyC3 === void 0 ? void 0 : _useDetails$propertyC3.code) || (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC4 = useDetails.propertyCategory) === null || _useDetails$propertyC4 === void 0 ? void 0 : _useDetails$propertyC4.name) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail8 = cpt.additionalDetails) === null || _cpt$additionalDetail8 === void 0 ? void 0 : (_cpt$additionalDetail9 = _cpt$additionalDetail8.propertyCategory) === null || _cpt$additionalDetail9 === void 0 ? void 0 : _cpt$additionalDetail9.code) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail0 = cpt.additionalDetails) === null || _cpt$additionalDetail0 === void 0 ? void 0 : _cpt$additionalDetail0.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$propertyType = cpt.propertyType) === null || _cpt$propertyType === void 0 ? void 0 : _cpt$propertyType.propertyCategory) || (cpt === null || cpt === void 0 ? void 0 : cpt.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React.createElement(Row, {
|
|
66816
66917
|
label: t("WS_NUMBER_OF_DWELLING_UNITS"),
|
|
66817
66918
|
text: `${t(checkForNA$1((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
|
|
66818
|
-
}) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$
|
|
66919
|
+
}) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail1 = cpt.additionalDetails) === null || _cpt$additionalDetail1 === void 0 ? void 0 : _cpt$additionalDetail1.questions)) ? (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (cpt === null || cpt === void 0 ? void 0 : (_cpt$additionalDetail10 = cpt.additionalDetails) === null || _cpt$additionalDetail10 === void 0 ? void 0 : _cpt$additionalDetail10.questions) : []).map((q, idx) => {
|
|
66819
66920
|
var _q$answer, _q$answer2, _q$answer3;
|
|
66820
66921
|
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}`;
|
|
66821
66922
|
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;
|
|
@@ -66907,17 +67008,24 @@ const CheckPage$4 = _ref2 => {
|
|
|
66907
67008
|
declarationData: declarationData
|
|
66908
67009
|
},
|
|
66909
67010
|
userType: "employee"
|
|
66910
|
-
})),
|
|
66911
|
-
|
|
66912
|
-
|
|
66913
|
-
|
|
66914
|
-
|
|
66915
|
-
|
|
66916
|
-
|
|
66917
|
-
|
|
66918
|
-
|
|
66919
|
-
|
|
66920
|
-
|
|
67011
|
+
})), ((_declarationData$sign, _data$declarationData, _data$declaration, _data$additionalDetai7) => {
|
|
67012
|
+
const hasSignature = Boolean((declarationData === null || declarationData === void 0 ? void 0 : declarationData.signatureFileStoreId) || (declarationData === null || declarationData === void 0 ? void 0 : declarationData.signature) || (declarationData === null || declarationData === void 0 ? void 0 : (_declarationData$sign = declarationData.signatureFile) === null || _declarationData$sign === void 0 ? void 0 : _declarationData$sign.fileStoreId) || typeof (declarationData === null || declarationData === void 0 ? void 0 : declarationData.signatureFile) === "string" && (declarationData === null || declarationData === void 0 ? void 0 : declarationData.signatureFile.trim()) || (data === null || data === void 0 ? void 0 : (_data$declarationData = data.declarationData) === null || _data$declarationData === void 0 ? void 0 : _data$declarationData.signatureFileStoreId) || (data === null || data === void 0 ? void 0 : (_data$declaration = data.declaration) === null || _data$declaration === void 0 ? void 0 : _data$declaration.signatureFileStoreId) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.signatureFileStoreId));
|
|
67013
|
+
const isSubmitDisabled = !(declarationData !== null && declarationData !== void 0 && declarationData.agree) || !hasSignature;
|
|
67014
|
+
return /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
67015
|
+
label: t("CS_COMMON_SUBMIT"),
|
|
67016
|
+
onSubmit: () => {
|
|
67017
|
+
if (isSubmitDisabled) return;
|
|
67018
|
+
onSubmit({
|
|
67019
|
+
...data,
|
|
67020
|
+
declarationData
|
|
67021
|
+
});
|
|
67022
|
+
},
|
|
67023
|
+
style: {
|
|
67024
|
+
width: "150px"
|
|
67025
|
+
},
|
|
67026
|
+
disabled: isSubmitDisabled
|
|
67027
|
+
}));
|
|
67028
|
+
})()), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
66921
67029
|
open: showDocModal,
|
|
66922
67030
|
headerBarMain: t("WS_VIEW_DOCUMENT") || "View Document",
|
|
66923
67031
|
headerBarEnd: /*#__PURE__*/React.createElement("div", {
|
|
@@ -67037,8 +67145,12 @@ const OLDApplication = () => {
|
|
|
67037
67145
|
const formDataRef = useRef(sessionFormData || {});
|
|
67038
67146
|
const sessionSaveTimeoutRef = useRef(null);
|
|
67039
67147
|
const defaultValues = useMemo(() => {
|
|
67040
|
-
|
|
67041
|
-
|
|
67148
|
+
const fromStorage = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM");
|
|
67149
|
+
if (fromStorage && Object.keys(fromStorage).length > 0) return fromStorage;
|
|
67150
|
+
if (sessionFormData && Object.keys(sessionFormData).length > 0) return sessionFormData;
|
|
67151
|
+
if (formDataRef.current && Object.keys(formDataRef.current).length > 0) return formDataRef.current;
|
|
67152
|
+
return {};
|
|
67153
|
+
}, [sessionFormData, showCheckPage]);
|
|
67042
67154
|
const {
|
|
67043
67155
|
data: propertyDetails
|
|
67044
67156
|
} = Digit.Hooks.pt.usePropertySearch({
|
|
@@ -67176,6 +67288,41 @@ const OLDApplication = () => {
|
|
|
67176
67288
|
setPropertyId(cptId);
|
|
67177
67289
|
}
|
|
67178
67290
|
}, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt, propertyId]);
|
|
67291
|
+
useEffect(() => {
|
|
67292
|
+
var _formDataRef$current, _formDataRef$current$, _formDataRef$current$2, _propertyDetails$Prop, _propertyDetails$Prop2;
|
|
67293
|
+
const hasProp = ((_formDataRef$current = formDataRef.current) === null || _formDataRef$current === void 0 ? void 0 : (_formDataRef$current$ = _formDataRef$current.cpt) === null || _formDataRef$current$ === void 0 ? void 0 : (_formDataRef$current$2 = _formDataRef$current$.details) === null || _formDataRef$current$2 === void 0 ? void 0 : _formDataRef$current$2.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : (_propertyDetails$Prop2 = _propertyDetails$Prop[0]) === null || _propertyDetails$Prop2 === void 0 ? void 0 : _propertyDetails$Prop2.propertyId);
|
|
67294
|
+
if (hasProp && !canSubmit) {
|
|
67295
|
+
var _formDataRef$current2, _formDataRef$current3, _formDataRef$current4, _formDataRef$current5, _formDataRef$current6, _formDataRef$current7, _formDataRef$current8, _djbData$document, _formDataRef$current9, _formDataRef$current0;
|
|
67296
|
+
const djbData = ((_formDataRef$current2 = formDataRef.current) === null || _formDataRef$current2 === void 0 ? void 0 : _formDataRef$current2.djbEmployee) || ((_formDataRef$current3 = formDataRef.current) === null || _formDataRef$current3 === void 0 ? void 0 : _formDataRef$current3.additionalDetails);
|
|
67297
|
+
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
67298
|
+
const docs = ((_formDataRef$current4 = formDataRef.current) === null || _formDataRef$current4 === void 0 ? void 0 : (_formDataRef$current5 = _formDataRef$current4.DocumentsRequired) === null || _formDataRef$current5 === void 0 ? void 0 : _formDataRef$current5.documents) || ((_formDataRef$current6 = formDataRef.current) === null || _formDataRef$current6 === void 0 ? void 0 : (_formDataRef$current7 = _formDataRef$current6.documents) === null || _formDataRef$current7 === void 0 ? void 0 : _formDataRef$current7.documents) || ((_formDataRef$current8 = formDataRef.current) === null || _formDataRef$current8 === void 0 ? void 0 : _formDataRef$current8.documents) || [];
|
|
67299
|
+
const foundDjb = Array.isArray(docs) && docs.find(d => {
|
|
67300
|
+
var _d$documentType;
|
|
67301
|
+
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType = d.documentType) === null || _d$documentType === void 0 ? void 0 : _d$documentType.includes("DJB_EMPLOYEE_ID"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file) || (d === null || d === void 0 ? void 0 : d.filestoreId));
|
|
67302
|
+
});
|
|
67303
|
+
const djbDoc = (djbData === null || djbData === void 0 ? void 0 : (_djbData$document = djbData.document) === null || _djbData$document === void 0 ? void 0 : _djbData$document.fileStoreId) || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && (djbData === null || djbData === void 0 ? void 0 : djbData.document.trim()) || (djbData === null || djbData === void 0 ? void 0 : djbData.document) || (foundDjb ? foundDjb.fileStoreId || foundDjb.file || foundDjb.filestoreId : null);
|
|
67304
|
+
const isDjbEmpInv = isDjbEmp && (!(djbData !== null && djbData !== void 0 && djbData.employeeId) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.employeeId).trim() || !(djbData !== null && djbData !== void 0 && djbData.designation) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.designation).trim() || !djbDoc);
|
|
67305
|
+
const rwhData = ((_formDataRef$current9 = formDataRef.current) === null || _formDataRef$current9 === void 0 ? void 0 : _formDataRef$current9.rainWaterHarvesting) || ((_formDataRef$current0 = formDataRef.current) === null || _formDataRef$current0 === void 0 ? void 0 : _formDataRef$current0.additionalDetails);
|
|
67306
|
+
const isRwhReq = (rwhData === null || rwhData === void 0 ? void 0 : rwhData.hasCertificate) === true || String(rwhData === null || rwhData === void 0 ? void 0 : rwhData.hasCertificate) === "true" || (rwhData === null || rwhData === void 0 ? void 0 : rwhData.isRainwaterHarvesting) === true || String(rwhData === null || rwhData === void 0 ? void 0 : rwhData.isRainwaterHarvesting) === "true";
|
|
67307
|
+
const isRwhUploaded = Array.isArray(docs) && docs.some(d => isRwhDoc(d) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file)));
|
|
67308
|
+
const isRwhInv = isRwhReq && !isRwhUploaded;
|
|
67309
|
+
const storedErrors = sessionStorage.getItem("FORMSTATE_ERRORS");
|
|
67310
|
+
let parsedErrors = {};
|
|
67311
|
+
try {
|
|
67312
|
+
parsedErrors = storedErrors ? JSON.parse(storedErrors) : {};
|
|
67313
|
+
} catch (e) {}
|
|
67314
|
+
const hasStoredErrors = Object.keys(parsedErrors).some(k => {
|
|
67315
|
+
const err = parsedErrors[k];
|
|
67316
|
+
if (!err) return false;
|
|
67317
|
+
if (Array.isArray(err === null || err === void 0 ? void 0 : err.type) && err.type.length === 0) return false;
|
|
67318
|
+
if (typeof err === "object" && Object.keys(err).length === 0) return false;
|
|
67319
|
+
return true;
|
|
67320
|
+
});
|
|
67321
|
+
if (!hasStoredErrors && !isDjbEmpInv && !isRwhInv) {
|
|
67322
|
+
setSubmitValve(true);
|
|
67323
|
+
}
|
|
67324
|
+
}
|
|
67325
|
+
}, [propertyId, propertyDetails]);
|
|
67179
67326
|
const {
|
|
67180
67327
|
isLoading: creatingWaterApplicationLoading,
|
|
67181
67328
|
mutate: waterMutation
|
|
@@ -67193,7 +67340,7 @@ const OLDApplication = () => {
|
|
|
67193
67340
|
mutate: sewerageUpdateMutation
|
|
67194
67341
|
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
67195
67342
|
const onFormValueChange = (setValue, formData, formState) => {
|
|
67196
|
-
var _formData$cpt, _formData$cpt$details, _formDataRef$
|
|
67343
|
+
var _formData$cpt, _formData$cpt$details, _formDataRef$current1, _formDataRef$current10, _djbData$document2, _formDataRef$current11, _formDataRef$current12, _formData$DocumentsRe, _formDataRef$current13, _formDataRef$current14, _formData$documents, _formDataRef$current15, _formDataRef$current16, _formDataRef$current17, _formDataRef$current18, _formDataRef$current19, _formData$DocumentsRe2, _formDataRef$current20, _formDataRef$current21, _formData$documents2, _formDataRef$current22, _formDataRef$current23, _formDataRef$current24, _formDataRef$current25, _propertyDetails$Prop3, _propertyDetails$Prop4;
|
|
67197
67344
|
formDataRef.current = {
|
|
67198
67345
|
...formDataRef.current,
|
|
67199
67346
|
...formData
|
|
@@ -67203,42 +67350,57 @@ const OLDApplication = () => {
|
|
|
67203
67350
|
}
|
|
67204
67351
|
sessionSaveTimeoutRef.current = setTimeout(() => {
|
|
67205
67352
|
Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", formDataRef.current);
|
|
67353
|
+
setSessionFormData(formDataRef.current);
|
|
67206
67354
|
}, 300);
|
|
67207
67355
|
sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.errors) || {}));
|
|
67208
67356
|
const cptPropId = formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : (_formData$cpt$details = _formData$cpt.details) === null || _formData$cpt$details === void 0 ? void 0 : _formData$cpt$details.propertyId;
|
|
67209
67357
|
if (!propertyId && cptPropId) {
|
|
67210
67358
|
setPropertyId(cptPropId);
|
|
67211
67359
|
}
|
|
67212
|
-
const
|
|
67360
|
+
const findDjbDoc = docs => {
|
|
67361
|
+
if (!Array.isArray(docs)) return null;
|
|
67362
|
+
const found = docs.find(d => {
|
|
67363
|
+
var _d$documentType2;
|
|
67364
|
+
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType2 = d.documentType) === null || _d$documentType2 === void 0 ? void 0 : _d$documentType2.includes("DJB_EMPLOYEE_ID"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file) || (d === null || d === void 0 ? void 0 : d.filestoreId));
|
|
67365
|
+
});
|
|
67366
|
+
return found ? found.fileStoreId || found.file || found.filestoreId : null;
|
|
67367
|
+
};
|
|
67368
|
+
const djbData = ((_formDataRef$current1 = formDataRef.current) === null || _formDataRef$current1 === void 0 ? void 0 : _formDataRef$current1.djbEmployee) || ((_formDataRef$current10 = formDataRef.current) === null || _formDataRef$current10 === void 0 ? void 0 : _formDataRef$current10.additionalDetails);
|
|
67213
67369
|
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
67214
|
-
const djbDoc = (djbData === null || djbData === void 0 ? void 0 : (_djbData$
|
|
67215
|
-
|
|
67216
|
-
|
|
67217
|
-
|
|
67218
|
-
|
|
67219
|
-
|
|
67220
|
-
|
|
67221
|
-
|
|
67222
|
-
|
|
67223
|
-
|
|
67224
|
-
|
|
67225
|
-
|
|
67226
|
-
|
|
67227
|
-
|
|
67228
|
-
|
|
67229
|
-
|
|
67370
|
+
const djbDoc = (djbData === null || djbData === void 0 ? void 0 : (_djbData$document2 = djbData.document) === null || _djbData$document2 === void 0 ? void 0 : _djbData$document2.fileStoreId) || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && (djbData === null || djbData === void 0 ? void 0 : djbData.document.trim()) || (djbData === null || djbData === void 0 ? void 0 : djbData.document) || findDjbDoc((_formDataRef$current11 = formDataRef.current) === null || _formDataRef$current11 === void 0 ? void 0 : (_formDataRef$current12 = _formDataRef$current11.DocumentsRequired) === null || _formDataRef$current12 === void 0 ? void 0 : _formDataRef$current12.documents) || findDjbDoc(formData === null || formData === void 0 ? void 0 : (_formData$DocumentsRe = formData.DocumentsRequired) === null || _formData$DocumentsRe === void 0 ? void 0 : _formData$DocumentsRe.documents) || findDjbDoc((_formDataRef$current13 = formDataRef.current) === null || _formDataRef$current13 === void 0 ? void 0 : (_formDataRef$current14 = _formDataRef$current13.documents) === null || _formDataRef$current14 === void 0 ? void 0 : _formDataRef$current14.documents) || findDjbDoc(formData === null || formData === void 0 ? void 0 : (_formData$documents = formData.documents) === null || _formData$documents === void 0 ? void 0 : _formData$documents.documents) || findDjbDoc((_formDataRef$current15 = formDataRef.current) === null || _formDataRef$current15 === void 0 ? void 0 : _formDataRef$current15.documents) || findDjbDoc(formData === null || formData === void 0 ? void 0 : formData.documents);
|
|
67371
|
+
if (djbDoc) {
|
|
67372
|
+
if (!formDataRef.current.djbEmployee) formDataRef.current.djbEmployee = {};
|
|
67373
|
+
formDataRef.current.djbEmployee.document = djbDoc;
|
|
67374
|
+
}
|
|
67375
|
+
const isDjbEmpInvalid = isDjbEmp && (!(djbData !== null && djbData !== void 0 && djbData.employeeId) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.employeeId).trim() || !(djbData !== null && djbData !== void 0 && djbData.designation) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.designation).trim() || !djbDoc);
|
|
67376
|
+
const rwhData = ((_formDataRef$current16 = formDataRef.current) === null || _formDataRef$current16 === void 0 ? void 0 : _formDataRef$current16.rainWaterHarvesting) || ((_formDataRef$current17 = formDataRef.current) === null || _formDataRef$current17 === void 0 ? void 0 : _formDataRef$current17.additionalDetails);
|
|
67377
|
+
const isRwhRequired = (rwhData === null || rwhData === void 0 ? void 0 : rwhData.hasCertificate) === true || String(rwhData === null || rwhData === void 0 ? void 0 : rwhData.hasCertificate) === "true" || (rwhData === null || rwhData === void 0 ? void 0 : rwhData.isRainwaterHarvesting) === true || String(rwhData === null || rwhData === void 0 ? void 0 : rwhData.isRainwaterHarvesting) === "true";
|
|
67378
|
+
const allCurrentDocs = ((_formDataRef$current18 = formDataRef.current) === null || _formDataRef$current18 === void 0 ? void 0 : (_formDataRef$current19 = _formDataRef$current18.DocumentsRequired) === null || _formDataRef$current19 === void 0 ? void 0 : _formDataRef$current19.documents) || (formData === null || formData === void 0 ? void 0 : (_formData$DocumentsRe2 = formData.DocumentsRequired) === null || _formData$DocumentsRe2 === void 0 ? void 0 : _formData$DocumentsRe2.documents) || ((_formDataRef$current20 = formDataRef.current) === null || _formDataRef$current20 === void 0 ? void 0 : (_formDataRef$current21 = _formDataRef$current20.documents) === null || _formDataRef$current21 === void 0 ? void 0 : _formDataRef$current21.documents) || (formData === null || formData === void 0 ? void 0 : (_formData$documents2 = formData.documents) === null || _formData$documents2 === void 0 ? void 0 : _formData$documents2.documents) || ((_formDataRef$current22 = formDataRef.current) === null || _formDataRef$current22 === void 0 ? void 0 : _formDataRef$current22.documents) || (formData === null || formData === void 0 ? void 0 : formData.documents) || [];
|
|
67379
|
+
const isRwhDocUploaded = Array.isArray(allCurrentDocs) && allCurrentDocs.some(d => isRwhDoc(d) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file)));
|
|
67380
|
+
const isRwhInvalid = isRwhRequired && !isRwhDocUploaded;
|
|
67381
|
+
const actualFormErrors = Object.keys((formState === null || formState === void 0 ? void 0 : formState.errors) || {}).filter(key => {
|
|
67382
|
+
var _formState$errors;
|
|
67383
|
+
const err = formState === null || formState === void 0 ? void 0 : (_formState$errors = formState.errors) === null || _formState$errors === void 0 ? void 0 : _formState$errors[key];
|
|
67384
|
+
if (!err) return false;
|
|
67385
|
+
if (Array.isArray(err === null || err === void 0 ? void 0 : err.type) && err.type.length === 0) return false;
|
|
67386
|
+
if (typeof err === "object" && Object.keys(err).length === 0) return false;
|
|
67387
|
+
return true;
|
|
67388
|
+
});
|
|
67389
|
+
const hasErrors = actualFormErrors.length > 0 || isDjbEmpInvalid || isRwhInvalid;
|
|
67390
|
+
const hasProperty = ((_formDataRef$current23 = formDataRef.current) === null || _formDataRef$current23 === void 0 ? void 0 : (_formDataRef$current24 = _formDataRef$current23.cpt) === null || _formDataRef$current24 === void 0 ? void 0 : (_formDataRef$current25 = _formDataRef$current24.details) === null || _formDataRef$current25 === void 0 ? void 0 : _formDataRef$current25.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : (_propertyDetails$Prop4 = _propertyDetails$Prop3[0]) === null || _propertyDetails$Prop4 === void 0 ? void 0 : _propertyDetails$Prop4.propertyId);
|
|
67230
67391
|
const canSubmitNow = !hasErrors && !!hasProperty;
|
|
67231
67392
|
setSubmitValve(prev => prev !== canSubmitNow ? canSubmitNow : prev);
|
|
67232
67393
|
};
|
|
67233
67394
|
const onFormSubmit = data => {
|
|
67234
|
-
var _combinedData$cpt, _combinedData$cpt$det, _propertyDetails$
|
|
67395
|
+
var _combinedData$cpt, _combinedData$cpt$det, _propertyDetails$Prop5, _propertyDetails$Prop6, _combinedData$cpt2, _propertyDetails$Prop7, _djbData$document3, _combinedData$Documen, _combinedData$documen, _formDataRef$current26, _formDataRef$current27, _formDataRef$current28, _formDataRef$current29, _formDataRef$current30, _combinedData$Documen2, _combinedData$documen2, _formDataRef$current31, _formDataRef$current32, _formDataRef$current33, _formDataRef$current34, _formDataRef$current35;
|
|
67235
67396
|
const combinedData = {
|
|
67236
67397
|
...formDataRef.current,
|
|
67237
67398
|
...data
|
|
67238
67399
|
};
|
|
67239
67400
|
formDataRef.current = combinedData;
|
|
67240
67401
|
Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", combinedData);
|
|
67241
|
-
|
|
67402
|
+
setSessionFormData(combinedData);
|
|
67403
|
+
const hasProperty = (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$cpt = combinedData.cpt) === null || _combinedData$cpt === void 0 ? void 0 : (_combinedData$cpt$det = _combinedData$cpt.details) === null || _combinedData$cpt$det === void 0 ? void 0 : _combinedData$cpt$det.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop5 = propertyDetails.Properties) === null || _propertyDetails$Prop5 === void 0 ? void 0 : (_propertyDetails$Prop6 = _propertyDetails$Prop5[0]) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6.propertyId);
|
|
67242
67404
|
if (!hasProperty) {
|
|
67243
67405
|
console.warn("[WS] onSubmit EXIT: invalid property", {
|
|
67244
67406
|
cpt: combinedData === null || combinedData === void 0 ? void 0 : combinedData.cpt,
|
|
@@ -67250,7 +67412,7 @@ const OLDApplication = () => {
|
|
|
67250
67412
|
});
|
|
67251
67413
|
return;
|
|
67252
67414
|
}
|
|
67253
|
-
if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt2 = combinedData.cpt) !== null && _combinedData$cpt2 !== void 0 && _combinedData$cpt2.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$
|
|
67415
|
+
if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt2 = combinedData.cpt) !== null && _combinedData$cpt2 !== void 0 && _combinedData$cpt2.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop7 = propertyDetails.Properties) !== null && _propertyDetails$Prop7 !== void 0 && _propertyDetails$Prop7[0])) {
|
|
67254
67416
|
var _combinedData$cpt3;
|
|
67255
67417
|
if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt3 = combinedData.cpt) !== null && _combinedData$cpt3 !== void 0 && _combinedData$cpt3.details) || !propertyDetails) {
|
|
67256
67418
|
console.warn("[WS] onSubmit EXIT: invalid property", {
|
|
@@ -67266,13 +67428,15 @@ const OLDApplication = () => {
|
|
|
67266
67428
|
}
|
|
67267
67429
|
const djbData = (combinedData === null || combinedData === void 0 ? void 0 : combinedData.djbEmployee) || (combinedData === null || combinedData === void 0 ? void 0 : combinedData.additionalDetails);
|
|
67268
67430
|
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
67269
|
-
const
|
|
67270
|
-
|
|
67271
|
-
|
|
67272
|
-
|
|
67273
|
-
|
|
67274
|
-
|
|
67275
|
-
|
|
67431
|
+
const findDjbDocInSubmit = docs => {
|
|
67432
|
+
if (!Array.isArray(docs)) return null;
|
|
67433
|
+
const found = docs.find(d => {
|
|
67434
|
+
var _d$documentType3;
|
|
67435
|
+
return ((d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType3 = d.documentType) === null || _d$documentType3 === void 0 ? void 0 : _d$documentType3.includes("DJB_EMPLOYEE_ID"))) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file) || (d === null || d === void 0 ? void 0 : d.filestoreId));
|
|
67436
|
+
});
|
|
67437
|
+
return found ? found.fileStoreId || found.file || found.filestoreId : null;
|
|
67438
|
+
};
|
|
67439
|
+
const djbDoc = (djbData === null || djbData === void 0 ? void 0 : (_djbData$document3 = djbData.document) === null || _djbData$document3 === void 0 ? void 0 : _djbData$document3.fileStoreId) || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && (djbData === null || djbData === void 0 ? void 0 : djbData.document.trim()) || (djbData === null || djbData === void 0 ? void 0 : djbData.document) || findDjbDocInSubmit(combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$Documen = combinedData.DocumentsRequired) === null || _combinedData$Documen === void 0 ? void 0 : _combinedData$Documen.documents) || findDjbDocInSubmit(combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$documen = combinedData.documents) === null || _combinedData$documen === void 0 ? void 0 : _combinedData$documen.documents) || findDjbDocInSubmit(combinedData === null || combinedData === void 0 ? void 0 : combinedData.documents) || findDjbDocInSubmit((_formDataRef$current26 = formDataRef.current) === null || _formDataRef$current26 === void 0 ? void 0 : (_formDataRef$current27 = _formDataRef$current26.DocumentsRequired) === null || _formDataRef$current27 === void 0 ? void 0 : _formDataRef$current27.documents) || findDjbDocInSubmit((_formDataRef$current28 = formDataRef.current) === null || _formDataRef$current28 === void 0 ? void 0 : (_formDataRef$current29 = _formDataRef$current28.documents) === null || _formDataRef$current29 === void 0 ? void 0 : _formDataRef$current29.documents) || findDjbDocInSubmit((_formDataRef$current30 = formDataRef.current) === null || _formDataRef$current30 === void 0 ? void 0 : _formDataRef$current30.documents);
|
|
67276
67440
|
const isDjbEmpInvalid = isDjbEmp && (!(djbData !== null && djbData !== void 0 && djbData.employeeId) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.employeeId).trim() || !(djbData !== null && djbData !== void 0 && djbData.designation) || !String(djbData === null || djbData === void 0 ? void 0 : djbData.designation).trim() || !djbDoc);
|
|
67277
67441
|
if (isDjbEmpInvalid) {
|
|
67278
67442
|
setShowToast({
|
|
@@ -67283,7 +67447,7 @@ const OLDApplication = () => {
|
|
|
67283
67447
|
}
|
|
67284
67448
|
const rwhSubmitData = (combinedData === null || combinedData === void 0 ? void 0 : combinedData.rainWaterHarvesting) || (combinedData === null || combinedData === void 0 ? void 0 : combinedData.additionalDetails);
|
|
67285
67449
|
const isRwhSubmitRequired = (rwhSubmitData === null || rwhSubmitData === void 0 ? void 0 : rwhSubmitData.hasCertificate) === true || String(rwhSubmitData === null || rwhSubmitData === void 0 ? void 0 : rwhSubmitData.hasCertificate) === "true" || (rwhSubmitData === null || rwhSubmitData === void 0 ? void 0 : rwhSubmitData.isRainwaterHarvesting) === true || String(rwhSubmitData === null || rwhSubmitData === void 0 ? void 0 : rwhSubmitData.isRainwaterHarvesting) === "true";
|
|
67286
|
-
const allSubmitDocs = (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$
|
|
67450
|
+
const allSubmitDocs = (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$Documen2 = combinedData.DocumentsRequired) === null || _combinedData$Documen2 === void 0 ? void 0 : _combinedData$Documen2.documents) || (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$documen2 = combinedData.documents) === null || _combinedData$documen2 === void 0 ? void 0 : _combinedData$documen2.documents) || (combinedData === null || combinedData === void 0 ? void 0 : combinedData.documents) || ((_formDataRef$current31 = formDataRef.current) === null || _formDataRef$current31 === void 0 ? void 0 : (_formDataRef$current32 = _formDataRef$current31.DocumentsRequired) === null || _formDataRef$current32 === void 0 ? void 0 : _formDataRef$current32.documents) || ((_formDataRef$current33 = formDataRef.current) === null || _formDataRef$current33 === void 0 ? void 0 : (_formDataRef$current34 = _formDataRef$current33.documents) === null || _formDataRef$current34 === void 0 ? void 0 : _formDataRef$current34.documents) || ((_formDataRef$current35 = formDataRef.current) === null || _formDataRef$current35 === void 0 ? void 0 : _formDataRef$current35.documents) || [];
|
|
67287
67451
|
const isRwhSubmitDocUploaded = Array.isArray(allSubmitDocs) && allSubmitDocs.some(d => isRwhDoc(d) && ((d === null || d === void 0 ? void 0 : d.fileStoreId) || (d === null || d === void 0 ? void 0 : d.file)));
|
|
67288
67452
|
if (isRwhSubmitRequired && !isRwhSubmitDocUploaded) {
|
|
67289
67453
|
setShowToast({
|
|
@@ -67302,7 +67466,7 @@ const OLDApplication = () => {
|
|
|
67302
67466
|
};
|
|
67303
67467
|
const processSubmission = function (data) {
|
|
67304
67468
|
try {
|
|
67305
|
-
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$
|
|
67469
|
+
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;
|
|
67306
67470
|
const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
|
|
67307
67471
|
if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
|
|
67308
67472
|
data.useDetails = {
|
|
@@ -67345,16 +67509,16 @@ const OLDApplication = () => {
|
|
|
67345
67509
|
if (data !== null && data !== void 0 && (_data$DocumentsRequir = data.DocumentsRequired) !== null && _data$DocumentsRequir !== void 0 && _data$DocumentsRequir.documents) {
|
|
67346
67510
|
const docs = data.DocumentsRequired.documents;
|
|
67347
67511
|
const identityDoc = docs.find(d => {
|
|
67348
|
-
var _d$
|
|
67349
|
-
return d === null || d === void 0 ? void 0 : (_d$
|
|
67512
|
+
var _d$documentType4;
|
|
67513
|
+
return d === null || d === void 0 ? void 0 : (_d$documentType4 = d.documentType) === null || _d$documentType4 === void 0 ? void 0 : _d$documentType4.includes("IDENTITYPROOF");
|
|
67350
67514
|
});
|
|
67351
67515
|
const ownershipDoc = docs.find(d => {
|
|
67352
|
-
var _d$
|
|
67353
|
-
return (d === null || d === void 0 ? void 0 : (_d$
|
|
67516
|
+
var _d$documentType5, _d$documentType6;
|
|
67517
|
+
return (d === null || d === void 0 ? void 0 : (_d$documentType5 = d.documentType) === null || _d$documentType5 === void 0 ? void 0 : _d$documentType5.includes("ADDRESSPROOF")) || (d === null || d === void 0 ? void 0 : (_d$documentType6 = d.documentType) === null || _d$documentType6 === void 0 ? void 0 : _d$documentType6.includes("OWNERSHIPPROOF"));
|
|
67354
67518
|
});
|
|
67355
67519
|
const otherDoc = docs.find(d => {
|
|
67356
|
-
var _d$
|
|
67357
|
-
return d === null || d === void 0 ? void 0 : (_d$
|
|
67520
|
+
var _d$documentType7;
|
|
67521
|
+
return d === null || d === void 0 ? void 0 : (_d$documentType7 = d.documentType) === null || _d$documentType7 === void 0 ? void 0 : _d$documentType7.includes("OTHERDOCUMENTS");
|
|
67358
67522
|
});
|
|
67359
67523
|
data.documents = {
|
|
67360
67524
|
documents: docs,
|
|
@@ -67364,11 +67528,11 @@ const OLDApplication = () => {
|
|
|
67364
67528
|
};
|
|
67365
67529
|
}
|
|
67366
67530
|
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 => {
|
|
67367
|
-
var _d$
|
|
67368
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$
|
|
67531
|
+
var _d$documentType8;
|
|
67532
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType8 = d.documentType) === null || _d$documentType8 === void 0 ? void 0 : _d$documentType8.includes("DJB_EMPLOYEE_ID"));
|
|
67369
67533
|
})) === null || _data$DocumentsRequir4 === void 0 ? void 0 : _data$DocumentsRequir4.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$documents = data.documents) === null || _data$documents === void 0 ? void 0 : (_data$documents$docum = _data$documents.documents) === null || _data$documents$docum === void 0 ? void 0 : (_data$documents$docum2 = _data$documents$docum.find(d => {
|
|
67370
|
-
var _d$
|
|
67371
|
-
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$
|
|
67534
|
+
var _d$documentType9;
|
|
67535
|
+
return (d === null || d === void 0 ? void 0 : d.documentType) === "OWNER.DJB_EMPLOYEE_ID" || (d === null || d === void 0 ? void 0 : (_d$documentType9 = d.documentType) === null || _d$documentType9 === void 0 ? void 0 : _d$documentType9.includes("DJB_EMPLOYEE_ID"));
|
|
67372
67536
|
})) === null || _data$documents$docum2 === void 0 ? void 0 : _data$documents$docum2.fileStoreId);
|
|
67373
67537
|
if (djbDoc) {
|
|
67374
67538
|
if (!data.djbEmployee) data.djbEmployee = {};
|
|
@@ -67401,6 +67565,13 @@ const OLDApplication = () => {
|
|
|
67401
67565
|
var _data$declarationData, _data$declarationData2, _data$declarationData3, _data$declarationData4, _data$declarationData5, _data$declarationData6, _data$declarationData7, _data$declarationData8, _data$declarationData9, _data$declarationData0, _data$declarationData1, _data$declarationData10, _data$declarationData11, _data$declarationData12, _data$declarationData13, _data$declarationData14, _data$declarationData15;
|
|
67402
67566
|
const declarations = (_data$declarationData = data.declarationData) !== null && _data$declarationData !== void 0 && _data$declarationData.agree ? true : false;
|
|
67403
67567
|
const sigFsId = ((_data$declarationData2 = data.declarationData) === null || _data$declarationData2 === void 0 ? void 0 : _data$declarationData2.signatureFileStoreId) || ((_data$declarationData3 = data.declarationData) === null || _data$declarationData3 === void 0 ? void 0 : (_data$declarationData4 = _data$declarationData3.signatureFile) === null || _data$declarationData4 === void 0 ? void 0 : _data$declarationData4.fileStoreId) || (typeof ((_data$declarationData5 = data.declarationData) === null || _data$declarationData5 === void 0 ? void 0 : _data$declarationData5.signatureFile) === "string" ? (_data$declarationData6 = data.declarationData) === null || _data$declarationData6 === void 0 ? void 0 : _data$declarationData6.signatureFile : null) || ((_data$declarationData7 = data.declarationData) === null || _data$declarationData7 === void 0 ? void 0 : _data$declarationData7.signature) || null;
|
|
67568
|
+
if (!sigFsId) {
|
|
67569
|
+
setShowToast({
|
|
67570
|
+
key: "error",
|
|
67571
|
+
message: t("ERR_SIGNATURE_MANDATORY") || "Signature is mandatory to submit application"
|
|
67572
|
+
});
|
|
67573
|
+
return Promise.resolve();
|
|
67574
|
+
}
|
|
67404
67575
|
const sigFileName = ((_data$declarationData8 = data.declarationData) === null || _data$declarationData8 === void 0 ? void 0 : _data$declarationData8.signatureFileName) || ((_data$declarationData9 = data.declarationData) === null || _data$declarationData9 === void 0 ? void 0 : (_data$declarationData0 = _data$declarationData9.signatureFile) === null || _data$declarationData0 === void 0 ? void 0 : _data$declarationData0.name) || ((_data$declarationData1 = data.declarationData) === null || _data$declarationData1 === void 0 ? void 0 : (_data$declarationData10 = _data$declarationData1.signatureFile) === null || _data$declarationData10 === void 0 ? void 0 : _data$declarationData10.fileName) || "signature.png";
|
|
67405
67576
|
data.declaration = {
|
|
67406
67577
|
...data.declarationData,
|
|
@@ -67438,9 +67609,9 @@ const OLDApplication = () => {
|
|
|
67438
67609
|
};
|
|
67439
67610
|
}
|
|
67440
67611
|
if (!(data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && _data$cpt.details)) {
|
|
67441
|
-
var _propertyDetails$
|
|
67612
|
+
var _propertyDetails$Prop8;
|
|
67442
67613
|
data.cpt = {
|
|
67443
|
-
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$
|
|
67614
|
+
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop8 = propertyDetails.Properties) === null || _propertyDetails$Prop8 === void 0 ? void 0 : _propertyDetails$Prop8[0]
|
|
67444
67615
|
};
|
|
67445
67616
|
}
|
|
67446
67617
|
data.channel = ((_Digit$UserService$ge2 = Digit.UserService.getType()) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER";
|
|
@@ -67456,7 +67627,7 @@ const OLDApplication = () => {
|
|
|
67456
67627
|
code: "NONPTPRESSURE"
|
|
67457
67628
|
},
|
|
67458
67629
|
categoryType: (connDetail === null || connDetail === void 0 ? void 0 : connDetail.categoryType) || {
|
|
67459
|
-
code: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : (_data$ConnectionHolde2 = _data$ConnectionHolde[0]) === null || _data$ConnectionHolde2 === void 0 ? void 0 : (_data$ConnectionHolde3 = _data$ConnectionHolde2.ownerType) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4[0]) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.ownerType) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$
|
|
67630
|
+
code: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde = data.ConnectionHolderDetails) === null || _data$ConnectionHolde === void 0 ? void 0 : (_data$ConnectionHolde2 = _data$ConnectionHolde[0]) === null || _data$ConnectionHolde2 === void 0 ? void 0 : (_data$ConnectionHolde3 = _data$ConnectionHolde2.ownerType) === null || _data$ConnectionHolde3 === void 0 ? void 0 : _data$ConnectionHolde3.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde4 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde4 === void 0 ? void 0 : (_data$ConnectionHolde5 = _data$ConnectionHolde4[0]) === null || _data$ConnectionHolde5 === void 0 ? void 0 : _data$ConnectionHolde5.ownerType) || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop9 = propertyDetails.Properties) === null || _propertyDetails$Prop9 === void 0 ? void 0 : (_propertyDetails$Prop0 = _propertyDetails$Prop9[0]) === null || _propertyDetails$Prop0 === void 0 ? void 0 : (_propertyDetails$Prop1 = _propertyDetails$Prop0.owners) === null || _propertyDetails$Prop1 === void 0 ? void 0 : (_propertyDetails$Prop10 = _propertyDetails$Prop1[0]) === null || _propertyDetails$Prop10 === void 0 ? void 0 : _propertyDetails$Prop10.ownerType) || "NONE"
|
|
67460
67631
|
},
|
|
67461
67632
|
domesticType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.domesticType,
|
|
67462
67633
|
departmentType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.departmentType,
|
|
@@ -67613,6 +67784,13 @@ const OLDApplication = () => {
|
|
|
67613
67784
|
if (isEnableLoader || isLoading) {
|
|
67614
67785
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
67615
67786
|
}
|
|
67787
|
+
const handleEdit = () => {
|
|
67788
|
+
setShowCheckPage(false);
|
|
67789
|
+
window.scrollTo({
|
|
67790
|
+
top: 0,
|
|
67791
|
+
behavior: "smooth"
|
|
67792
|
+
});
|
|
67793
|
+
};
|
|
67616
67794
|
if (showCheckPage) {
|
|
67617
67795
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
67618
67796
|
className: "employee-form-section-wrapper"
|
|
@@ -67623,7 +67801,7 @@ const OLDApplication = () => {
|
|
|
67623
67801
|
}), /*#__PURE__*/React.createElement(CheckPage$4, {
|
|
67624
67802
|
data: formDataRef.current || sessionFormData,
|
|
67625
67803
|
onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
|
|
67626
|
-
onEdit:
|
|
67804
|
+
onEdit: handleEdit
|
|
67627
67805
|
})));
|
|
67628
67806
|
}
|
|
67629
67807
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|