@djb25/digit-ui-module-ws 1.0.106 → 1.0.108
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 +1214 -663
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1214 -663
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -756,25 +756,25 @@ const updatePayloadOfWS = function (data, type) {
|
|
|
756
756
|
}
|
|
757
757
|
};
|
|
758
758
|
const getAllDocumentsForUpdate = data => {
|
|
759
|
-
var _data$documents5, _data$
|
|
759
|
+
var _data$documents5, _data$governmentEmplo5;
|
|
760
760
|
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] : [];
|
|
761
|
-
if (data !== null && data !== void 0 &&
|
|
762
|
-
var _data$djbEmployee7;
|
|
763
|
-
const isDjbEmp = String(data === null || data === void 0 ? void 0 : (_data$djbEmployee7 = data.djbEmployee) === null || _data$djbEmployee7 === void 0 ? void 0 : _data$djbEmployee7.isDjbEmployee) ===
|
|
761
|
+
if (data !== null && data !== void 0 && data.djbEmployee) {
|
|
762
|
+
var _data$djbEmployee6, _data$djbEmployee7, _data$djbEmployee8;
|
|
763
|
+
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;
|
|
764
764
|
let existingIndex = allDocuments.findIndex(doc => doc.documentType === "OWNER.DJB_EMPLOYEE_ID");
|
|
765
|
-
if (isDjbEmp) {
|
|
765
|
+
if (isDjbEmp && data !== null && data !== void 0 && (_data$djbEmployee8 = data.djbEmployee) !== null && _data$djbEmployee8 !== void 0 && _data$djbEmployee8.document) {
|
|
766
766
|
if (existingIndex !== -1) {
|
|
767
|
-
var _data$
|
|
767
|
+
var _data$djbEmployee9, _data$djbEmployee9$do, _data$djbEmployee0;
|
|
768
768
|
allDocuments[existingIndex] = {
|
|
769
769
|
...allDocuments[existingIndex],
|
|
770
|
-
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$
|
|
770
|
+
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),
|
|
771
771
|
status: "ACTIVE"
|
|
772
772
|
};
|
|
773
773
|
} else {
|
|
774
|
-
var _data$
|
|
774
|
+
var _data$djbEmployee1, _data$djbEmployee1$do, _data$djbEmployee10;
|
|
775
775
|
allDocuments.push({
|
|
776
776
|
documentType: "OWNER.DJB_EMPLOYEE_ID",
|
|
777
|
-
fileStoreId: (data === null || data === void 0 ? void 0 : (_data$
|
|
777
|
+
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),
|
|
778
778
|
documentUid: "",
|
|
779
779
|
status: "ACTIVE"
|
|
780
780
|
});
|
|
@@ -829,11 +829,28 @@ const getAllDocumentsForUpdate = data => {
|
|
|
829
829
|
return allDocuments;
|
|
830
830
|
};
|
|
831
831
|
const convertToWSUpdate = data => {
|
|
832
|
-
var _data$WaterConnection, _data$WaterConnection2, _Digit5, _Digit5$Customization, _Digit5$Customization2, _Digit6, _Digit6$Customization, _Digit6$Customization2;
|
|
832
|
+
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;
|
|
833
833
|
let formdata = {
|
|
834
834
|
WaterConnection: {
|
|
835
835
|
...(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]),
|
|
836
836
|
documents: getAllDocumentsForUpdate(data),
|
|
837
|
+
additionalDetails: {
|
|
838
|
+
...((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) || {}),
|
|
839
|
+
...((data === null || data === void 0 ? void 0 : data.additionalDetails) || {}),
|
|
840
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
841
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
842
|
+
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,
|
|
843
|
+
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) || "" : "",
|
|
844
|
+
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) || "" : "",
|
|
845
|
+
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) || "" : "",
|
|
846
|
+
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) || "" : ""
|
|
847
|
+
} : {}),
|
|
848
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
849
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
850
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability2 = data.disability) !== null && _data$disability2 !== void 0 && _data$disability2.isDivyangjan)
|
|
851
|
+
} : {}),
|
|
852
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
853
|
+
},
|
|
837
854
|
processInstance: {
|
|
838
855
|
action: "SUBMIT_APPLICATION"
|
|
839
856
|
}
|
|
@@ -843,8 +860,8 @@ const convertToWSUpdate = data => {
|
|
|
843
860
|
return formdata;
|
|
844
861
|
};
|
|
845
862
|
const convertToEditWSUpdate = data => {
|
|
846
|
-
var _data$
|
|
847
|
-
let waterResult = data === null || data === void 0 ? void 0 : (_data$
|
|
863
|
+
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;
|
|
864
|
+
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];
|
|
848
865
|
let formdata = {
|
|
849
866
|
WaterConnection: {
|
|
850
867
|
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,
|
|
@@ -864,9 +881,24 @@ const convertToEditWSUpdate = data => {
|
|
|
864
881
|
connectionCategory: null,
|
|
865
882
|
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,
|
|
866
883
|
additionalDetails: {
|
|
884
|
+
...((waterResult === null || waterResult === void 0 ? void 0 : waterResult.additionalDetails) || {}),
|
|
867
885
|
...(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),
|
|
868
|
-
|
|
869
|
-
|
|
886
|
+
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,
|
|
887
|
+
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) || "",
|
|
888
|
+
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) || "",
|
|
889
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
890
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
891
|
+
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,
|
|
892
|
+
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) || "" : "",
|
|
893
|
+
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) || "" : "",
|
|
894
|
+
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) || "" : "",
|
|
895
|
+
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) || "" : ""
|
|
896
|
+
} : {}),
|
|
897
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
898
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
899
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability3 = data.disability) !== null && _data$disability3 !== void 0 && _data$disability3.isDivyangjan)
|
|
900
|
+
} : {}),
|
|
901
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
870
902
|
},
|
|
871
903
|
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,
|
|
872
904
|
processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
|
|
@@ -926,7 +958,7 @@ const convertToEditWSUpdate = data => {
|
|
|
926
958
|
return formdata;
|
|
927
959
|
};
|
|
928
960
|
const convertToEditSWUpdate = data => {
|
|
929
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$ConnectionDetai0, _data$ConnectionDetai1, _data$ConnectionDetai10, _data$ConnectionDetai11, _data$ConnectionDetai12, _data$
|
|
961
|
+
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;
|
|
930
962
|
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];
|
|
931
963
|
let formdata = {
|
|
932
964
|
SewerageConnection: {
|
|
@@ -947,9 +979,24 @@ const convertToEditSWUpdate = data => {
|
|
|
947
979
|
connectionCategory: null,
|
|
948
980
|
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,
|
|
949
981
|
additionalDetails: {
|
|
982
|
+
...((SewerageResult === null || SewerageResult === void 0 ? void 0 : SewerageResult.additionalDetails) || {}),
|
|
950
983
|
...(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),
|
|
951
|
-
|
|
952
|
-
|
|
984
|
+
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,
|
|
985
|
+
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) || "",
|
|
986
|
+
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) || "",
|
|
987
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
988
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
989
|
+
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,
|
|
990
|
+
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) || "" : "",
|
|
991
|
+
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) || "" : "",
|
|
992
|
+
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) || "" : "",
|
|
993
|
+
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) || "" : ""
|
|
994
|
+
} : {}),
|
|
995
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
996
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
997
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability4 = data.disability) !== null && _data$disability4 !== void 0 && _data$disability4.isDivyangjan)
|
|
998
|
+
} : {}),
|
|
999
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
953
1000
|
},
|
|
954
1001
|
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,
|
|
955
1002
|
processInstance: data !== null && data !== void 0 && data.isEditApplication ? {
|
|
@@ -1009,12 +1056,29 @@ const convertToEditSWUpdate = data => {
|
|
|
1009
1056
|
return formdata;
|
|
1010
1057
|
};
|
|
1011
1058
|
const convertToSWUpdate = data => {
|
|
1012
|
-
var _data$SewerageConnect3, _data$SewerageConnect4, _Digit1, _Digit1$Customization, _Digit1$Customization2, _Digit10, _Digit10$Customizatio, _Digit10$Customizatio2;
|
|
1059
|
+
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;
|
|
1013
1060
|
let formdata = {
|
|
1014
1061
|
SewerageConnection: {
|
|
1015
1062
|
...(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]),
|
|
1016
1063
|
connectionType: "Non Metered",
|
|
1017
1064
|
documents: getAllDocumentsForUpdate(data),
|
|
1065
|
+
additionalDetails: {
|
|
1066
|
+
...((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) || {}),
|
|
1067
|
+
...((data === null || data === void 0 ? void 0 : data.additionalDetails) || {}),
|
|
1068
|
+
...((data === null || data === void 0 ? void 0 : data.djbEmployee) !== undefined ? {
|
|
1069
|
+
...(data === null || data === void 0 ? void 0 : data.djbEmployee),
|
|
1070
|
+
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,
|
|
1071
|
+
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) || "" : "",
|
|
1072
|
+
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) || "" : "",
|
|
1073
|
+
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) || "" : "",
|
|
1074
|
+
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) || "" : ""
|
|
1075
|
+
} : {}),
|
|
1076
|
+
...((data === null || data === void 0 ? void 0 : data.disability) !== undefined ? {
|
|
1077
|
+
...(data === null || data === void 0 ? void 0 : data.disability),
|
|
1078
|
+
isDivyangjan: !!(data !== null && data !== void 0 && (_data$disability5 = data.disability) !== null && _data$disability5 !== void 0 && _data$disability5.isDivyangjan)
|
|
1079
|
+
} : {}),
|
|
1080
|
+
...((data === null || data === void 0 ? void 0 : data.bankDetails) !== undefined ? data === null || data === void 0 ? void 0 : data.bankDetails : {})
|
|
1081
|
+
},
|
|
1018
1082
|
processInstance: {
|
|
1019
1083
|
action: "SUBMIT_APPLICATION"
|
|
1020
1084
|
}
|
|
@@ -13085,8 +13149,64 @@ const createConnectionDetails = () => ({
|
|
|
13085
13149
|
addressType: "",
|
|
13086
13150
|
completeAddress: ""
|
|
13087
13151
|
});
|
|
13152
|
+
const getCptAddress = formData => {
|
|
13153
|
+
var _formData$cpt, _formData$cpt$details, _formData$property;
|
|
13154
|
+
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;
|
|
13155
|
+
if (formData !== null && formData !== void 0 && (_formData$property = formData.property) !== null && _formData$property !== void 0 && _formData$property.address) return formData.property.address;
|
|
13156
|
+
if (formData !== null && formData !== void 0 && formData.propertyAddress) return formData.propertyAddress;
|
|
13157
|
+
try {
|
|
13158
|
+
const sessionPt = JSON.parse(sessionStorage.getItem("Digit_FSM_PT") || "{}");
|
|
13159
|
+
if (sessionPt !== null && sessionPt !== void 0 && sessionPt.address) return sessionPt.address;
|
|
13160
|
+
} catch (e) {}
|
|
13161
|
+
return null;
|
|
13162
|
+
};
|
|
13163
|
+
const getPropertyAddressString = (address, t) => {
|
|
13164
|
+
var _address$locality, _Digit$Utils, _Digit$Utils$pt, _Digit$Utils2, _Digit$Utils2$pt;
|
|
13165
|
+
if (!address) return "";
|
|
13166
|
+
if (typeof address === "string") return address;
|
|
13167
|
+
const parts = [];
|
|
13168
|
+
if (address !== null && address !== void 0 && address.doorNo) parts.push(address.doorNo);
|
|
13169
|
+
if (address !== null && address !== void 0 && address.buildingName) parts.push(address.buildingName);
|
|
13170
|
+
if (address !== null && address !== void 0 && address.street) parts.push(address.street);
|
|
13171
|
+
if (address !== null && address !== void 0 && address.landmark) parts.push(address.landmark);
|
|
13172
|
+
const tenantId = (address === null || address === void 0 ? void 0 : address.tenantId) || Digit.ULBService.getCurrentTenantId();
|
|
13173
|
+
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);
|
|
13174
|
+
let localityText = "";
|
|
13175
|
+
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) {
|
|
13176
|
+
const locLocale = Digit.Utils.pt.getMohallaLocale(localityCode, tenantId);
|
|
13177
|
+
localityText = t ? t(locLocale) : locLocale;
|
|
13178
|
+
}
|
|
13179
|
+
if (!localityText || localityText === localityCode) {
|
|
13180
|
+
var _address$locality2, _address$locality3;
|
|
13181
|
+
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) || "";
|
|
13182
|
+
}
|
|
13183
|
+
if (localityText) parts.push(localityText);
|
|
13184
|
+
let cityText = "";
|
|
13185
|
+
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) {
|
|
13186
|
+
const cityLocale = Digit.Utils.pt.getCityLocale(tenantId);
|
|
13187
|
+
cityText = t ? t(cityLocale) : cityLocale;
|
|
13188
|
+
}
|
|
13189
|
+
if (!cityText || cityText === tenantId) {
|
|
13190
|
+
cityText = (address === null || address === void 0 ? void 0 : address.city) || tenantId || "";
|
|
13191
|
+
}
|
|
13192
|
+
if (cityText) parts.push(cityText);
|
|
13193
|
+
if (address !== null && address !== void 0 && address.pincode) {
|
|
13194
|
+
parts.push(address.pincode);
|
|
13195
|
+
}
|
|
13196
|
+
return parts.filter(Boolean).join(", ");
|
|
13197
|
+
};
|
|
13198
|
+
const getCleanAddressValue = val => {
|
|
13199
|
+
if (!val) return "";
|
|
13200
|
+
if (typeof val === "object") {
|
|
13201
|
+
const code = val.code || val.name || val.i18nKey || "";
|
|
13202
|
+
if (code.toUpperCase() === "PERMANENT" || code.toUpperCase() === "CORRESPONDENCE") return "";
|
|
13203
|
+
return code;
|
|
13204
|
+
}
|
|
13205
|
+
const str = String(val).trim();
|
|
13206
|
+
if (str.toUpperCase() === "PERMANENT" || str.toUpperCase() === "CORRESPONDENCE") return "";
|
|
13207
|
+
return str;
|
|
13208
|
+
};
|
|
13088
13209
|
const WSConnectionDetails = _ref => {
|
|
13089
|
-
var _formData$ConnectionD, _formData$ConnectionD2;
|
|
13090
13210
|
let {
|
|
13091
13211
|
config,
|
|
13092
13212
|
onSelect,
|
|
@@ -13102,13 +13222,35 @@ const WSConnectionDetails = _ref => {
|
|
|
13102
13222
|
const {
|
|
13103
13223
|
pathname
|
|
13104
13224
|
} = useLocation();
|
|
13105
|
-
const
|
|
13225
|
+
const cptAddrTop = getCptAddress(formData);
|
|
13226
|
+
const formattedPropertyAddressTop = getPropertyAddressString(cptAddrTop, t);
|
|
13227
|
+
const [connectionDetails, setConnectionDetails] = useState(() => {
|
|
13228
|
+
var _formData$ConnectionD;
|
|
13229
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD = formData.ConnectionDetails) === null || _formData$ConnectionD === void 0 ? void 0 : _formData$ConnectionD.length) > 0) {
|
|
13230
|
+
const initial = {
|
|
13231
|
+
...formData.ConnectionDetails[0]
|
|
13232
|
+
};
|
|
13233
|
+
if (!initial.addressType && formattedPropertyAddressTop) {
|
|
13234
|
+
initial.addressType = formattedPropertyAddressTop;
|
|
13235
|
+
}
|
|
13236
|
+
if (!initial.completeAddress && formattedPropertyAddressTop) {
|
|
13237
|
+
initial.completeAddress = formattedPropertyAddressTop;
|
|
13238
|
+
}
|
|
13239
|
+
return [initial];
|
|
13240
|
+
}
|
|
13241
|
+
const def = createConnectionDetails();
|
|
13242
|
+
if (formattedPropertyAddressTop) {
|
|
13243
|
+
def.addressType = formattedPropertyAddressTop;
|
|
13244
|
+
def.completeAddress = formattedPropertyAddressTop;
|
|
13245
|
+
}
|
|
13246
|
+
return [def];
|
|
13247
|
+
});
|
|
13106
13248
|
useEffect(() => {
|
|
13107
|
-
var _formData$
|
|
13108
|
-
if ((formData === null || formData === void 0 ? void 0 : (_formData$
|
|
13249
|
+
var _formData$ConnectionD2;
|
|
13250
|
+
if ((formData === null || formData === void 0 ? void 0 : (_formData$ConnectionD2 = formData.ConnectionDetails) === null || _formData$ConnectionD2 === void 0 ? void 0 : _formData$ConnectionD2.length) > 0) {
|
|
13109
13251
|
const incoming = formData.ConnectionDetails[0];
|
|
13110
13252
|
const current = connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails[0];
|
|
13111
|
-
if (!
|
|
13253
|
+
if (!lodash.isEqual(current, incoming)) {
|
|
13112
13254
|
setConnectionDetails([incoming]);
|
|
13113
13255
|
}
|
|
13114
13256
|
}
|
|
@@ -13181,9 +13323,6 @@ const WSConnectionDetails = _ref => {
|
|
|
13181
13323
|
}, [commonMastersData]);
|
|
13182
13324
|
useEffect(() => {
|
|
13183
13325
|
var _connectionDetails$, _connectionDetails$2;
|
|
13184
|
-
if (userType === "employee") {
|
|
13185
|
-
onSelect(config.key, connectionDetails);
|
|
13186
|
-
}
|
|
13187
13326
|
if (connectionDetails !== null && connectionDetails !== void 0 && (_connectionDetails$ = connectionDetails[0]) !== null && _connectionDetails$ !== void 0 && _connectionDetails$.water) setWaterSewarageSelection({
|
|
13188
13327
|
water: true,
|
|
13189
13328
|
sewerage: false
|
|
@@ -13194,7 +13333,7 @@ const WSConnectionDetails = _ref => {
|
|
|
13194
13333
|
});
|
|
13195
13334
|
}, [connectionDetails]);
|
|
13196
13335
|
useEffect(() => {
|
|
13197
|
-
if (!(formData !== null && formData !== void 0 && formData.ConnectionDetails)) {
|
|
13336
|
+
if (!(formData !== null && formData !== void 0 && formData.ConnectionDetails) && (connectionDetails === null || connectionDetails === void 0 ? void 0 : connectionDetails.length) === 0) {
|
|
13198
13337
|
setConnectionDetails([createConnectionDetails()]);
|
|
13199
13338
|
}
|
|
13200
13339
|
}, [formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails]);
|
|
@@ -13253,7 +13392,7 @@ const WSConnectionDetails = _ref => {
|
|
|
13253
13392
|
}, commonProps))));
|
|
13254
13393
|
};
|
|
13255
13394
|
const ConnectionDetails = _props => {
|
|
13256
|
-
var _formData$
|
|
13395
|
+
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;
|
|
13257
13396
|
const {
|
|
13258
13397
|
connectionDetail,
|
|
13259
13398
|
focusIndex,
|
|
@@ -13278,64 +13417,14 @@ const ConnectionDetails = _props => {
|
|
|
13278
13417
|
formData,
|
|
13279
13418
|
userType
|
|
13280
13419
|
} = _props;
|
|
13281
|
-
const
|
|
13282
|
-
|
|
13283
|
-
|
|
13284
|
-
|
|
13285
|
-
|
|
13286
|
-
|
|
13287
|
-
|
|
13288
|
-
|
|
13289
|
-
const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : ownerPermAddress || formattedPropertyAddress;
|
|
13290
|
-
if (ownerPermAddress || ownerCorrAddress) {
|
|
13291
|
-
addresses = [{
|
|
13292
|
-
type: "PERMANENT",
|
|
13293
|
-
address: ownerPermAddress
|
|
13294
|
-
}, {
|
|
13295
|
-
type: "CORRESPONDENCE",
|
|
13296
|
-
address: ownerCorrAddress
|
|
13297
|
-
}];
|
|
13298
|
-
}
|
|
13299
|
-
}
|
|
13300
|
-
const getAddressTypeObj = val => {
|
|
13301
|
-
if (!val) return null;
|
|
13302
|
-
if (typeof val === "object") {
|
|
13303
|
-
const code = (val.code || val.i18nKey || "").toUpperCase();
|
|
13304
|
-
if (code === "CORRESPONDENCE") {
|
|
13305
|
-
return {
|
|
13306
|
-
i18nKey: "Correspondence",
|
|
13307
|
-
code: "CORRESPONDENCE"
|
|
13308
|
-
};
|
|
13309
|
-
}
|
|
13310
|
-
return {
|
|
13311
|
-
i18nKey: "Permanent",
|
|
13312
|
-
code: "PERMANENT"
|
|
13313
|
-
};
|
|
13314
|
-
}
|
|
13315
|
-
const str = String(val).toUpperCase();
|
|
13316
|
-
if (str === "CORRESPONDENCE") {
|
|
13317
|
-
return {
|
|
13318
|
-
i18nKey: "Correspondence",
|
|
13319
|
-
code: "CORRESPONDENCE"
|
|
13320
|
-
};
|
|
13321
|
-
}
|
|
13322
|
-
if (str === "PERMANENT") {
|
|
13323
|
-
return {
|
|
13324
|
-
i18nKey: "Permanent",
|
|
13325
|
-
code: "PERMANENT"
|
|
13326
|
-
};
|
|
13327
|
-
}
|
|
13328
|
-
return {
|
|
13329
|
-
i18nKey: val,
|
|
13330
|
-
code: val
|
|
13331
|
-
};
|
|
13332
|
-
};
|
|
13333
|
-
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)) || "";
|
|
13334
|
-
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) || "";
|
|
13335
|
-
if (!initialCompleteAddress && initialAddressType !== null && initialAddressType !== void 0 && initialAddressType.code && ((_addresses = addresses) === null || _addresses === void 0 ? void 0 : _addresses.length) > 0) {
|
|
13336
|
-
const matchedAddr = addresses.find(a => a.type === initialAddressType.code) || {};
|
|
13337
|
-
initialCompleteAddress = matchedAddr.houseNumber || matchedAddr.city || matchedAddr.pinCode ? [matchedAddr.houseNumber, matchedAddr.address, matchedAddr.city, matchedAddr.pinCode].filter(Boolean).join(", ") : matchedAddr.address || "";
|
|
13338
|
-
}
|
|
13420
|
+
const cptAddr = getCptAddress(formData);
|
|
13421
|
+
const formattedPropertyAddress = getPropertyAddressString(cptAddr, t);
|
|
13422
|
+
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);
|
|
13423
|
+
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);
|
|
13424
|
+
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];
|
|
13425
|
+
const ownerPermAddress = owner !== null && owner !== void 0 && owner.permanentAddress && (owner === null || owner === void 0 ? void 0 : owner.permanentAddress) !== "NA" ? owner.permanentAddress : "";
|
|
13426
|
+
const ownerCorrAddress = owner !== null && owner !== void 0 && owner.correspondenceAddress && (owner === null || owner === void 0 ? void 0 : owner.correspondenceAddress) !== "NA" ? owner.correspondenceAddress : "";
|
|
13427
|
+
const initialAddressValue = getCleanAddressValue(rawAddressType) || getCleanAddressValue(rawCompleteAddress) || formattedPropertyAddress || ownerCorrAddress || ownerPermAddress || "";
|
|
13339
13428
|
const {
|
|
13340
13429
|
control,
|
|
13341
13430
|
formState: localFormState,
|
|
@@ -13384,36 +13473,42 @@ const ConnectionDetails = _props => {
|
|
|
13384
13473
|
natureOfWork: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.natureOfWork) || "",
|
|
13385
13474
|
orgDeptDocument: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || "",
|
|
13386
13475
|
orgDeptDocumentName: (connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocumentName) || "",
|
|
13387
|
-
addressType:
|
|
13388
|
-
completeAddress:
|
|
13476
|
+
addressType: initialAddressValue || "",
|
|
13477
|
+
completeAddress: initialAddressValue || ""
|
|
13389
13478
|
}
|
|
13390
13479
|
});
|
|
13391
13480
|
const formValue = watch();
|
|
13392
13481
|
const {
|
|
13393
13482
|
errors
|
|
13394
13483
|
} = localFormState;
|
|
13484
|
+
const prevPropertyIdRef = React.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);
|
|
13485
|
+
const prevPropAddrRef = React.useRef(formattedPropertyAddress);
|
|
13486
|
+
const isAddressUserEditedRef = React.useRef(false);
|
|
13395
13487
|
useEffect(() => {
|
|
13396
|
-
var _formData$
|
|
13397
|
-
const
|
|
13398
|
-
const
|
|
13399
|
-
if (
|
|
13400
|
-
|
|
13401
|
-
|
|
13402
|
-
|
|
13403
|
-
|
|
13404
|
-
}
|
|
13405
|
-
|
|
13406
|
-
|
|
13407
|
-
|
|
13408
|
-
|
|
13409
|
-
|
|
13410
|
-
|
|
13411
|
-
|
|
13412
|
-
|
|
13413
|
-
|
|
13414
|
-
|
|
13415
|
-
|
|
13416
|
-
|
|
13488
|
+
var _formData$cpt4, _formData$cpt4$detail;
|
|
13489
|
+
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;
|
|
13490
|
+
const isNewPropertySelected = Boolean(currentPropertyId && prevPropertyIdRef.current && currentPropertyId !== prevPropertyIdRef.current);
|
|
13491
|
+
if (isNewPropertySelected) {
|
|
13492
|
+
prevPropertyIdRef.current = currentPropertyId;
|
|
13493
|
+
isAddressUserEditedRef.current = false;
|
|
13494
|
+
} else if (currentPropertyId && !prevPropertyIdRef.current) {
|
|
13495
|
+
prevPropertyIdRef.current = currentPropertyId;
|
|
13496
|
+
}
|
|
13497
|
+
if (isAddressUserEditedRef.current) {
|
|
13498
|
+
return;
|
|
13499
|
+
}
|
|
13500
|
+
const currentCptAddr = getCptAddress(formData);
|
|
13501
|
+
const newFormattedAddr = getPropertyAddressString(currentCptAddr, t);
|
|
13502
|
+
const currentVal = getValues("addressType");
|
|
13503
|
+
const isValOldType = typeof currentVal === "object" || currentVal === "PERMANENT" || currentVal === "CORRESPONDENCE";
|
|
13504
|
+
if (newFormattedAddr && (isNewPropertySelected || isValOldType || currentVal === undefined || currentVal === null || currentVal === prevPropAddrRef.current)) {
|
|
13505
|
+
setValue("addressType", newFormattedAddr, {
|
|
13506
|
+
shouldValidate: true
|
|
13507
|
+
});
|
|
13508
|
+
setValue("completeAddress", newFormattedAddr);
|
|
13509
|
+
prevPropAddrRef.current = newFormattedAddr;
|
|
13510
|
+
}
|
|
13511
|
+
}, [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]);
|
|
13417
13512
|
const [uploadedFile, setUploadedFile] = useState((connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.orgDeptDocument) || null);
|
|
13418
13513
|
const [file, setFile] = useState(null);
|
|
13419
13514
|
const [fileUploadError, setFileUploadError] = useState(null);
|
|
@@ -13576,61 +13671,35 @@ const ConnectionDetails = _props => {
|
|
|
13576
13671
|
placeholder: t("Select Applicant Type")
|
|
13577
13672
|
});
|
|
13578
13673
|
}
|
|
13579
|
-
})), /*#__PURE__*/React.createElement(
|
|
13674
|
+
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_Billing_Address_Type"), /*#__PURE__*/React.createElement("span", {
|
|
13580
13675
|
className: "check-page-link-button"
|
|
13581
|
-
}, "*")), /*#__PURE__*/React.createElement(
|
|
13676
|
+
}, "*")), /*#__PURE__*/React.createElement("div", {
|
|
13677
|
+
className: "field"
|
|
13678
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
13582
13679
|
control: control,
|
|
13583
13680
|
name: "addressType",
|
|
13584
|
-
defaultValue:
|
|
13681
|
+
defaultValue: initialAddressValue || "",
|
|
13585
13682
|
rules: {
|
|
13586
13683
|
required: t("REQUIRED_FIELD")
|
|
13587
13684
|
},
|
|
13588
13685
|
isMandatory: true,
|
|
13589
13686
|
render: props => {
|
|
13590
13687
|
var _errors$addressType;
|
|
13591
|
-
return /*#__PURE__*/React.createElement(
|
|
13688
|
+
return /*#__PURE__*/React.createElement(TextInput, {
|
|
13592
13689
|
className: "form-field",
|
|
13593
|
-
|
|
13690
|
+
value: props.value ?? getValues("addressType") ?? "",
|
|
13594
13691
|
disable: false,
|
|
13595
|
-
|
|
13596
|
-
i18nKey: "Permanent",
|
|
13597
|
-
code: "PERMANENT"
|
|
13598
|
-
}, {
|
|
13599
|
-
i18nKey: "Correspondence",
|
|
13600
|
-
code: "CORRESPONDENCE"
|
|
13601
|
-
}],
|
|
13692
|
+
disabled: false,
|
|
13602
13693
|
errorStyle: localFormState.touched.addressType && errors !== null && errors !== void 0 && (_errors$addressType = errors.addressType) !== null && _errors$addressType !== void 0 && _errors$addressType.message ? true : false,
|
|
13603
|
-
|
|
13604
|
-
|
|
13605
|
-
|
|
13606
|
-
|
|
13607
|
-
setValue("completeAddress", formattedAddress);
|
|
13694
|
+
onChange: e => {
|
|
13695
|
+
isAddressUserEditedRef.current = true;
|
|
13696
|
+
props.onChange(e.target.value);
|
|
13697
|
+
setValue("completeAddress", e.target.value);
|
|
13608
13698
|
},
|
|
13609
|
-
optionKey: "i18nKey",
|
|
13610
13699
|
onBlur: props.onBlur,
|
|
13611
|
-
|
|
13612
|
-
placeholder: t("Select Address Type")
|
|
13700
|
+
placeholder: t("WS_Billing_Address_Type")
|
|
13613
13701
|
});
|
|
13614
13702
|
}
|
|
13615
|
-
})), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Complete Address")), /*#__PURE__*/React.createElement(Controller, {
|
|
13616
|
-
control: control,
|
|
13617
|
-
name: "completeAddress",
|
|
13618
|
-
defaultValue: initialCompleteAddress || "",
|
|
13619
|
-
render: props => /*#__PURE__*/React.createElement("div", {
|
|
13620
|
-
className: "field"
|
|
13621
|
-
}, /*#__PURE__*/React.createElement(TextInput, {
|
|
13622
|
-
className: "form-field",
|
|
13623
|
-
value: props.value ?? getValues("completeAddress") ?? initialCompleteAddress ?? "",
|
|
13624
|
-
disable: addresses.length > 0,
|
|
13625
|
-
disabled: addresses.length > 0,
|
|
13626
|
-
onChange: e => {
|
|
13627
|
-
props.onChange(e.target.value);
|
|
13628
|
-
setValue("completeAddress", e.target.value);
|
|
13629
|
-
},
|
|
13630
|
-
style: addresses.length > 0 ? {
|
|
13631
|
-
backgroundColor: "#eee"
|
|
13632
|
-
} : {}
|
|
13633
|
-
}))
|
|
13634
13703
|
})))), showDocModal && /*#__PURE__*/React.createElement(Modal, {
|
|
13635
13704
|
open: showDocModal,
|
|
13636
13705
|
headerBarMain: t("View Document") || "View Document",
|
|
@@ -13820,8 +13889,10 @@ const WSRoadCuttingDetails = _ref => {
|
|
|
13820
13889
|
})) : setRoadCuttingDetails(prev => prev.filter(o => o.key != roadCutt.key));
|
|
13821
13890
|
};
|
|
13822
13891
|
useEffect(() => {
|
|
13823
|
-
|
|
13824
|
-
|
|
13892
|
+
if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], roadCuttingDetails)) {
|
|
13893
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, roadCuttingDetails);
|
|
13894
|
+
}
|
|
13895
|
+
}, [roadCuttingDetails, config === null || config === void 0 ? void 0 : config.key]);
|
|
13825
13896
|
const commonProps = {
|
|
13826
13897
|
focusIndex,
|
|
13827
13898
|
allRoadCuttingDetails: roadCuttingDetails,
|
|
@@ -14243,18 +14314,11 @@ const WSConnectionHolderDetails = _ref => {
|
|
|
14243
14314
|
const data = connectionHolderDetails.map(e => {
|
|
14244
14315
|
return e;
|
|
14245
14316
|
});
|
|
14246
|
-
|
|
14247
|
-
|
|
14248
|
-
|
|
14249
|
-
useEffect(() => {
|
|
14250
|
-
if (userType === "employee") {
|
|
14251
|
-
var _formData$config$key;
|
|
14252
|
-
onSelect(config.key, [{
|
|
14253
|
-
...((_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key[0]),
|
|
14254
|
-
...(connectionHolderDetails === null || connectionHolderDetails === void 0 ? void 0 : connectionHolderDetails[0])
|
|
14255
|
-
}]);
|
|
14317
|
+
if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], data)) {
|
|
14318
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, data);
|
|
14319
|
+
}
|
|
14256
14320
|
}
|
|
14257
|
-
}, [connectionHolderDetails]);
|
|
14321
|
+
}, [connectionHolderDetails, config === null || config === void 0 ? void 0 : config.key]);
|
|
14258
14322
|
function ispagereloadingenabled(eyeclick) {
|
|
14259
14323
|
var _Object$values, _formData$ConnectionH2;
|
|
14260
14324
|
if ((window.location.href.includes("edit") || window.location.href.includes("modify")) && formData !== null && formData !== void 0 && formData.ConnectionHolderDetails && ((_Object$values = Object.values(formData === null || formData === void 0 ? void 0 : (_formData$ConnectionH2 = formData.ConnectionHolderDetails) === null || _formData$ConnectionH2 === void 0 ? void 0 : _formData$ConnectionH2[0])) === null || _Object$values === void 0 ? void 0 : _Object$values.length) > 1) {
|
|
@@ -16388,8 +16452,10 @@ const WSActivationPlumberDetails = _ref => {
|
|
|
16388
16452
|
const data = plumberDetails.length && plumberDetails.map(e => {
|
|
16389
16453
|
return e;
|
|
16390
16454
|
});
|
|
16391
|
-
|
|
16392
|
-
|
|
16455
|
+
if (data && !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key], data)) {
|
|
16456
|
+
onSelect(config === null || config === void 0 ? void 0 : config.key, data);
|
|
16457
|
+
}
|
|
16458
|
+
}, [plumberDetails, formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : _formData$connectionD2.connectionType, config === null || config === void 0 ? void 0 : config.key]);
|
|
16393
16459
|
const commonProps = {
|
|
16394
16460
|
focusIndex,
|
|
16395
16461
|
allOwners: plumberDetails,
|
|
@@ -18839,9 +18905,12 @@ const WSDocumentsEmployee = _ref => {
|
|
|
18839
18905
|
};
|
|
18840
18906
|
onSelect(config.key, documentStep);
|
|
18841
18907
|
} else {
|
|
18842
|
-
|
|
18908
|
+
const docPayload = {
|
|
18843
18909
|
documents: removeDuplicateOtherDocuments(documents)
|
|
18844
|
-
}
|
|
18910
|
+
};
|
|
18911
|
+
if (!lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData[config.key], docPayload)) {
|
|
18912
|
+
onSelect(config.key, docPayload);
|
|
18913
|
+
}
|
|
18845
18914
|
}
|
|
18846
18915
|
};
|
|
18847
18916
|
const downloadDocument = function () {
|
|
@@ -25235,7 +25304,7 @@ const WSDeclaration = _ref => {
|
|
|
25235
25304
|
};
|
|
25236
25305
|
|
|
25237
25306
|
const WSDjbEmployee = _ref => {
|
|
25238
|
-
var _formData$
|
|
25307
|
+
var _formData$additionalD, _localFormState$touch, _formValue$employeeId, _formValue$employeeId2, _localFormState$touch2, _formValue$designatio, _formValue$designatio2, _formData$dueVerifica;
|
|
25239
25308
|
let {
|
|
25240
25309
|
config,
|
|
25241
25310
|
onSelect,
|
|
@@ -25248,6 +25317,24 @@ const WSDjbEmployee = _ref => {
|
|
|
25248
25317
|
const {
|
|
25249
25318
|
t
|
|
25250
25319
|
} = useTranslation();
|
|
25320
|
+
const getInitialValues = () => {
|
|
25321
|
+
var _djb$document, _add$document;
|
|
25322
|
+
const djb = formData === null || formData === void 0 ? void 0 : formData.djbEmployee;
|
|
25323
|
+
const add = formData === null || formData === void 0 ? void 0 : formData.additionalDetails;
|
|
25324
|
+
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;
|
|
25325
|
+
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 : "";
|
|
25326
|
+
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 : "";
|
|
25327
|
+
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 : "";
|
|
25328
|
+
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) || "" : "";
|
|
25329
|
+
return {
|
|
25330
|
+
isDjbEmployee: !!isEmp,
|
|
25331
|
+
employeeId: empId || "",
|
|
25332
|
+
dor: dorVal || "",
|
|
25333
|
+
designation: desig || "",
|
|
25334
|
+
document: doc || ""
|
|
25335
|
+
};
|
|
25336
|
+
};
|
|
25337
|
+
const initialVals = getInitialValues();
|
|
25251
25338
|
const {
|
|
25252
25339
|
control,
|
|
25253
25340
|
watch,
|
|
@@ -25256,17 +25343,52 @@ const WSDjbEmployee = _ref => {
|
|
|
25256
25343
|
trigger,
|
|
25257
25344
|
clearErrors: localClearErrors
|
|
25258
25345
|
} = useForm({
|
|
25259
|
-
defaultValues:
|
|
25260
|
-
|
|
25261
|
-
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) || "",
|
|
25262
|
-
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) || "",
|
|
25263
|
-
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) || "",
|
|
25264
|
-
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) || ""
|
|
25265
|
-
}
|
|
25346
|
+
defaultValues: initialVals,
|
|
25347
|
+
mode: "all"
|
|
25266
25348
|
});
|
|
25267
25349
|
const formValue = watch();
|
|
25268
|
-
const isDjbEmployee =
|
|
25350
|
+
const isDjbEmployee = (formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee) === true || String(formValue === null || formValue === void 0 ? void 0 : formValue.isDjbEmployee) === "true";
|
|
25351
|
+
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);
|
|
25352
|
+
const isInitializedRef = React.useRef(hasData);
|
|
25353
|
+
const getValidationErrors = (values, docFile) => {
|
|
25354
|
+
const errs = {};
|
|
25355
|
+
const isEmp = (values === null || values === void 0 ? void 0 : values.isDjbEmployee) === true || String(values === null || values === void 0 ? void 0 : values.isDjbEmployee) === "true";
|
|
25356
|
+
if (isEmp) {
|
|
25357
|
+
var _values$document;
|
|
25358
|
+
if (!(values !== null && values !== void 0 && values.employeeId) || !String(values === null || values === void 0 ? void 0 : values.employeeId).trim()) {
|
|
25359
|
+
errs.employeeId = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25360
|
+
}
|
|
25361
|
+
if (!(values !== null && values !== void 0 && values.designation) || !String(values === null || values === void 0 ? void 0 : values.designation).trim()) {
|
|
25362
|
+
errs.designation = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25363
|
+
}
|
|
25364
|
+
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;
|
|
25365
|
+
if (!hasDoc) {
|
|
25366
|
+
errs.document = t("CORE_COMMON_REQUIRED_ERRMSG");
|
|
25367
|
+
}
|
|
25368
|
+
}
|
|
25369
|
+
return errs;
|
|
25370
|
+
};
|
|
25371
|
+
useEffect(() => {
|
|
25372
|
+
var _formData$additionalD2;
|
|
25373
|
+
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)) {
|
|
25374
|
+
const vals = getInitialValues();
|
|
25375
|
+
setValue("isDjbEmployee", vals.isDjbEmployee);
|
|
25376
|
+
setValue("employeeId", vals.employeeId);
|
|
25377
|
+
setValue("dor", vals.dor);
|
|
25378
|
+
setValue("designation", vals.designation);
|
|
25379
|
+
setValue("document", vals.document);
|
|
25380
|
+
setUploadedFile(vals.document || null);
|
|
25381
|
+
isInitializedRef.current = true;
|
|
25382
|
+
}
|
|
25383
|
+
}, [formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formData === null || formData === void 0 ? void 0 : formData.additionalDetails]);
|
|
25384
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
25385
|
+
const [file, setFile] = useState(null);
|
|
25386
|
+
const [uploadedFile, setUploadedFile] = useState(() => initialVals.document || null);
|
|
25387
|
+
const [errorUpload, setErrorUpload] = useState(null);
|
|
25388
|
+
const djbErrors = getValidationErrors(formValue, uploadedFile);
|
|
25389
|
+
const hasDjbErrors = Object.keys(djbErrors).length > 0;
|
|
25269
25390
|
useEffect(() => {
|
|
25391
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "djbEmployee";
|
|
25270
25392
|
if (!isDjbEmployee) {
|
|
25271
25393
|
localClearErrors();
|
|
25272
25394
|
setValue("employeeId", "");
|
|
@@ -25275,34 +25397,26 @@ const WSDjbEmployee = _ref => {
|
|
|
25275
25397
|
setValue("document", "");
|
|
25276
25398
|
setUploadedFile(null);
|
|
25277
25399
|
setFile(null);
|
|
25278
|
-
if (clearErrors) clearErrors(
|
|
25400
|
+
if (clearErrors) clearErrors(configKey);
|
|
25279
25401
|
} else {
|
|
25280
|
-
|
|
25402
|
+
setTimeout(() => {
|
|
25403
|
+
trigger(["employeeId", "designation", "document"]);
|
|
25404
|
+
}, 50);
|
|
25405
|
+
const errs = getValidationErrors(formValue, uploadedFile);
|
|
25406
|
+
if (Object.keys(errs).length > 0 && setError) {
|
|
25407
|
+
setError(configKey, {
|
|
25408
|
+
type: "required",
|
|
25409
|
+
message: "CORE_COMMON_REQUIRED_ERRMSG"
|
|
25410
|
+
});
|
|
25411
|
+
}
|
|
25281
25412
|
}
|
|
25282
25413
|
}, [isDjbEmployee]);
|
|
25283
|
-
useEffect(() => {
|
|
25284
|
-
var _formData$djbEmployee7, _formData$djbEmployee8, _formData$additionalD7, _formData$additionalD8, _formData$additionalD9;
|
|
25285
|
-
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;
|
|
25286
|
-
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) {
|
|
25287
|
-
var _formData$djbEmployee9, _formData$additionalD0, _formData$djbEmployee0, _formData$additionalD1, _formData$djbEmployee1, _formData$additionalD10, _formData$djbEmployee10, _formData$additionalD11;
|
|
25288
|
-
setValue("isDjbEmployee", !!isEmp);
|
|
25289
|
-
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) || "");
|
|
25290
|
-
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) || "");
|
|
25291
|
-
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) || "");
|
|
25292
|
-
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) || "");
|
|
25293
|
-
}
|
|
25294
|
-
}, [formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formData === null || formData === void 0 ? void 0 : formData.additionalDetails, setValue]);
|
|
25295
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
25296
|
-
const [file, setFile] = useState(null);
|
|
25297
|
-
const [uploadedFile, setUploadedFile] = useState(() => {
|
|
25298
|
-
var _formData$djbEmployee11, _formData$additionalD12;
|
|
25299
|
-
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;
|
|
25300
|
-
});
|
|
25301
|
-
const [errorUpload, setErrorUpload] = useState(null);
|
|
25302
25414
|
const handleView = function (fileStoreId, tenantId) {
|
|
25303
25415
|
try {
|
|
25304
|
-
|
|
25305
|
-
|
|
25416
|
+
return Promise.resolve(_catch(function () {
|
|
25417
|
+
const id = typeof fileStoreId === "object" ? fileStoreId === null || fileStoreId === void 0 ? void 0 : fileStoreId.fileStoreId : fileStoreId;
|
|
25418
|
+
if (!id) return;
|
|
25419
|
+
return Promise.resolve(Digit.UploadServices.Filefetch([id], tenantId)).then(function (response) {
|
|
25306
25420
|
var _response$data, _response$data$fileSt, _response$data$fileSt2;
|
|
25307
25421
|
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;
|
|
25308
25422
|
if (url) {
|
|
@@ -25318,8 +25432,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25318
25432
|
});
|
|
25319
25433
|
}, function (error) {
|
|
25320
25434
|
console.error("Error fetching file URL:", error);
|
|
25321
|
-
});
|
|
25322
|
-
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
25435
|
+
}));
|
|
25323
25436
|
} catch (e) {
|
|
25324
25437
|
return Promise.reject(e);
|
|
25325
25438
|
}
|
|
@@ -25328,23 +25441,24 @@ const WSDjbEmployee = _ref => {
|
|
|
25328
25441
|
(function () {
|
|
25329
25442
|
try {
|
|
25330
25443
|
setErrorUpload(null);
|
|
25331
|
-
const
|
|
25444
|
+
const _temp3 = function () {
|
|
25332
25445
|
if (file) {
|
|
25333
|
-
const
|
|
25446
|
+
const _temp2 = function () {
|
|
25334
25447
|
if (file.size >= 5242880) {
|
|
25335
25448
|
setErrorUpload({
|
|
25336
25449
|
key: "error",
|
|
25337
25450
|
message: "CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"
|
|
25338
25451
|
});
|
|
25339
25452
|
} else {
|
|
25340
|
-
const
|
|
25453
|
+
const _temp = _catch(function () {
|
|
25341
25454
|
setUploadedFile(null);
|
|
25342
25455
|
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
|
|
25343
25456
|
var _response$data2, _response$data2$files;
|
|
25344
25457
|
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) {
|
|
25345
|
-
var _response$data3, _response$data3$files
|
|
25346
|
-
|
|
25347
|
-
|
|
25458
|
+
var _response$data3, _response$data3$files;
|
|
25459
|
+
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;
|
|
25460
|
+
setUploadedFile(fileId);
|
|
25461
|
+
setValue("document", fileId, {
|
|
25348
25462
|
shouldValidate: true
|
|
25349
25463
|
});
|
|
25350
25464
|
} else {
|
|
@@ -25360,13 +25474,13 @@ const WSDjbEmployee = _ref => {
|
|
|
25360
25474
|
message: "CS_FILE_UPLOAD_ERROR"
|
|
25361
25475
|
});
|
|
25362
25476
|
});
|
|
25363
|
-
if (
|
|
25477
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
25364
25478
|
}
|
|
25365
25479
|
}();
|
|
25366
|
-
if (
|
|
25480
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
25367
25481
|
}
|
|
25368
25482
|
}();
|
|
25369
|
-
return
|
|
25483
|
+
return _temp3 && _temp3.then ? _temp3.then(function () {}) : void 0;
|
|
25370
25484
|
} catch (e) {
|
|
25371
25485
|
Promise.reject(e);
|
|
25372
25486
|
}
|
|
@@ -25376,39 +25490,46 @@ const WSDjbEmployee = _ref => {
|
|
|
25376
25490
|
setFile(e.target.files[0]);
|
|
25377
25491
|
}
|
|
25378
25492
|
useEffect(() => {
|
|
25379
|
-
|
|
25493
|
+
const isEmployeeMode = userType === "employee" || window.location.href.includes("edit-application") || window.location.href.includes("modify-connection") || window.location.href.includes("old-application");
|
|
25494
|
+
if (isEmployeeMode) {
|
|
25380
25495
|
const isDifferent = !lodash.isEqual(formData === null || formData === void 0 ? void 0 : formData.djbEmployee, formValue);
|
|
25381
25496
|
if (isDifferent) {
|
|
25497
|
+
var _formData$djbEmployee, _formData$djbEmployee2;
|
|
25498
|
+
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);
|
|
25499
|
+
const delay = isImmediate ? 0 : 100;
|
|
25382
25500
|
const timer = setTimeout(() => {
|
|
25383
|
-
onSelect(config === null || config === void 0 ? void 0 : config.key, {
|
|
25501
|
+
onSelect((config === null || config === void 0 ? void 0 : config.key) || "djbEmployee", {
|
|
25384
25502
|
...formValue
|
|
25385
25503
|
});
|
|
25386
|
-
},
|
|
25504
|
+
}, delay);
|
|
25387
25505
|
return () => clearTimeout(timer);
|
|
25388
25506
|
}
|
|
25389
25507
|
}
|
|
25390
25508
|
}, [formValue, userType]);
|
|
25391
25509
|
useEffect(() => {
|
|
25392
|
-
|
|
25393
|
-
|
|
25394
|
-
if (
|
|
25395
|
-
|
|
25396
|
-
|
|
25397
|
-
|
|
25398
|
-
} 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]) {
|
|
25399
|
-
if (clearErrors) clearErrors(config === null || config === void 0 ? void 0 : config.key);
|
|
25400
|
-
}
|
|
25510
|
+
const configKey = (config === null || config === void 0 ? void 0 : config.key) || "djbEmployee";
|
|
25511
|
+
if (hasDjbErrors) {
|
|
25512
|
+
if (setError) setError(configKey, {
|
|
25513
|
+
type: "required",
|
|
25514
|
+
message: "CORE_COMMON_REQUIRED_ERRMSG"
|
|
25515
|
+
});
|
|
25401
25516
|
} else {
|
|
25402
|
-
var _formState$
|
|
25403
|
-
if (formState !== null && formState !== void 0 && (_formState$
|
|
25404
|
-
clearErrors(
|
|
25517
|
+
var _formState$errors;
|
|
25518
|
+
if (formState !== null && formState !== void 0 && (_formState$errors = formState.errors) !== null && _formState$errors !== void 0 && _formState$errors[configKey] && clearErrors) {
|
|
25519
|
+
clearErrors(configKey);
|
|
25405
25520
|
}
|
|
25406
25521
|
}
|
|
25407
|
-
}, [
|
|
25522
|
+
}, [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]);
|
|
25408
25523
|
const goNext = () => {
|
|
25409
25524
|
onSelect(config.key, formValue);
|
|
25410
25525
|
};
|
|
25411
25526
|
const onSkip = () => onSelect();
|
|
25527
|
+
const errorStyle = {
|
|
25528
|
+
width: "100%",
|
|
25529
|
+
marginLeft: "0px",
|
|
25530
|
+
fontSize: "12px",
|
|
25531
|
+
marginTop: "4px"
|
|
25532
|
+
};
|
|
25412
25533
|
const FormContent = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
25413
25534
|
title: t("Are you a DJB Employee?"),
|
|
25414
25535
|
defaultOpen: true
|
|
@@ -25426,6 +25547,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25426
25547
|
gap: "2rem",
|
|
25427
25548
|
alignItems: "center"
|
|
25428
25549
|
},
|
|
25550
|
+
name: "isDjbEmployeeRadio",
|
|
25429
25551
|
options: [{
|
|
25430
25552
|
i18nKey: "CORE_COMMON_YES",
|
|
25431
25553
|
code: true
|
|
@@ -25448,7 +25570,12 @@ const WSDjbEmployee = _ref => {
|
|
|
25448
25570
|
className: "formcomposer-section-grid"
|
|
25449
25571
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Employee ID"), isDjbEmployee && /*#__PURE__*/React.createElement("span", {
|
|
25450
25572
|
className: "check-page-link-button"
|
|
25451
|
-
}, " *")), /*#__PURE__*/React.createElement(
|
|
25573
|
+
}, " *")), /*#__PURE__*/React.createElement("div", {
|
|
25574
|
+
className: "field",
|
|
25575
|
+
style: {
|
|
25576
|
+
width: "100%"
|
|
25577
|
+
}
|
|
25578
|
+
}, /*#__PURE__*/React.createElement(Controller, {
|
|
25452
25579
|
control: control,
|
|
25453
25580
|
name: "employeeId",
|
|
25454
25581
|
rules: {
|
|
@@ -25456,14 +25583,25 @@ const WSDjbEmployee = _ref => {
|
|
|
25456
25583
|
},
|
|
25457
25584
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
25458
25585
|
value: props.value,
|
|
25459
|
-
onChange: e =>
|
|
25460
|
-
|
|
25586
|
+
onChange: e => {
|
|
25587
|
+
props.onChange(e.target.value);
|
|
25588
|
+
trigger("employeeId");
|
|
25589
|
+
},
|
|
25590
|
+
onBlur: e => {
|
|
25591
|
+
props.onBlur(e);
|
|
25592
|
+
trigger("employeeId");
|
|
25593
|
+
},
|
|
25461
25594
|
placeholder: t("Employee ID")
|
|
25462
25595
|
})
|
|
25463
|
-
})
|
|
25596
|
+
}), (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.createElement(CardLabelError, {
|
|
25597
|
+
style: errorStyle
|
|
25598
|
+
}, t("CORE_COMMON_REQUIRED_ERRMSG"))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Employee Designation"), isDjbEmployee && /*#__PURE__*/React.createElement("span", {
|
|
25464
25599
|
className: "check-page-link-button"
|
|
25465
25600
|
}, " *")), /*#__PURE__*/React.createElement("div", {
|
|
25466
|
-
className: "field"
|
|
25601
|
+
className: "field",
|
|
25602
|
+
style: {
|
|
25603
|
+
width: "100%"
|
|
25604
|
+
}
|
|
25467
25605
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
25468
25606
|
control: control,
|
|
25469
25607
|
name: "designation",
|
|
@@ -25472,14 +25610,25 @@ const WSDjbEmployee = _ref => {
|
|
|
25472
25610
|
},
|
|
25473
25611
|
render: props => /*#__PURE__*/React.createElement(TextInput, {
|
|
25474
25612
|
value: props.value,
|
|
25475
|
-
onChange: e =>
|
|
25476
|
-
|
|
25613
|
+
onChange: e => {
|
|
25614
|
+
props.onChange(e.target.value);
|
|
25615
|
+
trigger("designation");
|
|
25616
|
+
},
|
|
25617
|
+
onBlur: e => {
|
|
25618
|
+
props.onBlur(e);
|
|
25619
|
+
trigger("designation");
|
|
25620
|
+
},
|
|
25477
25621
|
placeholder: t("Employee Designation")
|
|
25478
25622
|
})
|
|
25479
|
-
})
|
|
25623
|
+
}), (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.createElement(CardLabelError, {
|
|
25624
|
+
style: errorStyle
|
|
25625
|
+
}, t("CORE_COMMON_REQUIRED_ERRMSG"))))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("Upload Employee ID Document"), isDjbEmployee && /*#__PURE__*/React.createElement("span", {
|
|
25480
25626
|
className: "check-page-link-button"
|
|
25481
25627
|
}, " *")), /*#__PURE__*/React.createElement("div", {
|
|
25482
|
-
className: "field"
|
|
25628
|
+
className: "field",
|
|
25629
|
+
style: {
|
|
25630
|
+
width: "100%"
|
|
25631
|
+
}
|
|
25483
25632
|
}, /*#__PURE__*/React.createElement(Controller, {
|
|
25484
25633
|
control: control,
|
|
25485
25634
|
name: "document",
|
|
@@ -25501,6 +25650,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25501
25650
|
setValue("document", "", {
|
|
25502
25651
|
shouldValidate: true
|
|
25503
25652
|
});
|
|
25653
|
+
trigger("document");
|
|
25504
25654
|
},
|
|
25505
25655
|
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`),
|
|
25506
25656
|
error: errorUpload,
|
|
@@ -25552,6 +25702,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25552
25702
|
});
|
|
25553
25703
|
const fileInput = document.getElementById("employee-doc");
|
|
25554
25704
|
if (fileInput) fileInput.value = "";
|
|
25705
|
+
trigger("document");
|
|
25555
25706
|
},
|
|
25556
25707
|
title: "Remove Document",
|
|
25557
25708
|
style: {
|
|
@@ -25680,7 +25831,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25680
25831
|
config: config,
|
|
25681
25832
|
onSelect: goNext,
|
|
25682
25833
|
onSkip: onSkip,
|
|
25683
|
-
isDisabled:
|
|
25834
|
+
isDisabled: hasDjbErrors
|
|
25684
25835
|
}, /*#__PURE__*/React.createElement("div", {
|
|
25685
25836
|
style: {
|
|
25686
25837
|
marginTop: "-30px",
|
|
@@ -25700,7 +25851,7 @@ const WSDjbEmployee = _ref => {
|
|
|
25700
25851
|
};
|
|
25701
25852
|
|
|
25702
25853
|
const WSDivyangjan = _ref => {
|
|
25703
|
-
var _formData$disability, _formData$additionalD;
|
|
25854
|
+
var _formData$disability, _formData$additionalD, _formData$config$key2;
|
|
25704
25855
|
let {
|
|
25705
25856
|
config,
|
|
25706
25857
|
onSelect,
|
|
@@ -25729,11 +25880,16 @@ const WSDivyangjan = _ref => {
|
|
|
25729
25880
|
}, [onSelect]);
|
|
25730
25881
|
useEffect(() => {
|
|
25731
25882
|
if (userType === "employee") {
|
|
25732
|
-
|
|
25733
|
-
|
|
25734
|
-
|
|
25883
|
+
var _formData$config$key;
|
|
25884
|
+
const currentVal = formData === null || formData === void 0 ? void 0 : (_formData$config$key = formData[config.key]) === null || _formData$config$key === void 0 ? void 0 : _formData$config$key.isDivyangjan;
|
|
25885
|
+
const newVal = !!formValue.isDivyangjan;
|
|
25886
|
+
if (currentVal !== newVal) {
|
|
25887
|
+
onSelectRef.current(config.key, {
|
|
25888
|
+
isDivyangjan: newVal
|
|
25889
|
+
});
|
|
25890
|
+
}
|
|
25735
25891
|
}
|
|
25736
|
-
}, [config.key, formValue.isDivyangjan, userType]);
|
|
25892
|
+
}, [config.key, formValue.isDivyangjan, userType, formData === null || formData === void 0 ? void 0 : (_formData$config$key2 = formData[config.key]) === null || _formData$config$key2 === void 0 ? void 0 : _formData$config$key2.isDivyangjan]);
|
|
25737
25893
|
const content = /*#__PURE__*/React.createElement(CollapsibleCardPage, {
|
|
25738
25894
|
title: t("Are you a Divyangjan/Person with Disability?"),
|
|
25739
25895
|
defaultOpen: true
|
|
@@ -25751,6 +25907,7 @@ const WSDivyangjan = _ref => {
|
|
|
25751
25907
|
gap: "2rem",
|
|
25752
25908
|
alignItems: "center"
|
|
25753
25909
|
},
|
|
25910
|
+
name: "isDivyangjanRadio",
|
|
25754
25911
|
options: [{
|
|
25755
25912
|
i18nKey: "CORE_COMMON_YES",
|
|
25756
25913
|
code: true
|
|
@@ -29336,11 +29493,7 @@ const WSCard = () => {
|
|
|
29336
29493
|
setTotalCount(waterCount);
|
|
29337
29494
|
}
|
|
29338
29495
|
}, [wsData]);
|
|
29339
|
-
let links = [
|
|
29340
|
-
label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
|
|
29341
|
-
link: `/digit-ui/employee/ws/info`,
|
|
29342
|
-
roles: ["WS_CEMP", "SW_CEMP"]
|
|
29343
|
-
}];
|
|
29496
|
+
let links = [];
|
|
29344
29497
|
links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
|
|
29345
29498
|
const propsForModuleCard = {
|
|
29346
29499
|
Icon: /*#__PURE__*/React.createElement(WSICon, null),
|
|
@@ -29358,43 +29511,43 @@ const WSCard = () => {
|
|
|
29358
29511
|
count: isWSInboxLoading ? "-" : wsData === null || wsData === void 0 ? void 0 : wsData.totalCount,
|
|
29359
29512
|
label: t("WATER_INBOX"),
|
|
29360
29513
|
link: `/digit-ui/employee/ws/water/inbox`,
|
|
29361
|
-
roles: ["WS_CEMP", "
|
|
29514
|
+
roles: ["WS_CEMP", "WS_ZRO", "EE"]
|
|
29362
29515
|
}, {
|
|
29363
29516
|
label: t("WS_BILL_AMENDMENT_INBOX", "Bill Amendment Inbox"),
|
|
29364
29517
|
link: `/digit-ui/employee/ws/water/bill-amendment/inbox`,
|
|
29365
|
-
roles: ["WS_CEMP", "
|
|
29518
|
+
roles: ["WS_CEMP", "WS_ZRO", "EE"]
|
|
29366
29519
|
}, {
|
|
29367
29520
|
label: t("WS_BILL_AMENDMENT_APPLICATION_SEARCH", "Search Bill Amendment Application"),
|
|
29368
29521
|
link: `/digit-ui/employee/ws/water/bill-amendment/search-application`,
|
|
29369
|
-
roles: ["WS_CEMP", "
|
|
29522
|
+
roles: ["WS_CEMP", "WS_ZRO", "EE"]
|
|
29370
29523
|
}, ...links, {
|
|
29371
29524
|
label: t("WS_WATER_CONNECTION_SEARCH_LABEL"),
|
|
29372
29525
|
link: `/digit-ui/employee/ws/water/search-connection`,
|
|
29373
|
-
roles: ["WS_CEMP", "
|
|
29526
|
+
roles: ["WS_CEMP", "WS_ZRO", "EE"]
|
|
29374
29527
|
}, {
|
|
29375
29528
|
label: t("WS_WATER_APPLICATION_SEARCH"),
|
|
29376
29529
|
link: `/digit-ui/employee/ws/water/search-application`,
|
|
29377
|
-
roles: ["WS_CEMP", "
|
|
29530
|
+
roles: ["WS_CEMP", "WS_ZRO", "EE"]
|
|
29378
29531
|
}, {
|
|
29379
29532
|
label: t("WS_CALCULATION"),
|
|
29380
29533
|
link: `/digit-ui/employee/ws/water/calculation`,
|
|
29381
|
-
roles: ["WS_CEMP", "
|
|
29534
|
+
roles: ["WS_CEMP", "WS_ZRO"]
|
|
29382
29535
|
}, {
|
|
29383
29536
|
label: t("WS_APPLY_MUTATION"),
|
|
29384
29537
|
link: `/digit-ui/employee/ws/mutation-application`,
|
|
29385
|
-
roles: [
|
|
29538
|
+
roles: []
|
|
29386
29539
|
}, {
|
|
29387
29540
|
label: t("WS_ZRO_VERIFICATION"),
|
|
29388
29541
|
link: `/digit-ui/employee/ws/zro-application`,
|
|
29389
|
-
roles: ["WS_CEMP", "
|
|
29542
|
+
roles: ["WS_CEMP", "WS_ZRO"]
|
|
29390
29543
|
}, {
|
|
29391
29544
|
label: t("WS_DISCONNECTION"),
|
|
29392
29545
|
link: `/digit-ui/employee/ws/new-disconnection`,
|
|
29393
|
-
roles: [
|
|
29546
|
+
roles: []
|
|
29394
29547
|
}, {
|
|
29395
29548
|
label: t("WS_RECONNECTION"),
|
|
29396
29549
|
link: `/digit-ui/employee/ws/new-restoration`,
|
|
29397
|
-
roles: [
|
|
29550
|
+
roles: []
|
|
29398
29551
|
}].filter(link => link.roles ? checkForEmployee(link.roles) : true)
|
|
29399
29552
|
};
|
|
29400
29553
|
return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
|
|
@@ -29443,11 +29596,7 @@ const SWCard = () => {
|
|
|
29443
29596
|
setTotalCount(sewerageCount);
|
|
29444
29597
|
}
|
|
29445
29598
|
}, [swData]);
|
|
29446
|
-
let links = [
|
|
29447
|
-
label: t("WS_APPLY_NEW_CONNECTION_HOME_CARD_LABEL"),
|
|
29448
|
-
link: `/digit-ui/employee/ws/create-application`,
|
|
29449
|
-
roles: ["WS_CEMP", "SW_CEMP"]
|
|
29450
|
-
}];
|
|
29599
|
+
let links = [];
|
|
29451
29600
|
links = links.filter(link => link.roles ? checkForEmployee(link.roles) : true);
|
|
29452
29601
|
const propsForModuleCard = {
|
|
29453
29602
|
Icon: /*#__PURE__*/React.createElement(WSICon, null),
|
|
@@ -34499,7 +34648,7 @@ const checkForNA$2 = value => {
|
|
|
34499
34648
|
return value ? value : "CS_NA";
|
|
34500
34649
|
};
|
|
34501
34650
|
const WSApplicationDetails = () => {
|
|
34502
|
-
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;
|
|
34651
|
+
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;
|
|
34503
34652
|
const getDisconnectionNoticeSearch = function () {
|
|
34504
34653
|
try {
|
|
34505
34654
|
var _data$WaterConnection190, _data$WaterConnection191, _data$SewerageConnect182, _data$SewerageConnect183;
|
|
@@ -34993,10 +35142,17 @@ const WSApplicationDetails = () => {
|
|
|
34993
35142
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
34994
35143
|
label: t("WS_Billing_Address_Type"),
|
|
34995
35144
|
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)))}`
|
|
34996
|
-
}),
|
|
34997
|
-
|
|
34998
|
-
|
|
34999
|
-
|
|
35145
|
+
}), ((_connectionDetails$ad4, _connectionDetails$ad5, _applicationData$addi2, _applicationData$addi3) => {
|
|
35146
|
+
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) || "";
|
|
35147
|
+
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) || "";
|
|
35148
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
35149
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
35150
|
+
label: t("Complete Address"),
|
|
35151
|
+
text: `${checkForNA$2(compAddrStr)}`
|
|
35152
|
+
});
|
|
35153
|
+
}
|
|
35154
|
+
return null;
|
|
35155
|
+
})(), /*#__PURE__*/React.createElement(Row, {
|
|
35000
35156
|
label: t("WS_DIVYANGJAN"),
|
|
35001
35157
|
text: `${connectionDetails !== null && connectionDetails !== void 0 && connectionDetails.isDivyangjan ? t("CORE_COMMON_YES") : t("CORE_COMMON_NO")}`
|
|
35002
35158
|
}), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do = connectionDetails.domesticType) === null || _connectionDetails$do === void 0 ? void 0 : _connectionDetails$do.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -35248,10 +35404,10 @@ const WSApplicationDetails = () => {
|
|
|
35248
35404
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
35249
35405
|
label: t("WS_SELECT_YEAR_OF_CONSTRUCTION"),
|
|
35250
35406
|
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)))}`
|
|
35251
|
-
}), 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$
|
|
35407
|
+
}), 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.createElement(Row, {
|
|
35252
35408
|
label: t("WS_NUMBER_OF_DWELLING_UNITS"),
|
|
35253
35409
|
text: `${t(checkForNA$2((useDetails === null || useDetails === void 0 ? void 0 : useDetails.NumberofDwellingUnits) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.noOfDwellingUnits)))}`
|
|
35254
|
-
}) : 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$
|
|
35410
|
+
}) : 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) => {
|
|
35255
35411
|
var _q$answer, _q$answer2, _q$answer3;
|
|
35256
35412
|
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}`;
|
|
35257
35413
|
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;
|
|
@@ -36811,10 +36967,122 @@ const ConsumptionDetails = _ref => {
|
|
|
36811
36967
|
});
|
|
36812
36968
|
};
|
|
36813
36969
|
const consumption = (currentReading, lastReading) => {
|
|
36814
|
-
if (currentReading && lastReading) {
|
|
36970
|
+
if (currentReading !== null && currentReading !== undefined && lastReading !== null && lastReading !== undefined && currentReading !== "" && lastReading !== "") {
|
|
36815
36971
|
return Number(currentReading - lastReading);
|
|
36816
36972
|
} else return t("NA");
|
|
36817
36973
|
};
|
|
36974
|
+
const columns = useMemo(() => [{
|
|
36975
|
+
Header: t("WS_MYCONNECTIONS_CONSUMER_NO"),
|
|
36976
|
+
accessor: "connectionNo",
|
|
36977
|
+
disableSortBy: true,
|
|
36978
|
+
Cell: _ref2 => {
|
|
36979
|
+
var _row$original;
|
|
36980
|
+
let {
|
|
36981
|
+
row
|
|
36982
|
+
} = _ref2;
|
|
36983
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo) || t("NA"));
|
|
36984
|
+
}
|
|
36985
|
+
}, {
|
|
36986
|
+
Header: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
|
|
36987
|
+
accessor: "billingPeriod",
|
|
36988
|
+
disableSortBy: true,
|
|
36989
|
+
Cell: _ref3 => {
|
|
36990
|
+
var _row$original2;
|
|
36991
|
+
let {
|
|
36992
|
+
row
|
|
36993
|
+
} = _ref3;
|
|
36994
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.billingPeriod) || t("NA"));
|
|
36995
|
+
}
|
|
36996
|
+
}, {
|
|
36997
|
+
Header: t("WS_READING_QUALITY_CODE"),
|
|
36998
|
+
accessor: "readingQualityCode",
|
|
36999
|
+
disableSortBy: true,
|
|
37000
|
+
Cell: _ref4 => {
|
|
37001
|
+
var _row$original3;
|
|
37002
|
+
let {
|
|
37003
|
+
row
|
|
37004
|
+
} = _ref4;
|
|
37005
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.readingQualityCode) || t("NA"));
|
|
37006
|
+
}
|
|
37007
|
+
}, {
|
|
37008
|
+
Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
|
|
37009
|
+
accessor: "lastReading",
|
|
37010
|
+
disableSortBy: true,
|
|
37011
|
+
Cell: _ref5 => {
|
|
37012
|
+
var _row$original4, _row$original5, _row$original6;
|
|
37013
|
+
let {
|
|
37014
|
+
row
|
|
37015
|
+
} = _ref5;
|
|
37016
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.lastReading) !== undefined && ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.lastReading) !== null ? (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.lastReading : t("NA"));
|
|
37017
|
+
}
|
|
37018
|
+
}, {
|
|
37019
|
+
Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
|
|
37020
|
+
accessor: "lastReadingDate",
|
|
37021
|
+
disableSortBy: true,
|
|
37022
|
+
Cell: _ref6 => {
|
|
37023
|
+
var _row$original7, _row$original8;
|
|
37024
|
+
let {
|
|
37025
|
+
row
|
|
37026
|
+
} = _ref6;
|
|
37027
|
+
return /*#__PURE__*/React.createElement("span", null, (_row$original7 = row.original) !== null && _row$original7 !== void 0 && _row$original7.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.lastReadingDate) : t("NA"));
|
|
37028
|
+
}
|
|
37029
|
+
}, {
|
|
37030
|
+
Header: t("WS_SERV_DETAIL_CUR_METER_READ"),
|
|
37031
|
+
accessor: "currentReading",
|
|
37032
|
+
disableSortBy: true,
|
|
37033
|
+
Cell: _ref7 => {
|
|
37034
|
+
var _row$original9, _row$original0, _row$original1;
|
|
37035
|
+
let {
|
|
37036
|
+
row
|
|
37037
|
+
} = _ref7;
|
|
37038
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.currentReading) !== undefined && ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.currentReading) !== null ? (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.currentReading : t("NA"));
|
|
37039
|
+
}
|
|
37040
|
+
}, {
|
|
37041
|
+
Header: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
|
|
37042
|
+
accessor: "currentReadingDate",
|
|
37043
|
+
disableSortBy: true,
|
|
37044
|
+
Cell: _ref8 => {
|
|
37045
|
+
var _row$original10, _row$original11;
|
|
37046
|
+
let {
|
|
37047
|
+
row
|
|
37048
|
+
} = _ref8;
|
|
37049
|
+
return /*#__PURE__*/React.createElement("span", null, (_row$original10 = row.original) !== null && _row$original10 !== void 0 && _row$original10.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.currentReadingDate) : t("NA"));
|
|
37050
|
+
}
|
|
37051
|
+
}, {
|
|
37052
|
+
Header: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
|
|
37053
|
+
id: "consumption",
|
|
37054
|
+
disableSortBy: true,
|
|
37055
|
+
Cell: _ref9 => {
|
|
37056
|
+
var _row$original12, _row$original13;
|
|
37057
|
+
let {
|
|
37058
|
+
row
|
|
37059
|
+
} = _ref9;
|
|
37060
|
+
return /*#__PURE__*/React.createElement("span", null, consumption((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.currentReading, (_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : _row$original13.lastReading));
|
|
37061
|
+
}
|
|
37062
|
+
}, {
|
|
37063
|
+
Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
|
|
37064
|
+
id: "action",
|
|
37065
|
+
disableSortBy: true,
|
|
37066
|
+
Cell: _ref0 => {
|
|
37067
|
+
let {
|
|
37068
|
+
row
|
|
37069
|
+
} = _ref0;
|
|
37070
|
+
return /*#__PURE__*/React.createElement(SubmitBar, {
|
|
37071
|
+
style: {
|
|
37072
|
+
backgroundColor: "#0A4275",
|
|
37073
|
+
color: "#FFFFFF",
|
|
37074
|
+
minWidth: "auto",
|
|
37075
|
+
padding: "6px 14px",
|
|
37076
|
+
fontSize: "12px",
|
|
37077
|
+
height: "auto",
|
|
37078
|
+
margin: "0px",
|
|
37079
|
+
whiteSpace: "nowrap"
|
|
37080
|
+
},
|
|
37081
|
+
label: t("VIEW_METER_READING_DETAILS"),
|
|
37082
|
+
onSubmit: () => handleViewMeterReadingDetails(row.original)
|
|
37083
|
+
});
|
|
37084
|
+
}
|
|
37085
|
+
}], [t]);
|
|
36818
37086
|
if (isLoading) {
|
|
36819
37087
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
36820
37088
|
}
|
|
@@ -36822,90 +37090,32 @@ const ConsumptionDetails = _ref => {
|
|
|
36822
37090
|
meterReadings
|
|
36823
37091
|
} = data || {};
|
|
36824
37092
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
36825
|
-
className: "employee-form-section-wrapper",
|
|
36826
|
-
style: {
|
|
36827
|
-
display: "flex",
|
|
36828
|
-
gap: "16px",
|
|
36829
|
-
width: "100%"
|
|
36830
|
-
}
|
|
36831
|
-
}, /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
36832
|
-
config: [{
|
|
36833
|
-
timeLine: [{
|
|
36834
|
-
actions: "WS_VIEW_CONSUMPTION",
|
|
36835
|
-
currentStep: 1
|
|
36836
|
-
}]
|
|
36837
|
-
}],
|
|
36838
|
-
showFinalStep: false
|
|
36839
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
36840
37093
|
style: {
|
|
36841
37094
|
flex: 1,
|
|
36842
37095
|
display: "flex",
|
|
36843
37096
|
flexDirection: "column",
|
|
36844
|
-
gap: "16px"
|
|
36845
|
-
|
|
36846
|
-
|
|
36847
|
-
key: index
|
|
36848
|
-
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
36849
|
-
style: {
|
|
36850
|
-
display: "flex",
|
|
36851
|
-
justifyContent: "flex-end",
|
|
36852
|
-
marginBottom: "16px",
|
|
36853
|
-
marginTop: "8px",
|
|
36854
|
-
marginRight: "8px"
|
|
37097
|
+
gap: "16px",
|
|
37098
|
+
minWidth: 0,
|
|
37099
|
+
overflowX: "auto"
|
|
36855
37100
|
}
|
|
36856
|
-
}, /*#__PURE__*/React.createElement(
|
|
36857
|
-
|
|
36858
|
-
|
|
36859
|
-
|
|
36860
|
-
|
|
36861
|
-
|
|
36862
|
-
|
|
36863
|
-
|
|
36864
|
-
|
|
36865
|
-
|
|
36866
|
-
|
|
36867
|
-
|
|
36868
|
-
|
|
36869
|
-
|
|
36870
|
-
|
|
36871
|
-
|
|
36872
|
-
|
|
36873
|
-
}), /*#__PURE__*/React.createElement(
|
|
36874
|
-
key: t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL"),
|
|
36875
|
-
label: `${t("WS_CONSUMPTION_DETAILS_METER_STATUS_LABEL")}`,
|
|
36876
|
-
text: (application === null || application === void 0 ? void 0 : application.meterStatus) || t("NA"),
|
|
36877
|
-
className: "border-none"
|
|
36878
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36879
|
-
key: t("WS_READING_QUALITY_CODE"),
|
|
36880
|
-
label: `${t("WS_READING_QUALITY_CODE")}`,
|
|
36881
|
-
text: (application === null || application === void 0 ? void 0 : application.readingQualityCode) || t("NA"),
|
|
36882
|
-
className: "border-none"
|
|
36883
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36884
|
-
key: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
|
|
36885
|
-
label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL")}`,
|
|
36886
|
-
text: (application === null || application === void 0 ? void 0 : application.lastReading) || t("NA"),
|
|
36887
|
-
className: "border-none"
|
|
36888
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36889
|
-
key: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
|
|
36890
|
-
label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL")}`,
|
|
36891
|
-
text: application !== null && application !== void 0 && application.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.lastReadingDate) : t("NA"),
|
|
36892
|
-
className: "border-none"
|
|
36893
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36894
|
-
key: t("WS_SERV_DETAIL_CUR_METER_READ"),
|
|
36895
|
-
label: `${t("WS_SERV_DETAIL_CUR_METER_READ")}`,
|
|
36896
|
-
text: (application === null || application === void 0 ? void 0 : application.currentReading) || t("NA"),
|
|
36897
|
-
className: "border-none"
|
|
36898
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36899
|
-
key: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
|
|
36900
|
-
label: `${t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL")}`,
|
|
36901
|
-
text: application !== null && application !== void 0 && application.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.currentReadingDate) : t("NA"),
|
|
36902
|
-
className: "border-none"
|
|
36903
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
36904
|
-
key: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
|
|
36905
|
-
label: `${t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL")}`,
|
|
36906
|
-
text: consumption(application === null || application === void 0 ? void 0 : application.currentReading, application === null || application === void 0 ? void 0 : application.lastReading),
|
|
36907
|
-
className: "border-none"
|
|
36908
|
-
}))))), !(meterReadings !== null && meterReadings !== void 0 && meterReadings.length) > 0 && /*#__PURE__*/React.createElement("p", {
|
|
37101
|
+
}, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 ? /*#__PURE__*/React.createElement(Table, {
|
|
37102
|
+
t: t,
|
|
37103
|
+
data: meterReadings,
|
|
37104
|
+
columns: columns,
|
|
37105
|
+
totalRecords: meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length,
|
|
37106
|
+
manualPagination: false,
|
|
37107
|
+
isPaginationRequired: true,
|
|
37108
|
+
pageSizeLimit: 10,
|
|
37109
|
+
disableSort: true,
|
|
37110
|
+
autoSort: false,
|
|
37111
|
+
getCellProps: () => ({
|
|
37112
|
+
style: {
|
|
37113
|
+
whiteSpace: "nowrap",
|
|
37114
|
+
padding: "16px 14px",
|
|
37115
|
+
fontSize: "14px"
|
|
37116
|
+
}
|
|
37117
|
+
})
|
|
37118
|
+
}) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("p", {
|
|
36909
37119
|
style: {
|
|
36910
37120
|
marginLeft: "16px",
|
|
36911
37121
|
marginTop: "16px"
|
|
@@ -37934,12 +38144,21 @@ const EditApplication = _ref => {
|
|
|
37934
38144
|
});
|
|
37935
38145
|
let isModifyEdit = window.location.href.includes("/modify-connection") || window.location.href.includes("/edit-application");
|
|
37936
38146
|
useEffect(() => {
|
|
37937
|
-
var
|
|
38147
|
+
var _currentApp$additiona, _params$additionalDet, _params$additionalDet2, _currentApp$additiona2, _currentApp$auditDeta, _params$auditDetails, _params$auditDetails2, _currentApp$auditDeta2;
|
|
38148
|
+
if (window.location.href.includes("/acknowledgement")) {
|
|
38149
|
+
return;
|
|
38150
|
+
}
|
|
37938
38151
|
waterapplication = Waterresult;
|
|
37939
38152
|
sewerageapplication = Sewarageresult;
|
|
37940
|
-
|
|
37941
|
-
|
|
37942
|
-
|
|
38153
|
+
const currentApp = waterapplication || sewerageapplication;
|
|
38154
|
+
const currentAppNo = currentApp === null || currentApp === void 0 ? void 0 : currentApp.applicationNo;
|
|
38155
|
+
const isAppLoaded = !!currentAppNo;
|
|
38156
|
+
const isDifferentApp = (params === null || params === void 0 ? void 0 : params.applicationNo) && currentAppNo && (params === null || params === void 0 ? void 0 : params.applicationNo) !== currentAppNo;
|
|
38157
|
+
const isNotHydrated = !(Object.keys(params).length > 0) || !(params !== null && params !== void 0 && params.DocumentsRequired);
|
|
38158
|
+
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);
|
|
38159
|
+
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);
|
|
38160
|
+
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);
|
|
38161
|
+
if (isAppLoaded && (isNotHydrated || isDifferentApp || isSatisfiedChanged || isAuditChanged || isStatusChanged)) {
|
|
37943
38162
|
if (window.location.href.includes("edit-application")) {
|
|
37944
38163
|
if (waterapplication) {
|
|
37945
38164
|
waterapplication.isEditApplication = true;
|
|
@@ -37966,63 +38185,110 @@ const EditApplication = _ref => {
|
|
|
37966
38185
|
...sewerageapplication
|
|
37967
38186
|
}));
|
|
37968
38187
|
let EditDetails = getEditDetails(waterapplication, sewerageapplication, t);
|
|
37969
|
-
setParams(
|
|
37970
|
-
|
|
37971
|
-
|
|
37972
|
-
|
|
37973
|
-
|
|
37974
|
-
|
|
37975
|
-
let currentApp = Waterresult || Sewarageresult;
|
|
37976
|
-
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);
|
|
37977
|
-
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);
|
|
37978
|
-
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;
|
|
38188
|
+
setParams(EditDetails);
|
|
38189
|
+
} else if (Object.keys(params).length > 0 && currentApp) {
|
|
38190
|
+
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;
|
|
38191
|
+
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);
|
|
38192
|
+
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);
|
|
38193
|
+
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;
|
|
37979
38194
|
const needsDueSync = currentApp && currentApp.dueVerification && JSON.stringify(currentApp.dueVerification) !== JSON.stringify(params.dueVerification);
|
|
37980
|
-
|
|
37981
|
-
|
|
37982
|
-
|
|
37983
|
-
|
|
37984
|
-
|
|
37985
|
-
|
|
37986
|
-
|
|
37987
|
-
|
|
37988
|
-
|
|
37989
|
-
|
|
37990
|
-
|
|
37991
|
-
|
|
37992
|
-
|
|
37993
|
-
|
|
37994
|
-
|
|
37995
|
-
|
|
37996
|
-
|
|
37997
|
-
|
|
37998
|
-
|
|
37999
|
-
|
|
38000
|
-
|
|
38001
|
-
|
|
38002
|
-
|
|
38003
|
-
|
|
38004
|
-
|
|
38005
|
-
|
|
38006
|
-
|
|
38007
|
-
|
|
38008
|
-
|
|
38009
|
-
|
|
38010
|
-
|
|
38011
|
-
|
|
38195
|
+
const backendSatisfied = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona5 = currentApp.additionalDetails) === null || _currentApp$additiona5 === void 0 ? void 0 : _currentApp$additiona5.CompletelySatisfied;
|
|
38196
|
+
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;
|
|
38197
|
+
if (needsAddressSync || needsDueSync || needsSatisfiedSync) {
|
|
38198
|
+
setParams(prevParams => {
|
|
38199
|
+
let updatedParams = {
|
|
38200
|
+
...prevParams
|
|
38201
|
+
};
|
|
38202
|
+
if (needsAddressSync) {
|
|
38203
|
+
var _prevParams$Connectio, _prevParams$Connectio2;
|
|
38204
|
+
const addrTypeObj = typeof addrType === "object" && addrType !== null && addrType !== void 0 && addrType.code ? addrType : String(addrType).toUpperCase() === "PERMANENT" ? {
|
|
38205
|
+
i18nKey: "Permanent",
|
|
38206
|
+
code: "PERMANENT"
|
|
38207
|
+
} : String(addrType).toUpperCase() === "CORRESPONDENCE" ? {
|
|
38208
|
+
i18nKey: "Correspondence",
|
|
38209
|
+
code: "CORRESPONDENCE"
|
|
38210
|
+
} : addrType ? {
|
|
38211
|
+
i18nKey: addrType,
|
|
38212
|
+
code: addrType
|
|
38213
|
+
} : null;
|
|
38214
|
+
const updatedConnDetails = prevParams !== null && prevParams !== void 0 && prevParams.ConnectionDetails ? [{
|
|
38215
|
+
...prevParams.ConnectionDetails[0],
|
|
38216
|
+
addressType: ((_prevParams$Connectio = prevParams.ConnectionDetails[0]) === null || _prevParams$Connectio === void 0 ? void 0 : _prevParams$Connectio.addressType) || addrTypeObj,
|
|
38217
|
+
completeAddress: ((_prevParams$Connectio2 = prevParams.ConnectionDetails[0]) === null || _prevParams$Connectio2 === void 0 ? void 0 : _prevParams$Connectio2.completeAddress) || compAddr || ""
|
|
38218
|
+
}] : [{
|
|
38219
|
+
addressType: addrTypeObj,
|
|
38220
|
+
completeAddress: compAddr || ""
|
|
38221
|
+
}];
|
|
38222
|
+
updatedParams.ConnectionDetails = updatedConnDetails;
|
|
38223
|
+
updatedParams.addressType = updatedParams.addressType || addrTypeObj;
|
|
38224
|
+
updatedParams.completeAddress = updatedParams.completeAddress || compAddr || "";
|
|
38225
|
+
}
|
|
38226
|
+
if (needsDueSync) {
|
|
38227
|
+
updatedParams.dueVerification = currentApp.dueVerification;
|
|
38228
|
+
}
|
|
38229
|
+
if (needsSatisfiedSync) {
|
|
38230
|
+
var _updatedParams$WaterC, _updatedParams$WaterC2, _updatedParams$Sewera, _updatedParams$Sewera2;
|
|
38231
|
+
updatedParams.additionalDetails = {
|
|
38232
|
+
...updatedParams.additionalDetails,
|
|
38233
|
+
CompletelySatisfied: backendSatisfied
|
|
38234
|
+
};
|
|
38235
|
+
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]) {
|
|
38236
|
+
var _updatedParams$WaterC3;
|
|
38237
|
+
updatedParams.WaterConnectionResult.WaterConnection[0].additionalDetails = {
|
|
38238
|
+
...((_updatedParams$WaterC3 = updatedParams.WaterConnectionResult.WaterConnection[0]) === null || _updatedParams$WaterC3 === void 0 ? void 0 : _updatedParams$WaterC3.additionalDetails),
|
|
38239
|
+
CompletelySatisfied: backendSatisfied
|
|
38240
|
+
};
|
|
38241
|
+
}
|
|
38242
|
+
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]) {
|
|
38243
|
+
var _updatedParams$Sewera3;
|
|
38244
|
+
updatedParams.SewerageConnectionResult.SewerageConnections[0].additionalDetails = {
|
|
38245
|
+
...((_updatedParams$Sewera3 = updatedParams.SewerageConnectionResult.SewerageConnections[0]) === null || _updatedParams$Sewera3 === void 0 ? void 0 : _updatedParams$Sewera3.additionalDetails),
|
|
38246
|
+
CompletelySatisfied: backendSatisfied
|
|
38247
|
+
};
|
|
38248
|
+
}
|
|
38249
|
+
}
|
|
38250
|
+
return updatedParams;
|
|
38251
|
+
});
|
|
38012
38252
|
}
|
|
38013
38253
|
}
|
|
38014
38254
|
}, [Waterresult, Sewarageresult]);
|
|
38015
38255
|
const onSuccess = () => {
|
|
38016
38256
|
queryClient.invalidateQueries("WS_CREATE");
|
|
38257
|
+
sessionStorage.removeItem("WS_EDIT_APPLICATION_V5");
|
|
38258
|
+
sessionStorage.removeItem("WaterInitialObject");
|
|
38259
|
+
sessionStorage.removeItem("SewerageInitialObject");
|
|
38017
38260
|
};
|
|
38018
38261
|
const createApplication = function () {
|
|
38019
38262
|
try {
|
|
38020
|
-
var _params$DocumentsRequ;
|
|
38263
|
+
var _params$DocumentsRequ, _currentApp$additiona6;
|
|
38021
38264
|
if (params !== null && params !== void 0 && (_params$DocumentsRequ = params.DocumentsRequired) !== null && _params$DocumentsRequ !== void 0 && _params$DocumentsRequ.documents) {
|
|
38022
38265
|
params.documents = {
|
|
38023
38266
|
documents: params.DocumentsRequired.documents
|
|
38024
38267
|
};
|
|
38025
38268
|
}
|
|
38269
|
+
const currentApp = Waterresult || Sewarageresult;
|
|
38270
|
+
const backendSatisfied = currentApp === null || currentApp === void 0 ? void 0 : (_currentApp$additiona6 = currentApp.additionalDetails) === null || _currentApp$additiona6 === void 0 ? void 0 : _currentApp$additiona6.CompletelySatisfied;
|
|
38271
|
+
if (backendSatisfied !== undefined) {
|
|
38272
|
+
var _params$WaterConnecti, _params$WaterConnecti2, _params$SewerageConne, _params$SewerageConne2;
|
|
38273
|
+
params.additionalDetails = {
|
|
38274
|
+
...params.additionalDetails,
|
|
38275
|
+
CompletelySatisfied: backendSatisfied
|
|
38276
|
+
};
|
|
38277
|
+
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]) {
|
|
38278
|
+
var _params$WaterConnecti3;
|
|
38279
|
+
params.WaterConnectionResult.WaterConnection[0].additionalDetails = {
|
|
38280
|
+
...((_params$WaterConnecti3 = params.WaterConnectionResult.WaterConnection[0]) === null || _params$WaterConnecti3 === void 0 ? void 0 : _params$WaterConnecti3.additionalDetails),
|
|
38281
|
+
CompletelySatisfied: backendSatisfied
|
|
38282
|
+
};
|
|
38283
|
+
}
|
|
38284
|
+
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]) {
|
|
38285
|
+
var _params$SewerageConne3;
|
|
38286
|
+
params.SewerageConnectionResult.SewerageConnections[0].additionalDetails = {
|
|
38287
|
+
...((_params$SewerageConne3 = params.SewerageConnectionResult.SewerageConnections[0]) === null || _params$SewerageConne3 === void 0 ? void 0 : _params$SewerageConne3.additionalDetails),
|
|
38288
|
+
CompletelySatisfied: backendSatisfied
|
|
38289
|
+
};
|
|
38290
|
+
}
|
|
38291
|
+
}
|
|
38026
38292
|
history.push(`${getPath$3(match.path, match.params)}/acknowledgement`);
|
|
38027
38293
|
return Promise.resolve();
|
|
38028
38294
|
} catch (e) {
|
|
@@ -38030,20 +38296,47 @@ const EditApplication = _ref => {
|
|
|
38030
38296
|
}
|
|
38031
38297
|
};
|
|
38032
38298
|
const handleSelect = (key, data, skipStep, isFromCreateApi) => {
|
|
38033
|
-
if (isFromCreateApi) setParams(data);else if (key === "") setParams({
|
|
38299
|
+
if (isFromCreateApi) setParams(data);else if (key === "") setParams(prev => ({
|
|
38300
|
+
...prev,
|
|
38034
38301
|
...data
|
|
38035
|
-
});else if (Array.isArray(data)) setParams({
|
|
38036
|
-
...
|
|
38302
|
+
}));else if (Array.isArray(data)) setParams(prev => ({
|
|
38303
|
+
...prev,
|
|
38037
38304
|
[key]: data
|
|
38038
|
-
});else
|
|
38039
|
-
|
|
38040
|
-
|
|
38305
|
+
}));else if (key === "djbEmployee") {
|
|
38306
|
+
setParams(prev => {
|
|
38307
|
+
var _data$document, _data$document2;
|
|
38308
|
+
const isEmp = String(data === null || data === void 0 ? void 0 : data.isDjbEmployee) === "true" || (data === null || data === void 0 ? void 0 : data.isDjbEmployee) === true;
|
|
38309
|
+
return {
|
|
38310
|
+
...prev,
|
|
38311
|
+
djbEmployee: {
|
|
38312
|
+
...(prev === null || prev === void 0 ? void 0 : prev.djbEmployee),
|
|
38313
|
+
...data,
|
|
38314
|
+
isDjbEmployee: isEmp,
|
|
38315
|
+
employeeId: isEmp ? (data === null || data === void 0 ? void 0 : data.employeeId) ?? "" : "",
|
|
38316
|
+
designation: isEmp ? (data === null || data === void 0 ? void 0 : data.designation) ?? "" : "",
|
|
38317
|
+
dor: isEmp ? (data === null || data === void 0 ? void 0 : data.dor) ?? "" : "",
|
|
38318
|
+
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) || "" : ""
|
|
38319
|
+
},
|
|
38320
|
+
additionalDetails: {
|
|
38321
|
+
...(prev === null || prev === void 0 ? void 0 : prev.additionalDetails),
|
|
38322
|
+
...data,
|
|
38323
|
+
isDjbEmployee: isEmp,
|
|
38324
|
+
employeeId: isEmp ? (data === null || data === void 0 ? void 0 : data.employeeId) ?? "" : "",
|
|
38325
|
+
designation: isEmp ? (data === null || data === void 0 ? void 0 : data.designation) ?? "" : "",
|
|
38326
|
+
dor: isEmp ? (data === null || data === void 0 ? void 0 : data.dor) ?? "" : "",
|
|
38327
|
+
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) || "" : ""
|
|
38328
|
+
}
|
|
38329
|
+
};
|
|
38330
|
+
});
|
|
38331
|
+
} else {
|
|
38332
|
+
setParams(prev => ({
|
|
38333
|
+
...prev,
|
|
38041
38334
|
[key]: {
|
|
38042
|
-
...
|
|
38335
|
+
...(prev === null || prev === void 0 ? void 0 : prev[key]),
|
|
38043
38336
|
...data
|
|
38044
38337
|
}
|
|
38045
|
-
}
|
|
38046
|
-
}
|
|
38338
|
+
}));
|
|
38339
|
+
}
|
|
38047
38340
|
};
|
|
38048
38341
|
const handleSkip = () => {};
|
|
38049
38342
|
newConfig$1 = newConfig;
|
|
@@ -38128,8 +38421,9 @@ const EditApplication = _ref => {
|
|
|
38128
38421
|
const Component = typeof component === "string" ? Digit.ComponentRegistryService.getComponent(component) : component;
|
|
38129
38422
|
return /*#__PURE__*/React.createElement("div", {
|
|
38130
38423
|
id: `step-${index}`,
|
|
38131
|
-
key: index
|
|
38424
|
+
key: routeObj.route || index
|
|
38132
38425
|
}, /*#__PURE__*/React.createElement(Component, {
|
|
38426
|
+
key: routeObj.route || index,
|
|
38133
38427
|
config: {
|
|
38134
38428
|
texts,
|
|
38135
38429
|
inputs,
|
|
@@ -38254,7 +38548,7 @@ const ReSubmitDisconnectionApplication = () => {
|
|
|
38254
38548
|
};
|
|
38255
38549
|
|
|
38256
38550
|
const CheckPage = _ref => {
|
|
38257
|
-
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,
|
|
38551
|
+
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;
|
|
38258
38552
|
let {
|
|
38259
38553
|
onSubmit,
|
|
38260
38554
|
value
|
|
@@ -38399,10 +38693,17 @@ const CheckPage = _ref => {
|
|
|
38399
38693
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
38400
38694
|
label: t("WS_Billing_Address_Type"),
|
|
38401
38695
|
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)))}`
|
|
38402
|
-
}),
|
|
38403
|
-
|
|
38404
|
-
|
|
38405
|
-
|
|
38696
|
+
}), ((_connectionDetails$ad4, _connectionDetails$ad5, _data2, _data2$additionalDeta, _data3, _data3$additionalDeta) => {
|
|
38697
|
+
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) || "";
|
|
38698
|
+
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) || "";
|
|
38699
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
38700
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
38701
|
+
label: t("Complete Address"),
|
|
38702
|
+
text: `${checkForNA(compAddrStr)}`
|
|
38703
|
+
});
|
|
38704
|
+
}
|
|
38705
|
+
return null;
|
|
38706
|
+
})(), /*#__PURE__*/React.createElement(Row, {
|
|
38406
38707
|
label: t("WS_SERVICE_TYPE"),
|
|
38407
38708
|
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)))}`
|
|
38408
38709
|
}), (connectionDetails === null || connectionDetails === void 0 ? void 0 : (_connectionDetails$do3 = connectionDetails.domesticType) === null || _connectionDetails$do3 === void 0 ? void 0 : _connectionDetails$do3.code) === "ORGANIZATION" && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Row, {
|
|
@@ -39134,12 +39435,22 @@ const WSAcknowledgement = _ref => {
|
|
|
39134
39435
|
useEffect(() => {
|
|
39135
39436
|
if (sessionStorage.getItem("isCreateEnabled") !== "true") window.history.forward();else sessionStorage.removeItem("isCreateEnabled");
|
|
39136
39437
|
});
|
|
39438
|
+
const mutationTriggeredRef = React.useRef(false);
|
|
39439
|
+
const swMutationTriggeredRef = React.useRef(false);
|
|
39440
|
+
const handleSuccess = res => {
|
|
39441
|
+
sessionStorage.removeItem("WS_EDIT_APPLICATION_V5");
|
|
39442
|
+
sessionStorage.removeItem("WaterInitialObject");
|
|
39443
|
+
sessionStorage.removeItem("SewerageInitialObject");
|
|
39444
|
+
if (onSuccess) onSuccess(res);
|
|
39445
|
+
};
|
|
39137
39446
|
useEffect(() => {
|
|
39447
|
+
if (mutationTriggeredRef.current) return;
|
|
39138
39448
|
try {
|
|
39139
39449
|
var _data$serviceName, _data$serviceName2;
|
|
39140
39450
|
let tenantId;
|
|
39141
39451
|
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") {
|
|
39142
39452
|
var _data$cpt, _data$cpt$details;
|
|
39453
|
+
mutationTriggeredRef.current = true;
|
|
39143
39454
|
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;
|
|
39144
39455
|
let formdata = isEdit ? convertToEditWSUpdate(data) : convertToWSUpdate(data);
|
|
39145
39456
|
const formdataNew = {
|
|
@@ -39148,14 +39459,18 @@ const WSAcknowledgement = _ref => {
|
|
|
39148
39459
|
reconnectRequest: false
|
|
39149
39460
|
};
|
|
39150
39461
|
WSmutation.mutate(formdataNew, {
|
|
39151
|
-
onSuccess
|
|
39462
|
+
onSuccess: handleSuccess
|
|
39152
39463
|
});
|
|
39153
39464
|
}
|
|
39154
|
-
} catch (err) {
|
|
39465
|
+
} catch (err) {
|
|
39466
|
+
console.error("Error executing WS mutation", err);
|
|
39467
|
+
}
|
|
39155
39468
|
}, [data]);
|
|
39156
39469
|
useEffect(() => {
|
|
39157
39470
|
var _data$serviceName3, _data$serviceName4;
|
|
39471
|
+
if (swMutationTriggeredRef.current) return;
|
|
39158
39472
|
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) {
|
|
39473
|
+
swMutationTriggeredRef.current = true;
|
|
39159
39474
|
let formdata = isEdit ? convertToEditSWUpdate(data) : convertToSWUpdate(data);
|
|
39160
39475
|
const formdataNew = {
|
|
39161
39476
|
...formdata,
|
|
@@ -39163,7 +39478,7 @@ const WSAcknowledgement = _ref => {
|
|
|
39163
39478
|
reconnectRequest: false
|
|
39164
39479
|
};
|
|
39165
39480
|
SWmutation.mutate(formdataNew, {
|
|
39166
|
-
onSuccess
|
|
39481
|
+
onSuccess: handleSuccess
|
|
39167
39482
|
});
|
|
39168
39483
|
}
|
|
39169
39484
|
}, [data, WSmutation.isSuccess]);
|
|
@@ -41566,7 +41881,7 @@ const WSInfoPage = () => {
|
|
|
41566
41881
|
type: "button",
|
|
41567
41882
|
className: "ws-btn ws-btn-digilocker",
|
|
41568
41883
|
onClick: handleDigiLockerLogin
|
|
41569
|
-
}, /*#__PURE__*/React.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React.createElement("span", null, t("
|
|
41884
|
+
}, /*#__PURE__*/React.createElement("span", null, "\uD83D\uDD10"), /*#__PURE__*/React.createElement("span", null, t("DigiLocker Consent"))))))), /*#__PURE__*/React.createElement("div", {
|
|
41570
41885
|
className: "ws-action-card"
|
|
41571
41886
|
}, /*#__PURE__*/React.createElement("div", {
|
|
41572
41887
|
className: "ws-action-content"
|
|
@@ -47778,7 +48093,7 @@ const ActionModal$5 = _ref => {
|
|
|
47778
48093
|
})();
|
|
47779
48094
|
}, [file]);
|
|
47780
48095
|
function submit(data) {
|
|
47781
|
-
var _applicationData4, _applicationData0,
|
|
48096
|
+
var _applicationData4, _applicationData0, _applicationData11, _applicationData11$ap, _applicationData12, _applicationData12$pr, _applicationData13, _applicationData13$pr, _applicationData16, _applicationData17;
|
|
47782
48097
|
let commentValue = (data === null || data === void 0 ? void 0 : data.comments) || "";
|
|
47783
48098
|
if (isReasonRequiredAction) {
|
|
47784
48099
|
var _commentValue;
|
|
@@ -47869,47 +48184,63 @@ const ActionModal$5 = _ref => {
|
|
|
47869
48184
|
}] : []
|
|
47870
48185
|
}
|
|
47871
48186
|
};
|
|
47872
|
-
if (showApprovalChecklist) {
|
|
47873
|
-
var _applicationData1;
|
|
48187
|
+
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") {
|
|
48188
|
+
var _applicationData1, _applicationData1$add, _applicationData10;
|
|
48189
|
+
const isDirect = (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN_DIRECT";
|
|
48190
|
+
const isSendBack = (action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN";
|
|
48191
|
+
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;
|
|
48192
|
+
const remarksPayload = {};
|
|
48193
|
+
Object.keys(approvalChecklist || {}).forEach(key => {
|
|
48194
|
+
if (key.endsWith("Remarks")) {
|
|
48195
|
+
remarksPayload[key] = approvalChecklist[key];
|
|
48196
|
+
}
|
|
48197
|
+
});
|
|
47874
48198
|
applicationData.additionalDetails = {
|
|
47875
|
-
...((
|
|
47876
|
-
|
|
47877
|
-
|
|
47878
|
-
|
|
47879
|
-
|
|
47880
|
-
|
|
48199
|
+
...((_applicationData10 = applicationData) === null || _applicationData10 === void 0 ? void 0 : _applicationData10.additionalDetails),
|
|
48200
|
+
...(showApprovalChecklist ? {
|
|
48201
|
+
waterPipelineFacility: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.waterPipelineFacility) === true,
|
|
48202
|
+
waterPipelineFacilityRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.waterPipelineFacilityRemarks) || "",
|
|
48203
|
+
infrastructureChargesApplicable: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.infrastructureChargesApplicable) === true,
|
|
48204
|
+
infrastructureChargesApplicableRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.infrastructureChargesApplicableRemarks) || "",
|
|
48205
|
+
rainWaterHarvesting: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.rainWaterHarvesting) === true,
|
|
48206
|
+
rainWaterHarvestingRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.rainWaterHarvestingRemarks) || "",
|
|
48207
|
+
bulkConnectionVerification: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.bulkConnectionVerification) === true
|
|
48208
|
+
} : {}),
|
|
48209
|
+
bulkConnectionVerificationRemarks: (approvalChecklist === null || approvalChecklist === void 0 ? void 0 : approvalChecklist.bulkConnectionVerificationRemarks) || "",
|
|
48210
|
+
CompletelySatisfied: resolvedCompletelySatisfied,
|
|
48211
|
+
...remarksPayload
|
|
47881
48212
|
};
|
|
47882
48213
|
}
|
|
47883
|
-
if (data !== null && data !== void 0 && data.date && (
|
|
48214
|
+
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")) {
|
|
47884
48215
|
const disconnectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
47885
48216
|
applicationData.disconnectionExecutionDate = convertDateToEpochNew$1(disconnectionExecutionDate);
|
|
47886
48217
|
} else if (data !== null && data !== void 0 && data.date) {
|
|
47887
48218
|
const connectionExecutionDate = cloneDeep_1(data === null || data === void 0 ? void 0 : data.date);
|
|
47888
48219
|
applicationData.connectionExecutionDate = convertDateToEpochNew$1(connectionExecutionDate);
|
|
47889
48220
|
}
|
|
47890
|
-
if (((
|
|
47891
|
-
var
|
|
47892
|
-
((
|
|
48221
|
+
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")) {
|
|
48222
|
+
var _applicationData14, _applicationData14$se, _applicationData15, _applicationData15$ap;
|
|
48223
|
+
((_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({
|
|
47893
48224
|
WaterConnection: applicationData,
|
|
47894
48225
|
disconnectRequest: true
|
|
47895
48226
|
}) : submitAction({
|
|
47896
48227
|
SewerageConnection: applicationData,
|
|
47897
48228
|
disconnectRequest: true
|
|
47898
48229
|
});
|
|
47899
|
-
} else if (((
|
|
48230
|
+
} else if (((_applicationData16 = applicationData) === null || _applicationData16 === void 0 ? void 0 : _applicationData16.applicationType) == "SEWERAGE_RECONNECTION") {
|
|
47900
48231
|
submitAction({
|
|
47901
48232
|
SewerageConnection: applicationData,
|
|
47902
48233
|
disconnectRequest: false,
|
|
47903
48234
|
reconnectRequest: true
|
|
47904
48235
|
});
|
|
47905
|
-
} else if (((
|
|
48236
|
+
} else if (((_applicationData17 = applicationData) === null || _applicationData17 === void 0 ? void 0 : _applicationData17.applicationType) == "WATER_RECONNECTION") {
|
|
47906
48237
|
submitAction({
|
|
47907
48238
|
WaterConnection: applicationData,
|
|
47908
48239
|
disconnectRequest: false,
|
|
47909
48240
|
reconnectRequest: true
|
|
47910
48241
|
});
|
|
47911
48242
|
} else {
|
|
47912
|
-
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9, _parsedAdhocRebateDat0, _parsedAdhocRebateDat1, _parsedAdhocRebateDat10,
|
|
48243
|
+
var _parsedAdhocRebateDat, _parsedAdhocRebateDat2, _parsedAdhocRebateDat3, _parsedAdhocRebateDat4, _parsedAdhocRebateDat5, _parsedAdhocRebateDat6, _parsedAdhocRebateDat7, _parsedAdhocRebateDat8, _parsedAdhocRebateDat9, _parsedAdhocRebateDat0, _parsedAdhocRebateDat1, _parsedAdhocRebateDat10, _applicationData18, _applicationData18$se, _applicationData19, _applicationData19$ap;
|
|
47913
48244
|
const adhocRebateData = sessionStorage.getItem("Digit.ADHOC_ADD_REBATE_DATA");
|
|
47914
48245
|
const parsedAdhocRebateData = adhocRebateData ? JSON.parse(adhocRebateData) : "";
|
|
47915
48246
|
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) || "";
|
|
@@ -47918,7 +48249,7 @@ const ActionModal$5 = _ref => {
|
|
|
47918
48249
|
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) || "";
|
|
47919
48250
|
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) || "";
|
|
47920
48251
|
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) || "";
|
|
47921
|
-
((
|
|
48252
|
+
((_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({
|
|
47922
48253
|
WaterConnection: applicationData,
|
|
47923
48254
|
disconnectRequest: false,
|
|
47924
48255
|
reconnectRequest: false
|
|
@@ -47930,8 +48261,8 @@ const ActionModal$5 = _ref => {
|
|
|
47930
48261
|
}
|
|
47931
48262
|
}
|
|
47932
48263
|
useEffect(() => {
|
|
47933
|
-
var
|
|
47934
|
-
if (((
|
|
48264
|
+
var _applicationData20, _applicationData20$pr, _applicationData21, _applicationData21$pr;
|
|
48265
|
+
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") {
|
|
47935
48266
|
if (action) {
|
|
47936
48267
|
setConfig(configWSDisConnectApplication({
|
|
47937
48268
|
t,
|
|
@@ -52021,14 +52352,27 @@ const getWSApprovalChecklistFields = applicationData => {
|
|
|
52021
52352
|
}];
|
|
52022
52353
|
};
|
|
52023
52354
|
const isWSApprovalChecklistComplete = function (applicationData, values) {
|
|
52024
|
-
var
|
|
52355
|
+
var _values5;
|
|
52025
52356
|
if (values === void 0) {
|
|
52026
52357
|
values = {};
|
|
52027
52358
|
}
|
|
52028
|
-
|
|
52029
|
-
|
|
52030
|
-
|
|
52031
|
-
|
|
52359
|
+
const fields = getWSApprovalChecklistFields(applicationData);
|
|
52360
|
+
const mandatoryFieldsAnswered = fields.filter(field => field.isMandatory).every(field => {
|
|
52361
|
+
var _values, _values2;
|
|
52362
|
+
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;
|
|
52363
|
+
});
|
|
52364
|
+
if (!mandatoryFieldsAnswered) return false;
|
|
52365
|
+
const remarksValid = fields.every(field => {
|
|
52366
|
+
var _values3;
|
|
52367
|
+
if (((_values3 = values) === null || _values3 === void 0 ? void 0 : _values3[field.name]) === false) {
|
|
52368
|
+
var _values4;
|
|
52369
|
+
const remark = (_values4 = values) === null || _values4 === void 0 ? void 0 : _values4[`${field.name}Remarks`];
|
|
52370
|
+
return typeof remark === "string" && remark.trim().length > 0;
|
|
52371
|
+
}
|
|
52372
|
+
return true;
|
|
52373
|
+
});
|
|
52374
|
+
if (!remarksValid) return false;
|
|
52375
|
+
return ((_values5 = values) === null || _values5 === void 0 ? void 0 : _values5.isFullySatisfied) !== undefined;
|
|
52032
52376
|
};
|
|
52033
52377
|
const WSApprovalChecklist = _ref => {
|
|
52034
52378
|
let {
|
|
@@ -52041,6 +52385,13 @@ const WSApprovalChecklist = _ref => {
|
|
|
52041
52385
|
t
|
|
52042
52386
|
} = useTranslation();
|
|
52043
52387
|
if (!showApprovalChecklist) return null;
|
|
52388
|
+
const yesNoOptions = [{
|
|
52389
|
+
label: t("CORE_COMMON_YES", "Yes"),
|
|
52390
|
+
code: true
|
|
52391
|
+
}, {
|
|
52392
|
+
label: t("CORE_COMMON_NO", "No"),
|
|
52393
|
+
code: false
|
|
52394
|
+
}];
|
|
52044
52395
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
52045
52396
|
style: {
|
|
52046
52397
|
marginTop: "24px",
|
|
@@ -52057,20 +52408,89 @@ const WSApprovalChecklist = _ref => {
|
|
|
52057
52408
|
}
|
|
52058
52409
|
}, t("Approval Checklist")), /*#__PURE__*/React.createElement("div", {
|
|
52059
52410
|
style: {
|
|
52060
|
-
display: "
|
|
52411
|
+
display: "fl ex",
|
|
52061
52412
|
flexDirection: "column",
|
|
52062
|
-
gap: "
|
|
52063
|
-
}
|
|
52064
|
-
}, getWSApprovalChecklistFields(applicationData).map(field =>
|
|
52065
|
-
|
|
52066
|
-
|
|
52067
|
-
|
|
52068
|
-
|
|
52069
|
-
|
|
52070
|
-
|
|
52071
|
-
|
|
52072
|
-
|
|
52073
|
-
|
|
52413
|
+
gap: "16px"
|
|
52414
|
+
}
|
|
52415
|
+
}, getWSApprovalChecklistFields(applicationData).map(field => {
|
|
52416
|
+
const isNoSelected = (values === null || values === void 0 ? void 0 : values[field.name]) === false;
|
|
52417
|
+
const remarkValue = (values === null || values === void 0 ? void 0 : values[`${field.name}Remarks`]) || "";
|
|
52418
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52419
|
+
key: field.name,
|
|
52420
|
+
style: {
|
|
52421
|
+
display: "flex",
|
|
52422
|
+
flexDirection: "column",
|
|
52423
|
+
gap: "8px",
|
|
52424
|
+
paddingBottom: "14px",
|
|
52425
|
+
borderBottom: "1px solid #EAEAEA"
|
|
52426
|
+
}
|
|
52427
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52428
|
+
style: {
|
|
52429
|
+
fontSize: "16px",
|
|
52430
|
+
color: "#0B0C0C",
|
|
52431
|
+
fontWeight: "500",
|
|
52432
|
+
lineHeight: "1.4"
|
|
52433
|
+
}
|
|
52434
|
+
}, t(field.label), field.isMandatory && /*#__PURE__*/React.createElement("span", {
|
|
52435
|
+
style: {
|
|
52436
|
+
color: "#D4351C",
|
|
52437
|
+
marginLeft: "4px"
|
|
52438
|
+
}
|
|
52439
|
+
}, "*")), /*#__PURE__*/React.createElement(RadioButtons, {
|
|
52440
|
+
name: `ws_checklist_${field.name}`,
|
|
52441
|
+
style: {
|
|
52442
|
+
display: "flex",
|
|
52443
|
+
gap: "2rem"
|
|
52444
|
+
},
|
|
52445
|
+
options: yesNoOptions,
|
|
52446
|
+
optionsKey: "label",
|
|
52447
|
+
selectedOption: (values === null || values === void 0 ? void 0 : values[field.name]) !== undefined ? yesNoOptions.find(opt => opt.code === values[field.name]) || null : null,
|
|
52448
|
+
onSelect: option => {
|
|
52449
|
+
const updated = {
|
|
52450
|
+
...values,
|
|
52451
|
+
[field.name]: option.code
|
|
52452
|
+
};
|
|
52453
|
+
if (option.code === true) {
|
|
52454
|
+
delete updated[`${field.name}Remarks`];
|
|
52455
|
+
}
|
|
52456
|
+
onChange(updated);
|
|
52457
|
+
}
|
|
52458
|
+
}), isNoSelected && /*#__PURE__*/React.createElement("div", {
|
|
52459
|
+
style: {
|
|
52460
|
+
marginTop: "6px"
|
|
52461
|
+
}
|
|
52462
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
52463
|
+
style: {
|
|
52464
|
+
marginBottom: "6px",
|
|
52465
|
+
fontSize: "14px",
|
|
52466
|
+
fontWeight: "500",
|
|
52467
|
+
color: "#0B0C0C"
|
|
52468
|
+
}
|
|
52469
|
+
}, t("Remarks"), " ", /*#__PURE__*/React.createElement("span", {
|
|
52470
|
+
style: {
|
|
52471
|
+
color: "#D4351C"
|
|
52472
|
+
}
|
|
52473
|
+
}, "*")), /*#__PURE__*/React.createElement(TextArea, {
|
|
52474
|
+
name: `${field.name}Remarks`,
|
|
52475
|
+
value: remarkValue,
|
|
52476
|
+
onChange: event => onChange({
|
|
52477
|
+
...values,
|
|
52478
|
+
[`${field.name}Remarks`]: event.target.value
|
|
52479
|
+
}),
|
|
52480
|
+
placeholder: t("Enter mandatory remarks for selecting No"),
|
|
52481
|
+
style: {
|
|
52482
|
+
width: "100%",
|
|
52483
|
+
minHeight: "60px"
|
|
52484
|
+
}
|
|
52485
|
+
}), !(remarkValue !== null && remarkValue !== void 0 && remarkValue.trim()) && /*#__PURE__*/React.createElement("span", {
|
|
52486
|
+
className: "card-label-error",
|
|
52487
|
+
style: {
|
|
52488
|
+
fontSize: "12px",
|
|
52489
|
+
marginTop: "4px",
|
|
52490
|
+
display: "block"
|
|
52491
|
+
}
|
|
52492
|
+
}, t("CS_REMARK_IS_MANDATORY", "Remarks are mandatory when selecting No"))));
|
|
52493
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
52074
52494
|
style: {
|
|
52075
52495
|
marginTop: "24px",
|
|
52076
52496
|
padding: "16px",
|
|
@@ -52083,6 +52503,7 @@ const WSApprovalChecklist = _ref => {
|
|
|
52083
52503
|
marginBottom: "16px"
|
|
52084
52504
|
}
|
|
52085
52505
|
}, 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.createElement(RadioButtons, {
|
|
52506
|
+
name: "ws_checklist_isFullySatisfied",
|
|
52086
52507
|
style: {
|
|
52087
52508
|
display: "flex",
|
|
52088
52509
|
gap: "2rem"
|
|
@@ -52787,7 +53208,7 @@ function ApplicationDetailsToast(_ref) {
|
|
|
52787
53208
|
}
|
|
52788
53209
|
|
|
52789
53210
|
function ApplicationDetailsActionBar(_ref) {
|
|
52790
|
-
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$
|
|
53211
|
+
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$;
|
|
52791
53212
|
let {
|
|
52792
53213
|
workflowDetails,
|
|
52793
53214
|
displayMenu,
|
|
@@ -52799,7 +53220,10 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52799
53220
|
MenuStyle = {},
|
|
52800
53221
|
isAction,
|
|
52801
53222
|
applicationDetails,
|
|
52802
|
-
|
|
53223
|
+
applicationData,
|
|
53224
|
+
isApprovalChecklistValid = false,
|
|
53225
|
+
approvalChecklist = {},
|
|
53226
|
+
showApprovalChecklist
|
|
52803
53227
|
} = _ref;
|
|
52804
53228
|
const {
|
|
52805
53229
|
t
|
|
@@ -52846,7 +53270,7 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52846
53270
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
52847
53271
|
})) || !e.roles;
|
|
52848
53272
|
}));
|
|
52849
|
-
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;
|
|
53273
|
+
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;
|
|
52850
53274
|
if (completelySatisfied !== undefined) {
|
|
52851
53275
|
if (completelySatisfied === true) {
|
|
52852
53276
|
var _actions;
|
|
@@ -52869,7 +53293,7 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
52869
53293
|
}
|
|
52870
53294
|
const Session = Digit.SessionStorage.get("User");
|
|
52871
53295
|
const uuid = Session === null || Session === void 0 ? void 0 : (_Session$info = Session.info) === null || _Session$info === void 0 ? void 0 : _Session$info.uuid;
|
|
52872
|
-
const modified = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
53296
|
+
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;
|
|
52873
53297
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && isMenuBotton && !isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
|
|
52874
53298
|
style: {
|
|
52875
53299
|
...ActionBarStyle
|
|
@@ -53056,12 +53480,24 @@ const ApplicationDetails = props => {
|
|
|
53056
53480
|
const seedKey = `${applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationNo}__${currentWorkflowState}`;
|
|
53057
53481
|
if (showApprovalChecklist) {
|
|
53058
53482
|
if (seededKeyRef.current !== seedKey) {
|
|
53483
|
+
var _applicationData$addi5;
|
|
53059
53484
|
seededKeyRef.current = seedKey;
|
|
53060
53485
|
const initialChecklist = getWSApprovalChecklistFields(applicationData).reduce((values, field) => {
|
|
53061
|
-
var _applicationData$addi;
|
|
53062
|
-
|
|
53486
|
+
var _applicationData$addi, _applicationData$addi3;
|
|
53487
|
+
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") {
|
|
53488
|
+
var _applicationData$addi2;
|
|
53489
|
+
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];
|
|
53490
|
+
}
|
|
53491
|
+
if (applicationData !== null && applicationData !== void 0 && (_applicationData$addi3 = applicationData.additionalDetails) !== null && _applicationData$addi3 !== void 0 && _applicationData$addi3[`${field.name}Remarks`]) {
|
|
53492
|
+
var _applicationData$addi4;
|
|
53493
|
+
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`];
|
|
53494
|
+
}
|
|
53063
53495
|
return values;
|
|
53064
53496
|
}, {});
|
|
53497
|
+
if (typeof (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi5 = applicationData.additionalDetails) === null || _applicationData$addi5 === void 0 ? void 0 : _applicationData$addi5.CompletelySatisfied) === "boolean") {
|
|
53498
|
+
var _applicationData$addi6;
|
|
53499
|
+
initialChecklist.isFullySatisfied = applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi6 = applicationData.additionalDetails) === null || _applicationData$addi6 === void 0 ? void 0 : _applicationData$addi6.CompletelySatisfied;
|
|
53500
|
+
}
|
|
53065
53501
|
setApprovalChecklist(initialChecklist);
|
|
53066
53502
|
}
|
|
53067
53503
|
} else {
|
|
@@ -53323,7 +53759,7 @@ const ApplicationDetails = props => {
|
|
|
53323
53759
|
state: state,
|
|
53324
53760
|
id: applicationNumber,
|
|
53325
53761
|
applicationDetails: applicationDetails,
|
|
53326
|
-
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
|
|
53762
|
+
applicationData: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || applicationData,
|
|
53327
53763
|
closeModal: closeModal,
|
|
53328
53764
|
submitAction: submitAction,
|
|
53329
53765
|
actionData: workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data = workflowDetails.data) === null || _workflowDetails$data === void 0 ? void 0 : _workflowDetails$data.timeline,
|
|
@@ -53378,8 +53814,10 @@ const ApplicationDetails = props => {
|
|
|
53378
53814
|
ActionBarStyle: ActionBarStyle,
|
|
53379
53815
|
MenuStyle: MenuStyle,
|
|
53380
53816
|
applicationDetails: applicationDetails,
|
|
53817
|
+
applicationData: (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData) || applicationData,
|
|
53381
53818
|
isApprovalChecklistValid: approvalChecklistValid,
|
|
53382
|
-
approvalChecklist: approvalChecklist
|
|
53819
|
+
approvalChecklist: approvalChecklist,
|
|
53820
|
+
showApprovalChecklist: showApprovalChecklist
|
|
53383
53821
|
})) : /*#__PURE__*/React.createElement(Loader, null));
|
|
53384
53822
|
};
|
|
53385
53823
|
|
|
@@ -55181,7 +55619,7 @@ const EditApplication$1 = () => {
|
|
|
55181
55619
|
};
|
|
55182
55620
|
|
|
55183
55621
|
const ConsumptionDetails$1 = _ref => {
|
|
55184
|
-
var _user$info, _mdmsBillingPeriod$Md, _mdmsBillingPeriod$Md2, _mdmsBillingPeriod$Md3, _mdmsMeterStatus$Mdms, _mdmsMeterStatus$Mdms2, _mdmsMeterStatus$Mdms3, _DJBReadingQualityCod, _DJBReadingQualityCod2, _DJBReadingQualityCod3, _details$4, _details$5, _meterReadingDetailsD, _meterReadingDetailsD2, _meterReadingDetailsD3, _meterReadingDetailsD4, _meterReadingDetailsD5, _meterReadingDetailsD6, _meterReadingDetailsD7, _meterReadingDetailsD8, _meterReadingDetailsD9, _meterReadingDetailsD0, _meterReadingDetailsD1, _meterReadingDetailsD10, _meterReadingDetailsD11, _meterReadingDetailsD12, _meterReadingDetailsD13, _meterReadingDetailsD14, _meterReadingDetailsD15, _meterReadingDetailsD16, _meterReadingDetailsD17, _meterReadingDetailsD18, _meterReadingDetailsD19, _meterReadingDetailsD20, _meterReadingDetailsD21, _meterReadingDetailsD22, _meterReadingDetailsD23, _meterReadingDetailsD24, _meterReadingDetailsD25, _meterReadingDetailsD26, _meterReadingDetailsD27, _meterReadingDetailsD28, _meterReadingDetailsD29, _meterReadingDetailsD30, _meterReadingDetailsD31, _meterReadingDetailsD32, _meterReadingDetailsD33, _meterReadingDetailsD34, _meterReadingDetailsD35, _meterReadingDetailsD36, _meterReadingDetailsD37, _meterReadingDetailsD38, _meterReadingDetailsD39, _meterReadingDetailsD40, _meterReadingDetailsD41, _meterReadingDetailsD42, _meterReadingDetailsD43, _meterReadingDetailsD44, _meterReadingDetailsD45, _meterReadingDetailsD46, _meterReadingDetailsD47, _meterReadingDetailsD48, _meterReadingDetailsD49, _meterReadingDetailsD50, _meterReadingDetailsD51, _meterReadingDetailsD52, _meterReadingDetailsD53, _meterReadingDetailsD54, _meterReadingDetailsD55, _meterReadingDetailsD56, _meterReadingDetailsD57, _meterReadingDetailsD58, _meterReadingDetailsD59, _meterReadingDetailsD60, _meterReadingDetailsD61, _meterReadingDetailsD62, _meterReadingDetailsD63, _meterReadingDetailsD64, _meterReadingDetailsD65, _meterReadingDetailsD66, _meterReadingDetailsD67, _meterReadingDetailsD68, _meterReadingDetailsD69, _meterReadingDetailsD70, _meterReadingDetailsD71, _meterReadingDetailsD72, _meterReadingDetailsD73, _meterReadingDetailsD74, _meterReadingDetailsD75, _meterReadingDetailsD76, _meterReadingDetailsD77, _meterReadingDetailsD78, _meterReadingDetailsD79, _meterReadingDetailsD80, _meterReadingDetailsD81, _meterReadingDetailsD82;
|
|
55622
|
+
var _user$info, _mdmsBillingPeriod$Md, _mdmsBillingPeriod$Md2, _mdmsBillingPeriod$Md3, _mdmsMeterStatus$Mdms, _mdmsMeterStatus$Mdms2, _mdmsMeterStatus$Mdms3, _mdmsMeterStatus$Mdms4, _DJBReadingQualityCod, _DJBReadingQualityCod2, _DJBReadingQualityCod3, _DJBReadingQualityCod4, _details$4, _details$5, _meterReadingDetailsD, _meterReadingDetailsD2, _meterReadingDetailsD3, _meterReadingDetailsD4, _meterReadingDetailsD5, _meterReadingDetailsD6, _meterReadingDetailsD7, _meterReadingDetailsD8, _meterReadingDetailsD9, _meterReadingDetailsD0, _meterReadingDetailsD1, _meterReadingDetailsD10, _meterReadingDetailsD11, _meterReadingDetailsD12, _meterReadingDetailsD13, _meterReadingDetailsD14, _meterReadingDetailsD15, _meterReadingDetailsD16, _meterReadingDetailsD17, _meterReadingDetailsD18, _meterReadingDetailsD19, _meterReadingDetailsD20, _meterReadingDetailsD21, _meterReadingDetailsD22, _meterReadingDetailsD23, _meterReadingDetailsD24, _meterReadingDetailsD25, _meterReadingDetailsD26, _meterReadingDetailsD27, _meterReadingDetailsD28, _meterReadingDetailsD29, _meterReadingDetailsD30, _meterReadingDetailsD31, _meterReadingDetailsD32, _meterReadingDetailsD33, _meterReadingDetailsD34, _meterReadingDetailsD35, _meterReadingDetailsD36, _meterReadingDetailsD37, _meterReadingDetailsD38, _meterReadingDetailsD39, _meterReadingDetailsD40, _meterReadingDetailsD41, _meterReadingDetailsD42, _meterReadingDetailsD43, _meterReadingDetailsD44, _meterReadingDetailsD45, _meterReadingDetailsD46, _meterReadingDetailsD47, _meterReadingDetailsD48, _meterReadingDetailsD49, _meterReadingDetailsD50, _meterReadingDetailsD51, _meterReadingDetailsD52, _meterReadingDetailsD53, _meterReadingDetailsD54, _meterReadingDetailsD55, _meterReadingDetailsD56, _meterReadingDetailsD57, _meterReadingDetailsD58, _meterReadingDetailsD59, _meterReadingDetailsD60, _meterReadingDetailsD61, _meterReadingDetailsD62, _meterReadingDetailsD63, _meterReadingDetailsD64, _meterReadingDetailsD65, _meterReadingDetailsD66, _meterReadingDetailsD67, _meterReadingDetailsD68, _meterReadingDetailsD69, _meterReadingDetailsD70, _meterReadingDetailsD71, _meterReadingDetailsD72, _meterReadingDetailsD73, _meterReadingDetailsD74, _meterReadingDetailsD75, _meterReadingDetailsD76, _meterReadingDetailsD77, _meterReadingDetailsD78, _meterReadingDetailsD79, _meterReadingDetailsD80, _meterReadingDetailsD81, _meterReadingDetailsD82;
|
|
55185
55623
|
const {
|
|
55186
55624
|
t
|
|
55187
55625
|
} = useTranslation();
|
|
@@ -55423,11 +55861,14 @@ const ConsumptionDetails$1 = _ref => {
|
|
|
55423
55861
|
return Promise.reject(e);
|
|
55424
55862
|
}
|
|
55425
55863
|
};
|
|
55426
|
-
let optionsList = mdmsMeterStatus === null || mdmsMeterStatus === void 0 ? void 0 : (_mdmsMeterStatus$Mdms = mdmsMeterStatus.MdmsRes) === null || _mdmsMeterStatus$Mdms === void 0 ? void 0 : (_mdmsMeterStatus$Mdms2 = _mdmsMeterStatus$Mdms["ws-services-calculation"]) === null || _mdmsMeterStatus$Mdms2 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms3 = _mdmsMeterStatus$Mdms2.MeterStatus) === null || _mdmsMeterStatus$Mdms3 === void 0 ? void 0 : _mdmsMeterStatus$Mdms3.map(status =>
|
|
55427
|
-
code: status
|
|
55428
|
-
|
|
55429
|
-
|
|
55430
|
-
|
|
55864
|
+
let optionsList = mdmsMeterStatus === null || mdmsMeterStatus === void 0 ? void 0 : (_mdmsMeterStatus$Mdms = mdmsMeterStatus.MdmsRes) === null || _mdmsMeterStatus$Mdms === void 0 ? void 0 : (_mdmsMeterStatus$Mdms2 = _mdmsMeterStatus$Mdms["ws-services-calculation"]) === null || _mdmsMeterStatus$Mdms2 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms3 = _mdmsMeterStatus$Mdms2.MeterStatus) === null || _mdmsMeterStatus$Mdms3 === void 0 ? void 0 : (_mdmsMeterStatus$Mdms4 = _mdmsMeterStatus$Mdms3.filter(status => typeof status === "object" ? (status === null || status === void 0 ? void 0 : status.active) === true || (status === null || status === void 0 ? void 0 : status.active) === "true" : true)) === null || _mdmsMeterStatus$Mdms4 === void 0 ? void 0 : _mdmsMeterStatus$Mdms4.map(status => {
|
|
55865
|
+
const statusCode = typeof status === "object" ? status.name || status.code : status;
|
|
55866
|
+
return {
|
|
55867
|
+
code: statusCode,
|
|
55868
|
+
i18nKey: `WS_SERVICES_CALCULATION_METERSTATUS_${Digit.Utils.locale.getTransformedLocale(statusCode)}`
|
|
55869
|
+
};
|
|
55870
|
+
});
|
|
55871
|
+
const ReadingQualityCodeList = DJBReadingQualityCode === null || DJBReadingQualityCode === void 0 ? void 0 : (_DJBReadingQualityCod = DJBReadingQualityCode.MdmsRes) === null || _DJBReadingQualityCod === void 0 ? void 0 : (_DJBReadingQualityCod2 = _DJBReadingQualityCod["ws-services-calculation"]) === null || _DJBReadingQualityCod2 === void 0 ? void 0 : (_DJBReadingQualityCod3 = _DJBReadingQualityCod2.DJBReadingQualityCode) === null || _DJBReadingQualityCod3 === void 0 ? void 0 : (_DJBReadingQualityCod4 = _DJBReadingQualityCod3.filter(status => typeof status === "object" ? (status === null || status === void 0 ? void 0 : status.active) === true || (status === null || status === void 0 ? void 0 : status.active) === "true" : true)) === null || _DJBReadingQualityCod4 === void 0 ? void 0 : _DJBReadingQualityCod4.map(status => {
|
|
55431
55872
|
const statusCode = typeof status === "object" ? status.code : status;
|
|
55432
55873
|
return {
|
|
55433
55874
|
code: statusCode,
|
|
@@ -55584,10 +56025,122 @@ const ConsumptionDetails$1 = _ref => {
|
|
|
55584
56025
|
}, /*#__PURE__*/React.createElement(Close, null));
|
|
55585
56026
|
};
|
|
55586
56027
|
const consumption = (currentReading, lastReading) => {
|
|
55587
|
-
if (currentReading && lastReading) {
|
|
56028
|
+
if (currentReading !== null && currentReading !== undefined && lastReading !== null && lastReading !== undefined && currentReading !== "" && lastReading !== "") {
|
|
55588
56029
|
return Number(currentReading - lastReading);
|
|
55589
56030
|
} else return t("NA");
|
|
55590
56031
|
};
|
|
56032
|
+
const columns = useMemo(() => [{
|
|
56033
|
+
Header: t("WS_MYCONNECTIONS_CONSUMER_NO"),
|
|
56034
|
+
accessor: "connectionNo",
|
|
56035
|
+
disableSortBy: true,
|
|
56036
|
+
Cell: _ref2 => {
|
|
56037
|
+
var _row$original;
|
|
56038
|
+
let {
|
|
56039
|
+
row
|
|
56040
|
+
} = _ref2;
|
|
56041
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original = row.original) === null || _row$original === void 0 ? void 0 : _row$original.connectionNo) || t("NA"));
|
|
56042
|
+
}
|
|
56043
|
+
}, {
|
|
56044
|
+
Header: t("WS_VIEW_BILL_BILLING_PERIOD_LABEL"),
|
|
56045
|
+
accessor: "billingPeriod",
|
|
56046
|
+
disableSortBy: true,
|
|
56047
|
+
Cell: _ref3 => {
|
|
56048
|
+
var _row$original2;
|
|
56049
|
+
let {
|
|
56050
|
+
row
|
|
56051
|
+
} = _ref3;
|
|
56052
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original2 = row.original) === null || _row$original2 === void 0 ? void 0 : _row$original2.billingPeriod) || t("NA"));
|
|
56053
|
+
}
|
|
56054
|
+
}, {
|
|
56055
|
+
Header: t("WS_READING_QUALITY_CODE"),
|
|
56056
|
+
accessor: "readingQualityCode",
|
|
56057
|
+
disableSortBy: true,
|
|
56058
|
+
Cell: _ref4 => {
|
|
56059
|
+
var _row$original3;
|
|
56060
|
+
let {
|
|
56061
|
+
row
|
|
56062
|
+
} = _ref4;
|
|
56063
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original3 = row.original) === null || _row$original3 === void 0 ? void 0 : _row$original3.readingQualityCode) || t("NA"));
|
|
56064
|
+
}
|
|
56065
|
+
}, {
|
|
56066
|
+
Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
|
|
56067
|
+
accessor: "lastReading",
|
|
56068
|
+
disableSortBy: true,
|
|
56069
|
+
Cell: _ref5 => {
|
|
56070
|
+
var _row$original4, _row$original5, _row$original6;
|
|
56071
|
+
let {
|
|
56072
|
+
row
|
|
56073
|
+
} = _ref5;
|
|
56074
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : _row$original4.lastReading) !== undefined && ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5.lastReading) !== null ? (_row$original6 = row.original) === null || _row$original6 === void 0 ? void 0 : _row$original6.lastReading : t("NA"));
|
|
56075
|
+
}
|
|
56076
|
+
}, {
|
|
56077
|
+
Header: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
|
|
56078
|
+
accessor: "lastReadingDate",
|
|
56079
|
+
disableSortBy: true,
|
|
56080
|
+
Cell: _ref6 => {
|
|
56081
|
+
var _row$original7, _row$original8;
|
|
56082
|
+
let {
|
|
56083
|
+
row
|
|
56084
|
+
} = _ref6;
|
|
56085
|
+
return /*#__PURE__*/React.createElement("span", null, (_row$original7 = row.original) !== null && _row$original7 !== void 0 && _row$original7.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8.lastReadingDate) : t("NA"));
|
|
56086
|
+
}
|
|
56087
|
+
}, {
|
|
56088
|
+
Header: t("WS_SERV_DETAIL_CUR_METER_READ"),
|
|
56089
|
+
accessor: "currentReading",
|
|
56090
|
+
disableSortBy: true,
|
|
56091
|
+
Cell: _ref7 => {
|
|
56092
|
+
var _row$original9, _row$original0, _row$original1;
|
|
56093
|
+
let {
|
|
56094
|
+
row
|
|
56095
|
+
} = _ref7;
|
|
56096
|
+
return /*#__PURE__*/React.createElement("span", null, ((_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9.currentReading) !== undefined && ((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0.currentReading) !== null ? (_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1.currentReading : t("NA"));
|
|
56097
|
+
}
|
|
56098
|
+
}, {
|
|
56099
|
+
Header: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
|
|
56100
|
+
accessor: "currentReadingDate",
|
|
56101
|
+
disableSortBy: true,
|
|
56102
|
+
Cell: _ref8 => {
|
|
56103
|
+
var _row$original10, _row$original11;
|
|
56104
|
+
let {
|
|
56105
|
+
row
|
|
56106
|
+
} = _ref8;
|
|
56107
|
+
return /*#__PURE__*/React.createElement("span", null, (_row$original10 = row.original) !== null && _row$original10 !== void 0 && _row$original10.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.currentReadingDate) : t("NA"));
|
|
56108
|
+
}
|
|
56109
|
+
}, {
|
|
56110
|
+
Header: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
|
|
56111
|
+
id: "consumption",
|
|
56112
|
+
disableSortBy: true,
|
|
56113
|
+
Cell: _ref9 => {
|
|
56114
|
+
var _row$original12, _row$original13;
|
|
56115
|
+
let {
|
|
56116
|
+
row
|
|
56117
|
+
} = _ref9;
|
|
56118
|
+
return /*#__PURE__*/React.createElement("span", null, consumption((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.currentReading, (_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : _row$original13.lastReading));
|
|
56119
|
+
}
|
|
56120
|
+
}, {
|
|
56121
|
+
Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
|
|
56122
|
+
id: "action",
|
|
56123
|
+
disableSortBy: true,
|
|
56124
|
+
Cell: _ref0 => {
|
|
56125
|
+
let {
|
|
56126
|
+
row
|
|
56127
|
+
} = _ref0;
|
|
56128
|
+
return /*#__PURE__*/React.createElement(SubmitBar, {
|
|
56129
|
+
style: {
|
|
56130
|
+
backgroundColor: "#0A4275",
|
|
56131
|
+
color: "#FFFFFF",
|
|
56132
|
+
minWidth: "auto",
|
|
56133
|
+
padding: "6px 14px",
|
|
56134
|
+
fontSize: "12px",
|
|
56135
|
+
height: "auto",
|
|
56136
|
+
margin: "0px",
|
|
56137
|
+
whiteSpace: "nowrap"
|
|
56138
|
+
},
|
|
56139
|
+
label: t("VIEW_METER_READING_DETAILS"),
|
|
56140
|
+
onSubmit: () => handleViewMeterReadingDetails(row.original)
|
|
56141
|
+
});
|
|
56142
|
+
}
|
|
56143
|
+
}], [t]);
|
|
55591
56144
|
if (isLoading || isConnectionDetailsLoading) {
|
|
55592
56145
|
return /*#__PURE__*/React.createElement(Loader, null);
|
|
55593
56146
|
}
|
|
@@ -55595,89 +56148,40 @@ const ConsumptionDetails$1 = _ref => {
|
|
|
55595
56148
|
meterReadings
|
|
55596
56149
|
} = response || {};
|
|
55597
56150
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
55598
|
-
className: "employee-form-section-wrapper"
|
|
55599
|
-
}, /*#__PURE__*/React.createElement(VerticalTimeline, {
|
|
55600
|
-
config: [{
|
|
55601
|
-
timeLine: [{
|
|
55602
|
-
actions: "WS_VIEW_CONSUMPTION",
|
|
55603
|
-
currentStep: 1
|
|
55604
|
-
}]
|
|
55605
|
-
}],
|
|
55606
|
-
showFinalStep: false
|
|
55607
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
55608
56151
|
style: {
|
|
55609
56152
|
flex: 1,
|
|
55610
56153
|
display: "flex",
|
|
55611
56154
|
flexDirection: "column",
|
|
55612
|
-
gap: "16px"
|
|
55613
|
-
|
|
55614
|
-
|
|
55615
|
-
key: index
|
|
55616
|
-
}, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("div", {
|
|
55617
|
-
style: {
|
|
55618
|
-
display: "flex",
|
|
55619
|
-
justifyContent: "flex-end",
|
|
55620
|
-
marginBottom: "16px",
|
|
55621
|
-
marginTop: "8px",
|
|
55622
|
-
marginRight: "8px"
|
|
56155
|
+
gap: "16px",
|
|
56156
|
+
minWidth: 0,
|
|
56157
|
+
overflowX: "auto"
|
|
55623
56158
|
}
|
|
55624
|
-
}, /*#__PURE__*/React.createElement(
|
|
55625
|
-
|
|
55626
|
-
|
|
55627
|
-
|
|
55628
|
-
|
|
55629
|
-
|
|
55630
|
-
|
|
55631
|
-
|
|
55632
|
-
|
|
55633
|
-
|
|
55634
|
-
|
|
55635
|
-
|
|
55636
|
-
|
|
55637
|
-
|
|
55638
|
-
|
|
55639
|
-
|
|
55640
|
-
|
|
55641
|
-
|
|
55642
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55643
|
-
key: t("WS_READING_QUALITY_CODE"),
|
|
55644
|
-
label: `${t("WS_READING_QUALITY_CODE")}`,
|
|
55645
|
-
text: (application === null || application === void 0 ? void 0 : application.readingQualityCode) || t("NA"),
|
|
55646
|
-
className: "border-none"
|
|
55647
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55648
|
-
key: t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL"),
|
|
55649
|
-
label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_LABEL")}`,
|
|
55650
|
-
text: (application === null || application === void 0 ? void 0 : application.lastReading) || t("NA"),
|
|
55651
|
-
className: "border-none"
|
|
55652
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55653
|
-
key: t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL"),
|
|
55654
|
-
label: `${t("WS_CONSUMPTION_DETAILS_LAST_READING_DATE_LABEL")}`,
|
|
55655
|
-
text: application !== null && application !== void 0 && application.lastReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.lastReadingDate) : t("NA"),
|
|
55656
|
-
className: "border-none"
|
|
55657
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55658
|
-
key: t("WS_SERV_DETAIL_CUR_METER_READ"),
|
|
55659
|
-
label: `${t("WS_SERV_DETAIL_CUR_METER_READ")}`,
|
|
55660
|
-
text: (application === null || application === void 0 ? void 0 : application.currentReading) || t("NA"),
|
|
55661
|
-
className: "border-none"
|
|
55662
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55663
|
-
key: t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL"),
|
|
55664
|
-
label: `${t("WS_CONSUMPTION_DETAILS_CURRENT_READING_DATE_LABEL")}`,
|
|
55665
|
-
text: application !== null && application !== void 0 && application.currentReadingDate ? Digit.DateUtils.ConvertEpochToDate(application === null || application === void 0 ? void 0 : application.currentReadingDate) : t("NA"),
|
|
55666
|
-
className: "border-none"
|
|
55667
|
-
}), /*#__PURE__*/React.createElement(Row, {
|
|
55668
|
-
key: t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL"),
|
|
55669
|
-
label: `${t("WS_CONSUMPTION_DETAILS_CONSUMPTION_LABEL")}`,
|
|
55670
|
-
text: consumption(application === null || application === void 0 ? void 0 : application.currentReading, application === null || application === void 0 ? void 0 : application.lastReading),
|
|
55671
|
-
className: "border-none"
|
|
55672
|
-
}))))), !(meterReadings !== null && meterReadings !== void 0 && meterReadings.length) > 0 && /*#__PURE__*/React.createElement("p", {
|
|
56159
|
+
}, (meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length) > 0 ? /*#__PURE__*/React.createElement(Table, {
|
|
56160
|
+
t: t,
|
|
56161
|
+
data: meterReadings,
|
|
56162
|
+
columns: columns,
|
|
56163
|
+
totalRecords: meterReadings === null || meterReadings === void 0 ? void 0 : meterReadings.length,
|
|
56164
|
+
manualPagination: false,
|
|
56165
|
+
isPaginationRequired: true,
|
|
56166
|
+
pageSizeLimit: 10,
|
|
56167
|
+
disableSort: true,
|
|
56168
|
+
autoSort: false,
|
|
56169
|
+
getCellProps: () => ({
|
|
56170
|
+
style: {
|
|
56171
|
+
whiteSpace: "nowrap",
|
|
56172
|
+
padding: "16px 14px",
|
|
56173
|
+
fontSize: "14px"
|
|
56174
|
+
}
|
|
56175
|
+
})
|
|
56176
|
+
}) : /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement("p", {
|
|
55673
56177
|
style: {
|
|
55674
56178
|
marginLeft: "16px",
|
|
55675
56179
|
marginTop: "16px"
|
|
55676
56180
|
}
|
|
55677
|
-
}, t("WS_NO_CONSUMPTION_FOUND"))), isLoading || meterStatusLoading || billingPeriodLoading || !isUserAllowedToAddMeterReading ? null : /*#__PURE__*/React.createElement("div", null, isAddMeterReadingButtonEnable && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
56181
|
+
}, t("WS_NO_CONSUMPTION_FOUND")))), isLoading || meterStatusLoading || billingPeriodLoading || !isUserAllowedToAddMeterReading ? null : /*#__PURE__*/React.createElement("div", null, isAddMeterReadingButtonEnable && /*#__PURE__*/React.createElement(ActionBar, null, /*#__PURE__*/React.createElement(SubmitBar, {
|
|
55678
56182
|
label: t("WS_CONSUMPTION_BUTTON_METER_READING_LABEL"),
|
|
55679
56183
|
onSubmit: popUp
|
|
55680
|
-
})))
|
|
56184
|
+
}))), openModal && /*#__PURE__*/React.createElement(Modal, {
|
|
55681
56185
|
headerBarMain: /*#__PURE__*/React.createElement(Heading, {
|
|
55682
56186
|
label: t(config.label.heading)
|
|
55683
56187
|
}),
|
|
@@ -61591,7 +62095,7 @@ const openFilePDF = fileId => {
|
|
|
61591
62095
|
}).catch(error => console.error("Error fetching file:", error));
|
|
61592
62096
|
};
|
|
61593
62097
|
const CheckPage$4 = _ref2 => {
|
|
61594
|
-
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,
|
|
62098
|
+
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;
|
|
61595
62099
|
let {
|
|
61596
62100
|
data,
|
|
61597
62101
|
onSubmit,
|
|
@@ -61654,10 +62158,17 @@ const CheckPage$4 = _ref2 => {
|
|
|
61654
62158
|
}), /*#__PURE__*/React.createElement(Row, {
|
|
61655
62159
|
label: t("WS_Billing_Address_Type"),
|
|
61656
62160
|
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)))}`
|
|
61657
|
-
}),
|
|
61658
|
-
|
|
61659
|
-
|
|
61660
|
-
|
|
62161
|
+
}), ((_connectionDetails1, _connectionDetails10, _connectionDetails10$, _connectionDetails11, _connectionDetails11$, _data$additionalDetai2, _connectionDetails12, _data$additionalDetai3) => {
|
|
62162
|
+
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) || "";
|
|
62163
|
+
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) || "";
|
|
62164
|
+
if (compAddrStr && compAddrStr !== addrTypeStr && ["PERMANENT", "CORRESPONDENCE", "Permanent", "Correspondence"].includes(addrTypeStr)) {
|
|
62165
|
+
return /*#__PURE__*/React.createElement(Row, {
|
|
62166
|
+
label: t("Complete Address"),
|
|
62167
|
+
text: `${checkForNA$1(compAddrStr)}`
|
|
62168
|
+
});
|
|
62169
|
+
}
|
|
62170
|
+
return null;
|
|
62171
|
+
})()), /*#__PURE__*/React.createElement(CardSubHeader, null, t("WS_COMMON_CONNECTION_HOLDER_DETAILS_HEADER")), /*#__PURE__*/React.createElement(StatusTable, {
|
|
61661
62172
|
style: {
|
|
61662
62173
|
marginTop: "10px",
|
|
61663
62174
|
marginBottom: "30px"
|
|
@@ -61950,9 +62461,6 @@ const OLDApplication = () => {
|
|
|
61950
62461
|
const [canSubmit, setSubmitValve] = useState(false);
|
|
61951
62462
|
const [isEnableLoader, setIsEnableLoader] = useState(false);
|
|
61952
62463
|
const [showToast, setShowToast] = useState(null);
|
|
61953
|
-
const [config, setConfig] = useState({
|
|
61954
|
-
body: []
|
|
61955
|
-
});
|
|
61956
62464
|
const [showCheckPage, setShowCheckPage] = useState(false);
|
|
61957
62465
|
const isCitizen = ((_Digit$UserService$ge = Digit.UserService.getType()) === null || _Digit$UserService$ge === void 0 ? void 0 : _Digit$UserService$ge.toUpperCase()) === "CITIZEN";
|
|
61958
62466
|
const timelineConfig = [{
|
|
@@ -61986,15 +62494,21 @@ const OLDApplication = () => {
|
|
|
61986
62494
|
tenantId = (_Digit$SessionStorage = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")) === null || _Digit$SessionStorage === void 0 ? void 0 : _Digit$SessionStorage.code;
|
|
61987
62495
|
}
|
|
61988
62496
|
const stateId = Digit.ULBService.getStateId();
|
|
62497
|
+
const mdmsOptions = useMemo(() => ({}), []);
|
|
61989
62498
|
let {
|
|
61990
|
-
data: newConfig,
|
|
62499
|
+
data: newConfig$1,
|
|
61991
62500
|
isLoading
|
|
61992
|
-
} = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId,
|
|
62501
|
+
} = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, mdmsOptions);
|
|
61993
62502
|
const requestedPropertyId = new URLSearchParams(location.search).get("propertyId");
|
|
61994
62503
|
const [propertyId, setPropertyId] = useState(requestedPropertyId);
|
|
61995
62504
|
const initialPropertyId = useRef(requestedPropertyId);
|
|
61996
62505
|
const verifiedPropertyId = useRef(sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID"));
|
|
61997
62506
|
const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
|
|
62507
|
+
const formDataRef = useRef(sessionFormData || {});
|
|
62508
|
+
const sessionSaveTimeoutRef = useRef(null);
|
|
62509
|
+
const defaultValues = useMemo(() => {
|
|
62510
|
+
return sessionFormData && Object.keys(sessionFormData).length > 0 ? sessionFormData : Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM") || {};
|
|
62511
|
+
}, []);
|
|
61998
62512
|
const {
|
|
61999
62513
|
data: propertyDetails
|
|
62000
62514
|
} = Digit.Hooks.pt.usePropertySearch({
|
|
@@ -62019,102 +62533,106 @@ const OLDApplication = () => {
|
|
|
62019
62533
|
useEffect(() => {
|
|
62020
62534
|
sessionStorage.removeItem("FORMSTATE_ERRORS");
|
|
62021
62535
|
}, []);
|
|
62022
|
-
|
|
62023
|
-
|
|
62024
|
-
|
|
62025
|
-
|
|
62026
|
-
|
|
62027
|
-
|
|
62028
|
-
|
|
62029
|
-
|
|
62030
|
-
|
|
62031
|
-
|
|
62032
|
-
|
|
62033
|
-
|
|
62034
|
-
|
|
62035
|
-
|
|
62036
|
-
|
|
62037
|
-
|
|
62038
|
-
|
|
62039
|
-
|
|
62040
|
-
|
|
62041
|
-
|
|
62042
|
-
|
|
62043
|
-
|
|
62044
|
-
|
|
62045
|
-
|
|
62046
|
-
|
|
62047
|
-
|
|
62048
|
-
|
|
62049
|
-
|
|
62050
|
-
|
|
62051
|
-
}
|
|
62052
|
-
}
|
|
62053
|
-
|
|
62054
|
-
|
|
62055
|
-
isCreateConnection: true,
|
|
62056
|
-
body: [{
|
|
62057
|
-
type: "component",
|
|
62058
|
-
key: "useDetails",
|
|
62059
|
-
component: "PropertyWaterConnection",
|
|
62060
|
-
withoutLabel: true,
|
|
62061
|
-
isAutomaticFill: true
|
|
62062
|
-
}]
|
|
62063
|
-
});
|
|
62064
|
-
} else if (compName === "WSDeclaration") {
|
|
62065
|
-
reorderedBody.push({
|
|
62066
|
-
isCreateConnection: true,
|
|
62067
|
-
body: [{
|
|
62068
|
-
type: "component",
|
|
62069
|
-
key: "declarationData",
|
|
62070
|
-
component: "WSDeclaration",
|
|
62071
|
-
withoutLabel: true
|
|
62072
|
-
}]
|
|
62073
|
-
});
|
|
62074
|
-
} else if (compName === "WSDjbEmployee") {
|
|
62075
|
-
reorderedBody.push({
|
|
62076
|
-
isCreateConnection: true,
|
|
62077
|
-
body: [{
|
|
62078
|
-
type: "component",
|
|
62079
|
-
key: "djbEmployee",
|
|
62080
|
-
component: "WSDjbEmployee",
|
|
62081
|
-
withoutLabel: true
|
|
62082
|
-
}]
|
|
62083
|
-
});
|
|
62084
|
-
} else if (compName === "WSDivyangjan") {
|
|
62085
|
-
reorderedBody.push({
|
|
62086
|
-
isCreateConnection: true,
|
|
62087
|
-
body: [{
|
|
62088
|
-
type: "component",
|
|
62089
|
-
key: "disability",
|
|
62090
|
-
component: "WSDivyangjan",
|
|
62091
|
-
withoutLabel: true,
|
|
62092
|
-
texts: {
|
|
62093
|
-
header: "Divyangjan/Person with Disability?"
|
|
62094
|
-
}
|
|
62095
|
-
}]
|
|
62096
|
-
});
|
|
62097
|
-
}
|
|
62536
|
+
const config = useMemo(() => {
|
|
62537
|
+
var _configCopy$body;
|
|
62538
|
+
const rawConfigs = newConfig$1 && Array.isArray(newConfig$1) && newConfig$1.length > 0 ? newConfig$1 : newConfig;
|
|
62539
|
+
const foundConfig = rawConfigs === null || rawConfigs === void 0 ? void 0 : rawConfigs.find(conf => conf.hideInCitizen && conf.isCreate);
|
|
62540
|
+
if (!foundConfig) return {
|
|
62541
|
+
body: []
|
|
62542
|
+
};
|
|
62543
|
+
const configCopy = cloneDeep_1(foundConfig);
|
|
62544
|
+
const allCreateSections = (configCopy === null || configCopy === void 0 ? void 0 : (_configCopy$body = configCopy.body) === null || _configCopy$body === void 0 ? void 0 : _configCopy$body.filter(section => section === null || section === void 0 ? void 0 : section.isCreateConnection)) || [];
|
|
62545
|
+
const desiredComponentOrder = ["CPTPropertySearchNSummary", "WSConnectionDetails", "WSConnectionHolderDetails", "WSDivyangjan", "WSDjbEmployee", "WSPropertyLocationDetails", "PropertyWaterConnection", "WSActivationPlumberDetails", "WSRoadCuttingDetails", "WSDocumentsEmployee"];
|
|
62546
|
+
const reorderedBody = [];
|
|
62547
|
+
desiredComponentOrder.forEach(compName => {
|
|
62548
|
+
const section = allCreateSections.find(s => {
|
|
62549
|
+
var _s$body, _s$body$;
|
|
62550
|
+
const bodyComp = (_s$body = s.body) === null || _s$body === void 0 ? void 0 : (_s$body$ = _s$body[0]) === null || _s$body$ === void 0 ? void 0 : _s$body$.component;
|
|
62551
|
+
return bodyComp === compName || compName === "WSConnectionDetails" && bodyComp === "WSConnectionDetails";
|
|
62552
|
+
});
|
|
62553
|
+
if (section) {
|
|
62554
|
+
reorderedBody.push(section);
|
|
62555
|
+
} else if (compName === "WSPropertyLocationDetails") {
|
|
62556
|
+
reorderedBody.push({
|
|
62557
|
+
isCreateConnection: true,
|
|
62558
|
+
body: [{
|
|
62559
|
+
type: "component",
|
|
62560
|
+
key: "propertyAddress",
|
|
62561
|
+
component: "WSPropertyLocationDetails",
|
|
62562
|
+
withoutLabel: true,
|
|
62563
|
+
isAutomaticFill: true,
|
|
62564
|
+
texts: {
|
|
62565
|
+
header: `${t("PT_LOCATION_DETAILS_AUTOMATIC_FILL_BY_PROPERTY")}`
|
|
62566
|
+
},
|
|
62567
|
+
defaultOpen: false
|
|
62568
|
+
}]
|
|
62098
62569
|
});
|
|
62099
|
-
|
|
62100
|
-
|
|
62101
|
-
|
|
62102
|
-
|
|
62103
|
-
|
|
62104
|
-
|
|
62105
|
-
|
|
62106
|
-
|
|
62107
|
-
|
|
62570
|
+
} else if (compName === "PropertyWaterConnection") {
|
|
62571
|
+
reorderedBody.push({
|
|
62572
|
+
isCreateConnection: true,
|
|
62573
|
+
body: [{
|
|
62574
|
+
type: "component",
|
|
62575
|
+
key: "useDetails",
|
|
62576
|
+
component: "PropertyWaterConnection",
|
|
62577
|
+
withoutLabel: true,
|
|
62578
|
+
isAutomaticFill: true
|
|
62579
|
+
}]
|
|
62580
|
+
});
|
|
62581
|
+
} else if (compName === "WSDeclaration") {
|
|
62582
|
+
reorderedBody.push({
|
|
62583
|
+
isCreateConnection: true,
|
|
62584
|
+
body: [{
|
|
62585
|
+
type: "component",
|
|
62586
|
+
key: "declarationData",
|
|
62587
|
+
component: "WSDeclaration",
|
|
62588
|
+
withoutLabel: true
|
|
62589
|
+
}]
|
|
62590
|
+
});
|
|
62591
|
+
} else if (compName === "WSDjbEmployee") {
|
|
62592
|
+
reorderedBody.push({
|
|
62593
|
+
isCreateConnection: true,
|
|
62594
|
+
body: [{
|
|
62595
|
+
type: "component",
|
|
62596
|
+
key: "djbEmployee",
|
|
62597
|
+
component: "WSDjbEmployee",
|
|
62598
|
+
withoutLabel: true
|
|
62599
|
+
}]
|
|
62600
|
+
});
|
|
62601
|
+
} else if (compName === "WSDivyangjan") {
|
|
62602
|
+
reorderedBody.push({
|
|
62603
|
+
isCreateConnection: true,
|
|
62604
|
+
body: [{
|
|
62605
|
+
type: "component",
|
|
62606
|
+
key: "disability",
|
|
62607
|
+
component: "WSDivyangjan",
|
|
62608
|
+
withoutLabel: true,
|
|
62609
|
+
texts: {
|
|
62610
|
+
header: "Divyangjan/Person with Disability?"
|
|
62611
|
+
}
|
|
62612
|
+
}]
|
|
62108
62613
|
});
|
|
62109
|
-
config.body = reorderedBody;
|
|
62110
|
-
setConfig(config);
|
|
62111
62614
|
}
|
|
62112
|
-
}
|
|
62113
|
-
|
|
62615
|
+
});
|
|
62616
|
+
allCreateSections.forEach(section => {
|
|
62617
|
+
var _section$body, _section$body$;
|
|
62618
|
+
const bodyComp = (_section$body = section.body) === null || _section$body === void 0 ? void 0 : (_section$body$ = _section$body[0]) === null || _section$body$ === void 0 ? void 0 : _section$body$.component;
|
|
62619
|
+
if (bodyComp !== "CPTPropertySearchNSummary" && !reorderedBody.find(r => {
|
|
62620
|
+
var _r$body, _r$body$;
|
|
62621
|
+
return ((_r$body = r.body) === null || _r$body === void 0 ? void 0 : (_r$body$ = _r$body[0]) === null || _r$body$ === void 0 ? void 0 : _r$body$.component) === bodyComp;
|
|
62622
|
+
})) {
|
|
62623
|
+
reorderedBody.push(section);
|
|
62624
|
+
}
|
|
62625
|
+
});
|
|
62626
|
+
configCopy.body = reorderedBody;
|
|
62627
|
+
return configCopy;
|
|
62628
|
+
}, [newConfig$1, t]);
|
|
62114
62629
|
useEffect(() => {
|
|
62115
|
-
var _sessionFormData$cpt, _sessionFormData$cpt$,
|
|
62116
|
-
|
|
62117
|
-
|
|
62630
|
+
var _sessionFormData$cpt, _sessionFormData$cpt$, _Digit$SessionStorage2, _Digit$SessionStorage3, _Digit$SessionStorage4;
|
|
62631
|
+
const cptId = (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt = sessionFormData.cpt) === null || _sessionFormData$cpt === void 0 ? void 0 : (_sessionFormData$cpt$ = _sessionFormData$cpt.details) === null || _sessionFormData$cpt$ === void 0 ? void 0 : _sessionFormData$cpt$.propertyId) || ((_Digit$SessionStorage2 = Digit.SessionStorage.get("PT_CREATE_EMP_WS_NEW_FORM")) === null || _Digit$SessionStorage2 === void 0 ? void 0 : (_Digit$SessionStorage3 = _Digit$SessionStorage2.cpt) === null || _Digit$SessionStorage3 === void 0 ? void 0 : (_Digit$SessionStorage4 = _Digit$SessionStorage3.details) === null || _Digit$SessionStorage4 === void 0 ? void 0 : _Digit$SessionStorage4.propertyId);
|
|
62632
|
+
if (!propertyId && cptId) {
|
|
62633
|
+
setPropertyId(cptId);
|
|
62634
|
+
}
|
|
62635
|
+
}, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt, propertyId]);
|
|
62118
62636
|
const {
|
|
62119
62637
|
isLoading: creatingWaterApplicationLoading,
|
|
62120
62638
|
mutate: waterMutation
|
|
@@ -62132,26 +62650,42 @@ const OLDApplication = () => {
|
|
|
62132
62650
|
mutate: sewerageUpdateMutation
|
|
62133
62651
|
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
62134
62652
|
const onFormValueChange = (setValue, formData, formState) => {
|
|
62135
|
-
var
|
|
62136
|
-
|
|
62137
|
-
...
|
|
62653
|
+
var _formData$cpt, _formData$cpt$details, _formDataRef$current, _formDataRef$current2, _djbData$document, _formDataRef$current3, _formDataRef$current4, _formDataRef$current5, _propertyDetails$Prop, _propertyDetails$Prop2;
|
|
62654
|
+
formDataRef.current = {
|
|
62655
|
+
...formDataRef.current,
|
|
62138
62656
|
...formData
|
|
62139
62657
|
};
|
|
62140
|
-
|
|
62141
|
-
|
|
62142
|
-
setSessionFormData(cleanedFormData);
|
|
62658
|
+
if (sessionSaveTimeoutRef.current) {
|
|
62659
|
+
clearTimeout(sessionSaveTimeoutRef.current);
|
|
62143
62660
|
}
|
|
62661
|
+
sessionSaveTimeoutRef.current = setTimeout(() => {
|
|
62662
|
+
Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", formDataRef.current);
|
|
62663
|
+
}, 300);
|
|
62144
62664
|
sessionStorage.setItem("FORMSTATE_ERRORS", JSON.stringify((formState === null || formState === void 0 ? void 0 : formState.errors) || {}));
|
|
62145
|
-
const
|
|
62146
|
-
|
|
62147
|
-
|
|
62665
|
+
const cptPropId = formData === null || formData === void 0 ? void 0 : (_formData$cpt = formData.cpt) === null || _formData$cpt === void 0 ? void 0 : (_formData$cpt$details = _formData$cpt.details) === null || _formData$cpt$details === void 0 ? void 0 : _formData$cpt$details.propertyId;
|
|
62666
|
+
if (!propertyId && cptPropId) {
|
|
62667
|
+
setPropertyId(cptPropId);
|
|
62668
|
+
}
|
|
62669
|
+
const djbData = ((_formDataRef$current = formDataRef.current) === null || _formDataRef$current === void 0 ? void 0 : _formDataRef$current.djbEmployee) || ((_formDataRef$current2 = formDataRef.current) === null || _formDataRef$current2 === void 0 ? void 0 : _formDataRef$current2.additionalDetails);
|
|
62670
|
+
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
62671
|
+
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));
|
|
62672
|
+
const hasErrors = Object.keys((formState === null || formState === void 0 ? void 0 : formState.errors) || {}).length > 0 || isDjbEmpInvalid;
|
|
62673
|
+
const hasProperty = ((_formDataRef$current3 = formDataRef.current) === null || _formDataRef$current3 === void 0 ? void 0 : (_formDataRef$current4 = _formDataRef$current3.cpt) === null || _formDataRef$current4 === void 0 ? void 0 : (_formDataRef$current5 = _formDataRef$current4.details) === null || _formDataRef$current5 === void 0 ? void 0 : _formDataRef$current5.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);
|
|
62674
|
+
const canSubmitNow = !hasErrors && !!hasProperty;
|
|
62675
|
+
setSubmitValve(prev => prev !== canSubmitNow ? canSubmitNow : prev);
|
|
62148
62676
|
};
|
|
62149
62677
|
const onFormSubmit = data => {
|
|
62150
|
-
var
|
|
62151
|
-
const
|
|
62678
|
+
var _combinedData$cpt, _combinedData$cpt$det, _propertyDetails$Prop3, _propertyDetails$Prop4, _combinedData$cpt2, _propertyDetails$Prop5, _djbData$document2;
|
|
62679
|
+
const combinedData = {
|
|
62680
|
+
...formDataRef.current,
|
|
62681
|
+
...data
|
|
62682
|
+
};
|
|
62683
|
+
formDataRef.current = combinedData;
|
|
62684
|
+
Digit.SessionStorage.set("PT_CREATE_EMP_WS_NEW_FORM", combinedData);
|
|
62685
|
+
const hasProperty = (combinedData === null || combinedData === void 0 ? void 0 : (_combinedData$cpt = combinedData.cpt) === null || _combinedData$cpt === void 0 ? void 0 : (_combinedData$cpt$det = _combinedData$cpt.details) === null || _combinedData$cpt$det === void 0 ? void 0 : _combinedData$cpt$det.propertyId) || sessionStorage.getItem("WS_OTP_VERIFIED_PROPERTY_ID") || propertyId || (propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$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);
|
|
62152
62686
|
if (!hasProperty) {
|
|
62153
62687
|
console.warn("[WS] onSubmit EXIT: invalid property", {
|
|
62154
|
-
cpt:
|
|
62688
|
+
cpt: combinedData === null || combinedData === void 0 ? void 0 : combinedData.cpt,
|
|
62155
62689
|
propertyDetails
|
|
62156
62690
|
});
|
|
62157
62691
|
setShowToast({
|
|
@@ -62160,11 +62694,11 @@ const OLDApplication = () => {
|
|
|
62160
62694
|
});
|
|
62161
62695
|
return;
|
|
62162
62696
|
}
|
|
62163
|
-
if (!(
|
|
62164
|
-
var
|
|
62165
|
-
if (!(
|
|
62697
|
+
if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt2 = combinedData.cpt) !== null && _combinedData$cpt2 !== void 0 && _combinedData$cpt2.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop5 = propertyDetails.Properties) !== null && _propertyDetails$Prop5 !== void 0 && _propertyDetails$Prop5[0])) {
|
|
62698
|
+
var _combinedData$cpt3;
|
|
62699
|
+
if (!(combinedData !== null && combinedData !== void 0 && (_combinedData$cpt3 = combinedData.cpt) !== null && _combinedData$cpt3 !== void 0 && _combinedData$cpt3.details) || !propertyDetails) {
|
|
62166
62700
|
console.warn("[WS] onSubmit EXIT: invalid property", {
|
|
62167
|
-
cpt:
|
|
62701
|
+
cpt: combinedData === null || combinedData === void 0 ? void 0 : combinedData.cpt,
|
|
62168
62702
|
propertyDetails
|
|
62169
62703
|
});
|
|
62170
62704
|
setShowToast({
|
|
@@ -62174,11 +62708,21 @@ const OLDApplication = () => {
|
|
|
62174
62708
|
return;
|
|
62175
62709
|
}
|
|
62176
62710
|
}
|
|
62711
|
+
const djbData = (combinedData === null || combinedData === void 0 ? void 0 : combinedData.djbEmployee) || (combinedData === null || combinedData === void 0 ? void 0 : combinedData.additionalDetails);
|
|
62712
|
+
const isDjbEmp = (djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === true || String(djbData === null || djbData === void 0 ? void 0 : djbData.isDjbEmployee) === "true";
|
|
62713
|
+
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));
|
|
62714
|
+
if (isDjbEmpInvalid) {
|
|
62715
|
+
setShowToast({
|
|
62716
|
+
key: "error",
|
|
62717
|
+
message: "ERR_FILL_ALL_MANDATORY_FIELDS"
|
|
62718
|
+
});
|
|
62719
|
+
return;
|
|
62720
|
+
}
|
|
62177
62721
|
setShowCheckPage(true);
|
|
62178
62722
|
};
|
|
62179
62723
|
const processSubmission = function (data) {
|
|
62180
62724
|
try {
|
|
62181
|
-
var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$
|
|
62725
|
+
var _data$useDetails, _data$ConnectionDetai, _data$ConnectionDetai2, _data$DocumentsRequir, _data$cpt, _Digit$UserService$ge2, _data$ConnectionHolde, _data$ConnectionHolde2, _data$ConnectionHolde3, _data$ConnectionHolde4, _data$ConnectionHolde5, _propertyDetails$Prop7, _propertyDetails$Prop8, _propertyDetails$Prop9, _propertyDetails$Prop0, _data$ConnectionHolde6, _data$ConnectionHolde7, _data$cpt2, _data$cpt2$details, _data$cpt2$details$ow, _data$cpt2$details$ow2;
|
|
62182
62726
|
const basePath = window.location.href.includes("/employee") ? "/digit-ui/employee/ws" : "/digit-ui/citizen/ws";
|
|
62183
62727
|
if (data !== null && data !== void 0 && (_data$useDetails = data.useDetails) !== null && _data$useDetails !== void 0 && _data$useDetails.useDetails) {
|
|
62184
62728
|
data.useDetails = {
|
|
@@ -62275,7 +62819,7 @@ const OLDApplication = () => {
|
|
|
62275
62819
|
data.declarationData.agree = data.declaration.agree;
|
|
62276
62820
|
data.declarationData.declarations = data.declaration.declarations;
|
|
62277
62821
|
}
|
|
62278
|
-
if (!(data !== null && data !== void 0 && (_data$
|
|
62822
|
+
if (!(data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && _data$cpt.details)) {
|
|
62279
62823
|
var _propertyDetails$Prop6;
|
|
62280
62824
|
data.cpt = {
|
|
62281
62825
|
details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop6 = propertyDetails.Properties) === null || _propertyDetails$Prop6 === void 0 ? void 0 : _propertyDetails$Prop6[0]
|
|
@@ -62300,7 +62844,7 @@ const OLDApplication = () => {
|
|
|
62300
62844
|
departmentType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.departmentType,
|
|
62301
62845
|
temporaryConnection: connDetail === null || connDetail === void 0 ? void 0 : connDetail.temporaryType,
|
|
62302
62846
|
waterDemandType: connDetail === null || connDetail === void 0 ? void 0 : connDetail.waterDemandType,
|
|
62303
|
-
ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$
|
|
62847
|
+
ownerContactNumber: (data === null || data === void 0 ? void 0 : (_data$ConnectionHolde6 = data.ConnectionHolderDetails) === null || _data$ConnectionHolde6 === void 0 ? void 0 : (_data$ConnectionHolde7 = _data$ConnectionHolde6[0]) === null || _data$ConnectionHolde7 === void 0 ? void 0 : _data$ConnectionHolde7.mobileNumber) || (data === null || data === void 0 ? void 0 : (_data$cpt2 = data.cpt) === null || _data$cpt2 === void 0 ? void 0 : (_data$cpt2$details = _data$cpt2.details) === null || _data$cpt2$details === void 0 ? void 0 : (_data$cpt2$details$ow = _data$cpt2$details.owners) === null || _data$cpt2$details$ow === void 0 ? void 0 : (_data$cpt2$details$ow2 = _data$cpt2$details$ow[0]) === null || _data$cpt2$details$ow2 === void 0 ? void 0 : _data$cpt2$details$ow2.mobileNumber)
|
|
62304
62848
|
};
|
|
62305
62849
|
return Promise.resolve(createPayloadOfWS(data)).then(function (payload) {
|
|
62306
62850
|
if (!(payload !== null && payload !== void 0 && payload.water) && !(payload !== null && payload !== void 0 && payload.sewerage)) {
|
|
@@ -62547,8 +63091,8 @@ const OLDApplication = () => {
|
|
|
62547
63091
|
currentActiveIndex: 9,
|
|
62548
63092
|
showFinalStep: false
|
|
62549
63093
|
}), /*#__PURE__*/React.createElement(CheckPage$4, {
|
|
62550
|
-
data: sessionFormData,
|
|
62551
|
-
onSubmit: finalData => processSubmission(finalData || sessionFormData),
|
|
63094
|
+
data: formDataRef.current || sessionFormData,
|
|
63095
|
+
onSubmit: finalData => processSubmission(finalData || formDataRef.current || sessionFormData),
|
|
62552
63096
|
onEdit: () => setShowCheckPage(false)
|
|
62553
63097
|
})));
|
|
62554
63098
|
}
|
|
@@ -62565,7 +63109,7 @@ const OLDApplication = () => {
|
|
|
62565
63109
|
isDisabled: !canSubmit,
|
|
62566
63110
|
label: creatingWaterApplicationLoading || creatingSewerageApplicationLoading || updatingWaterApplicationLoading || updatingSewerageApplicationLoading ? t("CS_COMMON_SUBMITTING") : t("CS_COMMON_NEXT"),
|
|
62567
63111
|
onSubmit: onFormSubmit,
|
|
62568
|
-
defaultValues:
|
|
63112
|
+
defaultValues: defaultValues,
|
|
62569
63113
|
noCard: true,
|
|
62570
63114
|
noBreakLine: true,
|
|
62571
63115
|
cardFormWrapperClassName: "new-application-card"
|
|
@@ -62654,19 +63198,26 @@ const FitterSandbox = _ref => {
|
|
|
62654
63198
|
status: "ACTIVE",
|
|
62655
63199
|
isVerified: false
|
|
62656
63200
|
}];
|
|
62657
|
-
|
|
62658
|
-
|
|
63201
|
+
const currentDate = Date.now();
|
|
63202
|
+
const actionToExecute = (action === null || action === void 0 ? void 0 : action.action) || (typeof action === "string" ? action : "EXECUTE_DISCONNECTION");
|
|
63203
|
+
payload.connectionExecutionDate = currentDate;
|
|
63204
|
+
payload.disconnectionExecutionDate = currentDate;
|
|
63205
|
+
payload.action = actionToExecute;
|
|
62659
63206
|
payload.wfDocuments = docArray;
|
|
62660
63207
|
payload.documents = [...(payload.documents || []), ...docArray];
|
|
62661
63208
|
payload.additionalDetails = {
|
|
62662
63209
|
...payload.additionalDetails,
|
|
62663
63210
|
finalMeterReading: meterReading,
|
|
63211
|
+
disconnectionExecutionDate: currentDate,
|
|
62664
63212
|
disconnectionGpsLocation: gpsLocation.replace(/<[^>]*>?/gm, ""),
|
|
62665
63213
|
disconnectionTimestamp: timestamp.replace(/<[^>]*>?/gm, "")
|
|
62666
63214
|
};
|
|
63215
|
+
if (Array.isArray(payload.disConnectionDetails) && payload.disConnectionDetails.length > 0) {
|
|
63216
|
+
payload.disConnectionDetails[0].disconnectionExecutionDate = currentDate;
|
|
63217
|
+
}
|
|
62667
63218
|
payload.processInstance = {
|
|
62668
63219
|
...payload.processInstance,
|
|
62669
|
-
action:
|
|
63220
|
+
action: actionToExecute,
|
|
62670
63221
|
comment: `Meter Reading: ${meterReading} m3`,
|
|
62671
63222
|
documents: docArray
|
|
62672
63223
|
};
|