@djb25/digit-ui-module-ws 1.0.97 → 1.0.99
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 +1308 -634
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +1308 -634
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8,6 +8,7 @@ var digitUiReactComponents = require('@djb25/digit-ui-react-components');
|
|
|
8
8
|
var reactHookForm = require('react-hook-form');
|
|
9
9
|
var XLSX = require('xlsx');
|
|
10
10
|
var reactQuery = require('react-query');
|
|
11
|
+
var reactRouterDom_min = require('react-router-dom/cjs/react-router-dom.min');
|
|
11
12
|
|
|
12
13
|
const _iteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator")) : "@@iterator";
|
|
13
14
|
const _asyncIteratorSymbol = /*#__PURE__*/typeof Symbol !== "undefined" ? Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator")) : "@@asyncIterator";
|
|
@@ -1018,7 +1019,7 @@ const convertToSWUpdate = data => {
|
|
|
1018
1019
|
};
|
|
1019
1020
|
const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
1020
1021
|
try {
|
|
1021
|
-
var _Digit$UserService$ge8, _Digit$UserService$ge9, _storeData$applicatio, _storeData$applicatio2, _storeData$applicatio25, _storeData$applicatio26, _storeData$applicatio27, _storeData$applicatio28, _storeData$applicatio29, _storeData$applicatio30, _data$type, _data$type$value, _data$type2, _data$type2$value, _data$reason$value, _storeData$applicatio31, _storeData$applicatio32, _storeData$applicatio33, _storeData$applicatio34, _storeData$applicatio35, _storeData$applicatio36, _storeData$applicatio37, _storeData$applicatio38,
|
|
1022
|
+
var _Digit$UserService$ge8, _Digit$UserService$ge9, _storeData$applicatio, _storeData$applicatio2, _storeData$applicatio25, _storeData$applicatio26, _storeData$applicatio27, _storeData$applicatio28, _storeData$applicatio29, _storeData$applicatio30, _data$type, _data$type$value, _data$type2, _data$type2$value, _data$reason, _data$reason$value, _data$reason2, _data$reason3, _storeData$applicatio31, _storeData$applicatio32, _storeData$applicatio33, _storeData$applicatio34, _storeData$applicatio35, _storeData$applicatio36, _storeData$applicatio37, _storeData$applicatio38, _storeData$applicatio39, _storeData$applicatio40, _plumberInfo, _storeData$applicatio41, _storeData$applicatio42, _storeData$applicatio43, _storeData$applicatio44, _storeData$applicatio45, _storeData$applicatio46, _storeData$applicatio47, _storeData$applicatio48, _storeData$applicatio49, _storeData$applicatio54, _storeData$applicatio55, _storeData$applicatio56, _storeData$applicatio57, _storeData$applicatio58, _storeData$applicatio59, _data$type3, _data$type3$value, _data$reason4, _data$reason4$value, _data$reason5, _data$reason6, _storeData$applicatio60, _storeData$applicatio61, _storeData$applicatio62, _storeData$applicatio63, _storeData$applicatio64, _storeData$applicatio65, _storeData$applicatio66, _storeData$applicatio67, _plumberInfo2, _storeData$applicatio68, _storeData$applicatio69, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio72, _storeData$applicatio73, _storeData$applicatio74, _storeData$applicatio75, _Digit11, _Digit11$Customizatio, _Digit11$Customizatio2, _Digit12, _Digit12$Customizatio, _Digit12$Customizatio2;
|
|
1022
1023
|
const user = (_Digit$UserService$ge8 = Digit.UserService.getUser()) === null || _Digit$UserService$ge8 === void 0 ? void 0 : (_Digit$UserService$ge9 = _Digit$UserService$ge8.info) === null || _Digit$UserService$ge9 === void 0 ? void 0 : _Digit$UserService$ge9.type;
|
|
1023
1024
|
let plumberInfo = [];
|
|
1024
1025
|
if ((storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio = storeData.applicationData) === null || _storeData$applicatio === void 0 ? void 0 : (_storeData$applicatio2 = _storeData$applicatio.plumberInfo) === null || _storeData$applicatio2 === void 0 ? void 0 : _storeData$applicatio2.length) > 0) {
|
|
@@ -1042,28 +1043,28 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
|
1042
1043
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1043
1044
|
isdisconnection: true,
|
|
1044
1045
|
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type = data.type) === null || _data$type === void 0 ? void 0 : (_data$type$value = _data$type.value) === null || _data$type$value === void 0 ? void 0 : _data$type$value.code) === "Temporary" || (data === null || data === void 0 ? void 0 : (_data$type2 = data.type) === null || _data$type2 === void 0 ? void 0 : (_data$type2$value = _data$type2.value) === null || _data$type2$value === void 0 ? void 0 : _data$type2$value.code) === "TEMPORARY" ? true : false,
|
|
1045
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason
|
|
1046
|
-
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1046
|
+
disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason = data.reason) === null || _data$reason === void 0 ? void 0 : (_data$reason$value = _data$reason.value) === null || _data$reason$value === void 0 ? void 0 : _data$reason$value.code) || (data === null || data === void 0 ? void 0 : (_data$reason2 = data.reason) === null || _data$reason2 === void 0 ? void 0 : _data$reason2.value) || (data === null || data === void 0 ? void 0 : (_data$reason3 = data.reason) === null || _data$reason3 === void 0 ? void 0 : _data$reason3.code) || (data === null || data === void 0 ? void 0 : data.reason) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio31 = storeData.applicationData) === null || _storeData$applicatio31 === void 0 ? void 0 : _storeData$applicatio31.disconnectionReason),
|
|
1047
|
+
documents: (data === null || data === void 0 ? void 0 : data.documents) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio32 = storeData.applicationData) === null || _storeData$applicatio32 === void 0 ? void 0 : _storeData$applicatio32.documents),
|
|
1047
1048
|
water: true,
|
|
1048
1049
|
sewerage: false,
|
|
1049
|
-
proposedTaps: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1050
|
-
proposedPipeSize: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1050
|
+
proposedTaps: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio33 = storeData.applicationData) === null || _storeData$applicatio33 === void 0 ? void 0 : _storeData$applicatio33.proposedTaps) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio34 = storeData.applicationData) === null || _storeData$applicatio34 === void 0 ? void 0 : _storeData$applicatio34.proposedTaps),
|
|
1051
|
+
proposedPipeSize: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio35 = storeData.applicationData) === null || _storeData$applicatio35 === void 0 ? void 0 : (_storeData$applicatio36 = _storeData$applicatio35.proposedPipeSize) === null || _storeData$applicatio36 === void 0 ? void 0 : _storeData$applicatio36.size) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio37 = storeData.applicationData) === null || _storeData$applicatio37 === void 0 ? void 0 : (_storeData$applicatio38 = _storeData$applicatio37.proposedPipeSize) === null || _storeData$applicatio38 === void 0 ? void 0 : _storeData$applicatio38.size),
|
|
1051
1052
|
service: "Water",
|
|
1052
|
-
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1053
|
-
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1053
|
+
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio39 = storeData.applicationData) === null || _storeData$applicatio39 === void 0 ? void 0 : _storeData$applicatio39.property,
|
|
1054
|
+
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio40 = storeData.applicationData) === null || _storeData$applicatio40 === void 0 ? void 0 : _storeData$applicatio40.propertyId,
|
|
1054
1055
|
oldConnectionNo: null,
|
|
1055
1056
|
plumberInfo: ((_plumberInfo = plumberInfo) === null || _plumberInfo === void 0 ? void 0 : _plumberInfo.length) > 0 ? plumberInfo : null,
|
|
1056
|
-
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1057
|
+
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio41 = storeData.applicationData) === null || _storeData$applicatio41 === void 0 ? void 0 : _storeData$applicatio41.roadCuttingInfo,
|
|
1057
1058
|
roadCuttingArea: null,
|
|
1058
1059
|
roadType: null,
|
|
1059
|
-
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1060
|
-
noOfTaps: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1061
|
-
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1062
|
-
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1063
|
-
connectionType: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1064
|
-
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1060
|
+
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio42 = storeData.applicationData) === null || _storeData$applicatio42 === void 0 ? void 0 : _storeData$applicatio42.connectionExecutionDate,
|
|
1061
|
+
noOfTaps: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio43 = storeData.applicationData) === null || _storeData$applicatio43 === void 0 ? void 0 : _storeData$applicatio43.noOfTaps,
|
|
1062
|
+
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio44 = storeData.applicationData) === null || _storeData$applicatio44 === void 0 ? void 0 : _storeData$applicatio44.additionalDetails,
|
|
1063
|
+
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio45 = storeData.applicationData) === null || _storeData$applicatio45 === void 0 ? void 0 : _storeData$applicatio45.tenantId,
|
|
1064
|
+
connectionType: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio46 = storeData.applicationData) === null || _storeData$applicatio46 === void 0 ? void 0 : _storeData$applicatio46.connectionType) || null,
|
|
1065
|
+
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio47 = storeData.applicationData) === null || _storeData$applicatio47 === void 0 ? void 0 : _storeData$applicatio47.waterSource) || null,
|
|
1065
1066
|
processInstance: {
|
|
1066
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1067
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio48 = storeData.applicationData) === null || _storeData$applicatio48 === void 0 ? void 0 : _storeData$applicatio48.processInstance),
|
|
1067
1068
|
businessService: "DisconnectWSConnection",
|
|
1068
1069
|
action: "INITIATE"
|
|
1069
1070
|
},
|
|
@@ -1071,46 +1072,46 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
|
1071
1072
|
},
|
|
1072
1073
|
disconnectRequest: true
|
|
1073
1074
|
};
|
|
1074
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1075
|
-
var _storeData$
|
|
1076
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1077
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1075
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio49 = storeData.applicationData) !== null && _storeData$applicatio49 !== void 0 && _storeData$applicatio49.connectionType) {
|
|
1076
|
+
var _storeData$applicatio50, _storeData$applicatio51, _storeData$applicatio52, _storeData$applicatio53;
|
|
1077
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio50 = storeData.applicationData) !== null && _storeData$applicatio50 !== void 0 && _storeData$applicatio50.meterInstallationDate) wsPayload.WaterConnection.meterInstallationDate = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio51 = storeData.applicationData) === null || _storeData$applicatio51 === void 0 ? void 0 : _storeData$applicatio51.meterInstallationDate;
|
|
1078
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio52 = storeData.applicationData) !== null && _storeData$applicatio52 !== void 0 && _storeData$applicatio52.meterId) wsPayload.WaterConnection.meterId = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio53 = storeData.applicationData) === null || _storeData$applicatio53 === void 0 ? void 0 : _storeData$applicatio53.meterId;
|
|
1078
1079
|
}
|
|
1079
1080
|
let swPayload = {
|
|
1080
1081
|
SewerageConnection: {
|
|
1081
|
-
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1082
|
-
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1083
|
-
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1084
|
-
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1085
|
-
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1086
|
-
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1082
|
+
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio54 = storeData.applicationData) === null || _storeData$applicatio54 === void 0 ? void 0 : _storeData$applicatio54.id,
|
|
1083
|
+
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio55 = storeData.applicationData) === null || _storeData$applicatio55 === void 0 ? void 0 : _storeData$applicatio55.applicationNo,
|
|
1084
|
+
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio56 = storeData.applicationData) === null || _storeData$applicatio56 === void 0 ? void 0 : _storeData$applicatio56.applicationStatus,
|
|
1085
|
+
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio57 = storeData.applicationData) === null || _storeData$applicatio57 === void 0 ? void 0 : _storeData$applicatio57.status,
|
|
1086
|
+
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio58 = storeData.applicationData) === null || _storeData$applicatio58 === void 0 ? void 0 : _storeData$applicatio58.connectionNo,
|
|
1087
|
+
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio59 = storeData.applicationData) === null || _storeData$applicatio59 === void 0 ? void 0 : _storeData$applicatio59.connectionHolders,
|
|
1087
1088
|
applicationType: "DISCONNECT_SEWERAGE_CONNECTION",
|
|
1088
1089
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1089
1090
|
isdisconnection: true,
|
|
1090
1091
|
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type3 = data.type) === null || _data$type3 === void 0 ? void 0 : (_data$type3$value = _data$type3.value) === null || _data$type3$value === void 0 ? void 0 : _data$type3$value.code) === "Temporary" ? true : false,
|
|
1091
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$
|
|
1092
|
-
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1092
|
+
disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason4 = data.reason) === null || _data$reason4 === void 0 ? void 0 : (_data$reason4$value = _data$reason4.value) === null || _data$reason4$value === void 0 ? void 0 : _data$reason4$value.code) || (data === null || data === void 0 ? void 0 : (_data$reason5 = data.reason) === null || _data$reason5 === void 0 ? void 0 : _data$reason5.value) || (data === null || data === void 0 ? void 0 : (_data$reason6 = data.reason) === null || _data$reason6 === void 0 ? void 0 : _data$reason6.code) || (data === null || data === void 0 ? void 0 : data.reason) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio60 = storeData.applicationData) === null || _storeData$applicatio60 === void 0 ? void 0 : _storeData$applicatio60.disconnectionReason),
|
|
1093
|
+
documents: (data === null || data === void 0 ? void 0 : data.documents) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio61 = storeData.applicationData) === null || _storeData$applicatio61 === void 0 ? void 0 : _storeData$applicatio61.documents),
|
|
1093
1094
|
water: false,
|
|
1094
1095
|
sewerage: true,
|
|
1095
|
-
proposedWaterClosets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1096
|
-
proposedToilets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1096
|
+
proposedWaterClosets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio62 = storeData.applicationData) === null || _storeData$applicatio62 === void 0 ? void 0 : _storeData$applicatio62.proposedWaterClosets) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio63 = storeData.applicationData) === null || _storeData$applicatio63 === void 0 ? void 0 : _storeData$applicatio63.proposedWaterClosets),
|
|
1097
|
+
proposedToilets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio64 = storeData.applicationData) === null || _storeData$applicatio64 === void 0 ? void 0 : _storeData$applicatio64.proposedToilets) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio65 = storeData.applicationData) === null || _storeData$applicatio65 === void 0 ? void 0 : _storeData$applicatio65.proposedToilets),
|
|
1097
1098
|
service: "Sewerage",
|
|
1098
|
-
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1099
|
-
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1099
|
+
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio66 = storeData.applicationData) === null || _storeData$applicatio66 === void 0 ? void 0 : _storeData$applicatio66.property,
|
|
1100
|
+
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio67 = storeData.applicationData) === null || _storeData$applicatio67 === void 0 ? void 0 : _storeData$applicatio67.propertyId,
|
|
1100
1101
|
oldConnectionNo: null,
|
|
1101
1102
|
plumberInfo: ((_plumberInfo2 = plumberInfo) === null || _plumberInfo2 === void 0 ? void 0 : _plumberInfo2.length) > 0 ? plumberInfo : null,
|
|
1102
|
-
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1103
|
+
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio68 = storeData.applicationData) === null || _storeData$applicatio68 === void 0 ? void 0 : _storeData$applicatio68.roadCuttingInfo,
|
|
1103
1104
|
roadCuttingArea: null,
|
|
1104
1105
|
roadType: null,
|
|
1105
|
-
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1106
|
-
noOfWaterClosets: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1107
|
-
noOfToilets: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1108
|
-
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1109
|
-
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1106
|
+
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio69 = storeData.applicationData) === null || _storeData$applicatio69 === void 0 ? void 0 : _storeData$applicatio69.connectionExecutionDate,
|
|
1107
|
+
noOfWaterClosets: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio70 = storeData.applicationData) === null || _storeData$applicatio70 === void 0 ? void 0 : _storeData$applicatio70.noOfWaterClosets,
|
|
1108
|
+
noOfToilets: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio71 = storeData.applicationData) === null || _storeData$applicatio71 === void 0 ? void 0 : _storeData$applicatio71.noOfToilets,
|
|
1109
|
+
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio72 = storeData.applicationData) === null || _storeData$applicatio72 === void 0 ? void 0 : _storeData$applicatio72.additionalDetails,
|
|
1110
|
+
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio73 = storeData.applicationData) === null || _storeData$applicatio73 === void 0 ? void 0 : _storeData$applicatio73.tenantId,
|
|
1110
1111
|
connectionType: "Non Metered",
|
|
1111
|
-
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1112
|
+
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio74 = storeData.applicationData) === null || _storeData$applicatio74 === void 0 ? void 0 : _storeData$applicatio74.waterSource) || null,
|
|
1112
1113
|
processInstance: {
|
|
1113
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1114
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio75 = storeData.applicationData) === null || _storeData$applicatio75 === void 0 ? void 0 : _storeData$applicatio75.processInstance),
|
|
1114
1115
|
businessService: "DisconnectSWConnection",
|
|
1115
1116
|
action: "INITIATE"
|
|
1116
1117
|
},
|
|
@@ -1127,53 +1128,53 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
|
1127
1128
|
};
|
|
1128
1129
|
const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
1129
1130
|
try {
|
|
1130
|
-
var _Digit$UserService$ge0, _Digit$UserService$ge1, _storeData$
|
|
1131
|
+
var _Digit$UserService$ge0, _Digit$UserService$ge1, _storeData$applicatio76, _storeData$applicatio77, _storeData$applicatio102, _storeData$applicatio103, _storeData$applicatio104, _storeData$applicatio105, _storeData$applicatio106, _storeData$applicatio107, _data$reason7, _data$reason7$value, _data$reason8, _data$reason9, _data$reason0, _storeData$applicatio108, _storeData$applicatio109, _storeData$applicatio110, _storeData$applicatio111, _storeData$applicatio112, _storeData$applicatio113, _storeData$applicatio114, _storeData$applicatio115, _plumberInfo3, _storeData$applicatio116, _storeData$applicatio117, _storeData$applicatio118, _storeData$applicatio119, _storeData$applicatio120, _storeData$applicatio121, _storeData$applicatio122, _storeData$applicatio123, _storeData$applicatio124, _storeData$applicatio129, _storeData$applicatio130, _storeData$applicatio131, _storeData$applicatio132, _storeData$applicatio133, _storeData$applicatio134, _data$reason1, _data$reason1$value, _data$reason10, _data$reason11, _data$reason12, _storeData$applicatio135, _storeData$applicatio136, _storeData$applicatio137, _storeData$applicatio138, _storeData$applicatio139, _storeData$applicatio140, _plumberInfo4, _storeData$applicatio141, _storeData$applicatio142, _storeData$applicatio143, _storeData$applicatio144, _storeData$applicatio145, _storeData$applicatio146, _storeData$applicatio147, _storeData$applicatio148;
|
|
1131
1132
|
const user = (_Digit$UserService$ge0 = Digit.UserService.getUser()) === null || _Digit$UserService$ge0 === void 0 ? void 0 : (_Digit$UserService$ge1 = _Digit$UserService$ge0.info) === null || _Digit$UserService$ge1 === void 0 ? void 0 : _Digit$UserService$ge1.type;
|
|
1132
1133
|
let plumberInfo = [];
|
|
1133
|
-
if ((storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1134
|
-
var _storeData$
|
|
1134
|
+
if ((storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio76 = storeData.applicationData) === null || _storeData$applicatio76 === void 0 ? void 0 : (_storeData$applicatio77 = _storeData$applicatio76.plumberInfo) === null || _storeData$applicatio77 === void 0 ? void 0 : _storeData$applicatio77.length) > 0) {
|
|
1135
|
+
var _storeData$applicatio78, _storeData$applicatio79, _storeData$applicatio80, _storeData$applicatio81, _storeData$applicatio82, _storeData$applicatio83, _storeData$applicatio84, _storeData$applicatio85, _storeData$applicatio86, _storeData$applicatio87, _storeData$applicatio88, _storeData$applicatio89, _storeData$applicatio90, _storeData$applicatio91, _storeData$applicatio92, _storeData$applicatio93, _storeData$applicatio94, _storeData$applicatio95, _storeData$applicatio96, _storeData$applicatio97, _storeData$applicatio98, _storeData$applicatio99, _storeData$applicatio100, _storeData$applicatio101;
|
|
1135
1136
|
let plumberInfoData = {};
|
|
1136
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1137
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1138
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1139
|
-
if (storeData !== null && storeData !== void 0 && (_storeData$
|
|
1137
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio78 = storeData.applicationData) !== null && _storeData$applicatio78 !== void 0 && (_storeData$applicatio79 = _storeData$applicatio78.plumberInfo) !== null && _storeData$applicatio79 !== void 0 && (_storeData$applicatio80 = _storeData$applicatio79[0]) !== null && _storeData$applicatio80 !== void 0 && _storeData$applicatio80.licenseNo) plumberInfoData.licenseNo = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio81 = storeData.applicationData) === null || _storeData$applicatio81 === void 0 ? void 0 : (_storeData$applicatio82 = _storeData$applicatio81.plumberInfo) === null || _storeData$applicatio82 === void 0 ? void 0 : (_storeData$applicatio83 = _storeData$applicatio82[0]) === null || _storeData$applicatio83 === void 0 ? void 0 : _storeData$applicatio83.licenseNo;
|
|
1138
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio84 = storeData.applicationData) !== null && _storeData$applicatio84 !== void 0 && (_storeData$applicatio85 = _storeData$applicatio84.plumberInfo) !== null && _storeData$applicatio85 !== void 0 && (_storeData$applicatio86 = _storeData$applicatio85[0]) !== null && _storeData$applicatio86 !== void 0 && _storeData$applicatio86.mobileNumber) plumberInfoData.mobileNumber = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio87 = storeData.applicationData) === null || _storeData$applicatio87 === void 0 ? void 0 : (_storeData$applicatio88 = _storeData$applicatio87.plumberInfo) === null || _storeData$applicatio88 === void 0 ? void 0 : (_storeData$applicatio89 = _storeData$applicatio88[0]) === null || _storeData$applicatio89 === void 0 ? void 0 : _storeData$applicatio89.mobileNumber;
|
|
1139
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio90 = storeData.applicationData) !== null && _storeData$applicatio90 !== void 0 && (_storeData$applicatio91 = _storeData$applicatio90.plumberInfo) !== null && _storeData$applicatio91 !== void 0 && (_storeData$applicatio92 = _storeData$applicatio91[0]) !== null && _storeData$applicatio92 !== void 0 && _storeData$applicatio92.id) plumberInfoData.id = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio93 = storeData.applicationData) === null || _storeData$applicatio93 === void 0 ? void 0 : (_storeData$applicatio94 = _storeData$applicatio93.plumberInfo) === null || _storeData$applicatio94 === void 0 ? void 0 : (_storeData$applicatio95 = _storeData$applicatio94[0]) === null || _storeData$applicatio95 === void 0 ? void 0 : _storeData$applicatio95.id;
|
|
1140
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio96 = storeData.applicationData) !== null && _storeData$applicatio96 !== void 0 && (_storeData$applicatio97 = _storeData$applicatio96.plumberInfo) !== null && _storeData$applicatio97 !== void 0 && (_storeData$applicatio98 = _storeData$applicatio97[0]) !== null && _storeData$applicatio98 !== void 0 && _storeData$applicatio98.name) plumberInfoData.name = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio99 = storeData.applicationData) === null || _storeData$applicatio99 === void 0 ? void 0 : (_storeData$applicatio100 = _storeData$applicatio99.plumberInfo) === null || _storeData$applicatio100 === void 0 ? void 0 : (_storeData$applicatio101 = _storeData$applicatio100[0]) === null || _storeData$applicatio101 === void 0 ? void 0 : _storeData$applicatio101.name;
|
|
1140
1141
|
plumberInfo = [plumberInfoData];
|
|
1141
1142
|
}
|
|
1142
1143
|
let wsPayload = {
|
|
1143
1144
|
WaterConnection: {
|
|
1144
|
-
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1145
|
-
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1146
|
-
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1147
|
-
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1148
|
-
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1149
|
-
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1145
|
+
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio102 = storeData.applicationData) === null || _storeData$applicatio102 === void 0 ? void 0 : _storeData$applicatio102.id,
|
|
1146
|
+
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio103 = storeData.applicationData) === null || _storeData$applicatio103 === void 0 ? void 0 : _storeData$applicatio103.applicationNo,
|
|
1147
|
+
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio104 = storeData.applicationData) === null || _storeData$applicatio104 === void 0 ? void 0 : _storeData$applicatio104.applicationStatus,
|
|
1148
|
+
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio105 = storeData.applicationData) === null || _storeData$applicatio105 === void 0 ? void 0 : _storeData$applicatio105.status,
|
|
1149
|
+
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio106 = storeData.applicationData) === null || _storeData$applicatio106 === void 0 ? void 0 : _storeData$applicatio106.connectionNo,
|
|
1150
|
+
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio107 = storeData.applicationData) === null || _storeData$applicatio107 === void 0 ? void 0 : _storeData$applicatio107.connectionHolders,
|
|
1150
1151
|
applicationType: "WATER_RECONNECTION",
|
|
1151
1152
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1152
1153
|
isdisconnection: false,
|
|
1153
1154
|
isDisconnectionTemporary: true,
|
|
1154
|
-
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$
|
|
1155
|
+
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason7 = data.reason) === null || _data$reason7 === void 0 ? void 0 : (_data$reason7$value = _data$reason7.value) === null || _data$reason7$value === void 0 ? void 0 : _data$reason7$value.code) || (typeof (data === null || data === void 0 ? void 0 : (_data$reason8 = data.reason) === null || _data$reason8 === void 0 ? void 0 : _data$reason8.value) === "string" ? data === null || data === void 0 ? void 0 : (_data$reason9 = data.reason) === null || _data$reason9 === void 0 ? void 0 : _data$reason9.value : null) || (typeof (data === null || data === void 0 ? void 0 : data.reason) === "string" ? data === null || data === void 0 ? void 0 : data.reason : null) || (data === null || data === void 0 ? void 0 : (_data$reason0 = data.reason) === null || _data$reason0 === void 0 ? void 0 : _data$reason0.code) || "",
|
|
1155
1156
|
disconnectionReason: "",
|
|
1156
1157
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1157
1158
|
water: true,
|
|
1158
1159
|
sewerage: false,
|
|
1159
|
-
proposedTaps: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1160
|
-
proposedPipeSize: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1160
|
+
proposedTaps: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio108 = storeData.applicationData) === null || _storeData$applicatio108 === void 0 ? void 0 : _storeData$applicatio108.proposedTaps) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio109 = storeData.applicationData) === null || _storeData$applicatio109 === void 0 ? void 0 : _storeData$applicatio109.proposedTaps),
|
|
1161
|
+
proposedPipeSize: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio110 = storeData.applicationData) === null || _storeData$applicatio110 === void 0 ? void 0 : (_storeData$applicatio111 = _storeData$applicatio110.proposedPipeSize) === null || _storeData$applicatio111 === void 0 ? void 0 : _storeData$applicatio111.size) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio112 = storeData.applicationData) === null || _storeData$applicatio112 === void 0 ? void 0 : (_storeData$applicatio113 = _storeData$applicatio112.proposedPipeSize) === null || _storeData$applicatio113 === void 0 ? void 0 : _storeData$applicatio113.size),
|
|
1161
1162
|
service: "Water",
|
|
1162
|
-
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1163
|
-
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1163
|
+
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio114 = storeData.applicationData) === null || _storeData$applicatio114 === void 0 ? void 0 : _storeData$applicatio114.property,
|
|
1164
|
+
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio115 = storeData.applicationData) === null || _storeData$applicatio115 === void 0 ? void 0 : _storeData$applicatio115.propertyId,
|
|
1164
1165
|
oldConnectionNo: null,
|
|
1165
1166
|
plumberInfo: ((_plumberInfo3 = plumberInfo) === null || _plumberInfo3 === void 0 ? void 0 : _plumberInfo3.length) > 0 ? plumberInfo : null,
|
|
1166
|
-
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1167
|
+
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio116 = storeData.applicationData) === null || _storeData$applicatio116 === void 0 ? void 0 : _storeData$applicatio116.roadCuttingInfo,
|
|
1167
1168
|
roadCuttingArea: null,
|
|
1168
1169
|
roadType: null,
|
|
1169
|
-
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1170
|
-
noOfTaps: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1171
|
-
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1172
|
-
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1173
|
-
connectionType: storeData.applicationData.connectionType || null,
|
|
1174
|
-
waterSource: storeData.applicationData.waterSource || null,
|
|
1170
|
+
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio117 = storeData.applicationData) === null || _storeData$applicatio117 === void 0 ? void 0 : _storeData$applicatio117.connectionExecutionDate,
|
|
1171
|
+
noOfTaps: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio118 = storeData.applicationData) === null || _storeData$applicatio118 === void 0 ? void 0 : _storeData$applicatio118.noOfTaps,
|
|
1172
|
+
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio119 = storeData.applicationData) === null || _storeData$applicatio119 === void 0 ? void 0 : _storeData$applicatio119.additionalDetails,
|
|
1173
|
+
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio120 = storeData.applicationData) === null || _storeData$applicatio120 === void 0 ? void 0 : _storeData$applicatio120.tenantId,
|
|
1174
|
+
connectionType: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio121 = storeData.applicationData) === null || _storeData$applicatio121 === void 0 ? void 0 : _storeData$applicatio121.connectionType) || null,
|
|
1175
|
+
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio122 = storeData.applicationData) === null || _storeData$applicatio122 === void 0 ? void 0 : _storeData$applicatio122.waterSource) || null,
|
|
1175
1176
|
processInstance: {
|
|
1176
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1177
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio123 = storeData.applicationData) === null || _storeData$applicatio123 === void 0 ? void 0 : _storeData$applicatio123.processInstance),
|
|
1177
1178
|
action: "INITIATE",
|
|
1178
1179
|
businessService: "WSReconnection"
|
|
1179
1180
|
},
|
|
@@ -1181,46 +1182,47 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1181
1182
|
},
|
|
1182
1183
|
disconnectRequest: false
|
|
1183
1184
|
};
|
|
1184
|
-
if (storeData.applicationData.connectionType) {
|
|
1185
|
-
|
|
1186
|
-
if (storeData.applicationData.
|
|
1185
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio124 = storeData.applicationData) !== null && _storeData$applicatio124 !== void 0 && _storeData$applicatio124.connectionType) {
|
|
1186
|
+
var _storeData$applicatio125, _storeData$applicatio126, _storeData$applicatio127, _storeData$applicatio128;
|
|
1187
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio125 = storeData.applicationData) !== null && _storeData$applicatio125 !== void 0 && _storeData$applicatio125.meterInstallationDate) wsPayload.WaterConnection.meterInstallationDate = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio126 = storeData.applicationData) === null || _storeData$applicatio126 === void 0 ? void 0 : _storeData$applicatio126.meterInstallationDate;
|
|
1188
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio127 = storeData.applicationData) !== null && _storeData$applicatio127 !== void 0 && _storeData$applicatio127.meterId) wsPayload.WaterConnection.meterId = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio128 = storeData.applicationData) === null || _storeData$applicatio128 === void 0 ? void 0 : _storeData$applicatio128.meterId;
|
|
1187
1189
|
}
|
|
1188
1190
|
let swPayload = {
|
|
1189
1191
|
SewerageConnection: {
|
|
1190
|
-
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1191
|
-
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1192
|
-
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1193
|
-
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1194
|
-
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1195
|
-
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1192
|
+
id: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio129 = storeData.applicationData) === null || _storeData$applicatio129 === void 0 ? void 0 : _storeData$applicatio129.id,
|
|
1193
|
+
applicationNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio130 = storeData.applicationData) === null || _storeData$applicatio130 === void 0 ? void 0 : _storeData$applicatio130.applicationNo,
|
|
1194
|
+
applicationStatus: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio131 = storeData.applicationData) === null || _storeData$applicatio131 === void 0 ? void 0 : _storeData$applicatio131.applicationStatus,
|
|
1195
|
+
status: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio132 = storeData.applicationData) === null || _storeData$applicatio132 === void 0 ? void 0 : _storeData$applicatio132.status,
|
|
1196
|
+
connectionNo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio133 = storeData.applicationData) === null || _storeData$applicatio133 === void 0 ? void 0 : _storeData$applicatio133.connectionNo,
|
|
1197
|
+
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio134 = storeData.applicationData) === null || _storeData$applicatio134 === void 0 ? void 0 : _storeData$applicatio134.connectionHolders,
|
|
1196
1198
|
applicationType: "WATER_RECONNECTION",
|
|
1197
1199
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1198
1200
|
isdisconnection: false,
|
|
1199
1201
|
isDisconnectionTemporary: true,
|
|
1200
|
-
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$
|
|
1202
|
+
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason1 = data.reason) === null || _data$reason1 === void 0 ? void 0 : (_data$reason1$value = _data$reason1.value) === null || _data$reason1$value === void 0 ? void 0 : _data$reason1$value.code) || (typeof (data === null || data === void 0 ? void 0 : (_data$reason10 = data.reason) === null || _data$reason10 === void 0 ? void 0 : _data$reason10.value) === "string" ? data === null || data === void 0 ? void 0 : (_data$reason11 = data.reason) === null || _data$reason11 === void 0 ? void 0 : _data$reason11.value : null) || (typeof (data === null || data === void 0 ? void 0 : data.reason) === "string" ? data === null || data === void 0 ? void 0 : data.reason : null) || (data === null || data === void 0 ? void 0 : (_data$reason12 = data.reason) === null || _data$reason12 === void 0 ? void 0 : _data$reason12.code) || "",
|
|
1201
1203
|
disconnectionReason: "",
|
|
1202
1204
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1203
1205
|
water: false,
|
|
1204
1206
|
sewerage: true,
|
|
1205
|
-
proposedWaterClosets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1206
|
-
proposedToilets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1207
|
+
proposedWaterClosets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio135 = storeData.applicationData) === null || _storeData$applicatio135 === void 0 ? void 0 : _storeData$applicatio135.proposedWaterClosets) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio136 = storeData.applicationData) === null || _storeData$applicatio136 === void 0 ? void 0 : _storeData$applicatio136.proposedWaterClosets),
|
|
1208
|
+
proposedToilets: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio137 = storeData.applicationData) === null || _storeData$applicatio137 === void 0 ? void 0 : _storeData$applicatio137.proposedToilets) && Number(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio138 = storeData.applicationData) === null || _storeData$applicatio138 === void 0 ? void 0 : _storeData$applicatio138.proposedToilets),
|
|
1207
1209
|
service: "Sewerage",
|
|
1208
|
-
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1209
|
-
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1210
|
+
property: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio139 = storeData.applicationData) === null || _storeData$applicatio139 === void 0 ? void 0 : _storeData$applicatio139.property,
|
|
1211
|
+
propertyId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio140 = storeData.applicationData) === null || _storeData$applicatio140 === void 0 ? void 0 : _storeData$applicatio140.propertyId,
|
|
1210
1212
|
oldConnectionNo: null,
|
|
1211
1213
|
plumberInfo: ((_plumberInfo4 = plumberInfo) === null || _plumberInfo4 === void 0 ? void 0 : _plumberInfo4.length) > 0 ? plumberInfo : null,
|
|
1212
|
-
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1214
|
+
roadCuttingInfo: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio141 = storeData.applicationData) === null || _storeData$applicatio141 === void 0 ? void 0 : _storeData$applicatio141.roadCuttingInfo,
|
|
1213
1215
|
roadCuttingArea: null,
|
|
1214
1216
|
roadType: null,
|
|
1215
|
-
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1216
|
-
noOfWaterClosets: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1217
|
-
noOfToilets: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1218
|
-
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1219
|
-
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1217
|
+
connectionExecutionDate: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio142 = storeData.applicationData) === null || _storeData$applicatio142 === void 0 ? void 0 : _storeData$applicatio142.connectionExecutionDate,
|
|
1218
|
+
noOfWaterClosets: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio143 = storeData.applicationData) === null || _storeData$applicatio143 === void 0 ? void 0 : _storeData$applicatio143.noOfWaterClosets,
|
|
1219
|
+
noOfToilets: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio144 = storeData.applicationData) === null || _storeData$applicatio144 === void 0 ? void 0 : _storeData$applicatio144.noOfToilets,
|
|
1220
|
+
additionalDetails: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio145 = storeData.applicationData) === null || _storeData$applicatio145 === void 0 ? void 0 : _storeData$applicatio145.additionalDetails,
|
|
1221
|
+
tenantId: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio146 = storeData.applicationData) === null || _storeData$applicatio146 === void 0 ? void 0 : _storeData$applicatio146.tenantId,
|
|
1220
1222
|
connectionType: "Non Metered",
|
|
1221
|
-
waterSource: storeData.applicationData.waterSource || null,
|
|
1223
|
+
waterSource: (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio147 = storeData.applicationData) === null || _storeData$applicatio147 === void 0 ? void 0 : _storeData$applicatio147.waterSource) || null,
|
|
1222
1224
|
processInstance: {
|
|
1223
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1225
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio148 = storeData.applicationData) === null || _storeData$applicatio148 === void 0 ? void 0 : _storeData$applicatio148.processInstance),
|
|
1224
1226
|
action: "INITIATE",
|
|
1225
1227
|
businessService: "SWReconnection"
|
|
1226
1228
|
},
|
|
@@ -1236,43 +1238,51 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1236
1238
|
};
|
|
1237
1239
|
const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
|
|
1238
1240
|
try {
|
|
1239
|
-
var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type4, _data$type4$value, _data$
|
|
1241
|
+
var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type4, _data$type4$value, _data$reason13, _data$reason13$value, _data$reason14, _data$reason15, _storeData$applicatio149, _storeData$applicatio150, _storeData$applicatio151, _storeData$applicatio152, _data$type5, _data$type5$value, _data$reason16, _data$reason16$value, _data$reason17, _data$reason18, _storeData$applicatio157, _storeData$applicatio158, _storeData$applicatio159, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2;
|
|
1240
1242
|
const user = (_Digit$UserService$ge10 = Digit.UserService.getUser()) === null || _Digit$UserService$ge10 === void 0 ? void 0 : (_Digit$UserService$ge11 = _Digit$UserService$ge10.info) === null || _Digit$UserService$ge11 === void 0 ? void 0 : _Digit$UserService$ge11.type;
|
|
1241
1243
|
let wsPayload = {
|
|
1242
1244
|
WaterConnection: {
|
|
1243
1245
|
...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
|
|
1246
|
+
applicationType: "DISCONNECT_WATER_CONNECTION",
|
|
1247
|
+
applicationStatus: "RESUBMIT_APPLICATION",
|
|
1244
1248
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1249
|
+
isdisconnection: true,
|
|
1245
1250
|
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type4 = data.type) === null || _data$type4 === void 0 ? void 0 : (_data$type4$value = _data$type4.value) === null || _data$type4$value === void 0 ? void 0 : _data$type4$value.code) === "Temporary" ? true : false,
|
|
1246
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$
|
|
1247
|
-
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1251
|
+
disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason13 = data.reason) === null || _data$reason13 === void 0 ? void 0 : (_data$reason13$value = _data$reason13.value) === null || _data$reason13$value === void 0 ? void 0 : _data$reason13$value.code) || (data === null || data === void 0 ? void 0 : (_data$reason14 = data.reason) === null || _data$reason14 === void 0 ? void 0 : _data$reason14.value) || (data === null || data === void 0 ? void 0 : (_data$reason15 = data.reason) === null || _data$reason15 === void 0 ? void 0 : _data$reason15.code) || (data === null || data === void 0 ? void 0 : data.reason) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio149 = storeData.applicationData) === null || _storeData$applicatio149 === void 0 ? void 0 : _storeData$applicatio149.disconnectionReason),
|
|
1252
|
+
documents: (data === null || data === void 0 ? void 0 : data.documents) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio150 = storeData.applicationData) === null || _storeData$applicatio150 === void 0 ? void 0 : _storeData$applicatio150.documents),
|
|
1248
1253
|
water: true,
|
|
1249
1254
|
sewerage: false,
|
|
1250
1255
|
service: "Water",
|
|
1251
1256
|
processInstance: {
|
|
1252
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1257
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio151 = storeData.applicationData) === null || _storeData$applicatio151 === void 0 ? void 0 : _storeData$applicatio151.processInstance),
|
|
1258
|
+
businessService: "DisconnectWSConnection",
|
|
1253
1259
|
action: "RESUBMIT_APPLICATION"
|
|
1254
1260
|
},
|
|
1255
1261
|
channel: (user === null || user === void 0 ? void 0 : user.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER"
|
|
1256
1262
|
},
|
|
1257
1263
|
disconnectRequest: true
|
|
1258
1264
|
};
|
|
1259
|
-
if (storeData.applicationData.connectionType) {
|
|
1260
|
-
|
|
1261
|
-
if (storeData.applicationData.
|
|
1265
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio152 = storeData.applicationData) !== null && _storeData$applicatio152 !== void 0 && _storeData$applicatio152.connectionType) {
|
|
1266
|
+
var _storeData$applicatio153, _storeData$applicatio154, _storeData$applicatio155, _storeData$applicatio156;
|
|
1267
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio153 = storeData.applicationData) !== null && _storeData$applicatio153 !== void 0 && _storeData$applicatio153.meterInstallationDate) wsPayload.WaterConnection.meterInstallationDate = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio154 = storeData.applicationData) === null || _storeData$applicatio154 === void 0 ? void 0 : _storeData$applicatio154.meterInstallationDate;
|
|
1268
|
+
if (storeData !== null && storeData !== void 0 && (_storeData$applicatio155 = storeData.applicationData) !== null && _storeData$applicatio155 !== void 0 && _storeData$applicatio155.meterId) wsPayload.WaterConnection.meterId = storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio156 = storeData.applicationData) === null || _storeData$applicatio156 === void 0 ? void 0 : _storeData$applicatio156.meterId;
|
|
1262
1269
|
}
|
|
1263
1270
|
let swPayload = {
|
|
1264
1271
|
SewerageConnection: {
|
|
1265
1272
|
...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
|
|
1273
|
+
applicationType: "DISCONNECT_SEWERAGE_CONNECTION",
|
|
1274
|
+
applicationStatus: "RESUBMIT_APPLICATION",
|
|
1266
1275
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1267
1276
|
isdisconnection: true,
|
|
1268
1277
|
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type5 = data.type) === null || _data$type5 === void 0 ? void 0 : (_data$type5$value = _data$type5.value) === null || _data$type5$value === void 0 ? void 0 : _data$type5$value.code) === "Temporary" ? true : false,
|
|
1269
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$
|
|
1270
|
-
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1278
|
+
disconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason16 = data.reason) === null || _data$reason16 === void 0 ? void 0 : (_data$reason16$value = _data$reason16.value) === null || _data$reason16$value === void 0 ? void 0 : _data$reason16$value.code) || (data === null || data === void 0 ? void 0 : (_data$reason17 = data.reason) === null || _data$reason17 === void 0 ? void 0 : _data$reason17.value) || (data === null || data === void 0 ? void 0 : (_data$reason18 = data.reason) === null || _data$reason18 === void 0 ? void 0 : _data$reason18.code) || (data === null || data === void 0 ? void 0 : data.reason) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio157 = storeData.applicationData) === null || _storeData$applicatio157 === void 0 ? void 0 : _storeData$applicatio157.disconnectionReason),
|
|
1279
|
+
documents: (data === null || data === void 0 ? void 0 : data.documents) || (storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio158 = storeData.applicationData) === null || _storeData$applicatio158 === void 0 ? void 0 : _storeData$applicatio158.documents),
|
|
1271
1280
|
water: false,
|
|
1272
1281
|
sewerage: true,
|
|
1273
1282
|
service: "Sewerage",
|
|
1274
1283
|
processInstance: {
|
|
1275
|
-
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$
|
|
1284
|
+
...(storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio159 = storeData.applicationData) === null || _storeData$applicatio159 === void 0 ? void 0 : _storeData$applicatio159.processInstance),
|
|
1285
|
+
businessService: "DisconnectSWConnection",
|
|
1276
1286
|
action: "RESUBMIT_APPLICATION"
|
|
1277
1287
|
},
|
|
1278
1288
|
channel: (user === null || user === void 0 ? void 0 : user.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER"
|
|
@@ -1309,25 +1319,15 @@ const updatePayloadOfWSDisconnection = function (data, type) {
|
|
|
1309
1319
|
}
|
|
1310
1320
|
};
|
|
1311
1321
|
const updatePayloadOfWSRestoration = function (data, type) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
...
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
id: null
|
|
1319
|
-
}] : data === null || data === void 0 ? void 0 : data.plumberInfo,
|
|
1320
|
-
applicationType: type === "WATER" ? "WATER_RECONNECTION" : "SEWERAGE_RECONNECTION",
|
|
1321
|
-
processInstance: {
|
|
1322
|
-
...(data === null || data === void 0 ? void 0 : data.processInstance),
|
|
1323
|
-
businessService: type === "WATER" ? "WSReconnection" : "SWReconnection",
|
|
1324
|
-
action: "SUBMIT_APPLICATION"
|
|
1325
|
-
}
|
|
1322
|
+
return Promise.resolve(updatePayloadOfWSDisconnection(data, type)).then(function (payload) {
|
|
1323
|
+
payload.applicationType = type === "WATER" ? "WATER_RECONNECTION" : "SEWERAGE_RECONNECTION";
|
|
1324
|
+
payload.processInstance = {
|
|
1325
|
+
...payload.processInstance,
|
|
1326
|
+
businessService: type === "WATER" ? "WSReconnection" : "SWReconnection",
|
|
1327
|
+
action: "SUBMIT_APPLICATION"
|
|
1326
1328
|
};
|
|
1327
|
-
return
|
|
1328
|
-
}
|
|
1329
|
-
return Promise.reject(e);
|
|
1330
|
-
}
|
|
1329
|
+
return payload;
|
|
1330
|
+
});
|
|
1331
1331
|
};
|
|
1332
1332
|
const getOwnersforPDF = (property, t) => {
|
|
1333
1333
|
var _property$owners;
|
|
@@ -8254,10 +8254,11 @@ const WSMyApplications = () => {
|
|
|
8254
8254
|
let {
|
|
8255
8255
|
row
|
|
8256
8256
|
} = _ref3;
|
|
8257
|
-
const
|
|
8257
|
+
const getFullName = holder => `${(holder === null || holder === void 0 ? void 0 : holder.name) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.middleName) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.lastName) || ""}`.replace(/\s+/g, " ").trim();
|
|
8258
|
+
const names = ((_row$original4 = row.original) === null || _row$original4 === void 0 ? void 0 : (_row$original4$connec = _row$original4.connectionHolders) === null || _row$original4$connec === void 0 ? void 0 : _row$original4$connec.map(getFullName).filter(Boolean).join(", ")) || ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : (_row$original5$proper = _row$original5.property) === null || _row$original5$proper === void 0 ? void 0 : (_row$original5$proper2 = _row$original5$proper.owners) === null || _row$original5$proper2 === void 0 ? void 0 : _row$original5$proper2.sort((a, b) => {
|
|
8258
8259
|
var _a$additionalDetails, _b$additionalDetails;
|
|
8259
8260
|
return (a === null || a === void 0 ? void 0 : (_a$additionalDetails = a.additionalDetails) === null || _a$additionalDetails === void 0 ? void 0 : _a$additionalDetails.ownerSequence) - (b === null || b === void 0 ? void 0 : (_b$additionalDetails = b.additionalDetails) === null || _b$additionalDetails === void 0 ? void 0 : _b$additionalDetails.ownerSequence);
|
|
8260
|
-
}).map(
|
|
8261
|
+
}).map(getFullName).filter(Boolean).join(", ")) || t("CS_NA");
|
|
8261
8262
|
return GetCell(names);
|
|
8262
8263
|
}
|
|
8263
8264
|
}, {
|
|
@@ -18474,6 +18475,31 @@ const UploadFileDigiLocker = props => {
|
|
|
18474
18475
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",
|
|
18475
18476
|
fill: "#0B0C0C"
|
|
18476
18477
|
}));
|
|
18478
|
+
const handleFileUpload = e => {
|
|
18479
|
+
const file = e.target.files[0];
|
|
18480
|
+
if (file) {
|
|
18481
|
+
if (file.size > 5242880) {
|
|
18482
|
+
setShowToast({
|
|
18483
|
+
error: true,
|
|
18484
|
+
label: "File size should not exceed 5MB."
|
|
18485
|
+
});
|
|
18486
|
+
inpRef.current.value = "";
|
|
18487
|
+
return;
|
|
18488
|
+
}
|
|
18489
|
+
const allowedTypes = ["application/pdf", "image/jpeg", "image/png", "image/jpg"];
|
|
18490
|
+
const fileExtension = file.name.split('.').pop().toLowerCase();
|
|
18491
|
+
const allowedExtensions = ["pdf", "jpeg", "png", "jpg"];
|
|
18492
|
+
if (!allowedTypes.includes(file.type) && !allowedExtensions.includes(fileExtension)) {
|
|
18493
|
+
setShowToast({
|
|
18494
|
+
error: true,
|
|
18495
|
+
label: "Invalid file format. Only PDF, JPG, and PNG are allowed."
|
|
18496
|
+
});
|
|
18497
|
+
inpRef.current.value = "";
|
|
18498
|
+
return;
|
|
18499
|
+
}
|
|
18500
|
+
props.onUpload(e);
|
|
18501
|
+
}
|
|
18502
|
+
};
|
|
18477
18503
|
const showHint = (props === null || props === void 0 ? void 0 : props.showHint) || false;
|
|
18478
18504
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, showHint && /*#__PURE__*/React__default.createElement("p", {
|
|
18479
18505
|
className: "cell-text"
|
|
@@ -18567,7 +18593,7 @@ const UploadFileDigiLocker = props => {
|
|
|
18567
18593
|
multiple: props.multiple,
|
|
18568
18594
|
accept: props.accept,
|
|
18569
18595
|
disabled: props.disabled,
|
|
18570
|
-
onChange:
|
|
18596
|
+
onChange: handleFileUpload,
|
|
18571
18597
|
onClick: event => {
|
|
18572
18598
|
const {
|
|
18573
18599
|
target = {}
|
|
@@ -19968,6 +19994,10 @@ const WSDisconnectionDocsRequired = _ref => {
|
|
|
19968
19994
|
};
|
|
19969
19995
|
|
|
19970
19996
|
const WSDisconnectionKNumber = _ref => {
|
|
19997
|
+
let {
|
|
19998
|
+
userType,
|
|
19999
|
+
flow = "disconnection"
|
|
20000
|
+
} = _ref;
|
|
19971
20001
|
const history = reactRouterDom.useHistory();
|
|
19972
20002
|
const location = reactRouterDom.useLocation();
|
|
19973
20003
|
const match = reactRouterDom.useRouteMatch();
|
|
@@ -19981,13 +20011,18 @@ const WSDisconnectionKNumber = _ref => {
|
|
|
19981
20011
|
});
|
|
19982
20012
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
19983
20013
|
const [showToast, setShowToast] = React.useState(null);
|
|
20014
|
+
const searchInProgress = React.useRef(false);
|
|
20015
|
+
const isReconnection = flow === "reconnection";
|
|
19984
20016
|
const isMobileView = window.innerWidth < 768;
|
|
19985
20017
|
const handleProceed = function () {
|
|
19986
20018
|
try {
|
|
19987
20019
|
var _stored$applicationDa2;
|
|
20020
|
+
if (searchInProgress.current) return Promise.resolve();
|
|
20021
|
+
searchInProgress.current = true;
|
|
19988
20022
|
const connectionNumber = kNumber || connectionNumberFromQuery || (stored === null || stored === void 0 ? void 0 : (_stored$applicationDa2 = stored.applicationData) === null || _stored$applicationDa2 === void 0 ? void 0 : _stored$applicationDa2.connectionNo) || (stored === null || stored === void 0 ? void 0 : stored.connectionNo) || "";
|
|
19989
20023
|
const trimmed = connectionNumber.trim();
|
|
19990
20024
|
if (!trimmed) {
|
|
20025
|
+
searchInProgress.current = false;
|
|
19991
20026
|
setShowToast({
|
|
19992
20027
|
key: "warning",
|
|
19993
20028
|
message: "Please enter K Number / Connection ID"
|
|
@@ -19995,106 +20030,118 @@ const WSDisconnectionKNumber = _ref => {
|
|
|
19995
20030
|
return Promise.resolve();
|
|
19996
20031
|
}
|
|
19997
20032
|
setIsLoading(true);
|
|
19998
|
-
return Promise.resolve(
|
|
19999
|
-
|
|
20000
|
-
|
|
20001
|
-
|
|
20002
|
-
|
|
20003
|
-
|
|
20004
|
-
|
|
20005
|
-
|
|
20006
|
-
|
|
20007
|
-
|
|
20008
|
-
|
|
20009
|
-
|
|
20010
|
-
|
|
20011
|
-
|
|
20012
|
-
|
|
20013
|
-
|
|
20014
|
-
|
|
20015
|
-
|
|
20016
|
-
|
|
20017
|
-
|
|
20018
|
-
|
|
20019
|
-
|
|
20020
|
-
|
|
20021
|
-
|
|
20022
|
-
|
|
20033
|
+
return Promise.resolve(_finallyRethrows(function () {
|
|
20034
|
+
return _catch(function () {
|
|
20035
|
+
const tenantId = Digit.ULBService.getCurrentTenantId() || "dl";
|
|
20036
|
+
const params = {
|
|
20037
|
+
connectionNumber: trimmed,
|
|
20038
|
+
searchType: "CONNECTION",
|
|
20039
|
+
isConnectionSearch: true
|
|
20040
|
+
};
|
|
20041
|
+
const isEligibleConnection = candidate => {
|
|
20042
|
+
if (isReconnection) {
|
|
20043
|
+
return ["DISCONNECTION_EXECUTED", "CONNECTION_DISCONNECTED"].includes(candidate === null || candidate === void 0 ? void 0 : candidate.applicationStatus) || (candidate === null || candidate === void 0 ? void 0 : candidate.isdisconnection) === true;
|
|
20044
|
+
}
|
|
20045
|
+
return ["CONNECTION_ACTIVATED", "ACTIVE", "Active"].includes(candidate === null || candidate === void 0 ? void 0 : candidate.applicationStatus) || ["ACTIVE", "Active"].includes(candidate === null || candidate === void 0 ? void 0 : candidate.status);
|
|
20046
|
+
};
|
|
20047
|
+
let detectedServiceType = "WATER";
|
|
20048
|
+
return Promise.resolve(Digit.WSService.search({
|
|
20049
|
+
tenantId,
|
|
20050
|
+
filters: params,
|
|
20051
|
+
businessService: "WS"
|
|
20052
|
+
}).catch(() => null)).then(function (wsResponse) {
|
|
20053
|
+
var _waterResponse$WaterC, _waterResponse$WaterC2;
|
|
20054
|
+
function _temp3() {
|
|
20055
|
+
var _connection4, _connection5;
|
|
20056
|
+
function _temp(propertyResponse) {
|
|
20057
|
+
var _propertyResponse$Pro, _connection, _connection$connectio, _connection$connectio2, _connection2;
|
|
20058
|
+
const property = propertyResponse === null || propertyResponse === void 0 ? void 0 : (_propertyResponse$Pro = propertyResponse.Properties) === null || _propertyResponse$Pro === void 0 ? void 0 : _propertyResponse$Pro[0];
|
|
20059
|
+
if (property) connection = {
|
|
20060
|
+
...connection,
|
|
20061
|
+
property
|
|
20062
|
+
};
|
|
20063
|
+
const fetchedMobileNumber = ((_connection = connection) === null || _connection === void 0 ? void 0 : (_connection$connectio = _connection.connectionHolders) === null || _connection$connectio === void 0 ? void 0 : (_connection$connectio2 = _connection$connectio[0]) === null || _connection$connectio2 === void 0 ? void 0 : _connection$connectio2.mobileNumber) || ((_connection2 = connection) === null || _connection2 === void 0 ? void 0 : _connection2.mobileNumber);
|
|
20064
|
+
if (!fetchedMobileNumber || fetchedMobileNumber.length !== 10) {
|
|
20065
|
+
setIsLoading(false);
|
|
20066
|
+
setShowToast({
|
|
20067
|
+
key: "error",
|
|
20068
|
+
message: "No valid registered mobile number found for this connection"
|
|
20069
|
+
});
|
|
20070
|
+
return;
|
|
20071
|
+
}
|
|
20072
|
+
const userType = Digit.UserService.getType().toUpperCase();
|
|
20073
|
+
const payload = {
|
|
20074
|
+
otp: {
|
|
20075
|
+
mobileNumber: fetchedMobileNumber,
|
|
20076
|
+
tenantId: "dl",
|
|
20077
|
+
type: "register",
|
|
20078
|
+
userType: Digit.UserService.getType().toUpperCase()
|
|
20079
|
+
}
|
|
20080
|
+
};
|
|
20081
|
+
return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function () {
|
|
20082
|
+
var _connection3;
|
|
20083
|
+
const existingData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
20084
|
+
connection.serviceType = detectedServiceType;
|
|
20085
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
20086
|
+
...existingData,
|
|
20087
|
+
kNumber: trimmed,
|
|
20088
|
+
serviceType: detectedServiceType,
|
|
20089
|
+
applicationData: connection,
|
|
20090
|
+
connectionNo: (_connection3 = connection) === null || _connection3 === void 0 ? void 0 : _connection3.connectionNo
|
|
20091
|
+
});
|
|
20092
|
+
setIsLoading(false);
|
|
20093
|
+
history.push(match.path.replace("k-number", "consumer-details"), {
|
|
20094
|
+
connection
|
|
20095
|
+
});
|
|
20096
|
+
});
|
|
20097
|
+
}
|
|
20098
|
+
if (!connection) {
|
|
20023
20099
|
setIsLoading(false);
|
|
20024
20100
|
setShowToast({
|
|
20025
20101
|
key: "error",
|
|
20026
|
-
message: "
|
|
20102
|
+
message: isReconnection ? "Disconnected connection not found for the given K Number" : "Active connection not found for the given K Number"
|
|
20027
20103
|
});
|
|
20028
20104
|
return;
|
|
20029
20105
|
}
|
|
20030
|
-
const
|
|
20031
|
-
|
|
20032
|
-
|
|
20033
|
-
|
|
20034
|
-
|
|
20035
|
-
|
|
20036
|
-
|
|
20037
|
-
|
|
20038
|
-
};
|
|
20039
|
-
return Promise.resolve(Digit.UserService.sendOtp(payload, "dl")).then(function () {
|
|
20040
|
-
var _connection3;
|
|
20041
|
-
const existingData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
20042
|
-
connection.serviceType = detectedServiceType;
|
|
20043
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
20044
|
-
...existingData,
|
|
20045
|
-
kNumber: trimmed,
|
|
20046
|
-
serviceType: detectedServiceType,
|
|
20047
|
-
applicationData: connection,
|
|
20048
|
-
connectionNo: (_connection3 = connection) === null || _connection3 === void 0 ? void 0 : _connection3.connectionNo
|
|
20049
|
-
});
|
|
20050
|
-
setIsLoading(false);
|
|
20051
|
-
history.push(match.path.replace("k-number", "consumer-details"), {
|
|
20052
|
-
connection
|
|
20053
|
-
});
|
|
20054
|
-
});
|
|
20055
|
-
}
|
|
20056
|
-
if (!connection) {
|
|
20057
|
-
setIsLoading(false);
|
|
20058
|
-
setShowToast({
|
|
20059
|
-
key: "error",
|
|
20060
|
-
message: "Active connection not found for the given K Number"
|
|
20061
|
-
});
|
|
20062
|
-
return;
|
|
20063
|
-
}
|
|
20064
|
-
const _connection$propertyI = (_connection4 = connection) === null || _connection4 === void 0 ? void 0 : _connection4.propertyId;
|
|
20065
|
-
return _connection$propertyI ? Promise.resolve(Digit.PTService.search({
|
|
20066
|
-
tenantId: ((_connection5 = connection) === null || _connection5 === void 0 ? void 0 : _connection5.tenantId) || tenantId,
|
|
20067
|
-
filters: {
|
|
20068
|
-
propertyIds: connection.propertyId
|
|
20069
|
-
},
|
|
20070
|
-
auth: true
|
|
20071
|
-
}).catch(() => null)).then(_temp) : _temp(null);
|
|
20072
|
-
}
|
|
20073
|
-
const waterResponse = (wsResponse === null || wsResponse === void 0 ? void 0 : wsResponse.data) || wsResponse;
|
|
20074
|
-
let connection = waterResponse === null || waterResponse === void 0 ? void 0 : (_waterResponse$WaterC = waterResponse.WaterConnection) === null || _waterResponse$WaterC === void 0 ? void 0 : _waterResponse$WaterC.find(c => c.applicationStatus === "CONNECTION_ACTIVATED");
|
|
20075
|
-
const _temp2 = function () {
|
|
20076
|
-
if (!connection) {
|
|
20077
|
-
return Promise.resolve(Digit.WSService.search({
|
|
20078
|
-
tenantId,
|
|
20079
|
-
filters: params,
|
|
20080
|
-
businessService: "SW"
|
|
20081
|
-
}).catch(() => null)).then(function (swResponse) {
|
|
20082
|
-
var _sewerageResponse$Sew;
|
|
20083
|
-
const sewerageResponse = (swResponse === null || swResponse === void 0 ? void 0 : swResponse.data) || swResponse;
|
|
20084
|
-
connection = sewerageResponse === null || sewerageResponse === void 0 ? void 0 : (_sewerageResponse$Sew = sewerageResponse.SewerageConnections) === null || _sewerageResponse$Sew === void 0 ? void 0 : _sewerageResponse$Sew.find(c => c.applicationStatus === "CONNECTION_ACTIVATED");
|
|
20085
|
-
if (connection) detectedServiceType = "SEWERAGE";
|
|
20086
|
-
});
|
|
20106
|
+
const _connection$propertyI = (_connection4 = connection) === null || _connection4 === void 0 ? void 0 : _connection4.propertyId;
|
|
20107
|
+
return _connection$propertyI ? Promise.resolve(Digit.PTService.search({
|
|
20108
|
+
tenantId: ((_connection5 = connection) === null || _connection5 === void 0 ? void 0 : _connection5.tenantId) || tenantId,
|
|
20109
|
+
filters: {
|
|
20110
|
+
propertyIds: connection.propertyId
|
|
20111
|
+
},
|
|
20112
|
+
auth: true
|
|
20113
|
+
}).catch(() => null)).then(_temp) : _temp(null);
|
|
20087
20114
|
}
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
|
|
20095
|
-
|
|
20096
|
-
|
|
20115
|
+
const waterResponse = (wsResponse === null || wsResponse === void 0 ? void 0 : wsResponse.data) || wsResponse;
|
|
20116
|
+
let connection = (waterResponse === null || waterResponse === void 0 ? void 0 : (_waterResponse$WaterC = waterResponse.WaterConnection) === null || _waterResponse$WaterC === void 0 ? void 0 : _waterResponse$WaterC.find(isEligibleConnection)) || (!isReconnection ? waterResponse === null || waterResponse === void 0 ? void 0 : (_waterResponse$WaterC2 = waterResponse.WaterConnection) === null || _waterResponse$WaterC2 === void 0 ? void 0 : _waterResponse$WaterC2[0] : null);
|
|
20117
|
+
const _temp2 = function () {
|
|
20118
|
+
if (!connection) {
|
|
20119
|
+
return Promise.resolve(Digit.WSService.search({
|
|
20120
|
+
tenantId,
|
|
20121
|
+
filters: params,
|
|
20122
|
+
businessService: "SW"
|
|
20123
|
+
}).catch(() => null)).then(function (swResponse) {
|
|
20124
|
+
var _sewerageResponse$Sew, _sewerageResponse$Sew2;
|
|
20125
|
+
const sewerageResponse = (swResponse === null || swResponse === void 0 ? void 0 : swResponse.data) || swResponse;
|
|
20126
|
+
connection = (sewerageResponse === null || sewerageResponse === void 0 ? void 0 : (_sewerageResponse$Sew = sewerageResponse.SewerageConnections) === null || _sewerageResponse$Sew === void 0 ? void 0 : _sewerageResponse$Sew.find(isEligibleConnection)) || (!isReconnection ? sewerageResponse === null || sewerageResponse === void 0 ? void 0 : (_sewerageResponse$Sew2 = sewerageResponse.SewerageConnections) === null || _sewerageResponse$Sew2 === void 0 ? void 0 : _sewerageResponse$Sew2[0] : null);
|
|
20127
|
+
if (connection) detectedServiceType = "SEWERAGE";
|
|
20128
|
+
});
|
|
20129
|
+
}
|
|
20130
|
+
}();
|
|
20131
|
+
return _temp2 && _temp2.then ? _temp2.then(_temp3) : _temp3(_temp2);
|
|
20132
|
+
});
|
|
20133
|
+
}, function (err) {
|
|
20134
|
+
var _err$response, _err$response$data, _err$response$data$Er, _err$response$data$Er2;
|
|
20135
|
+
setIsLoading(false);
|
|
20136
|
+
setShowToast({
|
|
20137
|
+
key: "error",
|
|
20138
|
+
message: (err === null || err === void 0 ? void 0 : (_err$response = err.response) === null || _err$response === void 0 ? void 0 : (_err$response$data = _err$response.data) === null || _err$response$data === void 0 ? void 0 : (_err$response$data$Er = _err$response$data.Errors) === null || _err$response$data$Er === void 0 ? void 0 : (_err$response$data$Er2 = _err$response$data$Er[0]) === null || _err$response$data$Er2 === void 0 ? void 0 : _err$response$data$Er2.message) || "Failed to search connection"
|
|
20139
|
+
});
|
|
20097
20140
|
});
|
|
20141
|
+
}, function (_wasThrown, _result) {
|
|
20142
|
+
searchInProgress.current = false;
|
|
20143
|
+
if (_wasThrown) throw _result;
|
|
20144
|
+
return _result;
|
|
20098
20145
|
}));
|
|
20099
20146
|
} catch (e) {
|
|
20100
20147
|
return Promise.reject(e);
|
|
@@ -20139,7 +20186,7 @@ const WSDisconnectionKNumber = _ref => {
|
|
|
20139
20186
|
marginBottom: "20px",
|
|
20140
20187
|
color: "#6C6C6C"
|
|
20141
20188
|
}
|
|
20142
|
-
}, "Please enter your K Number to verify and proceed with the disconnection application."), /*#__PURE__*/React__default.createElement("div", {
|
|
20189
|
+
}, "Please enter your K Number to verify and proceed with the ", isReconnection ? "reconnection" : "disconnection", " application."), /*#__PURE__*/React__default.createElement("div", {
|
|
20143
20190
|
style: {
|
|
20144
20191
|
padding: isMobileView ? "14px" : "20px",
|
|
20145
20192
|
backgroundColor: "#f9f9f9",
|
|
@@ -20201,6 +20248,10 @@ const WSDisconnectionKNumber = _ref => {
|
|
|
20201
20248
|
|
|
20202
20249
|
const WSDisconnectionConsumerDetails = _ref => {
|
|
20203
20250
|
var _location$state, _connection$additiona, _connection$connectio, _connection$property, _propertyAddress$loca;
|
|
20251
|
+
let {
|
|
20252
|
+
userType,
|
|
20253
|
+
flow = "disconnection"
|
|
20254
|
+
} = _ref;
|
|
20204
20255
|
const history = reactRouterDom.useHistory();
|
|
20205
20256
|
const location = reactRouterDom.useLocation();
|
|
20206
20257
|
const match = reactRouterDom.useRouteMatch();
|
|
@@ -20209,6 +20260,7 @@ const WSDisconnectionConsumerDetails = _ref => {
|
|
|
20209
20260
|
const [isLoading, setIsLoading] = React.useState(false);
|
|
20210
20261
|
const applicationData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
20211
20262
|
const connection = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.connection) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationData) || {};
|
|
20263
|
+
const isReconnection = flow === "reconnection";
|
|
20212
20264
|
const isMobileView = window.innerWidth < 768;
|
|
20213
20265
|
const getMaskedName = name => {
|
|
20214
20266
|
if (!name) return "NA";
|
|
@@ -20286,7 +20338,7 @@ const WSDisconnectionConsumerDetails = _ref => {
|
|
|
20286
20338
|
serviceType: (connection === null || connection === void 0 ? void 0 : (_connection$additiona2 = connection.additionalDetails) === null || _connection$additiona2 === void 0 ? void 0 : (_connection$additiona3 = _connection$additiona2.serviceType) === null || _connection$additiona3 === void 0 ? void 0 : _connection$additiona3.code) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.serviceType)
|
|
20287
20339
|
});
|
|
20288
20340
|
setIsLoading(false);
|
|
20289
|
-
history.push(match.path.replace("consumer-details", "application-form"), {
|
|
20341
|
+
history.push(match.path.replace("consumer-details", isReconnection ? "new-restoration" : "application-form"), {
|
|
20290
20342
|
connection
|
|
20291
20343
|
});
|
|
20292
20344
|
});
|
|
@@ -20348,7 +20400,7 @@ const WSDisconnectionConsumerDetails = _ref => {
|
|
|
20348
20400
|
fontSize: isMobileView ? "12px" : "13px",
|
|
20349
20401
|
lineHeight: "1.5"
|
|
20350
20402
|
}
|
|
20351
|
-
}, "Please verify the connection details below. The OTP has been sent to the registered mobile number on this connection.")), /*#__PURE__*/React__default.createElement("div", {
|
|
20403
|
+
}, "Please verify the ", isReconnection ? "disconnected" : "connection", " details below. The OTP has been sent to the registered mobile number on this connection.")), /*#__PURE__*/React__default.createElement("div", {
|
|
20352
20404
|
style: {
|
|
20353
20405
|
display: "flex",
|
|
20354
20406
|
alignItems: "center",
|
|
@@ -22081,6 +22133,15 @@ function cleanEscapedString(input) {
|
|
|
22081
22133
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
22082
22134
|
}
|
|
22083
22135
|
|
|
22136
|
+
const INVALID_REQUESTED_PERIOD_MESSAGE = "Requested period must be between 1 and 24 months.";
|
|
22137
|
+
const parseFormDate = date => {
|
|
22138
|
+
if (typeof date !== "string") return null;
|
|
22139
|
+
const dateParts = date.split("-");
|
|
22140
|
+
if (dateParts.length !== 3 || dateParts[0].length !== 4 || dateParts[1].length !== 2 || dateParts[2].length !== 2 || dateParts.some(part => !Number.isInteger(Number(part)))) return null;
|
|
22141
|
+
const [year, month, day] = date.split("-").map(Number);
|
|
22142
|
+
const parsedDate = new Date(Date.UTC(year, month - 1, day));
|
|
22143
|
+
return parsedDate.getUTCFullYear() === year && parsedDate.getUTCMonth() === month - 1 && parsedDate.getUTCDate() === day ? parsedDate.getTime() : null;
|
|
22144
|
+
};
|
|
22084
22145
|
const DISCONNECTION_REASONS = {
|
|
22085
22146
|
Permanent: [{
|
|
22086
22147
|
code: "PROPERTY_DEMOLITION_RECONSTRUCTION",
|
|
@@ -22107,7 +22168,7 @@ const DISCONNECTION_REASONS = {
|
|
|
22107
22168
|
}]
|
|
22108
22169
|
};
|
|
22109
22170
|
const WSDisconnectionForm = _ref => {
|
|
22110
|
-
var _location$state, _applicationData$appl, _applicationData$appl2, _applicationData$appl3, _applicationData$appl4, _applicationData$appl5, _applicationData$WSDi, _applicationData$WSDi2, _applicationData$appl6, _disconnectionData$ty14, _disconnectionData$ty15, _disconnectionData$ty16, _disconnectionData$ty17, _disconnectionData$ty18, _disconnectionData$ty19, _disconnectionData$ty20, _disconnectionData$ty23, _disconnectionData$ty24, _disconnectionData$
|
|
22171
|
+
var _location$state, _applicationData$appl, _applicationData$appl2, _applicationData$appl3, _applicationData$appl4, _applicationData$appl5, _applicationData$WSDi, _applicationData$WSDi2, _applicationData$appl6, _disconnectionData$ty14, _disconnectionData$ty15, _disconnectionData$ty16, _disconnectionData$ty17, _disconnectionData$ty18, _disconnectionData$ty19, _disconnectionData$ty20, _disconnectionData$ty23, _disconnectionData$ty24, _disconnectionData$ty25, _disconnectionData$ty26, _disconnectionData$re4, _disconnectionData$re5, _disconnectionData$re6;
|
|
22111
22172
|
let {
|
|
22112
22173
|
t,
|
|
22113
22174
|
config,
|
|
@@ -22184,6 +22245,31 @@ const WSDisconnectionForm = _ref => {
|
|
|
22184
22245
|
error: updateSewerageError,
|
|
22185
22246
|
mutate: sewerageUpdateMutation
|
|
22186
22247
|
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
22248
|
+
const getValidationError = data => {
|
|
22249
|
+
var _data$type, _data$type$value, _data$reason, _data$reason$value;
|
|
22250
|
+
const type = data === null || data === void 0 ? void 0 : (_data$type = data.type) === null || _data$type === void 0 ? void 0 : (_data$type$value = _data$type.value) === null || _data$type$value === void 0 ? void 0 : _data$type$value.code;
|
|
22251
|
+
const requestedPeriod = Number(data === null || data === void 0 ? void 0 : data.requestedPeriodMonths);
|
|
22252
|
+
const proposedDate = format(addDays(new Date(), (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0), "yyyy-MM-dd");
|
|
22253
|
+
const dateEpoch = parseFormDate(data === null || data === void 0 ? void 0 : data.date);
|
|
22254
|
+
const proposedDateEpoch = parseFormDate(proposedDate);
|
|
22255
|
+
if (!type || !(data !== null && data !== void 0 && (_data$reason = data.reason) !== null && _data$reason !== void 0 && (_data$reason$value = _data$reason.value) !== null && _data$reason$value !== void 0 && _data$reason$value.code)) return {
|
|
22256
|
+
warning: true,
|
|
22257
|
+
message: "PLEASE_FILL_MANDATORY_DETAILS"
|
|
22258
|
+
};
|
|
22259
|
+
if (type === "Temporary" && (!Number.isInteger(requestedPeriod) || requestedPeriod < 1 || requestedPeriod > 24)) {
|
|
22260
|
+
return {
|
|
22261
|
+
key: "error",
|
|
22262
|
+
message: INVALID_REQUESTED_PERIOD_MESSAGE
|
|
22263
|
+
};
|
|
22264
|
+
}
|
|
22265
|
+
if (type === "Permanent" && (!(data !== null && data !== void 0 && data.date) || !Number.isFinite(dateEpoch) || !Number.isFinite(proposedDateEpoch) || dateEpoch < proposedDateEpoch)) {
|
|
22266
|
+
return {
|
|
22267
|
+
key: "error",
|
|
22268
|
+
message: "PROPOSED_DISCONNECTION_INVALID_DATE"
|
|
22269
|
+
};
|
|
22270
|
+
}
|
|
22271
|
+
return null;
|
|
22272
|
+
};
|
|
22187
22273
|
const closeToastOfError = () => {
|
|
22188
22274
|
setError(null);
|
|
22189
22275
|
};
|
|
@@ -22228,184 +22314,152 @@ const WSDisconnectionForm = _ref => {
|
|
|
22228
22314
|
if (val.code === "type" && ((_val$value = val.value) === null || _val$value === void 0 ? void 0 : _val$value.code) !== ((_disconnectionData$ty3 = disconnectionData.type) === null || _disconnectionData$ty3 === void 0 ? void 0 : (_disconnectionData$ty4 = _disconnectionData$ty3.value) === null || _disconnectionData$ty4 === void 0 ? void 0 : _disconnectionData$ty4.code)) {
|
|
22229
22315
|
var _val$value2;
|
|
22230
22316
|
oldData.reason = "";
|
|
22317
|
+
oldData.requestedPeriodMonths = 12;
|
|
22231
22318
|
if (String(((_val$value2 = val.value) === null || _val$value2 === void 0 ? void 0 : _val$value2.code) || "").toLowerCase() === "temporary") {
|
|
22232
|
-
oldData.date =
|
|
22233
|
-
oldData.endDate = format(addMonths(new Date(oldData.date), oldData.requestedPeriodMonths
|
|
22319
|
+
oldData.date = format(addDays(new Date(), (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0), "yyyy-MM-dd");
|
|
22320
|
+
oldData.endDate = format(addMonths(new Date(oldData.date), oldData.requestedPeriodMonths), "yyyy-MM-dd");
|
|
22321
|
+
} else {
|
|
22322
|
+
oldData.date = "";
|
|
22323
|
+
oldData.endDate = "";
|
|
22234
22324
|
}
|
|
22235
22325
|
}
|
|
22236
22326
|
setDisconnectionData(oldData);
|
|
22237
22327
|
};
|
|
22238
22328
|
const onSubmit = function (data) {
|
|
22239
22329
|
try {
|
|
22240
|
-
const
|
|
22241
|
-
const
|
|
22242
|
-
|
|
22243
|
-
|
|
22244
|
-
|
|
22245
|
-
const selectedDateIsInvalid = !(data !== null && data !== void 0 && data.date) || typeof selectedDateEpoch !== "number" || selectedDateEpoch < proposedDateEpoch;
|
|
22246
|
-
const _temp7 = function () {
|
|
22247
|
-
if (selectedDateIsInvalid) {
|
|
22248
|
-
setError({
|
|
22249
|
-
key: "error",
|
|
22250
|
-
message: "PROPOSED_DISCONNECTION_INVALID_DATE"
|
|
22251
|
-
});
|
|
22252
|
-
setTimeout(() => {
|
|
22253
|
-
setError(null);
|
|
22254
|
-
}, 3000);
|
|
22330
|
+
const validationError = getValidationError(data);
|
|
22331
|
+
const _temp5 = function () {
|
|
22332
|
+
if (validationError) {
|
|
22333
|
+
setError(validationError);
|
|
22334
|
+
setTimeout(() => setError(null), 3000);
|
|
22255
22335
|
} else {
|
|
22256
|
-
|
|
22257
|
-
|
|
22258
|
-
|
|
22259
|
-
|
|
22260
|
-
|
|
22261
|
-
|
|
22262
|
-
|
|
22263
|
-
|
|
22264
|
-
|
|
22265
|
-
|
|
22266
|
-
|
|
22267
|
-
|
|
22268
|
-
|
|
22269
|
-
|
|
22270
|
-
|
|
22271
|
-
|
|
22272
|
-
|
|
22273
|
-
|
|
22274
|
-
|
|
22275
|
-
|
|
22276
|
-
|
|
22277
|
-
|
|
22278
|
-
|
|
22279
|
-
|
|
22280
|
-
|
|
22281
|
-
|
|
22282
|
-
|
|
22336
|
+
return Promise.resolve(createPayloadOfWSDisconnection(data, applicationData, serviceType)).then(function (payload) {
|
|
22337
|
+
const _temp4 = function (_payload$WaterConnect) {
|
|
22338
|
+
if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
|
|
22339
|
+
const _temp = function () {
|
|
22340
|
+
if (waterMutation) {
|
|
22341
|
+
setIsEnableLoader(true);
|
|
22342
|
+
return Promise.resolve(waterMutation(payload, {
|
|
22343
|
+
onError: (error, variables) => {
|
|
22344
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
|
|
22345
|
+
setIsEnableLoader(false);
|
|
22346
|
+
setError({
|
|
22347
|
+
key: "error",
|
|
22348
|
+
message: error !== null && error !== void 0 && (_error$response = error.response) !== null && _error$response !== void 0 && (_error$response$data = _error$response.data) !== null && _error$response$data !== void 0 && (_error$response$data$ = _error$response$data.Errors) !== null && _error$response$data$ !== void 0 && _error$response$data$[0].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
|
|
22349
|
+
});
|
|
22350
|
+
setTimeout(closeToastOfError, 5000);
|
|
22351
|
+
},
|
|
22352
|
+
onSuccess: function (data, variables) {
|
|
22353
|
+
try {
|
|
22354
|
+
var _data$WaterConnection;
|
|
22355
|
+
return Promise.resolve(updatePayloadOfWSDisconnection(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0], "WATER")).then(function (response) {
|
|
22356
|
+
let waterConnectionUpdate = {
|
|
22357
|
+
WaterConnection: response
|
|
22358
|
+
};
|
|
22359
|
+
waterConnectionUpdate = {
|
|
22360
|
+
...waterConnectionUpdate,
|
|
22361
|
+
disconnectRequest: true
|
|
22362
|
+
};
|
|
22363
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
22283
22364
|
onError: (error, variables) => {
|
|
22284
|
-
var _error$
|
|
22365
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
22285
22366
|
setIsEnableLoader(false);
|
|
22286
22367
|
setError({
|
|
22287
22368
|
key: "error",
|
|
22288
|
-
message: error !== null && error !== void 0 && (_error$
|
|
22369
|
+
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
|
|
22289
22370
|
});
|
|
22290
22371
|
setTimeout(closeToastOfError, 5000);
|
|
22291
22372
|
},
|
|
22292
|
-
onSuccess:
|
|
22293
|
-
|
|
22294
|
-
|
|
22295
|
-
|
|
22296
|
-
|
|
22297
|
-
|
|
22298
|
-
|
|
22299
|
-
waterConnectionUpdate = {
|
|
22300
|
-
...waterConnectionUpdate,
|
|
22301
|
-
disconnectRequest: true
|
|
22302
|
-
};
|
|
22303
|
-
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
22304
|
-
onError: (error, variables) => {
|
|
22305
|
-
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
22306
|
-
setIsEnableLoader(false);
|
|
22307
|
-
setError({
|
|
22308
|
-
key: "error",
|
|
22309
|
-
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
|
|
22310
|
-
});
|
|
22311
|
-
setTimeout(closeToastOfError, 5000);
|
|
22312
|
-
},
|
|
22313
|
-
onSuccess: (data, variables) => {
|
|
22314
|
-
var _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4;
|
|
22315
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22316
|
-
...applicationData,
|
|
22317
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
22318
|
-
});
|
|
22319
|
-
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}`);
|
|
22320
|
-
}
|
|
22321
|
-
})).then(function () {});
|
|
22322
|
-
});
|
|
22323
|
-
} catch (e) {
|
|
22324
|
-
return Promise.reject(e);
|
|
22325
|
-
}
|
|
22373
|
+
onSuccess: (data, variables) => {
|
|
22374
|
+
var _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4;
|
|
22375
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22376
|
+
...applicationData,
|
|
22377
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
22378
|
+
});
|
|
22379
|
+
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}`);
|
|
22326
22380
|
}
|
|
22327
22381
|
})).then(function () {});
|
|
22328
|
-
}
|
|
22329
|
-
}()
|
|
22330
|
-
|
|
22331
|
-
|
|
22332
|
-
|
|
22333
|
-
|
|
22334
|
-
|
|
22335
|
-
|
|
22336
|
-
|
|
22337
|
-
|
|
22382
|
+
});
|
|
22383
|
+
} catch (e) {
|
|
22384
|
+
return Promise.reject(e);
|
|
22385
|
+
}
|
|
22386
|
+
}
|
|
22387
|
+
})).then(function () {});
|
|
22388
|
+
}
|
|
22389
|
+
}();
|
|
22390
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
22391
|
+
} else {
|
|
22392
|
+
const _temp3 = function (_payload$SewerageConn) {
|
|
22393
|
+
if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
|
|
22394
|
+
const _temp2 = function () {
|
|
22395
|
+
if (sewerageMutation) {
|
|
22396
|
+
setIsEnableLoader(true);
|
|
22397
|
+
return Promise.resolve(sewerageMutation(payload, {
|
|
22398
|
+
onError: (error, variables) => {
|
|
22399
|
+
var _error$response5, _error$response5$data, _error$response5$data2, _error$response6, _error$response6$data, _error$response6$data2;
|
|
22400
|
+
setIsEnableLoader(false);
|
|
22401
|
+
setError({
|
|
22402
|
+
key: "error",
|
|
22403
|
+
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
|
|
22404
|
+
});
|
|
22405
|
+
setTimeout(closeToastOfError, 5000);
|
|
22406
|
+
},
|
|
22407
|
+
onSuccess: function (data, variables) {
|
|
22408
|
+
try {
|
|
22409
|
+
var _data$SewerageConnect;
|
|
22410
|
+
return Promise.resolve(updatePayloadOfWSDisconnection(data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0], "SEWERAGE")).then(function (response) {
|
|
22411
|
+
let sewerageConnectionUpdate = {
|
|
22412
|
+
SewerageConnection: response
|
|
22413
|
+
};
|
|
22414
|
+
sewerageConnectionUpdate = {
|
|
22415
|
+
...sewerageConnectionUpdate,
|
|
22416
|
+
disconnectRequest: true
|
|
22417
|
+
};
|
|
22418
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
22338
22419
|
onError: (error, variables) => {
|
|
22339
|
-
var _error$
|
|
22420
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
22340
22421
|
setIsEnableLoader(false);
|
|
22341
22422
|
setError({
|
|
22342
22423
|
key: "error",
|
|
22343
|
-
message: error !== null && error !== void 0 && (_error$
|
|
22424
|
+
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
|
|
22344
22425
|
});
|
|
22345
22426
|
setTimeout(closeToastOfError, 5000);
|
|
22346
22427
|
},
|
|
22347
|
-
onSuccess:
|
|
22348
|
-
|
|
22349
|
-
|
|
22350
|
-
|
|
22351
|
-
|
|
22352
|
-
|
|
22353
|
-
|
|
22354
|
-
sewerageConnectionUpdate = {
|
|
22355
|
-
...sewerageConnectionUpdate,
|
|
22356
|
-
disconnectRequest: true
|
|
22357
|
-
};
|
|
22358
|
-
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
22359
|
-
onError: (error, variables) => {
|
|
22360
|
-
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
22361
|
-
setIsEnableLoader(false);
|
|
22362
|
-
setError({
|
|
22363
|
-
key: "error",
|
|
22364
|
-
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
|
|
22365
|
-
});
|
|
22366
|
-
setTimeout(closeToastOfError, 5000);
|
|
22367
|
-
},
|
|
22368
|
-
onSuccess: (data, variables) => {
|
|
22369
|
-
var _data$SewerageConnect2, _data$SewerageConnect3, _data$SewerageConnect4;
|
|
22370
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22371
|
-
...applicationData,
|
|
22372
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
22373
|
-
});
|
|
22374
|
-
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}`);
|
|
22375
|
-
}
|
|
22376
|
-
})).then(function () {});
|
|
22377
|
-
});
|
|
22378
|
-
} catch (e) {
|
|
22379
|
-
return Promise.reject(e);
|
|
22380
|
-
}
|
|
22428
|
+
onSuccess: (data, variables) => {
|
|
22429
|
+
var _data$SewerageConnect2, _data$SewerageConnect3, _data$SewerageConnect4;
|
|
22430
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22431
|
+
...applicationData,
|
|
22432
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
22433
|
+
});
|
|
22434
|
+
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}`);
|
|
22381
22435
|
}
|
|
22382
22436
|
})).then(function () {});
|
|
22383
|
-
}
|
|
22384
|
-
}()
|
|
22385
|
-
|
|
22437
|
+
});
|
|
22438
|
+
} catch (e) {
|
|
22439
|
+
return Promise.reject(e);
|
|
22440
|
+
}
|
|
22386
22441
|
}
|
|
22387
|
-
}();
|
|
22388
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
22442
|
+
})).then(function () {});
|
|
22389
22443
|
}
|
|
22390
22444
|
}();
|
|
22391
|
-
if (
|
|
22392
|
-
}
|
|
22393
|
-
}
|
|
22394
|
-
|
|
22395
|
-
|
|
22396
|
-
}
|
|
22397
|
-
|
|
22398
|
-
|
|
22445
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
22446
|
+
}
|
|
22447
|
+
}();
|
|
22448
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
22449
|
+
}
|
|
22450
|
+
}();
|
|
22451
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
22452
|
+
});
|
|
22399
22453
|
}
|
|
22400
22454
|
}();
|
|
22401
|
-
return Promise.resolve(
|
|
22455
|
+
return Promise.resolve(_temp5 && _temp5.then ? _temp5.then(function () {}) : void 0);
|
|
22402
22456
|
} catch (e) {
|
|
22403
22457
|
return Promise.reject(e);
|
|
22404
22458
|
}
|
|
22405
22459
|
};
|
|
22406
22460
|
if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
22407
22461
|
if (userType === "citizen") {
|
|
22408
|
-
var _disconnectionData$ty5, _disconnectionData$ty6, _disconnectionData$ty7, _disconnectionData$ty8, _disconnectionData$ty9, _disconnectionData$ty10, _disconnectionData$ty11, _disconnectionData$
|
|
22462
|
+
var _disconnectionData$ty5, _disconnectionData$ty6, _disconnectionData$ty7, _disconnectionData$ty8, _disconnectionData$ty9, _disconnectionData$ty10, _disconnectionData$ty11, _disconnectionData$ty12, _disconnectionData$ty13, _disconnectionData$re, _disconnectionData$re2, _disconnectionData$re3;
|
|
22409
22463
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
22410
22464
|
textStyle: {
|
|
22411
22465
|
color: "#0B0C0C"
|
|
@@ -22487,15 +22541,13 @@ const WSDisconnectionForm = _ref => {
|
|
|
22487
22541
|
}
|
|
22488
22542
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
22489
22543
|
type: "number",
|
|
22490
|
-
min: "1",
|
|
22491
|
-
max: "24",
|
|
22492
22544
|
value: disconnectionData.requestedPeriodMonths,
|
|
22493
22545
|
onChange: event => {
|
|
22494
|
-
const months =
|
|
22546
|
+
const months = event.target.value;
|
|
22495
22547
|
setDisconnectionData({
|
|
22496
22548
|
...disconnectionData,
|
|
22497
22549
|
requestedPeriodMonths: months,
|
|
22498
|
-
endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
|
|
22550
|
+
endDate: disconnectionData.date && Number(months) > 0 ? format(addMonths(new Date(disconnectionData.date), Number(months)), "yyyy-MM-dd") : ""
|
|
22499
22551
|
});
|
|
22500
22552
|
}
|
|
22501
22553
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -22503,7 +22555,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22503
22555
|
fontWeight: 600,
|
|
22504
22556
|
color: "#4f6380"
|
|
22505
22557
|
}
|
|
22506
|
-
}, "Months
|
|
22558
|
+
}, "Months")), /*#__PURE__*/React__default.createElement("div", {
|
|
22507
22559
|
style: {
|
|
22508
22560
|
marginTop: "12px",
|
|
22509
22561
|
padding: "16px",
|
|
@@ -22526,9 +22578,10 @@ const WSDisconnectionForm = _ref => {
|
|
|
22526
22578
|
isMandatory: false,
|
|
22527
22579
|
optionKey: "i18nKey",
|
|
22528
22580
|
t: t,
|
|
22581
|
+
key: ((_disconnectionData$ty12 = disconnectionData.type) === null || _disconnectionData$ty12 === void 0 ? void 0 : (_disconnectionData$ty13 = _disconnectionData$ty12.value) === null || _disconnectionData$ty13 === void 0 ? void 0 : _disconnectionData$ty13.code) || "disconnection-type",
|
|
22529
22582
|
name: "reason",
|
|
22530
|
-
value: (_disconnectionData$
|
|
22531
|
-
selectedOption: (_disconnectionData$
|
|
22583
|
+
value: (_disconnectionData$re = disconnectionData.reason) === null || _disconnectionData$re === void 0 ? void 0 : (_disconnectionData$re2 = _disconnectionData$re.value) === null || _disconnectionData$re2 === void 0 ? void 0 : _disconnectionData$re2.code,
|
|
22584
|
+
selectedOption: (_disconnectionData$re3 = disconnectionData.reason) === null || _disconnectionData$re3 === void 0 ? void 0 : _disconnectionData$re3.value,
|
|
22532
22585
|
labelKey: "WS_DISCONNECTION_REASON",
|
|
22533
22586
|
select: e => filedChange({
|
|
22534
22587
|
code: "reason",
|
|
@@ -22544,31 +22597,14 @@ const WSDisconnectionForm = _ref => {
|
|
|
22544
22597
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
22545
22598
|
label: t("CS_COMMON_NEXT"),
|
|
22546
22599
|
onSubmit: () => {
|
|
22547
|
-
|
|
22548
|
-
|
|
22549
|
-
|
|
22550
|
-
|
|
22551
|
-
setError({
|
|
22552
|
-
key: "error",
|
|
22553
|
-
message: "PROPOSED_DISCONNECTION_INVALID_DATE"
|
|
22554
|
-
});
|
|
22555
|
-
setTimeout(() => {
|
|
22556
|
-
setError(false);
|
|
22557
|
-
}, 3000);
|
|
22558
|
-
} else if ((disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$ty12 = disconnectionData.type) === null || _disconnectionData$ty12 === void 0 ? void 0 : (_disconnectionData$ty13 = _disconnectionData$ty12.value) === null || _disconnectionData$ty13 === void 0 ? void 0 : _disconnectionData$ty13.code) == "Temporary" && parseInt(convertDateToEpoch(disconnectionData.endDate)) <= parseInt(convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date))) {
|
|
22559
|
-
console.log("Temporary connection");
|
|
22560
|
-
setError({
|
|
22561
|
-
key: "error",
|
|
22562
|
-
message: "PROPOSED_DISCONNECTION_INVALID_END_DATE"
|
|
22563
|
-
});
|
|
22564
|
-
setTimeout(() => {
|
|
22565
|
-
setError(false);
|
|
22566
|
-
}, 3000);
|
|
22600
|
+
const validationError = getValidationError(disconnectionData);
|
|
22601
|
+
if (validationError) {
|
|
22602
|
+
setError(validationError);
|
|
22603
|
+
setTimeout(() => setError(null), 3000);
|
|
22567
22604
|
} else {
|
|
22568
22605
|
history.push(match.path.replace("application-form", "check"));
|
|
22569
22606
|
}
|
|
22570
|
-
}
|
|
22571
|
-
disabled: (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re5 = disconnectionData.reason) === null || _disconnectionData$re5 === void 0 ? void 0 : _disconnectionData$re5.value) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.type) === "" ? true : false
|
|
22607
|
+
}
|
|
22572
22608
|
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
22573
22609
|
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
22574
22610
|
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
@@ -22760,15 +22796,13 @@ const WSDisconnectionForm = _ref => {
|
|
|
22760
22796
|
}
|
|
22761
22797
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
22762
22798
|
type: "number",
|
|
22763
|
-
min: "1",
|
|
22764
|
-
max: "24",
|
|
22765
22799
|
value: disconnectionData.requestedPeriodMonths,
|
|
22766
22800
|
onChange: event => {
|
|
22767
|
-
const months =
|
|
22801
|
+
const months = event.target.value;
|
|
22768
22802
|
setDisconnectionData({
|
|
22769
22803
|
...disconnectionData,
|
|
22770
22804
|
requestedPeriodMonths: months,
|
|
22771
|
-
endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
|
|
22805
|
+
endDate: disconnectionData.date && Number(months) > 0 ? format(addMonths(new Date(disconnectionData.date), Number(months)), "yyyy-MM-dd") : ""
|
|
22772
22806
|
});
|
|
22773
22807
|
}
|
|
22774
22808
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -22776,7 +22810,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22776
22810
|
fontWeight: 600,
|
|
22777
22811
|
color: "#4f6380"
|
|
22778
22812
|
}
|
|
22779
|
-
}, "Months
|
|
22813
|
+
}, "Months")), /*#__PURE__*/React__default.createElement("div", {
|
|
22780
22814
|
style: {
|
|
22781
22815
|
marginTop: "12px",
|
|
22782
22816
|
padding: "16px",
|
|
@@ -22815,9 +22849,10 @@ const WSDisconnectionForm = _ref => {
|
|
|
22815
22849
|
isMandatory: false,
|
|
22816
22850
|
optionKey: "i18nKey",
|
|
22817
22851
|
t: t,
|
|
22852
|
+
key: ((_disconnectionData$ty25 = disconnectionData.type) === null || _disconnectionData$ty25 === void 0 ? void 0 : (_disconnectionData$ty26 = _disconnectionData$ty25.value) === null || _disconnectionData$ty26 === void 0 ? void 0 : _disconnectionData$ty26.code) || "disconnection-type",
|
|
22818
22853
|
name: "reason",
|
|
22819
|
-
value: (_disconnectionData$
|
|
22820
|
-
selectedOption: (_disconnectionData$
|
|
22854
|
+
value: (_disconnectionData$re4 = disconnectionData.reason) === null || _disconnectionData$re4 === void 0 ? void 0 : (_disconnectionData$re5 = _disconnectionData$re4.value) === null || _disconnectionData$re5 === void 0 ? void 0 : _disconnectionData$re5.code,
|
|
22855
|
+
selectedOption: (_disconnectionData$re6 = disconnectionData.reason) === null || _disconnectionData$re6 === void 0 ? void 0 : _disconnectionData$re6.value,
|
|
22821
22856
|
select: e => filedChange({
|
|
22822
22857
|
code: "reason",
|
|
22823
22858
|
value: e
|
|
@@ -22842,7 +22877,6 @@ const WSDisconnectionForm = _ref => {
|
|
|
22842
22877
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
22843
22878
|
label: t("ACTION_TEST_SUBMIT"),
|
|
22844
22879
|
onSubmit: () => onSubmit(disconnectionData),
|
|
22845
|
-
disabled: !(disconnectionData !== null && disconnectionData !== void 0 && (_disconnectionData$re9 = disconnectionData.reason) !== null && _disconnectionData$re9 !== void 0 && (_disconnectionData$re0 = _disconnectionData$re9.value) !== null && _disconnectionData$re0 !== void 0 && _disconnectionData$re0.code) || !(disconnectionData !== null && disconnectionData !== void 0 && disconnectionData.date) || !(disconnectionData !== null && disconnectionData !== void 0 && (_disconnectionData$ty25 = disconnectionData.type) !== null && _disconnectionData$ty25 !== void 0 && (_disconnectionData$ty26 = _disconnectionData$ty25.value) !== null && _disconnectionData$ty26 !== void 0 && _disconnectionData$ty26.code) || (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$ty27 = disconnectionData.type) === null || _disconnectionData$ty27 === void 0 ? void 0 : (_disconnectionData$ty28 = _disconnectionData$ty27.value) === null || _disconnectionData$ty28 === void 0 ? void 0 : _disconnectionData$ty28.code) === "Temporary" && !(disconnectionData !== null && disconnectionData !== void 0 && disconnectionData.endDate),
|
|
22846
22880
|
style: {
|
|
22847
22881
|
margin: "10px 10px 0px 0px"
|
|
22848
22882
|
}
|
|
@@ -22850,12 +22884,13 @@ const WSDisconnectionForm = _ref => {
|
|
|
22850
22884
|
};
|
|
22851
22885
|
|
|
22852
22886
|
const WSRestorationForm = _ref => {
|
|
22853
|
-
var _applicationData$appl, _applicationData$
|
|
22887
|
+
var _location$state, _applicationData$appl, _applicationData$appl6, _applicationData$appl7, _applicationData$appl8, _applicationData$appl9, _disconnectionData$re5, _applicationData$appl0;
|
|
22854
22888
|
let {
|
|
22855
22889
|
t,
|
|
22856
22890
|
config,
|
|
22857
22891
|
onSelect,
|
|
22858
|
-
userType
|
|
22892
|
+
userType,
|
|
22893
|
+
flow
|
|
22859
22894
|
} = _ref;
|
|
22860
22895
|
const stateCode = Digit.ULBService.getStateId();
|
|
22861
22896
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
@@ -22865,21 +22900,30 @@ const WSRestorationForm = _ref => {
|
|
|
22865
22900
|
const history = reactRouterDom.useHistory();
|
|
22866
22901
|
const match = reactRouterDom.useRouteMatch();
|
|
22867
22902
|
const location = reactRouterDom.useLocation();
|
|
22903
|
+
const routeConnection = ((_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.connection) || {};
|
|
22868
22904
|
const queryParams = new URLSearchParams(location.search);
|
|
22869
22905
|
const connectionNumberFromQuery = queryParams.get("connectionNumber") || queryParams.get("applicationNumber") || "";
|
|
22870
|
-
const [searchConnNo, setSearchConnNo] = React.useState(connectionNumberFromQuery || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl = applicationData.applicationData) === null || _applicationData$appl === void 0 ? void 0 : _applicationData$appl.connectionNo) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.connectionNo) || "");
|
|
22906
|
+
const [searchConnNo, setSearchConnNo] = React.useState(connectionNumberFromQuery || (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl = applicationData.applicationData) === null || _applicationData$appl === void 0 ? void 0 : _applicationData$appl.connectionNo) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.connectionNo) || (routeConnection === null || routeConnection === void 0 ? void 0 : routeConnection.connectionNo) || "");
|
|
22871
22907
|
const [isSearching, setIsSearching] = React.useState(false);
|
|
22872
22908
|
const [disconnectionData, setDisconnectionData] = React.useState({
|
|
22873
|
-
type: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.type : "",
|
|
22874
|
-
date: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
|
|
22875
|
-
reason: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
|
|
22876
|
-
documents: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
|
|
22909
|
+
type: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData === null || applicationData === void 0 ? void 0 : applicationData.WSDisconnectionForm.type : "",
|
|
22910
|
+
date: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData === null || applicationData === void 0 ? void 0 : applicationData.WSDisconnectionForm.date : "",
|
|
22911
|
+
reason: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData === null || applicationData === void 0 ? void 0 : applicationData.WSDisconnectionForm.reason : "",
|
|
22912
|
+
documents: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData === null || applicationData === void 0 ? void 0 : applicationData.WSDisconnectionForm.documents : []
|
|
22877
22913
|
});
|
|
22878
|
-
const [documents, setDocuments] = React.useState(applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
|
|
22914
|
+
const [documents, setDocuments] = React.useState(applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData === null || applicationData === void 0 ? void 0 : applicationData.WSDisconnectionForm.documents : []);
|
|
22879
22915
|
const [error, setError] = React.useState(null);
|
|
22880
22916
|
const [disconnectionTypeList, setDisconnectionTypeList] = React.useState([]);
|
|
22881
22917
|
const [checkRequiredFields, setCheckRequiredFields] = React.useState(false);
|
|
22882
22918
|
const [isEnableLoader, setIsEnableLoader] = React.useState(false);
|
|
22919
|
+
const [ownershipDocument, setOwnershipDocument] = React.useState(null);
|
|
22920
|
+
const [isAltered, setIsAltered] = React.useState(false);
|
|
22921
|
+
const [isModified, setIsModified] = React.useState(false);
|
|
22922
|
+
const [dwellingUnits, setDwellingUnits] = React.useState("");
|
|
22923
|
+
const [extendedArea, setExtendedArea] = React.useState("");
|
|
22924
|
+
const [showDemandClearance, setShowDemandClearance] = React.useState(false);
|
|
22925
|
+
const [estimateData, setEstimateData] = React.useState(null);
|
|
22926
|
+
const [estimateLoading, setEstimateLoading] = React.useState(false);
|
|
22883
22927
|
const {
|
|
22884
22928
|
isMdmsLoading,
|
|
22885
22929
|
data: mdmsData
|
|
@@ -22945,13 +22989,17 @@ const WSRestorationForm = _ref => {
|
|
|
22945
22989
|
isConnectionSearch: true
|
|
22946
22990
|
};
|
|
22947
22991
|
let detectedService = "WATER";
|
|
22992
|
+
const getConnections = (response, key) => {
|
|
22993
|
+
var _response$data, _response$response, _response$response$da;
|
|
22994
|
+
return (response === null || response === void 0 ? void 0 : response[key]) || (response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data[key]) || (response === null || response === void 0 ? void 0 : (_response$response = response.response) === null || _response$response === void 0 ? void 0 : (_response$response$da = _response$response.data) === null || _response$response$da === void 0 ? void 0 : _response$response$da[key]) || [];
|
|
22995
|
+
};
|
|
22948
22996
|
return Promise.resolve(Digit.WSService.search({
|
|
22949
22997
|
tenantId,
|
|
22950
22998
|
filters: searchParams,
|
|
22951
22999
|
businessService: "WS"
|
|
22952
23000
|
}).catch(() => null)).then(function (wsRes) {
|
|
22953
|
-
var _wsRes$WaterConnectio;
|
|
22954
23001
|
function _temp4() {
|
|
23002
|
+
var _conn, _conn2;
|
|
22955
23003
|
function _temp2() {
|
|
22956
23004
|
const fullData = {
|
|
22957
23005
|
applicationData: conn,
|
|
@@ -22963,7 +23011,7 @@ const WSRestorationForm = _ref => {
|
|
|
22963
23011
|
Digit.SessionStorage.set("WS_DISCONNECTION", fullData);
|
|
22964
23012
|
setIsSearching(false);
|
|
22965
23013
|
}
|
|
22966
|
-
if (!conn) {
|
|
23014
|
+
if (!((_conn = conn) !== null && _conn !== void 0 && _conn.connectionNo) && !((_conn2 = conn) !== null && _conn2 !== void 0 && _conn2.applicationNo)) {
|
|
22967
23015
|
setIsSearching(false);
|
|
22968
23016
|
setError({
|
|
22969
23017
|
key: "error",
|
|
@@ -22974,11 +23022,11 @@ const WSRestorationForm = _ref => {
|
|
|
22974
23022
|
}
|
|
22975
23023
|
conn.serviceType = detectedService;
|
|
22976
23024
|
let propertyDetails = null;
|
|
22977
|
-
const _temp = function (
|
|
22978
|
-
if ((
|
|
22979
|
-
var
|
|
23025
|
+
const _temp = function (_conn3) {
|
|
23026
|
+
if ((_conn3 = conn) !== null && _conn3 !== void 0 && _conn3.propertyId) {
|
|
23027
|
+
var _conn4;
|
|
22980
23028
|
return Promise.resolve(Digit.PTService.search({
|
|
22981
|
-
tenantId: ((
|
|
23029
|
+
tenantId: ((_conn4 = conn) === null || _conn4 === void 0 ? void 0 : _conn4.tenantId) || tenantId,
|
|
22982
23030
|
filters: {
|
|
22983
23031
|
propertyIds: conn.propertyId
|
|
22984
23032
|
},
|
|
@@ -22991,7 +23039,7 @@ const WSRestorationForm = _ref => {
|
|
|
22991
23039
|
}();
|
|
22992
23040
|
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
22993
23041
|
}
|
|
22994
|
-
let conn = wsRes
|
|
23042
|
+
let conn = getConnections(wsRes, "WaterConnection")[0];
|
|
22995
23043
|
const _temp3 = function () {
|
|
22996
23044
|
if (!conn) {
|
|
22997
23045
|
return Promise.resolve(Digit.WSService.search({
|
|
@@ -22999,8 +23047,7 @@ const WSRestorationForm = _ref => {
|
|
|
22999
23047
|
filters: searchParams,
|
|
23000
23048
|
businessService: "SW"
|
|
23001
23049
|
}).catch(() => null)).then(function (swRes) {
|
|
23002
|
-
|
|
23003
|
-
conn = swRes === null || swRes === void 0 ? void 0 : (_swRes$SewerageConnec = swRes.SewerageConnections) === null || _swRes$SewerageConnec === void 0 ? void 0 : _swRes$SewerageConnec[0];
|
|
23050
|
+
conn = getConnections(swRes, "SewerageConnections")[0];
|
|
23004
23051
|
if (conn) detectedService = "SEWERAGE";
|
|
23005
23052
|
});
|
|
23006
23053
|
}
|
|
@@ -23231,7 +23278,7 @@ const WSRestorationForm = _ref => {
|
|
|
23231
23278
|
}
|
|
23232
23279
|
};
|
|
23233
23280
|
if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
23234
|
-
if (userType ===
|
|
23281
|
+
if (userType === "citizen" && flow !== "reconnection") {
|
|
23235
23282
|
var _disconnectionData$re3, _disconnectionData$re4;
|
|
23236
23283
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
23237
23284
|
style: {
|
|
@@ -23306,6 +23353,508 @@ const WSRestorationForm = _ref => {
|
|
|
23306
23353
|
onClose: () => setError(null)
|
|
23307
23354
|
})))));
|
|
23308
23355
|
}
|
|
23356
|
+
if (flow === "reconnection") {
|
|
23357
|
+
var _applicationData$appl4, _applicationData$appl5, _connection$property2, _connection$property3, _estimateData$Calcula, _estimateData$Calcula2;
|
|
23358
|
+
const connection = applicationData !== null && applicationData !== void 0 && (_applicationData$appl4 = applicationData.applicationData) !== null && _applicationData$appl4 !== void 0 && _applicationData$appl4.connectionNo || applicationData !== null && applicationData !== void 0 && (_applicationData$appl5 = applicationData.applicationData) !== null && _applicationData$appl5 !== void 0 && _applicationData$appl5.applicationNo ? applicationData.applicationData : routeConnection || {};
|
|
23359
|
+
const originalArea = Number((connection === null || connection === void 0 ? void 0 : (_connection$property2 = connection.property) === null || _connection$property2 === void 0 ? void 0 : _connection$property2.landArea) || (connection === null || connection === void 0 ? void 0 : (_connection$property3 = connection.property) === null || _connection$property3 === void 0 ? void 0 : _connection$property3.plotArea) || 150) || 150;
|
|
23360
|
+
const areaAdded = Number(extendedArea) || 0;
|
|
23361
|
+
const totalArea = originalArea + areaAdded;
|
|
23362
|
+
const estimateRows = (estimateData === null || estimateData === void 0 ? void 0 : (_estimateData$Calcula = estimateData.Calculation) === null || _estimateData$Calcula === void 0 ? void 0 : (_estimateData$Calcula2 = _estimateData$Calcula[0]) === null || _estimateData$Calcula2 === void 0 ? void 0 : _estimateData$Calcula2.taxHeadEstimates) || [];
|
|
23363
|
+
const estimateTotal = estimateRows.reduce((total, item) => total + Number((item === null || item === void 0 ? void 0 : item.estimateAmount) ?? (item === null || item === void 0 ? void 0 : item.amount) ?? 0), 0);
|
|
23364
|
+
const formatEstimateLabel = code => String(code || "Demand charge").replace(/^WS_/, "").replace(/_/g, " ").replace(/\b\w/g, letter => letter.toUpperCase());
|
|
23365
|
+
const handleOwnershipUpload = function (event) {
|
|
23366
|
+
try {
|
|
23367
|
+
var _event$target, _event$target$files;
|
|
23368
|
+
const file = event === null || event === void 0 ? void 0 : (_event$target = event.target) === null || _event$target === void 0 ? void 0 : (_event$target$files = _event$target.files) === null || _event$target$files === void 0 ? void 0 : _event$target$files[0];
|
|
23369
|
+
if (!file) return Promise.resolve();
|
|
23370
|
+
if (file.size > 5242880 || file.type && file.type !== "application/pdf") {
|
|
23371
|
+
setError({
|
|
23372
|
+
key: "error",
|
|
23373
|
+
message: "Only PDF files up to 5MB are allowed"
|
|
23374
|
+
});
|
|
23375
|
+
return Promise.resolve();
|
|
23376
|
+
}
|
|
23377
|
+
return Promise.resolve(_catch(function () {
|
|
23378
|
+
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
|
|
23379
|
+
var _response$data2, _response$data2$files, _response$data2$files2;
|
|
23380
|
+
const fileStoreId = response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files) === null || _response$data2$files === void 0 ? void 0 : (_response$data2$files2 = _response$data2$files[0]) === null || _response$data2$files2 === void 0 ? void 0 : _response$data2$files2.fileStoreId;
|
|
23381
|
+
if (!fileStoreId) throw new Error("File upload failed");
|
|
23382
|
+
setOwnershipDocument({
|
|
23383
|
+
fileStoreId,
|
|
23384
|
+
fileName: file.name
|
|
23385
|
+
});
|
|
23386
|
+
});
|
|
23387
|
+
}, function () {
|
|
23388
|
+
setError({
|
|
23389
|
+
key: "error",
|
|
23390
|
+
message: "CS_FILE_UPLOAD_ERROR"
|
|
23391
|
+
});
|
|
23392
|
+
}));
|
|
23393
|
+
} catch (e) {
|
|
23394
|
+
return Promise.reject(e);
|
|
23395
|
+
}
|
|
23396
|
+
};
|
|
23397
|
+
const handleProceedToDemand = function () {
|
|
23398
|
+
try {
|
|
23399
|
+
if (!ownershipDocument) {
|
|
23400
|
+
setError({
|
|
23401
|
+
key: "error",
|
|
23402
|
+
message: "Please upload property ownership proof."
|
|
23403
|
+
});
|
|
23404
|
+
return Promise.resolve();
|
|
23405
|
+
}
|
|
23406
|
+
setEstimateLoading(true);
|
|
23407
|
+
return Promise.resolve(_finallyRethrows(function () {
|
|
23408
|
+
return _catch(function () {
|
|
23409
|
+
const serviceType = String((connection === null || connection === void 0 ? void 0 : connection.serviceType) || (connection === null || connection === void 0 ? void 0 : connection.service) || "WATER").toUpperCase() === "SEWERAGE" ? "SEWERAGE" : "WATER";
|
|
23410
|
+
const connectionKey = serviceType === "WATER" ? "waterConnection" : "sewerageConnection";
|
|
23411
|
+
const estimateConnection = {
|
|
23412
|
+
...connection,
|
|
23413
|
+
applicationType: serviceType === "WATER" ? "WATER_RECONNECTION" : "SEWERAGE_RECONNECTION",
|
|
23414
|
+
dateEffectiveFrom: Date.now(),
|
|
23415
|
+
isdisconnection: false,
|
|
23416
|
+
isDisconnectionTemporary: true,
|
|
23417
|
+
reconnectionReason: "RECONNECTION",
|
|
23418
|
+
disconnectionReason: "",
|
|
23419
|
+
water: serviceType === "WATER",
|
|
23420
|
+
sewerage: serviceType === "SEWERAGE",
|
|
23421
|
+
service: serviceType === "WATER" ? "Water" : "Sewerage"
|
|
23422
|
+
};
|
|
23423
|
+
const estimatePayload = {
|
|
23424
|
+
CalculationCriteria: [{
|
|
23425
|
+
applicationNo: estimateConnection === null || estimateConnection === void 0 ? void 0 : estimateConnection.applicationNo,
|
|
23426
|
+
tenantId: (estimateConnection === null || estimateConnection === void 0 ? void 0 : estimateConnection.tenantId) || tenantId,
|
|
23427
|
+
[connectionKey]: estimateConnection
|
|
23428
|
+
}],
|
|
23429
|
+
isconnectionCalculation: false
|
|
23430
|
+
};
|
|
23431
|
+
return Promise.resolve(Digit.WSService.wsCalculationEstimate(estimatePayload, serviceType === "WATER" ? "WS" : "SW")).then(function (estimateResponse) {
|
|
23432
|
+
var _estimateResponse$Cal, _estimateResponse$Cal2;
|
|
23433
|
+
const taxHeadEstimates = (estimateResponse === null || estimateResponse === void 0 ? void 0 : (_estimateResponse$Cal = estimateResponse.Calculation) === null || _estimateResponse$Cal === void 0 ? void 0 : (_estimateResponse$Cal2 = _estimateResponse$Cal[0]) === null || _estimateResponse$Cal2 === void 0 ? void 0 : _estimateResponse$Cal2.taxHeadEstimates) || [];
|
|
23434
|
+
const allowedFees = ["WS_RECONNECTION_FEE", "SW_RECONNECTION_FEE", "WS_DISCONNECTION_FEE", "SW_DISCONNECTION_FEE"];
|
|
23435
|
+
const validFees = taxHeadEstimates.filter(item => {
|
|
23436
|
+
const code = String((item === null || item === void 0 ? void 0 : item.taxHeadCode) || "").toUpperCase();
|
|
23437
|
+
return allowedFees.includes(code);
|
|
23438
|
+
});
|
|
23439
|
+
if (validFees.length === 0) throw new Error("Reconnection fee was not returned by the estimate service");
|
|
23440
|
+
const totalAmt = validFees.reduce((acc, curr) => acc + Number((curr === null || curr === void 0 ? void 0 : curr.estimateAmount) ?? (curr === null || curr === void 0 ? void 0 : curr.amount) ?? 0), 0);
|
|
23441
|
+
setEstimateData({
|
|
23442
|
+
Calculation: [{
|
|
23443
|
+
...estimateResponse.Calculation[0],
|
|
23444
|
+
taxHeadEstimates: validFees,
|
|
23445
|
+
totalAmount: totalAmt
|
|
23446
|
+
}]
|
|
23447
|
+
});
|
|
23448
|
+
setShowDemandClearance(true);
|
|
23449
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23450
|
+
...applicationData,
|
|
23451
|
+
reconnectionValidation: {
|
|
23452
|
+
isAltered,
|
|
23453
|
+
isModified,
|
|
23454
|
+
dwellingUnits,
|
|
23455
|
+
extendedArea,
|
|
23456
|
+
ownershipProofFileStoreId: ownershipDocument === null || ownershipDocument === void 0 ? void 0 : ownershipDocument.fileStoreId
|
|
23457
|
+
}
|
|
23458
|
+
});
|
|
23459
|
+
});
|
|
23460
|
+
}, function (estimateError) {
|
|
23461
|
+
var _estimateError$respon, _estimateError$respon2, _estimateError$respon3, _estimateError$respon4;
|
|
23462
|
+
setError({
|
|
23463
|
+
key: "error",
|
|
23464
|
+
message: (estimateError === null || estimateError === void 0 ? void 0 : (_estimateError$respon = estimateError.response) === null || _estimateError$respon === void 0 ? void 0 : (_estimateError$respon2 = _estimateError$respon.data) === null || _estimateError$respon2 === void 0 ? void 0 : (_estimateError$respon3 = _estimateError$respon2.Errors) === null || _estimateError$respon3 === void 0 ? void 0 : (_estimateError$respon4 = _estimateError$respon3[0]) === null || _estimateError$respon4 === void 0 ? void 0 : _estimateError$respon4.message) || "Unable to calculate reconnection demand"
|
|
23465
|
+
});
|
|
23466
|
+
});
|
|
23467
|
+
}, function (_wasThrown, _result3) {
|
|
23468
|
+
setEstimateLoading(false);
|
|
23469
|
+
if (_wasThrown) throw _result3;
|
|
23470
|
+
return _result3;
|
|
23471
|
+
}));
|
|
23472
|
+
} catch (e) {
|
|
23473
|
+
return Promise.reject(e);
|
|
23474
|
+
}
|
|
23475
|
+
};
|
|
23476
|
+
const executeMutation = (mutation, payload) => new Promise((resolve, reject) => mutation(payload, {
|
|
23477
|
+
onSuccess: resolve,
|
|
23478
|
+
onError: reject
|
|
23479
|
+
}));
|
|
23480
|
+
const handleSubmitReconnection = function () {
|
|
23481
|
+
try {
|
|
23482
|
+
setIsEnableLoader(true);
|
|
23483
|
+
return Promise.resolve(_catch(function () {
|
|
23484
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2, _latestApplicationDat;
|
|
23485
|
+
const storedApplicationData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
23486
|
+
const hasConnection = data => {
|
|
23487
|
+
var _data$applicationData, _data$applicationData2;
|
|
23488
|
+
return Boolean((data === null || data === void 0 ? void 0 : (_data$applicationData = data.applicationData) === null || _data$applicationData === void 0 ? void 0 : _data$applicationData.connectionNo) || (data === null || data === void 0 ? void 0 : (_data$applicationData2 = data.applicationData) === null || _data$applicationData2 === void 0 ? void 0 : _data$applicationData2.applicationNo));
|
|
23489
|
+
};
|
|
23490
|
+
const latestApplicationData = hasConnection(storedApplicationData) ? storedApplicationData : hasConnection(applicationData) ? applicationData : {
|
|
23491
|
+
...applicationData,
|
|
23492
|
+
applicationData: routeConnection
|
|
23493
|
+
};
|
|
23494
|
+
const submittedConnection = hasConnection(latestApplicationData) ? latestApplicationData.applicationData : routeConnection !== null && routeConnection !== void 0 && routeConnection.connectionNo || routeConnection !== null && routeConnection !== void 0 && routeConnection.applicationNo ? routeConnection : connection;
|
|
23495
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23496
|
+
...latestApplicationData,
|
|
23497
|
+
applicationData: submittedConnection
|
|
23498
|
+
});
|
|
23499
|
+
if (!(submittedConnection !== null && submittedConnection !== void 0 && submittedConnection.connectionNo) && !(submittedConnection !== null && submittedConnection !== void 0 && submittedConnection.applicationNo)) {
|
|
23500
|
+
throw new Error("Connection details were not loaded from search. Please search the connection again.");
|
|
23501
|
+
}
|
|
23502
|
+
const connectionApplicationType = String((submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.applicationType) || "").toUpperCase();
|
|
23503
|
+
const serviceType = (latestApplicationData === null || latestApplicationData === void 0 ? void 0 : latestApplicationData.serviceType) || (submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.serviceType) || ((submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.sewerage) === true || (submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.service) === "Sewerage" || connectionApplicationType.includes("SEWERAGE") ? "SEWERAGE" : "WATER");
|
|
23504
|
+
const user = (_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type;
|
|
23505
|
+
const connectionKey = serviceType === "WATER" ? "WaterConnection" : "SewerageConnection";
|
|
23506
|
+
const responseKey = serviceType === "WATER" ? "WaterConnection" : "SewerageConnections";
|
|
23507
|
+
const existingDocuments = Array.isArray(submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.documents) ? submittedConnection.documents : [];
|
|
23508
|
+
const ownershipProof = ownershipDocument ? [{
|
|
23509
|
+
fileStoreId: ownershipDocument.fileStoreId,
|
|
23510
|
+
documentUid: ownershipDocument.fileStoreId,
|
|
23511
|
+
documentType: "PROPERTY_OWNERSHIP_PROOF",
|
|
23512
|
+
status: "ACTIVE",
|
|
23513
|
+
id: null
|
|
23514
|
+
}] : [];
|
|
23515
|
+
const docs = [...existingDocuments, ...ownershipProof];
|
|
23516
|
+
const reconnectionValidation = (latestApplicationData === null || latestApplicationData === void 0 ? void 0 : latestApplicationData.reconnectionValidation) || {};
|
|
23517
|
+
const baseAdditionalDetails = {
|
|
23518
|
+
...(submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.additionalDetails),
|
|
23519
|
+
...reconnectionValidation,
|
|
23520
|
+
isAltered: reconnectionValidation.isAltered ?? isAltered,
|
|
23521
|
+
isModified: reconnectionValidation.isModified ?? isModified,
|
|
23522
|
+
ownershipProofFileStoreId: reconnectionValidation.ownershipProofFileStoreId || (ownershipDocument === null || ownershipDocument === void 0 ? void 0 : ownershipDocument.fileStoreId)
|
|
23523
|
+
};
|
|
23524
|
+
const finalDwellingUnits = reconnectionValidation.dwellingUnits ?? dwellingUnits;
|
|
23525
|
+
if (finalDwellingUnits) baseAdditionalDetails.dwellingUnits = finalDwellingUnits;
|
|
23526
|
+
const finalExtendedArea = reconnectionValidation.extendedArea ?? extendedArea;
|
|
23527
|
+
if (finalExtendedArea) baseAdditionalDetails.extendedArea = finalExtendedArea;
|
|
23528
|
+
const createPayload = {
|
|
23529
|
+
[connectionKey]: {
|
|
23530
|
+
...submittedConnection,
|
|
23531
|
+
property: (submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.property) || (latestApplicationData === null || latestApplicationData === void 0 ? void 0 : latestApplicationData.propertyDetails),
|
|
23532
|
+
propertyId: (submittedConnection === null || submittedConnection === void 0 ? void 0 : submittedConnection.propertyId) || (latestApplicationData === null || latestApplicationData === void 0 ? void 0 : (_latestApplicationDat = latestApplicationData.propertyDetails) === null || _latestApplicationDat === void 0 ? void 0 : _latestApplicationDat.propertyId),
|
|
23533
|
+
applicationType: serviceType === "WATER" ? "WATER_RECONNECTION" : "SEWERAGE_RECONNECTION",
|
|
23534
|
+
dateEffectiveFrom: Date.now(),
|
|
23535
|
+
isdisconnection: false,
|
|
23536
|
+
isDisconnectionTemporary: true,
|
|
23537
|
+
reconnectionReason: "RECONNECTION",
|
|
23538
|
+
disconnectionReason: "",
|
|
23539
|
+
documents: docs,
|
|
23540
|
+
water: serviceType === "WATER",
|
|
23541
|
+
sewerage: serviceType === "SEWERAGE",
|
|
23542
|
+
service: serviceType === "WATER" ? "Water" : "Sewerage",
|
|
23543
|
+
additionalDetails: baseAdditionalDetails,
|
|
23544
|
+
processInstance: {
|
|
23545
|
+
...(connection === null || connection === void 0 ? void 0 : connection.processInstance),
|
|
23546
|
+
action: "INITIATE",
|
|
23547
|
+
businessService: serviceType === "WATER" ? "WSReconnection" : "SWReconnection"
|
|
23548
|
+
},
|
|
23549
|
+
channel: (user === null || user === void 0 ? void 0 : user.toUpperCase()) === "CITIZEN" ? "CITIZEN" : "CFC_COUNTER"
|
|
23550
|
+
},
|
|
23551
|
+
reconnectRequest: true,
|
|
23552
|
+
disconnectRequest: false
|
|
23553
|
+
};
|
|
23554
|
+
const createMutation = serviceType === "WATER" ? waterMutation : sewerageMutation;
|
|
23555
|
+
const updateMutation = serviceType === "WATER" ? waterUpdateMutation : sewerageUpdateMutation;
|
|
23556
|
+
return Promise.resolve(executeMutation(createMutation, createPayload)).then(function (createResponse) {
|
|
23557
|
+
var _createResponse$respo;
|
|
23558
|
+
const createdConnection = createResponse === null || createResponse === void 0 ? void 0 : (_createResponse$respo = createResponse[responseKey]) === null || _createResponse$respo === void 0 ? void 0 : _createResponse$respo[0];
|
|
23559
|
+
return Promise.resolve(updatePayloadOfWSRestoration(createdConnection, serviceType)).then(function (updateConnection) {
|
|
23560
|
+
const updatePayload = {
|
|
23561
|
+
[connectionKey]: updateConnection,
|
|
23562
|
+
reconnectRequest: true,
|
|
23563
|
+
disconnectRequest: false
|
|
23564
|
+
};
|
|
23565
|
+
return Promise.resolve(executeMutation(updateMutation, updatePayload)).then(function (updateResponse) {
|
|
23566
|
+
var _updateResponse$respo;
|
|
23567
|
+
const finalConnection = (updateResponse === null || updateResponse === void 0 ? void 0 : (_updateResponse$respo = updateResponse[responseKey]) === null || _updateResponse$respo === void 0 ? void 0 : _updateResponse$respo[0]) || createdConnection;
|
|
23568
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23569
|
+
...applicationData,
|
|
23570
|
+
DisconnectionResponse: finalConnection
|
|
23571
|
+
});
|
|
23572
|
+
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);
|
|
23573
|
+
history.push(responsePath);
|
|
23574
|
+
});
|
|
23575
|
+
});
|
|
23576
|
+
});
|
|
23577
|
+
}, function (submitError) {
|
|
23578
|
+
var _submitError$response, _submitError$response2, _submitError$response3, _submitError$response4;
|
|
23579
|
+
setIsEnableLoader(false);
|
|
23580
|
+
setError({
|
|
23581
|
+
key: "error",
|
|
23582
|
+
message: (submitError === null || submitError === void 0 ? void 0 : (_submitError$response = submitError.response) === null || _submitError$response === void 0 ? void 0 : (_submitError$response2 = _submitError$response.data) === null || _submitError$response2 === void 0 ? void 0 : (_submitError$response3 = _submitError$response2.Errors) === null || _submitError$response3 === void 0 ? void 0 : (_submitError$response4 = _submitError$response3[0]) === null || _submitError$response4 === void 0 ? void 0 : _submitError$response4.message) || (submitError === null || submitError === void 0 ? void 0 : submitError.message) || "Unable to submit reconnection application"
|
|
23583
|
+
});
|
|
23584
|
+
}));
|
|
23585
|
+
} catch (e) {
|
|
23586
|
+
return Promise.reject(e);
|
|
23587
|
+
}
|
|
23588
|
+
};
|
|
23589
|
+
if (showDemandClearance) {
|
|
23590
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
23591
|
+
style: {
|
|
23592
|
+
padding: "24px",
|
|
23593
|
+
color: "#172b4d"
|
|
23594
|
+
}
|
|
23595
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
23596
|
+
styles: {
|
|
23597
|
+
fontSize: "24px",
|
|
23598
|
+
margin: "0 0 24px"
|
|
23599
|
+
}
|
|
23600
|
+
}, "\u25AD Government Reconnection Demand Clearance"), /*#__PURE__*/React__default.createElement("div", {
|
|
23601
|
+
style: {
|
|
23602
|
+
maxWidth: "620px",
|
|
23603
|
+
background: "#f7f9fc",
|
|
23604
|
+
border: "1px solid #dce5f0",
|
|
23605
|
+
borderRadius: "20px",
|
|
23606
|
+
padding: "26px"
|
|
23607
|
+
}
|
|
23608
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
23609
|
+
style: {
|
|
23610
|
+
color: "#8498b5",
|
|
23611
|
+
fontSize: "13px",
|
|
23612
|
+
letterSpacing: "1px",
|
|
23613
|
+
marginTop: 0
|
|
23614
|
+
}
|
|
23615
|
+
}, "DEMAND FEE ASSESSMENT"), estimateLoading ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null) : estimateRows.length > 0 ? estimateRows.map((item, index) => /*#__PURE__*/React__default.createElement("div", {
|
|
23616
|
+
key: (item === null || item === void 0 ? void 0 : item.taxHeadCode) || index,
|
|
23617
|
+
style: {
|
|
23618
|
+
display: "flex",
|
|
23619
|
+
justifyContent: "space-between",
|
|
23620
|
+
padding: "14px 0",
|
|
23621
|
+
borderBottom: "1px solid #e5ebf3"
|
|
23622
|
+
}
|
|
23623
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
23624
|
+
style: {
|
|
23625
|
+
color: "#597294"
|
|
23626
|
+
}
|
|
23627
|
+
}, formatEstimateLabel(item === null || item === void 0 ? void 0 : item.taxHeadCode)), /*#__PURE__*/React__default.createElement("strong", null, "\u20B9", Number((item === null || item === void 0 ? void 0 : item.estimateAmount) ?? (item === null || item === void 0 ? void 0 : item.amount) ?? 0).toLocaleString("en-IN")))) : /*#__PURE__*/React__default.createElement("div", {
|
|
23628
|
+
style: {
|
|
23629
|
+
color: "#597294",
|
|
23630
|
+
padding: "14px 0"
|
|
23631
|
+
}
|
|
23632
|
+
}, "No demand components were returned by the estimate service."), /*#__PURE__*/React__default.createElement("div", {
|
|
23633
|
+
style: {
|
|
23634
|
+
display: "flex",
|
|
23635
|
+
justifyContent: "space-between",
|
|
23636
|
+
padding: "14px",
|
|
23637
|
+
marginTop: "14px",
|
|
23638
|
+
border: "1px solid #cfe0ff",
|
|
23639
|
+
borderRadius: "12px",
|
|
23640
|
+
background: "#eef5ff",
|
|
23641
|
+
fontSize: "18px",
|
|
23642
|
+
fontWeight: 700
|
|
23643
|
+
}
|
|
23644
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "Total Demand Clearance Fee:"), /*#__PURE__*/React__default.createElement("span", {
|
|
23645
|
+
style: {
|
|
23646
|
+
color: "#224bd6"
|
|
23647
|
+
}
|
|
23648
|
+
}, "\u20B9", estimateTotal.toLocaleString("en-IN"))), /*#__PURE__*/React__default.createElement("p", {
|
|
23649
|
+
style: {
|
|
23650
|
+
color: "#8498b5",
|
|
23651
|
+
lineHeight: 1.6,
|
|
23652
|
+
marginBottom: 0
|
|
23653
|
+
}
|
|
23654
|
+
}, "All reconnection demands are auto-calculated by the Delhi Water Board central server in accordance with NCT tariff bylaws section 12.1.")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
23655
|
+
style: {
|
|
23656
|
+
display: "flex",
|
|
23657
|
+
justifyContent: "space-between",
|
|
23658
|
+
marginTop: "28px"
|
|
23659
|
+
}
|
|
23660
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23661
|
+
label: "\u2190 Back",
|
|
23662
|
+
onSubmit: () => setShowDemandClearance(false)
|
|
23663
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23664
|
+
label: isEnableLoader ? "Submitting..." : "Submit Reconnection",
|
|
23665
|
+
onSubmit: handleSubmitReconnection,
|
|
23666
|
+
disabled: isEnableLoader
|
|
23667
|
+
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
23668
|
+
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
23669
|
+
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
23670
|
+
onClose: () => setError(null)
|
|
23671
|
+
}));
|
|
23672
|
+
}
|
|
23673
|
+
const choiceStyle = selected => ({
|
|
23674
|
+
flex: 1,
|
|
23675
|
+
padding: "12px 16px",
|
|
23676
|
+
borderRadius: "14px",
|
|
23677
|
+
border: selected ? "1px solid #4b35f5" : "1px solid #d5deea",
|
|
23678
|
+
background: selected ? "#4b35f5" : "#fff",
|
|
23679
|
+
color: selected ? "#fff" : "#172b4d",
|
|
23680
|
+
fontWeight: 700,
|
|
23681
|
+
cursor: "pointer"
|
|
23682
|
+
});
|
|
23683
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
23684
|
+
style: {
|
|
23685
|
+
padding: "24px",
|
|
23686
|
+
color: "#172b4d"
|
|
23687
|
+
}
|
|
23688
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
23689
|
+
styles: {
|
|
23690
|
+
fontSize: "24px",
|
|
23691
|
+
margin: "0 0 24px"
|
|
23692
|
+
}
|
|
23693
|
+
}, "Ownership & Disconnection Validation"), /*#__PURE__*/React__default.createElement("div", {
|
|
23694
|
+
style: {
|
|
23695
|
+
display: "grid",
|
|
23696
|
+
gridTemplateColumns: "1fr 1fr",
|
|
23697
|
+
gap: "28px",
|
|
23698
|
+
marginBottom: "28px"
|
|
23699
|
+
}
|
|
23700
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
23701
|
+
style: {
|
|
23702
|
+
border: "1px solid #dce5f0",
|
|
23703
|
+
borderRadius: "20px",
|
|
23704
|
+
padding: "26px"
|
|
23705
|
+
}
|
|
23706
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
23707
|
+
style: {
|
|
23708
|
+
color: "#8498b5",
|
|
23709
|
+
fontSize: "13px",
|
|
23710
|
+
letterSpacing: "1px",
|
|
23711
|
+
marginTop: 0
|
|
23712
|
+
}
|
|
23713
|
+
}, "RECONNECTION AUTHORIZATION DOCUMENTS"), /*#__PURE__*/React__default.createElement("label", {
|
|
23714
|
+
style: {
|
|
23715
|
+
fontWeight: 700,
|
|
23716
|
+
display: "block",
|
|
23717
|
+
margin: "28px 0 8px"
|
|
23718
|
+
}
|
|
23719
|
+
}, "Upload Property Ownership Proof (Registry / Sale Deed)"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
|
|
23720
|
+
id: "reconnection-ownership-proof",
|
|
23721
|
+
accept: ".pdf",
|
|
23722
|
+
buttonType: "button",
|
|
23723
|
+
onUpload: handleOwnershipUpload,
|
|
23724
|
+
onDelete: () => setOwnershipDocument(null),
|
|
23725
|
+
message: (ownershipDocument === null || ownershipDocument === void 0 ? void 0 : ownershipDocument.fileName) || "Drag & drop your property deed PDF here or click to browse from files (Max 5MB)"
|
|
23726
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
23727
|
+
style: {
|
|
23728
|
+
background: "#f7f9fc",
|
|
23729
|
+
border: "1px solid #dce5f0",
|
|
23730
|
+
borderRadius: "20px",
|
|
23731
|
+
padding: "26px"
|
|
23732
|
+
}
|
|
23733
|
+
}, /*#__PURE__*/React__default.createElement("h3", {
|
|
23734
|
+
style: {
|
|
23735
|
+
margin: 0,
|
|
23736
|
+
fontSize: "16px"
|
|
23737
|
+
}
|
|
23738
|
+
}, "\u24D8 PROPERTY ALTERATION & EXTENSION ASSESSMENT"), /*#__PURE__*/React__default.createElement("p", {
|
|
23739
|
+
style: {
|
|
23740
|
+
color: "#597294",
|
|
23741
|
+
marginTop: "6px"
|
|
23742
|
+
}
|
|
23743
|
+
}, "Under Delhi Jal Board bylaws, please declare if there are any physical structural alterations, area extensions, dwelling unit additions, or changes to the original building plan/usage made during disconnection."), /*#__PURE__*/React__default.createElement("div", {
|
|
23744
|
+
style: {
|
|
23745
|
+
display: "grid",
|
|
23746
|
+
gridTemplateColumns: "1fr 1fr",
|
|
23747
|
+
gap: "28px"
|
|
23748
|
+
}
|
|
23749
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("label", {
|
|
23750
|
+
style: {
|
|
23751
|
+
display: "block",
|
|
23752
|
+
fontWeight: 700,
|
|
23753
|
+
margin: "12px 0"
|
|
23754
|
+
}
|
|
23755
|
+
}, "1. HAS THE PROPERTY BEEN PHYSICALLY ALTERED OR EXTENDED?"), /*#__PURE__*/React__default.createElement("div", {
|
|
23756
|
+
style: {
|
|
23757
|
+
display: "flex",
|
|
23758
|
+
gap: "10px"
|
|
23759
|
+
}
|
|
23760
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
23761
|
+
type: "button",
|
|
23762
|
+
style: choiceStyle(isAltered),
|
|
23763
|
+
onClick: () => setIsAltered(true)
|
|
23764
|
+
}, "Yes, Altered/Extended"), /*#__PURE__*/React__default.createElement("button", {
|
|
23765
|
+
type: "button",
|
|
23766
|
+
style: choiceStyle(!isAltered),
|
|
23767
|
+
onClick: () => setIsAltered(false)
|
|
23768
|
+
}, "No, Unchanged")), isAltered && /*#__PURE__*/React__default.createElement("input", {
|
|
23769
|
+
style: {
|
|
23770
|
+
width: "100%",
|
|
23771
|
+
padding: "12px",
|
|
23772
|
+
marginTop: "14px",
|
|
23773
|
+
border: "1px solid #d5deea",
|
|
23774
|
+
borderRadius: "14px",
|
|
23775
|
+
boxSizing: "border-box"
|
|
23776
|
+
},
|
|
23777
|
+
placeholder: "New dwelling units added (e.g. 1)",
|
|
23778
|
+
value: dwellingUnits,
|
|
23779
|
+
onChange: e => setDwellingUnits(e.target.value)
|
|
23780
|
+
})), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("label", {
|
|
23781
|
+
style: {
|
|
23782
|
+
display: "block",
|
|
23783
|
+
fontWeight: 700,
|
|
23784
|
+
margin: "12px 0"
|
|
23785
|
+
}
|
|
23786
|
+
}, "2. ANY MODIFICATION TO ORIGINAL BUILDING PLAN OR USAGE?"), /*#__PURE__*/React__default.createElement("div", {
|
|
23787
|
+
style: {
|
|
23788
|
+
display: "flex",
|
|
23789
|
+
gap: "10px"
|
|
23790
|
+
}
|
|
23791
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
23792
|
+
type: "button",
|
|
23793
|
+
style: choiceStyle(isModified),
|
|
23794
|
+
onClick: () => setIsModified(true)
|
|
23795
|
+
}, "Yes, Modified Plan/Usage"), /*#__PURE__*/React__default.createElement("button", {
|
|
23796
|
+
type: "button",
|
|
23797
|
+
style: choiceStyle(!isModified),
|
|
23798
|
+
onClick: () => setIsModified(false)
|
|
23799
|
+
}, "No, Unmodified")), isModified && /*#__PURE__*/React__default.createElement("input", {
|
|
23800
|
+
style: {
|
|
23801
|
+
width: "100%",
|
|
23802
|
+
padding: "12px",
|
|
23803
|
+
marginTop: "14px",
|
|
23804
|
+
border: "1px solid #d5deea",
|
|
23805
|
+
borderRadius: "14px",
|
|
23806
|
+
boxSizing: "border-box"
|
|
23807
|
+
},
|
|
23808
|
+
placeholder: "Area extended (Sq. M.) (e.g. 60)",
|
|
23809
|
+
value: extendedArea,
|
|
23810
|
+
onChange: e => setExtendedArea(e.target.value)
|
|
23811
|
+
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
23812
|
+
style: {
|
|
23813
|
+
background: "#f0f2ff",
|
|
23814
|
+
border: "1px solid #d7dcff",
|
|
23815
|
+
borderRadius: "16px",
|
|
23816
|
+
padding: "18px",
|
|
23817
|
+
marginTop: "20px"
|
|
23818
|
+
}
|
|
23819
|
+
}, /*#__PURE__*/React__default.createElement("strong", {
|
|
23820
|
+
style: {
|
|
23821
|
+
color: "#2d31c9"
|
|
23822
|
+
}
|
|
23823
|
+
}, "ASSESSMENT BREAKDOWN:"), /*#__PURE__*/React__default.createElement("div", {
|
|
23824
|
+
style: {
|
|
23825
|
+
display: "flex",
|
|
23826
|
+
justifyContent: "space-between",
|
|
23827
|
+
margin: "14px 0",
|
|
23828
|
+
gap: "18px"
|
|
23829
|
+
}
|
|
23830
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "Original Plot Size: ", /*#__PURE__*/React__default.createElement("b", null, originalArea, " Sq. M.")), /*#__PURE__*/React__default.createElement("span", null, "Extended Area: ", /*#__PURE__*/React__default.createElement("b", null, "+", areaAdded, " Sq. M.")), /*#__PURE__*/React__default.createElement("span", null, "New Total Area: ", /*#__PURE__*/React__default.createElement("b", null, totalArea, " Sq. M."))), /*#__PURE__*/React__default.createElement("div", {
|
|
23831
|
+
style: {
|
|
23832
|
+
borderTop: "1px solid #dce1ff",
|
|
23833
|
+
paddingTop: "12px",
|
|
23834
|
+
color: "#597294",
|
|
23835
|
+
lineHeight: 1.8
|
|
23836
|
+
}
|
|
23837
|
+
}, "\u2713 Total Area (", totalArea, " Sq. M.) is under 200 Sq. M.: Exempt from IFC.", /*#__PURE__*/React__default.createElement("br", null), "\u2713 No additional dwelling units registered.", /*#__PURE__*/React__default.createElement("br", null), "\u2713 No building plan or usage modifications declared."))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
23838
|
+
style: {
|
|
23839
|
+
display: "flex",
|
|
23840
|
+
justifyContent: "space-between",
|
|
23841
|
+
marginTop: "28px",
|
|
23842
|
+
borderTop: "1px solid #e5ebf3",
|
|
23843
|
+
paddingTop: "20px"
|
|
23844
|
+
}
|
|
23845
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23846
|
+
label: "\u2190 Back",
|
|
23847
|
+
onSubmit: () => history.goBack()
|
|
23848
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23849
|
+
label: "Proceed to Demand Note \u2192",
|
|
23850
|
+
onSubmit: handleProceedToDemand,
|
|
23851
|
+
disabled: estimateLoading
|
|
23852
|
+
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
23853
|
+
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
23854
|
+
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
23855
|
+
onClose: () => setError(null)
|
|
23856
|
+
}));
|
|
23857
|
+
}
|
|
23309
23858
|
console.log("applicationData", applicationData);
|
|
23310
23859
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
23311
23860
|
style: {
|
|
@@ -23327,7 +23876,7 @@ const WSRestorationForm = _ref => {
|
|
|
23327
23876
|
paddingTop: "20px",
|
|
23328
23877
|
marginTop: "10px"
|
|
23329
23878
|
}
|
|
23330
|
-
}, !(applicationData !== null && applicationData !== void 0 && (_applicationData$
|
|
23879
|
+
}, !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl6 = applicationData.applicationData) !== null && _applicationData$appl6 !== void 0 && _applicationData$appl6.connectionNo) ? /*#__PURE__*/React__default.createElement("div", {
|
|
23331
23880
|
style: {
|
|
23332
23881
|
marginBottom: "20px"
|
|
23333
23882
|
}
|
|
@@ -23356,17 +23905,17 @@ const WSRestorationForm = _ref => {
|
|
|
23356
23905
|
})))) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, null, t("CS_TITLE_APPLICATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
23357
23906
|
key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
|
|
23358
23907
|
label: `${t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL")}`,
|
|
23359
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23908
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl7 = applicationData.applicationData) === null || _applicationData$appl7 === void 0 ? void 0 : _applicationData$appl7.connectionNo,
|
|
23360
23909
|
className: "border-none"
|
|
23361
23910
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
23362
23911
|
key: t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL"),
|
|
23363
23912
|
label: `${t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL")}`,
|
|
23364
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23913
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl8 = applicationData.applicationData) === null || _applicationData$appl8 === void 0 ? void 0 : _applicationData$appl8.serviceType,
|
|
23365
23914
|
className: "border-none"
|
|
23366
23915
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
23367
23916
|
key: t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL"),
|
|
23368
23917
|
label: `${t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL")}`,
|
|
23369
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23918
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl9 = applicationData.applicationData) === null || _applicationData$appl9 === void 0 ? void 0 : _applicationData$appl9.propertyId,
|
|
23370
23919
|
className: "border-none"
|
|
23371
23920
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
23372
23921
|
style: {
|
|
@@ -23433,7 +23982,7 @@ const WSRestorationForm = _ref => {
|
|
|
23433
23982
|
style: {
|
|
23434
23983
|
margin: "10px 10px 0px 0px"
|
|
23435
23984
|
},
|
|
23436
|
-
disabled: !(applicationData !== null && applicationData !== void 0 && (_applicationData$
|
|
23985
|
+
disabled: !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl0 = applicationData.applicationData) !== null && _applicationData$appl0 !== void 0 && _applicationData$appl0.connectionNo) || isSearching
|
|
23437
23986
|
})));
|
|
23438
23987
|
};
|
|
23439
23988
|
|
|
@@ -24858,7 +25407,7 @@ const WSDjbEmployee = _ref => {
|
|
|
24858
25407
|
borderBottom: "1px solid #e0e0e0"
|
|
24859
25408
|
}
|
|
24860
25409
|
}, t("ABG_COMMON_TABLE_COL_ACTION")))), /*#__PURE__*/React__default.createElement("tbody", null, formData.dueVerification.map((dueItem, index) => {
|
|
24861
|
-
var _formData$serviceName, _formData$application, _dueItem$kno, _formData$serviceName2, _formData$application2;
|
|
25410
|
+
var _Digit$UserService$ge, _Digit$UserService$ge2, _formData$serviceName, _formData$application, _dueItem$kno, _formData$serviceName2, _formData$application2, _Digit$UserService$ge3, _Digit$UserService$ge4;
|
|
24862
25411
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
24863
25412
|
key: `due-${index}`,
|
|
24864
25413
|
style: {
|
|
@@ -24896,8 +25445,8 @@ const WSDjbEmployee = _ref => {
|
|
|
24896
25445
|
className: "link"
|
|
24897
25446
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
24898
25447
|
to: {
|
|
24899
|
-
pathname:
|
|
24900
|
-
search:
|
|
25448
|
+
pathname: ((_Digit$UserService$ge = Digit.UserService.getUser()) === null || _Digit$UserService$ge === void 0 ? void 0 : (_Digit$UserService$ge2 = _Digit$UserService$ge.info) === null || _Digit$UserService$ge2 === void 0 ? void 0 : _Digit$UserService$ge2.type) === "CITIZEN" ? `/digit-ui/citizen/payment/my-bills/${(formData === null || formData === void 0 ? void 0 : (_formData$serviceName = formData.serviceName) === null || _formData$serviceName === void 0 ? void 0 : _formData$serviceName.code) === "WATER" || formData !== null && formData !== void 0 && (_formData$application = formData.applicationType) !== null && _formData$application !== void 0 && _formData$application.includes("WATER") ? "WS" : "SW"}/${dueItem === null || dueItem === void 0 ? void 0 : (_dueItem$kno = dueItem.kno) === null || _dueItem$kno === void 0 ? void 0 : _dueItem$kno.replaceAll("/", "+")}` : `/digit-ui/employee/payment/collect/${(formData === null || formData === void 0 ? void 0 : (_formData$serviceName2 = formData.serviceName) === null || _formData$serviceName2 === void 0 ? void 0 : _formData$serviceName2.code) === "WATER" || formData !== null && formData !== void 0 && (_formData$application2 = formData.applicationType) !== null && _formData$application2 !== void 0 && _formData$application2.includes("WATER") ? "WS" : "SW"}/${encodeURIComponent((dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno) || "")}/${tenantId}`,
|
|
25449
|
+
search: ((_Digit$UserService$ge3 = Digit.UserService.getUser()) === null || _Digit$UserService$ge3 === void 0 ? void 0 : (_Digit$UserService$ge4 = _Digit$UserService$ge3.info) === null || _Digit$UserService$ge4 === void 0 ? void 0 : _Digit$UserService$ge4.type) === "CITIZEN" ? `?workflow=WNS&tenantId=${encodeURIComponent(tenantId || "")}&ConsumerName=${encodeURIComponent((dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName) || "")}&consumerCode=${encodeURIComponent((dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno) || "")}` : `?tenantId=${encodeURIComponent(tenantId || "")}&ISWSCON=true`,
|
|
24901
25450
|
state: {
|
|
24902
25451
|
fromApplicationDetails: true
|
|
24903
25452
|
}
|
|
@@ -26869,8 +27418,13 @@ const SearchApplication = _ref => {
|
|
|
26869
27418
|
Header: t("WS_COMMON_TABLE_COL_OWN_NAME_LABEL"),
|
|
26870
27419
|
disableSortBy: true,
|
|
26871
27420
|
accessor: row => {
|
|
26872
|
-
|
|
26873
|
-
|
|
27421
|
+
let fullName = (row === null || row === void 0 ? void 0 : row.ownerNames) || "-";
|
|
27422
|
+
if (row !== null && row !== void 0 && row.connectionHolders && row.connectionHolders.length > 0) {
|
|
27423
|
+
fullName = row.connectionHolders.map(holder => {
|
|
27424
|
+
return `${(holder === null || holder === void 0 ? void 0 : holder.name) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.middleName) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.lastName) || ""}`.replace(/\s+/g, ' ').trim();
|
|
27425
|
+
}).join(", ");
|
|
27426
|
+
}
|
|
27427
|
+
return GetCell(fullName || "-");
|
|
26874
27428
|
}
|
|
26875
27429
|
}, {
|
|
26876
27430
|
Header: t("WS_COMMON_TABLE_COL_APPLICATION_STATUS_LABEL"),
|
|
@@ -27353,72 +27907,78 @@ const SearchWaterConnection = _ref => {
|
|
|
27353
27907
|
Header: t("WS_COMMON_TABLE_COL_OWN_NAME_LABEL"),
|
|
27354
27908
|
disableSortBy: true,
|
|
27355
27909
|
Cell: _ref4 => {
|
|
27356
|
-
var _row$original5, _row$
|
|
27910
|
+
var _row$original5, _row$original6;
|
|
27357
27911
|
let {
|
|
27358
27912
|
row
|
|
27359
27913
|
} = _ref4;
|
|
27360
|
-
|
|
27914
|
+
let fullName = ((_row$original5 = row.original) === null || _row$original5 === void 0 ? void 0 : _row$original5["ownerNames"]) || "NA";
|
|
27915
|
+
if (row !== null && row !== void 0 && (_row$original6 = row.original) !== null && _row$original6 !== void 0 && _row$original6.connectionHolders && row.original.connectionHolders.length > 0) {
|
|
27916
|
+
fullName = row.original.connectionHolders.map(holder => {
|
|
27917
|
+
return `${(holder === null || holder === void 0 ? void 0 : holder.name) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.middleName) || ""} ${(holder === null || holder === void 0 ? void 0 : holder.lastName) || ""}`.replace(/\s+/g, ' ').trim();
|
|
27918
|
+
}).join(", ");
|
|
27919
|
+
}
|
|
27920
|
+
return GetCell(fullName || "NA");
|
|
27361
27921
|
}
|
|
27362
27922
|
}, {
|
|
27363
27923
|
Header: t("WS_COMMON_TABLE_COL_STATUS_LABEL"),
|
|
27364
27924
|
disableSortBy: true,
|
|
27365
27925
|
Cell: _ref5 => {
|
|
27366
|
-
var _row$
|
|
27926
|
+
var _row$original7, _row$original7$status;
|
|
27367
27927
|
let {
|
|
27368
27928
|
row
|
|
27369
27929
|
} = _ref5;
|
|
27370
|
-
return GetCell(t(`WS_${(_row$
|
|
27930
|
+
return GetCell(t(`WS_${(_row$original7 = row.original) === null || _row$original7 === void 0 ? void 0 : (_row$original7$status = _row$original7["status"]) === null || _row$original7$status === void 0 ? void 0 : _row$original7$status.toUpperCase()}`));
|
|
27371
27931
|
}
|
|
27372
27932
|
}, {
|
|
27373
27933
|
Header: t("WS_COMMON_TABLE_COL_AMT_DUE_LABEL"),
|
|
27374
27934
|
disableSortBy: true,
|
|
27375
27935
|
Cell: _ref6 => {
|
|
27376
|
-
var _row$
|
|
27936
|
+
var _row$original8;
|
|
27377
27937
|
let {
|
|
27378
27938
|
row
|
|
27379
27939
|
} = _ref6;
|
|
27380
|
-
if ((row === null || row === void 0 ? void 0 : (_row$
|
|
27381
|
-
var _row$
|
|
27382
|
-
return GetCell(`${(_row$
|
|
27940
|
+
if ((row === null || row === void 0 ? void 0 : (_row$original8 = row.original) === null || _row$original8 === void 0 ? void 0 : _row$original8["due"]) <= 0) {
|
|
27941
|
+
var _row$original9;
|
|
27942
|
+
return GetCell(`${(_row$original9 = row.original) === null || _row$original9 === void 0 ? void 0 : _row$original9["due"]}`);
|
|
27383
27943
|
} else {
|
|
27384
|
-
var _row$
|
|
27385
|
-
return GetCell(`${((_row$
|
|
27944
|
+
var _row$original0;
|
|
27945
|
+
return GetCell(`${((_row$original0 = row.original) === null || _row$original0 === void 0 ? void 0 : _row$original0["due"]) || "NA"}`);
|
|
27386
27946
|
}
|
|
27387
27947
|
}
|
|
27388
27948
|
}, {
|
|
27389
27949
|
Header: t("WS_COMMON_TABLE_COL_ADDRESS"),
|
|
27390
27950
|
disableSortBy: true,
|
|
27391
27951
|
Cell: _ref7 => {
|
|
27392
|
-
var _row$
|
|
27952
|
+
var _row$original1;
|
|
27393
27953
|
let {
|
|
27394
27954
|
row
|
|
27395
27955
|
} = _ref7;
|
|
27396
|
-
return GetCell(`${((_row$
|
|
27956
|
+
return GetCell(`${((_row$original1 = row.original) === null || _row$original1 === void 0 ? void 0 : _row$original1["address"]) || "NA"}`);
|
|
27397
27957
|
}
|
|
27398
27958
|
}, {
|
|
27399
27959
|
Header: t("WS_COMMON_TABLE_COL_DUE_DATE_LABEL"),
|
|
27400
27960
|
disableSortBy: true,
|
|
27401
27961
|
Cell: _ref8 => {
|
|
27402
|
-
var _row$
|
|
27962
|
+
var _row$original10, _row$original10$statu, _row$original11, _row$original12;
|
|
27403
27963
|
let {
|
|
27404
27964
|
row
|
|
27405
27965
|
} = _ref8;
|
|
27406
|
-
const status = ((_row$
|
|
27407
|
-
const dueDate = ((_row$
|
|
27966
|
+
const status = ((_row$original10 = row.original) === null || _row$original10 === void 0 ? void 0 : (_row$original10$statu = _row$original10["status"]) === null || _row$original10$statu === void 0 ? void 0 : _row$original10$statu.toUpperCase()) || "";
|
|
27967
|
+
const dueDate = ((_row$original11 = row.original) === null || _row$original11 === void 0 ? void 0 : _row$original11.dueDate) === "NA" ? t("WS_NA") : convertEpochToDate((_row$original12 = row.original) === null || _row$original12 === void 0 ? void 0 : _row$original12.dueDate);
|
|
27408
27968
|
return GetCell(status === "INACTIVE" ? t("WS_NA") : t(`${dueDate}`));
|
|
27409
27969
|
}
|
|
27410
27970
|
}, {
|
|
27411
27971
|
Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
|
|
27412
27972
|
disableSortBy: true,
|
|
27413
27973
|
Cell: _ref9 => {
|
|
27414
|
-
var _row$
|
|
27974
|
+
var _row$original13;
|
|
27415
27975
|
let {
|
|
27416
27976
|
row
|
|
27417
27977
|
} = _ref9;
|
|
27418
|
-
const amount = (_row$
|
|
27978
|
+
const amount = (_row$original13 = row.original) === null || _row$original13 === void 0 ? void 0 : _row$original13.due;
|
|
27419
27979
|
if (amount || amount === 0) {
|
|
27420
|
-
var _row$
|
|
27421
|
-
return GetCell(getActionItem((_row$
|
|
27980
|
+
var _row$original14;
|
|
27981
|
+
return GetCell(getActionItem((_row$original14 = row.original) === null || _row$original14 === void 0 ? void 0 : _row$original14.status, row));
|
|
27422
27982
|
} else {
|
|
27423
27983
|
return GetCell(t(`${"WS_NA"}`));
|
|
27424
27984
|
}
|
|
@@ -27429,14 +27989,14 @@ const SearchWaterConnection = _ref => {
|
|
|
27429
27989
|
disableSortBy: true,
|
|
27430
27990
|
accessor: "connectionNo",
|
|
27431
27991
|
Cell: _ref0 => {
|
|
27432
|
-
var _row$
|
|
27992
|
+
var _row$original15, _row$original16, _row$original17;
|
|
27433
27993
|
let {
|
|
27434
27994
|
row
|
|
27435
27995
|
} = _ref0;
|
|
27436
27996
|
return /*#__PURE__*/React__default.createElement("div", null, row.original["connectionNo"] ? /*#__PURE__*/React__default.createElement("span", {
|
|
27437
27997
|
className: "link"
|
|
27438
27998
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
27439
|
-
to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original["connectionNo"]}&tenantId=${tenantId}&service=${(_row$
|
|
27999
|
+
to: `/digit-ui/employee/ws/connection-details?applicationNumber=${row.original["connectionNo"]}&tenantId=${tenantId}&service=${(_row$original15 = row.original) === null || _row$original15 === void 0 ? void 0 : _row$original15["service"]}&connectionType=${(_row$original16 = row.original) === null || _row$original16 === void 0 ? void 0 : _row$original16["connectionType"]}&due=${((_row$original17 = row.original) === null || _row$original17 === void 0 ? void 0 : _row$original17.due) || 0}&from=WS_SEWERAGE_CONNECTION_SEARCH_LABEL`
|
|
27440
28000
|
}, row.original["connectionNo"] || "NA")) : /*#__PURE__*/React__default.createElement("span", null, t("NA")));
|
|
27441
28001
|
}
|
|
27442
28002
|
}, {
|
|
@@ -27452,11 +28012,11 @@ const SearchWaterConnection = _ref => {
|
|
|
27452
28012
|
Header: t("WS_COMMON_TABLE_COL_propertyId_LABEL"),
|
|
27453
28013
|
disableSortBy: true,
|
|
27454
28014
|
Cell: _ref10 => {
|
|
27455
|
-
var _row$
|
|
28015
|
+
var _row$original18, _row$original18$prope;
|
|
27456
28016
|
let {
|
|
27457
28017
|
row
|
|
27458
28018
|
} = _ref10;
|
|
27459
|
-
return GetCell(t(`WS_${(_row$
|
|
28019
|
+
return GetCell(t(`WS_${(_row$original18 = row.original) === null || _row$original18 === void 0 ? void 0 : (_row$original18$prope = _row$original18["propertyId"]) === null || _row$original18$prope === void 0 ? void 0 : _row$original18$prope.toUpperCase()}`));
|
|
27460
28020
|
}
|
|
27461
28021
|
}, {
|
|
27462
28022
|
Header: t("WS_COMMON_TABLE_COL_ACTION_LABEL"),
|
|
@@ -27486,18 +28046,18 @@ const SearchWaterConnection = _ref => {
|
|
|
27486
28046
|
}
|
|
27487
28047
|
};
|
|
27488
28048
|
return Promise.resolve(Digit.WSService.WSSewsearchDemandGen(payload, window.location.href.includes("ws/sewerage/search-demand") ? "sw" : "ws")).then(function (data) {
|
|
27489
|
-
var _row$
|
|
28049
|
+
var _row$original19, _row$original20, _row$original21;
|
|
27490
28050
|
setShowToast({
|
|
27491
28051
|
label: `${data}`
|
|
27492
28052
|
});
|
|
27493
|
-
history.push(`/digit-ui/employee/payment/collect/SW/${encodeURIComponent((_row$
|
|
28053
|
+
history.push(`/digit-ui/employee/payment/collect/SW/${encodeURIComponent((_row$original19 = row.original) === null || _row$original19 === void 0 ? void 0 : _row$original19["connectionNo"])}/${(_row$original20 = row.original) === null || _row$original20 === void 0 ? void 0 : _row$original20["tenantId"]}?tenantId=${(_row$original21 = row.original) === null || _row$original21 === void 0 ? void 0 : _row$original21["tenantId"]}?workflow=WS&ISWSCON`);
|
|
27494
28054
|
});
|
|
27495
28055
|
} catch (e) {
|
|
27496
28056
|
return Promise.reject(e);
|
|
27497
28057
|
}
|
|
27498
28058
|
};
|
|
27499
28059
|
const getActionItem = (status, row) => {
|
|
27500
|
-
var _row$original23, _row$original24, _row$original25, _row$original26, _row$original27, _row$original28, _row$original29, _row$original30
|
|
28060
|
+
var _row$original22, _row$original23, _row$original24, _row$original25, _row$original26, _row$original27, _row$original28, _row$original29, _row$original30;
|
|
27501
28061
|
const userInfo = Digit.UserService.getUser();
|
|
27502
28062
|
const userRoles = userInfo.info.roles.map(roleData => roleData.code);
|
|
27503
28063
|
const isUserAllowedToAddMeterReading = userRoles.filter(role => role === "WS_CEMP" || role === "SW_CEMP").length > 0;
|
|
@@ -27506,13 +28066,13 @@ const SearchWaterConnection = _ref => {
|
|
|
27506
28066
|
case "Active":
|
|
27507
28067
|
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("span", {
|
|
27508
28068
|
className: "link"
|
|
27509
|
-
}, ((_row$
|
|
28069
|
+
}, ((_row$original22 = row.original) === null || _row$original22 === void 0 ? void 0 : _row$original22.service) === "WATER" ? /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
27510
28070
|
to: {
|
|
27511
|
-
pathname: `/digit-ui/employee/payment/collect/${((_row$
|
|
28071
|
+
pathname: `/digit-ui/employee/payment/collect/${((_row$original23 = row.original) === null || _row$original23 === void 0 ? void 0 : _row$original23["service"]) === "WATER" ? "WS" : "SW"}/${encodeURIComponent((_row$original24 = row.original) === null || _row$original24 === void 0 ? void 0 : _row$original24["connectionNo"])}/${(_row$original25 = row.original) === null || _row$original25 === void 0 ? void 0 : _row$original25["tenantId"]}?tenantId=${(_row$original26 = row.original) === null || _row$original26 === void 0 ? void 0 : _row$original26["tenantId"]}?workflow=WS&ISWSCON`
|
|
27512
28072
|
}
|
|
27513
28073
|
}, t(`${"WS_COMMON_COLLECT_LABEL"}`), " ") : /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
27514
28074
|
to: {
|
|
27515
|
-
pathname: `/digit-ui/employee/payment/collect/${((_row$
|
|
28075
|
+
pathname: `/digit-ui/employee/payment/collect/${((_row$original27 = row.original) === null || _row$original27 === void 0 ? void 0 : _row$original27["service"]) === "WATER" ? "WS" : "SW"}/${encodeURIComponent((_row$original28 = row.original) === null || _row$original28 === void 0 ? void 0 : _row$original28["connectionNo"])}/${(_row$original29 = row.original) === null || _row$original29 === void 0 ? void 0 : _row$original29["tenantId"]}?tenantId=${(_row$original30 = row.original) === null || _row$original30 === void 0 ? void 0 : _row$original30["tenantId"]}?workflow=SW&ISWSCON`
|
|
27516
28076
|
}
|
|
27517
28077
|
}, t(`${"WS_COMMON_COLLECT_LABEL"}`), " ")));
|
|
27518
28078
|
}
|
|
@@ -30154,7 +30714,7 @@ const getPath$2 = (path, params) => {
|
|
|
30154
30714
|
return path;
|
|
30155
30715
|
};
|
|
30156
30716
|
const WSDisconnection$1 = () => {
|
|
30157
|
-
var _newConfig, _newConfig2
|
|
30717
|
+
var _newConfig, _newConfig2;
|
|
30158
30718
|
const queryClient = reactQuery.useQueryClient();
|
|
30159
30719
|
const {
|
|
30160
30720
|
t
|
|
@@ -30168,37 +30728,21 @@ const WSDisconnection$1 = () => {
|
|
|
30168
30728
|
} = Digit.Hooks.ws.useWSConfigMDMS.getFormConfig(stateId, {});
|
|
30169
30729
|
newConfig = (_newConfig = newConfig) !== null && _newConfig !== void 0 && _newConfig.WSDisconnectionConfig ? (_newConfig2 = newConfig) === null || _newConfig2 === void 0 ? void 0 : _newConfig2.WSDisconnectionConfig : newConfig$1;
|
|
30170
30730
|
newConfig = newConfig$1;
|
|
30171
|
-
|
|
30172
|
-
|
|
30173
|
-
|
|
30174
|
-
|
|
30175
|
-
|
|
30176
|
-
|
|
30177
|
-
|
|
30178
|
-
|
|
30179
|
-
|
|
30180
|
-
"
|
|
30181
|
-
|
|
30182
|
-
|
|
30183
|
-
"route": "check",
|
|
30184
|
-
"component": "WSRestorationCheckPage",
|
|
30185
|
-
"key": "WSRestorationCheckPage",
|
|
30186
|
-
"type": "component",
|
|
30187
|
-
"isMandatory": true,
|
|
30188
|
-
"withoutLabel": true,
|
|
30189
|
-
"nextStep": "restoration-acknowledge",
|
|
30190
|
-
"hideInEmployee": true
|
|
30191
|
-
}, {
|
|
30192
|
-
"route": "restoration-acknowledge",
|
|
30193
|
-
"component": "WSRestorationAcknowledgement",
|
|
30194
|
-
"key": "WSRestorationAcknowledgement",
|
|
30195
|
-
"type": "component",
|
|
30196
|
-
"isMandatory": true,
|
|
30197
|
-
"withoutLabel": true,
|
|
30198
|
-
"hideInEmployee": true
|
|
30731
|
+
config = [{
|
|
30732
|
+
route: "k-number",
|
|
30733
|
+
component: "WSDisconnectionKNumber",
|
|
30734
|
+
key: "WSDisconnectionKNumber"
|
|
30735
|
+
}, {
|
|
30736
|
+
route: "consumer-details",
|
|
30737
|
+
component: "WSDisconnectionConsumerDetails",
|
|
30738
|
+
key: "WSDisconnectionConsumerDetails"
|
|
30739
|
+
}, {
|
|
30740
|
+
route: "new-restoration",
|
|
30741
|
+
component: "WSRestorationForm",
|
|
30742
|
+
key: "WSRestorationForm"
|
|
30199
30743
|
}];
|
|
30200
|
-
|
|
30201
|
-
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null,
|
|
30744
|
+
config.indexRoute = "k-number";
|
|
30745
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
30202
30746
|
const {
|
|
30203
30747
|
component,
|
|
30204
30748
|
texts,
|
|
@@ -30218,7 +30762,8 @@ const WSDisconnection$1 = () => {
|
|
|
30218
30762
|
isSkipEnabled
|
|
30219
30763
|
},
|
|
30220
30764
|
t: t,
|
|
30221
|
-
userType: "citizen"
|
|
30765
|
+
userType: "citizen",
|
|
30766
|
+
flow: "reconnection"
|
|
30222
30767
|
}));
|
|
30223
30768
|
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
30224
30769
|
to: `${getPath$2(match.path, match.params)}/${config.indexRoute}`
|
|
@@ -32478,7 +33023,8 @@ const WSFeeEstimation = _ref => {
|
|
|
32478
33023
|
var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
32479
33024
|
let {
|
|
32480
33025
|
wsAdditionalDetails,
|
|
32481
|
-
workflowDetails
|
|
33026
|
+
workflowDetails,
|
|
33027
|
+
onlyDisconnectionFee = false
|
|
32482
33028
|
} = _ref;
|
|
32483
33029
|
const {
|
|
32484
33030
|
t
|
|
@@ -32492,10 +33038,10 @@ const WSFeeEstimation = _ref => {
|
|
|
32492
33038
|
const [billDetails, setBillDetails] = React.useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
|
|
32493
33039
|
const [values, setValues] = React.useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []);
|
|
32494
33040
|
const isDisconnectionExecuted = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$2 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$2 === void 0 ? void 0 : (_wsAdditionalDetails$3 = _wsAdditionalDetails$2.appDetails) === null || _wsAdditionalDetails$3 === void 0 ? void 0 : _wsAdditionalDetails$3.applicationStatus) === "DISCONNECTION_EXECUTED";
|
|
32495
|
-
const displayedValues = isDisconnectionExecuted ? values.filter(value => (value === null || value === void 0 ? void 0 : value.title) === "WS_DISCONNECTION_FEE") : values;
|
|
32496
33041
|
const billRows = (billDetails === null || billDetails === void 0 ? void 0 : (_billDetails$billDeta = billDetails.billDetails) === null || _billDetails$billDeta === void 0 ? void 0 : (_billDetails$billDeta2 = _billDetails$billDeta[0]) === null || _billDetails$billDeta2 === void 0 ? void 0 : _billDetails$billDeta2.billAccountDetails) || (billDetails === null || billDetails === void 0 ? void 0 : billDetails.taxHeadEstimates) || [];
|
|
32497
|
-
const disconnectionFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_DISCONNECTION_FEE");
|
|
32498
|
-
const
|
|
33042
|
+
const disconnectionFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_DISCONNECTION_FEE" || (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "SW_DISCONNECTION_FEE");
|
|
33043
|
+
const displayedValues = onlyDisconnectionFee || isDisconnectionExecuted ? values.filter(value => (value === null || value === void 0 ? void 0 : value.title) === "WS_DISCONNECTION_FEE" || (value === null || value === void 0 ? void 0 : value.title) === "SW_DISCONNECTION_FEE") : values;
|
|
33044
|
+
const displayedTotalAmount = onlyDisconnectionFee || isDisconnectionExecuted ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.amount) ?? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.estimateAmount) ?? 0 : billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount;
|
|
32499
33045
|
const displayedIsPaid = isDisconnectionExecuted ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.status) === "PAID" : isPaid;
|
|
32500
33046
|
const stateCode = Digit.ULBService.getStateId();
|
|
32501
33047
|
const {
|
|
@@ -33299,7 +33845,7 @@ const checkForNA$1 = value => {
|
|
|
33299
33845
|
return value ? value : "CS_NA";
|
|
33300
33846
|
};
|
|
33301
33847
|
const WSApplicationDetails = () => {
|
|
33302
|
-
var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$SewerageConnect6, _data$SewerageConnect7, _data$WaterConnection8, _data$WaterConnection9, _data$SewerageConnect8, _data$SewerageConnect9, _data$WaterConnection0, _data$WaterConnection1, _data$SewerageConnect0, _data$SewerageConnect1, _data$WaterConnection10, _data$SewerageConnect10, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _data$WaterConnection11, _data$WaterConnection12, _data$WaterConnection13, _data$WaterConnection14, _data$SewerageConnect11, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$WaterConnection15, _data$WaterConnection16, _data$SewerageConnect15, _data$SewerageConnect16, _appDetailsData$appli, _data$WaterConnection35, _data$WaterConnection36, _data$SewerageConnect31, _data$SewerageConnect32, _data$WaterConnection37, _data$WaterConnection38, _data$SewerageConnect33, _data$SewerageConnect34, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _data$WaterConnection43, _data$WaterConnection44, _data$SewerageConnect39, _data$WaterConnection45, _data$WaterConnection46, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect44, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$SewerageConnect50, _data$SewerageConnect51, _data$WaterConnection57, _data$WaterConnection58, _data$SewerageConnect52, _data$SewerageConnect53, _data$WaterConnection59, _data$WaterConnection60, _data$SewerageConnect54, _data$SewerageConnect55, _data$WaterConnection61, _data$WaterConnection62, _data$SewerageConnect56, _data$SewerageConnect57, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$WaterConnection67, _data$WaterConnection68, _data$SewerageConnect60, _data$SewerageConnect61, _data$SewerageConnect62, _data$SewerageConnect63, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection69, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect64, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$WaterConnection75, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$SewerageConnect70, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$WaterConnection79, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _data$SewerageConnect74, _data$WaterConnection80, _data$WaterConnection81, _data$WaterConnection82, _data$WaterConnection83, _data$SewerageConnect75, _data$SewerageConnect76, _data$SewerageConnect77, _data$SewerageConnect78, _data$WaterConnection84, _data$WaterConnection85, _data$WaterConnection86, _data$WaterConnection87, _data$SewerageConnect79, _data$SewerageConnect80, _data$SewerageConnect81, _data$SewerageConnect82, _data$WaterConnection88, _data$WaterConnection89, _data$WaterConnection90, _data$WaterConnection91, _data$SewerageConnect83, _data$SewerageConnect84, _data$SewerageConnect85, _data$SewerageConnect86, _data$WaterConnection92, _data$WaterConnection93, _data$WaterConnection94, _data$WaterConnection95, _data$SewerageConnect87, _data$SewerageConnect88, _data$SewerageConnect89, _data$SewerageConnect90, _data$WaterConnection96, _data$WaterConnection97, _data$WaterConnection98, _data$WaterConnection99, _data$SewerageConnect91, _data$SewerageConnect92, _data$SewerageConnect93, _data$SewerageConnect94, _data$WaterConnection100, _data$WaterConnection101, _data$WaterConnection102, _data$WaterConnection103, _data$SewerageConnect95, _data$SewerageConnect96, _data$SewerageConnect97, _data$SewerageConnect98, _data$WaterConnection104, _data$WaterConnection105, _data$WaterConnection106, _data$WaterConnection107, _data$SewerageConnect99, _data$SewerageConnect100, _data$SewerageConnect101, _data$SewerageConnect102, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect103, _data$SewerageConnect104, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection110, _data$WaterConnection111, _data$SewerageConnect105, _data$SewerageConnect106, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect107, _data$SewerageConnect108, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _propertyAdditionalDe, _propertyAdditionalDe2, _PTData$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _applicationData$dueV, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection120, _data$WaterConnection121, _data$WaterConnection122, _data$WaterConnection123, _data$WaterConnection124, _data$WaterConnection125, _data$SewerageConnect115, _data$SewerageConnect116, _data$SewerageConnect117, _data$SewerageConnect118, _data$SewerageConnect119, _data$SewerageConnect120, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$WaterConnection135, _data$WaterConnection136, _data$SewerageConnect130, _data$SewerageConnect131, _data$WaterConnection137, _data$WaterConnection138, _data$SewerageConnect132, _data$SewerageConnect133, _data$WaterConnection139, _data$WaterConnection140, _data$SewerageConnect134, _data$SewerageConnect135, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$SewerageConnect136, _data$SewerageConnect137, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect138, _data$SewerageConnect139, _data$WaterConnection146, _data$WaterConnection147, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect140, _data$SewerageConnect141, _data$SewerageConnect142, _data$SewerageConnect143, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect144, _data$SewerageConnect145, _data$SewerageConnect146, _data$SewerageConnect147, _data$SewerageConnect148, _data$SewerageConnect149, _data$SewerageConnect150, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$WaterConnection155, _data$WaterConnection156, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160;
|
|
33848
|
+
var _user$info, _user$info$userName, _user$info2, _user$info3, _Digit$SessionStorage, _user$info4, _data$WaterConnection, _data$WaterConnection2, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection3, _data$WaterConnection4, _data$WaterConnection5, _data$SewerageConnect3, _data$SewerageConnect4, _data$SewerageConnect5, _data$WaterConnection6, _data$WaterConnection7, _data$SewerageConnect6, _data$SewerageConnect7, _data$WaterConnection8, _data$WaterConnection9, _data$SewerageConnect8, _data$SewerageConnect9, _data$WaterConnection0, _data$WaterConnection1, _data$SewerageConnect0, _data$SewerageConnect1, _data$WaterConnection10, _data$SewerageConnect10, _PTData$Properties, _PTData$Properties$, _PTData$Properties2, _PTData$Properties2$, _data$WaterConnection11, _data$WaterConnection12, _data$WaterConnection13, _data$WaterConnection14, _data$SewerageConnect11, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$WaterConnection15, _data$WaterConnection16, _data$SewerageConnect15, _data$SewerageConnect16, _appDetailsData$appli, _data$WaterConnection35, _data$WaterConnection36, _data$SewerageConnect31, _data$SewerageConnect32, _data$WaterConnection37, _data$WaterConnection38, _data$SewerageConnect33, _data$SewerageConnect34, _data$WaterConnection39, _data$WaterConnection40, _data$SewerageConnect35, _data$SewerageConnect36, _data$WaterConnection41, _data$WaterConnection42, _data$SewerageConnect37, _data$SewerageConnect38, _data$WaterConnection43, _data$WaterConnection44, _data$SewerageConnect39, _data$WaterConnection45, _data$WaterConnection46, _data$SewerageConnect40, _data$SewerageConnect41, _data$WaterConnection47, _data$WaterConnection48, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection49, _data$WaterConnection50, _data$SewerageConnect44, _data$SewerageConnect45, _data$WaterConnection51, _data$WaterConnection52, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection53, _data$WaterConnection54, _data$SewerageConnect48, _data$SewerageConnect49, _data$WaterConnection55, _data$WaterConnection56, _data$SewerageConnect50, _data$SewerageConnect51, _data$WaterConnection57, _data$WaterConnection58, _data$SewerageConnect52, _data$SewerageConnect53, _data$WaterConnection59, _data$WaterConnection60, _data$SewerageConnect54, _data$SewerageConnect55, _data$WaterConnection61, _data$WaterConnection62, _data$SewerageConnect56, _data$SewerageConnect57, _data$WaterConnection63, _data$WaterConnection64, _data$SewerageConnect58, _data$SewerageConnect59, _data$WaterConnection65, _data$WaterConnection66, _data$WaterConnection67, _data$WaterConnection68, _data$SewerageConnect60, _data$SewerageConnect61, _data$SewerageConnect62, _data$SewerageConnect63, _connectionDetails$se, _connectionDetails$se2, _connectionDetails$ap, _connectionDetails$ap2, _connectionDetails$do, _connectionDetails$de, _connectionDetails$de2, _data$WaterConnection69, _data$WaterConnection70, _data$WaterConnection71, _data$SewerageConnect64, _data$SewerageConnect65, _data$SewerageConnect66, _data$WaterConnection72, _data$WaterConnection73, _data$WaterConnection74, _data$WaterConnection75, _data$SewerageConnect67, _data$SewerageConnect68, _data$SewerageConnect69, _data$SewerageConnect70, _data$WaterConnection76, _data$WaterConnection77, _data$WaterConnection78, _data$WaterConnection79, _data$SewerageConnect71, _data$SewerageConnect72, _data$SewerageConnect73, _data$SewerageConnect74, _data$WaterConnection80, _data$WaterConnection81, _data$WaterConnection82, _data$WaterConnection83, _data$SewerageConnect75, _data$SewerageConnect76, _data$SewerageConnect77, _data$SewerageConnect78, _data$WaterConnection84, _data$WaterConnection85, _data$WaterConnection86, _data$WaterConnection87, _data$SewerageConnect79, _data$SewerageConnect80, _data$SewerageConnect81, _data$SewerageConnect82, _data$WaterConnection88, _data$WaterConnection89, _data$WaterConnection90, _data$WaterConnection91, _data$SewerageConnect83, _data$SewerageConnect84, _data$SewerageConnect85, _data$SewerageConnect86, _data$WaterConnection92, _data$WaterConnection93, _data$WaterConnection94, _data$WaterConnection95, _data$SewerageConnect87, _data$SewerageConnect88, _data$SewerageConnect89, _data$SewerageConnect90, _data$WaterConnection96, _data$WaterConnection97, _data$WaterConnection98, _data$WaterConnection99, _data$SewerageConnect91, _data$SewerageConnect92, _data$SewerageConnect93, _data$SewerageConnect94, _data$WaterConnection100, _data$WaterConnection101, _data$WaterConnection102, _data$WaterConnection103, _data$SewerageConnect95, _data$SewerageConnect96, _data$SewerageConnect97, _data$SewerageConnect98, _data$WaterConnection104, _data$WaterConnection105, _data$WaterConnection106, _data$WaterConnection107, _data$SewerageConnect99, _data$SewerageConnect100, _data$SewerageConnect101, _data$SewerageConnect102, _data$WaterConnection108, _data$WaterConnection109, _data$SewerageConnect103, _data$SewerageConnect104, _PTData$Properties5, _PTData$Properties5$, _PTData$Properties5$$, _PTData$Properties5$$2, _PTData$Properties6, _PTData$Properties6$, _PTData$Properties7, _PTData$Properties7$, _PTData$Properties7$$, _PTData$Properties7$$2, _PTData$Properties8, _PTData$Properties8$, _data$WaterConnection110, _data$WaterConnection111, _data$SewerageConnect105, _data$SewerageConnect106, _data$WaterConnection112, _data$WaterConnection113, _data$SewerageConnect107, _data$SewerageConnect108, _propertyAddress$city, _propertyAddress$city2, _propertyAddress$city3, _propertyAddress$city4, _propertyAddress$loca, _propertyAddress$loca2, _propertyAddress$subL, _propertyAddress$subL2, _propertyAddress$asse, _propertyAddress$asse2, _propertyAddress$bloc, _propertyAddress$bloc2, _propertyAddress$ward, _propertyAddress$ward2, _propertyAddress$zone, _propertyAddress$zone2, _propertyAddress$zone3, _propertyAddress$zone4, _useDetails$categoryT, _useDetails$categoryT2, _useDetails$propertyC, _useDetails$propertyC2, _propertyAdditionalDe, _propertyAdditionalDe2, _PTData$Properties9, _PTData$Properties9$, _useDetails$propertyT, _useDetails$propertyT2, _propertyAdditionalDe3, _propertyAdditionalDe4, _PTData$Properties0, _PTData$Properties0$, _useDetails$WaterConn, _useDetails$WaterConn2, _useDetails$waterConn, _useDetails$waterConn2, _propertyAdditionalDe5, _propertyAdditionalDe6, _useDetails$noOfFloor, _useDetails$noOfFloor2, _PTData$Properties1, _PTData$Properties1$, _useDetails$SelectYea, _useDetails$SelectYea2, _useDetails$SelectYea3, _useDetails$construct, _useDetails$construct2, _applicationData$dueV, _data$WaterConnection114, _data$WaterConnection115, _data$WaterConnection116, _data$WaterConnection117, _data$SewerageConnect109, _data$SewerageConnect110, _data$SewerageConnect111, _data$SewerageConnect112, _data$WaterConnection120, _data$WaterConnection121, _data$WaterConnection122, _data$WaterConnection123, _data$WaterConnection124, _data$WaterConnection125, _data$SewerageConnect115, _data$SewerageConnect116, _data$SewerageConnect117, _data$SewerageConnect118, _data$SewerageConnect119, _data$SewerageConnect120, _data$WaterConnection131, _data$WaterConnection132, _data$WaterConnection133, _data$WaterConnection134, _data$SewerageConnect126, _data$SewerageConnect127, _data$SewerageConnect128, _data$SewerageConnect129, _data$WaterConnection135, _data$WaterConnection136, _data$SewerageConnect130, _data$SewerageConnect131, _data$WaterConnection137, _data$WaterConnection138, _data$SewerageConnect132, _data$SewerageConnect133, _data$WaterConnection139, _data$WaterConnection140, _data$SewerageConnect134, _data$SewerageConnect135, _data$WaterConnection141, _data$WaterConnection142, _data$WaterConnection143, _data$SewerageConnect136, _data$SewerageConnect137, _data$WaterConnection144, _data$WaterConnection145, _data$SewerageConnect138, _data$SewerageConnect139, _data$WaterConnection146, _data$WaterConnection147, _data$WaterConnection148, _data$WaterConnection149, _data$SewerageConnect140, _data$SewerageConnect141, _data$SewerageConnect142, _data$SewerageConnect143, _data$WaterConnection150, _data$WaterConnection151, _data$SewerageConnect144, _data$SewerageConnect145, _data$SewerageConnect146, _data$SewerageConnect147, _data$SewerageConnect148, _data$SewerageConnect149, _data$SewerageConnect150, _data$SewerageConnect151, _data$SewerageConnect152, _data$SewerageConnect153, _data$SewerageConnect154, _data$WaterConnection152, _data$WaterConnection153, _data$WaterConnection154, _data$WaterConnection155, _data$WaterConnection156, _data$WaterConnection157, _data$WaterConnection158, _data$WaterConnection159, _data$WaterConnection160;
|
|
33303
33849
|
const getDisconnectionNoticeSearch = function () {
|
|
33304
33850
|
try {
|
|
33305
33851
|
var _data$WaterConnection162, _data$WaterConnection163, _data$SewerageConnect156, _data$SewerageConnect157;
|
|
@@ -33547,6 +34093,7 @@ const WSApplicationDetails = () => {
|
|
|
33547
34093
|
}];
|
|
33548
34094
|
const isDisconnection = (data === null || data === void 0 ? void 0 : (_data$WaterConnection35 = data.WaterConnection) === null || _data$WaterConnection35 === void 0 ? void 0 : (_data$WaterConnection36 = _data$WaterConnection35[0].applicationType) === null || _data$WaterConnection36 === void 0 ? void 0 : _data$WaterConnection36.includes("DISCONNECT")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect31 = data.SewerageConnections) === null || _data$SewerageConnect31 === void 0 ? void 0 : (_data$SewerageConnect32 = _data$SewerageConnect31[0].applicationType) === null || _data$SewerageConnect32 === void 0 ? void 0 : _data$SewerageConnect32.includes("DISCONNECT"));
|
|
33549
34095
|
const appStatus = (data === null || data === void 0 ? void 0 : (_data$WaterConnection37 = data.WaterConnection) === null || _data$WaterConnection37 === void 0 ? void 0 : (_data$WaterConnection38 = _data$WaterConnection37[0]) === null || _data$WaterConnection38 === void 0 ? void 0 : _data$WaterConnection38.applicationStatus) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect33 = data.SewerageConnections) === null || _data$SewerageConnect33 === void 0 ? void 0 : (_data$SewerageConnect34 = _data$SewerageConnect33[0]) === null || _data$SewerageConnect34 === void 0 ? void 0 : _data$SewerageConnect34.applicationStatus);
|
|
34096
|
+
const isDisconnectionPaymentPending = isDisconnection && ["PENDING_FOR_PAYMENT", "PENDING_FOR_FINAL_PAYMENT", "PENDING_FOR_ADDITIONAL_PAYMENT", "PENDING_APPROVAL_FOR_DISCONNECTION"].includes(appStatus);
|
|
33550
34097
|
switch (appStatus) {
|
|
33551
34098
|
case "PENDING_FOR_DOCUMENT_VERIFICATION":
|
|
33552
34099
|
if (data !== null && data !== void 0 && (_data$WaterConnection39 = data.WaterConnection) !== null && _data$WaterConnection39 !== void 0 && (_data$WaterConnection40 = _data$WaterConnection39[0].applicationType) !== null && _data$WaterConnection40 !== void 0 && _data$WaterConnection40.includes("DISCONNECT") || data !== null && data !== void 0 && (_data$SewerageConnect35 = data.SewerageConnections) !== null && _data$SewerageConnect35 !== void 0 && (_data$SewerageConnect36 = _data$SewerageConnect35[0].applicationType) !== null && _data$SewerageConnect36 !== void 0 && _data$SewerageConnect36.includes("DISCONNECT")) {
|
|
@@ -33675,8 +34222,9 @@ const WSApplicationDetails = () => {
|
|
|
33675
34222
|
}
|
|
33676
34223
|
}, t(feeEstimationSection.title)), /*#__PURE__*/React__default.createElement(WSFeeEstimation, {
|
|
33677
34224
|
wsAdditionalDetails: feeEstimationSection,
|
|
33678
|
-
workflowDetails: null
|
|
33679
|
-
|
|
34225
|
+
workflowDetails: null,
|
|
34226
|
+
onlyDisconnectionFee: isDisconnectionPaymentPending
|
|
34227
|
+
}), !isDisconnectionPaymentPending && /*#__PURE__*/React__default.createElement(ViewBreakup, {
|
|
33680
34228
|
wsAdditionalDetails: feeEstimationSection,
|
|
33681
34229
|
workflowDetails: null
|
|
33682
34230
|
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
@@ -33858,7 +34406,7 @@ const WSApplicationDetails = () => {
|
|
|
33858
34406
|
}
|
|
33859
34407
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
33860
34408
|
label: t("CORE_COMMON_PROFILE_CITY"),
|
|
33861
|
-
text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city = propertyAddress.city) === null || _propertyAddress$city === void 0 ? void 0 : _propertyAddress$city.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city2 = propertyAddress.city) === null || _propertyAddress$city2 === void 0 ? void 0 : _propertyAddress$city2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)))}`
|
|
34409
|
+
text: `${t(checkForNA$1(((propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city = propertyAddress.city) === null || _propertyAddress$city === void 0 ? void 0 : _propertyAddress$city.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city2 = propertyAddress.city) === null || _propertyAddress$city2 === void 0 ? void 0 : _propertyAddress$city2.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)) === "dl.djb" ? "Delhi" : (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city3 = propertyAddress.city) === null || _propertyAddress$city3 === void 0 ? void 0 : _propertyAddress$city3.name) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : (_propertyAddress$city4 = propertyAddress.city) === null || _propertyAddress$city4 === void 0 ? void 0 : _propertyAddress$city4.code) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.city)))}`
|
|
33862
34410
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
33863
34411
|
label: t("PINCODE"),
|
|
33864
34412
|
text: `${t(checkForNA$1((propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pincode) || (propertyAddress === null || propertyAddress === void 0 ? void 0 : propertyAddress.pinCode)))}`
|
|
@@ -34033,58 +34581,45 @@ const WSApplicationDetails = () => {
|
|
|
34033
34581
|
padding: "12px 8px",
|
|
34034
34582
|
borderBottom: "1px solid #e0e0e0"
|
|
34035
34583
|
}
|
|
34036
|
-
}, t("ABG_COMMON_TABLE_COL_ACTION")))), /*#__PURE__*/React__default.createElement("tbody", null, applicationData.dueVerification.map((dueItem, index) => {
|
|
34037
|
-
|
|
34038
|
-
|
|
34039
|
-
|
|
34040
|
-
|
|
34041
|
-
|
|
34042
|
-
|
|
34043
|
-
|
|
34044
|
-
|
|
34045
|
-
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
|
|
34050
|
-
|
|
34051
|
-
|
|
34052
|
-
|
|
34053
|
-
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
34057
|
-
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34070
|
-
|
|
34071
|
-
|
|
34072
|
-
|
|
34073
|
-
}
|
|
34074
|
-
|
|
34075
|
-
pathname: `/digit-ui/citizen/payment/my-bills/${(applicationData === null || applicationData === void 0 ? void 0 : applicationData.serviceType) === "WATER" || applicationData !== null && applicationData !== void 0 && (_applicationData$appl = applicationData.applicationType) !== null && _applicationData$appl !== void 0 && _applicationData$appl.includes("WATER") ? "WS" : "SW"}/${dueItem === null || dueItem === void 0 ? void 0 : (_dueItem$kno = dueItem.kno) === null || _dueItem$kno === void 0 ? void 0 : _dueItem$kno.replaceAll("/", "+")}`,
|
|
34076
|
-
search: `?workflow=WNS&tenantId=${applicationData === null || applicationData === void 0 ? void 0 : applicationData.tenantId}&ConsumerName=${dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName}&consumerCode=${dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno}`,
|
|
34077
|
-
state: {
|
|
34078
|
-
fromApplicationDetails: true
|
|
34079
|
-
}
|
|
34080
|
-
}
|
|
34081
|
-
}, t("MAKE_PAYMENT"))) : /*#__PURE__*/React__default.createElement("span", {
|
|
34082
|
-
style: {
|
|
34083
|
-
color: "green",
|
|
34084
|
-
fontWeight: "bold"
|
|
34085
|
-
}
|
|
34086
|
-
}, t("BILL_ALREADY_PAID"))));
|
|
34087
|
-
}))))), !isDisconnectionExecuted && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
34584
|
+
}, t("ABG_COMMON_TABLE_COL_ACTION")))), /*#__PURE__*/React__default.createElement("tbody", null, applicationData.dueVerification.map((dueItem, index) => /*#__PURE__*/React__default.createElement("tr", {
|
|
34585
|
+
key: `due-${index}`,
|
|
34586
|
+
style: {
|
|
34587
|
+
borderBottom: "1px solid #e0e0e0"
|
|
34588
|
+
}
|
|
34589
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
34590
|
+
style: {
|
|
34591
|
+
padding: "12px 8px"
|
|
34592
|
+
}
|
|
34593
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno)), /*#__PURE__*/React__default.createElement("td", {
|
|
34594
|
+
style: {
|
|
34595
|
+
padding: "12px 8px"
|
|
34596
|
+
}
|
|
34597
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName)), /*#__PURE__*/React__default.createElement("td", {
|
|
34598
|
+
style: {
|
|
34599
|
+
padding: "12px 8px"
|
|
34600
|
+
}
|
|
34601
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullAddress)), /*#__PURE__*/React__default.createElement("td", {
|
|
34602
|
+
style: {
|
|
34603
|
+
padding: "12px 8px"
|
|
34604
|
+
}
|
|
34605
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount)), /*#__PURE__*/React__default.createElement("td", {
|
|
34606
|
+
style: {
|
|
34607
|
+
padding: "12px 8px"
|
|
34608
|
+
}
|
|
34609
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount)), /*#__PURE__*/React__default.createElement("td", {
|
|
34610
|
+
style: {
|
|
34611
|
+
padding: "12px 8px"
|
|
34612
|
+
}
|
|
34613
|
+
}, checkForNA$1(dueItem === null || dueItem === void 0 ? void 0 : dueItem.remarks)), /*#__PURE__*/React__default.createElement("td", {
|
|
34614
|
+
style: {
|
|
34615
|
+
padding: "12px 8px"
|
|
34616
|
+
}
|
|
34617
|
+
}, Number(dueItem === null || dueItem === void 0 ? void 0 : dueItem.dueAmount) > 0 || Number(dueItem === null || dueItem === void 0 ? void 0 : dueItem.totalAmount) > 0 ? null : /*#__PURE__*/React__default.createElement("span", {
|
|
34618
|
+
style: {
|
|
34619
|
+
color: "green",
|
|
34620
|
+
fontWeight: "bold"
|
|
34621
|
+
}
|
|
34622
|
+
}, t("BILL_ALREADY_PAID"))))))))), !isDisconnectionExecuted && !isDisconnectionPaymentPending && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
34088
34623
|
styles: {
|
|
34089
34624
|
fontSize: "28px"
|
|
34090
34625
|
}
|
|
@@ -34145,7 +34680,7 @@ const WSApplicationDetails = () => {
|
|
|
34145
34680
|
onSubmit: () => {
|
|
34146
34681
|
var _paymentDetails$data, _paymentDetails$data$, _paymentDetails$data$2, _paymentDetails$data2, _paymentDetails$data3, _paymentDetails$data4, _data$WaterConnection126, _data$WaterConnection127, _data$SewerageConnect121, _data$SewerageConnect122, _data$WaterConnection128, _data$WaterConnection129, _data$WaterConnection130, _data$SewerageConnect123, _data$SewerageConnect124, _data$SewerageConnect125, _PTData$Properties10, _PTData$Properties10$, _PTData$Properties10$2, _paymentDetails$data5, _paymentDetails$data6, _paymentDetails$data7;
|
|
34147
34682
|
history.push({
|
|
34148
|
-
pathname: `/digit-ui/citizen/payment/
|
|
34683
|
+
pathname: `/digit-ui/citizen/payment/collect/${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data = paymentDetails.data) === null || _paymentDetails$data === void 0 ? void 0 : (_paymentDetails$data$ = _paymentDetails$data.Bill) === null || _paymentDetails$data$ === void 0 ? void 0 : (_paymentDetails$data$2 = _paymentDetails$data$[0]) === null || _paymentDetails$data$2 === void 0 ? void 0 : _paymentDetails$data$2.businessService}/${stringReplaceAll(paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data2 = paymentDetails.data) === null || _paymentDetails$data2 === void 0 ? void 0 : (_paymentDetails$data3 = _paymentDetails$data2.Bill) === null || _paymentDetails$data3 === void 0 ? void 0 : (_paymentDetails$data4 = _paymentDetails$data3[0]) === null || _paymentDetails$data4 === void 0 ? void 0 : _paymentDetails$data4.consumerCode, "/", "+")}`,
|
|
34149
34684
|
search: `?workflow=WNS&tenantId=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection126 = data.WaterConnection) === null || _data$WaterConnection126 === void 0 ? void 0 : (_data$WaterConnection127 = _data$WaterConnection126[0]) === null || _data$WaterConnection127 === void 0 ? void 0 : _data$WaterConnection127.tenantId) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect121 = data.SewerageConnections) === null || _data$SewerageConnect121 === void 0 ? void 0 : (_data$SewerageConnect122 = _data$SewerageConnect121[0]) === null || _data$SewerageConnect122 === void 0 ? void 0 : _data$SewerageConnect122.tenantId)}&ConsumerName=${(data === null || data === void 0 ? void 0 : (_data$WaterConnection128 = data.WaterConnection) === null || _data$WaterConnection128 === void 0 ? void 0 : (_data$WaterConnection129 = _data$WaterConnection128[0]) === null || _data$WaterConnection129 === void 0 ? void 0 : (_data$WaterConnection130 = _data$WaterConnection129.connectionHolders) === null || _data$WaterConnection130 === void 0 ? void 0 : _data$WaterConnection130.map(owner => owner.name).join(",")) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect123 = data.SewerageConnections) === null || _data$SewerageConnect123 === void 0 ? void 0 : (_data$SewerageConnect124 = _data$SewerageConnect123[0]) === null || _data$SewerageConnect124 === void 0 ? void 0 : (_data$SewerageConnect125 = _data$SewerageConnect124.connectionHolders) === null || _data$SewerageConnect125 === void 0 ? void 0 : _data$SewerageConnect125.map(owner => owner.name).join(",")) || (PTData === null || PTData === void 0 ? void 0 : (_PTData$Properties10 = PTData.Properties) === null || _PTData$Properties10 === void 0 ? void 0 : (_PTData$Properties10$ = _PTData$Properties10[0]) === null || _PTData$Properties10$ === void 0 ? void 0 : (_PTData$Properties10$2 = _PTData$Properties10$.owners) === null || _PTData$Properties10$2 === void 0 ? void 0 : _PTData$Properties10$2.map(owner => owner.name).join(","))}&isDisoconnectFlow=${applicationNobyData !== null && applicationNobyData !== void 0 && applicationNobyData.includes("DC") ? true : false}&consumerCode=${paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data5 = paymentDetails.data) === null || _paymentDetails$data5 === void 0 ? void 0 : (_paymentDetails$data6 = _paymentDetails$data5.Bill) === null || _paymentDetails$data6 === void 0 ? void 0 : (_paymentDetails$data7 = _paymentDetails$data6[0]) === null || _paymentDetails$data7 === void 0 ? void 0 : _paymentDetails$data7.consumerCode}`,
|
|
34150
34685
|
state: {
|
|
34151
34686
|
fromApplicationDetails: true
|
|
@@ -34823,14 +35358,14 @@ const ConnectionDetails$5 = () => {
|
|
|
34823
35358
|
var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
|
|
34824
35359
|
if ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data8 = paymentDetails.data) === null || _paymentDetails$data8 === void 0 ? void 0 : (_paymentDetails$data9 = _paymentDetails$data8.Bill) === null || _paymentDetails$data9 === void 0 ? void 0 : _paymentDetails$data9.length) === 0) {
|
|
34825
35360
|
console.log("Payment", paymentDetails);
|
|
34826
|
-
let pathname = `/digit-ui/citizen/ws/restore-application/
|
|
35361
|
+
let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
|
|
34827
35362
|
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
34828
35363
|
...state,
|
|
34829
35364
|
serviceType: isSW ? "SEWERAGE" : "WATER"
|
|
34830
35365
|
});
|
|
34831
35366
|
history.push(`${pathname}`);
|
|
34832
35367
|
} else if ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data0 = paymentDetails.data) === null || _paymentDetails$data0 === void 0 ? void 0 : (_paymentDetails$data1 = _paymentDetails$data0.Bill) === null || _paymentDetails$data1 === void 0 ? void 0 : (_paymentDetails$data10 = _paymentDetails$data1[0]) === null || _paymentDetails$data10 === void 0 ? void 0 : _paymentDetails$data10.totalAmount) < 0) {
|
|
34833
|
-
let pathname = `/digit-ui/citizen/ws/restore-application/
|
|
35368
|
+
let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
|
|
34834
35369
|
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
34835
35370
|
...state,
|
|
34836
35371
|
serviceType: isSW ? "SEWERAGE" : "WATER"
|
|
@@ -34839,7 +35374,7 @@ const ConnectionDetails$5 = () => {
|
|
|
34839
35374
|
} else if ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data11 = paymentDetails.data) === null || _paymentDetails$data11 === void 0 ? void 0 : (_paymentDetails$data12 = _paymentDetails$data11.Bill) === null || _paymentDetails$data12 === void 0 ? void 0 : (_paymentDetails$data13 = _paymentDetails$data12[0]) === null || _paymentDetails$data13 === void 0 ? void 0 : _paymentDetails$data13.totalAmount) !== 0) {
|
|
34840
35375
|
setshowModal(true);
|
|
34841
35376
|
} else if ((paymentDetails === null || paymentDetails === void 0 ? void 0 : (_paymentDetails$data14 = paymentDetails.data) === null || _paymentDetails$data14 === void 0 ? void 0 : (_paymentDetails$data15 = _paymentDetails$data14.Bill) === null || _paymentDetails$data15 === void 0 ? void 0 : (_paymentDetails$data16 = _paymentDetails$data15[0]) === null || _paymentDetails$data16 === void 0 ? void 0 : _paymentDetails$data16.totalAmount) == 0) {
|
|
34842
|
-
let pathname = `/digit-ui/citizen/ws/restore-application/
|
|
35377
|
+
let pathname = `/digit-ui/citizen/ws/restore-application/k-number`;
|
|
34843
35378
|
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
34844
35379
|
...state,
|
|
34845
35380
|
serviceType: isSW ? "SEWERAGE" : "WATER"
|
|
@@ -36718,6 +37253,60 @@ const ReSubmitDisconnectionApplication = () => {
|
|
|
36718
37253
|
config = config.concat(obj.body.filter(a => !a.hideInCitizen));
|
|
36719
37254
|
});
|
|
36720
37255
|
config.indexRoute = "application-form";
|
|
37256
|
+
const [isSearchComplete, setIsSearchComplete] = React.useState(false);
|
|
37257
|
+
const searchStarted = React.useRef(false);
|
|
37258
|
+
React.useEffect(() => {
|
|
37259
|
+
if (searchStarted.current) return;
|
|
37260
|
+
searchStarted.current = true;
|
|
37261
|
+
const refreshConnectionData = function () {
|
|
37262
|
+
try {
|
|
37263
|
+
const storedData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
37264
|
+
const storedConnection = (storedData === null || storedData === void 0 ? void 0 : storedData.applicationData) || {};
|
|
37265
|
+
const connectionNumber = (storedConnection === null || storedConnection === void 0 ? void 0 : storedConnection.connectionNo) || (storedData === null || storedData === void 0 ? void 0 : storedData.connectionNo);
|
|
37266
|
+
if (!connectionNumber) {
|
|
37267
|
+
setIsSearchComplete(true);
|
|
37268
|
+
return Promise.resolve();
|
|
37269
|
+
}
|
|
37270
|
+
const serviceType = (storedData === null || storedData === void 0 ? void 0 : storedData.serviceType) || (storedConnection !== null && storedConnection !== void 0 && storedConnection.sewerage ? "SEWERAGE" : "WATER");
|
|
37271
|
+
const businessService = serviceType === "SEWERAGE" ? "SW" : "WS";
|
|
37272
|
+
const _temp = _finallyRethrows(function () {
|
|
37273
|
+
return Promise.resolve(Digit.WSService.search({
|
|
37274
|
+
tenantId: (storedConnection === null || storedConnection === void 0 ? void 0 : storedConnection.tenantId) || Digit.ULBService.getCurrentTenantId(),
|
|
37275
|
+
filters: {
|
|
37276
|
+
connectionNumber,
|
|
37277
|
+
searchType: "CONNECTION",
|
|
37278
|
+
isConnectionSearch: true
|
|
37279
|
+
},
|
|
37280
|
+
businessService
|
|
37281
|
+
})).then(function (response) {
|
|
37282
|
+
var _result$SewerageConne, _result$WaterConnecti;
|
|
37283
|
+
const result = (response === null || response === void 0 ? void 0 : response.data) || response;
|
|
37284
|
+
const freshConnection = serviceType === "SEWERAGE" ? result === null || result === void 0 ? void 0 : (_result$SewerageConne = result.SewerageConnections) === null || _result$SewerageConne === void 0 ? void 0 : _result$SewerageConne[0] : result === null || result === void 0 ? void 0 : (_result$WaterConnecti = result.WaterConnection) === null || _result$WaterConnecti === void 0 ? void 0 : _result$WaterConnecti[0];
|
|
37285
|
+
if (freshConnection) {
|
|
37286
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
37287
|
+
...storedData,
|
|
37288
|
+
serviceType,
|
|
37289
|
+
connectionNo: (freshConnection === null || freshConnection === void 0 ? void 0 : freshConnection.connectionNo) || connectionNumber,
|
|
37290
|
+
applicationData: {
|
|
37291
|
+
...storedConnection,
|
|
37292
|
+
...freshConnection
|
|
37293
|
+
}
|
|
37294
|
+
});
|
|
37295
|
+
}
|
|
37296
|
+
});
|
|
37297
|
+
}, function (_wasThrown, _result) {
|
|
37298
|
+
setIsSearchComplete(true);
|
|
37299
|
+
if (_wasThrown) throw _result;
|
|
37300
|
+
return _result;
|
|
37301
|
+
});
|
|
37302
|
+
return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
|
|
37303
|
+
} catch (e) {
|
|
37304
|
+
return Promise.reject(e);
|
|
37305
|
+
}
|
|
37306
|
+
};
|
|
37307
|
+
refreshConnectionData().catch(() => setIsSearchComplete(true));
|
|
37308
|
+
}, []);
|
|
37309
|
+
if (!isSearchComplete) return null;
|
|
36721
37310
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
36722
37311
|
const {
|
|
36723
37312
|
component,
|
|
@@ -37923,15 +38512,15 @@ const CheckPage$1 = () => {
|
|
|
37923
38512
|
className: "border-none",
|
|
37924
38513
|
label: t("WS_DISCONNECTION_TYPE"),
|
|
37925
38514
|
text: t(value.WSDisconnectionForm.type.value.i18nKey)
|
|
37926
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38515
|
+
}), value.WSDisconnectionForm.type.value.code === "Temporary" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38516
|
+
className: "border-none",
|
|
38517
|
+
label: "REQUESTED PERIOD (IN MONTHS)",
|
|
38518
|
+
text: value.WSDisconnectionForm.requestedPeriodMonths
|
|
38519
|
+
}) : /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
37927
38520
|
className: "border-none",
|
|
37928
38521
|
label: t("WS_DISCONNECTION_PROPOSED_DATE"),
|
|
37929
38522
|
text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
|
|
37930
|
-
}),
|
|
37931
|
-
className: "border-none",
|
|
37932
|
-
label: t("WS_DISCONNECTION_PROPOSED_END_DATE"),
|
|
37933
|
-
text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.endDate))
|
|
37934
|
-
}) : "", /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38523
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
37935
38524
|
className: "border-none",
|
|
37936
38525
|
label: t("WS_DISCONNECTION_REASON"),
|
|
37937
38526
|
text: t(value.WSDisconnectionForm.reason.value.i18nKey)
|
|
@@ -38201,7 +38790,7 @@ const CheckPage$2 = () => {
|
|
|
38201
38790
|
};
|
|
38202
38791
|
|
|
38203
38792
|
const CheckPage$3 = () => {
|
|
38204
|
-
var _value$applicationDat;
|
|
38793
|
+
var _value$applicationDat, _value$WSDisconnectio, _value$WSDisconnectio2, _value$WSDisconnectio3, _value$WSDisconnectio4, _value$WSDisconnectio5;
|
|
38205
38794
|
const {
|
|
38206
38795
|
t
|
|
38207
38796
|
} = reactI18next.useTranslation();
|
|
@@ -38368,7 +38957,7 @@ const CheckPage$3 = () => {
|
|
|
38368
38957
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38369
38958
|
className: "border-none",
|
|
38370
38959
|
label: t("WS_DISCONNECTION_REASON"),
|
|
38371
|
-
text: value.WSDisconnectionForm.reason.value
|
|
38960
|
+
text: t(((_value$WSDisconnectio = value.WSDisconnectionForm.reason) === null || _value$WSDisconnectio === void 0 ? void 0 : (_value$WSDisconnectio2 = _value$WSDisconnectio.value) === null || _value$WSDisconnectio2 === void 0 ? void 0 : _value$WSDisconnectio2.i18nKey) || ((_value$WSDisconnectio3 = value.WSDisconnectionForm.reason) === null || _value$WSDisconnectio3 === void 0 ? void 0 : (_value$WSDisconnectio4 = _value$WSDisconnectio3.value) === null || _value$WSDisconnectio4 === void 0 ? void 0 : _value$WSDisconnectio4.code) || ((_value$WSDisconnectio5 = value.WSDisconnectionForm.reason) === null || _value$WSDisconnectio5 === void 0 ? void 0 : _value$WSDisconnectio5.value) || "CS_NA")
|
|
38372
38961
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38373
38962
|
style: {
|
|
38374
38963
|
paddingRight: "16px"
|
|
@@ -48794,7 +49383,11 @@ const styles$1 = {
|
|
|
48794
49383
|
buttonStyle: {
|
|
48795
49384
|
display: "flex",
|
|
48796
49385
|
justifyContent: "flex-end",
|
|
48797
|
-
color: "#a82227"
|
|
49386
|
+
color: "#a82227",
|
|
49387
|
+
marginTop: "10px",
|
|
49388
|
+
marginBottom: "10px",
|
|
49389
|
+
cursor: "pointer",
|
|
49390
|
+
fontWeight: "bold"
|
|
48798
49391
|
},
|
|
48799
49392
|
headerStyle: {
|
|
48800
49393
|
marginTop: "10px",
|
|
@@ -48804,14 +49397,93 @@ const styles$1 = {
|
|
|
48804
49397
|
color: " rgba(11, 12, 12, var(--text-opacity))"
|
|
48805
49398
|
}
|
|
48806
49399
|
};
|
|
49400
|
+
const thStyle = {
|
|
49401
|
+
textAlign: "left",
|
|
49402
|
+
borderBottom: "#D6D5D4 1px solid",
|
|
49403
|
+
padding: "16px 12px",
|
|
49404
|
+
whiteSpace: "break-spaces",
|
|
49405
|
+
fontSize: "14px",
|
|
49406
|
+
fontWeight: "bold"
|
|
49407
|
+
};
|
|
49408
|
+
const tdStyle = {
|
|
49409
|
+
textAlign: "left",
|
|
49410
|
+
borderBottom: "#D6D5D4 1px solid",
|
|
49411
|
+
padding: "8px 10px",
|
|
49412
|
+
wordBreak: "keep-all",
|
|
49413
|
+
fontSize: "14px"
|
|
49414
|
+
};
|
|
48807
49415
|
const ArrearSummary = _ref => {
|
|
48808
|
-
var _bill$billDetails, _sortedBillDetails, _arrears$toFixed;
|
|
49416
|
+
var _bill$billDetails, _bill$billDetails2, _sortedBillDetails, _arrears$toFixed;
|
|
48809
49417
|
let {
|
|
48810
|
-
bill = {}
|
|
49418
|
+
bill = {},
|
|
49419
|
+
businessService
|
|
48811
49420
|
} = _ref;
|
|
48812
49421
|
const {
|
|
48813
49422
|
t
|
|
48814
49423
|
} = reactI18next.useTranslation();
|
|
49424
|
+
const [showArrear, setShowArrear] = React.useState(false);
|
|
49425
|
+
const isWNS = businessService === "WS" || businessService === "SW";
|
|
49426
|
+
const yearWiseBills = bill === null || bill === void 0 ? void 0 : (_bill$billDetails = bill.billDetails) === null || _bill$billDetails === void 0 ? void 0 : _bill$billDetails.sort((a, b) => b.fromPeriod - a.fromPeriod);
|
|
49427
|
+
const getBillingPeriod = _bill => {
|
|
49428
|
+
const {
|
|
49429
|
+
fromPeriod,
|
|
49430
|
+
toPeriod
|
|
49431
|
+
} = _bill;
|
|
49432
|
+
let from = new Date(fromPeriod).toLocaleDateString();
|
|
49433
|
+
let to = new Date(toPeriod).toLocaleDateString();
|
|
49434
|
+
return from + "-" + to;
|
|
49435
|
+
};
|
|
49436
|
+
const renderArrearDetailsForWNS = () => {
|
|
49437
|
+
var _yearWiseBills$filter, _yearWiseBills$filter2, _yearWiseBills$filter3, _yearWiseBills$filter4, _yearWiseBills$filter5;
|
|
49438
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
49439
|
+
style: {
|
|
49440
|
+
maxWidth: "100%",
|
|
49441
|
+
overflowX: "auto",
|
|
49442
|
+
backgroundColor: "#EEEEEE",
|
|
49443
|
+
marginTop: "10px"
|
|
49444
|
+
}
|
|
49445
|
+
}, /*#__PURE__*/React__default.createElement("table", {
|
|
49446
|
+
className: "table-fixed-column-common-pay",
|
|
49447
|
+
style: {
|
|
49448
|
+
width: "100%",
|
|
49449
|
+
borderCollapse: "collapse"
|
|
49450
|
+
}
|
|
49451
|
+
}, /*#__PURE__*/React__default.createElement("thead", null, /*#__PURE__*/React__default.createElement("tr", null, /*#__PURE__*/React__default.createElement("th", {
|
|
49452
|
+
style: thStyle
|
|
49453
|
+
}, t("CS_BILL_NO")), /*#__PURE__*/React__default.createElement("th", {
|
|
49454
|
+
style: {
|
|
49455
|
+
...thStyle
|
|
49456
|
+
}
|
|
49457
|
+
}, t("CS_PAYMENT_BILLING_PERIOD")), /*#__PURE__*/React__default.createElement("th", {
|
|
49458
|
+
style: {
|
|
49459
|
+
...thStyle
|
|
49460
|
+
}
|
|
49461
|
+
}, t("CS_BILL_DUEDATE")), yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter === void 0 ? void 0 : (_yearWiseBills$filter2 = _yearWiseBills$filter[0]) === null || _yearWiseBills$filter2 === void 0 ? void 0 : (_yearWiseBills$filter3 = _yearWiseBills$filter2.billAccountDetails) === null || _yearWiseBills$filter3 === void 0 ? void 0 : (_yearWiseBills$filter4 = _yearWiseBills$filter3.sort((a, b) => a.order - b.order)) === null || _yearWiseBills$filter4 === void 0 ? void 0 : _yearWiseBills$filter4.map((head, index) => /*#__PURE__*/React__default.createElement("th", {
|
|
49462
|
+
style: {
|
|
49463
|
+
...thStyle
|
|
49464
|
+
},
|
|
49465
|
+
key: index
|
|
49466
|
+
}, t(head.taxHeadCode))), /*#__PURE__*/React__default.createElement("th", {
|
|
49467
|
+
style: thStyle
|
|
49468
|
+
}, t("TOTAL_TAX")))), /*#__PURE__*/React__default.createElement("tbody", null, yearWiseBills === null || yearWiseBills === void 0 ? void 0 : (_yearWiseBills$filter5 = yearWiseBills.filter((e, ind) => ind > 0)) === null || _yearWiseBills$filter5 === void 0 ? void 0 : _yearWiseBills$filter5.map((year_bill, index) => {
|
|
49469
|
+
var _year_bill$billAccoun;
|
|
49470
|
+
const sorted_tax_heads = year_bill === null || year_bill === void 0 ? void 0 : (_year_bill$billAccoun = year_bill.billAccountDetails) === null || _year_bill$billAccoun === void 0 ? void 0 : _year_bill$billAccoun.sort((a, b) => a.order - b.order);
|
|
49471
|
+
return /*#__PURE__*/React__default.createElement("tr", {
|
|
49472
|
+
key: index
|
|
49473
|
+
}, /*#__PURE__*/React__default.createElement("td", {
|
|
49474
|
+
style: tdStyle
|
|
49475
|
+
}, year_bill === null || year_bill === void 0 ? void 0 : year_bill.billNumber), /*#__PURE__*/React__default.createElement("td", {
|
|
49476
|
+
style: tdStyle
|
|
49477
|
+
}, getBillingPeriod(year_bill)), /*#__PURE__*/React__default.createElement("td", {
|
|
49478
|
+
style: tdStyle
|
|
49479
|
+
}, (year_bill === null || year_bill === void 0 ? void 0 : year_bill.expiryDate) && new Date(year_bill === null || year_bill === void 0 ? void 0 : year_bill.expiryDate).toLocaleDateString()), sorted_tax_heads === null || sorted_tax_heads === void 0 ? void 0 : sorted_tax_heads.map((e, i) => /*#__PURE__*/React__default.createElement("td", {
|
|
49480
|
+
style: tdStyle,
|
|
49481
|
+
key: i
|
|
49482
|
+
}, e.amount)), /*#__PURE__*/React__default.createElement("td", {
|
|
49483
|
+
style: tdStyle
|
|
49484
|
+
}, year_bill.amount));
|
|
49485
|
+
}))));
|
|
49486
|
+
};
|
|
48815
49487
|
const formatTaxHeaders = function (billDetail) {
|
|
48816
49488
|
var _billDetail, _billDetail2, _billDetail3;
|
|
48817
49489
|
if (billDetail === void 0) {
|
|
@@ -48850,7 +49522,7 @@ const ArrearSummary = _ref => {
|
|
|
48850
49522
|
return `${fromDate.toLocaleDateString()}-${toDate.toLocaleDateString()}`;
|
|
48851
49523
|
};
|
|
48852
49524
|
let fees = {};
|
|
48853
|
-
let sortedBillDetails = (bill === null || bill === void 0 ? void 0 : (_bill$
|
|
49525
|
+
let sortedBillDetails = (bill === null || bill === void 0 ? void 0 : (_bill$billDetails2 = bill.billDetails) === null || _bill$billDetails2 === void 0 ? void 0 : _bill$billDetails2.sort((a, b) => b.fromPeriod - a.fromPeriod)) || [];
|
|
48854
49526
|
sortedBillDetails = [...sortedBillDetails];
|
|
48855
49527
|
const arrears = ((_sortedBillDetails = sortedBillDetails) === null || _sortedBillDetails === void 0 ? void 0 : _sortedBillDetails.reduce((total, current, index) => index === 0 ? total : total + current.amount, 0)) || 0;
|
|
48856
49528
|
let arrearsAmount = `₹ ${(arrears === null || arrears === void 0 ? void 0 : (_arrears$toFixed = arrears.toFixed) === null || _arrears$toFixed === void 0 ? void 0 : _arrears$toFixed.call(arrears, 0)) || Number(0).toFixed(0)}`;
|
|
@@ -48868,7 +49540,18 @@ const ArrearSummary = _ref => {
|
|
|
48868
49540
|
let keys = [];
|
|
48869
49541
|
keys = Object.keys(head);
|
|
48870
49542
|
keys.sort((x, y) => head[x] - head[y]);
|
|
48871
|
-
|
|
49543
|
+
if (isWNS) {
|
|
49544
|
+
if (!yearWiseBills || yearWiseBills.length <= 1) {
|
|
49545
|
+
return /*#__PURE__*/React__default.createElement("span", null);
|
|
49546
|
+
}
|
|
49547
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showArrear && renderArrearDetailsForWNS(), /*#__PURE__*/React__default.createElement("div", {
|
|
49548
|
+
style: styles$1.buttonStyle
|
|
49549
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
49550
|
+
onClick: () => {
|
|
49551
|
+
setShowArrear(!showArrear);
|
|
49552
|
+
}
|
|
49553
|
+
}, showArrear ? t("ES_COMMON_HIDE_DETAILS") : t("ES_COMMON_VIEW_DETAILS"))));
|
|
49554
|
+
}
|
|
48872
49555
|
if (arrears == 0 || arrears < 0) {
|
|
48873
49556
|
return /*#__PURE__*/React__default.createElement("span", null);
|
|
48874
49557
|
}
|
|
@@ -50532,12 +51215,15 @@ const ApplicationDetails = props => {
|
|
|
50532
51215
|
}
|
|
50533
51216
|
try {
|
|
50534
51217
|
if (moduleCode !== null && moduleCode !== void 0 && moduleCode.includes("WS")) {
|
|
50535
|
-
|
|
50536
|
-
|
|
50537
|
-
|
|
50538
|
-
|
|
50539
|
-
|
|
50540
|
-
|
|
51218
|
+
const actionStr = (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.action) || "";
|
|
51219
|
+
if (actionStr === "INITIATE" || actionStr === "EXECUTE_DISCONNECTION") {
|
|
51220
|
+
setShowConfirmation({
|
|
51221
|
+
data,
|
|
51222
|
+
nocData,
|
|
51223
|
+
isOBPS
|
|
51224
|
+
});
|
|
51225
|
+
return Promise.resolve();
|
|
51226
|
+
}
|
|
50541
51227
|
}
|
|
50542
51228
|
return executeSubmitAction(data, nocData, isOBPS);
|
|
50543
51229
|
} catch (e) {
|
|
@@ -51182,7 +51868,7 @@ const GetConnectionDetails = () => {
|
|
|
51182
51868
|
const getTenantId = filters === null || filters === void 0 ? void 0 : filters.tenantId;
|
|
51183
51869
|
const [showOptions, setShowOptions] = React.useState(false);
|
|
51184
51870
|
const stateCode = Digit.ULBService.getStateId();
|
|
51185
|
-
const actionConfig = ["
|
|
51871
|
+
const actionConfig = ["DISCONNECTION_BUTTON"];
|
|
51186
51872
|
const {
|
|
51187
51873
|
isLoading,
|
|
51188
51874
|
isError,
|
|
@@ -51269,53 +51955,6 @@ const GetConnectionDetails = () => {
|
|
|
51269
51955
|
}, 10000);
|
|
51270
51956
|
const checkApplicationStatus = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a14 = applicationDetails.applicationData) === null || _applicationDetails$a14 === void 0 ? void 0 : _applicationDetails$a14.status) === "Active" ? true : false;
|
|
51271
51957
|
const checkWorkflow = applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isApplicationApproved;
|
|
51272
|
-
const getModifyConnectionButton = () => {
|
|
51273
|
-
var _applicationDetails$f, _applicationDetails$f2, _applicationDetails$a15, _applicationDetails$p;
|
|
51274
|
-
if (!checkApplicationStatus) {
|
|
51275
|
-
setshowActionToast({
|
|
51276
|
-
key: "error",
|
|
51277
|
-
label: "CONN_NOT_ACTIVE"
|
|
51278
|
-
});
|
|
51279
|
-
return;
|
|
51280
|
-
}
|
|
51281
|
-
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f = applicationDetails.fetchBillsData) === null || _applicationDetails$f === void 0 ? void 0 : (_applicationDetails$f2 = _applicationDetails$f[0]) === null || _applicationDetails$f2 === void 0 ? void 0 : _applicationDetails$f2.totalAmount) > 0) {
|
|
51282
|
-
setshowActionToast({
|
|
51283
|
-
key: "error",
|
|
51284
|
-
label: "WS_DUE_AMOUNT_SHOULD_BE_ZERO"
|
|
51285
|
-
});
|
|
51286
|
-
return;
|
|
51287
|
-
}
|
|
51288
|
-
let pathname = `/digit-ui/employee/ws/modify-application?applicationNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a15 = applicationDetails.applicationData) === null || _applicationDetails$a15 === void 0 ? void 0 : _applicationDetails$a15.connectionNo}&service=${serviceType}&propertyId=${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p = applicationDetails.propertyDetails) === null || _applicationDetails$p === void 0 ? void 0 : _applicationDetails$p.propertyId}&from=WS_COMMON_CONNECTION_DETAIL`;
|
|
51289
|
-
history.push(`${pathname}`, JSON.stringify({
|
|
51290
|
-
data: applicationDetails
|
|
51291
|
-
}));
|
|
51292
|
-
};
|
|
51293
|
-
const getBillAmendmentButton = () => {
|
|
51294
|
-
var _demandData$Demands, _applicationDetails$a16;
|
|
51295
|
-
let isBillAmendNotApplicable = false;
|
|
51296
|
-
billData === null || billData === void 0 ? void 0 : billData.map(bill => {
|
|
51297
|
-
if ((bill === null || bill === void 0 ? void 0 : bill.status) === "INWORKFLOW") {
|
|
51298
|
-
isBillAmendNotApplicable = true;
|
|
51299
|
-
return;
|
|
51300
|
-
}
|
|
51301
|
-
});
|
|
51302
|
-
if ((demandData === null || demandData === void 0 ? void 0 : (_demandData$Demands = demandData.Demands) === null || _demandData$Demands === void 0 ? void 0 : _demandData$Demands.length) === 0) {
|
|
51303
|
-
setshowActionToast({
|
|
51304
|
-
key: "error",
|
|
51305
|
-
label: "No_Bills_Found"
|
|
51306
|
-
});
|
|
51307
|
-
return;
|
|
51308
|
-
} else if (isBillAmendNotApplicable) {
|
|
51309
|
-
setshowActionToast({
|
|
51310
|
-
key: "error",
|
|
51311
|
-
label: "WORKFLOW_IN_PROGRESS"
|
|
51312
|
-
});
|
|
51313
|
-
return;
|
|
51314
|
-
}
|
|
51315
|
-
history.push(`/digit-ui/employee/ws/required-documents?connectionNumber=${applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a16 = applicationDetails.applicationData) === null || _applicationDetails$a16 === void 0 ? void 0 : _applicationDetails$a16.connectionNo}&tenantId=${getTenantId}&service=${serviceType}`, JSON.stringify({
|
|
51316
|
-
data: applicationDetails
|
|
51317
|
-
}));
|
|
51318
|
-
};
|
|
51319
51958
|
const closeMenu = () => {
|
|
51320
51959
|
setShowOptions(false);
|
|
51321
51960
|
};
|
|
@@ -51355,7 +51994,10 @@ const GetConnectionDetails = () => {
|
|
|
51355
51994
|
var _billData$2, _applicationDetails$f4;
|
|
51356
51995
|
if (((_billData$2 = billData[0]) === null || _billData$2 === void 0 ? void 0 : _billData$2.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f4 = applicationDetails.fetchBillsData) === null || _applicationDetails$f4 === void 0 ? void 0 : _applicationDetails$f4.length) <= 0 || due === "0" || due == "0" || due < 0) {
|
|
51357
51996
|
var _applicationDetails$a18;
|
|
51358
|
-
Digit.SessionStorage.set("WS_DISCONNECTION",
|
|
51997
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
51998
|
+
...applicationDetails,
|
|
51999
|
+
serviceType
|
|
52000
|
+
});
|
|
51359
52001
|
const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
|
|
51360
52002
|
history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
|
|
51361
52003
|
} else {
|
|
@@ -51364,11 +52006,7 @@ const GetConnectionDetails = () => {
|
|
|
51364
52006
|
}
|
|
51365
52007
|
};
|
|
51366
52008
|
function onActionSelect(action) {
|
|
51367
|
-
if (action === "
|
|
51368
|
-
getModifyConnectionButton();
|
|
51369
|
-
} else if (action === "BILL_AMENDMENT_BUTTON") {
|
|
51370
|
-
getBillAmendmentButton();
|
|
51371
|
-
} else if (action === "DISCONNECTION_BUTTON") {
|
|
52009
|
+
if (action === "DISCONNECTION_BUTTON") {
|
|
51372
52010
|
getDisconnectionButton();
|
|
51373
52011
|
} else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
|
|
51374
52012
|
getRestorationButton();
|
|
@@ -56202,7 +56840,7 @@ const MutationApplication = () => {
|
|
|
56202
56840
|
applicationNumber: querySearchParam
|
|
56203
56841
|
} : {
|
|
56204
56842
|
connectionNumber: querySearchParam,
|
|
56205
|
-
searchType:
|
|
56843
|
+
searchType: "CONNECTION"
|
|
56206
56844
|
};
|
|
56207
56845
|
Object.keys(params).forEach(k => params[k] == null && delete params[k]);
|
|
56208
56846
|
return Promise.resolve(Digit.WSService.search({
|
|
@@ -56213,10 +56851,10 @@ const MutationApplication = () => {
|
|
|
56213
56851
|
let wsData;
|
|
56214
56852
|
if (businessService === "WS") {
|
|
56215
56853
|
var _rawData$WaterConnect, _rawData$WaterConnect2;
|
|
56216
|
-
wsData = (rawData === null || rawData === void 0 ? void 0 : (_rawData$WaterConnect = rawData.WaterConnection) === null || _rawData$WaterConnect === void 0 ? void 0 : _rawData$WaterConnect.find(c => c.applicationStatus ===
|
|
56854
|
+
wsData = (rawData === null || rawData === void 0 ? void 0 : (_rawData$WaterConnect = rawData.WaterConnection) === null || _rawData$WaterConnect === void 0 ? void 0 : _rawData$WaterConnect.find(c => c.applicationStatus === "CONNECTION_ACTIVATED")) || (rawData === null || rawData === void 0 ? void 0 : (_rawData$WaterConnect2 = rawData.WaterConnection) === null || _rawData$WaterConnect2 === void 0 ? void 0 : _rawData$WaterConnect2[0]);
|
|
56217
56855
|
} else {
|
|
56218
56856
|
var _rawData$SewerageConn, _rawData$SewerageConn2;
|
|
56219
|
-
wsData = (rawData === null || rawData === void 0 ? void 0 : (_rawData$SewerageConn = rawData.SewerageConnections) === null || _rawData$SewerageConn === void 0 ? void 0 : _rawData$SewerageConn.find(c => c.applicationStatus ===
|
|
56857
|
+
wsData = (rawData === null || rawData === void 0 ? void 0 : (_rawData$SewerageConn = rawData.SewerageConnections) === null || _rawData$SewerageConn === void 0 ? void 0 : _rawData$SewerageConn.find(c => c.applicationStatus === "CONNECTION_ACTIVATED")) || (rawData === null || rawData === void 0 ? void 0 : (_rawData$SewerageConn2 = rawData.SewerageConnections) === null || _rawData$SewerageConn2 === void 0 ? void 0 : _rawData$SewerageConn2[0]);
|
|
56220
56858
|
}
|
|
56221
56859
|
return wsData ? {
|
|
56222
56860
|
applicationData: wsData,
|
|
@@ -56836,7 +57474,7 @@ const MutationApplication = () => {
|
|
|
56836
57474
|
}))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
56837
57475
|
error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error",
|
|
56838
57476
|
warning: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "warning",
|
|
56839
|
-
label:
|
|
57477
|
+
label: showToast === null || showToast === void 0 ? void 0 : showToast.message,
|
|
56840
57478
|
onClose: () => setShowToast(null),
|
|
56841
57479
|
isDleteBtn: true
|
|
56842
57480
|
}))));
|
|
@@ -56891,19 +57529,52 @@ const RestorationApplication = () => {
|
|
|
56891
57529
|
t
|
|
56892
57530
|
} = reactI18next.useTranslation();
|
|
56893
57531
|
const match = reactRouterDom.useRouteMatch();
|
|
57532
|
+
const config = [{
|
|
57533
|
+
route: "k-number",
|
|
57534
|
+
component: "WSDisconnectionKNumber",
|
|
57535
|
+
key: "WSDisconnectionKNumber"
|
|
57536
|
+
}, {
|
|
57537
|
+
route: "consumer-details",
|
|
57538
|
+
component: "WSDisconnectionConsumerDetails",
|
|
57539
|
+
key: "WSDisconnectionConsumerDetails"
|
|
57540
|
+
}, {
|
|
57541
|
+
route: "new-restoration",
|
|
57542
|
+
component: "WSRestorationForm",
|
|
57543
|
+
key: "WSRestorationForm"
|
|
57544
|
+
}];
|
|
57545
|
+
config.indexRoute = "k-number";
|
|
56894
57546
|
const Component = Digit.ComponentRegistryService.getComponent("WSRestorationForm");
|
|
56895
|
-
|
|
56896
|
-
|
|
56897
|
-
|
|
56898
|
-
|
|
56899
|
-
|
|
56900
|
-
|
|
56901
|
-
|
|
56902
|
-
|
|
56903
|
-
|
|
56904
|
-
|
|
56905
|
-
|
|
56906
|
-
|
|
57547
|
+
const getPath = (path, params) => {
|
|
57548
|
+
params && Object.keys(params).map(key => {
|
|
57549
|
+
path = path.replace(`:${key}`, params[key]);
|
|
57550
|
+
});
|
|
57551
|
+
return path;
|
|
57552
|
+
};
|
|
57553
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
57554
|
+
const {
|
|
57555
|
+
component,
|
|
57556
|
+
texts,
|
|
57557
|
+
inputs,
|
|
57558
|
+
key,
|
|
57559
|
+
isSkipEnabled
|
|
57560
|
+
} = routeObj;
|
|
57561
|
+
const Component = Digit.ComponentRegistryService.getComponent(component);
|
|
57562
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
57563
|
+
path: `${getPath(match.path, match.params)}/${routeObj.route}`,
|
|
57564
|
+
key: index
|
|
57565
|
+
}, /*#__PURE__*/React__default.createElement(Component, {
|
|
57566
|
+
config: {
|
|
57567
|
+
texts,
|
|
57568
|
+
inputs,
|
|
57569
|
+
key,
|
|
57570
|
+
isSkipEnabled
|
|
57571
|
+
},
|
|
57572
|
+
t: t,
|
|
57573
|
+
userType: "employee",
|
|
57574
|
+
flow: "reconnection"
|
|
57575
|
+
}));
|
|
57576
|
+
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, null, /*#__PURE__*/React__default.createElement(reactRouterDom_min.Redirect, {
|
|
57577
|
+
to: `${getPath(match.path, match.params)}/${config.indexRoute}`
|
|
56907
57578
|
})));
|
|
56908
57579
|
};
|
|
56909
57580
|
|
|
@@ -60178,6 +60849,9 @@ const WSLinks = _ref2 => {
|
|
|
60178
60849
|
}, {
|
|
60179
60850
|
link: `${matchPath}/disconnect-application`,
|
|
60180
60851
|
i18nKey: t("WS_DISCONNECTION")
|
|
60852
|
+
}, {
|
|
60853
|
+
link: `${matchPath}/restore-application/k-number`,
|
|
60854
|
+
i18nKey: t("WS_RECONNECTION") || "Apply Reconnection"
|
|
60181
60855
|
}];
|
|
60182
60856
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenHomeCard, {
|
|
60183
60857
|
header: t("ACTION_TEST_WATER_AND_SEWERAGE"),
|