@djb25/digit-ui-module-ws 1.0.110 → 1.0.111
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 +575 -496
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +575 -496
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -8674,7 +8674,8 @@ const WSMyApplications = () => {
|
|
|
8674
8674
|
onNextPage: () => setPageOffset(pageOffset + pageSize),
|
|
8675
8675
|
onPrevPage: () => setPageOffset(pageOffset - pageSize),
|
|
8676
8676
|
pageSizeLimit: pageSize,
|
|
8677
|
-
disableSort: true
|
|
8677
|
+
disableSort: true,
|
|
8678
|
+
autoSort: false
|
|
8678
8679
|
}) : /*#__PURE__*/React.createElement("p", {
|
|
8679
8680
|
style: {
|
|
8680
8681
|
marginLeft: "16px",
|
|
@@ -22714,25 +22715,27 @@ const WSDisconnectionForm = _ref => {
|
|
|
22714
22715
|
...waterConnectionUpdate,
|
|
22715
22716
|
disconnectRequest: true
|
|
22716
22717
|
};
|
|
22717
|
-
return Promise.resolve(
|
|
22718
|
-
|
|
22719
|
-
|
|
22720
|
-
|
|
22721
|
-
|
|
22722
|
-
|
|
22723
|
-
|
|
22724
|
-
|
|
22725
|
-
|
|
22726
|
-
|
|
22727
|
-
|
|
22728
|
-
|
|
22729
|
-
|
|
22730
|
-
|
|
22731
|
-
|
|
22732
|
-
|
|
22733
|
-
|
|
22734
|
-
|
|
22735
|
-
|
|
22718
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
22719
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
22720
|
+
onError: (error, variables) => {
|
|
22721
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
22722
|
+
setIsEnableLoader(false);
|
|
22723
|
+
setError({
|
|
22724
|
+
key: "error",
|
|
22725
|
+
message: error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.Errors) !== null && _error$response3$data2 !== void 0 && _error$response3$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2[0].message : error
|
|
22726
|
+
});
|
|
22727
|
+
setTimeout(closeToastOfError, 5000);
|
|
22728
|
+
},
|
|
22729
|
+
onSuccess: (data, variables) => {
|
|
22730
|
+
var _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4;
|
|
22731
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22732
|
+
...applicationData,
|
|
22733
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
22734
|
+
});
|
|
22735
|
+
history.push(`/digit-ui/employee/ws/ws-disconnection-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnection) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3[0]) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4.applicationNo}`);
|
|
22736
|
+
}
|
|
22737
|
+
})).then(function () {});
|
|
22738
|
+
});
|
|
22736
22739
|
});
|
|
22737
22740
|
} catch (e) {
|
|
22738
22741
|
return Promise.reject(e);
|
|
@@ -22769,25 +22772,27 @@ const WSDisconnectionForm = _ref => {
|
|
|
22769
22772
|
...sewerageConnectionUpdate,
|
|
22770
22773
|
disconnectRequest: true
|
|
22771
22774
|
};
|
|
22772
|
-
return Promise.resolve(
|
|
22773
|
-
|
|
22774
|
-
|
|
22775
|
-
|
|
22776
|
-
|
|
22777
|
-
|
|
22778
|
-
|
|
22779
|
-
|
|
22780
|
-
|
|
22781
|
-
|
|
22782
|
-
|
|
22783
|
-
|
|
22784
|
-
|
|
22785
|
-
|
|
22786
|
-
|
|
22787
|
-
|
|
22788
|
-
|
|
22789
|
-
|
|
22790
|
-
|
|
22775
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
22776
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
22777
|
+
onError: (error, variables) => {
|
|
22778
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
22779
|
+
setIsEnableLoader(false);
|
|
22780
|
+
setError({
|
|
22781
|
+
key: "error",
|
|
22782
|
+
message: error !== null && error !== void 0 && (_error$response7 = error.response) !== null && _error$response7 !== void 0 && (_error$response7$data = _error$response7.data) !== null && _error$response7$data !== void 0 && (_error$response7$data2 = _error$response7$data.Errors) !== null && _error$response7$data2 !== void 0 && _error$response7$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : _error$response8$data2[0].message : error
|
|
22783
|
+
});
|
|
22784
|
+
setTimeout(closeToastOfError, 5000);
|
|
22785
|
+
},
|
|
22786
|
+
onSuccess: (data, variables) => {
|
|
22787
|
+
var _data$SewerageConnect2, _data$SewerageConnect3, _data$SewerageConnect4;
|
|
22788
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22789
|
+
...applicationData,
|
|
22790
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
22791
|
+
});
|
|
22792
|
+
history.push(`/digit-ui/employee/ws/ws-disconnection-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnections) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3[0]) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4.applicationNo}`);
|
|
22793
|
+
}
|
|
22794
|
+
})).then(function () {});
|
|
22795
|
+
});
|
|
22791
22796
|
});
|
|
22792
22797
|
} catch (e) {
|
|
22793
22798
|
return Promise.reject(e);
|
|
@@ -23475,26 +23480,28 @@ const WSRestorationForm = _ref => {
|
|
|
23475
23480
|
disconnectRequest: false,
|
|
23476
23481
|
reconnectRequest: true
|
|
23477
23482
|
};
|
|
23478
|
-
return Promise.resolve(
|
|
23479
|
-
|
|
23480
|
-
|
|
23481
|
-
|
|
23482
|
-
|
|
23483
|
-
|
|
23484
|
-
|
|
23485
|
-
|
|
23486
|
-
|
|
23487
|
-
|
|
23488
|
-
|
|
23489
|
-
|
|
23490
|
-
|
|
23491
|
-
|
|
23492
|
-
|
|
23493
|
-
|
|
23494
|
-
|
|
23495
|
-
|
|
23496
|
-
|
|
23497
|
-
|
|
23483
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
23484
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
23485
|
+
onError: (error, variables) => {
|
|
23486
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3, _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
|
|
23487
|
+
setIsEnableLoader(false);
|
|
23488
|
+
setError({
|
|
23489
|
+
key: "error",
|
|
23490
|
+
message: error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.Errors) !== null && _error$response3$data2 !== void 0 && (_error$response3$data3 = _error$response3$data2[0]) !== null && _error$response3$data3 !== void 0 && _error$response3$data3.message ? error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : (_error$response4$data3 = _error$response4$data2[0]) === null || _error$response4$data3 === void 0 ? void 0 : _error$response4$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to submit reconnection"
|
|
23491
|
+
});
|
|
23492
|
+
setTimeout(closeToastOfError, 5000);
|
|
23493
|
+
},
|
|
23494
|
+
onSuccess: (updatedData, variables) => {
|
|
23495
|
+
var _updatedData$WaterCon, _updatedData$WaterCon2, _updatedData$WaterCon3;
|
|
23496
|
+
setIsEnableLoader(false);
|
|
23497
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23498
|
+
...currentAppData,
|
|
23499
|
+
DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$WaterCon = updatedData.WaterConnection) === null || _updatedData$WaterCon === void 0 ? void 0 : _updatedData$WaterCon[0]
|
|
23500
|
+
});
|
|
23501
|
+
history.push(`/digit-ui/employee/ws/ws-restoration-response?applicationNumber=${updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$WaterCon2 = updatedData.WaterConnection) === null || _updatedData$WaterCon2 === void 0 ? void 0 : (_updatedData$WaterCon3 = _updatedData$WaterCon2[0]) === null || _updatedData$WaterCon3 === void 0 ? void 0 : _updatedData$WaterCon3.applicationNo}`);
|
|
23502
|
+
}
|
|
23503
|
+
})).then(function () {});
|
|
23504
|
+
});
|
|
23498
23505
|
});
|
|
23499
23506
|
} catch (e) {
|
|
23500
23507
|
return Promise.reject(e);
|
|
@@ -23535,26 +23542,28 @@ const WSRestorationForm = _ref => {
|
|
|
23535
23542
|
disconnectRequest: false,
|
|
23536
23543
|
reconnectRequest: true
|
|
23537
23544
|
};
|
|
23538
|
-
return Promise.resolve(
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
|
|
23546
|
-
|
|
23547
|
-
|
|
23548
|
-
|
|
23549
|
-
|
|
23550
|
-
|
|
23551
|
-
|
|
23552
|
-
|
|
23553
|
-
|
|
23554
|
-
|
|
23555
|
-
|
|
23556
|
-
|
|
23557
|
-
|
|
23545
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
23546
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
23547
|
+
onError: (error, variables) => {
|
|
23548
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response7$data3, _error$response8, _error$response8$data, _error$response8$data2, _error$response8$data3;
|
|
23549
|
+
setIsEnableLoader(false);
|
|
23550
|
+
setError({
|
|
23551
|
+
key: "error",
|
|
23552
|
+
message: error !== null && error !== void 0 && (_error$response7 = error.response) !== null && _error$response7 !== void 0 && (_error$response7$data = _error$response7.data) !== null && _error$response7$data !== void 0 && (_error$response7$data2 = _error$response7$data.Errors) !== null && _error$response7$data2 !== void 0 && (_error$response7$data3 = _error$response7$data2[0]) !== null && _error$response7$data3 !== void 0 && _error$response7$data3.message ? error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : (_error$response8$data3 = _error$response8$data2[0]) === null || _error$response8$data3 === void 0 ? void 0 : _error$response8$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to submit reconnection"
|
|
23553
|
+
});
|
|
23554
|
+
setTimeout(closeToastOfError, 5000);
|
|
23555
|
+
},
|
|
23556
|
+
onSuccess: (updatedData, variables) => {
|
|
23557
|
+
var _updatedData$Sewerage, _updatedData$Sewerage2, _updatedData$Sewerage3;
|
|
23558
|
+
setIsEnableLoader(false);
|
|
23559
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23560
|
+
...currentAppData,
|
|
23561
|
+
DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$Sewerage = updatedData.SewerageConnections) === null || _updatedData$Sewerage === void 0 ? void 0 : _updatedData$Sewerage[0]
|
|
23562
|
+
});
|
|
23563
|
+
history.push(`/digit-ui/employee/ws/ws-restoration-response?applicationNumber=${updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$Sewerage2 = updatedData.SewerageConnections) === null || _updatedData$Sewerage2 === void 0 ? void 0 : (_updatedData$Sewerage3 = _updatedData$Sewerage2[0]) === null || _updatedData$Sewerage3 === void 0 ? void 0 : _updatedData$Sewerage3.applicationNo}`);
|
|
23564
|
+
}
|
|
23565
|
+
})).then(function () {});
|
|
23566
|
+
});
|
|
23558
23567
|
});
|
|
23559
23568
|
} catch (e) {
|
|
23560
23569
|
return Promise.reject(e);
|
|
@@ -23877,15 +23886,17 @@ const WSRestorationForm = _ref => {
|
|
|
23877
23886
|
reconnectRequest: true,
|
|
23878
23887
|
disconnectRequest: false
|
|
23879
23888
|
};
|
|
23880
|
-
return Promise.resolve(
|
|
23881
|
-
|
|
23882
|
-
|
|
23883
|
-
|
|
23884
|
-
|
|
23885
|
-
|
|
23889
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
23890
|
+
return Promise.resolve(executeMutation(updateMutation, updatePayload)).then(function (updateResponse) {
|
|
23891
|
+
var _updateResponse$respo;
|
|
23892
|
+
const finalConnection = (updateResponse === null || updateResponse === void 0 ? void 0 : (_updateResponse$respo = updateResponse[responseKey]) === null || _updateResponse$respo === void 0 ? void 0 : _updateResponse$respo[0]) || createdConnection;
|
|
23893
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23894
|
+
...applicationData,
|
|
23895
|
+
DisconnectionResponse: finalConnection
|
|
23896
|
+
});
|
|
23897
|
+
const responsePath = userType === "citizen" ? "/digit-ui/citizen/ws/restoration-acknowledge" : "/digit-ui/employee/ws/ws-restoration-response?applicationNumber=" + (finalConnection === null || finalConnection === void 0 ? void 0 : finalConnection.applicationNo);
|
|
23898
|
+
history.push(responsePath);
|
|
23886
23899
|
});
|
|
23887
|
-
const responsePath = userType === "citizen" ? "/digit-ui/citizen/ws/restoration-acknowledge" : "/digit-ui/employee/ws/ws-restoration-response?applicationNumber=" + (finalConnection === null || finalConnection === void 0 ? void 0 : finalConnection.applicationNo);
|
|
23888
|
-
history.push(responsePath);
|
|
23889
23900
|
});
|
|
23890
23901
|
});
|
|
23891
23902
|
});
|
|
@@ -28037,6 +28048,13 @@ const SearchApplication = _ref => {
|
|
|
28037
28048
|
const GetCell = value => /*#__PURE__*/React.createElement("span", {
|
|
28038
28049
|
className: "cell-text"
|
|
28039
28050
|
}, value);
|
|
28051
|
+
const sortedData = useMemo(() => {
|
|
28052
|
+
if (!Array.isArray(data)) return data;
|
|
28053
|
+
return [...data].sort((a, b) => {
|
|
28054
|
+
var _b$auditDetails, _b$auditDetails2, _a$auditDetails, _a$auditDetails2;
|
|
28055
|
+
return ((b === null || b === void 0 ? void 0 : (_b$auditDetails = b.auditDetails) === null || _b$auditDetails === void 0 ? void 0 : _b$auditDetails.createdTime) || (b === null || b === void 0 ? void 0 : (_b$auditDetails2 = b.auditDetails) === null || _b$auditDetails2 === void 0 ? void 0 : _b$auditDetails2.lastModifiedTime) || 0) - ((a === null || a === void 0 ? void 0 : (_a$auditDetails = a.auditDetails) === null || _a$auditDetails === void 0 ? void 0 : _a$auditDetails.createdTime) || (a === null || a === void 0 ? void 0 : (_a$auditDetails2 = a.auditDetails) === null || _a$auditDetails2 === void 0 ? void 0 : _a$auditDetails2.lastModifiedTime) || 0);
|
|
28056
|
+
});
|
|
28057
|
+
}, [data]);
|
|
28040
28058
|
const columns = useMemo(() => [{
|
|
28041
28059
|
Header: t("WS_MYCONNECTIONS_CONSUMER_NO"),
|
|
28042
28060
|
disableSortBy: true,
|
|
@@ -28221,7 +28239,7 @@ const SearchApplication = _ref => {
|
|
|
28221
28239
|
}
|
|
28222
28240
|
}, text))) : resultOk ? /*#__PURE__*/React.createElement(Table, {
|
|
28223
28241
|
t: t,
|
|
28224
|
-
data:
|
|
28242
|
+
data: sortedData,
|
|
28225
28243
|
totalRecords: count,
|
|
28226
28244
|
columns: columns,
|
|
28227
28245
|
getCellProps: cellInfo => {
|
|
@@ -28240,6 +28258,7 @@ const SearchApplication = _ref => {
|
|
|
28240
28258
|
pageSizeLimit: getValues("limit"),
|
|
28241
28259
|
onSort: onSort,
|
|
28242
28260
|
disableSort: false,
|
|
28261
|
+
autoSort: false,
|
|
28243
28262
|
sortParams: [{
|
|
28244
28263
|
id: getValues("sortBy"),
|
|
28245
28264
|
desc: getValues("sortOrder") === "DESC" ? true : false
|
|
@@ -28912,6 +28931,7 @@ const SearchWaterConnection = _ref => {
|
|
|
28912
28931
|
pageSizeLimit: getValues("limit"),
|
|
28913
28932
|
onSort: onSort,
|
|
28914
28933
|
disableSort: false,
|
|
28934
|
+
autoSort: false,
|
|
28915
28935
|
sortParams: [{
|
|
28916
28936
|
id: getValues("sortBy"),
|
|
28917
28937
|
desc: getValues("sortOrder") === "DESC" ? true : false
|
|
@@ -28937,6 +28957,7 @@ const SearchWaterConnection = _ref => {
|
|
|
28937
28957
|
pageSizeLimit: getValues("limit"),
|
|
28938
28958
|
onSort: onSort,
|
|
28939
28959
|
disableSort: false,
|
|
28960
|
+
autoSort: false,
|
|
28940
28961
|
sortParams: [{
|
|
28941
28962
|
id: getValues("sortBy"),
|
|
28942
28963
|
desc: getValues("sortOrder") === "DESC" ? true : false
|
|
@@ -39793,25 +39814,27 @@ const CheckPage$1 = () => {
|
|
|
39793
39814
|
...waterConnectionUpdate,
|
|
39794
39815
|
disconnectRequest: true
|
|
39795
39816
|
};
|
|
39796
|
-
return Promise.resolve(
|
|
39797
|
-
|
|
39798
|
-
|
|
39799
|
-
|
|
39800
|
-
|
|
39801
|
-
|
|
39802
|
-
|
|
39803
|
-
|
|
39804
|
-
|
|
39805
|
-
|
|
39806
|
-
|
|
39807
|
-
|
|
39808
|
-
|
|
39809
|
-
|
|
39810
|
-
|
|
39811
|
-
|
|
39812
|
-
|
|
39813
|
-
|
|
39814
|
-
|
|
39817
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
39818
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
39819
|
+
onError: (error, variables) => {
|
|
39820
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
39821
|
+
setIsEnableLoader(false);
|
|
39822
|
+
setError({
|
|
39823
|
+
key: "error",
|
|
39824
|
+
message: error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.Errors) !== null && _error$response3$data2 !== void 0 && _error$response3$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2[0].message : error
|
|
39825
|
+
});
|
|
39826
|
+
setTimeout(closeToastOfError, 5000);
|
|
39827
|
+
},
|
|
39828
|
+
onSuccess: (data, variables) => {
|
|
39829
|
+
var _data$WaterConnection2;
|
|
39830
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
39831
|
+
...value,
|
|
39832
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
39833
|
+
});
|
|
39834
|
+
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge`);
|
|
39835
|
+
}
|
|
39836
|
+
})).then(function () {});
|
|
39837
|
+
});
|
|
39815
39838
|
});
|
|
39816
39839
|
} catch (e) {
|
|
39817
39840
|
return Promise.reject(e);
|
|
@@ -39848,25 +39871,27 @@ const CheckPage$1 = () => {
|
|
|
39848
39871
|
...sewerageConnectionUpdate,
|
|
39849
39872
|
disconnectRequest: true
|
|
39850
39873
|
};
|
|
39851
|
-
return Promise.resolve(
|
|
39852
|
-
|
|
39853
|
-
|
|
39854
|
-
|
|
39855
|
-
|
|
39856
|
-
|
|
39857
|
-
|
|
39858
|
-
|
|
39859
|
-
|
|
39860
|
-
|
|
39861
|
-
|
|
39862
|
-
|
|
39863
|
-
|
|
39864
|
-
|
|
39865
|
-
|
|
39866
|
-
|
|
39867
|
-
|
|
39868
|
-
|
|
39869
|
-
|
|
39874
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
39875
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
39876
|
+
onError: (error, variables) => {
|
|
39877
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
39878
|
+
setIsEnableLoader(false);
|
|
39879
|
+
setError({
|
|
39880
|
+
key: "error",
|
|
39881
|
+
message: error !== null && error !== void 0 && (_error$response7 = error.response) !== null && _error$response7 !== void 0 && (_error$response7$data = _error$response7.data) !== null && _error$response7$data !== void 0 && (_error$response7$data2 = _error$response7$data.Errors) !== null && _error$response7$data2 !== void 0 && _error$response7$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : _error$response8$data2[0].message : error
|
|
39882
|
+
});
|
|
39883
|
+
setTimeout(closeToastOfError, 5000);
|
|
39884
|
+
},
|
|
39885
|
+
onSuccess: (data, variables) => {
|
|
39886
|
+
var _data$SewerageConnect2;
|
|
39887
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
39888
|
+
...value,
|
|
39889
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
39890
|
+
});
|
|
39891
|
+
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge`);
|
|
39892
|
+
}
|
|
39893
|
+
})).then(function () {});
|
|
39894
|
+
});
|
|
39870
39895
|
});
|
|
39871
39896
|
} catch (e) {
|
|
39872
39897
|
return Promise.reject(e);
|
|
@@ -40032,25 +40057,27 @@ const CheckPage$2 = () => {
|
|
|
40032
40057
|
disconnectRequest: false,
|
|
40033
40058
|
reconnectRequest: true
|
|
40034
40059
|
};
|
|
40035
|
-
return Promise.resolve(
|
|
40036
|
-
|
|
40037
|
-
|
|
40038
|
-
|
|
40039
|
-
|
|
40040
|
-
|
|
40041
|
-
|
|
40042
|
-
|
|
40043
|
-
|
|
40044
|
-
|
|
40045
|
-
|
|
40046
|
-
|
|
40047
|
-
|
|
40048
|
-
|
|
40049
|
-
|
|
40050
|
-
|
|
40051
|
-
|
|
40052
|
-
|
|
40053
|
-
|
|
40060
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
40061
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
40062
|
+
onError: (error, variables) => {
|
|
40063
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
40064
|
+
setIsEnableLoader(false);
|
|
40065
|
+
setError({
|
|
40066
|
+
key: "error",
|
|
40067
|
+
message: error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.Errors) !== null && _error$response3$data2 !== void 0 && _error$response3$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2[0].message : error
|
|
40068
|
+
});
|
|
40069
|
+
setTimeout(closeToastOfError, 5000);
|
|
40070
|
+
},
|
|
40071
|
+
onSuccess: (data, variables) => {
|
|
40072
|
+
var _data$WaterConnection2;
|
|
40073
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
40074
|
+
...value,
|
|
40075
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
40076
|
+
});
|
|
40077
|
+
history.push(`/digit-ui/citizen/ws/restoration-acknowledge`);
|
|
40078
|
+
}
|
|
40079
|
+
})).then(function () {});
|
|
40080
|
+
});
|
|
40054
40081
|
});
|
|
40055
40082
|
} catch (e) {
|
|
40056
40083
|
return Promise.reject(e);
|
|
@@ -40094,25 +40121,27 @@ const CheckPage$2 = () => {
|
|
|
40094
40121
|
disconnectRequest: false,
|
|
40095
40122
|
reconnectRequest: true
|
|
40096
40123
|
};
|
|
40097
|
-
return Promise.resolve(
|
|
40098
|
-
|
|
40099
|
-
|
|
40100
|
-
|
|
40101
|
-
|
|
40102
|
-
|
|
40103
|
-
|
|
40104
|
-
|
|
40105
|
-
|
|
40106
|
-
|
|
40107
|
-
|
|
40108
|
-
|
|
40109
|
-
|
|
40110
|
-
|
|
40111
|
-
|
|
40112
|
-
|
|
40113
|
-
|
|
40114
|
-
|
|
40115
|
-
|
|
40124
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
40125
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
40126
|
+
onError: (error, variables) => {
|
|
40127
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
40128
|
+
setIsEnableLoader(false);
|
|
40129
|
+
setError({
|
|
40130
|
+
key: "error",
|
|
40131
|
+
message: error !== null && error !== void 0 && (_error$response7 = error.response) !== null && _error$response7 !== void 0 && (_error$response7$data = _error$response7.data) !== null && _error$response7$data !== void 0 && (_error$response7$data2 = _error$response7$data.Errors) !== null && _error$response7$data2 !== void 0 && _error$response7$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : _error$response8$data2[0].message : error
|
|
40132
|
+
});
|
|
40133
|
+
setTimeout(closeToastOfError, 5000);
|
|
40134
|
+
},
|
|
40135
|
+
onSuccess: (data, variables) => {
|
|
40136
|
+
var _data$SewerageConnect2;
|
|
40137
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
40138
|
+
...value,
|
|
40139
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
40140
|
+
});
|
|
40141
|
+
history.push(`/digit-ui/citizen/ws/restoration-acknowledge`);
|
|
40142
|
+
}
|
|
40143
|
+
})).then(function () {});
|
|
40144
|
+
});
|
|
40116
40145
|
});
|
|
40117
40146
|
} catch (e) {
|
|
40118
40147
|
return Promise.reject(e);
|
|
@@ -44253,82 +44282,86 @@ const NewApplication = () => {
|
|
|
44253
44282
|
disconnectRequest: false,
|
|
44254
44283
|
reconnectRequest: false
|
|
44255
44284
|
};
|
|
44256
|
-
|
|
44257
|
-
|
|
44258
|
-
|
|
44259
|
-
|
|
44260
|
-
|
|
44261
|
-
|
|
44262
|
-
|
|
44263
|
-
|
|
44264
|
-
setTimeout(closeToastOfError, 5000);
|
|
44265
|
-
},
|
|
44266
|
-
onSuccess: function (waterUpdateData) {
|
|
44267
|
-
try {
|
|
44268
|
-
setAppDetails(prev => {
|
|
44269
|
-
var _waterUpdateData$Wate;
|
|
44270
|
-
return {
|
|
44271
|
-
...prev,
|
|
44272
|
-
waterConnection: waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : _waterUpdateData$Wate[0]
|
|
44273
|
-
};
|
|
44285
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
44286
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
44287
|
+
onError: error => {
|
|
44288
|
+
var _error$response2, _error$response2$data, _error$response2$data2;
|
|
44289
|
+
setIsEnableLoader(false);
|
|
44290
|
+
setShowToast({
|
|
44291
|
+
key: "error",
|
|
44292
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : _error$response2$data2[0].message) || error
|
|
44274
44293
|
});
|
|
44275
|
-
|
|
44276
|
-
|
|
44277
|
-
|
|
44278
|
-
|
|
44279
|
-
|
|
44280
|
-
|
|
44281
|
-
|
|
44282
|
-
|
|
44283
|
-
|
|
44284
|
-
|
|
44285
|
-
|
|
44286
|
-
|
|
44287
|
-
|
|
44288
|
-
|
|
44289
|
-
|
|
44290
|
-
|
|
44291
|
-
|
|
44292
|
-
|
|
44293
|
-
};
|
|
44294
|
-
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
44295
|
-
onError: error => {
|
|
44296
|
-
var _error$response4, _error$response4$data, _error$response4$data2;
|
|
44297
|
-
setIsEnableLoader(false);
|
|
44298
|
-
setShowToast({
|
|
44299
|
-
key: "error",
|
|
44300
|
-
message: (error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2[0].message) || error
|
|
44301
|
-
});
|
|
44302
|
-
setTimeout(closeToastOfError, 5000);
|
|
44303
|
-
},
|
|
44304
|
-
onSuccess: function (sewerageUpdateData) {
|
|
44305
|
-
try {
|
|
44306
|
-
var _waterUpdateData$Wate2, _waterUpdateData$Wate3, _sewerageUpdateData$S2, _sewerageUpdateData$S3;
|
|
44307
|
-
setAppDetails(prev => {
|
|
44308
|
-
var _sewerageUpdateData$S;
|
|
44309
|
-
return {
|
|
44310
|
-
...prev,
|
|
44311
|
-
sewerageConnection: sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : _sewerageUpdateData$S[0]
|
|
44312
|
-
};
|
|
44313
|
-
});
|
|
44314
|
-
window.sessionStorage.removeItem(FORM_STORAGE_KEY);
|
|
44315
|
-
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate2 = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : (_waterUpdateData$Wate3 = _waterUpdateData$Wate2[0]) === null || _waterUpdateData$Wate3 === void 0 ? void 0 : _waterUpdateData$Wate3.applicationNo}&applicationNumber1=${sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S2 = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : (_sewerageUpdateData$S3 = _sewerageUpdateData$S2[0]) === null || _sewerageUpdateData$S3 === void 0 ? void 0 : _sewerageUpdateData$S3.applicationNo}`);
|
|
44316
|
-
return Promise.resolve();
|
|
44317
|
-
} catch (e) {
|
|
44318
|
-
return Promise.reject(e);
|
|
44319
|
-
}
|
|
44320
|
-
}
|
|
44321
|
-
})).then(function () {});
|
|
44294
|
+
setTimeout(closeToastOfError, 5000);
|
|
44295
|
+
},
|
|
44296
|
+
onSuccess: function (waterUpdateData) {
|
|
44297
|
+
try {
|
|
44298
|
+
setAppDetails(prev => {
|
|
44299
|
+
var _waterUpdateData$Wate;
|
|
44300
|
+
return {
|
|
44301
|
+
...prev,
|
|
44302
|
+
waterConnection: waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : _waterUpdateData$Wate[0]
|
|
44303
|
+
};
|
|
44304
|
+
});
|
|
44305
|
+
return Promise.resolve(sewerageMutation(sewerageConnection, {
|
|
44306
|
+
onError: error => {
|
|
44307
|
+
var _error$response3, _error$response3$data, _error$response3$data2;
|
|
44308
|
+
setIsEnableLoader(false);
|
|
44309
|
+
setShowToast({
|
|
44310
|
+
key: "error",
|
|
44311
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.Errors) === null || _error$response3$data2 === void 0 ? void 0 : _error$response3$data2[0].message) || error
|
|
44322
44312
|
});
|
|
44323
|
-
|
|
44324
|
-
|
|
44313
|
+
setTimeout(closeToastOfError, 5000);
|
|
44314
|
+
},
|
|
44315
|
+
onSuccess: function (sewerageData) {
|
|
44316
|
+
try {
|
|
44317
|
+
var _sewerageData$Sewerag;
|
|
44318
|
+
return Promise.resolve(updatePayloadOfWS(sewerageData === null || sewerageData === void 0 ? void 0 : (_sewerageData$Sewerag = sewerageData.SewerageConnections) === null || _sewerageData$Sewerag === void 0 ? void 0 : _sewerageData$Sewerag[0], "SEWERAGE")).then(function (response) {
|
|
44319
|
+
let sewerageConnectionUpdate = {
|
|
44320
|
+
SewerageConnection: response,
|
|
44321
|
+
disconnectRequest: false,
|
|
44322
|
+
reconnectRequest: false
|
|
44323
|
+
};
|
|
44324
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
44325
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
44326
|
+
onError: error => {
|
|
44327
|
+
var _error$response4, _error$response4$data, _error$response4$data2;
|
|
44328
|
+
setIsEnableLoader(false);
|
|
44329
|
+
setShowToast({
|
|
44330
|
+
key: "error",
|
|
44331
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : _error$response4$data2[0].message) || error
|
|
44332
|
+
});
|
|
44333
|
+
setTimeout(closeToastOfError, 5000);
|
|
44334
|
+
},
|
|
44335
|
+
onSuccess: function (sewerageUpdateData) {
|
|
44336
|
+
try {
|
|
44337
|
+
var _waterUpdateData$Wate2, _waterUpdateData$Wate3, _sewerageUpdateData$S2, _sewerageUpdateData$S3;
|
|
44338
|
+
setAppDetails(prev => {
|
|
44339
|
+
var _sewerageUpdateData$S;
|
|
44340
|
+
return {
|
|
44341
|
+
...prev,
|
|
44342
|
+
sewerageConnection: sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : _sewerageUpdateData$S[0]
|
|
44343
|
+
};
|
|
44344
|
+
});
|
|
44345
|
+
window.sessionStorage.removeItem(FORM_STORAGE_KEY);
|
|
44346
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate2 = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : (_waterUpdateData$Wate3 = _waterUpdateData$Wate2[0]) === null || _waterUpdateData$Wate3 === void 0 ? void 0 : _waterUpdateData$Wate3.applicationNo}&applicationNumber1=${sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S2 = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : (_sewerageUpdateData$S3 = _sewerageUpdateData$S2[0]) === null || _sewerageUpdateData$S3 === void 0 ? void 0 : _sewerageUpdateData$S3.applicationNo}`);
|
|
44347
|
+
return Promise.resolve();
|
|
44348
|
+
} catch (e) {
|
|
44349
|
+
return Promise.reject(e);
|
|
44350
|
+
}
|
|
44351
|
+
}
|
|
44352
|
+
})).then(function () {});
|
|
44353
|
+
});
|
|
44354
|
+
});
|
|
44355
|
+
} catch (e) {
|
|
44356
|
+
return Promise.reject(e);
|
|
44357
|
+
}
|
|
44325
44358
|
}
|
|
44326
|
-
}
|
|
44327
|
-
}
|
|
44328
|
-
|
|
44329
|
-
|
|
44359
|
+
})).then(function () {});
|
|
44360
|
+
} catch (e) {
|
|
44361
|
+
return Promise.reject(e);
|
|
44362
|
+
}
|
|
44330
44363
|
}
|
|
44331
|
-
}
|
|
44364
|
+
});
|
|
44332
44365
|
});
|
|
44333
44366
|
});
|
|
44334
44367
|
} catch (e) {
|
|
@@ -44362,28 +44395,30 @@ const NewApplication = () => {
|
|
|
44362
44395
|
let waterConnectionUpdate = {
|
|
44363
44396
|
WaterConnection: response
|
|
44364
44397
|
};
|
|
44365
|
-
|
|
44366
|
-
|
|
44367
|
-
|
|
44368
|
-
|
|
44369
|
-
|
|
44370
|
-
|
|
44371
|
-
|
|
44372
|
-
|
|
44373
|
-
|
|
44374
|
-
|
|
44375
|
-
|
|
44376
|
-
|
|
44377
|
-
|
|
44378
|
-
|
|
44379
|
-
|
|
44380
|
-
|
|
44381
|
-
|
|
44382
|
-
|
|
44383
|
-
|
|
44384
|
-
|
|
44385
|
-
|
|
44386
|
-
|
|
44398
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
44399
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
44400
|
+
onError: error => {
|
|
44401
|
+
var _error$response6, _error$response6$data, _error$response6$data2;
|
|
44402
|
+
setIsEnableLoader(false);
|
|
44403
|
+
setShowToast({
|
|
44404
|
+
key: "error",
|
|
44405
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : _error$response6$data2[0].message) || error
|
|
44406
|
+
});
|
|
44407
|
+
setTimeout(closeToastOfError, 5000);
|
|
44408
|
+
},
|
|
44409
|
+
onSuccess: data => {
|
|
44410
|
+
var _data$WaterConnection3, _data$WaterConnection4;
|
|
44411
|
+
setAppDetails(prev => {
|
|
44412
|
+
var _data$WaterConnection2;
|
|
44413
|
+
return {
|
|
44414
|
+
...prev,
|
|
44415
|
+
waterConnection: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
44416
|
+
};
|
|
44417
|
+
});
|
|
44418
|
+
window.sessionStorage.removeItem(FORM_STORAGE_KEY);
|
|
44419
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection3 = data.WaterConnection) === null || _data$WaterConnection3 === void 0 ? void 0 : (_data$WaterConnection4 = _data$WaterConnection3[0]) === null || _data$WaterConnection4 === void 0 ? void 0 : _data$WaterConnection4.applicationNo}`);
|
|
44420
|
+
}
|
|
44421
|
+
});
|
|
44387
44422
|
});
|
|
44388
44423
|
});
|
|
44389
44424
|
} catch (e) {
|
|
@@ -44417,29 +44452,31 @@ const NewApplication = () => {
|
|
|
44417
44452
|
let sewerageConnectionUpdate = {
|
|
44418
44453
|
SewerageConnection: response
|
|
44419
44454
|
};
|
|
44420
|
-
return Promise.resolve(
|
|
44421
|
-
|
|
44422
|
-
|
|
44423
|
-
|
|
44424
|
-
|
|
44425
|
-
|
|
44426
|
-
|
|
44427
|
-
|
|
44428
|
-
|
|
44429
|
-
|
|
44430
|
-
|
|
44431
|
-
|
|
44432
|
-
|
|
44433
|
-
|
|
44434
|
-
|
|
44435
|
-
|
|
44436
|
-
|
|
44437
|
-
|
|
44438
|
-
|
|
44439
|
-
|
|
44440
|
-
|
|
44441
|
-
|
|
44442
|
-
|
|
44455
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
44456
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
44457
|
+
onError: error => {
|
|
44458
|
+
var _error$response8, _error$response8$data, _error$response8$data2;
|
|
44459
|
+
setIsEnableLoader(false);
|
|
44460
|
+
setShowToast({
|
|
44461
|
+
key: "error",
|
|
44462
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : _error$response8$data2[0].message) || error
|
|
44463
|
+
});
|
|
44464
|
+
setTimeout(closeToastOfError, 5000);
|
|
44465
|
+
},
|
|
44466
|
+
onSuccess: data => {
|
|
44467
|
+
var _data$SewerageConnect3, _data$SewerageConnect4;
|
|
44468
|
+
setAppDetails(prev => {
|
|
44469
|
+
var _data$SewerageConnect2;
|
|
44470
|
+
return {
|
|
44471
|
+
...prev,
|
|
44472
|
+
sewerageConnection: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
44473
|
+
};
|
|
44474
|
+
});
|
|
44475
|
+
window.sessionStorage.removeItem(FORM_STORAGE_KEY);
|
|
44476
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber1=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect3 = data.SewerageConnections) === null || _data$SewerageConnect3 === void 0 ? void 0 : (_data$SewerageConnect4 = _data$SewerageConnect3[0]) === null || _data$SewerageConnect4 === void 0 ? void 0 : _data$SewerageConnect4.applicationNo}`);
|
|
44477
|
+
}
|
|
44478
|
+
})).then(function () {});
|
|
44479
|
+
});
|
|
44443
44480
|
});
|
|
44444
44481
|
} catch (e) {
|
|
44445
44482
|
return Promise.reject(e);
|
|
@@ -53264,7 +53301,7 @@ function ApplicationDetailsToast(_ref) {
|
|
|
53264
53301
|
}
|
|
53265
53302
|
|
|
53266
53303
|
function ApplicationDetailsActionBar(_ref) {
|
|
53267
|
-
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$
|
|
53304
|
+
var _user, _user$info, _user$info$roles, _workflowDetails$data, _workflowDetails$data2, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _applicationDetails$a, _applicationDetails$a2, _applicationData$appl, _businessService$toUp, _applicationData$appl2, _applicationDetails$a3, _applicationDetails$a4, _applicationData$appl3, _businessService$toUp2, _applicationData$appl4, _actions, _applicationDetails$a5, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationData$addi, _actions4, _actions5, _actions6, _actions6$, _actions6$$redirectio, _actions7, _actions8, _Session$info, _applicationDetails$a9, _applicationDetails$a0, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _actions9, _actions9$, _actions0, _actions0$, _actions10, _actions10$;
|
|
53268
53305
|
let {
|
|
53269
53306
|
workflowDetails,
|
|
53270
53307
|
displayMenu,
|
|
@@ -53326,30 +53363,50 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
53326
53363
|
return (_e$roles2 = e.roles) === null || _e$roles2 === void 0 ? void 0 : _e$roles2.includes(role);
|
|
53327
53364
|
})) || !e.roles;
|
|
53328
53365
|
}));
|
|
53329
|
-
const
|
|
53330
|
-
|
|
53366
|
+
const isMutationOrReconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a = applicationDetails.applicationData) === null || _applicationDetails$a === void 0 ? void 0 : (_applicationDetails$a2 = _applicationDetails$a.applicationType) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.includes("MUTATION")) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl = applicationData.applicationType) === null || _applicationData$appl === void 0 ? void 0 : _applicationData$appl.includes("MUTATION")) || (businessService === null || businessService === void 0 ? void 0 : (_businessService$toUp = businessService.toUpperCase()) === null || _businessService$toUp === void 0 ? void 0 : _businessService$toUp.includes("MUTATION")) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl2 = applicationData.applicationNo) === null || _applicationData$appl2 === void 0 ? void 0 : _applicationData$appl2.includes("MUT")) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a3 = applicationDetails.applicationData) === null || _applicationDetails$a3 === void 0 ? void 0 : (_applicationDetails$a4 = _applicationDetails$a3.applicationType) === null || _applicationDetails$a4 === void 0 ? void 0 : _applicationDetails$a4.includes("RECONNECT")) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl3 = applicationData.applicationType) === null || _applicationData$appl3 === void 0 ? void 0 : _applicationData$appl3.includes("RECONNECT")) || (businessService === null || businessService === void 0 ? void 0 : (_businessService$toUp2 = businessService.toUpperCase()) === null || _businessService$toUp2 === void 0 ? void 0 : _businessService$toUp2.includes("RECONNECTION")) || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl4 = applicationData.applicationNo) === null || _applicationData$appl4 === void 0 ? void 0 : _applicationData$appl4.includes("RC")) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.reconnectRequest);
|
|
53367
|
+
const hasDirectSendBack = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.some(e => e.action === "SEND_BACK_TO_CITIZEN_DIRECT");
|
|
53368
|
+
const completelySatisfied = isMutationOrReconnection ? undefined : (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$a5 = applicationDetails.applicationData) === null || _applicationDetails$a5 === void 0 ? void 0 : (_applicationDetails$a6 = _applicationDetails$a5.additionalDetails) === null || _applicationDetails$a6 === void 0 ? void 0 : _applicationDetails$a6.CompletelySatisfied) !== undefined ? applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a7 = applicationDetails.applicationData) === null || _applicationDetails$a7 === void 0 ? void 0 : (_applicationDetails$a8 = _applicationDetails$a7.additionalDetails) === null || _applicationDetails$a8 === void 0 ? void 0 : _applicationDetails$a8.CompletelySatisfied : applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.CompletelySatisfied;
|
|
53369
|
+
if (!isMutationOrReconnection && hasDirectSendBack && completelySatisfied !== undefined) {
|
|
53331
53370
|
if (completelySatisfied === true) {
|
|
53332
|
-
var _actions;
|
|
53333
|
-
actions = (_actions = actions) === null || _actions === void 0 ? void 0 : _actions.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
|
|
53334
|
-
} else if (completelySatisfied === false) {
|
|
53335
53371
|
var _actions2;
|
|
53336
|
-
actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "
|
|
53372
|
+
actions = (_actions2 = actions) === null || _actions2 === void 0 ? void 0 : _actions2.filter(e => e.action !== "SEND_BACK_TO_CITIZEN");
|
|
53373
|
+
} else if (completelySatisfied === false) {
|
|
53374
|
+
var _actions3;
|
|
53375
|
+
actions = (_actions3 = actions) === null || _actions3 === void 0 ? void 0 : _actions3.filter(e => e.action !== "SEND_BACK_TO_CITIZEN_DIRECT");
|
|
53337
53376
|
}
|
|
53338
53377
|
}
|
|
53378
|
+
(_actions4 = actions) === null || _actions4 === void 0 ? void 0 : _actions4.forEach(action => {
|
|
53379
|
+
if ((action === null || action === void 0 ? void 0 : action.action) === "SEND_BACK_TO_CITIZEN" && !action.forcedName) {
|
|
53380
|
+
const primaryKey = forcedActionPrefix ? `${forcedActionPrefix}_SEND_BACK_TO_CITIZEN` : `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}_SEND_BACK_TO_CITIZEN`;
|
|
53381
|
+
const translatedPrimary = t(primaryKey);
|
|
53382
|
+
if (translatedPrimary && translatedPrimary !== primaryKey) {
|
|
53383
|
+
action.forcedName = primaryKey;
|
|
53384
|
+
} else {
|
|
53385
|
+
const fallbackKeys = ["WF_EMPLOYEE_NEWWS1_SEND_BACK_TO_CITIZEN", "WF_EMPLOYEE_WS_SEND_BACK_TO_CITIZEN", "WF_SEND_BACK_TO_CITIZEN", "ES_COMMON_SEND_BACK", "SEND_BACK_TO_CITIZEN"];
|
|
53386
|
+
for (const fbKey of fallbackKeys) {
|
|
53387
|
+
const trans = t(fbKey);
|
|
53388
|
+
if (trans && trans !== fbKey) {
|
|
53389
|
+
action.forcedName = fbKey;
|
|
53390
|
+
break;
|
|
53391
|
+
}
|
|
53392
|
+
}
|
|
53393
|
+
}
|
|
53394
|
+
}
|
|
53395
|
+
});
|
|
53339
53396
|
const closeMenu = () => {
|
|
53340
53397
|
setDisplayMenu(false);
|
|
53341
53398
|
};
|
|
53342
53399
|
Digit.Hooks.useClickOutside(menuRef, closeMenu, displayMenu);
|
|
53343
|
-
if ((window.location.href.includes("/obps") || window.location.href.includes("/noc")) && ((
|
|
53400
|
+
if ((window.location.href.includes("/obps") || window.location.href.includes("/noc")) && ((_actions5 = actions) === null || _actions5 === void 0 ? void 0 : _actions5.length) == 1 || (_actions6 = actions) !== null && _actions6 !== void 0 && (_actions6$ = _actions6[0]) !== null && _actions6$ !== void 0 && (_actions6$$redirectio = _actions6$.redirectionUrl) !== null && _actions6$$redirectio !== void 0 && _actions6$$redirectio.pathname.includes("/pt/property-details/") && ((_actions7 = actions) === null || _actions7 === void 0 ? void 0 : _actions7.length) == 1) {
|
|
53344
53401
|
isMenuBotton = false;
|
|
53345
53402
|
isSingleButton = true;
|
|
53346
|
-
} else if (((
|
|
53403
|
+
} else if (((_actions8 = actions) === null || _actions8 === void 0 ? void 0 : _actions8.length) > 0) {
|
|
53347
53404
|
isMenuBotton = true;
|
|
53348
53405
|
isSingleButton = false;
|
|
53349
53406
|
}
|
|
53350
53407
|
const Session = Digit.SessionStorage.get("User");
|
|
53351
53408
|
const uuid = Session === null || Session === void 0 ? void 0 : (_Session$info = Session.info) === null || _Session$info === void 0 ? void 0 : _Session$info.uuid;
|
|
53352
|
-
const modified = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
53409
|
+
const modified = applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a9 = applicationDetails.applicationData) === null || _applicationDetails$a9 === void 0 ? void 0 : (_applicationDetails$a0 = _applicationDetails$a9.auditDetails) === null || _applicationDetails$a0 === void 0 ? void 0 : _applicationDetails$a0.lastModifiedBy;
|
|
53353
53410
|
return /*#__PURE__*/React.createElement(React.Fragment, null, !(workflowDetails !== null && workflowDetails !== void 0 && workflowDetails.isLoading) && isMenuBotton && !isSingleButton && !isAction && /*#__PURE__*/React.createElement(ActionBar, {
|
|
53354
53411
|
style: {
|
|
53355
53412
|
...ActionBarStyle
|
|
@@ -53387,13 +53444,13 @@ function ApplicationDetailsActionBar(_ref) {
|
|
|
53387
53444
|
fontSize: "18px"
|
|
53388
53445
|
},
|
|
53389
53446
|
className: "submit-bar",
|
|
53390
|
-
name: (
|
|
53391
|
-
value: (
|
|
53447
|
+
name: (_actions9 = actions) === null || _actions9 === void 0 ? void 0 : (_actions9$ = _actions9[0]) === null || _actions9$ === void 0 ? void 0 : _actions9$.action,
|
|
53448
|
+
value: (_actions0 = actions) === null || _actions0 === void 0 ? void 0 : (_actions0$ = _actions0[0]) === null || _actions0$ === void 0 ? void 0 : _actions0$.action,
|
|
53392
53449
|
onClick: e => {
|
|
53393
|
-
var
|
|
53394
|
-
onActionSelect(((
|
|
53450
|
+
var _actions1;
|
|
53451
|
+
onActionSelect(((_actions1 = actions) === null || _actions1 === void 0 ? void 0 : _actions1[0]) || {});
|
|
53395
53452
|
}
|
|
53396
|
-
}, t(`${forcedActionPrefix || `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`}_${(
|
|
53453
|
+
}, t(`${forcedActionPrefix || `WF_EMPLOYEE_${businessService === null || businessService === void 0 ? void 0 : businessService.toUpperCase()}`}_${(_actions10 = actions) === null || _actions10 === void 0 ? void 0 : (_actions10$ = _actions10[0]) === null || _actions10$ === void 0 ? void 0 : _actions10$.action}`))));
|
|
53397
53454
|
}
|
|
53398
53455
|
|
|
53399
53456
|
const Close$f = () => /*#__PURE__*/React.createElement("svg", {
|
|
@@ -56936,21 +56993,23 @@ const ModifyApplication = () => {
|
|
|
56936
56993
|
reconnectRequest: false,
|
|
56937
56994
|
disconnectRequest: false
|
|
56938
56995
|
};
|
|
56939
|
-
return Promise.resolve(
|
|
56940
|
-
|
|
56941
|
-
|
|
56942
|
-
|
|
56943
|
-
|
|
56944
|
-
|
|
56945
|
-
|
|
56946
|
-
|
|
56947
|
-
|
|
56948
|
-
|
|
56949
|
-
|
|
56950
|
-
|
|
56951
|
-
|
|
56952
|
-
|
|
56953
|
-
|
|
56996
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
56997
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
56998
|
+
onError: (error, variables) => {
|
|
56999
|
+
setIsEnableLoader(false);
|
|
57000
|
+
setShowToast({
|
|
57001
|
+
key: "error",
|
|
57002
|
+
message: error !== null && error !== void 0 && error.message ? error.message : error
|
|
57003
|
+
});
|
|
57004
|
+
setTimeout(closeToastOfError, 5000);
|
|
57005
|
+
},
|
|
57006
|
+
onSuccess: (data, variables) => {
|
|
57007
|
+
var _data$SewerageConnect2, _data$SewerageConnect3;
|
|
57008
|
+
clearSessionFormData();
|
|
57009
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber1=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : (_data$SewerageConnect3 = _data$SewerageConnect2[0]) === null || _data$SewerageConnect3 === void 0 ? void 0 : _data$SewerageConnect3.applicationNo}`);
|
|
57010
|
+
}
|
|
57011
|
+
})).then(function () {});
|
|
57012
|
+
});
|
|
56954
57013
|
});
|
|
56955
57014
|
} catch (e) {
|
|
56956
57015
|
return Promise.reject(e);
|
|
@@ -57005,21 +57064,23 @@ const ModifyApplication = () => {
|
|
|
57005
57064
|
reconnectRequest: false,
|
|
57006
57065
|
disconnectRequest: false
|
|
57007
57066
|
};
|
|
57008
|
-
|
|
57009
|
-
|
|
57010
|
-
|
|
57011
|
-
|
|
57012
|
-
|
|
57013
|
-
|
|
57014
|
-
|
|
57015
|
-
|
|
57016
|
-
|
|
57017
|
-
|
|
57018
|
-
|
|
57019
|
-
|
|
57020
|
-
|
|
57021
|
-
|
|
57022
|
-
|
|
57067
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
57068
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
57069
|
+
onError: (error, variables) => {
|
|
57070
|
+
var _error$response5, _error$response5$data, _error$response5$data2, _error$response6, _error$response6$data, _error$response6$data2;
|
|
57071
|
+
setIsEnableLoader(false);
|
|
57072
|
+
setShowToast({
|
|
57073
|
+
key: "error",
|
|
57074
|
+
message: error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && (_error$response5$data2 = _error$response5$data.Errors) !== null && _error$response5$data2 !== void 0 && _error$response5$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : _error$response6$data2[0].message : error
|
|
57075
|
+
});
|
|
57076
|
+
setTimeout(closeToastOfError, 5000);
|
|
57077
|
+
},
|
|
57078
|
+
onSuccess: (data, variables) => {
|
|
57079
|
+
var _data$WaterConnection2, _data$WaterConnection3;
|
|
57080
|
+
clearSessionFormData();
|
|
57081
|
+
history.push(`/digit-ui/employee/ws/ws-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : (_data$WaterConnection3 = _data$WaterConnection2[0]) === null || _data$WaterConnection3 === void 0 ? void 0 : _data$WaterConnection3.applicationNo}`);
|
|
57082
|
+
}
|
|
57083
|
+
});
|
|
57023
57084
|
});
|
|
57024
57085
|
});
|
|
57025
57086
|
} catch (e) {
|
|
@@ -60045,94 +60106,103 @@ const MutationApplication = () => {
|
|
|
60045
60106
|
message: (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : (_error$response2$data3 = _error$response2$data2[0]) === null || _error$response2$data3 === void 0 ? void 0 : _error$response2$data3.message) || "Failed to submit application"
|
|
60046
60107
|
});
|
|
60047
60108
|
},
|
|
60048
|
-
onSuccess: data
|
|
60049
|
-
|
|
60050
|
-
|
|
60051
|
-
|
|
60052
|
-
|
|
60053
|
-
|
|
60054
|
-
|
|
60055
|
-
|
|
60056
|
-
|
|
60057
|
-
|
|
60058
|
-
|
|
60059
|
-
|
|
60060
|
-
|
|
60061
|
-
if (data !== null && data !== void 0 && data.Errors && data.Errors.length > 0) {
|
|
60062
|
-
setIsSubmitting(false);
|
|
60063
|
-
setShowToast({
|
|
60064
|
-
key: "error",
|
|
60065
|
-
message: data.Errors[0].message || "Failed to submit application"
|
|
60066
|
-
});
|
|
60067
|
-
} else {
|
|
60068
|
-
var _data$WaterConnection, _data$SewerageConnect, _updatePayload2, _updatePayload2$docum, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
60069
|
-
const updateMutation = resolvedServiceType === "WATER" ? waterUpdateMutation : sewerageUpdateMutation;
|
|
60070
|
-
const createdConnection = resolvedServiceType === "WATER" ? data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0] : data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0];
|
|
60071
|
-
let updatePayload = {
|
|
60072
|
-
...createdConnection,
|
|
60073
|
-
dateEffectiveFrom: (createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.dateEffectiveFrom) || Date.now(),
|
|
60074
|
-
processInstance: {
|
|
60075
|
-
...(createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.processInstance),
|
|
60076
|
-
action: "APPLY_MUTATION"
|
|
60077
|
-
}
|
|
60078
|
-
};
|
|
60079
|
-
const combinedExistingDocs = [...existingDocs, ...((createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.documents) || [])];
|
|
60080
|
-
if (((_updatePayload2 = updatePayload) === null || _updatePayload2 === void 0 ? void 0 : (_updatePayload2$docum = _updatePayload2.documents) === null || _updatePayload2$docum === void 0 ? void 0 : _updatePayload2$docum.length) > 0 && combinedExistingDocs.length > 0) {
|
|
60081
|
-
updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, combinedExistingDocs);
|
|
60082
|
-
}
|
|
60083
|
-
if ((_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$Customization = _Digit2.Customizations) !== null && _Digit2$Customization !== void 0 && (_Digit2$Customization2 = _Digit2$Customization.WS) !== null && _Digit2$Customization2 !== void 0 && _Digit2$Customization2.customiseUpdatePayloadOfWS) {
|
|
60084
|
-
updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS(createdConnection, updatePayload, resolvedServiceType);
|
|
60109
|
+
onSuccess: function (data) {
|
|
60110
|
+
try {
|
|
60111
|
+
var _data$response, _data$response$data;
|
|
60112
|
+
if (data instanceof Error || data !== null && data !== void 0 && data.isAxiosError || data !== null && data !== void 0 && (_data$response = data.response) !== null && _data$response !== void 0 && (_data$response$data = _data$response.data) !== null && _data$response$data !== void 0 && _data$response$data.Errors) {
|
|
60113
|
+
var _data$response2, _data$response2$data, _apiErrors$2;
|
|
60114
|
+
setIsSubmitting(false);
|
|
60115
|
+
const apiErrors = data === null || data === void 0 ? void 0 : (_data$response2 = data.response) === null || _data$response2 === void 0 ? void 0 : (_data$response2$data = _data$response2.data) === null || _data$response2$data === void 0 ? void 0 : _data$response2$data.Errors;
|
|
60116
|
+
const errorMessage = (apiErrors === null || apiErrors === void 0 ? void 0 : (_apiErrors$2 = apiErrors[0]) === null || _apiErrors$2 === void 0 ? void 0 : _apiErrors$2.message) || (data === null || data === void 0 ? void 0 : data.message) || "Failed to submit application";
|
|
60117
|
+
setShowToast({
|
|
60118
|
+
key: "error",
|
|
60119
|
+
message: errorMessage
|
|
60120
|
+
});
|
|
60121
|
+
return Promise.resolve();
|
|
60085
60122
|
}
|
|
60086
|
-
|
|
60087
|
-
|
|
60088
|
-
reconnectRequest: false,
|
|
60089
|
-
disconnectRequest: false
|
|
60090
|
-
} : {
|
|
60091
|
-
SewerageConnection: updatePayload,
|
|
60092
|
-
reconnectRequest: false,
|
|
60093
|
-
disconnectRequest: false
|
|
60094
|
-
};
|
|
60095
|
-
updateMutation(reqDetailsUpdate, {
|
|
60096
|
-
onError: error => {
|
|
60097
|
-
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3;
|
|
60123
|
+
const _temp2 = function () {
|
|
60124
|
+
if (data !== null && data !== void 0 && data.Errors && data.Errors.length > 0) {
|
|
60098
60125
|
setIsSubmitting(false);
|
|
60099
60126
|
setShowToast({
|
|
60100
60127
|
key: "error",
|
|
60101
|
-
message:
|
|
60128
|
+
message: data.Errors[0].message || "Failed to submit application"
|
|
60102
60129
|
});
|
|
60103
|
-
}
|
|
60104
|
-
|
|
60105
|
-
|
|
60106
|
-
|
|
60107
|
-
|
|
60108
|
-
|
|
60109
|
-
|
|
60110
|
-
|
|
60111
|
-
|
|
60112
|
-
|
|
60113
|
-
|
|
60114
|
-
|
|
60115
|
-
|
|
60130
|
+
} else {
|
|
60131
|
+
var _data$WaterConnection, _data$SewerageConnect, _updatePayload2, _updatePayload2$docum, _Digit2, _Digit2$Customization, _Digit2$Customization2;
|
|
60132
|
+
const updateMutation = resolvedServiceType === "WATER" ? waterUpdateMutation : sewerageUpdateMutation;
|
|
60133
|
+
const createdConnection = resolvedServiceType === "WATER" ? data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0] : data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0];
|
|
60134
|
+
let updatePayload = {
|
|
60135
|
+
...createdConnection,
|
|
60136
|
+
dateEffectiveFrom: (createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.dateEffectiveFrom) || Date.now(),
|
|
60137
|
+
processInstance: {
|
|
60138
|
+
...(createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.processInstance),
|
|
60139
|
+
action: "APPLY_MUTATION"
|
|
60140
|
+
}
|
|
60141
|
+
};
|
|
60142
|
+
const combinedExistingDocs = [...existingDocs, ...((createdConnection === null || createdConnection === void 0 ? void 0 : createdConnection.documents) || [])];
|
|
60143
|
+
if (((_updatePayload2 = updatePayload) === null || _updatePayload2 === void 0 ? void 0 : (_updatePayload2$docum = _updatePayload2.documents) === null || _updatePayload2$docum === void 0 ? void 0 : _updatePayload2$docum.length) > 0 && combinedExistingDocs.length > 0) {
|
|
60144
|
+
updatePayload.documents = mapExistingDocIdsToPayload(updatePayload.documents, combinedExistingDocs);
|
|
60116
60145
|
}
|
|
60117
|
-
if (
|
|
60118
|
-
|
|
60119
|
-
key: "error",
|
|
60120
|
-
message: updateData.Errors[0].message || "Failed to update workflow"
|
|
60121
|
-
});
|
|
60122
|
-
return;
|
|
60146
|
+
if ((_Digit2 = Digit) !== null && _Digit2 !== void 0 && (_Digit2$Customization = _Digit2.Customizations) !== null && _Digit2$Customization !== void 0 && (_Digit2$Customization2 = _Digit2$Customization.WS) !== null && _Digit2$Customization2 !== void 0 && _Digit2$Customization2.customiseUpdatePayloadOfWS) {
|
|
60147
|
+
updatePayload = Digit.Customizations.WS.customiseUpdatePayloadOfWS(createdConnection, updatePayload, resolvedServiceType);
|
|
60123
60148
|
}
|
|
60124
|
-
|
|
60125
|
-
|
|
60126
|
-
|
|
60127
|
-
|
|
60128
|
-
|
|
60129
|
-
|
|
60130
|
-
|
|
60131
|
-
|
|
60132
|
-
|
|
60133
|
-
|
|
60149
|
+
let reqDetailsUpdate = resolvedServiceType === "WATER" ? {
|
|
60150
|
+
WaterConnection: updatePayload,
|
|
60151
|
+
reconnectRequest: false,
|
|
60152
|
+
disconnectRequest: false
|
|
60153
|
+
} : {
|
|
60154
|
+
SewerageConnection: updatePayload,
|
|
60155
|
+
reconnectRequest: false,
|
|
60156
|
+
disconnectRequest: false
|
|
60157
|
+
};
|
|
60158
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
60159
|
+
updateMutation(reqDetailsUpdate, {
|
|
60160
|
+
onError: error => {
|
|
60161
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3;
|
|
60162
|
+
setIsSubmitting(false);
|
|
60163
|
+
setShowToast({
|
|
60164
|
+
key: "error",
|
|
60165
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.Errors) === null || _error$response3$data2 === void 0 ? void 0 : (_error$response3$data3 = _error$response3$data2[0]) === null || _error$response3$data3 === void 0 ? void 0 : _error$response3$data3.message) || "Failed to update workflow"
|
|
60166
|
+
});
|
|
60167
|
+
},
|
|
60168
|
+
onSuccess: updateData => {
|
|
60169
|
+
var _updateData$response4, _updateData$response5, _updateData$WaterConn3, _updateData$WaterConn4, _updateData$SewerageC3, _updateData$SewerageC4;
|
|
60170
|
+
setIsSubmitting(false);
|
|
60171
|
+
if (updateData instanceof Error || updateData !== null && updateData !== void 0 && updateData.isAxiosError || updateData !== null && updateData !== void 0 && (_updateData$response4 = updateData.response) !== null && _updateData$response4 !== void 0 && (_updateData$response5 = _updateData$response4.data) !== null && _updateData$response5 !== void 0 && _updateData$response5.Errors) {
|
|
60172
|
+
var _updateData$response6, _updateData$response7, _apiErrors$3;
|
|
60173
|
+
const apiErrors = updateData === null || updateData === void 0 ? void 0 : (_updateData$response6 = updateData.response) === null || _updateData$response6 === void 0 ? void 0 : (_updateData$response7 = _updateData$response6.data) === null || _updateData$response7 === void 0 ? void 0 : _updateData$response7.Errors;
|
|
60174
|
+
const errorMessage = (apiErrors === null || apiErrors === void 0 ? void 0 : (_apiErrors$3 = apiErrors[0]) === null || _apiErrors$3 === void 0 ? void 0 : _apiErrors$3.message) || (updateData === null || updateData === void 0 ? void 0 : updateData.message) || "Failed to update workflow";
|
|
60175
|
+
setShowToast({
|
|
60176
|
+
key: "error",
|
|
60177
|
+
message: errorMessage
|
|
60178
|
+
});
|
|
60179
|
+
return;
|
|
60180
|
+
}
|
|
60181
|
+
if (updateData !== null && updateData !== void 0 && updateData.Errors && updateData.Errors.length > 0) {
|
|
60182
|
+
setShowToast({
|
|
60183
|
+
key: "error",
|
|
60184
|
+
message: updateData.Errors[0].message || "Failed to update workflow"
|
|
60185
|
+
});
|
|
60186
|
+
return;
|
|
60187
|
+
}
|
|
60188
|
+
clearSessionFormData();
|
|
60189
|
+
clearFormData();
|
|
60190
|
+
clearCompletedSteps();
|
|
60191
|
+
clearAuthKNumber();
|
|
60192
|
+
clearAuthMobileNumber();
|
|
60193
|
+
clearAuthServiceType();
|
|
60194
|
+
clearAuthActiveConnection();
|
|
60195
|
+
const newAppNo = resolvedServiceType === "WATER" ? updateData === null || updateData === void 0 ? void 0 : (_updateData$WaterConn3 = updateData.WaterConnection) === null || _updateData$WaterConn3 === void 0 ? void 0 : (_updateData$WaterConn4 = _updateData$WaterConn3[0]) === null || _updateData$WaterConn4 === void 0 ? void 0 : _updateData$WaterConn4.applicationNo : updateData === null || updateData === void 0 ? void 0 : (_updateData$SewerageC3 = updateData.SewerageConnections) === null || _updateData$SewerageC3 === void 0 ? void 0 : (_updateData$SewerageC4 = _updateData$SewerageC3[0]) === null || _updateData$SewerageC4 === void 0 ? void 0 : _updateData$SewerageC4.applicationNo;
|
|
60196
|
+
setGeneratedAppNo(newAppNo);
|
|
60197
|
+
history.push(`${path}/submission`);
|
|
60198
|
+
}
|
|
60199
|
+
});
|
|
60200
|
+
});
|
|
60134
60201
|
}
|
|
60135
|
-
});
|
|
60202
|
+
}();
|
|
60203
|
+
return Promise.resolve(_temp2 && _temp2.then ? _temp2.then(function () {}) : void 0);
|
|
60204
|
+
} catch (e) {
|
|
60205
|
+
return Promise.reject(e);
|
|
60136
60206
|
}
|
|
60137
60207
|
}
|
|
60138
60208
|
})).then(function () {});
|
|
@@ -62011,6 +62081,7 @@ const SearchWaterConnectionIntegrated = _ref => {
|
|
|
62011
62081
|
pageSizeLimit: getValues("limit"),
|
|
62012
62082
|
onSort: onSort,
|
|
62013
62083
|
disableSort: false,
|
|
62084
|
+
autoSort: false,
|
|
62014
62085
|
sortParams: [{
|
|
62015
62086
|
id: getValues("sortBy"),
|
|
62016
62087
|
desc: getValues("sortOrder") === "DESC" ? true : false
|
|
@@ -63045,66 +63116,70 @@ const OLDApplication = () => {
|
|
|
63045
63116
|
disconnectRequest: false,
|
|
63046
63117
|
reconnectRequest: false
|
|
63047
63118
|
};
|
|
63048
|
-
|
|
63049
|
-
|
|
63050
|
-
|
|
63051
|
-
|
|
63052
|
-
|
|
63053
|
-
|
|
63054
|
-
|
|
63055
|
-
|
|
63056
|
-
|
|
63057
|
-
|
|
63058
|
-
|
|
63059
|
-
|
|
63060
|
-
|
|
63061
|
-
|
|
63062
|
-
|
|
63063
|
-
|
|
63064
|
-
|
|
63065
|
-
|
|
63066
|
-
|
|
63067
|
-
},
|
|
63068
|
-
onSuccess: function (sewerageData) {
|
|
63069
|
-
try {
|
|
63070
|
-
var _sewerageData$Sewerag;
|
|
63071
|
-
return Promise.resolve(updatePayloadOfWS(sewerageData === null || sewerageData === void 0 ? void 0 : (_sewerageData$Sewerag = sewerageData.SewerageConnections) === null || _sewerageData$Sewerag === void 0 ? void 0 : _sewerageData$Sewerag[0], "SEWERAGE")).then(function (response) {
|
|
63072
|
-
let sewerageConnectionUpdate = {
|
|
63073
|
-
SewerageConnection: response,
|
|
63074
|
-
disconnectRequest: false,
|
|
63075
|
-
reconnectRequest: false
|
|
63076
|
-
};
|
|
63077
|
-
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
63078
|
-
onError: error => {
|
|
63079
|
-
var _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
|
|
63080
|
-
setIsEnableLoader(false);
|
|
63081
|
-
setShowToast({
|
|
63082
|
-
key: "error",
|
|
63083
|
-
message: (error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : (_error$response4$data3 = _error$response4$data2[0]) === null || _error$response4$data3 === void 0 ? void 0 : _error$response4$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63084
|
-
});
|
|
63085
|
-
},
|
|
63086
|
-
onSuccess: function (sewerageUpdateData) {
|
|
63087
|
-
try {
|
|
63088
|
-
var _waterUpdateData$Wate, _waterUpdateData$Wate2, _sewerageUpdateData$S, _sewerageUpdateData$S2;
|
|
63089
|
-
clearSessionFormData();
|
|
63090
|
-
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
63091
|
-
history.push(`${basePath}/ws-response?applicationNumber=${waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : (_waterUpdateData$Wate2 = _waterUpdateData$Wate[0]) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : _waterUpdateData$Wate2.applicationNo}&applicationNumber1=${sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : (_sewerageUpdateData$S2 = _sewerageUpdateData$S[0]) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : _sewerageUpdateData$S2.applicationNo}`);
|
|
63092
|
-
return Promise.resolve();
|
|
63093
|
-
} catch (e) {
|
|
63094
|
-
return Promise.reject(e);
|
|
63095
|
-
}
|
|
63096
|
-
}
|
|
63097
|
-
})).then(function () {});
|
|
63119
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
63120
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
63121
|
+
onError: error => {
|
|
63122
|
+
var _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
|
|
63123
|
+
setIsEnableLoader(false);
|
|
63124
|
+
setShowToast({
|
|
63125
|
+
key: "error",
|
|
63126
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : (_error$response2$data3 = _error$response2$data2[0]) === null || _error$response2$data3 === void 0 ? void 0 : _error$response2$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63127
|
+
});
|
|
63128
|
+
},
|
|
63129
|
+
onSuccess: function (waterUpdateData) {
|
|
63130
|
+
try {
|
|
63131
|
+
return Promise.resolve(sewerageMutation(sewerageConnection, {
|
|
63132
|
+
onError: error => {
|
|
63133
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3;
|
|
63134
|
+
setIsEnableLoader(false);
|
|
63135
|
+
setShowToast({
|
|
63136
|
+
key: "error",
|
|
63137
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : (_error$response3$data2 = _error$response3$data.Errors) === null || _error$response3$data2 === void 0 ? void 0 : (_error$response3$data3 = _error$response3$data2[0]) === null || _error$response3$data3 === void 0 ? void 0 : _error$response3$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63098
63138
|
});
|
|
63099
|
-
}
|
|
63100
|
-
|
|
63139
|
+
},
|
|
63140
|
+
onSuccess: function (sewerageData) {
|
|
63141
|
+
try {
|
|
63142
|
+
var _sewerageData$Sewerag;
|
|
63143
|
+
return Promise.resolve(updatePayloadOfWS(sewerageData === null || sewerageData === void 0 ? void 0 : (_sewerageData$Sewerag = sewerageData.SewerageConnections) === null || _sewerageData$Sewerag === void 0 ? void 0 : _sewerageData$Sewerag[0], "SEWERAGE")).then(function (response) {
|
|
63144
|
+
let sewerageConnectionUpdate = {
|
|
63145
|
+
SewerageConnection: response,
|
|
63146
|
+
disconnectRequest: false,
|
|
63147
|
+
reconnectRequest: false
|
|
63148
|
+
};
|
|
63149
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
63150
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
63151
|
+
onError: error => {
|
|
63152
|
+
var _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
|
|
63153
|
+
setIsEnableLoader(false);
|
|
63154
|
+
setShowToast({
|
|
63155
|
+
key: "error",
|
|
63156
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : (_error$response4$data3 = _error$response4$data2[0]) === null || _error$response4$data3 === void 0 ? void 0 : _error$response4$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63157
|
+
});
|
|
63158
|
+
},
|
|
63159
|
+
onSuccess: function (sewerageUpdateData) {
|
|
63160
|
+
try {
|
|
63161
|
+
var _waterUpdateData$Wate, _waterUpdateData$Wate2, _sewerageUpdateData$S, _sewerageUpdateData$S2;
|
|
63162
|
+
clearSessionFormData();
|
|
63163
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
63164
|
+
history.push(`${basePath}/ws-response?applicationNumber=${waterUpdateData === null || waterUpdateData === void 0 ? void 0 : (_waterUpdateData$Wate = waterUpdateData.WaterConnection) === null || _waterUpdateData$Wate === void 0 ? void 0 : (_waterUpdateData$Wate2 = _waterUpdateData$Wate[0]) === null || _waterUpdateData$Wate2 === void 0 ? void 0 : _waterUpdateData$Wate2.applicationNo}&applicationNumber1=${sewerageUpdateData === null || sewerageUpdateData === void 0 ? void 0 : (_sewerageUpdateData$S = sewerageUpdateData.SewerageConnections) === null || _sewerageUpdateData$S === void 0 ? void 0 : (_sewerageUpdateData$S2 = _sewerageUpdateData$S[0]) === null || _sewerageUpdateData$S2 === void 0 ? void 0 : _sewerageUpdateData$S2.applicationNo}`);
|
|
63165
|
+
return Promise.resolve();
|
|
63166
|
+
} catch (e) {
|
|
63167
|
+
return Promise.reject(e);
|
|
63168
|
+
}
|
|
63169
|
+
}
|
|
63170
|
+
})).then(function () {});
|
|
63171
|
+
});
|
|
63172
|
+
});
|
|
63173
|
+
} catch (e) {
|
|
63174
|
+
return Promise.reject(e);
|
|
63175
|
+
}
|
|
63101
63176
|
}
|
|
63102
|
-
}
|
|
63103
|
-
}
|
|
63104
|
-
|
|
63105
|
-
|
|
63177
|
+
})).then(function () {});
|
|
63178
|
+
} catch (e) {
|
|
63179
|
+
return Promise.reject(e);
|
|
63180
|
+
}
|
|
63106
63181
|
}
|
|
63107
|
-
}
|
|
63182
|
+
});
|
|
63108
63183
|
});
|
|
63109
63184
|
});
|
|
63110
63185
|
} catch (e) {
|
|
@@ -63138,22 +63213,24 @@ const OLDApplication = () => {
|
|
|
63138
63213
|
let waterConnectionUpdate = {
|
|
63139
63214
|
WaterConnection: response
|
|
63140
63215
|
};
|
|
63141
|
-
|
|
63142
|
-
|
|
63143
|
-
|
|
63144
|
-
|
|
63145
|
-
|
|
63146
|
-
|
|
63147
|
-
|
|
63148
|
-
|
|
63149
|
-
|
|
63150
|
-
|
|
63151
|
-
|
|
63152
|
-
|
|
63153
|
-
|
|
63154
|
-
|
|
63155
|
-
|
|
63156
|
-
|
|
63216
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
63217
|
+
waterUpdateMutation(waterConnectionUpdate, {
|
|
63218
|
+
onError: error => {
|
|
63219
|
+
var _error$response6, _error$response6$data, _error$response6$data2, _error$response6$data3;
|
|
63220
|
+
setIsEnableLoader(false);
|
|
63221
|
+
console.error("[WS] waterUpdateMutation error", error);
|
|
63222
|
+
setShowToast({
|
|
63223
|
+
key: "error",
|
|
63224
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : (_error$response6$data3 = _error$response6$data2[0]) === null || _error$response6$data3 === void 0 ? void 0 : _error$response6$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63225
|
+
});
|
|
63226
|
+
},
|
|
63227
|
+
onSuccess: data => {
|
|
63228
|
+
var _data$WaterConnection2, _data$WaterConnection3;
|
|
63229
|
+
clearSessionFormData();
|
|
63230
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
63231
|
+
history.push(`${basePath}/ws-response?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : (_data$WaterConnection3 = _data$WaterConnection2[0]) === null || _data$WaterConnection3 === void 0 ? void 0 : _data$WaterConnection3.applicationNo}`);
|
|
63232
|
+
}
|
|
63233
|
+
});
|
|
63157
63234
|
});
|
|
63158
63235
|
});
|
|
63159
63236
|
} catch (e) {
|
|
@@ -63187,23 +63264,25 @@ const OLDApplication = () => {
|
|
|
63187
63264
|
let sewerageConnectionUpdate = {
|
|
63188
63265
|
SewerageConnection: response
|
|
63189
63266
|
};
|
|
63190
|
-
return Promise.resolve(
|
|
63191
|
-
|
|
63192
|
-
|
|
63193
|
-
|
|
63194
|
-
|
|
63195
|
-
|
|
63196
|
-
|
|
63197
|
-
|
|
63198
|
-
|
|
63199
|
-
|
|
63200
|
-
|
|
63201
|
-
|
|
63202
|
-
|
|
63203
|
-
|
|
63204
|
-
|
|
63205
|
-
|
|
63206
|
-
|
|
63267
|
+
return Promise.resolve(new Promise(resolve => setTimeout(resolve, 5000))).then(function () {
|
|
63268
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
63269
|
+
onError: error => {
|
|
63270
|
+
var _error$response8, _error$response8$data, _error$response8$data2, _error$response8$data3;
|
|
63271
|
+
setIsEnableLoader(false);
|
|
63272
|
+
console.error("[WS] sewerageUpdateMutation error", error);
|
|
63273
|
+
setShowToast({
|
|
63274
|
+
key: "error",
|
|
63275
|
+
message: (error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : (_error$response8$data3 = _error$response8$data2[0]) === null || _error$response8$data3 === void 0 ? void 0 : _error$response8$data3.message) || (error === null || error === void 0 ? void 0 : error.message) || "ERR_UNKNOWN"
|
|
63276
|
+
});
|
|
63277
|
+
},
|
|
63278
|
+
onSuccess: data => {
|
|
63279
|
+
var _data$SewerageConnect2, _data$SewerageConnect3;
|
|
63280
|
+
clearSessionFormData();
|
|
63281
|
+
sessionStorage.removeItem("WS_OTP_VERIFIED_PROPERTY_ID");
|
|
63282
|
+
history.push(`${basePath}/ws-response?applicationNumber1=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : (_data$SewerageConnect3 = _data$SewerageConnect2[0]) === null || _data$SewerageConnect3 === void 0 ? void 0 : _data$SewerageConnect3.applicationNo}`);
|
|
63283
|
+
}
|
|
63284
|
+
})).then(function () {});
|
|
63285
|
+
});
|
|
63207
63286
|
});
|
|
63208
63287
|
} catch (e) {
|
|
63209
63288
|
return Promise.reject(e);
|