@djb25/digit-ui-module-ws 1.0.105 → 1.0.107
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 +1041 -412
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1041 -412
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -759,25 +759,25 @@ const updatePayloadOfWS = function (data, type) {
|
|
|
759
759
|
}
|
|
760
760
|
};
|
|
761
761
|
const getAllDocumentsForUpdate = data => {
|
|
762
|
-
var _data$documents5, _data$
|
|
762
|
+
var _data$documents5, _data$governmentEmplo5;
|
|
763
763
|
let allDocuments = Array.isArray(data === null || data === void 0 ? void 0 : (_data$documents5 = data.documents) === null || _data$documents5 === void 0 ? void 0 : _data$documents5.documents) ? [...data.documents.documents] : Array.isArray(data === null || data === void 0 ? void 0 : data.documents) ? [...data.documents] : [];
|
|
764
|
-
if (data !== null && data !== void 0 &&
|
|
765
|
-
var _data$djbEmployee7;
|
|
766
|
-
const isDjbEmp = String(data === null || data === void 0 ? void 0 : (_data$djbEmployee7 = data.djbEmployee) === null || _data$djbEmployee7 === void 0 ? void 0 : _data$djbEmployee7.isDjbEmployee) ===
|
|
764
|
+
if (data !== null && data !== void 0 && data.djbEmployee) {
|
|
765
|
+
var _data$djbEmployee6, _data$djbEmployee7, _data$djbEmployee8;
|
|
766
|
+
const isDjbEmp = String(data === null || data === void 0 ? void 0 : (_data$djbEmployee6 = data.djbEmployee) === null || _data$djbEmployee6 === void 0 ? void 0 : _data$djbEmployee6.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee7 = data.djbEmployee) === null || _data$djbEmployee7 === void 0 ? void 0 : _data$djbEmployee7.isDjbEmployee) === true;
|
|
767
767
|
let existingIndex = allDocuments.findIndex(doc => doc.documentType === "OWNER.DJB_EMPLOYEE_ID");
|
|
768
|
-
if (isDjbEmp) {
|
|
768
|
+
if (isDjbEmp && data !== null && data !== void 0 && (_data$djbEmployee8 = data.djbEmployee) !== null && _data$djbEmployee8 !== void 0 && _data$djbEmployee8.document) {
|
|
769
769
|
if (existingIndex !== -1) {
|
|
770
|
-
var _data$
|
|
770
|
+
var _data$djbEmployee9, _data$djbEmployee9$do, _data$djbEmployee0;
|
|
771
771
|
allDocuments[existingIndex] = {
|
|
772
772
|
...allDocuments[existingIndex],
|
|
773
|
-
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$
|
|
773
|
+
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$djbEmployee9 = data.djbEmployee) === null || _data$djbEmployee9 === void 0 ? void 0 : (_data$djbEmployee9$do = _data$djbEmployee9.document) === null || _data$djbEmployee9$do === void 0 ? void 0 : _data$djbEmployee9$do.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee0 = data.djbEmployee) === null || _data$djbEmployee0 === void 0 ? void 0 : _data$djbEmployee0.document),
|
|
774
774
|
status: "ACTIVE"
|
|
775
775
|
};
|
|
776
776
|
} else {
|
|
777
|
-
var _data$
|
|
777
|
+
var _data$djbEmployee1, _data$djbEmployee1$do, _data$djbEmployee10;
|
|
778
778
|
allDocuments.push({
|
|
779
779
|
documentType: "OWNER.DJB_EMPLOYEE_ID",
|
|
780
|
-
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$
|
|
780
|
+
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$djbEmployee1 = data.djbEmployee) === null || _data$djbEmployee1 === void 0 ? void 0 : (_data$djbEmployee1$do = _data$djbEmployee1.document) === null || _data$djbEmployee1$do === void 0 ? void 0 : _data$djbEmployee1$do.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee10 = data.djbEmployee) === null || _data$djbEmployee10 === void 0 ? void 0 : _data$djbEmployee10.document),
|
|
781
781
|
documentUid: "",
|
|
782
782
|
status: "ACTIVE"
|
|
783
783
|
});
|
|
@@ -832,11 +832,28 @@ const getAllDocumentsForUpdate = data => {
|
|
|
832
832
|
return allDocuments;
|
|
833
833
|
};
|
|
834
834
|
const convertToWSUpdate = data => {
|
|
835
|
-
var _data$WaterConnection, _data$WaterConnection2, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
|
|
835
|
+
var _data$WaterConnection, _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$djbEmployee11, _data$djbEmployee12, _data$djbEmployee13, _data$djbEmployee14, _data$djbEmployee15, _data$djbEmployee16, _data$djbEmployee17, _data$djbEmployee18, _data$djbEmployee19, _data$djbEmployee20, _data$djbEmployee21, _data$djbEmployee22, _data$djbEmployee23, _data$djbEmployee24, _data$djbEmployee24$d, _data$djbEmployee25, _data$disability2, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
|
|
836
836
|
let formdata = {
|
|
837
837
|
WaterConnection: {
|
|
838
838
|
...(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnectionResult) === null || _data$WaterConnection === void 0 ? void 0 : (_data$WaterConnection2 = _data$WaterConnection.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]),
|
|
839
839
|
documents: getAllDocumentsForUpdate(data),
|
|
840
|
+
additionalDetails: {
|
|
841
|
+
...((data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnectionResult) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3.WaterConnection) === null || _data$WaterConnection4 === void 0 ? void 0 : (_data$WaterConnection5 = _data$WaterConnection4[0]) === null || _data$WaterConnection5 === void 0 ? void 0 : _data$WaterConnection5.additionalDetails) || {}),
|
|
842
|
+
...((data === null || data === void 0 ? void 0 : data.additionalDetails) || {}),
|
|
843
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
844
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
845
|
+
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee11 = data.djbEmployee) === null || _data$djbEmployee11 === void 0 ? void 0 : _data$djbEmployee11.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee12 = data.djbEmployee) === null || _data$djbEmployee12 === void 0 ? void 0 : _data$djbEmployee12.isDjbEmployee) === true,
|
|
846
|
+
employeeId: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee13 = data.djbEmployee) === null || _data$djbEmployee13 === void 0 ? void 0 : _data$djbEmployee13.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee14 = data.djbEmployee) === null || _data$djbEmployee14 === void 0 ? void 0 : _data$djbEmployee14.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee15 = data.djbEmployee) === null || _data$djbEmployee15 === void 0 ? void 0 : _data$djbEmployee15.employeeId) || "" : "",
|
|
847
|
+
designation: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee16 = data.djbEmployee) === null || _data$djbEmployee16 === void 0 ? void 0 : _data$djbEmployee16.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee17 = data.djbEmployee) === null || _data$djbEmployee17 === void 0 ? void 0 : _data$djbEmployee17.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee18 = data.djbEmployee) === null || _data$djbEmployee18 === void 0 ? void 0 : _data$djbEmployee18.designation) || "" : "",
|
|
848
|
+
dor: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee19 = data.djbEmployee) === null || _data$djbEmployee19 === void 0 ? void 0 : _data$djbEmployee19.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee20 = data.djbEmployee) === null || _data$djbEmployee20 === void 0 ? void 0 : _data$djbEmployee20.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee21 = data.djbEmployee) === null || _data$djbEmployee21 === void 0 ? void 0 : _data$djbEmployee21.dor) || "" : "",
|
|
849
|
+
document: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee22 = data.djbEmployee) === null || _data$djbEmployee22 === void 0 ? void 0 : _data$djbEmployee22.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee23 = data.djbEmployee) === null || _data$djbEmployee23 === void 0 ? void 0 : _data$djbEmployee23.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee24 = data.djbEmployee) === null || _data$djbEmployee24 === void 0 ? void 0 : (_data$djbEmployee24$d = _data$djbEmployee24.document) === null || _data$djbEmployee24$d === void 0 ? void 0 : _data$djbEmployee24$d.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee25 = data.djbEmployee) === null || _data$djbEmployee25 === void 0 ? void 0 : _data$djbEmployee25.document) || "" : ""
|
|
850
|
+
} : {}),
|
|
851
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
852
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
853
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability2 = data.disability) !== null && _data$disability2 !== void 0 && _data$disability2.isDivyangjan)
|
|
854
|
+
} : {}),
|
|
855
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
856
|
+
},
|
|
840
857
|
processInstance: {
|
|
841
858
|
action: "SUBMIT_APPLICATION"
|
|
842
859
|
}
|
|
@@ -846,8 +863,8 @@ const convertToWSUpdate = data => {
|
|
|
846
863
|
return formdata;
|
|
847
864
|
};
|
|
848
865
|
const convertToEditWSUpdate = data => {
|
|
849
|
-
var _data$
|
|
850
|
-
let waterResult = data === null || data === void 0 ? void 0 : (_data$
|
|
866
|
+
var _data$WaterConnection6, _data$WaterConnection7, _data$additionalDetai3, _data$additionalDetai4, _waterResult$addition, _data$ConnectionDetai3, _data$ConnectionDetai4, _data$ConnectionDetai5, _data$ConnectionDetai6, _data$ConnectionDetai7, _data$additionalDetai5, _waterResult$addition2, _data$ConnectionDetai8, _data$ConnectionDetai9, _data$additionalDetai6, _waterResult$addition3, _data$djbEmployee26, _data$djbEmployee27, _data$djbEmployee28, _data$djbEmployee29, _data$djbEmployee30, _data$djbEmployee31, _data$djbEmployee32, _data$djbEmployee33, _data$djbEmployee34, _data$djbEmployee35, _data$djbEmployee36, _data$djbEmployee37, _data$djbEmployee38, _data$djbEmployee39, _data$djbEmployee39$d, _data$djbEmployee40, _data$disability3, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$ConnectionHolde8, _data$ConnectionHolde9, _data$ConnectionHolde0, _data$ConnectionHolde1, _data$ConnectionHolde10, _data$ConnectionHolde11, _data$ConnectionHolde12, _data$ConnectionHolde13, _data$ConnectionHolde14, _data$ConnectionHolde15, _data$ConnectionHolde16, _data$ConnectionHolde17, _data$ConnectionHolde18, _data$ConnectionHolde19, _data$ConnectionHolde20, _data$ConnectionHolde21, _data$ConnectionHolde22, _data$ConnectionHolde23, _data$ConnectionHolde24, _data$ConnectionHolde25, _data$ConnectionHolde26, _data$ConnectionHolde27, _data$ConnectionHolde28, _Digit$UserService$ge2, _Digit$UserService$ge3, _Digit$UserService$ge4, _data$waterConectionD, _data$waterConectionD2, _data$waterConectionD3, _data$applicationType, _data$applicationType2, _data$serviceName, _waterResult$serviceN, _data$sewerageConnect, _data$sewerageConnect2, _Digit7, _Digit7$Customization, _Digit7$Customization2, _Digit8, _Digit8$Customization, _Digit8$Customization2;
|
|
867
|
+
let waterResult = data === null || data === void 0 ? void 0 : (_data$WaterConnection6 = data.WaterConnectionResult) === null || _data$WaterConnection6 === void 0 ? void 0 : (_data$WaterConnection7 = _data$WaterConnection6.WaterConnection) === null || _data$WaterConnection7 === void 0 ? void 0 : _data$WaterConnection7[0];
|
|
851
868
|
let formdata = {
|
|
852
869
|
WaterConnection: {
|
|
853
870
|
id: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.id : waterResult === null || waterResult === void 0 ? void 0 : waterResult.id,
|
|
@@ -867,9 +884,24 @@ const convertToEditWSUpdate = data => {
|
|
|
867
884
|
connectionCategory: null,
|
|
868
885
|
connectionType: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionType : waterResult === null || waterResult === void 0 ? void 0 : waterResult.connectionType) || null,
|
|
869
886
|
additionalDetails: {
|
|
887
|
+
...((waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails) || {}),
|
|
870
888
|
...(data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.additionalDetails : waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails),
|
|
871
|
-
|
|
872
|
-
|
|
889
|
+
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai3 = data.additionalDetails) === null || _data$additionalDetai3 === void 0 ? void 0 : _data$additionalDetai3.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai4 = data.additionalDetails) === null || _data$additionalDetai4 === void 0 ? void 0 : _data$additionalDetai4.CompletelySatisfied : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition = waterResult.additionalDetails) === null || _waterResult$addition === void 0 ? void 0 : _waterResult$addition.CompletelySatisfied,
|
|
890
|
+
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai3 = data.ConnectionDetails) === null || _data$ConnectionDetai3 === void 0 ? void 0 : (_data$ConnectionDetai4 = _data$ConnectionDetai3[0]) === null || _data$ConnectionDetai4 === void 0 ? void 0 : (_data$ConnectionDetai5 = _data$ConnectionDetai4.addressType) === null || _data$ConnectionDetai5 === void 0 ? void 0 : _data$ConnectionDetai5.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai6 = data.ConnectionDetails) === null || _data$ConnectionDetai6 === void 0 ? void 0 : (_data$ConnectionDetai7 = _data$ConnectionDetai6[0]) === null || _data$ConnectionDetai7 === void 0 ? void 0 : _data$ConnectionDetai7.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai5 = data.additionalDetails) === null || _data$additionalDetai5 === void 0 ? void 0 : _data$additionalDetai5.addressType : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition2 = waterResult.additionalDetails) === null || _waterResult$addition2 === void 0 ? void 0 : _waterResult$addition2.addressType) || "",
|
|
891
|
+
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai8 = data.ConnectionDetails) === null || _data$ConnectionDetai8 === void 0 ? void 0 : (_data$ConnectionDetai9 = _data$ConnectionDetai8[0]) === null || _data$ConnectionDetai9 === void 0 ? void 0 : _data$ConnectionDetai9.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai6 = data.additionalDetails) === null || _data$additionalDetai6 === void 0 ? void 0 : _data$additionalDetai6.completeAddress : waterResult === null || waterResult === void 0 ? void 0 : (_waterResult$addition3 = waterResult.additionalDetails) === null || _waterResult$addition3 === void 0 ? void 0 : _waterResult$addition3.completeAddress) || "",
|
|
892
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
893
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
894
|
+
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee26 = data.djbEmployee) === null || _data$djbEmployee26 === void 0 ? void 0 : _data$djbEmployee26.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee27 = data.djbEmployee) === null || _data$djbEmployee27 === void 0 ? void 0 : _data$djbEmployee27.isDjbEmployee) === true,
|
|
895
|
+
employeeId: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee28 = data.djbEmployee) === null || _data$djbEmployee28 === void 0 ? void 0 : _data$djbEmployee28.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee29 = data.djbEmployee) === null || _data$djbEmployee29 === void 0 ? void 0 : _data$djbEmployee29.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee30 = data.djbEmployee) === null || _data$djbEmployee30 === void 0 ? void 0 : _data$djbEmployee30.employeeId) || "" : "",
|
|
896
|
+
designation: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee31 = data.djbEmployee) === null || _data$djbEmployee31 === void 0 ? void 0 : _data$djbEmployee31.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee32 = data.djbEmployee) === null || _data$djbEmployee32 === void 0 ? void 0 : _data$djbEmployee32.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee33 = data.djbEmployee) === null || _data$djbEmployee33 === void 0 ? void 0 : _data$djbEmployee33.designation) || "" : "",
|
|
897
|
+
dor: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee34 = data.djbEmployee) === null || _data$djbEmployee34 === void 0 ? void 0 : _data$djbEmployee34.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee35 = data.djbEmployee) === null || _data$djbEmployee35 === void 0 ? void 0 : _data$djbEmployee35.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee36 = data.djbEmployee) === null || _data$djbEmployee36 === void 0 ? void 0 : _data$djbEmployee36.dor) || "" : "",
|
|
898
|
+
document: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee37 = data.djbEmployee) === null || _data$djbEmployee37 === void 0 ? void 0 : _data$djbEmployee37.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee38 = data.djbEmployee) === null || _data$djbEmployee38 === void 0 ? void 0 : _data$djbEmployee38.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee39 = data.djbEmployee) === null || _data$djbEmployee39 === void 0 ? void 0 : (_data$djbEmployee39$d = _data$djbEmployee39.document) === null || _data$djbEmployee39$d === void 0 ? void 0 : _data$djbEmployee39$d.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee40 = data.djbEmployee) === null || _data$djbEmployee40 === void 0 ? void 0 : _data$djbEmployee40.document) || "" : ""
|
|
899
|
+
} : {}),
|
|
900
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
901
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
902
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability3 = data.disability) !== null && _data$disability3 !== void 0 && _data$disability3.isDivyangjan)
|
|
903
|
+
} : {}),
|
|
904
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
873
905
|
},
|
|
874
906
|
auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : waterResult === null || waterResult === void 0 ? void 0 : waterResult.auditDetails,
|
|
875
907
|
processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
|
|
@@ -929,7 +961,7 @@ const convertToEditWSUpdate = data => {
|
|
|
929
961
|
return formdata;
|
|
930
962
|
};
|
|
931
963
|
const convertToEditSWUpdate = data => {
|
|
932
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$
|
|
964
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$additionalDetai7, _data$additionalDetai8, _SewerageResult$addit, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$additionalDetai9, _SewerageResult$addit2, _data$ConnectionDetai13, _data$ConnectionDetai14, _data$additionalDetai0, _SewerageResult$addit3, _data$djbEmployee41, _data$djbEmployee42, _data$djbEmployee43, _data$djbEmployee44, _data$djbEmployee45, _data$djbEmployee46, _data$djbEmployee47, _data$djbEmployee48, _data$djbEmployee49, _data$djbEmployee50, _data$djbEmployee51, _data$djbEmployee52, _data$djbEmployee53, _data$djbEmployee54, _data$djbEmployee54$d, _data$djbEmployee55, _data$disability4, _data$ConnectionHolde29, _data$ConnectionHolde30, _data$ConnectionHolde31, _data$ConnectionHolde32, _data$ConnectionHolde33, _data$ConnectionHolde34, _data$ConnectionHolde35, _data$ConnectionHolde36, _data$ConnectionHolde37, _data$ConnectionHolde38, _data$ConnectionHolde39, _data$ConnectionHolde40, _data$ConnectionHolde41, _data$ConnectionHolde42, _data$ConnectionHolde43, _data$ConnectionHolde44, _data$ConnectionHolde45, _data$ConnectionHolde46, _data$ConnectionHolde47, _data$ConnectionHolde48, _data$ConnectionHolde49, _data$ConnectionHolde50, _data$ConnectionHolde51, _data$ConnectionHolde52, _data$ConnectionHolde53, _data$ConnectionHolde54, _data$ConnectionHolde55, _data$ConnectionHolde56, _data$ConnectionHolde57, _Digit$UserService$ge5, _Digit$UserService$ge6, _Digit$UserService$ge7, _data$waterConectionD4, _data$waterConectionD5, _data$waterConectionD6, _data$applicationType3, _data$applicationType4, _data$serviceName2, _SewerageResult$servi, _data$sewerageConnect3, _data$sewerageConnect4, _Digit9, _Digit9$Customization, _Digit9$Customization2, _Digit0, _Digit0$Customization, _Digit0$Customization2;
|
|
933
965
|
let SewerageResult = data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnectionResult) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0];
|
|
934
966
|
let formdata = {
|
|
935
967
|
SewerageConnection: {
|
|
@@ -950,9 +982,24 @@ const convertToEditSWUpdate = data => {
|
|
|
950
982
|
connectionCategory: null,
|
|
951
983
|
connectionType: (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.connectionType : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.connectionType) || null,
|
|
952
984
|
additionalDetails: {
|
|
985
|
+
...((SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails) || {}),
|
|
953
986
|
...(data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.additionalDetails : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails),
|
|
954
|
-
|
|
955
|
-
|
|
987
|
+
CompletelySatisfied: (data === null || data === void 0 ? void 0 : (_data$additionalDetai7 = data.additionalDetails) === null || _data$additionalDetai7 === void 0 ? void 0 : _data$additionalDetai7.CompletelySatisfied) !== undefined ? data === null || data === void 0 ? void 0 : (_data$additionalDetai8 = data.additionalDetails) === null || _data$additionalDetai8 === void 0 ? void 0 : _data$additionalDetai8.CompletelySatisfied : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit = SewerageResult.additionalDetails) === null || _SewerageResult$addit === void 0 ? void 0 : _SewerageResult$addit.CompletelySatisfied,
|
|
988
|
+
addressType: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai0 = data.ConnectionDetails) === null || _data$ConnectionDetai0 === void 0 ? void 0 : (_data$ConnectionDetai1 = _data$ConnectionDetai0[0]) === null || _data$ConnectionDetai1 === void 0 ? void 0 : (_data$ConnectionDetai10 = _data$ConnectionDetai1.addressType) === null || _data$ConnectionDetai10 === void 0 ? void 0 : _data$ConnectionDetai10.code) || (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai11 = data.ConnectionDetails) === null || _data$ConnectionDetai11 === void 0 ? void 0 : (_data$ConnectionDetai12 = _data$ConnectionDetai11[0]) === null || _data$ConnectionDetai12 === void 0 ? void 0 : _data$ConnectionDetai12.addressType) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai9 = data.additionalDetails) === null || _data$additionalDetai9 === void 0 ? void 0 : _data$additionalDetai9.addressType : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit2 = SewerageResult.additionalDetails) === null || _SewerageResult$addit2 === void 0 ? void 0 : _SewerageResult$addit2.addressType) || "",
|
|
989
|
+
completeAddress: (data === null || data === void 0 ? void 0 : (_data$ConnectionDetai13 = data.ConnectionDetails) === null || _data$ConnectionDetai13 === void 0 ? void 0 : (_data$ConnectionDetai14 = _data$ConnectionDetai13[0]) === null || _data$ConnectionDetai14 === void 0 ? void 0 : _data$ConnectionDetai14.completeAddress) || (data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : (_data$additionalDetai0 = data.additionalDetails) === null || _data$additionalDetai0 === void 0 ? void 0 : _data$additionalDetai0.completeAddress : SewerageResult === null || SewerageResult === void 0 ? void 0 : (_SewerageResult$addit3 = SewerageResult.additionalDetails) === null || _SewerageResult$addit3 === void 0 ? void 0 : _SewerageResult$addit3.completeAddress) || "",
|
|
990
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
991
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
992
|
+
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee41 = data.djbEmployee) === null || _data$djbEmployee41 === void 0 ? void 0 : _data$djbEmployee41.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee42 = data.djbEmployee) === null || _data$djbEmployee42 === void 0 ? void 0 : _data$djbEmployee42.isDjbEmployee) === true,
|
|
993
|
+
employeeId: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee43 = data.djbEmployee) === null || _data$djbEmployee43 === void 0 ? void 0 : _data$djbEmployee43.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee44 = data.djbEmployee) === null || _data$djbEmployee44 === void 0 ? void 0 : _data$djbEmployee44.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee45 = data.djbEmployee) === null || _data$djbEmployee45 === void 0 ? void 0 : _data$djbEmployee45.employeeId) || "" : "",
|
|
994
|
+
designation: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee46 = data.djbEmployee) === null || _data$djbEmployee46 === void 0 ? void 0 : _data$djbEmployee46.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee47 = data.djbEmployee) === null || _data$djbEmployee47 === void 0 ? void 0 : _data$djbEmployee47.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee48 = data.djbEmployee) === null || _data$djbEmployee48 === void 0 ? void 0 : _data$djbEmployee48.designation) || "" : "",
|
|
995
|
+
dor: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee49 = data.djbEmployee) === null || _data$djbEmployee49 === void 0 ? void 0 : _data$djbEmployee49.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee50 = data.djbEmployee) === null || _data$djbEmployee50 === void 0 ? void 0 : _data$djbEmployee50.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee51 = data.djbEmployee) === null || _data$djbEmployee51 === void 0 ? void 0 : _data$djbEmployee51.dor) || "" : "",
|
|
996
|
+
document: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee52 = data.djbEmployee) === null || _data$djbEmployee52 === void 0 ? void 0 : _data$djbEmployee52.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee53 = data.djbEmployee) === null || _data$djbEmployee53 === void 0 ? void 0 : _data$djbEmployee53.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee54 = data.djbEmployee) === null || _data$djbEmployee54 === void 0 ? void 0 : (_data$djbEmployee54$d = _data$djbEmployee54.document) === null || _data$djbEmployee54$d === void 0 ? void 0 : _data$djbEmployee54$d.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee55 = data.djbEmployee) === null || _data$djbEmployee55 === void 0 ? void 0 : _data$djbEmployee55.document) || "" : ""
|
|
997
|
+
} : {}),
|
|
998
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
999
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
1000
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability4 = data.disability) !== null && _data$disability4 !== void 0 && _data$disability4.isDivyangjan)
|
|
1001
|
+
} : {}),
|
|
1002
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
956
1003
|
},
|
|
957
1004
|
auditDetails: data !== null && data !== void 0 && data.isEditApplication ? data === null || data === void 0 ? void 0 : data.auditDetails : SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.auditDetails,
|
|
958
1005
|
processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
|
|
@@ -1012,12 +1059,29 @@ const convertToEditSWUpdate = data => {
|
|
|
1012
1059
|
return formdata;
|
|
1013
1060
|
};
|
|
1014
1061
|
const convertToSWUpdate = data => {
|
|
1015
|
-
var _data$SewerageConnect3, _data$SewerageConnect4, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
|
|
1062
|
+
var _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$SewerageConnect6, _data$SewerageConnect7, _data$djbEmployee56, _data$djbEmployee57, _data$djbEmployee58, _data$djbEmployee59, _data$djbEmployee60, _data$djbEmployee61, _data$djbEmployee62, _data$djbEmployee63, _data$djbEmployee64, _data$djbEmployee65, _data$djbEmployee66, _data$djbEmployee67, _data$djbEmployee68, _data$djbEmployee69, _data$djbEmployee69$d, _data$djbEmployee70, _data$disability5, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
|
|
1016
1063
|
let formdata = {
|
|
1017
1064
|
SewerageConnection: {
|
|
1018
1065
|
...(data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnectionResult) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3.SewerageConnections) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4[0]),
|
|
1019
1066
|
connectionType: "Non Metered",
|
|
1020
1067
|
documents: getAllDocumentsForUpdate(data),
|
|
1068
|
+
additionalDetails: {
|
|
1069
|
+
...((data === null || data === void 0 ? void 0 : (_data$SewerageConnect5 = data.SewerageConnectionResult) === null || _data$SewerageConnect5 === void 0 ? void 0 : (_data$SewerageConnect6 = _data$SewerageConnect5.SewerageConnections) === null || _data$SewerageConnect6 === void 0 ? void 0 : (_data$SewerageConnect7 = _data$SewerageConnect6[0]) === null || _data$SewerageConnect7 === void 0 ? void 0 : _data$SewerageConnect7.additionalDetails) || {}),
|
|
1070
|
+
...((data === null || data === void 0 ? void 0 : data.additionalDetails) || {}),
|
|
1071
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
1072
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
1073
|
+
isDjbEmployee: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee56 = data.djbEmployee) === null || _data$djbEmployee56 === void 0 ? void 0 : _data$djbEmployee56.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee57 = data.djbEmployee) === null || _data$djbEmployee57 === void 0 ? void 0 : _data$djbEmployee57.isDjbEmployee) === true,
|
|
1074
|
+
employeeId: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee58 = data.djbEmployee) === null || _data$djbEmployee58 === void 0 ? void 0 : _data$djbEmployee58.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee59 = data.djbEmployee) === null || _data$djbEmployee59 === void 0 ? void 0 : _data$djbEmployee59.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee60 = data.djbEmployee) === null || _data$djbEmployee60 === void 0 ? void 0 : _data$djbEmployee60.employeeId) || "" : "",
|
|
1075
|
+
designation: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee61 = data.djbEmployee) === null || _data$djbEmployee61 === void 0 ? void 0 : _data$djbEmployee61.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee62 = data.djbEmployee) === null || _data$djbEmployee62 === void 0 ? void 0 : _data$djbEmployee62.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee63 = data.djbEmployee) === null || _data$djbEmployee63 === void 0 ? void 0 : _data$djbEmployee63.designation) || "" : "",
|
|
1076
|
+
dor: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee64 = data.djbEmployee) === null || _data$djbEmployee64 === void 0 ? void 0 : _data$djbEmployee64.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee65 = data.djbEmployee) === null || _data$djbEmployee65 === void 0 ? void 0 : _data$djbEmployee65.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee66 = data.djbEmployee) === null || _data$djbEmployee66 === void 0 ? void 0 : _data$djbEmployee66.dor) || "" : "",
|
|
1077
|
+
document: String(data === null || data === void 0 ? void 0 : (_data$djbEmployee67 = data.djbEmployee) === null || _data$djbEmployee67 === void 0 ? void 0 : _data$djbEmployee67.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : (_data$djbEmployee68 = data.djbEmployee) === null || _data$djbEmployee68 === void 0 ? void 0 : _data$djbEmployee68.isDjbEmployee) === true ? (data === null || data === void 0 ? void 0 : (_data$djbEmployee69 = data.djbEmployee) === null || _data$djbEmployee69 === void 0 ? void 0 : (_data$djbEmployee69$d = _data$djbEmployee69.document) === null || _data$djbEmployee69$d === void 0 ? void 0 : _data$djbEmployee69$d.fileStoreId) || (data === null || data === void 0 ? void 0 : (_data$djbEmployee70 = data.djbEmployee) === null || _data$djbEmployee70 === void 0 ? void 0 : _data$djbEmployee70.document) || "" : ""
|
|
1078
|
+
} : {}),
|
|
1079
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
1080
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
1081
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability5 = data.disability) !== null && _data$disability5 !== void 0 && _data$disability5.isDivyangjan)
|
|
1082
|
+
} : {}),
|
|
1083
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
1084
|
+
},
|
|
1021
1085
|
processInstance: {
|
|
1022
1086
|
action: "SUBMIT_APPLICATION"
|
|
1023
1087
|
}
|
|
@@ -9613,7 +9677,7 @@ const getWSAcknowledgementData$2 = function (amendment, tenantInfo, t, tableData
|
|
|
9613
9677
|
};
|
|
9614
9678
|
|
|
9615
9679
|
const Response = () => {
|
|
9616
|
-
var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$;
|
|
9680
|
+
var _state$Amendment, _data$Amendments, _data$Amendments$, _data$Amendments2, _data$Amendments2$, _data$Amendments3, _data$Amendments3$, _data$Amendments4, _data$Amendments4$;
|
|
9617
9681
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9618
9682
|
const {
|
|
9619
9683
|
state
|
|
@@ -9688,7 +9752,16 @@ const Response = () => {
|
|
|
9688
9752
|
justifyContent: "flex-end",
|
|
9689
9753
|
alignItems: "baseline"
|
|
9690
9754
|
}
|
|
9691
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
9755
|
+
}, (data === null || data === void 0 ? void 0 : (_data$Amendments4 = data.Amendments) === null || _data$Amendments4 === void 0 ? void 0 : (_data$Amendments4$ = _data$Amendments4[0]) === null || _data$Amendments4$ === void 0 ? void 0 : _data$Amendments4$.amendmentId) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
9756
|
+
label: t("CS_TITLE_GENERATE_NOTE"),
|
|
9757
|
+
onSubmit: () => {
|
|
9758
|
+
var _data$Amendments5, _data$Amendments5$;
|
|
9759
|
+
return history.push(`/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$Amendments5 = data.Amendments) === null || _data$Amendments5 === void 0 ? void 0 : (_data$Amendments5$ = _data$Amendments5[0]) === null || _data$Amendments5$ === void 0 ? void 0 : _data$Amendments5$.amendmentId}`);
|
|
9760
|
+
},
|
|
9761
|
+
style: {
|
|
9762
|
+
marginRight: "1rem"
|
|
9763
|
+
}
|
|
9764
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
9692
9765
|
label: t("CORE_COMMON_GO_TO_HOME"),
|
|
9693
9766
|
onSubmit: () => history.push(`/digit-ui/employee`),
|
|
9694
9767
|
style: {
|
|
@@ -11663,6 +11736,10 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
11663
11736
|
path: "/digit-ui/employee/ws/water/bill-amendment/inbox",
|
|
11664
11737
|
label: t("ES_COMMON_BILL_AMEND_WATER_INBOX_LABEL"),
|
|
11665
11738
|
show: location.pathname.includes("/water/bill-amendment/inbox") ? true : false
|
|
11739
|
+
}, {
|
|
11740
|
+
path: "/digit-ui/employee/ws/water/bill-amendment/search-application",
|
|
11741
|
+
label: t("WS_BILL_AMENDMENT_SEARCH_APPLICATION", "Search Bill Amendment"),
|
|
11742
|
+
show: location.pathname.includes("/bill-amendment/search-application") ? true : false
|
|
11666
11743
|
}, {
|
|
11667
11744
|
path: "/digit-ui/employee/ws/sewerage/bill-amendment/inbox",
|
|
11668
11745
|
label: t("ES_COMMON_BILL_AMEND_SEWERAGE_INBOX_LABEL"),
|
|
@@ -11915,7 +11992,7 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
11915
11992
|
}));
|
|
11916
11993
|
};
|
|
11917
11994
|
const App$1 = _ref2 => {
|
|
11918
|
-
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg;
|
|
11995
|
+
var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg, _Digit31, _Digit31$ComponentReg, _Digit32, _Digit32$ComponentReg;
|
|
11919
11996
|
let {
|
|
11920
11997
|
path
|
|
11921
11998
|
} = _ref2;
|
|
@@ -11994,6 +12071,7 @@ const App$1 = _ref2 => {
|
|
|
11994
12071
|
const CPTAcknowledgement = (_Digit29 = Digit) === null || _Digit29 === void 0 ? void 0 : (_Digit29$ComponentReg = _Digit29.ComponentRegistryService) === null || _Digit29$ComponentReg === void 0 ? void 0 : _Digit29$ComponentReg.getComponent("CPTAcknowledgement");
|
|
11995
12072
|
const WSInfoPage = (_Digit30 = Digit) === null || _Digit30 === void 0 ? void 0 : (_Digit30$ComponentReg = _Digit30.ComponentRegistryService) === null || _Digit30$ComponentReg === void 0 ? void 0 : _Digit30$ComponentReg.getComponent("WSInfoPage");
|
|
11996
12073
|
const WSExecuteDisconnection = (_Digit31 = Digit) === null || _Digit31 === void 0 ? void 0 : (_Digit31$ComponentReg = _Digit31.ComponentRegistryService) === null || _Digit31$ComponentReg === void 0 ? void 0 : _Digit31$ComponentReg.getComponent("WSExecuteDisconnection");
|
|
12074
|
+
const WSSearchBillAmendment = (_Digit32 = Digit) === null || _Digit32 === void 0 ? void 0 : (_Digit32$ComponentReg = _Digit32.ComponentRegistryService) === null || _Digit32$ComponentReg === void 0 ? void 0 : _Digit32$ComponentReg.getComponent("WSSearchBillAmendment");
|
|
11997
12075
|
const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/mutation-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/new-disconnection/k-number") || window.location.href.includes("/employee/ws/new-disconnection/consumer-details") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/execute-disconnection") || window.location.href.includes("/employee/ws/water/bulk-bill");
|
|
11998
12076
|
const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
|
|
11999
12077
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -12090,6 +12168,11 @@ const App$1 = _ref2 => {
|
|
|
12090
12168
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
12091
12169
|
path: `${path}/activate-connection`,
|
|
12092
12170
|
component: WSActivateConnection
|
|
12171
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
12172
|
+
path: `${path}/water/bill-amendment/search-application`,
|
|
12173
|
+
component: props => /*#__PURE__*/React__default.createElement(WSSearchBillAmendment, _extends({}, props, {
|
|
12174
|
+
parentRoute: path
|
|
12175
|
+
}))
|
|
12093
12176
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
12094
12177
|
path: `${path}/water/search-application`,
|
|
12095
12178
|
component: props => /*#__PURE__*/React__default.createElement(WSSearch, _extends({}, props, {
|
|
@@ -13069,8 +13152,64 @@ const createConnectionDetails = () => ({
|
|
|
13069
13152
|
addressType: "",
|
|
13070
13153
|
completeAddress: ""
|
|
13071
13154
|
});
|
|
13155
|
+
const getCptAddress = formData => {
|
|
13156
|
+
var _formData$cpt, _formData$cpt$details, _formData$property;
|
|
13157
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && (_formData$cpt$details = _formData$cpt.details) !== null && _formData$cpt$details !== void 0 && _formData$cpt$details.address) return formData.cpt.details.address;
|
|
13158
|
+
if (formData !== null && formData !== void 0 && (_formData$property = formData.property) !== null && _formData$property !== void 0 && _formData$property.address) return formData.property.address;
|
|
13159
|
+
if (formData !== null && formData !== void 0 && formData.propertyAddress) return formData.propertyAddress;
|
|
13160
|
+
try {
|
|
13161
|
+
const sessionPt = JSON.parse(sessionStorage.getItem("Digit_FSM_PT") || "{}");
|
|
13162
|
+
if (sessionPt !== null && sessionPt !== void 0 && sessionPt.address) return sessionPt.address;
|
|
13163
|
+
} catch (e) {}
|
|
13164
|
+
return null;
|
|
13165
|
+
};
|
|
13166
|
+
const getPropertyAddressString = (address, t) => {
|
|
13167
|
+
var _address$locality, _Digit$Utils, _Digit$Utils$pt, _Digit$Utils2, _Digit$Utils2$pt;
|
|
13168
|
+
if (!address) return "";
|
|
13169
|
+
if (typeof address === "string") return address;
|
|
13170
|
+
const parts = [];
|
|
13171
|
+
if (address !== null && address !== void 0 && address.doorNo) parts.push(address.doorNo);
|
|
13172
|
+
if (address !== null && address !== void 0 && address.buildingName) parts.push(address.buildingName);
|
|
13173
|
+
if (address !== null && address !== void 0 && address.street) parts.push(address.street);
|
|
13174
|
+
if (address !== null && address !== void 0 && address.landmark) parts.push(address.landmark);
|
|
13175
|
+
const tenantId = (address === null || address === void 0 ? void 0 : address.tenantId) || Digit.ULBService.getCurrentTenantId();
|
|
13176
|
+
const localityCode = (address === null || address === void 0 ? void 0 : (_address$locality = address.locality) === null || _address$locality === void 0 ? void 0 : _address$locality.code) || (typeof (address === null || address === void 0 ? void 0 : address.locality) === "string" ? address === null || address === void 0 ? void 0 : address.locality : null);
|
|
13177
|
+
let localityText = "";
|
|
13178
|
+
if (localityCode && (_Digit$Utils = Digit.Utils) !== null && _Digit$Utils !== void 0 && (_Digit$Utils$pt = _Digit$Utils.pt) !== null && _Digit$Utils$pt !== void 0 && _Digit$Utils$pt.getMohallaLocale) {
|
|
13179
|
+
const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
|
|
13180
|
+
localityText = t ? t(locLocale) : locLocale;
|
|
13181
|
+
}
|
|
13182
|
+
if (!localityText || localityText === localityCode) {
|
|
13183
|
+
var _address$locality2, _address$locality3;
|
|
13184
|
+
localityText = (address === null || address === void 0 ? void 0 : (_address$locality2 = address.locality) === null || _address$locality2 === void 0 ? void 0 : _address$locality2.name) || (address === null || address === void 0 ? void 0 : (_address$locality3 = address.locality) === null || _address$locality3 === void 0 ? void 0 : _address$locality3.code) || "";
|
|
13185
|
+
}
|
|
13186
|
+
if (localityText) parts.push(localityText);
|
|
13187
|
+
let cityText = "";
|
|
13188
|
+
if (tenantId && (_Digit$Utils2 = Digit.Utils) !== null && _Digit$Utils2 !== void 0 && (_Digit$Utils2$pt = _Digit$Utils2.pt) !== null && _Digit$Utils2$pt !== void 0 && _Digit$Utils2$pt.getCityLocale) {
|
|
13189
|
+
const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
|
|
13190
|
+
cityText = t ? t(cityLocale) : cityLocale;
|
|
13191
|
+
}
|
|
13192
|
+
if (!cityText || cityText === tenantId) {
|
|
13193
|
+
cityText = (address === null || address === void 0 ? void 0 : address.city) || tenantId || "";
|
|
13194
|
+
}
|
|
13195
|
+
if (cityText) parts.push(cityText);
|
|
13196
|
+
if (address !== null && address !== void 0 && address.pincode) {
|
|
13197
|
+
parts.push(address.pincode);
|
|
13198
|
+
}
|
|
13199
|
+
return parts.filter(Boolean).join(", ");
|
|
13200
|
+
};
|
|
13201
|
+
const getCleanAddressValue = val => {
|
|
13202
|
+
if (!val) return "";
|
|
13203
|
+
if (typeof val === "object") {
|
|
13204
|
+
const code = val.code || val.name || val.i18nKey || "";
|
|
13205
|
+
if (code.toUpperCase() === "PERMANENT" || code.toUpperCase() === "CORRESPONDENCE") return "";
|
|
13206
|
+
return code;
|
|
13207
|
+
}
|
|
13208
|
+
const str = String(val).trim();
|
|
13209
|
+
if (str.toUpperCase() === "PERMANENT" || str.toUpperCase() === "CORRESPONDENCE") return "";
|
|
13210
|
+
return str;
|
|
13211
|
+
};
|
|
13072
13212
|
const WSConnectionDetails = _ref => {
|
|
13073
|
-
var _formData$ConnectionD, _formData$ConnectionD2;
|
|
13074
13213
|
let {
|
|
13075
13214
|
config,
|
|
13076
13215
|
onSelect,
|
|
@@ -13086,10 +13225,32 @@ const WSConnectionDetails = _ref => {
|
|
|
13086
13225
|
const {
|
|
13087
13226
|
pathname
|
|
13088
13227
|
} = reactRouterDom.useLocation();
|
|
13089
|
-
const
|
|
13228
|
+
const cptAddrTop = getCptAddress(formData);
|
|
13229
|
+
const formattedPropertyAddressTop = getPropertyAddressString(cptAddrTop, t);
|
|
13230
|
+
const [connectionDetails, setConnectionDetails] = React.useState(() => {
|
|
13231
|
+
var _formData$ConnectionD;
|
|
13232
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : _formData$ConnectionD.length) > 0) {
|
|
13233
|
+
const initial = {
|
|
13234
|
+
...formData.ConnectionDetails[0]
|
|
13235
|
+
};
|
|
13236
|
+
if (!initial.addressType && formattedPropertyAddressTop) {
|
|
13237
|
+
initial.addressType = formattedPropertyAddressTop;
|
|
13238
|
+
}
|
|
13239
|
+
if (!initial.completeAddress && formattedPropertyAddressTop) {
|
|
13240
|
+
initial.completeAddress = formattedPropertyAddressTop;
|
|
13241
|
+
}
|
|
13242
|
+
return [initial];
|
|
13243
|
+
}
|
|
13244
|
+
const def = createConnectionDetails();
|
|
13245
|
+
if (formattedPropertyAddressTop) {
|
|
13246
|
+
def.addressType = formattedPropertyAddressTop;
|
|
13247
|
+
def.completeAddress = formattedPropertyAddressTop;
|
|
13248
|
+
}
|
|
13249
|
+
return [def];
|
|
13250
|
+
});
|
|
13090
13251
|
React.useEffect(() => {
|
|
13091
|
-
var _formData$
|
|
13092
|
-
if ((formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13252
|
+
var _formData$ConnectionD2;
|
|
13253
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD2 = formData.ConnectionDetails) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2.length) > 0) {
|
|
13093
13254
|
const incoming = formData.ConnectionDetails[0];
|
|
13094
13255
|
const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
|
|
13095
13256
|
if (!(current !== null && current !== void 0 && current.addressType) && incoming !== null && incoming !== void 0 && incoming.addressType || !(current !== null && current !== void 0 && current.completeAddress) && incoming !== null && incoming !== void 0 && incoming.completeAddress || !lodash.isEqual(current, incoming)) {
|
|
@@ -13237,7 +13398,7 @@ const WSConnectionDetails = _ref => {
|
|
|
13237
13398
|
}, commonProps))));
|
|
13238
13399
|
};
|
|
13239
13400
|
const ConnectionDetails = _props => {
|
|
13240
|
-
var _formData$
|
|
13401
|
+
var _formData$ConnectionD3, _formData$ConnectionD4, _formData$additionalD, _formData$additionalD2, _formData$additionalD3, _formData$additionalD4, _formData$ConnectionD5, _formData$ConnectionD6, _formData$additionalD5, _formData$additionalD6, _formData$additionalD7, _formData$additionalD8, _formData$cpt2, _formData$cpt2$detail, _formData$cpt2$detail2, _formData$cpt3, _formData$cpt3$detail, _formData$cpt5, _formData$cpt5$detail, _formData$cpt6, _formData$cpt6$detail, _formData$property2, _formData$DocumentsRe;
|
|
13241
13402
|
const {
|
|
13242
13403
|
connectionDetail,
|
|
13243
13404
|
focusIndex,
|
|
@@ -13262,64 +13423,14 @@ const ConnectionDetails = _props => {
|
|
|
13262
13423
|
formData,
|
|
13263
13424
|
userType
|
|
13264
13425
|
} = _props;
|
|
13265
|
-
const
|
|
13266
|
-
|
|
13267
|
-
|
|
13268
|
-
|
|
13269
|
-
|
|
13270
|
-
|
|
13271
|
-
|
|
13272
|
-
|
|
13273
|
-
const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : ownerPermAddress || formattedPropertyAddress;
|
|
13274
|
-
if (ownerPermAddress || ownerCorrAddress) {
|
|
13275
|
-
addresses = [{
|
|
13276
|
-
type: "PERMANENT",
|
|
13277
|
-
address: ownerPermAddress
|
|
13278
|
-
}, {
|
|
13279
|
-
type: "CORRESPONDENCE",
|
|
13280
|
-
address: ownerCorrAddress
|
|
13281
|
-
}];
|
|
13282
|
-
}
|
|
13283
|
-
}
|
|
13284
|
-
const getAddressTypeObj = val => {
|
|
13285
|
-
if (!val) return null;
|
|
13286
|
-
if (typeof val === "object") {
|
|
13287
|
-
const code = (val.code || val.i18nKey || "").toUpperCase();
|
|
13288
|
-
if (code === "CORRESPONDENCE") {
|
|
13289
|
-
return {
|
|
13290
|
-
i18nKey: "Correspondence",
|
|
13291
|
-
code: "CORRESPONDENCE"
|
|
13292
|
-
};
|
|
13293
|
-
}
|
|
13294
|
-
return {
|
|
13295
|
-
i18nKey: "Permanent",
|
|
13296
|
-
code: "PERMANENT"
|
|
13297
|
-
};
|
|
13298
|
-
}
|
|
13299
|
-
const str = String(val).toUpperCase();
|
|
13300
|
-
if (str === "CORRESPONDENCE") {
|
|
13301
|
-
return {
|
|
13302
|
-
i18nKey: "Correspondence",
|
|
13303
|
-
code: "CORRESPONDENCE"
|
|
13304
|
-
};
|
|
13305
|
-
}
|
|
13306
|
-
if (str === "PERMANENT") {
|
|
13307
|
-
return {
|
|
13308
|
-
i18nKey: "Permanent",
|
|
13309
|
-
code: "PERMANENT"
|
|
13310
|
-
};
|
|
13311
|
-
}
|
|
13312
|
-
return {
|
|
13313
|
-
i18nKey: val,
|
|
13314
|
-
code: val
|
|
13315
|
-
};
|
|
13316
|
-
};
|
|
13317
|
-
const initialAddressType = getAddressTypeObj((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD4 = formData.ConnectionDetails) === null || _formData$ConnectionD4 === void 0 ? void 0 : (_formData$ConnectionD5 = _formData$ConnectionD4[0]) === null || _formData$ConnectionD5 === void 0 ? void 0 : _formData$ConnectionD5.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : (_formData$additionalD3 = _formData$additionalD2.ConnectionDetails) === null || _formData$additionalD3 === void 0 ? void 0 : (_formData$additionalD4 = _formData$additionalD3[0]) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.addressType) || (formData === null || formData === void 0 ? void 0 : formData.addressType)) || "";
|
|
13318
|
-
let initialCompleteAddress = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD6 = formData.ConnectionDetails) === null || _formData$ConnectionD6 === void 0 ? void 0 : (_formData$ConnectionD7 = _formData$ConnectionD6[0]) === null || _formData$ConnectionD7 === void 0 ? void 0 : _formData$ConnectionD7.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : (_formData$additionalD7 = _formData$additionalD6.ConnectionDetails) === null || _formData$additionalD7 === void 0 ? void 0 : (_formData$additionalD8 = _formData$additionalD7[0]) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.completeAddress) || (formData === null || formData === void 0 ? void 0 : formData.completeAddress) || "";
|
|
13319
|
-
if (!initialCompleteAddress && initialAddressType !== null && initialAddressType !== void 0 && initialAddressType.code && ((_addresses = addresses) === null || _addresses === void 0 ? void 0 : _addresses.length) > 0) {
|
|
13320
|
-
const matchedAddr = addresses.find(a => a.type === initialAddressType.code) || {};
|
|
13321
|
-
initialCompleteAddress = matchedAddr.houseNumber || matchedAddr.city || matchedAddr.pinCode ? [matchedAddr.houseNumber, matchedAddr.address, matchedAddr.city, matchedAddr.pinCode].filter(Boolean).join(", ") : matchedAddr.address || "";
|
|
13322
|
-
}
|
|
13426
|
+
const cptAddr = getCptAddress(formData);
|
|
13427
|
+
const formattedPropertyAddress = getPropertyAddressString(cptAddr, t);
|
|
13428
|
+
const rawAddressType = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD3 = formData.ConnectionDetails) === null || _formData$ConnectionD3 === void 0 ? void 0 : (_formData$ConnectionD4 = _formData$ConnectionD3[0]) === null || _formData$ConnectionD4 === void 0 ? void 0 : _formData$ConnectionD4.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.addressType) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : (_formData$additionalD3 = _formData$additionalD2.ConnectionDetails) === null || _formData$additionalD3 === void 0 ? void 0 : (_formData$additionalD4 = _formData$additionalD3[0]) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.addressType) || (formData === null || formData === void 0 ? void 0 : formData.addressType);
|
|
13429
|
+
const rawCompleteAddress = (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD5 = formData.ConnectionDetails) === null || _formData$ConnectionD5 === void 0 ? void 0 : (_formData$ConnectionD6 = _formData$ConnectionD5[0]) === null || _formData$ConnectionD6 === void 0 ? void 0 : _formData$ConnectionD6.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.completeAddress) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : (_formData$additionalD7 = _formData$additionalD6.ConnectionDetails) === null || _formData$additionalD7 === void 0 ? void 0 : (_formData$additionalD8 = _formData$additionalD7[0]) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.completeAddress) || (formData === null || formData === void 0 ? void 0 : formData.completeAddress);
|
|
13430
|
+
const owner = formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : (_formData$cpt2$detail = _formData$cpt2.details) === null || _formData$cpt2$detail === void 0 ? void 0 : (_formData$cpt2$detail2 = _formData$cpt2$detail.owners) === null || _formData$cpt2$detail2 === void 0 ? void 0 : _formData$cpt2$detail2[0];
|
|
13431
|
+
const ownerPermAddress = owner !== null && owner !== void 0 && owner.permanentAddress && (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) !== "NA" ? owner.permanentAddress : "";
|
|
13432
|
+
const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : "";
|
|
13433
|
+
const initialAddressValue = getCleanAddressValue(rawAddressType) || getCleanAddressValue(rawCompleteAddress) || formattedPropertyAddress || ownerCorrAddress || ownerPermAddress || "";
|
|
13323
13434
|
const {
|
|
13324
13435
|
control,
|
|
13325
13436
|
formState: localFormState,
|
|
@@ -13368,36 +13479,42 @@ const ConnectionDetails = _props => {
|
|
|
13368
13479
|
natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
|
|
13369
13480
|
orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
|
|
13370
13481
|
orgDeptDocumentName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || "",
|
|
13371
|
-
addressType:
|
|
13372
|
-
completeAddress:
|
|
13482
|
+
addressType: initialAddressValue || "",
|
|
13483
|
+
completeAddress: initialAddressValue || ""
|
|
13373
13484
|
}
|
|
13374
13485
|
});
|
|
13375
13486
|
const formValue = watch();
|
|
13376
13487
|
const {
|
|
13377
13488
|
errors
|
|
13378
13489
|
} = localFormState;
|
|
13490
|
+
const prevPropertyIdRef = React__default.useRef(formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : (_formData$cpt3$detail = _formData$cpt3.details) === null || _formData$cpt3$detail === void 0 ? void 0 : _formData$cpt3$detail.propertyId);
|
|
13491
|
+
const prevPropAddrRef = React__default.useRef(formattedPropertyAddress);
|
|
13492
|
+
const isAddressUserEditedRef = React__default.useRef(false);
|
|
13379
13493
|
React.useEffect(() => {
|
|
13380
|
-
var _formData$
|
|
13381
|
-
const
|
|
13382
|
-
const
|
|
13383
|
-
if (
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
}
|
|
13389
|
-
|
|
13390
|
-
|
|
13391
|
-
|
|
13392
|
-
|
|
13393
|
-
|
|
13394
|
-
|
|
13395
|
-
|
|
13396
|
-
|
|
13397
|
-
|
|
13398
|
-
|
|
13399
|
-
|
|
13400
|
-
|
|
13494
|
+
var _formData$cpt4, _formData$cpt4$detail;
|
|
13495
|
+
const currentPropertyId = formData === null || formData === void 0 ? void 0 : (_formData$cpt4 = formData.cpt) === null || _formData$cpt4 === void 0 ? void 0 : (_formData$cpt4$detail = _formData$cpt4.details) === null || _formData$cpt4$detail === void 0 ? void 0 : _formData$cpt4$detail.propertyId;
|
|
13496
|
+
const isNewPropertySelected = Boolean(currentPropertyId && prevPropertyIdRef.current && currentPropertyId !== prevPropertyIdRef.current);
|
|
13497
|
+
if (isNewPropertySelected) {
|
|
13498
|
+
prevPropertyIdRef.current = currentPropertyId;
|
|
13499
|
+
isAddressUserEditedRef.current = false;
|
|
13500
|
+
} else if (currentPropertyId && !prevPropertyIdRef.current) {
|
|
13501
|
+
prevPropertyIdRef.current = currentPropertyId;
|
|
13502
|
+
}
|
|
13503
|
+
if (isAddressUserEditedRef.current) {
|
|
13504
|
+
return;
|
|
13505
|
+
}
|
|
13506
|
+
const currentCptAddr = getCptAddress(formData);
|
|
13507
|
+
const newFormattedAddr = getPropertyAddressString(currentCptAddr, t);
|
|
13508
|
+
const currentVal = getValues("addressType");
|
|
13509
|
+
const isValOldType = typeof currentVal === "object" || currentVal === "PERMANENT" || currentVal === "CORRESPONDENCE";
|
|
13510
|
+
if (newFormattedAddr && (isNewPropertySelected || isValOldType || currentVal === undefined || currentVal === null || currentVal === prevPropAddrRef.current)) {
|
|
13511
|
+
setValue("addressType", newFormattedAddr, {
|
|
13512
|
+
shouldValidate: true
|
|
13513
|
+
});
|
|
13514
|
+
setValue("completeAddress", newFormattedAddr);
|
|
13515
|
+
prevPropAddrRef.current = newFormattedAddr;
|
|
13516
|
+
}
|
|
13517
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt5 = formData.cpt) === null || _formData$cpt5 === void 0 ? void 0 : (_formData$cpt5$detail = _formData$cpt5.details) === null || _formData$cpt5$detail === void 0 ? void 0 : _formData$cpt5$detail.propertyId, formData === null || formData === void 0 ? void 0 : (_formData$cpt6 = formData.cpt) === null || _formData$cpt6 === void 0 ? void 0 : (_formData$cpt6$detail = _formData$cpt6.details) === null || _formData$cpt6$detail === void 0 ? void 0 : _formData$cpt6$detail.address, formData === null || formData === void 0 ? void 0 : (_formData$property2 = formData.property) === null || _formData$property2 === void 0 ? void 0 : _formData$property2.address]);
|
|
13401
13518
|
const [uploadedFile, setUploadedFile] = React.useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
|
|
13402
13519
|
const [file, setFile] = React.useState(null);
|
|
13403
13520
|
const [fileUploadError, setFileUploadError] = React.useState(null);
|
|
@@ -13560,61 +13677,35 @@ const ConnectionDetails = _props => {
|
|
|
13560
13677
|
placeholder: t("Select Applicant Type")
|
|
13561
13678
|
});
|
|
13562
13679
|
}
|
|
13563
|
-
})), /*#__PURE__*/React__default.createElement(
|
|
13680
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React__default.createElement("span", {
|
|
13564
13681
|
className: "check-page-link-button"
|
|
13565
|
-
}, "*")), /*#__PURE__*/React__default.createElement(
|
|
13682
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
13683
|
+
className: "field"
|
|
13684
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
13566
13685
|
control: control,
|
|
13567
13686
|
name: "addressType",
|
|
13568
|
-
defaultValue:
|
|
13687
|
+
defaultValue: initialAddressValue || "",
|
|
13569
13688
|
rules: {
|
|
13570
13689
|
required: t("REQUIRED_FIELD")
|
|
13571
13690
|
},
|
|
13572
13691
|
isMandatory: true,
|
|
13573
13692
|
render: props => {
|
|
13574
13693
|
var _errors$addressType;
|
|
13575
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
13694
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
13576
13695
|
className: "form-field",
|
|
13577
|
-
|
|
13696
|
+
value: props.value ?? getValues("addressType") ?? "",
|
|
13578
13697
|
disable: false,
|
|
13579
|
-
|
|
13580
|
-
i18nKey: "Permanent",
|
|
13581
|
-
code: "PERMANENT"
|
|
13582
|
-
}, {
|
|
13583
|
-
i18nKey: "Correspondence",
|
|
13584
|
-
code: "CORRESPONDENCE"
|
|
13585
|
-
}],
|
|
13698
|
+
disabled: false,
|
|
13586
13699
|
errorStyle: localFormState.touched.addressType && errors !== null && errors !== void 0 && (_errors$addressType = errors.addressType) !== null && _errors$addressType !== void 0 && _errors$addressType.message ? true : false,
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13590
|
-
|
|
13591
|
-
setValue("completeAddress", formattedAddress);
|
|
13700
|
+
onChange: e => {
|
|
13701
|
+
isAddressUserEditedRef.current = true;
|
|
13702
|
+
props.onChange(e.target.value);
|
|
13703
|
+
setValue("completeAddress", e.target.value);
|
|
13592
13704
|
},
|
|
13593
|
-
optionKey: "i18nKey",
|
|
13594
13705
|
onBlur: props.onBlur,
|
|
13595
|
-
|
|
13596
|
-
placeholder: t("Select Address Type")
|
|
13706
|
+
placeholder: t("WS_Billing_Address_Type")
|
|
13597
13707
|
});
|
|
13598
13708
|
}
|
|
13599
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Complete Address")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
13600
|
-
control: control,
|
|
13601
|
-
name: "completeAddress",
|
|
13602
|
-
defaultValue: initialCompleteAddress || "",
|
|
13603
|
-
render: props => /*#__PURE__*/React__default.createElement("div", {
|
|
13604
|
-
className: "field"
|
|
13605
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
13606
|
-
className: "form-field",
|
|
13607
|
-
value: props.value ?? getValues("completeAddress") ?? initialCompleteAddress ?? "",
|
|
13608
|
-
disable: addresses.length > 0,
|
|
13609
|
-
disabled: addresses.length > 0,
|
|
13610
|
-
onChange: e => {
|
|
13611
|
-
props.onChange(e.target.value);
|
|
13612
|
-
setValue("completeAddress", e.target.value);
|
|
13613
|
-
},
|
|
13614
|
-
style: addresses.length > 0 ? {
|
|
13615
|
-
backgroundColor: "#eee"
|
|
13616
|
-
} : {}
|
|
13617
|
-
}))
|
|
13618
13709
|
})))), showDocModal && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
13619
13710
|
open: showDocModal,
|
|
13620
13711
|
headerBarMain: t("View Document") || "View Document",
|
|
@@ -25219,7 +25310,7 @@ const WSDeclaration = _ref => {
|
|
|
25219
25310
|
};
|
|
25220
25311
|
|
|
25221
25312
|
const WSDjbEmployee = _ref => {
|
|
25222
|
-
var _formData$
|
|
25313
|
+
var _formData$additionalD, _localFormState$touch, _formValue$employeeId, _formValue$employeeId2, _localFormState$touch2, _formValue$designatio, _formValue$designatio2, _formData$dueVerifica;
|
|
25223
25314
|
let {
|
|
25224
25315
|
config,
|
|
25225
25316
|
onSelect,
|
|
@@ -25232,6 +25323,24 @@ const WSDjbEmployee = _ref => {
|
|
|
25232
25323
|
const {
|
|
25233
25324
|
t
|
|
25234
25325
|
} = reactI18next.useTranslation();
|
|
25326
|
+
const getInitialValues = () => {
|
|
25327
|
+
var _djb$document, _add$document;
|
|
25328
|
+
const djb = formData === null || formData === void 0 ? void 0 : formData.djbEmployee;
|
|
25329
|
+
const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
|
|
25330
|
+
const isEmp = (djb === null || djb === void 0 ? void 0 : djb.isDjbEmployee) !== undefined ? String(djb === null || djb === void 0 ? void 0 : djb.isDjbEmployee) === "true" || (djb === null || djb === void 0 ? void 0 : djb.isDjbEmployee) === true : (add === null || add === void 0 ? void 0 : add.isDjbEmployee) !== undefined ? String(add === null || add === void 0 ? void 0 : add.isDjbEmployee) === "true" || (add === null || add === void 0 ? void 0 : add.isDjbEmployee) === true : false;
|
|
25331
|
+
const empId = (djb === null || djb === void 0 ? void 0 : djb.employeeId) !== undefined ? djb === null || djb === void 0 ? void 0 : djb.employeeId : (add === null || add === void 0 ? void 0 : add.employeeId) !== undefined ? add === null || add === void 0 ? void 0 : add.employeeId : "";
|
|
25332
|
+
const dorVal = (djb === null || djb === void 0 ? void 0 : djb.dor) !== undefined ? djb === null || djb === void 0 ? void 0 : djb.dor : (add === null || add === void 0 ? void 0 : add.dor) !== undefined ? add === null || add === void 0 ? void 0 : add.dor : "";
|
|
25333
|
+
const desig = (djb === null || djb === void 0 ? void 0 : djb.designation) !== undefined ? djb === null || djb === void 0 ? void 0 : djb.designation : (add === null || add === void 0 ? void 0 : add.designation) !== undefined ? add === null || add === void 0 ? void 0 : add.designation : "";
|
|
25334
|
+
const doc = (djb === null || djb === void 0 ? void 0 : djb.document) !== undefined ? (djb === null || djb === void 0 ? void 0 : (_djb$document = djb.document) === null || _djb$document === void 0 ? void 0 : _djb$document.fileStoreId) || (djb === null || djb === void 0 ? void 0 : djb.document) || "" : (add === null || add === void 0 ? void 0 : add.document) !== undefined ? (add === null || add === void 0 ? void 0 : (_add$document = add.document) === null || _add$document === void 0 ? void 0 : _add$document.fileStoreId) || (add === null || add === void 0 ? void 0 : add.document) || "" : "";
|
|
25335
|
+
return {
|
|
25336
|
+
isDjbEmployee: !!isEmp,
|
|
25337
|
+
employeeId: empId || "",
|
|
25338
|
+
dor: dorVal || "",
|
|
25339
|
+
designation: desig || "",
|
|
25340
|
+
document: doc || ""
|
|
25341
|
+
};
|
|
25342
|
+
};
|
|
25343
|
+
const initialVals = getInitialValues();
|
|
25235
25344
|
const {
|
|
25236
25345
|
control,
|
|
25237
25346
|
watch,
|
|
@@ -25240,17 +25349,52 @@ const WSDjbEmployee = _ref => {
|
|
|
25240
25349
|
trigger,
|
|
25241
25350
|
clearErrors: localClearErrors
|
|
25242
25351
|
} = reactHookForm.useForm({
|
|
25243
|
-
defaultValues:
|
|
25244
|
-
|
|
25245
|
-
employeeId: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee3 = formData.djbEmployee) === null || _formData$djbEmployee3 === void 0 ? void 0 : _formData$djbEmployee3.employeeId) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD3 = formData.additionalDetails) === null || _formData$additionalD3 === void 0 ? void 0 : _formData$additionalD3.employeeId) || "",
|
|
25246
|
-
dor: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee4 = formData.djbEmployee) === null || _formData$djbEmployee4 === void 0 ? void 0 : _formData$djbEmployee4.dor) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD4 = formData.additionalDetails) === null || _formData$additionalD4 === void 0 ? void 0 : _formData$additionalD4.dor) || "",
|
|
25247
|
-
designation: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee5 = formData.djbEmployee) === null || _formData$djbEmployee5 === void 0 ? void 0 : _formData$djbEmployee5.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD5 = formData.additionalDetails) === null || _formData$additionalD5 === void 0 ? void 0 : _formData$additionalD5.designation) || "",
|
|
25248
|
-
document: (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee6 = formData.djbEmployee) === null || _formData$djbEmployee6 === void 0 ? void 0 : _formData$djbEmployee6.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD6 = formData.additionalDetails) === null || _formData$additionalD6 === void 0 ? void 0 : _formData$additionalD6.document) || ""
|
|
25249
|
-
}
|
|
25352
|
+
defaultValues: initialVals,
|
|
25353
|
+
mode: "all"
|
|
25250
25354
|
});
|
|
25251
25355
|
const formValue = watch();
|
|
25252
|
-
const isDjbEmployee =
|
|
25356
|
+
const isDjbEmployee = (formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee) === true || String(formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee) === "true";
|
|
25357
|
+
const hasData = !!((formData === null || formData === void 0 ? void 0 : formData.djbEmployee) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD = formData.additionalDetails) === null || _formData$additionalD === void 0 ? void 0 : _formData$additionalD.isDjbEmployee) !== undefined);
|
|
25358
|
+
const isInitializedRef = React__default.useRef(hasData);
|
|
25359
|
+
const getValidationErrors = (values, docFile) => {
|
|
25360
|
+
const errs = {};
|
|
25361
|
+
const isEmp = (values === null || values === void 0 ? void 0 : values.isDjbEmployee) === true || String(values === null || values === void 0 ? void 0 : values.isDjbEmployee) === "true";
|
|
25362
|
+
if (isEmp) {
|
|
25363
|
+
var _values$document;
|
|
25364
|
+
if (!(values !== null && values !== void 0 && values.employeeId) || !String(values === null || values === void 0 ? void 0 : values.employeeId).trim()) {
|
|
25365
|
+
errs.employeeId = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25366
|
+
}
|
|
25367
|
+
if (!(values !== null && values !== void 0 && values.designation) || !String(values === null || values === void 0 ? void 0 : values.designation).trim()) {
|
|
25368
|
+
errs.designation = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25369
|
+
}
|
|
25370
|
+
const hasDoc = (values === null || values === void 0 ? void 0 : (_values$document = values.document) === null || _values$document === void 0 ? void 0 : _values$document.fileStoreId) || typeof (values === null || values === void 0 ? void 0 : values.document) === "string" && (values === null || values === void 0 ? void 0 : values.document.trim()) || (values === null || values === void 0 ? void 0 : values.document) || docFile;
|
|
25371
|
+
if (!hasDoc) {
|
|
25372
|
+
errs.document = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25373
|
+
}
|
|
25374
|
+
}
|
|
25375
|
+
return errs;
|
|
25376
|
+
};
|
|
25377
|
+
React.useEffect(() => {
|
|
25378
|
+
var _formData$additionalD2;
|
|
25379
|
+
if (!isInitializedRef.current && ((formData === null || formData === void 0 ? void 0 : formData.djbEmployee) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD2 = formData.additionalDetails) === null || _formData$additionalD2 === void 0 ? void 0 : _formData$additionalD2.isDjbEmployee) !== undefined)) {
|
|
25380
|
+
const vals = getInitialValues();
|
|
25381
|
+
setValue("isDjbEmployee", vals.isDjbEmployee);
|
|
25382
|
+
setValue("employeeId", vals.employeeId);
|
|
25383
|
+
setValue("dor", vals.dor);
|
|
25384
|
+
setValue("designation", vals.designation);
|
|
25385
|
+
setValue("document", vals.document);
|
|
25386
|
+
setUploadedFile(vals.document || null);
|
|
25387
|
+
isInitializedRef.current = true;
|
|
25388
|
+
}
|
|
25389
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
|
|
25390
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
25391
|
+
const [file, setFile] = React.useState(null);
|
|
25392
|
+
const [uploadedFile, setUploadedFile] = React.useState(() => initialVals.document || null);
|
|
25393
|
+
const [errorUpload, setErrorUpload] = React.useState(null);
|
|
25394
|
+
const djbErrors = getValidationErrors(formValue, uploadedFile);
|
|
25395
|
+
const hasDjbErrors = Object.keys(djbErrors).length > 0;
|
|
25253
25396
|
React.useEffect(() => {
|
|
25397
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "djbEmployee";
|
|
25254
25398
|
if (!isDjbEmployee) {
|
|
25255
25399
|
localClearErrors();
|
|
25256
25400
|
setValue("employeeId", "");
|
|
@@ -25259,34 +25403,26 @@ const WSDjbEmployee = _ref => {
|
|
|
25259
25403
|
setValue("document", "");
|
|
25260
25404
|
setUploadedFile(null);
|
|
25261
25405
|
setFile(null);
|
|
25262
|
-
if (clearErrors) clearErrors(
|
|
25406
|
+
if (clearErrors) clearErrors(configKey);
|
|
25263
25407
|
} else {
|
|
25264
|
-
|
|
25408
|
+
setTimeout(() => {
|
|
25409
|
+
trigger(["employeeId", "designation", "document"]);
|
|
25410
|
+
}, 50);
|
|
25411
|
+
const errs = getValidationErrors(formValue, uploadedFile);
|
|
25412
|
+
if (Object.keys(errs).length > 0 && setError) {
|
|
25413
|
+
setError(configKey, {
|
|
25414
|
+
type: "required",
|
|
25415
|
+
message: "CORE_COMMON_REQUIRED_ERRMSG"
|
|
25416
|
+
});
|
|
25417
|
+
}
|
|
25265
25418
|
}
|
|
25266
25419
|
}, [isDjbEmployee]);
|
|
25267
|
-
React.useEffect(() => {
|
|
25268
|
-
var _formData$djbEmployee7, _formData$djbEmployee8, _formData$additionalD7, _formData$additionalD8, _formData$additionalD9;
|
|
25269
|
-
const isEmp = String(formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee7 = formData.djbEmployee) === null || _formData$djbEmployee7 === void 0 ? void 0 : _formData$djbEmployee7.isDjbEmployee) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee8 = formData.djbEmployee) === null || _formData$djbEmployee8 === void 0 ? void 0 : _formData$djbEmployee8.isDjbEmployee) === true || String(formData === null || formData === void 0 ? void 0 : (_formData$additionalD7 = formData.additionalDetails) === null || _formData$additionalD7 === void 0 ? void 0 : _formData$additionalD7.isDjbEmployee) === "true" || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD8 = formData.additionalDetails) === null || _formData$additionalD8 === void 0 ? void 0 : _formData$additionalD8.isDjbEmployee) === true;
|
|
25270
|
-
if ((formData === null || formData === void 0 ? void 0 : formData.djbEmployee) !== undefined || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD9 = formData.additionalDetails) === null || _formData$additionalD9 === void 0 ? void 0 : _formData$additionalD9.isDjbEmployee) !== undefined) {
|
|
25271
|
-
var _formData$djbEmployee9, _formData$additionalD0, _formData$djbEmployee0, _formData$additionalD1, _formData$djbEmployee1, _formData$additionalD10, _formData$djbEmployee10, _formData$additionalD11;
|
|
25272
|
-
setValue("isDjbEmployee", !!isEmp);
|
|
25273
|
-
setValue("employeeId", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee9 = formData.djbEmployee) === null || _formData$djbEmployee9 === void 0 ? void 0 : _formData$djbEmployee9.employeeId) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD0 = formData.additionalDetails) === null || _formData$additionalD0 === void 0 ? void 0 : _formData$additionalD0.employeeId) || "");
|
|
25274
|
-
setValue("dor", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee0 = formData.djbEmployee) === null || _formData$djbEmployee0 === void 0 ? void 0 : _formData$djbEmployee0.dor) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD1 = formData.additionalDetails) === null || _formData$additionalD1 === void 0 ? void 0 : _formData$additionalD1.dor) || "");
|
|
25275
|
-
setValue("designation", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee1 = formData.djbEmployee) === null || _formData$djbEmployee1 === void 0 ? void 0 : _formData$djbEmployee1.designation) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD10 = formData.additionalDetails) === null || _formData$additionalD10 === void 0 ? void 0 : _formData$additionalD10.designation) || "");
|
|
25276
|
-
setValue("document", (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee10 = formData.djbEmployee) === null || _formData$djbEmployee10 === void 0 ? void 0 : _formData$djbEmployee10.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD11 = formData.additionalDetails) === null || _formData$additionalD11 === void 0 ? void 0 : _formData$additionalD11.document) || "");
|
|
25277
|
-
}
|
|
25278
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formData === null || formData === void 0 ? void 0 : formData.additionalDetails, setValue]);
|
|
25279
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
25280
|
-
const [file, setFile] = React.useState(null);
|
|
25281
|
-
const [uploadedFile, setUploadedFile] = React.useState(() => {
|
|
25282
|
-
var _formData$djbEmployee11, _formData$additionalD12;
|
|
25283
|
-
return (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee11 = formData.djbEmployee) === null || _formData$djbEmployee11 === void 0 ? void 0 : _formData$djbEmployee11.document) || (formData === null || formData === void 0 ? void 0 : (_formData$additionalD12 = formData.additionalDetails) === null || _formData$additionalD12 === void 0 ? void 0 : _formData$additionalD12.document) || null;
|
|
25284
|
-
});
|
|
25285
|
-
const [errorUpload, setErrorUpload] = React.useState(null);
|
|
25286
25420
|
const handleView = function (fileStoreId, tenantId) {
|
|
25287
25421
|
try {
|
|
25288
|
-
|
|
25289
|
-
|
|
25422
|
+
return Promise.resolve(_catch(function () {
|
|
25423
|
+
const id = typeof fileStoreId === "object" ? fileStoreId === null || fileStoreId === void 0 ? void 0 : fileStoreId.fileStoreId : fileStoreId;
|
|
25424
|
+
if (!id) return;
|
|
25425
|
+
return Promise.resolve(Digit.UploadServices.Filefetch([id], tenantId)).then(function (response) {
|
|
25290
25426
|
var _response$data, _response$data$fileSt, _response$data$fileSt2;
|
|
25291
25427
|
const url = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$fileSt = _response$data.fileStoreIds) === null || _response$data$fileSt === void 0 ? void 0 : (_response$data$fileSt2 = _response$data$fileSt[0]) === null || _response$data$fileSt2 === void 0 ? void 0 : _response$data$fileSt2.url;
|
|
25292
25428
|
if (url) {
|
|
@@ -25302,8 +25438,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25302
25438
|
});
|
|
25303
25439
|
}, function (error) {
|
|
25304
25440
|
console.error("Error fetching file URL:", error);
|
|
25305
|
-
});
|
|
25306
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
25441
|
+
}));
|
|
25307
25442
|
} catch (e) {
|
|
25308
25443
|
return Promise.reject(e);
|
|
25309
25444
|
}
|
|
@@ -25312,23 +25447,24 @@ const WSDjbEmployee = _ref => {
|
|
|
25312
25447
|
(function () {
|
|
25313
25448
|
try {
|
|
25314
25449
|
setErrorUpload(null);
|
|
25315
|
-
const
|
|
25450
|
+
const _temp3 = function () {
|
|
25316
25451
|
if (file) {
|
|
25317
|
-
const
|
|
25452
|
+
const _temp2 = function () {
|
|
25318
25453
|
if (file.size >= 5242880) {
|
|
25319
25454
|
setErrorUpload({
|
|
25320
25455
|
key: "error",
|
|
25321
25456
|
message: "CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"
|
|
25322
25457
|
});
|
|
25323
25458
|
} else {
|
|
25324
|
-
const
|
|
25459
|
+
const _temp = _catch(function () {
|
|
25325
25460
|
setUploadedFile(null);
|
|
25326
25461
|
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
|
|
25327
25462
|
var _response$data2, _response$data2$files;
|
|
25328
25463
|
if ((response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.length) > 0) {
|
|
25329
|
-
var _response$data3, _response$data3$files
|
|
25330
|
-
|
|
25331
|
-
|
|
25464
|
+
var _response$data3, _response$data3$files;
|
|
25465
|
+
const fileId = response === null || response === void 0 ? void 0 : (_response$data3 = response.data) === null || _response$data3 === void 0 ? void 0 : (_response$data3$files = _response$data3.files[0]) === null || _response$data3$files === void 0 ? void 0 : _response$data3$files.fileStoreId;
|
|
25466
|
+
setUploadedFile(fileId);
|
|
25467
|
+
setValue("document", fileId, {
|
|
25332
25468
|
shouldValidate: true
|
|
25333
25469
|
});
|
|
25334
25470
|
} else {
|
|
@@ -25344,13 +25480,13 @@ const WSDjbEmployee = _ref => {
|
|
|
25344
25480
|
message: "CS_FILE_UPLOAD_ERROR"
|
|
25345
25481
|
});
|
|
25346
25482
|
});
|
|
25347
|
-
if (
|
|
25483
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
25348
25484
|
}
|
|
25349
25485
|
}();
|
|
25350
|
-
if (
|
|
25486
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
25351
25487
|
}
|
|
25352
25488
|
}();
|
|
25353
|
-
return
|
|
25489
|
+
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
25354
25490
|
} catch (e) {
|
|
25355
25491
|
Promise.reject(e);
|
|
25356
25492
|
}
|
|
@@ -25360,39 +25496,46 @@ const WSDjbEmployee = _ref => {
|
|
|
25360
25496
|
setFile(e.target.files[0]);
|
|
25361
25497
|
}
|
|
25362
25498
|
React.useEffect(() => {
|
|
25363
|
-
|
|
25499
|
+
const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
|
|
25500
|
+
if (isEmployeeMode) {
|
|
25364
25501
|
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formValue);
|
|
25365
25502
|
if (isDifferent) {
|
|
25503
|
+
var _formData$djbEmployee, _formData$djbEmployee2;
|
|
25504
|
+
const isImmediate = (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee = formData.djbEmployee) === null || _formData$djbEmployee === void 0 ? void 0 : _formData$djbEmployee.isDjbEmployee) !== (formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee) || (formData === null || formData === void 0 ? void 0 : (_formData$djbEmployee2 = formData.djbEmployee) === null || _formData$djbEmployee2 === void 0 ? void 0 : _formData$djbEmployee2.document) !== (formValue === null || formValue === void 0 ? void 0 : formValue.document);
|
|
25505
|
+
const delay = isImmediate ? 0 : 100;
|
|
25366
25506
|
const timer = setTimeout(() => {
|
|
25367
|
-
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
25507
|
+
onSelect((config === null || config === void 0 ? void 0 : config.key) || "djbEmployee", {
|
|
25368
25508
|
...formValue
|
|
25369
25509
|
});
|
|
25370
|
-
},
|
|
25510
|
+
}, delay);
|
|
25371
25511
|
return () => clearTimeout(timer);
|
|
25372
25512
|
}
|
|
25373
25513
|
}
|
|
25374
25514
|
}, [formValue, userType]);
|
|
25375
25515
|
React.useEffect(() => {
|
|
25376
|
-
|
|
25377
|
-
|
|
25378
|
-
if (
|
|
25379
|
-
|
|
25380
|
-
|
|
25381
|
-
|
|
25382
|
-
} else if (!Object.keys(localFormState.errors).length && formState !== null && formState !== void 0 && (_formState$errors2 = formState.errors) !== null && _formState$errors2 !== void 0 && _formState$errors2[config === null || config === void 0 ? void 0 : config.key]) {
|
|
25383
|
-
if (clearErrors) clearErrors(config === null || config === void 0 ? void 0 : config.key);
|
|
25384
|
-
}
|
|
25516
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "djbEmployee";
|
|
25517
|
+
if (hasDjbErrors) {
|
|
25518
|
+
if (setError) setError(configKey, {
|
|
25519
|
+
type: "required",
|
|
25520
|
+
message: "CORE_COMMON_REQUIRED_ERRMSG"
|
|
25521
|
+
});
|
|
25385
25522
|
} else {
|
|
25386
|
-
var _formState$
|
|
25387
|
-
if (formState !== null && formState !== void 0 && (_formState$
|
|
25388
|
-
clearErrors(
|
|
25523
|
+
var _formState$errors;
|
|
25524
|
+
if (formState !== null && formState !== void 0 && (_formState$errors = formState.errors) !== null && _formState$errors !== void 0 && _formState$errors[configKey] && clearErrors) {
|
|
25525
|
+
clearErrors(configKey);
|
|
25389
25526
|
}
|
|
25390
25527
|
}
|
|
25391
|
-
}, [
|
|
25528
|
+
}, [hasDjbErrors, formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee, formValue === null || formValue === void 0 ? void 0 : formValue.employeeId, formValue === null || formValue === void 0 ? void 0 : formValue.designation, formValue === null || formValue === void 0 ? void 0 : formValue.document, uploadedFile, config === null || config === void 0 ? void 0 : config.key]);
|
|
25392
25529
|
const goNext = () => {
|
|
25393
25530
|
onSelect(config.key, formValue);
|
|
25394
25531
|
};
|
|
25395
25532
|
const onSkip = () => onSelect();
|
|
25533
|
+
const errorStyle = {
|
|
25534
|
+
width: "100%",
|
|
25535
|
+
marginLeft: "0px",
|
|
25536
|
+
fontSize: "12px",
|
|
25537
|
+
marginTop: "4px"
|
|
25538
|
+
};
|
|
25396
25539
|
const FormContent = /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
25397
25540
|
title: t("Are you a DJB Employee?"),
|
|
25398
25541
|
defaultOpen: true
|
|
@@ -25410,6 +25553,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25410
25553
|
gap: "2rem",
|
|
25411
25554
|
alignItems: "center"
|
|
25412
25555
|
},
|
|
25556
|
+
name: "isDjbEmployeeRadio",
|
|
25413
25557
|
options: [{
|
|
25414
25558
|
i18nKey: "CORE_COMMON_YES",
|
|
25415
25559
|
code: true
|
|
@@ -25432,7 +25576,12 @@ const WSDjbEmployee = _ref => {
|
|
|
25432
25576
|
className: "formcomposer-section-grid"
|
|
25433
25577
|
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Employee ID"), isDjbEmployee && /*#__PURE__*/React__default.createElement("span", {
|
|
25434
25578
|
className: "check-page-link-button"
|
|
25435
|
-
}, " *")), /*#__PURE__*/React__default.createElement(
|
|
25579
|
+
}, " *")), /*#__PURE__*/React__default.createElement("div", {
|
|
25580
|
+
className: "field",
|
|
25581
|
+
style: {
|
|
25582
|
+
width: "100%"
|
|
25583
|
+
}
|
|
25584
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
25436
25585
|
control: control,
|
|
25437
25586
|
name: "employeeId",
|
|
25438
25587
|
rules: {
|
|
@@ -25440,14 +25589,25 @@ const WSDjbEmployee = _ref => {
|
|
|
25440
25589
|
},
|
|
25441
25590
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
25442
25591
|
value: props.value,
|
|
25443
|
-
onChange: e =>
|
|
25444
|
-
|
|
25592
|
+
onChange: e => {
|
|
25593
|
+
props.onChange(e.target.value);
|
|
25594
|
+
trigger("employeeId");
|
|
25595
|
+
},
|
|
25596
|
+
onBlur: e => {
|
|
25597
|
+
props.onBlur(e);
|
|
25598
|
+
trigger("employeeId");
|
|
25599
|
+
},
|
|
25445
25600
|
placeholder: t("Employee ID")
|
|
25446
25601
|
})
|
|
25447
|
-
})
|
|
25602
|
+
}), (localFormState === null || localFormState === void 0 ? void 0 : (_localFormState$touch = localFormState.touched) === null || _localFormState$touch === void 0 ? void 0 : _localFormState$touch.employeeId) && !(formValue !== null && formValue !== void 0 && (_formValue$employeeId = formValue.employeeId) !== null && _formValue$employeeId !== void 0 && (_formValue$employeeId2 = _formValue$employeeId.trim) !== null && _formValue$employeeId2 !== void 0 && _formValue$employeeId2.call(_formValue$employeeId)) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
25603
|
+
style: errorStyle
|
|
25604
|
+
}, t("CORE_COMMON_REQUIRED_ERRMSG"))))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Employee Designation"), isDjbEmployee && /*#__PURE__*/React__default.createElement("span", {
|
|
25448
25605
|
className: "check-page-link-button"
|
|
25449
25606
|
}, " *")), /*#__PURE__*/React__default.createElement("div", {
|
|
25450
|
-
className: "field"
|
|
25607
|
+
className: "field",
|
|
25608
|
+
style: {
|
|
25609
|
+
width: "100%"
|
|
25610
|
+
}
|
|
25451
25611
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
25452
25612
|
control: control,
|
|
25453
25613
|
name: "designation",
|
|
@@ -25456,14 +25616,25 @@ const WSDjbEmployee = _ref => {
|
|
|
25456
25616
|
},
|
|
25457
25617
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
25458
25618
|
value: props.value,
|
|
25459
|
-
onChange: e =>
|
|
25460
|
-
|
|
25619
|
+
onChange: e => {
|
|
25620
|
+
props.onChange(e.target.value);
|
|
25621
|
+
trigger("designation");
|
|
25622
|
+
},
|
|
25623
|
+
onBlur: e => {
|
|
25624
|
+
props.onBlur(e);
|
|
25625
|
+
trigger("designation");
|
|
25626
|
+
},
|
|
25461
25627
|
placeholder: t("Employee Designation")
|
|
25462
25628
|
})
|
|
25463
|
-
})
|
|
25629
|
+
}), (localFormState === null || localFormState === void 0 ? void 0 : (_localFormState$touch2 = localFormState.touched) === null || _localFormState$touch2 === void 0 ? void 0 : _localFormState$touch2.designation) && !(formValue !== null && formValue !== void 0 && (_formValue$designatio = formValue.designation) !== null && _formValue$designatio !== void 0 && (_formValue$designatio2 = _formValue$designatio.trim) !== null && _formValue$designatio2 !== void 0 && _formValue$designatio2.call(_formValue$designatio)) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
25630
|
+
style: errorStyle
|
|
25631
|
+
}, t("CORE_COMMON_REQUIRED_ERRMSG"))))), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("Upload Employee ID Document"), isDjbEmployee && /*#__PURE__*/React__default.createElement("span", {
|
|
25464
25632
|
className: "check-page-link-button"
|
|
25465
25633
|
}, " *")), /*#__PURE__*/React__default.createElement("div", {
|
|
25466
|
-
className: "field"
|
|
25634
|
+
className: "field",
|
|
25635
|
+
style: {
|
|
25636
|
+
width: "100%"
|
|
25637
|
+
}
|
|
25467
25638
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
25468
25639
|
control: control,
|
|
25469
25640
|
name: "document",
|
|
@@ -25485,6 +25656,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25485
25656
|
setValue("document", "", {
|
|
25486
25657
|
shouldValidate: true
|
|
25487
25658
|
});
|
|
25659
|
+
trigger("document");
|
|
25488
25660
|
},
|
|
25489
25661
|
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
|
|
25490
25662
|
error: errorUpload,
|
|
@@ -25536,6 +25708,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25536
25708
|
});
|
|
25537
25709
|
const fileInput = document.getElementById("employee-doc");
|
|
25538
25710
|
if (fileInput) fileInput.value = "";
|
|
25711
|
+
trigger("document");
|
|
25539
25712
|
},
|
|
25540
25713
|
title: "Remove Document",
|
|
25541
25714
|
style: {
|
|
@@ -25664,7 +25837,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25664
25837
|
config: config,
|
|
25665
25838
|
onSelect: goNext,
|
|
25666
25839
|
onSkip: onSkip,
|
|
25667
|
-
isDisabled:
|
|
25840
|
+
isDisabled: hasDjbErrors
|
|
25668
25841
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
25669
25842
|
style: {
|
|
25670
25843
|
marginTop: "-30px",
|
|
@@ -25735,6 +25908,7 @@ const WSDivyangjan = _ref => {
|
|
|
25735
25908
|
gap: "2rem",
|
|
25736
25909
|
alignItems: "center"
|
|
25737
25910
|
},
|
|
25911
|
+
name: "isDivyangjanRadio",
|
|
25738
25912
|
options: [{
|
|
25739
25913
|
i18nKey: "CORE_COMMON_YES",
|
|
25740
25914
|
code: true
|
|
@@ -25767,7 +25941,7 @@ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
|
|
|
25767
25941
|
const normalizeCode = value => String(value || "").replace(/[._\s-]/g, "").toUpperCase();
|
|
25768
25942
|
const getCode = value => typeof value === "object" ? (value === null || value === void 0 ? void 0 : value.code) || (value === null || value === void 0 ? void 0 : value.value) : value;
|
|
25769
25943
|
const PropertyWaterConnection = _ref => {
|
|
25770
|
-
var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10
|
|
25944
|
+
var _Digit$ULBService$get, _Digit$ULBService, _formData$cpt3, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10;
|
|
25771
25945
|
let {
|
|
25772
25946
|
t,
|
|
25773
25947
|
config,
|
|
@@ -25793,7 +25967,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
25793
25967
|
propertyCategory: null,
|
|
25794
25968
|
propertyType: null,
|
|
25795
25969
|
WaterConnectionUsageType: null,
|
|
25796
|
-
noOfFloors: null,
|
|
25797
25970
|
plotArea: "",
|
|
25798
25971
|
builtUpArea: "",
|
|
25799
25972
|
farArea: "",
|
|
@@ -26020,19 +26193,12 @@ const PropertyWaterConnection = _ref => {
|
|
|
26020
26193
|
autoFillFromPropertyType(watchPropertyType);
|
|
26021
26194
|
}
|
|
26022
26195
|
}, [watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code, autoFillFromPropertyType]);
|
|
26023
|
-
const floorOptions = React.useMemo(() => {
|
|
26024
|
-
var _ptServicesMastersDat7, _ptServicesMastersDat8;
|
|
26025
|
-
return ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : (_ptServicesMastersDat8 = _ptServicesMastersDat7.NoOfFloors) === null || _ptServicesMastersDat8 === void 0 ? void 0 : _ptServicesMastersDat8.filter(item => item.active).map(item => ({
|
|
26026
|
-
code: item.code,
|
|
26027
|
-
name: item.name
|
|
26028
|
-
}));
|
|
26029
|
-
}, [ptServicesMastersData]);
|
|
26030
26196
|
const activeQuestions = React.useMemo(() => {
|
|
26031
26197
|
if (!(watchPropertyType !== null && watchPropertyType !== void 0 && watchPropertyType.code)) return [];
|
|
26032
26198
|
let qList = watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.questions;
|
|
26033
26199
|
if (!qList || !Array.isArray(qList)) {
|
|
26034
|
-
var
|
|
26035
|
-
const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26200
|
+
var _ptServicesMastersDat7;
|
|
26201
|
+
const list = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat7 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat7 === void 0 ? void 0 : _ptServicesMastersDat7.PropertyType) || [];
|
|
26036
26202
|
const matched = list.find(item => normalizeCode(item.code) === normalizeCode(watchPropertyType.code));
|
|
26037
26203
|
qList = matched === null || matched === void 0 ? void 0 : matched.questions;
|
|
26038
26204
|
}
|
|
@@ -26101,13 +26267,13 @@ const PropertyWaterConnection = _ref => {
|
|
|
26101
26267
|
if (propertyDetailsInitialized.current || !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details)) return;
|
|
26102
26268
|
if (!categoryTypeList.length || !ptServicesMastersData) return;
|
|
26103
26269
|
if (formData !== null && formData !== void 0 && (_formData$cpt2 = formData.cpt) !== null && _formData$cpt2 !== void 0 && _formData$cpt2.details) {
|
|
26104
|
-
var
|
|
26270
|
+
var _ptServicesMastersDat8, _ptServicesMastersDat9, _ptServicesMastersDat0, _details$landArea, _details$superBuiltUp, _details$heightOfTheB, _details$farArea, _details$servantQuart, _details$numberOfBeds, _details$numberOfStud;
|
|
26105
26271
|
const details = formData.cpt.details;
|
|
26106
26272
|
const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
|
|
26107
26273
|
const usageCategory = getCode(additionalDetails.propertyCategory || additionalDetails.usageCategory || details.usageCategory);
|
|
26108
26274
|
const catType = getCode(additionalDetails.categoryType) || (String(usageCategory).includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
|
|
26109
26275
|
setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => normalizeCode(o.code) === normalizeCode(catType))) || null);
|
|
26110
|
-
const propCategoryMatch = (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => normalizeCode(o.code) === normalizeCode(usageCategory) || normalizeCode(o.name) === normalizeCode(usageCategory))) || (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26276
|
+
const propCategoryMatch = (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => normalizeCode(o.code) === normalizeCode(usageCategory) || normalizeCode(o.name) === normalizeCode(usageCategory))) || (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat8 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat8 === void 0 ? void 0 : (_ptServicesMastersDat9 = _ptServicesMastersDat8.PropertyCategory) === null || _ptServicesMastersDat9 === void 0 ? void 0 : _ptServicesMastersDat9.find(o => normalizeCode(o.code) === normalizeCode(usageCategory)));
|
|
26111
26277
|
setValue("useDetails.propertyCategory", propCategoryMatch ? {
|
|
26112
26278
|
code: propCategoryMatch.code,
|
|
26113
26279
|
name: propCategoryMatch.name
|
|
@@ -26115,7 +26281,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26115
26281
|
code: usageCategory,
|
|
26116
26282
|
name: usageCategory
|
|
26117
26283
|
} : null);
|
|
26118
|
-
const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (
|
|
26284
|
+
const propTypeList = (propertyType2List === null || propertyType2List === void 0 ? void 0 : propertyType2List.length) > 0 ? propertyType2List : (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat0 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat0 === void 0 ? void 0 : _ptServicesMastersDat0.PropertyType) || [];
|
|
26119
26285
|
const propTypeMatch = propTypeList.find(o => normalizeCode(o.code) === normalizeCode(getCode(additionalDetails.propertyType || details.propertyType)));
|
|
26120
26286
|
setValue("useDetails.propertyType", propTypeMatch ? {
|
|
26121
26287
|
code: propTypeMatch.code,
|
|
@@ -26125,13 +26291,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
26125
26291
|
const usageVal = getCode(additionalDetails.waterConnectionUsageType || additionalDetails.WaterConnectionUsageType);
|
|
26126
26292
|
const usageTypeMatch = usageTypeOptions.find(o => normalizeCode(o.code) === normalizeCode(usageVal) || normalizeCode(o.name) === normalizeCode(usageVal));
|
|
26127
26293
|
setValue("useDetails.WaterConnectionUsageType", usageTypeMatch || null);
|
|
26128
|
-
setValue("useDetails.noOfFloors", (floorOptions === null || floorOptions === void 0 ? void 0 : floorOptions.find(o => {
|
|
26129
|
-
var _details$noOfFloors;
|
|
26130
|
-
const val1 = getCode(additionalDetails.numberOfFloors);
|
|
26131
|
-
const val2 = getCode(additionalDetails.noOfFloors);
|
|
26132
|
-
const val3 = (_details$noOfFloors = details.noOfFloors) === null || _details$noOfFloors === void 0 ? void 0 : _details$noOfFloors.toString();
|
|
26133
|
-
return normalizeCode(o.code) === normalizeCode(val1) || normalizeCode(o.code) === normalizeCode(val2) || normalizeCode(o.code) === normalizeCode(val3) || val3 && normalizeCode(o.code) === normalizeCode(`${val3}_FLOOR`);
|
|
26134
|
-
})) || null);
|
|
26135
26294
|
setValue("useDetails.plotArea", additionalDetails.plotArea || (details === null || details === void 0 ? void 0 : (_details$landArea = details.landArea) === null || _details$landArea === void 0 ? void 0 : _details$landArea.toString()) || "");
|
|
26136
26295
|
setValue("useDetails.builtUpArea", additionalDetails.builtUpArea || (details === null || details === void 0 ? void 0 : (_details$superBuiltUp = details.superBuiltUpArea) === null || _details$superBuiltUp === void 0 ? void 0 : _details$superBuiltUp.toString()) || "");
|
|
26137
26296
|
setValue("useDetails.heightOfTheBuilding", additionalDetails.heightOfTheBuilding || (details === null || details === void 0 ? void 0 : (_details$heightOfTheB = details.heightOfTheBuilding) === null || _details$heightOfTheB === void 0 ? void 0 : _details$heightOfTheB.toString()) || "");
|
|
@@ -26152,7 +26311,6 @@ const PropertyWaterConnection = _ref => {
|
|
|
26152
26311
|
setValue("useDetails.propertyCategory", null);
|
|
26153
26312
|
setValue("useDetails.propertyType", null);
|
|
26154
26313
|
setValue("useDetails.WaterConnectionUsageType", null);
|
|
26155
|
-
setValue("useDetails.noOfFloors", null);
|
|
26156
26314
|
setValue("useDetails.plotArea", "");
|
|
26157
26315
|
setValue("useDetails.builtUpArea", "");
|
|
26158
26316
|
setValue("useDetails.farArea", "");
|
|
@@ -26167,7 +26325,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26167
26325
|
setValue("useDetails.questions", []);
|
|
26168
26326
|
}
|
|
26169
26327
|
propertyDetailsInitialized.current = true;
|
|
26170
|
-
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions,
|
|
26328
|
+
}, [formData === null || formData === void 0 ? void 0 : (_formData$cpt3 = formData.cpt) === null || _formData$cpt3 === void 0 ? void 0 : _formData$cpt3.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, yearOptions, categoryTypeList, setValue]);
|
|
26171
26329
|
const lastErrorState = React__default.useRef(null);
|
|
26172
26330
|
React.useEffect(() => {
|
|
26173
26331
|
const hasErrors = Object.keys(errors).length > 0;
|
|
@@ -26260,7 +26418,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26260
26418
|
select: props.onChange,
|
|
26261
26419
|
t: t,
|
|
26262
26420
|
onBlur: props.onBlur,
|
|
26263
|
-
disable:
|
|
26421
|
+
disable: true,
|
|
26264
26422
|
placeholder: t("WS_PROPERTY_CATEGORY")
|
|
26265
26423
|
})
|
|
26266
26424
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyCategory) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
@@ -26282,7 +26440,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26282
26440
|
select: props.onChange,
|
|
26283
26441
|
t: t,
|
|
26284
26442
|
onBlur: props.onBlur,
|
|
26285
|
-
disable:
|
|
26443
|
+
disable: true,
|
|
26286
26444
|
placeholder: t("WS_WATER_CONNECTION_USAGE_TYPE")
|
|
26287
26445
|
})
|
|
26288
26446
|
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
@@ -26307,29 +26465,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26307
26465
|
placeholder: "Enter Answer",
|
|
26308
26466
|
onChange: e => handleAnswerChange(index, questionText, e.target.value)
|
|
26309
26467
|
})));
|
|
26310
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("
|
|
26311
|
-
className: "check-page-link-button"
|
|
26312
|
-
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
26313
|
-
className: "form-field"
|
|
26314
|
-
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
26315
|
-
control: control,
|
|
26316
|
-
name: "useDetails.noOfFloors",
|
|
26317
|
-
rules: {
|
|
26318
|
-
required: t("REQUIRED_FIELD")
|
|
26319
|
-
},
|
|
26320
|
-
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
26321
|
-
option: floorOptions,
|
|
26322
|
-
optionKey: "name",
|
|
26323
|
-
selected: props.value,
|
|
26324
|
-
select: props.onChange,
|
|
26325
|
-
t: t,
|
|
26326
|
-
onBlur: props.onBlur,
|
|
26327
|
-
disable: isPropertyFound,
|
|
26328
|
-
placeholder: t("WS_NUMBER_OF_FLOORS")
|
|
26329
|
-
})
|
|
26330
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.noOfFloors) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26331
|
-
style: errorStyle
|
|
26332
|
-
}, errors.useDetails.noOfFloors.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
|
|
26468
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_PLOT_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
|
|
26333
26469
|
className: "check-page-link-button"
|
|
26334
26470
|
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
26335
26471
|
className: "form-field"
|
|
@@ -26347,7 +26483,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26347
26483
|
name: "useDetails.plotArea",
|
|
26348
26484
|
disabled: isPropertyFound,
|
|
26349
26485
|
placeholder: t("WS_PLOT_AREA")
|
|
26350
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26486
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26351
26487
|
style: errorStyle
|
|
26352
26488
|
}, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_BUILT_UP_AREA")}`, " ", /*#__PURE__*/React__default.createElement("span", {
|
|
26353
26489
|
className: "check-page-link-button"
|
|
@@ -26368,7 +26504,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26368
26504
|
},
|
|
26369
26505
|
disabled: isPropertyFound,
|
|
26370
26506
|
placeholder: t("WS_BUILT_UP_AREA")
|
|
26371
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26507
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26372
26508
|
style: errorStyle
|
|
26373
26509
|
}, errors.useDetails.builtUpArea.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_HEIGHT_OF_THE_BUILDING(meters)")}`, /*#__PURE__*/React__default.createElement("span", {
|
|
26374
26510
|
className: "check-page-link-button"
|
|
@@ -26389,7 +26525,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26389
26525
|
},
|
|
26390
26526
|
disabled: isPropertyFound,
|
|
26391
26527
|
placeholder: t("WS_HEIGHT_OF_THE_BUILDING")
|
|
26392
|
-
})), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26528
|
+
})), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.heightOfTheBuilding) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26393
26529
|
style: errorStyle
|
|
26394
26530
|
}, errors.useDetails.heightOfTheBuilding.message)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_SELECT_YEAR_OF_CONSTRUCTION")}`), /*#__PURE__*/React__default.createElement("div", {
|
|
26395
26531
|
className: "form-field"
|
|
@@ -26406,7 +26542,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26406
26542
|
disable: isPropertyFound,
|
|
26407
26543
|
placeholder: t("WS_SELECT_YEAR_OF_CONSTRUCTION")
|
|
26408
26544
|
})
|
|
26409
|
-
}))), (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26545
|
+
}))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26410
26546
|
style: errorStyle
|
|
26411
26547
|
}, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_DWELLING_UNITS")}`, /*#__PURE__*/React__default.createElement("span", {
|
|
26412
26548
|
className: "check-page-link-button"
|
|
@@ -26427,7 +26563,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26427
26563
|
required: t("REQUIRED_FIELD")
|
|
26428
26564
|
},
|
|
26429
26565
|
placeholder: t("WS_NUMBER_OF_DWELLING_UNITS")
|
|
26430
|
-
}))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26566
|
+
}))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.NumberofDwellingUnits) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26431
26567
|
style: errorStyle
|
|
26432
26568
|
}, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_ROOMS")}`, /*#__PURE__*/React__default.createElement("span", {
|
|
26433
26569
|
className: "check-page-link-button"
|
|
@@ -26445,7 +26581,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26445
26581
|
name: "useDetails.NumberofRooms",
|
|
26446
26582
|
disabled: isPropertyFound,
|
|
26447
26583
|
placeholder: t("WS_NUMBER_OF_ROOMS")
|
|
26448
|
-
}))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26584
|
+
}))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofRooms) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26449
26585
|
style: errorStyle
|
|
26450
26586
|
}, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_BEDS")}`, /*#__PURE__*/React__default.createElement("span", {
|
|
26451
26587
|
className: "check-page-link-button"
|
|
@@ -26463,7 +26599,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26463
26599
|
name: "useDetails.numberOfBeds",
|
|
26464
26600
|
disabled: isPropertyFound,
|
|
26465
26601
|
placeholder: t("WS_NUMBER_OF_BEDS")
|
|
26466
|
-
}))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26602
|
+
}))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.numberOfBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26467
26603
|
style: errorStyle
|
|
26468
26604
|
}, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, `${t("WS_NUMBER_OF_STUDENTS")}`), /*#__PURE__*/React__default.createElement("div", {
|
|
26469
26605
|
className: "form-field"
|
|
@@ -26478,7 +26614,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
26478
26614
|
name: "useDetails.numberOfStudents",
|
|
26479
26615
|
disabled: isPropertyFound,
|
|
26480
26616
|
placeholder: t("WS_NUMBER_OF_STUDENTS")
|
|
26481
|
-
}))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$
|
|
26617
|
+
}))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
26482
26618
|
style: errorStyle
|
|
26483
26619
|
}, errors.useDetails.numberOfStudents.message)));
|
|
26484
26620
|
};
|
|
@@ -27371,6 +27507,10 @@ const BillAmendmentCard = () => {
|
|
|
27371
27507
|
label: t("SW_WATER_INBOX"),
|
|
27372
27508
|
link: `/digit-ui/employee/ws/sewerage/bill-amendment/inbox`,
|
|
27373
27509
|
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
|
|
27510
|
+
}, {
|
|
27511
|
+
label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Application"),
|
|
27512
|
+
link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
|
|
27513
|
+
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
27374
27514
|
}]
|
|
27375
27515
|
}), [isBillAMDInboxLoading, billData, totalCount]);
|
|
27376
27516
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
|
|
@@ -29381,6 +29521,10 @@ const WSCard = () => {
|
|
|
29381
29521
|
label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
|
|
29382
29522
|
link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
|
|
29383
29523
|
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
29524
|
+
}, {
|
|
29525
|
+
label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
|
|
29526
|
+
link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
|
|
29527
|
+
roles: ["WS_CEMP", "WS_APPROVER", "EE", "WS_DEALING_CLERK", "WS_CLERK", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER"]
|
|
29384
29528
|
}, ...links, {
|
|
29385
29529
|
label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
|
|
29386
29530
|
link: `/digit-ui/employee/ws/water/search-connection`,
|
|
@@ -30183,6 +30327,224 @@ const Inbox = _ref => {
|
|
|
30183
30327
|
})));
|
|
30184
30328
|
};
|
|
30185
30329
|
|
|
30330
|
+
const SearchBillAmendment = () => {
|
|
30331
|
+
const {
|
|
30332
|
+
t
|
|
30333
|
+
} = reactI18next.useTranslation();
|
|
30334
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
30335
|
+
const [searchResult, setSearchResult] = React.useState(null);
|
|
30336
|
+
const [isLoading, setIsLoading] = React.useState(false);
|
|
30337
|
+
const [showToast, setShowToast] = React.useState(null);
|
|
30338
|
+
const {
|
|
30339
|
+
register,
|
|
30340
|
+
handleSubmit,
|
|
30341
|
+
reset
|
|
30342
|
+
} = reactHookForm.useForm({
|
|
30343
|
+
defaultValues: {
|
|
30344
|
+
amendmentId: "",
|
|
30345
|
+
consumerCode: ""
|
|
30346
|
+
}
|
|
30347
|
+
});
|
|
30348
|
+
const convertEpochToDate = epoch => {
|
|
30349
|
+
if (!epoch) return "NA";
|
|
30350
|
+
const d = new Date(epoch);
|
|
30351
|
+
const day = String(d.getDate()).padStart(2, "0");
|
|
30352
|
+
const month = String(d.getMonth() + 1).padStart(2, "0");
|
|
30353
|
+
const year = d.getFullYear();
|
|
30354
|
+
return `${day}/${month}/${year}`;
|
|
30355
|
+
};
|
|
30356
|
+
const onSubmit = function (formData) {
|
|
30357
|
+
try {
|
|
30358
|
+
var _formData$amendmentId, _formData$consumerCod;
|
|
30359
|
+
const amendmentId = formData === null || formData === void 0 ? void 0 : (_formData$amendmentId = formData.amendmentId) === null || _formData$amendmentId === void 0 ? void 0 : _formData$amendmentId.trim();
|
|
30360
|
+
const consumerCode = formData === null || formData === void 0 ? void 0 : (_formData$consumerCod = formData.consumerCode) === null || _formData$consumerCod === void 0 ? void 0 : _formData$consumerCod.trim();
|
|
30361
|
+
if (!amendmentId && !consumerCode) {
|
|
30362
|
+
setShowToast({
|
|
30363
|
+
error: true,
|
|
30364
|
+
label: t("WS_FILL_ATLEAST_ONE_FIELD", "Please fill at least one field to search")
|
|
30365
|
+
});
|
|
30366
|
+
setTimeout(() => setShowToast(null), 3000);
|
|
30367
|
+
return Promise.resolve();
|
|
30368
|
+
}
|
|
30369
|
+
const _temp = _finallyRethrows(function () {
|
|
30370
|
+
return _catch(function () {
|
|
30371
|
+
setIsLoading(true);
|
|
30372
|
+
const params = {
|
|
30373
|
+
businessService: "WS"
|
|
30374
|
+
};
|
|
30375
|
+
if (amendmentId) params.amendmentId = amendmentId;
|
|
30376
|
+
if (consumerCode) params.consumerCode = consumerCode;
|
|
30377
|
+
return Promise.resolve(Digit.PaymentService.searchAmendment(tenantId, params)).then(function (res) {
|
|
30378
|
+
setSearchResult((res === null || res === void 0 ? void 0 : res.Amendments) || []);
|
|
30379
|
+
});
|
|
30380
|
+
}, function (err) {
|
|
30381
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
30382
|
+
console.error("Error searching bill amendment:", err);
|
|
30383
|
+
setSearchResult([]);
|
|
30384
|
+
setShowToast({
|
|
30385
|
+
error: true,
|
|
30386
|
+
label: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || t("CS_WATER_SEARCH_FAILED", "Search failed")
|
|
30387
|
+
});
|
|
30388
|
+
setTimeout(() => setShowToast(null), 5000);
|
|
30389
|
+
});
|
|
30390
|
+
}, function (_wasThrown, _result) {
|
|
30391
|
+
setIsLoading(false);
|
|
30392
|
+
if (_wasThrown) throw _result;
|
|
30393
|
+
return _result;
|
|
30394
|
+
});
|
|
30395
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
30396
|
+
} catch (e) {
|
|
30397
|
+
return Promise.reject(e);
|
|
30398
|
+
}
|
|
30399
|
+
};
|
|
30400
|
+
const onReset = () => {
|
|
30401
|
+
reset({
|
|
30402
|
+
amendmentId: "",
|
|
30403
|
+
consumerCode: ""
|
|
30404
|
+
});
|
|
30405
|
+
setSearchResult(null);
|
|
30406
|
+
};
|
|
30407
|
+
const columns = React.useMemo(() => [{
|
|
30408
|
+
Header: t("WS_ACK_COMMON_APP_NO_LABEL", "Application No"),
|
|
30409
|
+
accessor: "amendmentId",
|
|
30410
|
+
Cell: _ref => {
|
|
30411
|
+
let {
|
|
30412
|
+
row
|
|
30413
|
+
} = _ref;
|
|
30414
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
30415
|
+
className: "link"
|
|
30416
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
30417
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
30418
|
+
}, row.original.amendmentId));
|
|
30419
|
+
}
|
|
30420
|
+
}, {
|
|
30421
|
+
Header: t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No"),
|
|
30422
|
+
accessor: "consumerCode",
|
|
30423
|
+
Cell: _ref2 => {
|
|
30424
|
+
let {
|
|
30425
|
+
row
|
|
30426
|
+
} = _ref2;
|
|
30427
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
30428
|
+
className: "link"
|
|
30429
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
30430
|
+
to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original.consumerCode}&tenantId=${tenantId}&service=WATER`
|
|
30431
|
+
}, row.original.consumerCode));
|
|
30432
|
+
}
|
|
30433
|
+
}, {
|
|
30434
|
+
Header: t("WS_AMENDMENT_REASON", "Amendment Reason"),
|
|
30435
|
+
accessor: row => t((row === null || row === void 0 ? void 0 : row.amendmentReason) || "NA")
|
|
30436
|
+
}, {
|
|
30437
|
+
Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS", "Status"),
|
|
30438
|
+
accessor: row => t((row === null || row === void 0 ? void 0 : row.status) || "NA")
|
|
30439
|
+
}, {
|
|
30440
|
+
Header: t("WS_COMMON_TABLE_COL_APPLICATION_DATE", "Application Date"),
|
|
30441
|
+
accessor: row => {
|
|
30442
|
+
var _row$auditDetails;
|
|
30443
|
+
return convertEpochToDate(row === null || row === void 0 ? void 0 : (_row$auditDetails = row.auditDetails) === null || _row$auditDetails === void 0 ? void 0 : _row$auditDetails.createdTime);
|
|
30444
|
+
}
|
|
30445
|
+
}, {
|
|
30446
|
+
Header: t("WS_COMMON_TABLE_COL_ACTION", "Action"),
|
|
30447
|
+
Cell: _ref3 => {
|
|
30448
|
+
let {
|
|
30449
|
+
row
|
|
30450
|
+
} = _ref3;
|
|
30451
|
+
return /*#__PURE__*/React__default.createElement("span", {
|
|
30452
|
+
className: "link"
|
|
30453
|
+
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
30454
|
+
to: `/digit-ui/employee/ws/generate-note-bill-amendment?applicationNumber=${row.original.amendmentId}`
|
|
30455
|
+
}, t("ES_COMMON_VIEW", "View")));
|
|
30456
|
+
}
|
|
30457
|
+
}], [t, tenantId]);
|
|
30458
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
30459
|
+
className: "employee-wrapper",
|
|
30460
|
+
style: {
|
|
30461
|
+
padding: "16px"
|
|
30462
|
+
}
|
|
30463
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
30464
|
+
styles: {
|
|
30465
|
+
fontSize: "32px",
|
|
30466
|
+
marginBottom: "16px"
|
|
30467
|
+
}
|
|
30468
|
+
}, t("WS_SEARCH_BILL_AMENDMENT_APPLICATION", "Search Bill Amendment Application")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
30469
|
+
style: {
|
|
30470
|
+
padding: "24px",
|
|
30471
|
+
marginBottom: "24px"
|
|
30472
|
+
}
|
|
30473
|
+
}, /*#__PURE__*/React__default.createElement("form", {
|
|
30474
|
+
onSubmit: handleSubmit(onSubmit)
|
|
30475
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
30476
|
+
style: {
|
|
30477
|
+
display: "grid",
|
|
30478
|
+
gridTemplateColumns: "1fr 1fr",
|
|
30479
|
+
gap: "24px",
|
|
30480
|
+
marginBottom: "24px"
|
|
30481
|
+
}
|
|
30482
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
30483
|
+
style: {
|
|
30484
|
+
fontWeight: "600",
|
|
30485
|
+
marginBottom: "8px"
|
|
30486
|
+
}
|
|
30487
|
+
}, t("WS_ACK_COMMON_APP_NO_LABEL", "Application No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
30488
|
+
name: "amendmentId",
|
|
30489
|
+
inputRef: register(),
|
|
30490
|
+
placeholder: t("WS_SEARCH_APP_NO_PLACEHOLDER", "Enter Bill Amendment Application No")
|
|
30491
|
+
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
30492
|
+
style: {
|
|
30493
|
+
fontWeight: "600",
|
|
30494
|
+
marginBottom: "8px"
|
|
30495
|
+
}
|
|
30496
|
+
}, t("WS_MYCONNECTIONS_CONSUMER_NO", "Consumer No")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
30497
|
+
name: "consumerCode",
|
|
30498
|
+
inputRef: register(),
|
|
30499
|
+
placeholder: t("WS_SEARCH_CONSUMER_NO_PLACEHOLDER", "Enter Consumer / Connection No")
|
|
30500
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
30501
|
+
style: {
|
|
30502
|
+
display: "flex",
|
|
30503
|
+
gap: "16px",
|
|
30504
|
+
alignItems: "center"
|
|
30505
|
+
}
|
|
30506
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
30507
|
+
label: t("ES_COMMON_SEARCH", "Search"),
|
|
30508
|
+
submit: true
|
|
30509
|
+
}), /*#__PURE__*/React__default.createElement("button", {
|
|
30510
|
+
type: "button",
|
|
30511
|
+
className: "clear-search generic-button",
|
|
30512
|
+
onClick: onReset,
|
|
30513
|
+
style: {
|
|
30514
|
+
background: "transparent",
|
|
30515
|
+
border: "none",
|
|
30516
|
+
color: "#a82227",
|
|
30517
|
+
cursor: "pointer",
|
|
30518
|
+
fontWeight: "600",
|
|
30519
|
+
fontSize: "16px"
|
|
30520
|
+
}
|
|
30521
|
+
}, t("ES_COMMON_CLEAR_SEARCH", "Clear Search"))))), isLoading && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null), !isLoading && searchResult && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
30522
|
+
style: {
|
|
30523
|
+
padding: "16px"
|
|
30524
|
+
}
|
|
30525
|
+
}, searchResult.length > 0 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Table, {
|
|
30526
|
+
t: t,
|
|
30527
|
+
data: searchResult,
|
|
30528
|
+
columns: columns,
|
|
30529
|
+
getCellProps: () => ({
|
|
30530
|
+
style: {
|
|
30531
|
+
minWidth: "140px",
|
|
30532
|
+
padding: "16px 14px",
|
|
30533
|
+
fontSize: "14px"
|
|
30534
|
+
}
|
|
30535
|
+
})
|
|
30536
|
+
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, {
|
|
30537
|
+
style: {
|
|
30538
|
+
textAlign: "center",
|
|
30539
|
+
padding: "24px"
|
|
30540
|
+
}
|
|
30541
|
+
}, t("ES_COMMON_NO_DATA", "No applications found"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
30542
|
+
error: showToast.error,
|
|
30543
|
+
label: showToast.label,
|
|
30544
|
+
onClose: () => setShowToast(null)
|
|
30545
|
+
}));
|
|
30546
|
+
};
|
|
30547
|
+
|
|
30186
30548
|
const newConfig = [{
|
|
30187
30549
|
head: "",
|
|
30188
30550
|
body: [{
|
|
@@ -34295,7 +34657,7 @@ const checkForNA$2 = value => {
|
|
|
34295
34657
|
return value ? value : "CS_NA";
|
|
34296
34658
|
};
|
|
34297
34659
|
const WSApplicationDetails = () => {
|
|
34298
|
-
var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect9, _data$SewerageConnect0, _data$WaterConnection1, _data$WaterConnection10, _data$SewerageConnect1, _data$SewerageConnect10, _data$WaterConnection11, _data$WaterConnection12, _data$SewerageConnect11, _data$SewerageConnect12, _data$WaterConnection13, _data$SewerageConnect13, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _data$WaterConnection14, _data$WaterConnection15, _data$WaterConnection16, _data$WaterConnection17, _data$SewerageConnect14, _data$SewerageConnect15, _data$SewerageConnect16, _data$SewerageConnect17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect18, _data$SewerageConnect19, _appDetailsData$appli, _data$WaterConnection38, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect34, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _appDetailsData$appli2, _data$WaterConnection43, _data$WaterConnection44, _data$WaterConnection45, _data$SewerageConnect39, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection46, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$SewerageConnect44, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$WaterConnection57, _data$SewerageConnect50, _data$SewerageConnect51, _data$SewerageConnect52, _data$WaterConnection58, _data$WaterConnection59, _data$SewerageConnect53, _data$SewerageConnect54, _data$WaterConnection60, _data$WaterConnection61, _data$SewerageConnect55, _data$SewerageConnect56, _data$WaterConnection62, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect57, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$SewerageConnect60, _data$SewerageConnect61, _data$WaterConnection67, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect62, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$WaterConnection75, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$SewerageConnect70, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _applicationData$addi, _applicationData$addi2, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection79, _data$WaterConnection80, _data$WaterConnection81, _data$SewerageConnect74, _data$SewerageConnect75, _data$SewerageConnect76, _data$WaterConnection82, _data$WaterConnection83, _data$WaterConnection84, _data$WaterConnection85, _data$SewerageConnect77, _data$SewerageConnect78, _data$SewerageConnect79, _data$SewerageConnect80, _data$WaterConnection86, _data$WaterConnection87, _data$WaterConnection88, _data$WaterConnection89, _data$SewerageConnect81, _data$SewerageConnect82, _data$SewerageConnect83, _data$SewerageConnect84, _data$WaterConnection90, _data$WaterConnection91, _data$WaterConnection92, _data$WaterConnection93, _data$SewerageConnect85, _data$SewerageConnect86, _data$SewerageConnect87, _data$SewerageConnect88, _data$WaterConnection94, _data$WaterConnection95, _data$WaterConnection96, _data$WaterConnection97, _data$SewerageConnect89, _data$SewerageConnect90, _data$SewerageConnect91, _data$SewerageConnect92, _data$WaterConnection98, _data$WaterConnection99, _data$WaterConnection100, _data$WaterConnection101, _data$SewerageConnect93, _data$SewerageConnect94, _data$SewerageConnect95, _data$SewerageConnect96, _data$WaterConnection102, _data$WaterConnection103, _data$WaterConnection104, _data$WaterConnection105, _data$SewerageConnect97, _data$SewerageConnect98, _data$SewerageConnect99, _data$SewerageConnect100, _data$WaterConnection106, _data$WaterConnection107, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect101, _data$SewerageConnect102, _data$SewerageConnect103, _data$SewerageConnect104, _data$WaterConnection110, _data$WaterConnection111, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect105, _data$SewerageConnect106, _data$SewerageConnect107, _data$SewerageConnect108, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection120, _data$WaterConnection121, _data$SewerageConnect115, _data$SewerageConnect116, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect117, _data$SewerageConnect118, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _propertyAdditionalDe, _propertyAdditionalDe2, _PTData$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _applicationData$addi3, _applicationData$addi4, _applicationData$addi5, _applicationData$prop, _applicationData$prop2, _applicationData$prop3, _applicationData$addi6, _applicationData$addi7, _applicationData$prop4, _applicationData$prop5, _applicationData$addi8, _applicationData$addi9, _applicationData$prop6, _applicationData$prop7, _applicationData$dueV, _data$WaterConnection124, _data$WaterConnection125, _data$WaterConnection126, _data$WaterConnection127, _data$SewerageConnect119, _data$SewerageConnect120, _data$SewerageConnect121, _data$SewerageConnect122, _data$WaterConnection130, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$WaterConnection135, _data$SewerageConnect125, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$SewerageConnect130, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect136, _data$SewerageConnect137, _data$SewerageConnect138, _data$SewerageConnect139, _data$SewerageConnect140, _data$WaterConnection146, _data$WaterConnection147, _data$SewerageConnect141, _data$SewerageConnect142, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect143, _data$SewerageConnect144, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect145, _data$SewerageConnect146, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$SewerageConnect147, _data$SewerageConnect148, _data$WaterConnection155, _data$WaterConnection156, _data$SewerageConnect149, _data$SewerageConnect150, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160, _data$WaterConnection161, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$SewerageConnect155, _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$SewerageConnect162, _data$SewerageConnect163, _data$SewerageConnect164, _data$SewerageConnect165, _data$SewerageConnect166, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$WaterConnection167, _data$WaterConnection168, _data$WaterConnection169, _data$WaterConnection170, _data$WaterConnection171, _data$WaterConnection172, _data$WaterConnection173, _data$WaterConnection174, _data$WaterConnection175, _data$WaterConnection176, _data$SewerageConnect167, _data$SewerageConnect168, _data$SewerageConnect169, _data$SewerageConnect170, _data$WaterConnection177, _data$SewerageConnect171, _data$WaterConnection178, _data$WaterConnection179, _data$WaterConnection180, _data$WaterConnection181, _data$SewerageConnect172, _data$SewerageConnect173, _data$SewerageConnect174, _data$WaterConnection182, _data$WaterConnection183, _data$WaterConnection184, _data$SewerageConnect175, _data$SewerageConnect176, _data$SewerageConnect177, _data$WaterConnection185, _data$WaterConnection186, _data$SewerageConnect178, _data$SewerageConnect179, _data$WaterConnection187, _data$WaterConnection188, _data$SewerageConnect180;
|
|
34660
|
+
var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$WaterConnection8, _data$SewerageConnect6, _data$SewerageConnect7, _data$SewerageConnect8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect9, _data$SewerageConnect0, _data$WaterConnection1, _data$WaterConnection10, _data$SewerageConnect1, _data$SewerageConnect10, _data$WaterConnection11, _data$WaterConnection12, _data$SewerageConnect11, _data$SewerageConnect12, _data$WaterConnection13, _data$SewerageConnect13, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _data$WaterConnection14, _data$WaterConnection15, _data$WaterConnection16, _data$WaterConnection17, _data$SewerageConnect14, _data$SewerageConnect15, _data$SewerageConnect16, _data$SewerageConnect17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect18, _data$SewerageConnect19, _appDetailsData$appli, _data$WaterConnection38, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect34, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _appDetailsData$appli2, _data$WaterConnection43, _data$WaterConnection44, _data$WaterConnection45, _data$SewerageConnect39, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection46, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$SewerageConnect44, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$WaterConnection57, _data$SewerageConnect50, _data$SewerageConnect51, _data$SewerageConnect52, _data$WaterConnection58, _data$WaterConnection59, _data$SewerageConnect53, _data$SewerageConnect54, _data$WaterConnection60, _data$WaterConnection61, _data$SewerageConnect55, _data$SewerageConnect56, _data$WaterConnection62, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect57, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$SewerageConnect60, _data$SewerageConnect61, _data$WaterConnection67, _data$WaterConnection68, _data$WaterConnection69, _data$SewerageConnect62, _data$SewerageConnect63, _data$SewerageConnect64, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$WaterConnection75, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$SewerageConnect70, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$ad, _connectionDetails$ad2, _connectionDetails$ad3, _applicationData$addi, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection79, _data$WaterConnection80, _data$WaterConnection81, _data$SewerageConnect74, _data$SewerageConnect75, _data$SewerageConnect76, _data$WaterConnection82, _data$WaterConnection83, _data$WaterConnection84, _data$WaterConnection85, _data$SewerageConnect77, _data$SewerageConnect78, _data$SewerageConnect79, _data$SewerageConnect80, _data$WaterConnection86, _data$WaterConnection87, _data$WaterConnection88, _data$WaterConnection89, _data$SewerageConnect81, _data$SewerageConnect82, _data$SewerageConnect83, _data$SewerageConnect84, _data$WaterConnection90, _data$WaterConnection91, _data$WaterConnection92, _data$WaterConnection93, _data$SewerageConnect85, _data$SewerageConnect86, _data$SewerageConnect87, _data$SewerageConnect88, _data$WaterConnection94, _data$WaterConnection95, _data$WaterConnection96, _data$WaterConnection97, _data$SewerageConnect89, _data$SewerageConnect90, _data$SewerageConnect91, _data$SewerageConnect92, _data$WaterConnection98, _data$WaterConnection99, _data$WaterConnection100, _data$WaterConnection101, _data$SewerageConnect93, _data$SewerageConnect94, _data$SewerageConnect95, _data$SewerageConnect96, _data$WaterConnection102, _data$WaterConnection103, _data$WaterConnection104, _data$WaterConnection105, _data$SewerageConnect97, _data$SewerageConnect98, _data$SewerageConnect99, _data$SewerageConnect100, _data$WaterConnection106, _data$WaterConnection107, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect101, _data$SewerageConnect102, _data$SewerageConnect103, _data$SewerageConnect104, _data$WaterConnection110, _data$WaterConnection111, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect105, _data$SewerageConnect106, _data$SewerageConnect107, _data$SewerageConnect108, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection118, _data$WaterConnection119, _data$SewerageConnect113, _data$SewerageConnect114, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection120, _data$WaterConnection121, _data$SewerageConnect115, _data$SewerageConnect116, _data$WaterConnection122, _data$WaterConnection123, _data$SewerageConnect117, _data$SewerageConnect118, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _propertyAdditionalDe, _propertyAdditionalDe2, _PTData$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _useDetails$propertyC3, _useDetails$propertyC4, _applicationData$addi4, _applicationData$addi5, _applicationData$addi6, _applicationData$prop, _applicationData$prop2, _applicationData$prop3, _applicationData$addi7, _applicationData$addi8, _applicationData$prop4, _applicationData$prop5, _applicationData$addi9, _applicationData$addi0, _applicationData$prop6, _applicationData$prop7, _applicationData$dueV, _data$WaterConnection124, _data$WaterConnection125, _data$WaterConnection126, _data$WaterConnection127, _data$SewerageConnect119, _data$SewerageConnect120, _data$SewerageConnect121, _data$SewerageConnect122, _data$WaterConnection130, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$WaterConnection135, _data$SewerageConnect125, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$SewerageConnect130, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect136, _data$SewerageConnect137, _data$SewerageConnect138, _data$SewerageConnect139, _data$SewerageConnect140, _data$WaterConnection146, _data$WaterConnection147, _data$SewerageConnect141, _data$SewerageConnect142, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect143, _data$SewerageConnect144, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect145, _data$SewerageConnect146, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$SewerageConnect147, _data$SewerageConnect148, _data$WaterConnection155, _data$WaterConnection156, _data$SewerageConnect149, _data$SewerageConnect150, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160, _data$WaterConnection161, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$SewerageConnect155, _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157, _data$SewerageConnect158, _data$SewerageConnect159, _data$SewerageConnect160, _data$SewerageConnect161, _data$SewerageConnect162, _data$SewerageConnect163, _data$SewerageConnect164, _data$SewerageConnect165, _data$SewerageConnect166, _data$WaterConnection164, _data$WaterConnection165, _data$WaterConnection166, _data$WaterConnection167, _data$WaterConnection168, _data$WaterConnection169, _data$WaterConnection170, _data$WaterConnection171, _data$WaterConnection172, _data$WaterConnection173, _data$WaterConnection174, _data$WaterConnection175, _data$WaterConnection176, _data$SewerageConnect167, _data$SewerageConnect168, _data$SewerageConnect169, _data$SewerageConnect170, _data$WaterConnection177, _data$SewerageConnect171, _data$WaterConnection178, _data$WaterConnection179, _data$WaterConnection180, _data$WaterConnection181, _data$SewerageConnect172, _data$SewerageConnect173, _data$SewerageConnect174, _data$WaterConnection182, _data$WaterConnection183, _data$WaterConnection184, _data$SewerageConnect175, _data$SewerageConnect176, _data$SewerageConnect177, _data$WaterConnection185, _data$WaterConnection186, _data$SewerageConnect178, _data$SewerageConnect179, _data$WaterConnection187, _data$WaterConnection188, _data$SewerageConnect180;
|
|
34299
34661
|
const getDisconnectionNoticeSearch = function () {
|
|
34300
34662
|
try {
|
|
34301
34663
|
var _data$WaterConnection190, _data$WaterConnection191, _data$SewerageConnect182, _data$SewerageConnect183;
|
|
@@ -34789,10 +35151,17 @@ const WSApplicationDetails = () => {
|
|
|
34789
35151
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
34790
35152
|
label: t("WS_Billing_Address_Type"),
|
|
34791
35153
|
text: `${t(checkForNA$2((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad = connectionDetails.addressType) === null || _connectionDetails$ad === void 0 ? void 0 : _connectionDetails$ad.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad2 = connectionDetails.addressType) === null || _connectionDetails$ad2 === void 0 ? void 0 : _connectionDetails$ad2.name) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad3 = connectionDetails.addressType) === null || _connectionDetails$ad3 === void 0 ? void 0 : _connectionDetails$ad3.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.addressType)))}`
|
|
34792
|
-
}),
|
|
34793
|
-
|
|
34794
|
-
|
|
34795
|
-
|
|
35154
|
+
}), ((_connectionDetails$ad4, _connectionDetails$ad5, _applicationData$addi2, _applicationData$addi3) => {
|
|
35155
|
+
const addrTypeStr = (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType : (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad4 = connectionDetails.addressType) === null || _connectionDetails$ad4 === void 0 ? void 0 : _connectionDetails$ad4.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad5 = connectionDetails.addressType) === null || _connectionDetails$ad5 === void 0 ? void 0 : _connectionDetails$ad5.name)) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi2 = applicationData.additionalDetails) === null || _applicationData$addi2 === void 0 ? void 0 : _applicationData$addi2.addressType) || "";
|
|
35156
|
+
const compAddrStr = (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.completeAddress) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi3 = applicationData.additionalDetails) === null || _applicationData$addi3 === void 0 ? void 0 : _applicationData$addi3.completeAddress) || "";
|
|
35157
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
35158
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
35159
|
+
label: t("Complete Address"),
|
|
35160
|
+
text: `${checkForNA$2(compAddrStr)}`
|
|
35161
|
+
});
|
|
35162
|
+
}
|
|
35163
|
+
return null;
|
|
35164
|
+
})(), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
34796
35165
|
label: t("WS_DIVYANGJAN"),
|
|
34797
35166
|
text: `${connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
|
|
34798
35167
|
}), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.code) === "ORGANIZATION" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
@@ -35044,10 +35413,10 @@ const WSApplicationDetails = () => {
|
|
|
35044
35413
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
35045
35414
|
label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
|
|
35046
35415
|
text: `${t(checkForNA$2((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)))}`
|
|
35047
|
-
}), 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) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
35416
|
+
}), 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) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi4 = applicationData.additionalDetails) === null || _applicationData$addi4 === void 0 ? void 0 : (_applicationData$addi5 = _applicationData$addi4.propertyCategory) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.code) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop = applicationData.property) === null || _applicationData$prop === void 0 ? void 0 : (_applicationData$prop2 = _applicationData$prop.propertyType) === null || _applicationData$prop2 === void 0 ? void 0 : _applicationData$prop2.propertyCategory) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop3 = applicationData.property) === null || _applicationData$prop3 === void 0 ? void 0 : _applicationData$prop3.usageCategory) || "").toUpperCase().includes("RESIDENTIAL") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
35048
35417
|
label: t("WS_NUMBER_OF_DWELLING_UNITS"),
|
|
35049
35418
|
text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
|
|
35050
|
-
}) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
35419
|
+
}) : null, (Array.isArray((useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi7 = applicationData.additionalDetails) === null || _applicationData$addi7 === void 0 ? void 0 : _applicationData$addi7.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi8 = applicationData.additionalDetails) === null || _applicationData$addi8 === void 0 ? void 0 : _applicationData$addi8.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop4 = applicationData.property) === null || _applicationData$prop4 === void 0 ? void 0 : (_applicationData$prop5 = _applicationData$prop4.additionalDetails) === null || _applicationData$prop5 === void 0 ? void 0 : _applicationData$prop5.questions)) ? (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questions) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi9 = applicationData.additionalDetails) === null || _applicationData$addi9 === void 0 ? void 0 : _applicationData$addi9.questions) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi0 = applicationData.additionalDetails) === null || _applicationData$addi0 === void 0 ? void 0 : _applicationData$addi0.questionAnswers) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$prop6 = applicationData.property) === null || _applicationData$prop6 === void 0 ? void 0 : (_applicationData$prop7 = _applicationData$prop6.additionalDetails) === null || _applicationData$prop7 === void 0 ? void 0 : _applicationData$prop7.questions) : []).map((q, idx) => {
|
|
35051
35420
|
var _q$answer, _q$answer2, _q$answer3;
|
|
35052
35421
|
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}`;
|
|
35053
35422
|
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;
|
|
@@ -37730,12 +38099,21 @@ const EditApplication = _ref => {
|
|
|
37730
38099
|
});
|
|
37731
38100
|
let isModifyEdit = window.location.href.includes("/modify-connection") || window.location.href.includes("/edit-application");
|
|
37732
38101
|
React.useEffect(() => {
|
|
37733
|
-
var
|
|
38102
|
+
var _currentApp$additiona, _params$additionalDet, _params$additionalDet2, _currentApp$additiona2, _currentApp$auditDeta, _params$auditDetails, _params$auditDetails2, _currentApp$auditDeta2;
|
|
38103
|
+
if (window.location.href.includes("/acknowledgement")) {
|
|
38104
|
+
return;
|
|
38105
|
+
}
|
|
37734
38106
|
waterapplication = Waterresult;
|
|
37735
38107
|
sewerageapplication = Sewarageresult;
|
|
37736
|
-
|
|
37737
|
-
|
|
37738
|
-
|
|
38108
|
+
const currentApp = waterapplication || sewerageapplication;
|
|
38109
|
+
const currentAppNo = currentApp === null || currentApp === void 0 ? void 0 : currentApp.applicationNo;
|
|
38110
|
+
const isAppLoaded = !!currentAppNo;
|
|
38111
|
+
const isDifferentApp = (params === null || params === void 0 ? void 0 : params.applicationNo) && currentAppNo && (params === null || params === void 0 ? void 0 : params.applicationNo) !== currentAppNo;
|
|
38112
|
+
const isNotHydrated = !(Object.keys(params).length > 0) || !(params !== null && params !== void 0 && params.DocumentsRequired);
|
|
38113
|
+
const isSatisfiedChanged = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona = currentApp.additionalDetails) === null || _currentApp$additiona === void 0 ? void 0 : _currentApp$additiona.CompletelySatisfied) !== undefined && (params === null || params === void 0 ? void 0 : (_params$additionalDet = params.additionalDetails) === null || _params$additionalDet === void 0 ? void 0 : _params$additionalDet.CompletelySatisfied) !== undefined && (params === null || params === void 0 ? void 0 : (_params$additionalDet2 = params.additionalDetails) === null || _params$additionalDet2 === void 0 ? void 0 : _params$additionalDet2.CompletelySatisfied) !== (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona2 = currentApp.additionalDetails) === null || _currentApp$additiona2 === void 0 ? void 0 : _currentApp$additiona2.CompletelySatisfied);
|
|
38114
|
+
const isAuditChanged = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$auditDeta = currentApp.auditDetails) === null || _currentApp$auditDeta === void 0 ? void 0 : _currentApp$auditDeta.lastModifiedTime) && (params === null || params === void 0 ? void 0 : (_params$auditDetails = params.auditDetails) === null || _params$auditDetails === void 0 ? void 0 : _params$auditDetails.lastModifiedTime) && (params === null || params === void 0 ? void 0 : (_params$auditDetails2 = params.auditDetails) === null || _params$auditDetails2 === void 0 ? void 0 : _params$auditDetails2.lastModifiedTime) !== (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$auditDeta2 = currentApp.auditDetails) === null || _currentApp$auditDeta2 === void 0 ? void 0 : _currentApp$auditDeta2.lastModifiedTime);
|
|
38115
|
+
const isStatusChanged = (currentApp === null || currentApp === void 0 ? void 0 : currentApp.applicationStatus) && (params === null || params === void 0 ? void 0 : params.applicationStatus) && (params === null || params === void 0 ? void 0 : params.applicationStatus) !== (currentApp === null || currentApp === void 0 ? void 0 : currentApp.applicationStatus);
|
|
38116
|
+
if (isAppLoaded && (isNotHydrated || isDifferentApp || isSatisfiedChanged || isAuditChanged || isStatusChanged)) {
|
|
37739
38117
|
if (window.location.href.includes("edit-application")) {
|
|
37740
38118
|
if (waterapplication) {
|
|
37741
38119
|
waterapplication.isEditApplication = true;
|
|
@@ -37762,63 +38140,110 @@ const EditApplication = _ref => {
|
|
|
37762
38140
|
...sewerageapplication
|
|
37763
38141
|
}));
|
|
37764
38142
|
let EditDetails = getEditDetails(waterapplication, sewerageapplication, t);
|
|
37765
|
-
setParams(
|
|
37766
|
-
|
|
37767
|
-
|
|
37768
|
-
|
|
37769
|
-
|
|
37770
|
-
|
|
37771
|
-
let currentApp = Waterresult || Sewarageresult;
|
|
37772
|
-
const addrType = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona = currentApp.additionalDetails) === null || _currentApp$additiona === void 0 ? void 0 : _currentApp$additiona.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio = currentApp.ConnectionDetails) === null || _currentApp$Connectio === void 0 ? void 0 : (_currentApp$Connectio2 = _currentApp$Connectio[0]) === null || _currentApp$Connectio2 === void 0 ? void 0 : _currentApp$Connectio2.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.addressType);
|
|
37773
|
-
const compAddr = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona2 = currentApp.additionalDetails) === null || _currentApp$additiona2 === void 0 ? void 0 : _currentApp$additiona2.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio3 = currentApp.ConnectionDetails) === null || _currentApp$Connectio3 === void 0 ? void 0 : (_currentApp$Connectio4 = _currentApp$Connectio3[0]) === null || _currentApp$Connectio4 === void 0 ? void 0 : _currentApp$Connectio4.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.completeAddress);
|
|
37774
|
-
const needsAddressSync = !(params !== null && params !== void 0 && (_params$ConnectionDet5 = params.ConnectionDetails) !== null && _params$ConnectionDet5 !== void 0 && (_params$ConnectionDet6 = _params$ConnectionDet5[0]) !== null && _params$ConnectionDet6 !== void 0 && _params$ConnectionDet6.addressType) && addrType || !(params !== null && params !== void 0 && (_params$ConnectionDet7 = params.ConnectionDetails) !== null && _params$ConnectionDet7 !== void 0 && (_params$ConnectionDet8 = _params$ConnectionDet7[0]) !== null && _params$ConnectionDet8 !== void 0 && _params$ConnectionDet8.completeAddress) && compAddr;
|
|
38143
|
+
setParams(EditDetails);
|
|
38144
|
+
} else if (Object.keys(params).length > 0 && currentApp) {
|
|
38145
|
+
var _currentApp$additiona3, _currentApp$Connectio, _currentApp$Connectio2, _currentApp$additiona4, _currentApp$Connectio3, _currentApp$Connectio4, _params$ConnectionDet, _params$ConnectionDet2, _params$ConnectionDet3, _params$ConnectionDet4, _currentApp$additiona5, _params$additionalDet3;
|
|
38146
|
+
const addrType = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona3 = currentApp.additionalDetails) === null || _currentApp$additiona3 === void 0 ? void 0 : _currentApp$additiona3.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio = currentApp.ConnectionDetails) === null || _currentApp$Connectio === void 0 ? void 0 : (_currentApp$Connectio2 = _currentApp$Connectio[0]) === null || _currentApp$Connectio2 === void 0 ? void 0 : _currentApp$Connectio2.addressType) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.addressType);
|
|
38147
|
+
const compAddr = (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona4 = currentApp.additionalDetails) === null || _currentApp$additiona4 === void 0 ? void 0 : _currentApp$additiona4.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$Connectio3 = currentApp.ConnectionDetails) === null || _currentApp$Connectio3 === void 0 ? void 0 : (_currentApp$Connectio4 = _currentApp$Connectio3[0]) === null || _currentApp$Connectio4 === void 0 ? void 0 : _currentApp$Connectio4.completeAddress) || (currentApp === null || currentApp === void 0 ? void 0 : currentApp.completeAddress);
|
|
38148
|
+
const needsAddressSync = !(params !== null && params !== void 0 && (_params$ConnectionDet = params.ConnectionDetails) !== null && _params$ConnectionDet !== void 0 && (_params$ConnectionDet2 = _params$ConnectionDet[0]) !== null && _params$ConnectionDet2 !== void 0 && _params$ConnectionDet2.addressType) && addrType || !(params !== null && params !== void 0 && (_params$ConnectionDet3 = params.ConnectionDetails) !== null && _params$ConnectionDet3 !== void 0 && (_params$ConnectionDet4 = _params$ConnectionDet3[0]) !== null && _params$ConnectionDet4 !== void 0 && _params$ConnectionDet4.completeAddress) && compAddr;
|
|
37775
38149
|
const needsDueSync = currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification);
|
|
37776
|
-
|
|
37777
|
-
|
|
37778
|
-
|
|
37779
|
-
|
|
37780
|
-
|
|
37781
|
-
|
|
37782
|
-
|
|
37783
|
-
|
|
37784
|
-
|
|
37785
|
-
|
|
37786
|
-
|
|
37787
|
-
|
|
37788
|
-
|
|
37789
|
-
|
|
37790
|
-
|
|
37791
|
-
|
|
37792
|
-
|
|
37793
|
-
|
|
37794
|
-
|
|
37795
|
-
|
|
37796
|
-
|
|
37797
|
-
|
|
37798
|
-
|
|
37799
|
-
|
|
37800
|
-
|
|
37801
|
-
|
|
37802
|
-
|
|
37803
|
-
|
|
37804
|
-
|
|
37805
|
-
|
|
37806
|
-
|
|
37807
|
-
|
|
38150
|
+
const backendSatisfied = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona5 = currentApp.additionalDetails) === null || _currentApp$additiona5 === void 0 ? void 0 : _currentApp$additiona5.CompletelySatisfied;
|
|
38151
|
+
const needsSatisfiedSync = backendSatisfied !== undefined && (params === null || params === void 0 ? void 0 : (_params$additionalDet3 = params.additionalDetails) === null || _params$additionalDet3 === void 0 ? void 0 : _params$additionalDet3.CompletelySatisfied) !== backendSatisfied;
|
|
38152
|
+
if (needsAddressSync || needsDueSync || needsSatisfiedSync) {
|
|
38153
|
+
setParams(prevParams => {
|
|
38154
|
+
let updatedParams = {
|
|
38155
|
+
...prevParams
|
|
38156
|
+
};
|
|
38157
|
+
if (needsAddressSync) {
|
|
38158
|
+
var _prevParams$Connectio, _prevParams$Connectio2;
|
|
38159
|
+
const addrTypeObj = typeof addrType === "object" && addrType !== null && addrType !== void 0 && addrType.code ? addrType : String(addrType).toUpperCase() === "PERMANENT" ? {
|
|
38160
|
+
i18nKey: "Permanent",
|
|
38161
|
+
code: "PERMANENT"
|
|
38162
|
+
} : String(addrType).toUpperCase() === "CORRESPONDENCE" ? {
|
|
38163
|
+
i18nKey: "Correspondence",
|
|
38164
|
+
code: "CORRESPONDENCE"
|
|
38165
|
+
} : addrType ? {
|
|
38166
|
+
i18nKey: addrType,
|
|
38167
|
+
code: addrType
|
|
38168
|
+
} : null;
|
|
38169
|
+
const updatedConnDetails = prevParams !== null && prevParams !== void 0 && prevParams.ConnectionDetails ? [{
|
|
38170
|
+
...prevParams.ConnectionDetails[0],
|
|
38171
|
+
addressType: ((_prevParams$Connectio = prevParams.ConnectionDetails[0]) === null || _prevParams$Connectio === void 0 ? void 0 : _prevParams$Connectio.addressType) || addrTypeObj,
|
|
38172
|
+
completeAddress: ((_prevParams$Connectio2 = prevParams.ConnectionDetails[0]) === null || _prevParams$Connectio2 === void 0 ? void 0 : _prevParams$Connectio2.completeAddress) || compAddr || ""
|
|
38173
|
+
}] : [{
|
|
38174
|
+
addressType: addrTypeObj,
|
|
38175
|
+
completeAddress: compAddr || ""
|
|
38176
|
+
}];
|
|
38177
|
+
updatedParams.ConnectionDetails = updatedConnDetails;
|
|
38178
|
+
updatedParams.addressType = updatedParams.addressType || addrTypeObj;
|
|
38179
|
+
updatedParams.completeAddress = updatedParams.completeAddress || compAddr || "";
|
|
38180
|
+
}
|
|
38181
|
+
if (needsDueSync) {
|
|
38182
|
+
updatedParams.dueVerification = currentApp.dueVerification;
|
|
38183
|
+
}
|
|
38184
|
+
if (needsSatisfiedSync) {
|
|
38185
|
+
var _updatedParams$WaterC, _updatedParams$WaterC2, _updatedParams$Sewera, _updatedParams$Sewera2;
|
|
38186
|
+
updatedParams.additionalDetails = {
|
|
38187
|
+
...updatedParams.additionalDetails,
|
|
38188
|
+
CompletelySatisfied: backendSatisfied
|
|
38189
|
+
};
|
|
38190
|
+
if (updatedParams !== null && updatedParams !== void 0 && (_updatedParams$WaterC = updatedParams.WaterConnectionResult) !== null && _updatedParams$WaterC !== void 0 && (_updatedParams$WaterC2 = _updatedParams$WaterC.WaterConnection) !== null && _updatedParams$WaterC2 !== void 0 && _updatedParams$WaterC2[0]) {
|
|
38191
|
+
var _updatedParams$WaterC3;
|
|
38192
|
+
updatedParams.WaterConnectionResult.WaterConnection[0].additionalDetails = {
|
|
38193
|
+
...((_updatedParams$WaterC3 = updatedParams.WaterConnectionResult.WaterConnection[0]) === null || _updatedParams$WaterC3 === void 0 ? void 0 : _updatedParams$WaterC3.additionalDetails),
|
|
38194
|
+
CompletelySatisfied: backendSatisfied
|
|
38195
|
+
};
|
|
38196
|
+
}
|
|
38197
|
+
if (updatedParams !== null && updatedParams !== void 0 && (_updatedParams$Sewera = updatedParams.SewerageConnectionResult) !== null && _updatedParams$Sewera !== void 0 && (_updatedParams$Sewera2 = _updatedParams$Sewera.SewerageConnections) !== null && _updatedParams$Sewera2 !== void 0 && _updatedParams$Sewera2[0]) {
|
|
38198
|
+
var _updatedParams$Sewera3;
|
|
38199
|
+
updatedParams.SewerageConnectionResult.SewerageConnections[0].additionalDetails = {
|
|
38200
|
+
...((_updatedParams$Sewera3 = updatedParams.SewerageConnectionResult.SewerageConnections[0]) === null || _updatedParams$Sewera3 === void 0 ? void 0 : _updatedParams$Sewera3.additionalDetails),
|
|
38201
|
+
CompletelySatisfied: backendSatisfied
|
|
38202
|
+
};
|
|
38203
|
+
}
|
|
38204
|
+
}
|
|
38205
|
+
return updatedParams;
|
|
38206
|
+
});
|
|
37808
38207
|
}
|
|
37809
38208
|
}
|
|
37810
38209
|
}, [Waterresult, Sewarageresult]);
|
|
37811
38210
|
const onSuccess = () => {
|
|
37812
38211
|
queryClient.invalidateQueries("WS_CREATE");
|
|
38212
|
+
sessionStorage.removeItem("WS_EDIT_APPLICATION_V5");
|
|
38213
|
+
sessionStorage.removeItem("WaterInitialObject");
|
|
38214
|
+
sessionStorage.removeItem("SewerageInitialObject");
|
|
37813
38215
|
};
|
|
37814
38216
|
const createApplication = function () {
|
|
37815
38217
|
try {
|
|
37816
|
-
var _params$DocumentsRequ;
|
|
38218
|
+
var _params$DocumentsRequ, _currentApp$additiona6;
|
|
37817
38219
|
if (params !== null && params !== void 0 && (_params$DocumentsRequ = params.DocumentsRequired) !== null && _params$DocumentsRequ !== void 0 && _params$DocumentsRequ.documents) {
|
|
37818
38220
|
params.documents = {
|
|
37819
38221
|
documents: params.DocumentsRequired.documents
|
|
37820
38222
|
};
|
|
37821
38223
|
}
|
|
38224
|
+
const currentApp = Waterresult || Sewarageresult;
|
|
38225
|
+
const backendSatisfied = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona6 = currentApp.additionalDetails) === null || _currentApp$additiona6 === void 0 ? void 0 : _currentApp$additiona6.CompletelySatisfied;
|
|
38226
|
+
if (backendSatisfied !== undefined) {
|
|
38227
|
+
var _params$WaterConnecti, _params$WaterConnecti2, _params$SewerageConne, _params$SewerageConne2;
|
|
38228
|
+
params.additionalDetails = {
|
|
38229
|
+
...params.additionalDetails,
|
|
38230
|
+
CompletelySatisfied: backendSatisfied
|
|
38231
|
+
};
|
|
38232
|
+
if (params !== null && params !== void 0 && (_params$WaterConnecti = params.WaterConnectionResult) !== null && _params$WaterConnecti !== void 0 && (_params$WaterConnecti2 = _params$WaterConnecti.WaterConnection) !== null && _params$WaterConnecti2 !== void 0 && _params$WaterConnecti2[0]) {
|
|
38233
|
+
var _params$WaterConnecti3;
|
|
38234
|
+
params.WaterConnectionResult.WaterConnection[0].additionalDetails = {
|
|
38235
|
+
...((_params$WaterConnecti3 = params.WaterConnectionResult.WaterConnection[0]) === null || _params$WaterConnecti3 === void 0 ? void 0 : _params$WaterConnecti3.additionalDetails),
|
|
38236
|
+
CompletelySatisfied: backendSatisfied
|
|
38237
|
+
};
|
|
38238
|
+
}
|
|
38239
|
+
if (params !== null && params !== void 0 && (_params$SewerageConne = params.SewerageConnectionResult) !== null && _params$SewerageConne !== void 0 && (_params$SewerageConne2 = _params$SewerageConne.SewerageConnections) !== null && _params$SewerageConne2 !== void 0 && _params$SewerageConne2[0]) {
|
|
38240
|
+
var _params$SewerageConne3;
|
|
38241
|
+
params.SewerageConnectionResult.SewerageConnections[0].additionalDetails = {
|
|
38242
|
+
...((_params$SewerageConne3 = params.SewerageConnectionResult.SewerageConnections[0]) === null || _params$SewerageConne3 === void 0 ? void 0 : _params$SewerageConne3.additionalDetails),
|
|
38243
|
+
CompletelySatisfied: backendSatisfied
|
|
38244
|
+
};
|
|
38245
|
+
}
|
|
38246
|
+
}
|
|
37822
38247
|
history.push(`${getPath$3(match.path, match.params)}/acknowledgement`);
|
|
37823
38248
|
return Promise.resolve();
|
|
37824
38249
|
} catch (e) {
|
|
@@ -37826,20 +38251,47 @@ const EditApplication = _ref => {
|
|
|
37826
38251
|
}
|
|
37827
38252
|
};
|
|
37828
38253
|
const handleSelect = (key, data, skipStep, isFromCreateApi) => {
|
|
37829
|
-
if (isFromCreateApi) setParams(data);else if (key === "") setParams({
|
|
38254
|
+
if (isFromCreateApi) setParams(data);else if (key === "") setParams(prev => ({
|
|
38255
|
+
...prev,
|
|
37830
38256
|
...data
|
|
37831
|
-
});else if (Array.isArray(data)) setParams({
|
|
37832
|
-
...
|
|
38257
|
+
}));else if (Array.isArray(data)) setParams(prev => ({
|
|
38258
|
+
...prev,
|
|
37833
38259
|
[key]: data
|
|
37834
|
-
});else
|
|
37835
|
-
|
|
37836
|
-
|
|
38260
|
+
}));else if (key === "djbEmployee") {
|
|
38261
|
+
setParams(prev => {
|
|
38262
|
+
var _data$document, _data$document2;
|
|
38263
|
+
const isEmp = String(data === null || data === void 0 ? void 0 : data.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : data.isDjbEmployee) === true;
|
|
38264
|
+
return {
|
|
38265
|
+
...prev,
|
|
38266
|
+
djbEmployee: {
|
|
38267
|
+
...(prev === null || prev === void 0 ? void 0 : prev.djbEmployee),
|
|
38268
|
+
...data,
|
|
38269
|
+
isDjbEmployee: isEmp,
|
|
38270
|
+
employeeId: isEmp ? (data === null || data === void 0 ? void 0 : data.employeeId) ?? "" : "",
|
|
38271
|
+
designation: isEmp ? (data === null || data === void 0 ? void 0 : data.designation) ?? "" : "",
|
|
38272
|
+
dor: isEmp ? (data === null || data === void 0 ? void 0 : data.dor) ?? "" : "",
|
|
38273
|
+
document: isEmp ? (data === null || data === void 0 ? void 0 : (_data$document = data.document) === null || _data$document === void 0 ? void 0 : _data$document.fileStoreId) || (data === null || data === void 0 ? void 0 : data.document) || "" : ""
|
|
38274
|
+
},
|
|
38275
|
+
additionalDetails: {
|
|
38276
|
+
...(prev === null || prev === void 0 ? void 0 : prev.additionalDetails),
|
|
38277
|
+
...data,
|
|
38278
|
+
isDjbEmployee: isEmp,
|
|
38279
|
+
employeeId: isEmp ? (data === null || data === void 0 ? void 0 : data.employeeId) ?? "" : "",
|
|
38280
|
+
designation: isEmp ? (data === null || data === void 0 ? void 0 : data.designation) ?? "" : "",
|
|
38281
|
+
dor: isEmp ? (data === null || data === void 0 ? void 0 : data.dor) ?? "" : "",
|
|
38282
|
+
document: isEmp ? (data === null || data === void 0 ? void 0 : (_data$document2 = data.document) === null || _data$document2 === void 0 ? void 0 : _data$document2.fileStoreId) || (data === null || data === void 0 ? void 0 : data.document) || "" : ""
|
|
38283
|
+
}
|
|
38284
|
+
};
|
|
38285
|
+
});
|
|
38286
|
+
} else {
|
|
38287
|
+
setParams(prev => ({
|
|
38288
|
+
...prev,
|
|
37837
38289
|
[key]: {
|
|
37838
|
-
...
|
|
38290
|
+
...(prev === null || prev === void 0 ? void 0 : prev[key]),
|
|
37839
38291
|
...data
|
|
37840
38292
|
}
|
|
37841
|
-
}
|
|
37842
|
-
}
|
|
38293
|
+
}));
|
|
38294
|
+
}
|
|
37843
38295
|
};
|
|
37844
38296
|
const handleSkip = () => {};
|
|
37845
38297
|
newConfig$1 = newConfig;
|
|
@@ -37924,8 +38376,9 @@ const EditApplication = _ref => {
|
|
|
37924
38376
|
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
37925
38377
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
37926
38378
|
id: `step-${index}`,
|
|
37927
|
-
key: index
|
|
38379
|
+
key: routeObj.route || index
|
|
37928
38380
|
}, /*#__PURE__*/React__default.createElement(Component, {
|
|
38381
|
+
key: routeObj.route || index,
|
|
37929
38382
|
config: {
|
|
37930
38383
|
texts,
|
|
37931
38384
|
inputs,
|
|
@@ -38050,7 +38503,7 @@ const ReSubmitDisconnectionApplication = () => {
|
|
|
38050
38503
|
};
|
|
38051
38504
|
|
|
38052
38505
|
const CheckPage = _ref => {
|
|
38053
|
-
var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _cpt$details14, _reversedOwners$, _cpt$details15, _cpt$details16, _cpt$details17, _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,
|
|
38506
|
+
var _value$ConnectionDeta, _value$waterConnectio, _cpt$details12, _cpt$details13, _cpt$details14, _reversedOwners$, _cpt$details15, _cpt$details16, _cpt$details17, _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, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _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;
|
|
38054
38507
|
let {
|
|
38055
38508
|
onSubmit,
|
|
38056
38509
|
value
|
|
@@ -38195,10 +38648,17 @@ const CheckPage = _ref => {
|
|
|
38195
38648
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38196
38649
|
label: t("WS_Billing_Address_Type"),
|
|
38197
38650
|
text: `${t(checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad = connectionDetails.addressType) === null || _connectionDetails$ad === void 0 ? void 0 : _connectionDetails$ad.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad2 = connectionDetails.addressType) === null || _connectionDetails$ad2 === void 0 ? void 0 : _connectionDetails$ad2.name) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad3 = connectionDetails.addressType) === null || _connectionDetails$ad3 === void 0 ? void 0 : _connectionDetails$ad3.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || ((_data = data) === null || _data === void 0 ? void 0 : (_data$additionalDetai = _data.additionalDetails) === null || _data$additionalDetai === void 0 ? void 0 : _data$additionalDetai.addressType)))}`
|
|
38198
|
-
}),
|
|
38199
|
-
|
|
38200
|
-
|
|
38201
|
-
|
|
38651
|
+
}), ((_connectionDetails$ad4, _connectionDetails$ad5, _data2, _data2$additionalDeta, _data3, _data3$additionalDeta) => {
|
|
38652
|
+
const addrTypeStr = (typeof (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.addressType) === "string" ? connectionDetails.addressType : (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad4 = connectionDetails.addressType) === null || _connectionDetails$ad4 === void 0 ? void 0 : _connectionDetails$ad4.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$ad5 = connectionDetails.addressType) === null || _connectionDetails$ad5 === void 0 ? void 0 : _connectionDetails$ad5.name)) || ((_data2 = data) === null || _data2 === void 0 ? void 0 : (_data2$additionalDeta = _data2.additionalDetails) === null || _data2$additionalDeta === void 0 ? void 0 : _data2$additionalDeta.addressType) || "";
|
|
38653
|
+
const compAddrStr = (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.completeAddress) || ((_data3 = data) === null || _data3 === void 0 ? void 0 : (_data3$additionalDeta = _data3.additionalDetails) === null || _data3$additionalDeta === void 0 ? void 0 : _data3$additionalDeta.completeAddress) || "";
|
|
38654
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
38655
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38656
|
+
label: t("Complete Address"),
|
|
38657
|
+
text: `${checkForNA(compAddrStr)}`
|
|
38658
|
+
});
|
|
38659
|
+
}
|
|
38660
|
+
return null;
|
|
38661
|
+
})(), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38202
38662
|
label: t("WS_SERVICE_TYPE"),
|
|
38203
38663
|
text: `${t(checkForNA((connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.i18nKey) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do2 = connectionDetails.domesticType) === null || _connectionDetails$do2 === void 0 ? void 0 : _connectionDetails$do2.code) || (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.domesticType)))}`
|
|
38204
38664
|
}), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do3 = connectionDetails.domesticType) === null || _connectionDetails$do3 === void 0 ? void 0 : _connectionDetails$do3.code) === "ORGANIZATION" && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
@@ -38930,12 +39390,22 @@ const WSAcknowledgement = _ref => {
|
|
|
38930
39390
|
React.useEffect(() => {
|
|
38931
39391
|
if (sessionStorage.getItem("isCreateEnabled") !== "true") window.history.forward();else sessionStorage.removeItem("isCreateEnabled");
|
|
38932
39392
|
});
|
|
39393
|
+
const mutationTriggeredRef = React__default.useRef(false);
|
|
39394
|
+
const swMutationTriggeredRef = React__default.useRef(false);
|
|
39395
|
+
const handleSuccess = res => {
|
|
39396
|
+
sessionStorage.removeItem("WS_EDIT_APPLICATION_V5");
|
|
39397
|
+
sessionStorage.removeItem("WaterInitialObject");
|
|
39398
|
+
sessionStorage.removeItem("SewerageInitialObject");
|
|
39399
|
+
if (onSuccess) onSuccess(res);
|
|
39400
|
+
};
|
|
38933
39401
|
React.useEffect(() => {
|
|
39402
|
+
if (mutationTriggeredRef.current) return;
|
|
38934
39403
|
try {
|
|
38935
39404
|
var _data$serviceName, _data$serviceName2;
|
|
38936
39405
|
let tenantId;
|
|
38937
39406
|
if ((data === null || data === void 0 ? void 0 : (_data$serviceName = data.serviceName) === null || _data$serviceName === void 0 ? void 0 : _data$serviceName.code) === "WATER" || (data === null || data === void 0 ? void 0 : (_data$serviceName2 = data.serviceName) === null || _data$serviceName2 === void 0 ? void 0 : _data$serviceName2.code) === "BOTH") {
|
|
38938
39407
|
var _data$cpt, _data$cpt$details;
|
|
39408
|
+
mutationTriggeredRef.current = true;
|
|
38939
39409
|
tenantId = (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.tenantId) || tenantId;
|
|
38940
39410
|
let formdata = isEdit ? convertToEditWSUpdate(data) : convertToWSUpdate(data);
|
|
38941
39411
|
const formdataNew = {
|
|
@@ -38944,14 +39414,18 @@ const WSAcknowledgement = _ref => {
|
|
|
38944
39414
|
reconnectRequest: false
|
|
38945
39415
|
};
|
|
38946
39416
|
WSmutation.mutate(formdataNew, {
|
|
38947
|
-
onSuccess
|
|
39417
|
+
onSuccess: handleSuccess
|
|
38948
39418
|
});
|
|
38949
39419
|
}
|
|
38950
|
-
} catch (err) {
|
|
39420
|
+
} catch (err) {
|
|
39421
|
+
console.error("Error executing WS mutation", err);
|
|
39422
|
+
}
|
|
38951
39423
|
}, [data]);
|
|
38952
39424
|
React.useEffect(() => {
|
|
38953
39425
|
var _data$serviceName3, _data$serviceName4;
|
|
39426
|
+
if (swMutationTriggeredRef.current) return;
|
|
38954
39427
|
if ((data === null || data === void 0 ? void 0 : (_data$serviceName3 = data.serviceName) === null || _data$serviceName3 === void 0 ? void 0 : _data$serviceName3.code) === "SEWERAGE" || (data === null || data === void 0 ? void 0 : (_data$serviceName4 = data.serviceName) === null || _data$serviceName4 === void 0 ? void 0 : _data$serviceName4.code) === "BOTH" && WSmutation.isSuccess) {
|
|
39428
|
+
swMutationTriggeredRef.current = true;
|
|
38955
39429
|
let formdata = isEdit ? convertToEditSWUpdate(data) : convertToSWUpdate(data);
|
|
38956
39430
|
const formdataNew = {
|
|
38957
39431
|
...formdata,
|
|
@@ -38959,7 +39433,7 @@ const WSAcknowledgement = _ref => {
|
|
|
38959
39433
|
reconnectRequest: false
|
|
38960
39434
|
};
|
|
38961
39435
|
SWmutation.mutate(formdataNew, {
|
|
38962
|
-
onSuccess
|
|
39436
|
+
onSuccess: handleSuccess
|
|
38963
39437
|
});
|
|
38964
39438
|
}
|
|
38965
39439
|
}, [data, WSmutation.isSuccess]);
|
|
@@ -41362,7 +41836,7 @@ const WSInfoPage = () => {
|
|
|
41362
41836
|
type: "button",
|
|
41363
41837
|
className: "ws-btn ws-btn-digilocker",
|
|
41364
41838
|
onClick: handleDigiLockerLogin
|
|
41365
|
-
}, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("
|
|
41839
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React__default.createElement("span", null, t("DigiLocker Consent"))))))), /*#__PURE__*/React__default.createElement("div", {
|
|
41366
41840
|
className: "ws-action-card"
|
|
41367
41841
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
41368
41842
|
className: "ws-action-content"
|
|
@@ -47574,7 +48048,7 @@ const ActionModal$5 = _ref => {
|
|
|
47574
48048
|
})();
|
|
47575
48049
|
}, [file]);
|
|
47576
48050
|
function submit(data) {
|
|
47577
|
-
var _applicationData4, _applicationData0,
|
|
48051
|
+
var _applicationData4, _applicationData0, _applicationData11, _applicationData11$ap, _applicationData12, _applicationData12$pr, _applicationData13, _applicationData13$pr, _applicationData16, _applicationData17;
|
|
47578
48052
|
let commentValue = (data === null || data === void 0 ? void 0 : data.comments) || "";
|
|
47579
48053
|
if (isReasonRequiredAction) {
|
|
47580
48054
|
var _commentValue;
|
|
@@ -47665,47 +48139,63 @@ const ActionModal$5 = _ref => {
|
|
|
47665
48139
|
}] : []
|
|
47666
48140
|
}
|
|
47667
48141
|
};
|
|
47668
|
-
if (showApprovalChecklist) {
|
|
47669
|
-
var _applicationData1;
|
|
48142
|
+
if (showApprovalChecklist || (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN_DIRECT" || (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN") {
|
|
48143
|
+
var _applicationData1, _applicationData1$add, _applicationData10;
|
|
48144
|
+
const isDirect = (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN_DIRECT";
|
|
48145
|
+
const isSendBack = (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN";
|
|
48146
|
+
const resolvedCompletelySatisfied = isDirect ? true : isSendBack ? false : (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.isFullySatisfied) !== undefined ? approvalChecklist.isFullySatisfied : (_applicationData1 = applicationData) === null || _applicationData1 === void 0 ? void 0 : (_applicationData1$add = _applicationData1.additionalDetails) === null || _applicationData1$add === void 0 ? void 0 : _applicationData1$add.CompletelySatisfied;
|
|
48147
|
+
const remarksPayload = {};
|
|
48148
|
+
Object.keys(approvalChecklist || {}).forEach(key => {
|
|
48149
|
+
if (key.endsWith("Remarks")) {
|
|
48150
|
+
remarksPayload[key] = approvalChecklist[key];
|
|
48151
|
+
}
|
|
48152
|
+
});
|
|
47670
48153
|
applicationData.additionalDetails = {
|
|
47671
|
-
...((
|
|
47672
|
-
|
|
47673
|
-
|
|
47674
|
-
|
|
47675
|
-
|
|
47676
|
-
|
|
48154
|
+
...((_applicationData10 = applicationData) === null || _applicationData10 === void 0 ? void 0 : _applicationData10.additionalDetails),
|
|
48155
|
+
...(showApprovalChecklist ? {
|
|
48156
|
+
waterPipelineFacility: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.waterPipelineFacility) === true,
|
|
48157
|
+
waterPipelineFacilityRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.waterPipelineFacilityRemarks) || "",
|
|
48158
|
+
infrastructureChargesApplicable: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.infrastructureChargesApplicable) === true,
|
|
48159
|
+
infrastructureChargesApplicableRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.infrastructureChargesApplicableRemarks) || "",
|
|
48160
|
+
rainWaterHarvesting: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.rainWaterHarvesting) === true,
|
|
48161
|
+
rainWaterHarvestingRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.rainWaterHarvestingRemarks) || "",
|
|
48162
|
+
bulkConnectionVerification: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.bulkConnectionVerification) === true
|
|
48163
|
+
} : {}),
|
|
48164
|
+
bulkConnectionVerificationRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.bulkConnectionVerificationRemarks) || "",
|
|
48165
|
+
CompletelySatisfied: resolvedCompletelySatisfied,
|
|
48166
|
+
...remarksPayload
|
|
47677
48167
|
};
|
|
47678
48168
|
}
|
|
47679
|
-
if (data !== null && data !== void 0 && data.date && (
|
|
48169
|
+
if (data !== null && data !== void 0 && data.date && (_applicationData11 = applicationData) !== null && _applicationData11 !== void 0 && (_applicationData11$ap = _applicationData11.applicationType) !== null && _applicationData11$ap !== void 0 && _applicationData11$ap.includes("DISCONNECT")) {
|
|
47680
48170
|
const disconnectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
47681
48171
|
applicationData.disconnectionExecutionDate = convertDateToEpochNew$1(disconnectionExecutionDate);
|
|
47682
48172
|
} else if (data !== null && data !== void 0 && data.date) {
|
|
47683
48173
|
const connectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
47684
48174
|
applicationData.connectionExecutionDate = convertDateToEpochNew$1(connectionExecutionDate);
|
|
47685
48175
|
}
|
|
47686
|
-
if (((
|
|
47687
|
-
var
|
|
47688
|
-
((
|
|
48176
|
+
if (((_applicationData12 = applicationData) === null || _applicationData12 === void 0 ? void 0 : (_applicationData12$pr = _applicationData12.processInstance) === null || _applicationData12$pr === void 0 ? void 0 : _applicationData12$pr.businessService) == "DisconnectWSConnection" || ((_applicationData13 = applicationData) === null || _applicationData13 === void 0 ? void 0 : (_applicationData13$pr = _applicationData13.processInstance) === null || _applicationData13$pr === void 0 ? void 0 : _applicationData13$pr.businessService) == "DisconnectSWConnection" || window.location.href.includes("disconnection")) {
|
|
48177
|
+
var _applicationData14, _applicationData14$se, _applicationData15, _applicationData15$ap;
|
|
48178
|
+
((_applicationData14 = applicationData) === null || _applicationData14 === void 0 ? void 0 : (_applicationData14$se = _applicationData14.serviceType) === null || _applicationData14$se === void 0 ? void 0 : _applicationData14$se.toUpperCase()) == "WATER" || (_applicationData15 = applicationData) !== null && _applicationData15 !== void 0 && (_applicationData15$ap = _applicationData15.applicationType) !== null && _applicationData15$ap !== void 0 && _applicationData15$ap.includes("WATER") ? submitAction({
|
|
47689
48179
|
WaterConnection: applicationData,
|
|
47690
48180
|
disconnectRequest: true
|
|
47691
48181
|
}) : submitAction({
|
|
47692
48182
|
SewerageConnection: applicationData,
|
|
47693
48183
|
disconnectRequest: true
|
|
47694
48184
|
});
|
|
47695
|
-
} else if (((
|
|
48185
|
+
} else if (((_applicationData16 = applicationData) === null || _applicationData16 === void 0 ? void 0 : _applicationData16.applicationType) == "SEWERAGE_RECONNECTION") {
|
|
47696
48186
|
submitAction({
|
|
47697
48187
|
SewerageConnection: applicationData,
|
|
47698
48188
|
disconnectRequest: false,
|
|
47699
48189
|
reconnectRequest: true
|
|
47700
48190
|
});
|
|
47701
|
-
} else if (((
|
|
48191
|
+
} else if (((_applicationData17 = applicationData) === null || _applicationData17 === void 0 ? void 0 : _applicationData17.applicationType) == "WATER_RECONNECTION") {
|
|
47702
48192
|
submitAction({
|
|
47703
48193
|
WaterConnection: applicationData,
|
|
47704
48194
|
disconnectRequest: false,
|
|
47705
48195
|
reconnectRequest: true
|
|
47706
48196
|
});
|
|
47707
48197
|
} else {
|
|
47708
|
-
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9, _parsedAdhocRebateDat0, _parsedAdhocRebateDat1, _parsedAdhocRebateDat10,
|
|
48198
|
+
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9, _parsedAdhocRebateDat0, _parsedAdhocRebateDat1, _parsedAdhocRebateDat10, _applicationData18, _applicationData18$se, _applicationData19, _applicationData19$ap;
|
|
47709
48199
|
const adhocRebateData = sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA");
|
|
47710
48200
|
const parsedAdhocRebateData = adhocRebateData ? JSON.parse(adhocRebateData) : "";
|
|
47711
48201
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat !== void 0 && _parsedAdhocRebateDat.adhocPenalty) applicationData.additionalDetails.adhocPenalty = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat2 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat2 === void 0 ? void 0 : _parsedAdhocRebateDat2.adhocPenalty) || "";
|
|
@@ -47714,7 +48204,7 @@ const ActionModal$5 = _ref => {
|
|
|
47714
48204
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat7 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat7 !== void 0 && _parsedAdhocRebateDat7.adhocRebate) applicationData.additionalDetails.adhocRebate = parseInt(parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat8 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat8 === void 0 ? void 0 : _parsedAdhocRebateDat8.adhocRebate) || "";
|
|
47715
48205
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat9 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat9 !== void 0 && _parsedAdhocRebateDat9.adhocRebateComment) applicationData.additionalDetails.adhocRebateComment = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat0 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat0 === void 0 ? void 0 : _parsedAdhocRebateDat0.adhocRebateComment) || "";
|
|
47716
48206
|
if (parsedAdhocRebateData !== null && parsedAdhocRebateData !== void 0 && (_parsedAdhocRebateDat1 = parsedAdhocRebateData.value) !== null && _parsedAdhocRebateDat1 !== void 0 && _parsedAdhocRebateDat1.adhocRebateReason) applicationData.additionalDetails.adhocRebateReason = (parsedAdhocRebateData === null || parsedAdhocRebateData === void 0 ? void 0 : (_parsedAdhocRebateDat10 = parsedAdhocRebateData.value) === null || _parsedAdhocRebateDat10 === void 0 ? void 0 : _parsedAdhocRebateDat10.adhocRebateReason) || "";
|
|
47717
|
-
((
|
|
48207
|
+
((_applicationData18 = applicationData) === null || _applicationData18 === void 0 ? void 0 : (_applicationData18$se = _applicationData18.serviceType) === null || _applicationData18$se === void 0 ? void 0 : _applicationData18$se.toUpperCase()) == "WATER" || (_applicationData19 = applicationData) !== null && _applicationData19 !== void 0 && (_applicationData19$ap = _applicationData19.applicationType) !== null && _applicationData19$ap !== void 0 && _applicationData19$ap.includes("WATER") ? submitAction({
|
|
47718
48208
|
WaterConnection: applicationData,
|
|
47719
48209
|
disconnectRequest: false,
|
|
47720
48210
|
reconnectRequest: false
|
|
@@ -47726,8 +48216,8 @@ const ActionModal$5 = _ref => {
|
|
|
47726
48216
|
}
|
|
47727
48217
|
}
|
|
47728
48218
|
React.useEffect(() => {
|
|
47729
|
-
var
|
|
47730
|
-
if (((
|
|
48219
|
+
var _applicationData20, _applicationData20$pr, _applicationData21, _applicationData21$pr;
|
|
48220
|
+
if (((_applicationData20 = applicationData) === null || _applicationData20 === void 0 ? void 0 : (_applicationData20$pr = _applicationData20.processInstance) === null || _applicationData20$pr === void 0 ? void 0 : _applicationData20$pr.businessService) == "DisconnectWSConnection" || ((_applicationData21 = applicationData) === null || _applicationData21 === void 0 ? void 0 : (_applicationData21$pr = _applicationData21.processInstance) === null || _applicationData21$pr === void 0 ? void 0 : _applicationData21$pr.businessService) == "DisconnectSWConnection") {
|
|
47731
48221
|
if (action) {
|
|
47732
48222
|
setConfig(configWSDisConnectApplication({
|
|
47733
48223
|
t,
|
|
@@ -51817,14 +52307,27 @@ const getWSApprovalChecklistFields = applicationData => {
|
|
|
51817
52307
|
}];
|
|
51818
52308
|
};
|
|
51819
52309
|
const isWSApprovalChecklistComplete = function (applicationData, values) {
|
|
51820
|
-
var
|
|
52310
|
+
var _values5;
|
|
51821
52311
|
if (values === void 0) {
|
|
51822
52312
|
values = {};
|
|
51823
52313
|
}
|
|
51824
|
-
|
|
51825
|
-
|
|
51826
|
-
|
|
51827
|
-
|
|
52314
|
+
const fields = getWSApprovalChecklistFields(applicationData);
|
|
52315
|
+
const mandatoryFieldsAnswered = fields.filter(field => field.isMandatory).every(field => {
|
|
52316
|
+
var _values, _values2;
|
|
52317
|
+
return ((_values = values) === null || _values === void 0 ? void 0 : _values[field.name]) === true || ((_values2 = values) === null || _values2 === void 0 ? void 0 : _values2[field.name]) === false;
|
|
52318
|
+
});
|
|
52319
|
+
if (!mandatoryFieldsAnswered) return false;
|
|
52320
|
+
const remarksValid = fields.every(field => {
|
|
52321
|
+
var _values3;
|
|
52322
|
+
if (((_values3 = values) === null || _values3 === void 0 ? void 0 : _values3[field.name]) === false) {
|
|
52323
|
+
var _values4;
|
|
52324
|
+
const remark = (_values4 = values) === null || _values4 === void 0 ? void 0 : _values4[`${field.name}Remarks`];
|
|
52325
|
+
return typeof remark === "string" && remark.trim().length > 0;
|
|
52326
|
+
}
|
|
52327
|
+
return true;
|
|
52328
|
+
});
|
|
52329
|
+
if (!remarksValid) return false;
|
|
52330
|
+
return ((_values5 = values) === null || _values5 === void 0 ? void 0 : _values5.isFullySatisfied) !== undefined;
|
|
51828
52331
|
};
|
|
51829
52332
|
const WSApprovalChecklist = _ref => {
|
|
51830
52333
|
let {
|
|
@@ -51837,6 +52340,13 @@ const WSApprovalChecklist = _ref => {
|
|
|
51837
52340
|
t
|
|
51838
52341
|
} = reactI18next.useTranslation();
|
|
51839
52342
|
if (!showApprovalChecklist) return null;
|
|
52343
|
+
const yesNoOptions = [{
|
|
52344
|
+
label: t("CORE_COMMON_YES", "Yes"),
|
|
52345
|
+
code: true
|
|
52346
|
+
}, {
|
|
52347
|
+
label: t("CORE_COMMON_NO", "No"),
|
|
52348
|
+
code: false
|
|
52349
|
+
}];
|
|
51840
52350
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
51841
52351
|
style: {
|
|
51842
52352
|
marginTop: "24px",
|
|
@@ -51853,20 +52363,89 @@ const WSApprovalChecklist = _ref => {
|
|
|
51853
52363
|
}
|
|
51854
52364
|
}, t("Approval Checklist")), /*#__PURE__*/React__default.createElement("div", {
|
|
51855
52365
|
style: {
|
|
51856
|
-
display: "
|
|
52366
|
+
display: "fl ex",
|
|
51857
52367
|
flexDirection: "column",
|
|
51858
|
-
gap: "
|
|
51859
|
-
}
|
|
51860
|
-
}, getWSApprovalChecklistFields(applicationData).map(field =>
|
|
51861
|
-
|
|
51862
|
-
|
|
51863
|
-
|
|
51864
|
-
|
|
51865
|
-
|
|
51866
|
-
|
|
51867
|
-
|
|
51868
|
-
|
|
51869
|
-
|
|
52368
|
+
gap: "16px"
|
|
52369
|
+
}
|
|
52370
|
+
}, getWSApprovalChecklistFields(applicationData).map(field => {
|
|
52371
|
+
const isNoSelected = (values === null || values === void 0 ? void 0 : values[field.name]) === false;
|
|
52372
|
+
const remarkValue = (values === null || values === void 0 ? void 0 : values[`${field.name}Remarks`]) || "";
|
|
52373
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
52374
|
+
key: field.name,
|
|
52375
|
+
style: {
|
|
52376
|
+
display: "flex",
|
|
52377
|
+
flexDirection: "column",
|
|
52378
|
+
gap: "8px",
|
|
52379
|
+
paddingBottom: "14px",
|
|
52380
|
+
borderBottom: "1px solid #EAEAEA"
|
|
52381
|
+
}
|
|
52382
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
52383
|
+
style: {
|
|
52384
|
+
fontSize: "16px",
|
|
52385
|
+
color: "#0B0C0C",
|
|
52386
|
+
fontWeight: "500",
|
|
52387
|
+
lineHeight: "1.4"
|
|
52388
|
+
}
|
|
52389
|
+
}, t(field.label), field.isMandatory && /*#__PURE__*/React__default.createElement("span", {
|
|
52390
|
+
style: {
|
|
52391
|
+
color: "#D4351C",
|
|
52392
|
+
marginLeft: "4px"
|
|
52393
|
+
}
|
|
52394
|
+
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
52395
|
+
name: `ws_checklist_${field.name}`,
|
|
52396
|
+
style: {
|
|
52397
|
+
display: "flex",
|
|
52398
|
+
gap: "2rem"
|
|
52399
|
+
},
|
|
52400
|
+
options: yesNoOptions,
|
|
52401
|
+
optionsKey: "label",
|
|
52402
|
+
selectedOption: (values === null || values === void 0 ? void 0 : values[field.name]) !== undefined ? yesNoOptions.find(opt => opt.code === values[field.name]) || null : null,
|
|
52403
|
+
onSelect: option => {
|
|
52404
|
+
const updated = {
|
|
52405
|
+
...values,
|
|
52406
|
+
[field.name]: option.code
|
|
52407
|
+
};
|
|
52408
|
+
if (option.code === true) {
|
|
52409
|
+
delete updated[`${field.name}Remarks`];
|
|
52410
|
+
}
|
|
52411
|
+
onChange(updated);
|
|
52412
|
+
}
|
|
52413
|
+
}), isNoSelected && /*#__PURE__*/React__default.createElement("div", {
|
|
52414
|
+
style: {
|
|
52415
|
+
marginTop: "6px"
|
|
52416
|
+
}
|
|
52417
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
52418
|
+
style: {
|
|
52419
|
+
marginBottom: "6px",
|
|
52420
|
+
fontSize: "14px",
|
|
52421
|
+
fontWeight: "500",
|
|
52422
|
+
color: "#0B0C0C"
|
|
52423
|
+
}
|
|
52424
|
+
}, t("Remarks"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
52425
|
+
style: {
|
|
52426
|
+
color: "#D4351C"
|
|
52427
|
+
}
|
|
52428
|
+
}, "*")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextArea, {
|
|
52429
|
+
name: `${field.name}Remarks`,
|
|
52430
|
+
value: remarkValue,
|
|
52431
|
+
onChange: event => onChange({
|
|
52432
|
+
...values,
|
|
52433
|
+
[`${field.name}Remarks`]: event.target.value
|
|
52434
|
+
}),
|
|
52435
|
+
placeholder: t("Enter mandatory remarks for selecting No"),
|
|
52436
|
+
style: {
|
|
52437
|
+
width: "100%",
|
|
52438
|
+
minHeight: "60px"
|
|
52439
|
+
}
|
|
52440
|
+
}), !(remarkValue !== null && remarkValue !== void 0 && remarkValue.trim()) && /*#__PURE__*/React__default.createElement("span", {
|
|
52441
|
+
className: "card-label-error",
|
|
52442
|
+
style: {
|
|
52443
|
+
fontSize: "12px",
|
|
52444
|
+
marginTop: "4px",
|
|
52445
|
+
display: "block"
|
|
52446
|
+
}
|
|
52447
|
+
}, t("CS_REMARK_IS_MANDATORY", "Remarks are mandatory when selecting No"))));
|
|
52448
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
51870
52449
|
style: {
|
|
51871
52450
|
marginTop: "24px",
|
|
51872
52451
|
padding: "16px",
|
|
@@ -51879,6 +52458,7 @@ const WSApprovalChecklist = _ref => {
|
|
|
51879
52458
|
marginBottom: "16px"
|
|
51880
52459
|
}
|
|
51881
52460
|
}, t("I am fully satisfied with the information and documents provided and confirm that they have been duly verified to the best of my knowledge and satisfaction.")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.RadioButtons, {
|
|
52461
|
+
name: "ws_checklist_isFullySatisfied",
|
|
51882
52462
|
style: {
|
|
51883
52463
|
display: "flex",
|
|
51884
52464
|
gap: "2rem"
|
|
@@ -52002,7 +52582,16 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52002
52582
|
if (index === void 0) {
|
|
52003
52583
|
index = 0;
|
|
52004
52584
|
}
|
|
52005
|
-
|
|
52585
|
+
let actualIndex = 0;
|
|
52586
|
+
let actualTimeline = [];
|
|
52587
|
+
if (Array.isArray(index)) {
|
|
52588
|
+
actualTimeline = index;
|
|
52589
|
+
actualIndex = 0;
|
|
52590
|
+
} else {
|
|
52591
|
+
actualIndex = typeof index === "number" ? index : 0;
|
|
52592
|
+
actualTimeline = Array.isArray(timeline) ? timeline : [];
|
|
52593
|
+
}
|
|
52594
|
+
if ((checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.state) === "OPEN" || (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.status) === "INITIATED" && !window.location.href.includes("/obps/")) {
|
|
52006
52595
|
var _applicationData$audi;
|
|
52007
52596
|
const caption = {
|
|
52008
52597
|
date: convertEpochToDateDMY(applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$audi = applicationData.auditDetails) === null || _applicationData$audi === void 0 ? void 0 : _applicationData$audi.createdTime),
|
|
@@ -52012,7 +52601,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52012
52601
|
data: caption
|
|
52013
52602
|
});
|
|
52014
52603
|
} else if (window.location.href.includes("/obps/") || window.location.href.includes("/noc/") || window.location.href.includes("/ws/")) {
|
|
52015
|
-
var _checkpoint$assignes, _checkpoint$assignes$, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
|
|
52604
|
+
var _checkpoint$assignes, _checkpoint$assignes$, _actualTimeline, _checkpoint$auditDeta, _checkpoint$assignes2, _checkpoint$assignes3, _applicationData$proc, _applicationData$proc2, _applicationData$proc3, _checkpoint$assignes4, _checkpoint$assignes5, _applicationData$proc4, _applicationData$proc5, _applicationData$proc6, _applicationData$proc7, _applicationData$proc8, _applicationData$proc9, _checkpoint$assignes6, _checkpoint$assignes7;
|
|
52016
52605
|
const privacy = {
|
|
52017
52606
|
uuid: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes = checkpoint.assignes) === null || _checkpoint$assignes === void 0 ? void 0 : (_checkpoint$assignes$ = _checkpoint$assignes[0]) === null || _checkpoint$assignes$ === void 0 ? void 0 : _checkpoint$assignes$.uuid,
|
|
52018
52607
|
fieldName: "mobileNumber",
|
|
@@ -52030,12 +52619,12 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52030
52619
|
isArray: false,
|
|
52031
52620
|
d: res => {
|
|
52032
52621
|
let resultstring = "";
|
|
52033
|
-
resultstring = `+91 ${_.get(res, `ProcessInstances[${
|
|
52622
|
+
resultstring = `+91 ${_.get(res, `ProcessInstances[${actualIndex}].assignes[0].mobileNumber`)}`;
|
|
52034
52623
|
return resultstring;
|
|
52035
52624
|
}
|
|
52036
52625
|
}
|
|
52037
52626
|
};
|
|
52038
|
-
const previousCheckpoint =
|
|
52627
|
+
const previousCheckpoint = (_actualTimeline = actualTimeline) === null || _actualTimeline === void 0 ? void 0 : _actualTimeline[actualIndex - 1];
|
|
52039
52628
|
const caption = {
|
|
52040
52629
|
date: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModified,
|
|
52041
52630
|
name: checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assignes2 = checkpoint.assignes) === null || _checkpoint$assignes2 === void 0 ? void 0 : (_checkpoint$assignes3 = _checkpoint$assignes2[0]) === null || _checkpoint$assignes3 === void 0 ? void 0 : _checkpoint$assignes3.name,
|
|
@@ -52450,7 +53039,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
52450
53039
|
}, t("ES_APPLICATION_DETAILS_APPLICATION_TIMELINE")), workflowDetails !== null && workflowDetails !== void 0 && (_workflowDetails$data13 = workflowDetails.data) !== null && _workflowDetails$data13 !== void 0 && _workflowDetails$data13.timeline && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data14 = workflowDetails.data) === null || _workflowDetails$data14 === void 0 ? void 0 : (_workflowDetails$data15 = _workflowDetails$data14.timeline) === null || _workflowDetails$data15 === void 0 ? void 0 : _workflowDetails$data15.length) === 1 ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckPoint, {
|
|
52451
53040
|
isCompleted: true,
|
|
52452
53041
|
label: t(`${timelineStatusPrefix}${workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data16 = workflowDetails.data) === null || _workflowDetails$data16 === void 0 ? void 0 : (_workflowDetails$data17 = _workflowDetails$data16.timeline[0]) === null || _workflowDetails$data17 === void 0 ? void 0 : _workflowDetails$data17.state}`),
|
|
52453
|
-
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
|
|
53042
|
+
customChild: getTimelineCaptions(workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data18 = workflowDetails.data) === null || _workflowDetails$data18 === void 0 ? void 0 : _workflowDetails$data18.timeline[0], 0, workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data19 = workflowDetails.data) === null || _workflowDetails$data19 === void 0 ? void 0 : _workflowDetails$data19.timeline)
|
|
52454
53043
|
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.ConnectingCheckPoints, null, (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data20 = workflowDetails.data) === null || _workflowDetails$data20 === void 0 ? void 0 : _workflowDetails$data20.timeline) && (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data21 = workflowDetails.data) === null || _workflowDetails$data21 === void 0 ? void 0 : _workflowDetails$data21.timeline.slice(0, showAllTimeline ? workflowDetails === null || workflowDetails === void 0 ? void 0 : workflowDetails.data.timeline.length : 2).map((checkpoint, index, arr) => {
|
|
52455
53044
|
var _workflowDetails$data28;
|
|
52456
53045
|
let timelineStatusPostfix = "";
|
|
@@ -52574,7 +53163,7 @@ function ApplicationDetailsToast(_ref) {
|
|
|
52574
53163
|
}
|
|
52575
53164
|
|
|
52576
53165
|
function ApplicationDetailsActionBar(_ref) {
|
|
52577
|
-
var _user, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _applicationDetails$a, _applicationDetails$a2, _actions3, _actions4, _actions4$, _actions4$$redirectio, _actions5, _actions6, _Session$info, _applicationDetails$
|
|
53166
|
+
var _user, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _applicationData$addi, _actions3, _actions4, _actions4$, _actions4$$redirectio, _actions5, _actions6, _Session$info, _applicationDetails$a5, _applicationDetails$a6, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _actions7, _actions7$, _actions8, _actions8$, _actions0, _actions0$;
|
|
52578
53167
|
let {
|
|
52579
53168
|
workflowDetails,
|
|
52580
53169
|
displayMenu,
|
|
@@ -52586,7 +53175,10 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52586
53175
|
MenuStyle = {},
|
|
52587
53176
|
isAction,
|
|
52588
53177
|
applicationDetails,
|
|
52589
|
-
|
|
53178
|
+
applicationData,
|
|
53179
|
+
isApprovalChecklistValid = false,
|
|
53180
|
+
approvalChecklist = {},
|
|
53181
|
+
showApprovalChecklist
|
|
52590
53182
|
} = _ref;
|
|
52591
53183
|
const {
|
|
52592
53184
|
t
|
|
@@ -52633,7 +53225,7 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52633
53225
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
52634
53226
|
})) || !e.roles;
|
|
52635
53227
|
}));
|
|
52636
|
-
const completelySatisfied = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : (_applicationDetails$a2 = _applicationDetails$a.additionalDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.CompletelySatisfied;
|
|
53228
|
+
const completelySatisfied = (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.isFullySatisfied) !== undefined ? approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.isFullySatisfied : showApprovalChecklist ? undefined : (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : (_applicationDetails$a2 = _applicationDetails$a.additionalDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.CompletelySatisfied) !== undefined ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a3 = applicationDetails.applicationData) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.additionalDetails) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.CompletelySatisfied : applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.CompletelySatisfied;
|
|
52637
53229
|
if (completelySatisfied !== undefined) {
|
|
52638
53230
|
if (completelySatisfied === true) {
|
|
52639
53231
|
var _actions;
|
|
@@ -52656,7 +53248,7 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52656
53248
|
}
|
|
52657
53249
|
const Session = Digit.SessionStorage.get("User");
|
|
52658
53250
|
const uuid = Session === null || Session === void 0 ? void 0 : (_Session$info = Session.info) === null || _Session$info === void 0 ? void 0 : _Session$info.uuid;
|
|
52659
|
-
const modified = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
53251
|
+
const modified = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.auditDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.lastModifiedBy;
|
|
52660
53252
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && isMenuBotton && !isSingleButton && !isAction && /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
52661
53253
|
style: {
|
|
52662
53254
|
...ActionBarStyle
|
|
@@ -52843,12 +53435,24 @@ const ApplicationDetails = props => {
|
|
|
52843
53435
|
const seedKey = `${applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNo}__${currentWorkflowState}`;
|
|
52844
53436
|
if (showApprovalChecklist) {
|
|
52845
53437
|
if (seededKeyRef.current !== seedKey) {
|
|
53438
|
+
var _applicationData$addi5;
|
|
52846
53439
|
seededKeyRef.current = seedKey;
|
|
52847
53440
|
const initialChecklist = getWSApprovalChecklistFields(applicationData).reduce((values, field) => {
|
|
52848
|
-
var _applicationData$addi;
|
|
52849
|
-
|
|
53441
|
+
var _applicationData$addi, _applicationData$addi3;
|
|
53442
|
+
if (typeof (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi[field.name]) === "boolean") {
|
|
53443
|
+
var _applicationData$addi2;
|
|
53444
|
+
values[field.name] = applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi2 = applicationData.additionalDetails) === null || _applicationData$addi2 === void 0 ? void 0 : _applicationData$addi2[field.name];
|
|
53445
|
+
}
|
|
53446
|
+
if (applicationData !== null && applicationData !== void 0 && (_applicationData$addi3 = applicationData.additionalDetails) !== null && _applicationData$addi3 !== void 0 && _applicationData$addi3[`${field.name}Remarks`]) {
|
|
53447
|
+
var _applicationData$addi4;
|
|
53448
|
+
values[`${field.name}Remarks`] = applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi4 = applicationData.additionalDetails) === null || _applicationData$addi4 === void 0 ? void 0 : _applicationData$addi4[`${field.name}Remarks`];
|
|
53449
|
+
}
|
|
52850
53450
|
return values;
|
|
52851
53451
|
}, {});
|
|
53452
|
+
if (typeof (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi5 = applicationData.additionalDetails) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.CompletelySatisfied) === "boolean") {
|
|
53453
|
+
var _applicationData$addi6;
|
|
53454
|
+
initialChecklist.isFullySatisfied = applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.CompletelySatisfied;
|
|
53455
|
+
}
|
|
52852
53456
|
setApprovalChecklist(initialChecklist);
|
|
52853
53457
|
}
|
|
52854
53458
|
} else {
|
|
@@ -53110,7 +53714,7 @@ const ApplicationDetails = props => {
|
|
|
53110
53714
|
state: state,
|
|
53111
53715
|
id: applicationNumber,
|
|
53112
53716
|
applicationDetails: applicationDetails,
|
|
53113
|
-
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
53717
|
+
applicationData: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || applicationData,
|
|
53114
53718
|
closeModal: closeModal,
|
|
53115
53719
|
submitAction: submitAction,
|
|
53116
53720
|
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline,
|
|
@@ -53165,8 +53769,10 @@ const ApplicationDetails = props => {
|
|
|
53165
53769
|
ActionBarStyle: ActionBarStyle,
|
|
53166
53770
|
MenuStyle: MenuStyle,
|
|
53167
53771
|
applicationDetails: applicationDetails,
|
|
53772
|
+
applicationData: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || applicationData,
|
|
53168
53773
|
isApprovalChecklistValid: approvalChecklistValid,
|
|
53169
|
-
approvalChecklist: approvalChecklist
|
|
53774
|
+
approvalChecklist: approvalChecklist,
|
|
53775
|
+
showApprovalChecklist: showApprovalChecklist
|
|
53170
53776
|
})) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null));
|
|
53171
53777
|
};
|
|
53172
53778
|
|
|
@@ -54454,29 +55060,31 @@ const ActivateConnection = () => {
|
|
|
54454
55060
|
};
|
|
54455
55061
|
|
|
54456
55062
|
const ApplicationDetailsBillAmendment = () => {
|
|
54457
|
-
var _applicationDetails$p, _applicationDetails$p2,
|
|
54458
|
-
const
|
|
54459
|
-
|
|
54460
|
-
} = Digit.Hooks.useQueryParams();
|
|
55063
|
+
var _applicationDetails$p, _applicationDetails$p2, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _applicationDetails$a2;
|
|
55064
|
+
const queryParams = Digit.Hooks.useQueryParams();
|
|
55065
|
+
const applicationNumber = (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNumber) || (queryParams === null || queryParams === void 0 ? void 0 : queryParams.applicationNo);
|
|
54461
55066
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
54462
55067
|
const {
|
|
54463
55068
|
t
|
|
54464
55069
|
} = reactI18next.useTranslation();
|
|
54465
55070
|
let serviceType = "WATER";
|
|
54466
|
-
if (applicationNumber.includes("SW")) serviceType = "SEWERAGE";
|
|
55071
|
+
if (applicationNumber !== null && applicationNumber !== void 0 && applicationNumber.includes("SW")) serviceType = "SEWERAGE";
|
|
54467
55072
|
const [showToast, setShowToast] = React.useState(false);
|
|
54468
55073
|
const {
|
|
54469
55074
|
isLoading,
|
|
54470
55075
|
isError,
|
|
54471
55076
|
data: applicationDetails,
|
|
54472
55077
|
error
|
|
54473
|
-
} = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType
|
|
55078
|
+
} = Digit.Hooks.ws.useWSApplicationDetailsBillAmendment(t, tenantId, applicationNumber, serviceType, {
|
|
55079
|
+
enabled: !!applicationNumber
|
|
55080
|
+
});
|
|
55081
|
+
const businessService = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p = applicationDetails.processInstancesDetails) === null || _applicationDetails$p === void 0 ? void 0 : (_applicationDetails$p2 = _applicationDetails$p[0]) === null || _applicationDetails$p2 === void 0 ? void 0 : _applicationDetails$p2.businessService) || (serviceType === "WATER" ? "WS.AMENDMENT" : "SW.AMENDMENT");
|
|
54474
55082
|
const workflowDetails = Digit.Hooks.useWorkflowDetails({
|
|
54475
55083
|
tenantId,
|
|
54476
55084
|
id: applicationNumber,
|
|
54477
|
-
moduleCode:
|
|
55085
|
+
moduleCode: businessService,
|
|
54478
55086
|
config: {
|
|
54479
|
-
enabled:
|
|
55087
|
+
enabled: !!applicationNumber
|
|
54480
55088
|
}
|
|
54481
55089
|
});
|
|
54482
55090
|
workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : (_workflowDetails$data2 = _workflowDetails$data.actionState) === null || _workflowDetails$data2 === void 0 ? void 0 : (_workflowDetails$data3 = _workflowDetails$data2.nextActions) === null || _workflowDetails$data3 === void 0 ? void 0 : _workflowDetails$data3.forEach(action => {
|
|
@@ -54552,12 +55160,12 @@ const ApplicationDetailsBillAmendment = () => {
|
|
|
54552
55160
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
54553
55161
|
mutate: mutate,
|
|
54554
55162
|
workflowDetails: workflowDetails,
|
|
54555
|
-
businessService:
|
|
55163
|
+
businessService: businessService,
|
|
54556
55164
|
moduleCode: "WS",
|
|
54557
55165
|
showToast: showToast,
|
|
54558
55166
|
setShowToast: setShowToast,
|
|
54559
55167
|
closeToast: () => setShowToast(null),
|
|
54560
|
-
timelineStatusPrefix: `WF_${
|
|
55168
|
+
timelineStatusPrefix: `WF_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_`
|
|
54561
55169
|
})), showToast ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
54562
55170
|
isDleteBtn: true,
|
|
54563
55171
|
error: updateApplicationError ? "WS_APPLICATION_UPDATE_ERROR" : null,
|
|
@@ -61376,7 +61984,7 @@ const openFilePDF = fileId => {
|
|
|
61376
61984
|
}).catch(error => console.error("Error fetching file:", error));
|
|
61377
61985
|
};
|
|
61378
61986
|
const CheckPage$4 = _ref2 => {
|
|
61379
|
-
var _Digit$UserService$ge, _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails7, _connectionDetails7$a, _connectionDetails8, _connectionDetails8$a, _connectionDetails9, _connectionDetails9$a, _connectionDetails0, _data$additionalDetai,
|
|
61987
|
+
var _Digit$UserService$ge, _data$cpt, _data$ConnectionDetai, _data$connectionDetai, _data$ConnectionHolde, _data$connectionHolde, _data$useDetails, _data$DocumentsRequir, _data$documents, _data$djbEmployee, _data$disability, _connectionDetails, _connectionDetails$se, _connectionDetails2, _connectionDetails2$s, _connectionDetails3, _connectionDetails4, _connectionDetails4$a, _connectionDetails5, _connectionDetails5$a, _connectionDetails6, _connectionDetails7, _connectionDetails7$a, _connectionDetails8, _connectionDetails8$a, _connectionDetails9, _connectionDetails9$a, _connectionDetails0, _data$additionalDetai, _holderDetails, _holderDetails2, _holderDetails3, _holderDetails4, _holderDetails4$gende, _holderDetails5, _holderDetails5$gende, _holderDetails6, _holderDetails7, _holderDetails8, _holderDetails9, _propertyAddress, _propertyAddress$zro, _propertyAddress2, _propertyAddress3, _propertyAddress4, _propertyAddress4$add, _propertyAddress5, _propertyAddress5$add, _propertyAddress6, _propertyAddress6$add, _propertyAddress7, _propertyAddress8, _propertyAddress8$cit, _propertyAddress9, _propertyAddress9$cit, _propertyAddress0, _propertyAddress1, _propertyAddress10, _propertyAddress11, _propertyAddress11$lo, _propertyAddress12, _propertyAddress12$lo, _propertyAddress13, _propertyAddress14, _propertyAddress14$su, _propertyAddress15, _propertyAddress15$su, _propertyAddress16, _propertyAddress17, _propertyAddress18, _propertyAddress19, _propertyAddress20, _propertyAddress21, _propertyAddress22, _propertyAddress23, _propertyAddress24, _propertyAddress25, _propertyAddress26, _propertyAddress26$as, _propertyAddress27, _propertyAddress27$as, _propertyAddress28, _propertyAddress29, _propertyAddress29$bl, _propertyAddress30, _propertyAddress30$bl, _propertyAddress31, _propertyAddress32, _propertyAddress32$wa, _propertyAddress33, _propertyAddress33$wa, _propertyAddress34, _propertyAddress35, _propertyAddress35$zo, _propertyAddress36, _propertyAddress36$zo, _propertyAddress37, _propertyAddress38, _propertyAddress39, _propertyAddress40, _propertyAddress41, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _useDetails$propertyT, _useDetails$propertyT2, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _useDetails$noOfFloor, _useDetails$noOfFloor2, _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;
|
|
61380
61988
|
let {
|
|
61381
61989
|
data,
|
|
61382
61990
|
onSubmit,
|
|
@@ -61439,10 +62047,17 @@ const CheckPage$4 = _ref2 => {
|
|
|
61439
62047
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
61440
62048
|
label: t("WS_Billing_Address_Type"),
|
|
61441
62049
|
text: `${t(checkForNA$1(((_connectionDetails7 = connectionDetails) === null || _connectionDetails7 === void 0 ? void 0 : (_connectionDetails7$a = _connectionDetails7.addressType) === null || _connectionDetails7$a === void 0 ? void 0 : _connectionDetails7$a.i18nKey) || ((_connectionDetails8 = connectionDetails) === null || _connectionDetails8 === void 0 ? void 0 : (_connectionDetails8$a = _connectionDetails8.addressType) === null || _connectionDetails8$a === void 0 ? void 0 : _connectionDetails8$a.name) || (typeof ((_connectionDetails9 = connectionDetails) === null || _connectionDetails9 === void 0 ? void 0 : (_connectionDetails9$a = _connectionDetails9.addressType) === null || _connectionDetails9$a === void 0 ? void 0 : _connectionDetails9$a.code) === "string" ? connectionDetails.addressType.code === "PERMANENT" ? "Permanent" : connectionDetails.addressType.code === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType.code : null) || (typeof ((_connectionDetails0 = connectionDetails) === null || _connectionDetails0 === void 0 ? void 0 : _connectionDetails0.addressType) === "string" ? connectionDetails.addressType === "PERMANENT" ? "Permanent" : connectionDetails.addressType === "CORRESPONDENCE" ? "Correspondence" : connectionDetails.addressType : null) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai = data.additionalDetails) === null || _data$additionalDetai === void 0 ? void 0 : _data$additionalDetai.addressType)))}`
|
|
61442
|
-
}),
|
|
61443
|
-
|
|
61444
|
-
|
|
61445
|
-
|
|
62050
|
+
}), ((_connectionDetails1, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _data$additionalDetai2, _connectionDetails12, _data$additionalDetai3) => {
|
|
62051
|
+
const addrTypeStr = (typeof ((_connectionDetails1 = connectionDetails) === null || _connectionDetails1 === void 0 ? void 0 : _connectionDetails1.addressType) === "string" ? connectionDetails.addressType : ((_connectionDetails10 = connectionDetails) === null || _connectionDetails10 === void 0 ? void 0 : (_connectionDetails10$ = _connectionDetails10.addressType) === null || _connectionDetails10$ === void 0 ? void 0 : _connectionDetails10$.code) || ((_connectionDetails11 = connectionDetails) === null || _connectionDetails11 === void 0 ? void 0 : (_connectionDetails11$ = _connectionDetails11.addressType) === null || _connectionDetails11$ === void 0 ? void 0 : _connectionDetails11$.name)) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai2 = data.additionalDetails) === null || _data$additionalDetai2 === void 0 ? void 0 : _data$additionalDetai2.addressType) || "";
|
|
62052
|
+
const compAddrStr = ((_connectionDetails12 = connectionDetails) === null || _connectionDetails12 === void 0 ? void 0 : _connectionDetails12.completeAddress) || (data === null || data === void 0 ? void 0 : (_data$additionalDetai3 = data.additionalDetails) === null || _data$additionalDetai3 === void 0 ? void 0 : _data$additionalDetai3.completeAddress) || "";
|
|
62053
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
62054
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
62055
|
+
label: t("Complete Address"),
|
|
62056
|
+
text: `${checkForNA$1(compAddrStr)}`
|
|
62057
|
+
});
|
|
62058
|
+
}
|
|
62059
|
+
return null;
|
|
62060
|
+
})()), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSubHeader, null, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
|
|
61446
62061
|
style: {
|
|
61447
62062
|
marginTop: "10px",
|
|
61448
62063
|
marginBottom: "30px"
|
|
@@ -61917,7 +62532,7 @@ const OLDApplication = () => {
|
|
|
61917
62532
|
mutate: sewerageUpdateMutation
|
|
61918
62533
|
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
61919
62534
|
const onFormValueChange = (setValue, formData, formState) => {
|
|
61920
|
-
var _updatedFormData$cpt, _updatedFormData$cpt$, _propertyDetails$Prop, _propertyDetails$Prop2;
|
|
62535
|
+
var _djbData$document, _updatedFormData$cpt, _updatedFormData$cpt$, _propertyDetails$Prop, _propertyDetails$Prop2;
|
|
61921
62536
|
const updatedFormData = {
|
|
61922
62537
|
...sessionFormData,
|
|
61923
62538
|
...formData
|
|
@@ -61927,12 +62542,15 @@ const OLDApplication = () => {
|
|
|
61927
62542
|
setSessionFormData(cleanedFormData);
|
|
61928
62543
|
}
|
|
61929
62544
|
sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.errors) || {}));
|
|
61930
|
-
const
|
|
62545
|
+
const djbData = (updatedFormData === null || updatedFormData === void 0 ? void 0 : updatedFormData.djbEmployee) || (updatedFormData === null || updatedFormData === void 0 ? void 0 : updatedFormData.additionalDetails);
|
|
62546
|
+
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
62547
|
+
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() || !(djbData !== null && djbData !== void 0 && (_djbData$document = djbData.document) !== null && _djbData$document !== void 0 && _djbData$document.fileStoreId || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && djbData !== null && djbData !== void 0 && djbData.document.trim() || djbData !== null && djbData !== void 0 && djbData.document));
|
|
62548
|
+
const hasErrors = Object.keys((formState === null || formState === void 0 ? void 0 : formState.errors) || {}).length > 0 || isDjbEmpInvalid;
|
|
61931
62549
|
const hasProperty = (updatedFormData === null || updatedFormData === void 0 ? void 0 : (_updatedFormData$cpt = updatedFormData.cpt) === null || _updatedFormData$cpt === void 0 ? void 0 : (_updatedFormData$cpt$ = _updatedFormData$cpt.details) === null || _updatedFormData$cpt$ === void 0 ? void 0 : _updatedFormData$cpt$.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);
|
|
61932
62550
|
setSubmitValve(!hasErrors && !!hasProperty);
|
|
61933
62551
|
};
|
|
61934
62552
|
const onFormSubmit = data => {
|
|
61935
|
-
var _data$cpt, _data$cpt$details, _propertyDetails$Prop3, _propertyDetails$Prop4, _data$cpt2, _propertyDetails$Prop5;
|
|
62553
|
+
var _data$cpt, _data$cpt$details, _propertyDetails$Prop3, _propertyDetails$Prop4, _data$cpt2, _propertyDetails$Prop5, _djbData$document2;
|
|
61936
62554
|
const hasProperty = (data === null || data === void 0 ? void 0 : (_data$cpt = data.cpt) === null || _data$cpt === void 0 ? void 0 : (_data$cpt$details = _data$cpt.details) === null || _data$cpt$details === void 0 ? void 0 : _data$cpt$details.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);
|
|
61937
62555
|
if (!hasProperty) {
|
|
61938
62556
|
console.warn("[WS] onSubmit EXIT: invalid property", {
|
|
@@ -61959,6 +62577,16 @@ const OLDApplication = () => {
|
|
|
61959
62577
|
return;
|
|
61960
62578
|
}
|
|
61961
62579
|
}
|
|
62580
|
+
const djbData = (data === null || data === void 0 ? void 0 : data.djbEmployee) || (data === null || data === void 0 ? void 0 : data.additionalDetails);
|
|
62581
|
+
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
62582
|
+
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() || !(djbData !== null && djbData !== void 0 && (_djbData$document2 = djbData.document) !== null && _djbData$document2 !== void 0 && _djbData$document2.fileStoreId || typeof (djbData === null || djbData === void 0 ? void 0 : djbData.document) === "string" && djbData !== null && djbData !== void 0 && djbData.document.trim() || djbData !== null && djbData !== void 0 && djbData.document));
|
|
62583
|
+
if (isDjbEmpInvalid) {
|
|
62584
|
+
setShowToast({
|
|
62585
|
+
key: "error",
|
|
62586
|
+
message: "ERR_FILL_ALL_MANDATORY_FIELDS"
|
|
62587
|
+
});
|
|
62588
|
+
return;
|
|
62589
|
+
}
|
|
61962
62590
|
setShowCheckPage(true);
|
|
61963
62591
|
};
|
|
61964
62592
|
const processSubmission = function (data) {
|
|
@@ -63014,6 +63642,7 @@ const componentsToRegister = {
|
|
|
63014
63642
|
WSCard,
|
|
63015
63643
|
SWCard,
|
|
63016
63644
|
WSBillIAmendMentInbox: Inbox,
|
|
63645
|
+
WSSearchBillAmendment: SearchBillAmendment,
|
|
63017
63646
|
WSCreate: WSCreate,
|
|
63018
63647
|
WSDisconnection: WSDisconnection,
|
|
63019
63648
|
WSRestoration: WSDisconnection$1,
|