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