@djb25/digit-ui-module-ws 1.0.96 → 1.0.97
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 +942 -963
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +943 -964
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1127,7 +1127,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
|
|
|
1127
1127
|
};
|
|
1128
1128
|
const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
1129
1129
|
try {
|
|
1130
|
-
var _Digit$UserService$ge0, _Digit$UserService$ge1, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio96, _storeData$applicatio97, _storeData$applicatio98, _storeData$applicatio99, _storeData$applicatio100, _storeData$applicatio101, _data$
|
|
1130
|
+
var _Digit$UserService$ge0, _Digit$UserService$ge1, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio96, _storeData$applicatio97, _storeData$applicatio98, _storeData$applicatio99, _storeData$applicatio100, _storeData$applicatio101, _data$reason, _data$reason$value3, _data$reason2, _data$reason3, _data$reason4, _storeData$applicatio102, _storeData$applicatio103, _storeData$applicatio104, _storeData$applicatio105, _storeData$applicatio106, _storeData$applicatio107, _storeData$applicatio108, _storeData$applicatio109, _plumberInfo3, _storeData$applicatio110, _storeData$applicatio111, _storeData$applicatio112, _storeData$applicatio113, _storeData$applicatio114, _storeData$applicatio115, _storeData$applicatio116, _storeData$applicatio117, _storeData$applicatio118, _storeData$applicatio119, _storeData$applicatio120, _storeData$applicatio121, _data$reason5, _data$reason5$value, _data$reason6, _data$reason7, _data$reason8, _storeData$applicatio122, _storeData$applicatio123, _storeData$applicatio124, _storeData$applicatio125, _storeData$applicatio126, _storeData$applicatio127, _plumberInfo4, _storeData$applicatio128, _storeData$applicatio129, _storeData$applicatio130, _storeData$applicatio131, _storeData$applicatio132, _storeData$applicatio133, _storeData$applicatio134;
|
|
1131
1131
|
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
1132
|
let plumberInfo = [];
|
|
1133
1133
|
if ((storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio70 = storeData.applicationData) === null || _storeData$applicatio70 === void 0 ? void 0 : (_storeData$applicatio71 = _storeData$applicatio70.plumberInfo) === null || _storeData$applicatio71 === void 0 ? void 0 : _storeData$applicatio71.length) > 0) {
|
|
@@ -1149,9 +1149,10 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1149
1149
|
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio101 = storeData.applicationData) === null || _storeData$applicatio101 === void 0 ? void 0 : _storeData$applicatio101.connectionHolders,
|
|
1150
1150
|
applicationType: "WATER_RECONNECTION",
|
|
1151
1151
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1152
|
-
isdisconnection:
|
|
1153
|
-
isDisconnectionTemporary:
|
|
1154
|
-
|
|
1152
|
+
isdisconnection: false,
|
|
1153
|
+
isDisconnectionTemporary: true,
|
|
1154
|
+
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason = data.reason) === null || _data$reason === void 0 ? void 0 : (_data$reason$value3 = _data$reason.value) === null || _data$reason$value3 === void 0 ? void 0 : _data$reason$value3.code) || (typeof (data === null || data === void 0 ? void 0 : (_data$reason2 = data.reason) === null || _data$reason2 === void 0 ? void 0 : _data$reason2.value) === "string" ? data === null || data === void 0 ? void 0 : (_data$reason3 = data.reason) === null || _data$reason3 === void 0 ? void 0 : _data$reason3.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$reason4 = data.reason) === null || _data$reason4 === void 0 ? void 0 : _data$reason4.code) || "",
|
|
1155
|
+
disconnectionReason: "",
|
|
1155
1156
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1156
1157
|
water: true,
|
|
1157
1158
|
sewerage: false,
|
|
@@ -1194,9 +1195,10 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1194
1195
|
connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio121 = storeData.applicationData) === null || _storeData$applicatio121 === void 0 ? void 0 : _storeData$applicatio121.connectionHolders,
|
|
1195
1196
|
applicationType: "WATER_RECONNECTION",
|
|
1196
1197
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1197
|
-
isdisconnection:
|
|
1198
|
-
isDisconnectionTemporary:
|
|
1199
|
-
|
|
1198
|
+
isdisconnection: false,
|
|
1199
|
+
isDisconnectionTemporary: true,
|
|
1200
|
+
reconnectionReason: (data === null || data === void 0 ? void 0 : (_data$reason5 = data.reason) === null || _data$reason5 === void 0 ? void 0 : (_data$reason5$value = _data$reason5.value) === null || _data$reason5$value === void 0 ? void 0 : _data$reason5$value.code) || (typeof (data === null || data === void 0 ? void 0 : (_data$reason6 = data.reason) === null || _data$reason6 === void 0 ? void 0 : _data$reason6.value) === "string" ? data === null || data === void 0 ? void 0 : (_data$reason7 = data.reason) === null || _data$reason7 === void 0 ? void 0 : _data$reason7.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$reason8 = data.reason) === null || _data$reason8 === void 0 ? void 0 : _data$reason8.code) || "",
|
|
1201
|
+
disconnectionReason: "",
|
|
1200
1202
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1201
1203
|
water: false,
|
|
1202
1204
|
sewerage: true,
|
|
@@ -1234,14 +1236,14 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
|
|
|
1234
1236
|
};
|
|
1235
1237
|
const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
|
|
1236
1238
|
try {
|
|
1237
|
-
var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$
|
|
1239
|
+
var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type4, _data$type4$value, _data$reason$value4, _storeData$applicatio135, _data$type5, _data$type5$value, _data$reason$value5, _storeData$applicatio136, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2;
|
|
1238
1240
|
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;
|
|
1239
1241
|
let wsPayload = {
|
|
1240
1242
|
WaterConnection: {
|
|
1241
1243
|
...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
|
|
1242
1244
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1243
|
-
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$
|
|
1244
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$
|
|
1245
|
+
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$value4 = data.reason.value) === null || _data$reason$value4 === void 0 ? void 0 : _data$reason$value4.code,
|
|
1245
1247
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1246
1248
|
water: true,
|
|
1247
1249
|
sewerage: false,
|
|
@@ -1263,8 +1265,8 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
|
|
|
1263
1265
|
...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
|
|
1264
1266
|
dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
|
|
1265
1267
|
isdisconnection: true,
|
|
1266
|
-
isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$
|
|
1267
|
-
disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$
|
|
1268
|
+
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$value5 = data.reason.value) === null || _data$reason$value5 === void 0 ? void 0 : _data$reason$value5.code,
|
|
1268
1270
|
documents: data === null || data === void 0 ? void 0 : data.documents,
|
|
1269
1271
|
water: false,
|
|
1270
1272
|
sewerage: true,
|
|
@@ -11134,6 +11136,7 @@ const WSZROVerificationDetails = () => {
|
|
|
11134
11136
|
const [toast, setToast] = React.useState(null);
|
|
11135
11137
|
const [isSuccess, setIsSuccess] = React.useState(false);
|
|
11136
11138
|
const [apiResponse, setApiResponse] = React.useState(null);
|
|
11139
|
+
const [showConfirmation, setShowConfirmation] = React.useState(false);
|
|
11137
11140
|
React.useEffect(() => {
|
|
11138
11141
|
let timer;
|
|
11139
11142
|
if (isSuccess) {
|
|
@@ -11145,6 +11148,9 @@ const WSZROVerificationDetails = () => {
|
|
|
11145
11148
|
if (timer) clearTimeout(timer);
|
|
11146
11149
|
};
|
|
11147
11150
|
}, [isSuccess, history]);
|
|
11151
|
+
const requestActionConfirmation = () => {
|
|
11152
|
+
setShowConfirmation(true);
|
|
11153
|
+
};
|
|
11148
11154
|
const caseDataFromState = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.caseData;
|
|
11149
11155
|
const searchParams = new URLSearchParams(location.search);
|
|
11150
11156
|
const connectionNumber = searchParams.get("connectionNumber");
|
|
@@ -11323,7 +11329,7 @@ const WSZROVerificationDetails = () => {
|
|
|
11323
11329
|
actionCancelLabel: t("CS_COMMON_CANCEL"),
|
|
11324
11330
|
actionCancelOnSubmit: closeModal,
|
|
11325
11331
|
actionSaveLabel: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT"),
|
|
11326
|
-
actionSaveOnSubmit:
|
|
11332
|
+
actionSaveOnSubmit: requestActionConfirmation
|
|
11327
11333
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11328
11334
|
style: {
|
|
11329
11335
|
marginBottom: "16px"
|
|
@@ -11332,7 +11338,29 @@ const WSZROVerificationDetails = () => {
|
|
|
11332
11338
|
name: "comments",
|
|
11333
11339
|
value: comments,
|
|
11334
11340
|
onChange: e => setComments(e.target.value)
|
|
11335
|
-
}))),
|
|
11341
|
+
}))), showConfirmation && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
11342
|
+
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
11343
|
+
label: "Confirmation"
|
|
11344
|
+
}),
|
|
11345
|
+
headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
|
|
11346
|
+
onClick: () => setShowConfirmation(false)
|
|
11347
|
+
}),
|
|
11348
|
+
actionCancelLabel: t("CS_COMMON_CANCEL"),
|
|
11349
|
+
actionCancelOnSubmit: () => setShowConfirmation(false),
|
|
11350
|
+
actionSaveLabel: "Yes",
|
|
11351
|
+
actionSaveOnSubmit: () => {
|
|
11352
|
+
setShowConfirmation(false);
|
|
11353
|
+
submitAction();
|
|
11354
|
+
}
|
|
11355
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
11356
|
+
style: {
|
|
11357
|
+
padding: "16px"
|
|
11358
|
+
}
|
|
11359
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
11360
|
+
style: {
|
|
11361
|
+
fontSize: "16px"
|
|
11362
|
+
}
|
|
11363
|
+
}, "Are you sure you want to ", (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.toLowerCase()) || "this action", " ?"))), toast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
11336
11364
|
error: toast.error,
|
|
11337
11365
|
label: toast.message,
|
|
11338
11366
|
onClose: () => setToast(null)
|
|
@@ -15957,12 +15985,20 @@ const ConnectionDetails$2 = _props => {
|
|
|
15957
15985
|
fontSize: "12px",
|
|
15958
15986
|
marginTop: "-21px"
|
|
15959
15987
|
};
|
|
15960
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
15988
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_ACK_COMMON_APP_NO_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
15989
|
+
style: {
|
|
15990
|
+
color: "red"
|
|
15991
|
+
}
|
|
15992
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
15961
15993
|
className: "field"
|
|
15962
15994
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
15963
15995
|
disabled: true,
|
|
15964
15996
|
value: filters === null || filters === void 0 ? void 0 : filters.applicationNumber
|
|
15965
|
-
}))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
15997
|
+
}))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_CONN_TYPE"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
15998
|
+
style: {
|
|
15999
|
+
color: "red"
|
|
16000
|
+
}
|
|
16001
|
+
}, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
15966
16002
|
control: control,
|
|
15967
16003
|
name: "connectionType",
|
|
15968
16004
|
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.connectionType,
|
|
@@ -15988,7 +16024,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
15988
16024
|
}
|
|
15989
16025
|
}), localFormState.touched.connectionType && errors !== null && errors !== void 0 && (_errors$connectionTyp2 = errors.connectionType) !== null && _errors$connectionTyp2 !== void 0 && _errors$connectionTyp2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
15990
16026
|
style: errorStyle
|
|
15991
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16027
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_WATER_SOURCE"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16028
|
+
style: {
|
|
16029
|
+
color: "red"
|
|
16030
|
+
}
|
|
16031
|
+
}, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
15992
16032
|
control: control,
|
|
15993
16033
|
name: "waterSource",
|
|
15994
16034
|
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.waterSource,
|
|
@@ -16031,7 +16071,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
16031
16071
|
}
|
|
16032
16072
|
}), localFormState.touched.waterSource && errors !== null && errors !== void 0 && (_errors$waterSource2 = errors.waterSource) !== null && _errors$waterSource2 !== void 0 && _errors$waterSource2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16033
16073
|
style: errorStyle
|
|
16034
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$waterSource3 = errors.waterSource) === null || _errors$waterSource3 === void 0 ? void 0 : _errors$waterSource3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16074
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$waterSource3 = errors.waterSource) === null || _errors$waterSource3 === void 0 ? void 0 : _errors$waterSource3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_WATER_SUB_SOURCE"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16075
|
+
style: {
|
|
16076
|
+
color: "red"
|
|
16077
|
+
}
|
|
16078
|
+
}, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16035
16079
|
control: control,
|
|
16036
16080
|
name: "sourceSubData",
|
|
16037
16081
|
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sourceSubData,
|
|
@@ -16057,7 +16101,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
16057
16101
|
}
|
|
16058
16102
|
}), localFormState.touched.sourceSubData && errors !== null && errors !== void 0 && (_errors$sourceSubData2 = errors.sourceSubData) !== null && _errors$sourceSubData2 !== void 0 && _errors$sourceSubData2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16059
16103
|
style: errorStyle
|
|
16060
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$sourceSubData3 = errors.sourceSubData) === null || _errors$sourceSubData3 === void 0 ? void 0 : _errors$sourceSubData3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16104
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$sourceSubData3 = errors.sourceSubData) === null || _errors$sourceSubData3 === void 0 ? void 0 : _errors$sourceSubData3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_PIPE_SIZE_IN_INCHES_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16105
|
+
style: {
|
|
16106
|
+
color: "red"
|
|
16107
|
+
}
|
|
16108
|
+
}, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16061
16109
|
control: control,
|
|
16062
16110
|
name: "pipeSize",
|
|
16063
16111
|
defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.pipeSize,
|
|
@@ -16083,7 +16131,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
16083
16131
|
}
|
|
16084
16132
|
}), localFormState.touched.pipeSize && errors !== null && errors !== void 0 && (_errors$pipeSize2 = errors.pipeSize) !== null && _errors$pipeSize2 !== void 0 && _errors$pipeSize2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16085
16133
|
style: errorStyle
|
|
16086
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$pipeSize3 = errors.pipeSize) === null || _errors$pipeSize3 === void 0 ? void 0 : _errors$pipeSize3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16134
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$pipeSize3 = errors.pipeSize) === null || _errors$pipeSize3 === void 0 ? void 0 : _errors$pipeSize3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_NO_OF_TAPS"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16135
|
+
style: {
|
|
16136
|
+
color: "red"
|
|
16137
|
+
}
|
|
16138
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16087
16139
|
className: "field"
|
|
16088
16140
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16089
16141
|
control: control,
|
|
@@ -16117,7 +16169,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
16117
16169
|
}
|
|
16118
16170
|
})), localFormState.touched.noOfTaps && errors !== null && errors !== void 0 && (_errors$noOfTaps2 = errors.noOfTaps) !== null && _errors$noOfTaps2 !== void 0 && _errors$noOfTaps2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16119
16171
|
style: errorStyle
|
|
16120
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfTaps3 = errors.noOfTaps) === null || _errors$noOfTaps3 === void 0 ? void 0 : _errors$noOfTaps3.message) : null)) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16172
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfTaps3 = errors.noOfTaps) === null || _errors$noOfTaps3 === void 0 ? void 0 : _errors$noOfTaps3.message) : null)) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_NUMBER_WATER_CLOSETS_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16173
|
+
style: {
|
|
16174
|
+
color: "red"
|
|
16175
|
+
}
|
|
16176
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16121
16177
|
className: "field"
|
|
16122
16178
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16123
16179
|
control: control,
|
|
@@ -16151,7 +16207,11 @@ const ConnectionDetails$2 = _props => {
|
|
|
16151
16207
|
}
|
|
16152
16208
|
})), localFormState.touched.noOfWaterClosets && errors !== null && errors !== void 0 && (_errors$noOfWaterClos2 = errors.noOfWaterClosets) !== null && _errors$noOfWaterClos2 !== void 0 && _errors$noOfWaterClos2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16153
16209
|
style: errorStyle
|
|
16154
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16210
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_NO_OF_TOILETS"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16211
|
+
style: {
|
|
16212
|
+
color: "red"
|
|
16213
|
+
}
|
|
16214
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16155
16215
|
className: "field"
|
|
16156
16216
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16157
16217
|
control: control,
|
|
@@ -16335,7 +16395,11 @@ const PlumberDetails = _props => {
|
|
|
16335
16395
|
fontSize: "12px",
|
|
16336
16396
|
marginTop: "-21px"
|
|
16337
16397
|
};
|
|
16338
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16398
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16399
|
+
style: {
|
|
16400
|
+
color: "red"
|
|
16401
|
+
}
|
|
16402
|
+
}, "*")), /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16339
16403
|
control: control,
|
|
16340
16404
|
name: "detailsProvidedBy",
|
|
16341
16405
|
defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.detailsProvidedBy,
|
|
@@ -16376,7 +16440,11 @@ const PlumberDetails = _props => {
|
|
|
16376
16440
|
}
|
|
16377
16441
|
}), localFormState.touched.detailsProvidedBy && errors !== null && errors !== void 0 && (_errors$detailsProvid2 = errors.detailsProvidedBy) !== null && _errors$detailsProvid2 !== void 0 && _errors$detailsProvid2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16378
16442
|
style: errorStyle
|
|
16379
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$detailsProvid3 = errors.detailsProvidedBy) === null || _errors$detailsProvid3 === void 0 ? void 0 : _errors$detailsProvid3.message) : null), !(plumberDetail !== null && plumberDetail !== void 0 && (_plumberDetail$detail = plumberDetail.detailsProvidedBy) !== null && _plumberDetail$detail !== void 0 && _plumberDetail$detail.code) || (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail2 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail2 === void 0 ? void 0 : _plumberDetail$detail2.code) == "ULB" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16443
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$detailsProvid3 = errors.detailsProvidedBy) === null || _errors$detailsProvid3 === void 0 ? void 0 : _errors$detailsProvid3.message) : null), !(plumberDetail !== null && plumberDetail !== void 0 && (_plumberDetail$detail = plumberDetail.detailsProvidedBy) !== null && _plumberDetail$detail !== void 0 && _plumberDetail$detail.code) || (plumberDetail === null || plumberDetail === void 0 ? void 0 : (_plumberDetail$detail2 = plumberDetail.detailsProvidedBy) === null || _plumberDetail$detail2 === void 0 ? void 0 : _plumberDetail$detail2.code) == "ULB" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_PLIMBER_LICENSE_NO_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16444
|
+
style: {
|
|
16445
|
+
color: "red"
|
|
16446
|
+
}
|
|
16447
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16380
16448
|
className: "field"
|
|
16381
16449
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16382
16450
|
control: control,
|
|
@@ -16408,7 +16476,11 @@ const PlumberDetails = _props => {
|
|
|
16408
16476
|
}
|
|
16409
16477
|
})), localFormState.touched.plumberLicenseNo && errors !== null && errors !== void 0 && (_errors$plumberLicens2 = errors.plumberLicenseNo) !== null && _errors$plumberLicens2 !== void 0 && _errors$plumberLicens2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16410
16478
|
style: errorStyle
|
|
16411
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$plumberLicens3 = errors.plumberLicenseNo) === null || _errors$plumberLicens3 === void 0 ? void 0 : _errors$plumberLicens3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16479
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$plumberLicens3 = errors.plumberLicenseNo) === null || _errors$plumberLicens3 === void 0 ? void 0 : _errors$plumberLicens3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_ADDN_DETAILS_PLUMBER_NAME_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16480
|
+
style: {
|
|
16481
|
+
color: "red"
|
|
16482
|
+
}
|
|
16483
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16412
16484
|
className: "field"
|
|
16413
16485
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16414
16486
|
control: control,
|
|
@@ -16440,7 +16512,11 @@ const PlumberDetails = _props => {
|
|
|
16440
16512
|
}
|
|
16441
16513
|
})), localFormState.touched.plumberName && errors !== null && errors !== void 0 && (_errors$plumberName2 = errors.plumberName) !== null && _errors$plumberName2 !== void 0 && _errors$plumberName2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16442
16514
|
style: errorStyle
|
|
16443
|
-
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16515
|
+
}, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_PLUMBER_MOBILE_NO_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16516
|
+
style: {
|
|
16517
|
+
color: "red"
|
|
16518
|
+
}
|
|
16519
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16444
16520
|
className: "field"
|
|
16445
16521
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16446
16522
|
control: control,
|
|
@@ -16670,7 +16746,11 @@ const ConnectionDetails$3 = _props => {
|
|
|
16670
16746
|
fontSize: "12px",
|
|
16671
16747
|
marginTop: "-21px"
|
|
16672
16748
|
};
|
|
16673
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" && (formData === null || formData === void 0 ? void 0 : (_formData$connectionD3 = formData.connectionDetails) === null || _formData$connectionD3 === void 0 ? void 0 : (_formData$connectionD4 = _formData$connectionD3[0]) === null || _formData$connectionD4 === void 0 ? void 0 : (_formData$connectionD5 = _formData$connectionD4.connectionType) === null || _formData$connectionD5 === void 0 ? void 0 : (_formData$connectionD6 = _formData$connectionD5.code) === null || _formData$connectionD6 === void 0 ? void 0 : _formData$connectionD6.toUpperCase()) === "METERED" && (formData2 === null || formData2 === void 0 ? void 0 : (_formData2$connection = formData2.connectionDetails) === null || _formData2$connection === void 0 ? void 0 : (_formData2$connection2 = _formData2$connection[0]) === null || _formData2$connection2 === void 0 ? void 0 : (_formData2$connection3 = _formData2$connection2.formDetails) === null || _formData2$connection3 === void 0 ? void 0 : (_formData2$connection4 = _formData2$connection3.applicationData) === null || _formData2$connection4 === void 0 ? void 0 : _formData2$connection4.applicationType) !== "WATER_RECONNECTION" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16749
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" && (formData === null || formData === void 0 ? void 0 : (_formData$connectionD3 = formData.connectionDetails) === null || _formData$connectionD3 === void 0 ? void 0 : (_formData$connectionD4 = _formData$connectionD3[0]) === null || _formData$connectionD4 === void 0 ? void 0 : (_formData$connectionD5 = _formData$connectionD4.connectionType) === null || _formData$connectionD5 === void 0 ? void 0 : (_formData$connectionD6 = _formData$connectionD5.code) === null || _formData$connectionD6 === void 0 ? void 0 : _formData$connectionD6.toUpperCase()) === "METERED" && (formData2 === null || formData2 === void 0 ? void 0 : (_formData2$connection = formData2.connectionDetails) === null || _formData2$connection === void 0 ? void 0 : (_formData2$connection2 = _formData2$connection[0]) === null || _formData2$connection2 === void 0 ? void 0 : (_formData2$connection3 = _formData2$connection2.formDetails) === null || _formData2$connection3 === void 0 ? void 0 : (_formData2$connection4 = _formData2$connection3.applicationData) === null || _formData2$connection4 === void 0 ? void 0 : _formData2$connection4.applicationType) !== "WATER_RECONNECTION" ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_METER_ID"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16750
|
+
style: {
|
|
16751
|
+
color: "red"
|
|
16752
|
+
}
|
|
16753
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16674
16754
|
className: "field"
|
|
16675
16755
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16676
16756
|
control: control,
|
|
@@ -16704,13 +16784,18 @@ const ConnectionDetails$3 = _props => {
|
|
|
16704
16784
|
}
|
|
16705
16785
|
})), localFormState.touched.meterId && errors !== null && errors !== void 0 && (_errors$meterId2 = errors.meterId) !== null && _errors$meterId2 !== void 0 && _errors$meterId2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16706
16786
|
style: errorStyle
|
|
16707
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$meterId3 = errors.meterId) === null || _errors$meterId3 === void 0 ? void 0 : _errors$meterId3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16787
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$meterId3 = errors.meterId) === null || _errors$meterId3 === void 0 ? void 0 : _errors$meterId3.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_ADDN_DETAIL_METER_INSTALL_DATE"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16788
|
+
style: {
|
|
16789
|
+
color: "red"
|
|
16790
|
+
}
|
|
16791
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16708
16792
|
className: "field"
|
|
16709
16793
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16710
16794
|
name: "meterInstallationDate",
|
|
16711
16795
|
rules: {
|
|
16712
16796
|
required: t("REQUIRED_FIELD")
|
|
16713
16797
|
},
|
|
16798
|
+
isMandatory: true,
|
|
16714
16799
|
defaultValue: activationDetail === null || activationDetail === void 0 ? void 0 : activationDetail.meterInstallationDate,
|
|
16715
16800
|
control: control,
|
|
16716
16801
|
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
@@ -16720,7 +16805,11 @@ const ConnectionDetails$3 = _props => {
|
|
|
16720
16805
|
})
|
|
16721
16806
|
})), localFormState.touched.meterInstallationDate && errors !== null && errors !== void 0 && (_errors$meterInstalla = errors.meterInstallationDate) !== null && _errors$meterInstalla !== void 0 && _errors$meterInstalla.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16722
16807
|
style: errorStyle
|
|
16723
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$meterInstalla2 = errors.meterInstallationDate) === null || _errors$meterInstalla2 === void 0 ? void 0 : _errors$meterInstalla2.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16808
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$meterInstalla2 = errors.meterInstallationDate) === null || _errors$meterInstalla2 === void 0 ? void 0 : _errors$meterInstalla2.message) : null), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_INITIAL_METER_READING_LABEL"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16809
|
+
style: {
|
|
16810
|
+
color: "red"
|
|
16811
|
+
}
|
|
16812
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16724
16813
|
className: "field"
|
|
16725
16814
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16726
16815
|
type: "number",
|
|
@@ -16754,13 +16843,18 @@ const ConnectionDetails$3 = _props => {
|
|
|
16754
16843
|
}
|
|
16755
16844
|
})), localFormState.touched.meterInitialReading && errors !== null && errors !== void 0 && (_errors$meterInitialR2 = errors.meterInitialReading) !== null && _errors$meterInitialR2 !== void 0 && _errors$meterInitialR2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16756
16845
|
style: errorStyle
|
|
16757
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$meterInitialR3 = errors.meterInitialReading) === null || _errors$meterInitialR3 === void 0 ? void 0 : _errors$meterInitialR3.message) : null)) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16846
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$meterInitialR3 = errors.meterInitialReading) === null || _errors$meterInitialR3 === void 0 ? void 0 : _errors$meterInitialR3.message) : null)) : null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16847
|
+
style: {
|
|
16848
|
+
color: "red"
|
|
16849
|
+
}
|
|
16850
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16758
16851
|
className: "field"
|
|
16759
16852
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16760
16853
|
name: "connectionExecutionDate",
|
|
16761
16854
|
rules: {
|
|
16762
16855
|
required: t("REQUIRED_FIELD")
|
|
16763
16856
|
},
|
|
16857
|
+
isMandatory: true,
|
|
16764
16858
|
defaultValue: activationDetail === null || activationDetail === void 0 ? void 0 : activationDetail.connectionExecutionDate,
|
|
16765
16859
|
control: control,
|
|
16766
16860
|
render: props => {
|
|
@@ -16775,7 +16869,11 @@ const ConnectionDetails$3 = _props => {
|
|
|
16775
16869
|
}
|
|
16776
16870
|
})), localFormState.touched.connectionExecutionDate && errors !== null && errors !== void 0 && (_errors$connectionExe2 = errors.connectionExecutionDate) !== null && _errors$connectionExe2 !== void 0 && _errors$connectionExe2.message ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
|
|
16777
16871
|
style: errorStyle
|
|
16778
|
-
}, errors === null || errors === void 0 ? void 0 : (_errors$connectionExe3 = errors.connectionExecutionDate) === null || _errors$connectionExe3 === void 0 ? void 0 : _errors$connectionExe3.message) : null), window.location.href.includes("modify") || window.location.href.includes("mutation") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null,
|
|
16872
|
+
}, errors === null || errors === void 0 ? void 0 : (_errors$connectionExe3 = errors.connectionExecutionDate) === null || _errors$connectionExe3 === void 0 ? void 0 : _errors$connectionExe3.message) : null), window.location.href.includes("modify") || window.location.href.includes("mutation") ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_MODIFICATIONS_EFFECTIVE_FROM"), " ", /*#__PURE__*/React__default.createElement("span", {
|
|
16873
|
+
style: {
|
|
16874
|
+
color: "red"
|
|
16875
|
+
}
|
|
16876
|
+
}, "*")), /*#__PURE__*/React__default.createElement("div", {
|
|
16779
16877
|
className: "field"
|
|
16780
16878
|
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
16781
16879
|
name: "dateEffectiveFrom",
|
|
@@ -19806,7 +19904,6 @@ const ConnectionDetails$4 = _props => {
|
|
|
19806
19904
|
};
|
|
19807
19905
|
|
|
19808
19906
|
const WSDisconnectionDocsRequired = _ref => {
|
|
19809
|
-
var _wsDocs$Disconnection2;
|
|
19810
19907
|
let {
|
|
19811
19908
|
userType
|
|
19812
19909
|
} = _ref;
|
|
@@ -19817,12 +19914,7 @@ const WSDisconnectionDocsRequired = _ref => {
|
|
|
19817
19914
|
const location = reactRouterDom.useLocation();
|
|
19818
19915
|
const match = reactRouterDom.useRouteMatch();
|
|
19819
19916
|
const tenantId = Digit.ULBService.getStateId();
|
|
19820
|
-
const {
|
|
19821
|
-
isLoading: wsDocsLoading,
|
|
19822
|
-
data: wsDocs
|
|
19823
|
-
} = Digit.Hooks.ws.WSSearchMdmsTypes.useWSServicesMasters(tenantId, "DisconnectionDocuments");
|
|
19824
19917
|
if (userType === "citizen") {
|
|
19825
|
-
var _wsDocs$Disconnection;
|
|
19826
19918
|
return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, null, t(`WS_COMMON_APPLICATION_DISCONNECTION`)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
19827
19919
|
style: {
|
|
19828
19920
|
margin: "0px"
|
|
@@ -19849,37 +19941,7 @@ const WSDisconnectionDocsRequired = _ref => {
|
|
|
19849
19941
|
color: "#0B0C0C",
|
|
19850
19942
|
marginTop: "12px"
|
|
19851
19943
|
}
|
|
19852
|
-
}, t(`WS_NEW_CONNECTION_TEST_3`)),
|
|
19853
|
-
var _doc$dropdownData;
|
|
19854
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
19855
|
-
style: {
|
|
19856
|
-
fontWeight: 700,
|
|
19857
|
-
marginBottom: "8px"
|
|
19858
|
-
},
|
|
19859
|
-
key: index
|
|
19860
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
19861
|
-
style: {
|
|
19862
|
-
display: "flex"
|
|
19863
|
-
}
|
|
19864
|
-
}, /*#__PURE__*/React__default.createElement("div", null, `${index + 1}.`, "\xA0"), /*#__PURE__*/React__default.createElement("div", null, ` ${t(doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_'))}`))), /*#__PURE__*/React__default.createElement("div", {
|
|
19865
|
-
style: {
|
|
19866
|
-
marginBottom: "16px",
|
|
19867
|
-
marginLeft: "18px",
|
|
19868
|
-
color: 'gray'
|
|
19869
|
-
}
|
|
19870
|
-
}, doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.map((value, index) => {
|
|
19871
|
-
var _doc$dropdownData2;
|
|
19872
|
-
return (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData2 = doc.dropdownData) === null || _doc$dropdownData2 === void 0 ? void 0 : _doc$dropdownData2.length) !== index + 1 ? /*#__PURE__*/React__default.createElement("span", {
|
|
19873
|
-
style: {
|
|
19874
|
-
color: 'gray'
|
|
19875
|
-
}
|
|
19876
|
-
}, `${t(value === null || value === void 0 ? void 0 : value.i18nKey)}, `) : /*#__PURE__*/React__default.createElement("span", {
|
|
19877
|
-
style: {
|
|
19878
|
-
color: 'gray'
|
|
19879
|
-
}
|
|
19880
|
-
}, `${t(value === null || value === void 0 ? void 0 : value.i18nKey)}`);
|
|
19881
|
-
})));
|
|
19882
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
19944
|
+
}, t(`WS_NEW_CONNECTION_TEST_3`)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
19883
19945
|
label: t(`CS_COMMON_NEXT`),
|
|
19884
19946
|
onSubmit: () => {
|
|
19885
19947
|
history.push(`${match.path.replace("docsrequired", "application-form")}${location.search}`);
|
|
@@ -19887,43 +19949,7 @@ const WSDisconnectionDocsRequired = _ref => {
|
|
|
19887
19949
|
}
|
|
19888
19950
|
})));
|
|
19889
19951
|
}
|
|
19890
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null,
|
|
19891
|
-
id: "documents-div"
|
|
19892
|
-
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection2 = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection2 === void 0 ? void 0 : _wsDocs$Disconnection2.map((doc, index) => {
|
|
19893
|
-
var _doc$dropdownData3;
|
|
19894
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
19895
|
-
key: index,
|
|
19896
|
-
style: {
|
|
19897
|
-
marginTop: "16px"
|
|
19898
|
-
}
|
|
19899
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
19900
|
-
style: {
|
|
19901
|
-
marginBottom: "16px",
|
|
19902
|
-
lineHeight: "28px",
|
|
19903
|
-
fontSize: "24px"
|
|
19904
|
-
}
|
|
19905
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_'))), doc.dropdownData && doc.dropdownData.length > 1 && /*#__PURE__*/React__default.createElement("p", {
|
|
19906
|
-
style: {
|
|
19907
|
-
lineHeight: "24px",
|
|
19908
|
-
fontSize: "16px"
|
|
19909
|
-
}
|
|
19910
|
-
}, t(`${doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_')}_DESCRIPTION`)), /*#__PURE__*/React__default.createElement("div", {
|
|
19911
|
-
style: {
|
|
19912
|
-
margin: "16px 0",
|
|
19913
|
-
lineHeight: "18px",
|
|
19914
|
-
fontSize: "16px"
|
|
19915
|
-
}
|
|
19916
|
-
}, doc === null || doc === void 0 ? void 0 : (_doc$dropdownData3 = doc.dropdownData) === null || _doc$dropdownData3 === void 0 ? void 0 : _doc$dropdownData3.map((value, idx) => /*#__PURE__*/React__default.createElement("p", {
|
|
19917
|
-
style: {
|
|
19918
|
-
fontWeight: "bold",
|
|
19919
|
-
lineHeight: "32px"
|
|
19920
|
-
}
|
|
19921
|
-
}, `${idx + 1}. ${t(value === null || value === void 0 ? void 0 : value.i18nKey)}`))), /*#__PURE__*/React__default.createElement("p", {
|
|
19922
|
-
style: {
|
|
19923
|
-
fontSize: "16px"
|
|
19924
|
-
}
|
|
19925
|
-
}, t(`${doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_')}_BELOW_DESCRIPTION`)));
|
|
19926
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
19952
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, {
|
|
19927
19953
|
style: {
|
|
19928
19954
|
display: "flex",
|
|
19929
19955
|
justifyContent: "flex-end",
|
|
@@ -19937,8 +19963,7 @@ const WSDisconnectionDocsRequired = _ref => {
|
|
|
19937
19963
|
},
|
|
19938
19964
|
style: {
|
|
19939
19965
|
margin: "10px 10px 0px 0px"
|
|
19940
|
-
}
|
|
19941
|
-
disabled: wsDocsLoading ? true : false
|
|
19966
|
+
}
|
|
19942
19967
|
}))));
|
|
19943
19968
|
};
|
|
19944
19969
|
|
|
@@ -20586,6 +20611,28 @@ function addDays(dirtyDate, dirtyAmount) {
|
|
|
20586
20611
|
return date;
|
|
20587
20612
|
}
|
|
20588
20613
|
|
|
20614
|
+
function addMonths(dirtyDate, dirtyAmount) {
|
|
20615
|
+
requiredArgs(2, arguments);
|
|
20616
|
+
var date = toDate(dirtyDate);
|
|
20617
|
+
var amount = toInteger(dirtyAmount);
|
|
20618
|
+
if (isNaN(amount)) {
|
|
20619
|
+
return new Date(NaN);
|
|
20620
|
+
}
|
|
20621
|
+
if (!amount) {
|
|
20622
|
+
return date;
|
|
20623
|
+
}
|
|
20624
|
+
var dayOfMonth = date.getDate();
|
|
20625
|
+
var endOfDesiredMonth = new Date(date.getTime());
|
|
20626
|
+
endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
|
|
20627
|
+
var daysInMonth = endOfDesiredMonth.getDate();
|
|
20628
|
+
if (dayOfMonth >= daysInMonth) {
|
|
20629
|
+
return endOfDesiredMonth;
|
|
20630
|
+
} else {
|
|
20631
|
+
date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
|
|
20632
|
+
return date;
|
|
20633
|
+
}
|
|
20634
|
+
}
|
|
20635
|
+
|
|
20589
20636
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
20590
20637
|
requiredArgs(2, arguments);
|
|
20591
20638
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -22034,8 +22081,33 @@ function cleanEscapedString(input) {
|
|
|
22034
22081
|
return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
|
|
22035
22082
|
}
|
|
22036
22083
|
|
|
22084
|
+
const DISCONNECTION_REASONS = {
|
|
22085
|
+
Permanent: [{
|
|
22086
|
+
code: "PROPERTY_DEMOLITION_RECONSTRUCTION",
|
|
22087
|
+
i18nKey: "Property Demolition/Reconstruction"
|
|
22088
|
+
}, {
|
|
22089
|
+
code: "PERMANENT_RELOCATION_FROM_DELHI",
|
|
22090
|
+
i18nKey: "Permanent Relocation from Delhi"
|
|
22091
|
+
}, {
|
|
22092
|
+
code: "SHIFTING_TO_ALTERNATE_BORING_SOURCE",
|
|
22093
|
+
i18nKey: "Shifting to alternate boring source"
|
|
22094
|
+
}, {
|
|
22095
|
+
code: "PROPERTY_CLOSED_VACANT_LONG_TERM",
|
|
22096
|
+
i18nKey: "Property Closed/Vacant long term"
|
|
22097
|
+
}],
|
|
22098
|
+
Temporary: [{
|
|
22099
|
+
code: "TEMPORARY_RELOCATION_TRAVELLING_ABROAD",
|
|
22100
|
+
i18nKey: "Temporary relocation/Travelling abroad"
|
|
22101
|
+
}, {
|
|
22102
|
+
code: "MINOR_PROPERTY_RENOVATION_BUILDING_MAINTENANCE",
|
|
22103
|
+
i18nKey: "Minor property renovation/building maintenance"
|
|
22104
|
+
}, {
|
|
22105
|
+
code: "TEMPORARY_SHIFT_TO_ALTERNATIVE_WATER_SOURCE",
|
|
22106
|
+
i18nKey: "Temporary shift to alternative water source"
|
|
22107
|
+
}]
|
|
22108
|
+
};
|
|
22037
22109
|
const WSDisconnectionForm = _ref => {
|
|
22038
|
-
var _location$state, _applicationData$appl, _applicationData$appl2, _applicationData$appl3, _applicationData$appl4, _applicationData$appl5, _applicationData$WSDi, _applicationData$appl6, _disconnectionData$
|
|
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$re6, _disconnectionData$re7, _disconnectionData$re8, _disconnectionData$re9, _disconnectionData$re0, _disconnectionData$ty25, _disconnectionData$ty26, _disconnectionData$ty27, _disconnectionData$ty28;
|
|
22039
22111
|
let {
|
|
22040
22112
|
t,
|
|
22041
22113
|
config,
|
|
@@ -22059,7 +22131,8 @@ const WSDisconnectionForm = _ref => {
|
|
|
22059
22131
|
date: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
|
|
22060
22132
|
endDate: applicationData.WSDisconnectionForm ? (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$WSDi = applicationData.WSDisconnectionForm) === null || _applicationData$WSDi === void 0 ? void 0 : _applicationData$WSDi.endDate) || "" : "",
|
|
22061
22133
|
reason: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
|
|
22062
|
-
documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
|
|
22134
|
+
documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : [],
|
|
22135
|
+
requestedPeriodMonths: ((_applicationData$WSDi2 = applicationData.WSDisconnectionForm) === null || _applicationData$WSDi2 === void 0 ? void 0 : _applicationData$WSDi2.requestedPeriodMonths) || 12
|
|
22063
22136
|
});
|
|
22064
22137
|
const [documents, setDocuments] = React.useState(applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
|
|
22065
22138
|
const [error, setError] = React.useState(null);
|
|
@@ -22072,10 +22145,6 @@ const WSDisconnectionForm = _ref => {
|
|
|
22072
22145
|
isMdmsLoading,
|
|
22073
22146
|
data: mdmsData
|
|
22074
22147
|
} = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["disconnectionType"]);
|
|
22075
|
-
const {
|
|
22076
|
-
loading,
|
|
22077
|
-
data: disconnectionReason
|
|
22078
|
-
} = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["DisconnectionReason"]);
|
|
22079
22148
|
const {
|
|
22080
22149
|
isLoading: wsDocsLoading,
|
|
22081
22150
|
data: wsDocs
|
|
@@ -22135,14 +22204,11 @@ const WSDisconnectionForm = _ref => {
|
|
|
22135
22204
|
setDisconnectionTypeList(disconnectionTypes);
|
|
22136
22205
|
}, [mdmsData]);
|
|
22137
22206
|
React.useEffect(() => {
|
|
22138
|
-
var
|
|
22139
|
-
const
|
|
22140
|
-
|
|
22141
|
-
|
|
22142
|
-
|
|
22143
|
-
});
|
|
22144
|
-
setDisconnectionReasonList(disconnectionReasons);
|
|
22145
|
-
}, [disconnectionReason]);
|
|
22207
|
+
var _disconnectionData$ty, _disconnectionData$ty2;
|
|
22208
|
+
const selectedType = String(((_disconnectionData$ty = disconnectionData.type) === null || _disconnectionData$ty === void 0 ? void 0 : (_disconnectionData$ty2 = _disconnectionData$ty.value) === null || _disconnectionData$ty2 === void 0 ? void 0 : _disconnectionData$ty2.code) || "").toLowerCase();
|
|
22209
|
+
const disconnectionType = selectedType === "temporary" ? "Temporary" : selectedType === "permanent" ? "Permanent" : "";
|
|
22210
|
+
setDisconnectionReasonList(DISCONNECTION_REASONS[disconnectionType] || []);
|
|
22211
|
+
}, [disconnectionData.type]);
|
|
22146
22212
|
React.useEffect(() => {
|
|
22147
22213
|
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
22148
22214
|
...applicationData,
|
|
@@ -22154,10 +22220,19 @@ const WSDisconnectionForm = _ref => {
|
|
|
22154
22220
|
});
|
|
22155
22221
|
const onSkip = () => onSelect();
|
|
22156
22222
|
const filedChange = val => {
|
|
22223
|
+
var _val$value, _disconnectionData$ty3, _disconnectionData$ty4;
|
|
22157
22224
|
const oldData = {
|
|
22158
22225
|
...disconnectionData
|
|
22159
22226
|
};
|
|
22160
22227
|
oldData[val.code] = val;
|
|
22228
|
+
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
|
+
var _val$value2;
|
|
22230
|
+
oldData.reason = "";
|
|
22231
|
+
if (String(((_val$value2 = val.value) === null || _val$value2 === void 0 ? void 0 : _val$value2.code) || "").toLowerCase() === "temporary") {
|
|
22232
|
+
oldData.date = oldData.date || format(addDays(new Date(), (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0), "yyyy-MM-dd");
|
|
22233
|
+
oldData.endDate = format(addMonths(new Date(oldData.date), oldData.requestedPeriodMonths || 12), "yyyy-MM-dd");
|
|
22234
|
+
}
|
|
22235
|
+
}
|
|
22161
22236
|
setDisconnectionData(oldData);
|
|
22162
22237
|
};
|
|
22163
22238
|
const onSubmit = function (data) {
|
|
@@ -22189,7 +22264,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22189
22264
|
}, 3000);
|
|
22190
22265
|
} else {
|
|
22191
22266
|
const _temp5 = function (_disconnectionData$re) {
|
|
22192
|
-
if (
|
|
22267
|
+
if ((disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re = disconnectionData.reason) === null || _disconnectionData$re === void 0 ? void 0 : _disconnectionData$re.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) === "") {
|
|
22193
22268
|
setError({
|
|
22194
22269
|
warning: true,
|
|
22195
22270
|
message: "PLEASE_FILL_MANDATORY_DETAILS"
|
|
@@ -22330,7 +22405,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22330
22405
|
};
|
|
22331
22406
|
if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
22332
22407
|
if (userType === "citizen") {
|
|
22333
|
-
var _disconnectionData$
|
|
22408
|
+
var _disconnectionData$ty5, _disconnectionData$ty6, _disconnectionData$ty7, _disconnectionData$ty8, _disconnectionData$ty9, _disconnectionData$ty10, _disconnectionData$ty11, _disconnectionData$re2, _disconnectionData$re3, _disconnectionData$re4, _disconnectionData$re5;
|
|
22334
22409
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
22335
22410
|
textStyle: {
|
|
22336
22411
|
color: "#0B0C0C"
|
|
@@ -22360,8 +22435,8 @@ const WSDisconnectionForm = _ref => {
|
|
|
22360
22435
|
t: t,
|
|
22361
22436
|
options: disconnectionTypeList,
|
|
22362
22437
|
optionsKey: "i18nKey",
|
|
22363
|
-
value: (_disconnectionData$
|
|
22364
|
-
selectedOption: (_disconnectionData$
|
|
22438
|
+
value: (_disconnectionData$ty5 = disconnectionData.type) === null || _disconnectionData$ty5 === void 0 ? void 0 : (_disconnectionData$ty6 = _disconnectionData$ty5.value) === null || _disconnectionData$ty6 === void 0 ? void 0 : _disconnectionData$ty6.code,
|
|
22439
|
+
selectedOption: (_disconnectionData$ty7 = disconnectionData.type) === null || _disconnectionData$ty7 === void 0 ? void 0 : _disconnectionData$ty7.value,
|
|
22365
22440
|
isMandatory: false,
|
|
22366
22441
|
onSelect: val => filedChange({
|
|
22367
22442
|
code: "type",
|
|
@@ -22371,7 +22446,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22371
22446
|
inputStyle: isMobile ? {
|
|
22372
22447
|
marginLeft: "unset"
|
|
22373
22448
|
} : {}
|
|
22374
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
22449
|
+
}))), ((_disconnectionData$ty8 = disconnectionData.type) === null || _disconnectionData$ty8 === void 0 ? void 0 : (_disconnectionData$ty9 = _disconnectionData$ty8.value) === null || _disconnectionData$ty9 === void 0 ? void 0 : _disconnectionData$ty9.code) !== "Temporary" && /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
22375
22450
|
className: "card-label-smaller"
|
|
22376
22451
|
}, t("WS_DISCONNECTION_PROPOSED_DATE") + "*", /*#__PURE__*/React__default.createElement("div", {
|
|
22377
22452
|
className: `tooltip`,
|
|
@@ -22390,36 +22465,59 @@ const WSDisconnectionForm = _ref => {
|
|
|
22390
22465
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
22391
22466
|
date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
|
|
22392
22467
|
onChange: date => {
|
|
22468
|
+
var _disconnectionData$ty0, _disconnectionData$ty1;
|
|
22393
22469
|
setDisconnectionData({
|
|
22394
22470
|
...disconnectionData,
|
|
22395
|
-
date: date
|
|
22471
|
+
date: date,
|
|
22472
|
+
endDate: ((_disconnectionData$ty0 = disconnectionData.type) === null || _disconnectionData$ty0 === void 0 ? void 0 : (_disconnectionData$ty1 = _disconnectionData$ty0.value) === null || _disconnectionData$ty1 === void 0 ? void 0 : _disconnectionData$ty1.code) === "Temporary" && date ? format(addMonths(new Date(date), disconnectionData.requestedPeriodMonths || 12), "yyyy-MM-dd") : disconnectionData.endDate
|
|
22396
22473
|
});
|
|
22397
22474
|
}
|
|
22398
|
-
}))), ((_disconnectionData$
|
|
22399
|
-
className: "card-label-smaller"
|
|
22400
|
-
}, t("WS_DISCONNECTION_PROPOSED_END_DATE") + "*", /*#__PURE__*/React__default.createElement("div", {
|
|
22401
|
-
className: `tooltip`,
|
|
22475
|
+
}))), ((_disconnectionData$ty10 = disconnectionData.type) === null || _disconnectionData$ty10 === void 0 ? void 0 : (_disconnectionData$ty11 = _disconnectionData$ty10.value) === null || _disconnectionData$ty11 === void 0 ? void 0 : _disconnectionData$ty11.code) === "Temporary" ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement("div", {
|
|
22402
22476
|
style: {
|
|
22403
|
-
|
|
22477
|
+
width: "100%"
|
|
22404
22478
|
}
|
|
22405
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
22406
|
-
className: "
|
|
22479
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
22480
|
+
className: "card-label-smaller"
|
|
22481
|
+
}, "REQUESTED PERIOD (IN MONTHS)"), /*#__PURE__*/React__default.createElement("div", {
|
|
22407
22482
|
style: {
|
|
22408
|
-
|
|
22409
|
-
|
|
22410
|
-
|
|
22483
|
+
display: "flex",
|
|
22484
|
+
alignItems: "center",
|
|
22485
|
+
gap: "10px",
|
|
22486
|
+
marginTop: "8px"
|
|
22411
22487
|
}
|
|
22412
|
-
},
|
|
22413
|
-
|
|
22414
|
-
|
|
22415
|
-
|
|
22416
|
-
|
|
22488
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
22489
|
+
type: "number",
|
|
22490
|
+
min: "1",
|
|
22491
|
+
max: "24",
|
|
22492
|
+
value: disconnectionData.requestedPeriodMonths,
|
|
22493
|
+
onChange: event => {
|
|
22494
|
+
const months = Math.min(24, Math.max(1, Number(event.target.value)));
|
|
22417
22495
|
setDisconnectionData({
|
|
22418
22496
|
...disconnectionData,
|
|
22419
|
-
|
|
22497
|
+
requestedPeriodMonths: months,
|
|
22498
|
+
endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
|
|
22420
22499
|
});
|
|
22421
22500
|
}
|
|
22422
|
-
})
|
|
22501
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
22502
|
+
style: {
|
|
22503
|
+
fontWeight: 600,
|
|
22504
|
+
color: "#4f6380"
|
|
22505
|
+
}
|
|
22506
|
+
}, "Months (Max 24 Months / 2 Years)")), /*#__PURE__*/React__default.createElement("div", {
|
|
22507
|
+
style: {
|
|
22508
|
+
marginTop: "12px",
|
|
22509
|
+
padding: "16px",
|
|
22510
|
+
border: "1px solid #f5c542",
|
|
22511
|
+
borderRadius: "16px",
|
|
22512
|
+
background: "#fffaf0",
|
|
22513
|
+
color: "#572b00",
|
|
22514
|
+
lineHeight: 1.5
|
|
22515
|
+
}
|
|
22516
|
+
}, /*#__PURE__*/React__default.createElement("strong", null, "\u26A0\uFE0F DJB Regulatory Warning Alert:"), /*#__PURE__*/React__default.createElement("div", {
|
|
22517
|
+
style: {
|
|
22518
|
+
marginTop: "4px"
|
|
22519
|
+
}
|
|
22520
|
+
}, "In case water connections remain disconnected beyond ", /*#__PURE__*/React__default.createElement("strong", null, "2 years (24 months)"), ", the service line will be ", /*#__PURE__*/React__default.createElement("strong", null, "permanently disconnected"), " from the main distribution lines, and re-opening will require standard new connection sanction fees.")))) : "", /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
22423
22521
|
className: "card-label-smaller"
|
|
22424
22522
|
}, t("WS_DISCONNECTION_REASON") + "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
22425
22523
|
className: "field"
|
|
@@ -22446,7 +22544,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22446
22544
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
22447
22545
|
label: t("CS_COMMON_NEXT"),
|
|
22448
22546
|
onSubmit: () => {
|
|
22449
|
-
var _disconnectionData$
|
|
22547
|
+
var _disconnectionData$ty12, _disconnectionData$ty13;
|
|
22450
22548
|
const appDate = new Date();
|
|
22451
22549
|
const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), "yyyy-MM-dd").toString();
|
|
22452
22550
|
if (convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) < convertDateToEpoch(proposedDate)) {
|
|
@@ -22457,7 +22555,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22457
22555
|
setTimeout(() => {
|
|
22458
22556
|
setError(false);
|
|
22459
22557
|
}, 3000);
|
|
22460
|
-
} else if ((disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$
|
|
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))) {
|
|
22461
22559
|
console.log("Temporary connection");
|
|
22462
22560
|
setError({
|
|
22463
22561
|
key: "error",
|
|
@@ -22467,7 +22565,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22467
22565
|
setError(false);
|
|
22468
22566
|
}, 3000);
|
|
22469
22567
|
} else {
|
|
22470
|
-
history.push(match.path.replace("application-form", "
|
|
22568
|
+
history.push(match.path.replace("application-form", "check"));
|
|
22471
22569
|
}
|
|
22472
22570
|
},
|
|
22473
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
|
|
@@ -22585,8 +22683,8 @@ const WSDisconnectionForm = _ref => {
|
|
|
22585
22683
|
t: t,
|
|
22586
22684
|
options: disconnectionTypeList,
|
|
22587
22685
|
optionsKey: "i18nKey",
|
|
22588
|
-
value: (_disconnectionData$
|
|
22589
|
-
selectedOption: (_disconnectionData$
|
|
22686
|
+
value: (_disconnectionData$ty14 = disconnectionData.type) === null || _disconnectionData$ty14 === void 0 ? void 0 : (_disconnectionData$ty15 = _disconnectionData$ty14.value) === null || _disconnectionData$ty15 === void 0 ? void 0 : _disconnectionData$ty15.code,
|
|
22687
|
+
selectedOption: (_disconnectionData$ty16 = disconnectionData.type) === null || _disconnectionData$ty16 === void 0 ? void 0 : _disconnectionData$ty16.value,
|
|
22590
22688
|
isMandatory: false,
|
|
22591
22689
|
onSelect: val => filedChange({
|
|
22592
22690
|
code: "type",
|
|
@@ -22612,11 +22710,11 @@ const WSDisconnectionForm = _ref => {
|
|
|
22612
22710
|
style: {
|
|
22613
22711
|
margin: 0
|
|
22614
22712
|
}
|
|
22615
|
-
}, t("WS_DISCONNECTION_PROPOSED_DATE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
22713
|
+
}, ((_disconnectionData$ty17 = disconnectionData.type) === null || _disconnectionData$ty17 === void 0 ? void 0 : (_disconnectionData$ty18 = _disconnectionData$ty17.value) === null || _disconnectionData$ty18 === void 0 ? void 0 : _disconnectionData$ty18.code) === "Temporary" ? "REQUESTED PERIOD (IN MONTHS)" : t("WS_DISCONNECTION_PROPOSED_DATE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
22616
22714
|
style: {
|
|
22617
22715
|
paddingLeft: isMobileForm ? "0" : "42px"
|
|
22618
22716
|
}
|
|
22619
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22717
|
+
}, ((_disconnectionData$ty19 = disconnectionData.type) === null || _disconnectionData$ty19 === void 0 ? void 0 : (_disconnectionData$ty20 = _disconnectionData$ty19.value) === null || _disconnectionData$ty20 === void 0 ? void 0 : _disconnectionData$ty20.code) !== "Temporary" && /*#__PURE__*/React__default.createElement("div", {
|
|
22620
22718
|
style: fieldStyle
|
|
22621
22719
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
22622
22720
|
style: labelStyle
|
|
@@ -22638,37 +22736,61 @@ const WSDisconnectionForm = _ref => {
|
|
|
22638
22736
|
style: inputWrapperStyle
|
|
22639
22737
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
22640
22738
|
date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
|
|
22641
|
-
onChange: date =>
|
|
22642
|
-
|
|
22643
|
-
|
|
22644
|
-
|
|
22645
|
-
|
|
22739
|
+
onChange: date => {
|
|
22740
|
+
var _disconnectionData$ty21, _disconnectionData$ty22;
|
|
22741
|
+
return setDisconnectionData({
|
|
22742
|
+
...disconnectionData,
|
|
22743
|
+
date: date,
|
|
22744
|
+
endDate: ((_disconnectionData$ty21 = disconnectionData.type) === null || _disconnectionData$ty21 === void 0 ? void 0 : (_disconnectionData$ty22 = _disconnectionData$ty21.value) === null || _disconnectionData$ty22 === void 0 ? void 0 : _disconnectionData$ty22.code) === "Temporary" && date ? format(addMonths(new Date(date), disconnectionData.requestedPeriodMonths || 12), "yyyy-MM-dd") : disconnectionData.endDate
|
|
22745
|
+
});
|
|
22746
|
+
}
|
|
22747
|
+
}))), ((_disconnectionData$ty23 = disconnectionData.type) === null || _disconnectionData$ty23 === void 0 ? void 0 : (_disconnectionData$ty24 = _disconnectionData$ty23.value) === null || _disconnectionData$ty24 === void 0 ? void 0 : _disconnectionData$ty24.code) === "Temporary" && /*#__PURE__*/React__default.createElement("div", {
|
|
22646
22748
|
style: fieldStyle
|
|
22749
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22750
|
+
style: {
|
|
22751
|
+
width: "100%"
|
|
22752
|
+
}
|
|
22647
22753
|
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
22648
22754
|
style: labelStyle
|
|
22649
|
-
},
|
|
22650
|
-
className: "tooltip",
|
|
22755
|
+
}, "REQUESTED PERIOD (IN MONTHS)"), /*#__PURE__*/React__default.createElement("div", {
|
|
22651
22756
|
style: {
|
|
22652
|
-
|
|
22653
|
-
|
|
22654
|
-
|
|
22757
|
+
display: "flex",
|
|
22758
|
+
alignItems: "center",
|
|
22759
|
+
gap: "10px"
|
|
22655
22760
|
}
|
|
22656
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.
|
|
22657
|
-
|
|
22761
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
22762
|
+
type: "number",
|
|
22763
|
+
min: "1",
|
|
22764
|
+
max: "24",
|
|
22765
|
+
value: disconnectionData.requestedPeriodMonths,
|
|
22766
|
+
onChange: event => {
|
|
22767
|
+
const months = Math.min(24, Math.max(1, Number(event.target.value)));
|
|
22768
|
+
setDisconnectionData({
|
|
22769
|
+
...disconnectionData,
|
|
22770
|
+
requestedPeriodMonths: months,
|
|
22771
|
+
endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
|
|
22772
|
+
});
|
|
22773
|
+
}
|
|
22774
|
+
}), /*#__PURE__*/React__default.createElement("span", {
|
|
22658
22775
|
style: {
|
|
22659
|
-
|
|
22660
|
-
|
|
22661
|
-
width: isMobileForm ? "200px" : "300px"
|
|
22776
|
+
fontWeight: 600,
|
|
22777
|
+
color: "#4f6380"
|
|
22662
22778
|
}
|
|
22663
|
-
},
|
|
22664
|
-
style:
|
|
22665
|
-
|
|
22666
|
-
|
|
22667
|
-
|
|
22668
|
-
|
|
22669
|
-
|
|
22670
|
-
|
|
22671
|
-
|
|
22779
|
+
}, "Months (Max 24 Months / 2 Years)")), /*#__PURE__*/React__default.createElement("div", {
|
|
22780
|
+
style: {
|
|
22781
|
+
marginTop: "12px",
|
|
22782
|
+
padding: "16px",
|
|
22783
|
+
border: "1px solid #f5c542",
|
|
22784
|
+
borderRadius: "16px",
|
|
22785
|
+
background: "#fffaf0",
|
|
22786
|
+
color: "#572b00",
|
|
22787
|
+
lineHeight: 1.5
|
|
22788
|
+
}
|
|
22789
|
+
}, /*#__PURE__*/React__default.createElement("strong", null, "\u26A0\uFE0F DJB Regulatory Warning Alert:"), /*#__PURE__*/React__default.createElement("div", {
|
|
22790
|
+
style: {
|
|
22791
|
+
marginTop: "4px"
|
|
22792
|
+
}
|
|
22793
|
+
}, "In case water connections remain disconnected beyond ", /*#__PURE__*/React__default.createElement("strong", null, "2 years (24 months)"), ", the service line will be ", /*#__PURE__*/React__default.createElement("strong", null, "permanently disconnected"), " from the main distribution lines, and re-opening will require standard new connection sanction fees.")))))), /*#__PURE__*/React__default.createElement("div", {
|
|
22672
22794
|
style: sectionStyle
|
|
22673
22795
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22674
22796
|
style: headerFlexStyle
|
|
@@ -22701,31 +22823,7 @@ const WSDisconnectionForm = _ref => {
|
|
|
22701
22823
|
value: e
|
|
22702
22824
|
}),
|
|
22703
22825
|
labelKey: "WS_DISCONNECTION_REASON"
|
|
22704
|
-
}))))), /*#__PURE__*/React__default.createElement(
|
|
22705
|
-
style: sectionStyle
|
|
22706
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22707
|
-
style: headerFlexStyle
|
|
22708
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22709
|
-
style: numberBadgeStyle
|
|
22710
|
-
}, "5"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
22711
|
-
style: {
|
|
22712
|
-
margin: 0
|
|
22713
|
-
}
|
|
22714
|
-
}, t("WS_DISCONNECTION_DOCUMENTS"), " *")), /*#__PURE__*/React__default.createElement("div", {
|
|
22715
|
-
style: {
|
|
22716
|
-
paddingLeft: isMobileForm ? "0" : "42px"
|
|
22717
|
-
}
|
|
22718
|
-
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => /*#__PURE__*/React__default.createElement(SelectDocument$1, {
|
|
22719
|
-
key: index,
|
|
22720
|
-
document: document,
|
|
22721
|
-
t: t,
|
|
22722
|
-
error: docError,
|
|
22723
|
-
setError: setDocError,
|
|
22724
|
-
setDocuments: setDocuments,
|
|
22725
|
-
documents: documents,
|
|
22726
|
-
setCheckRequiredFields: setCheckRequiredFields,
|
|
22727
|
-
isMobileForm: isMobileForm
|
|
22728
|
-
})))), docError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
22826
|
+
}))))), docError && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
22729
22827
|
error: (docError === null || docError === void 0 ? void 0 : docError.key) === "error",
|
|
22730
22828
|
label: t(docError === null || docError === void 0 ? void 0 : docError.message),
|
|
22731
22829
|
warning: docError === null || docError === void 0 ? void 0 : docError.warning,
|
|
@@ -22744,159 +22842,15 @@ const WSDisconnectionForm = _ref => {
|
|
|
22744
22842
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
22745
22843
|
label: t("ACTION_TEST_SUBMIT"),
|
|
22746
22844
|
onSubmit: () => onSubmit(disconnectionData),
|
|
22747
|
-
disabled:
|
|
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),
|
|
22748
22846
|
style: {
|
|
22749
22847
|
margin: "10px 10px 0px 0px"
|
|
22750
22848
|
}
|
|
22751
22849
|
}))));
|
|
22752
22850
|
};
|
|
22753
|
-
function SelectDocument$1(_ref2) {
|
|
22754
|
-
var _doc$dropdownData;
|
|
22755
|
-
let {
|
|
22756
|
-
t,
|
|
22757
|
-
key,
|
|
22758
|
-
document: doc,
|
|
22759
|
-
setDocuments,
|
|
22760
|
-
error,
|
|
22761
|
-
setError,
|
|
22762
|
-
documents,
|
|
22763
|
-
setCheckRequiredFields,
|
|
22764
|
-
isMobileForm
|
|
22765
|
-
} = _ref2;
|
|
22766
|
-
const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
|
|
22767
|
-
var _item$documentType;
|
|
22768
|
-
return item === null || item === void 0 ? void 0 : (_item$documentType = item.documentType) === null || _item$documentType === void 0 ? void 0 : _item$documentType.includes(doc === null || doc === void 0 ? void 0 : doc.code);
|
|
22769
|
-
})[0];
|
|
22770
|
-
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
22771
|
-
const [selectedDocument, setSelectedDocument] = React.useState(filteredDocument ? {
|
|
22772
|
-
...filteredDocument,
|
|
22773
|
-
active: true,
|
|
22774
|
-
code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
|
|
22775
|
-
i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType
|
|
22776
|
-
} : (doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.length) === 1 ? doc === null || doc === void 0 ? void 0 : doc.dropdownData[0] : {});
|
|
22777
|
-
const [file, setFile] = React.useState(null);
|
|
22778
|
-
const [uploadedFile, setUploadedFile] = React.useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
|
|
22779
|
-
const handleSelectDocument = value => setSelectedDocument(value);
|
|
22780
|
-
function selectfile(e) {
|
|
22781
|
-
setFile(e.target.files[0]);
|
|
22782
|
-
}
|
|
22783
|
-
React.useEffect(() => {
|
|
22784
|
-
if (selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) {
|
|
22785
|
-
setDocuments(prev => {
|
|
22786
|
-
const filteredDocumentsByDocumentType = prev === null || prev === void 0 ? void 0 : prev.filter(item => (item === null || item === void 0 ? void 0 : item.documentType) !== (selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code));
|
|
22787
|
-
if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) return filteredDocumentsByDocumentType;
|
|
22788
|
-
const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType === null || filteredDocumentsByDocumentType === void 0 ? void 0 : filteredDocumentsByDocumentType.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== uploadedFile);
|
|
22789
|
-
return [...filteredDocumentsByFileStoreId, {
|
|
22790
|
-
documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
|
|
22791
|
-
fileStoreId: uploadedFile,
|
|
22792
|
-
documentUid: uploadedFile,
|
|
22793
|
-
fileName: (file === null || file === void 0 ? void 0 : file.name) || ""
|
|
22794
|
-
}];
|
|
22795
|
-
});
|
|
22796
|
-
}
|
|
22797
|
-
}, [uploadedFile, selectedDocument]);
|
|
22798
|
-
React.useEffect(() => {
|
|
22799
|
-
(function () {
|
|
22800
|
-
try {
|
|
22801
|
-
const _temp0 = function () {
|
|
22802
|
-
if (file) {
|
|
22803
|
-
setError(null);
|
|
22804
|
-
const _temp9 = function () {
|
|
22805
|
-
if (file.size >= 5242880) {
|
|
22806
|
-
setError({
|
|
22807
|
-
key: "error",
|
|
22808
|
-
message: "CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"
|
|
22809
|
-
});
|
|
22810
|
-
} else {
|
|
22811
|
-
const _temp8 = _catch(function () {
|
|
22812
|
-
setUploadedFile(null);
|
|
22813
|
-
return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
|
|
22814
|
-
var _response$data, _response$data$files;
|
|
22815
|
-
if ((response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$files = _response$data.files) === null || _response$data$files === void 0 ? void 0 : _response$data$files.length) > 0) {
|
|
22816
|
-
var _response$data2, _response$data2$files;
|
|
22817
|
-
setUploadedFile(response === null || response === void 0 ? void 0 : (_response$data2 = response.data) === null || _response$data2 === void 0 ? void 0 : (_response$data2$files = _response$data2.files[0]) === null || _response$data2$files === void 0 ? void 0 : _response$data2$files.fileStoreId);
|
|
22818
|
-
} else {
|
|
22819
|
-
setError({
|
|
22820
|
-
key: "error",
|
|
22821
|
-
message: "CS_FILE_UPLOAD_ERROR"
|
|
22822
|
-
});
|
|
22823
|
-
}
|
|
22824
|
-
});
|
|
22825
|
-
}, function () {
|
|
22826
|
-
setError({
|
|
22827
|
-
key: "error",
|
|
22828
|
-
message: "CS_FILE_UPLOAD_ERROR"
|
|
22829
|
-
});
|
|
22830
|
-
});
|
|
22831
|
-
if (_temp8 && _temp8.then) return _temp8.then(function () {});
|
|
22832
|
-
}
|
|
22833
|
-
}();
|
|
22834
|
-
if (_temp9 && _temp9.then) return _temp9.then(function () {});
|
|
22835
|
-
}
|
|
22836
|
-
}();
|
|
22837
|
-
return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
|
|
22838
|
-
} catch (e) {
|
|
22839
|
-
Promise.reject(e);
|
|
22840
|
-
}
|
|
22841
|
-
})();
|
|
22842
|
-
}, [file]);
|
|
22843
|
-
const fieldStyle = {
|
|
22844
|
-
display: "flex",
|
|
22845
|
-
flexDirection: isMobileForm ? "column" : "row",
|
|
22846
|
-
alignItems: isMobileForm ? "flex-start" : "flex-start",
|
|
22847
|
-
justifyContent: "space-between",
|
|
22848
|
-
gap: "10px",
|
|
22849
|
-
width: "100%",
|
|
22850
|
-
marginBottom: "16px"
|
|
22851
|
-
};
|
|
22852
|
-
const labelStyle = {
|
|
22853
|
-
fontWeight: "700",
|
|
22854
|
-
color: "#0B0C0C",
|
|
22855
|
-
fontSize: "16px",
|
|
22856
|
-
margin: 0,
|
|
22857
|
-
display: "flex",
|
|
22858
|
-
alignItems: "center",
|
|
22859
|
-
width: isMobileForm ? "100%" : "30%"
|
|
22860
|
-
};
|
|
22861
|
-
const inputWrapperStyle = {
|
|
22862
|
-
width: isMobileForm ? "100%" : "65%"
|
|
22863
|
-
};
|
|
22864
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
22865
|
-
style: {
|
|
22866
|
-
marginBottom: "24px"
|
|
22867
|
-
}
|
|
22868
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22869
|
-
style: fieldStyle
|
|
22870
|
-
}, /*#__PURE__*/React__default.createElement("h4", {
|
|
22871
|
-
style: labelStyle
|
|
22872
|
-
}, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), " *"), /*#__PURE__*/React__default.createElement("div", {
|
|
22873
|
-
style: inputWrapperStyle
|
|
22874
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
22875
|
-
style: {
|
|
22876
|
-
marginBottom: "8px"
|
|
22877
|
-
}
|
|
22878
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
22879
|
-
t: t,
|
|
22880
|
-
isMandatory: false,
|
|
22881
|
-
option: doc === null || doc === void 0 ? void 0 : doc.dropdownData,
|
|
22882
|
-
selected: selectedDocument,
|
|
22883
|
-
optionKey: "i18nKey",
|
|
22884
|
-
select: handleSelectDocument
|
|
22885
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.UploadFile, {
|
|
22886
|
-
id: `noc-doc-1-${key}`,
|
|
22887
|
-
extraStyleName: "propertyCreate",
|
|
22888
|
-
accept: "image/*, .pdf, .png, .jpeg, .jpg",
|
|
22889
|
-
onUpload: selectfile,
|
|
22890
|
-
onDelete: () => {
|
|
22891
|
-
setUploadedFile(null);
|
|
22892
|
-
setCheckRequiredFields(true);
|
|
22893
|
-
},
|
|
22894
|
-
message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`)
|
|
22895
|
-
}))));
|
|
22896
|
-
}
|
|
22897
22851
|
|
|
22898
22852
|
const WSRestorationForm = _ref => {
|
|
22899
|
-
var _applicationData$
|
|
22853
|
+
var _applicationData$appl, _applicationData$appl4, _applicationData$appl5, _applicationData$appl6, _applicationData$appl7, _disconnectionData$re5, _applicationData$appl8;
|
|
22900
22854
|
let {
|
|
22901
22855
|
t,
|
|
22902
22856
|
config,
|
|
@@ -22906,16 +22860,22 @@ const WSRestorationForm = _ref => {
|
|
|
22906
22860
|
const stateCode = Digit.ULBService.getStateId();
|
|
22907
22861
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
22908
22862
|
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
22909
|
-
const
|
|
22863
|
+
const sessionData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
|
|
22864
|
+
const [applicationData, setApplicationData] = React.useState(sessionData);
|
|
22910
22865
|
const history = reactRouterDom.useHistory();
|
|
22911
22866
|
const match = reactRouterDom.useRouteMatch();
|
|
22867
|
+
const location = reactRouterDom.useLocation();
|
|
22868
|
+
const queryParams = new URLSearchParams(location.search);
|
|
22869
|
+
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) || "");
|
|
22871
|
+
const [isSearching, setIsSearching] = React.useState(false);
|
|
22912
22872
|
const [disconnectionData, setDisconnectionData] = React.useState({
|
|
22913
|
-
type: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.type : "",
|
|
22914
|
-
date: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
|
|
22915
|
-
reason: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
|
|
22916
|
-
documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
|
|
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 : []
|
|
22917
22877
|
});
|
|
22918
|
-
const [documents, setDocuments] = React.useState(applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
|
|
22878
|
+
const [documents, setDocuments] = React.useState(applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
|
|
22919
22879
|
const [error, setError] = React.useState(null);
|
|
22920
22880
|
const [disconnectionTypeList, setDisconnectionTypeList] = React.useState([]);
|
|
22921
22881
|
const [checkRequiredFields, setCheckRequiredFields] = React.useState(false);
|
|
@@ -22966,6 +22926,105 @@ const WSRestorationForm = _ref => {
|
|
|
22966
22926
|
const closeToastOfError = () => {
|
|
22967
22927
|
setError(null);
|
|
22968
22928
|
};
|
|
22929
|
+
const fetchConnection = function (connNo) {
|
|
22930
|
+
try {
|
|
22931
|
+
const trimmed = (connNo || "").trim();
|
|
22932
|
+
if (!trimmed) {
|
|
22933
|
+
setError({
|
|
22934
|
+
warning: true,
|
|
22935
|
+
message: "PLEASE_ENTER_CONNECTION_NUMBER"
|
|
22936
|
+
});
|
|
22937
|
+
setTimeout(() => setError(null), 3000);
|
|
22938
|
+
return Promise.resolve();
|
|
22939
|
+
}
|
|
22940
|
+
setIsSearching(true);
|
|
22941
|
+
return Promise.resolve(_catch(function () {
|
|
22942
|
+
const searchParams = {
|
|
22943
|
+
connectionNumber: trimmed,
|
|
22944
|
+
searchType: "CONNECTION",
|
|
22945
|
+
isConnectionSearch: true
|
|
22946
|
+
};
|
|
22947
|
+
let detectedService = "WATER";
|
|
22948
|
+
return Promise.resolve(Digit.WSService.search({
|
|
22949
|
+
tenantId,
|
|
22950
|
+
filters: searchParams,
|
|
22951
|
+
businessService: "WS"
|
|
22952
|
+
}).catch(() => null)).then(function (wsRes) {
|
|
22953
|
+
var _wsRes$WaterConnectio;
|
|
22954
|
+
function _temp4() {
|
|
22955
|
+
function _temp2() {
|
|
22956
|
+
const fullData = {
|
|
22957
|
+
applicationData: conn,
|
|
22958
|
+
propertyDetails,
|
|
22959
|
+
connectionNo: conn.connectionNo,
|
|
22960
|
+
serviceType: detectedService
|
|
22961
|
+
};
|
|
22962
|
+
setApplicationData(fullData);
|
|
22963
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", fullData);
|
|
22964
|
+
setIsSearching(false);
|
|
22965
|
+
}
|
|
22966
|
+
if (!conn) {
|
|
22967
|
+
setIsSearching(false);
|
|
22968
|
+
setError({
|
|
22969
|
+
key: "error",
|
|
22970
|
+
message: "CONNECTION_NOT_FOUND"
|
|
22971
|
+
});
|
|
22972
|
+
setTimeout(() => setError(null), 4000);
|
|
22973
|
+
return;
|
|
22974
|
+
}
|
|
22975
|
+
conn.serviceType = detectedService;
|
|
22976
|
+
let propertyDetails = null;
|
|
22977
|
+
const _temp = function (_conn) {
|
|
22978
|
+
if ((_conn = conn) !== null && _conn !== void 0 && _conn.propertyId) {
|
|
22979
|
+
var _conn2;
|
|
22980
|
+
return Promise.resolve(Digit.PTService.search({
|
|
22981
|
+
tenantId: ((_conn2 = conn) === null || _conn2 === void 0 ? void 0 : _conn2.tenantId) || tenantId,
|
|
22982
|
+
filters: {
|
|
22983
|
+
propertyIds: conn.propertyId
|
|
22984
|
+
},
|
|
22985
|
+
auth: true
|
|
22986
|
+
}).catch(() => null)).then(function (ptRes) {
|
|
22987
|
+
var _ptRes$Properties;
|
|
22988
|
+
propertyDetails = ptRes === null || ptRes === void 0 ? void 0 : (_ptRes$Properties = ptRes.Properties) === null || _ptRes$Properties === void 0 ? void 0 : _ptRes$Properties[0];
|
|
22989
|
+
});
|
|
22990
|
+
}
|
|
22991
|
+
}();
|
|
22992
|
+
return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
|
|
22993
|
+
}
|
|
22994
|
+
let conn = wsRes === null || wsRes === void 0 ? void 0 : (_wsRes$WaterConnectio = wsRes.WaterConnection) === null || _wsRes$WaterConnectio === void 0 ? void 0 : _wsRes$WaterConnectio[0];
|
|
22995
|
+
const _temp3 = function () {
|
|
22996
|
+
if (!conn) {
|
|
22997
|
+
return Promise.resolve(Digit.WSService.search({
|
|
22998
|
+
tenantId,
|
|
22999
|
+
filters: searchParams,
|
|
23000
|
+
businessService: "SW"
|
|
23001
|
+
}).catch(() => null)).then(function (swRes) {
|
|
23002
|
+
var _swRes$SewerageConnec;
|
|
23003
|
+
conn = swRes === null || swRes === void 0 ? void 0 : (_swRes$SewerageConnec = swRes.SewerageConnections) === null || _swRes$SewerageConnec === void 0 ? void 0 : _swRes$SewerageConnec[0];
|
|
23004
|
+
if (conn) detectedService = "SEWERAGE";
|
|
23005
|
+
});
|
|
23006
|
+
}
|
|
23007
|
+
}();
|
|
23008
|
+
return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
|
|
23009
|
+
});
|
|
23010
|
+
}, function (e) {
|
|
23011
|
+
setIsSearching(false);
|
|
23012
|
+
setError({
|
|
23013
|
+
key: "error",
|
|
23014
|
+
message: (e === null || e === void 0 ? void 0 : e.message) || "Failed to search connection"
|
|
23015
|
+
});
|
|
23016
|
+
setTimeout(() => setError(null), 4000);
|
|
23017
|
+
}));
|
|
23018
|
+
} catch (e) {
|
|
23019
|
+
return Promise.reject(e);
|
|
23020
|
+
}
|
|
23021
|
+
};
|
|
23022
|
+
React.useEffect(() => {
|
|
23023
|
+
var _applicationData$appl2;
|
|
23024
|
+
if (!(applicationData !== null && applicationData !== void 0 && (_applicationData$appl2 = applicationData.applicationData) !== null && _applicationData$appl2 !== void 0 && _applicationData$appl2.connectionNo) && connectionNumberFromQuery) {
|
|
23025
|
+
fetchConnection(connectionNumberFromQuery);
|
|
23026
|
+
}
|
|
23027
|
+
}, [connectionNumberFromQuery]);
|
|
22969
23028
|
React.useEffect(() => {
|
|
22970
23029
|
const oldData = {
|
|
22971
23030
|
...disconnectionData
|
|
@@ -23010,174 +23069,170 @@ const WSRestorationForm = _ref => {
|
|
|
23010
23069
|
};
|
|
23011
23070
|
const onSubmit = function (data) {
|
|
23012
23071
|
try {
|
|
23072
|
+
var _disconnectionData$re, _disconnectionData$re2, _applicationData$appl3, _currentAppData$appli, _currentAppData$appli2;
|
|
23073
|
+
const slaDays = slaData !== null && slaData !== void 0 && slaData.slaDays && !isNaN(slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) ? Number(slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) : 0;
|
|
23013
23074
|
const appDate = new Date();
|
|
23014
|
-
const proposedDate = format(addDays(appDate,
|
|
23015
|
-
const
|
|
23016
|
-
|
|
23017
|
-
|
|
23018
|
-
|
|
23019
|
-
|
|
23020
|
-
|
|
23021
|
-
|
|
23022
|
-
|
|
23023
|
-
|
|
23024
|
-
|
|
23025
|
-
|
|
23026
|
-
|
|
23027
|
-
|
|
23028
|
-
|
|
23029
|
-
|
|
23030
|
-
|
|
23031
|
-
|
|
23032
|
-
|
|
23033
|
-
|
|
23034
|
-
|
|
23035
|
-
|
|
23036
|
-
|
|
23037
|
-
|
|
23038
|
-
|
|
23039
|
-
|
|
23040
|
-
|
|
23041
|
-
|
|
23042
|
-
|
|
23043
|
-
|
|
23044
|
-
|
|
23045
|
-
|
|
23046
|
-
|
|
23047
|
-
|
|
23048
|
-
|
|
23075
|
+
const proposedDate = format(addDays(appDate, slaDays), 'yyyy-MM-dd').toString();
|
|
23076
|
+
const reasonText = (typeof (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason) === "string" ? disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason : (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re = disconnectionData.reason) === null || _disconnectionData$re === void 0 ? void 0 : _disconnectionData$re.value) || (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re2 = disconnectionData.reason) === null || _disconnectionData$re2 === void 0 ? void 0 : _disconnectionData$re2.code) || "").trim();
|
|
23077
|
+
if (slaDays > 0 && data !== null && data !== void 0 && data.date && convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date) < convertDateToEpoch(proposedDate)) {
|
|
23078
|
+
setError({
|
|
23079
|
+
key: "error",
|
|
23080
|
+
message: "PROPOSED_RESTORATION_INVALID_DATE"
|
|
23081
|
+
});
|
|
23082
|
+
setTimeout(() => setError(null), 3000);
|
|
23083
|
+
return Promise.resolve();
|
|
23084
|
+
}
|
|
23085
|
+
if (!reasonText || !(disconnectionData !== null && disconnectionData !== void 0 && disconnectionData.date)) {
|
|
23086
|
+
setError({
|
|
23087
|
+
warning: true,
|
|
23088
|
+
message: "PLEASE_FILL_MANDATORY_DETAILS"
|
|
23089
|
+
});
|
|
23090
|
+
setTimeout(() => setError(null), 3000);
|
|
23091
|
+
return Promise.resolve();
|
|
23092
|
+
}
|
|
23093
|
+
const currentAppData = applicationData !== null && applicationData !== void 0 && (_applicationData$appl3 = applicationData.applicationData) !== null && _applicationData$appl3 !== void 0 && _applicationData$appl3.connectionNo ? applicationData : Digit.SessionStorage.get("WS_DISCONNECTION");
|
|
23094
|
+
if (!(currentAppData !== null && currentAppData !== void 0 && (_currentAppData$appli = currentAppData.applicationData) !== null && _currentAppData$appli !== void 0 && _currentAppData$appli.connectionNo)) {
|
|
23095
|
+
setError({
|
|
23096
|
+
key: "error",
|
|
23097
|
+
message: "PLEASE_SEARCH_AND_SELECT_CONNECTION"
|
|
23098
|
+
});
|
|
23099
|
+
setTimeout(() => setError(null), 3000);
|
|
23100
|
+
return Promise.resolve();
|
|
23101
|
+
}
|
|
23102
|
+
return Promise.resolve(createPayloadOfWSReconnection(data, currentAppData, currentAppData === null || currentAppData === void 0 ? void 0 : (_currentAppData$appli2 = currentAppData.applicationData) === null || _currentAppData$appli2 === void 0 ? void 0 : _currentAppData$appli2.serviceType)).then(function (payload) {
|
|
23103
|
+
const _temp8 = function (_payload$WaterConnect) {
|
|
23104
|
+
if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
|
|
23105
|
+
payload.WaterConnection.isdisconnection = false;
|
|
23106
|
+
payload.WaterConnection.isDisconnectionTemporary = true;
|
|
23107
|
+
payload.WaterConnection["reconnectionReason"] = reasonText;
|
|
23108
|
+
payload.WaterConnection.disconnectionReason = "";
|
|
23109
|
+
payload["reconnectRequest"] = true;
|
|
23110
|
+
payload.disconnectRequest = false;
|
|
23111
|
+
const _temp5 = function () {
|
|
23112
|
+
if (waterMutation) {
|
|
23113
|
+
setIsEnableLoader(true);
|
|
23114
|
+
return Promise.resolve(waterMutation(payload, {
|
|
23115
|
+
onError: (error, variables) => {
|
|
23116
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2, _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
|
|
23117
|
+
setIsEnableLoader(false);
|
|
23118
|
+
setError({
|
|
23119
|
+
key: "error",
|
|
23120
|
+
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$2 = _error$response$data$[0]) !== null && _error$response$data$2 !== void 0 && _error$response$data$2.message ? error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : (_error$response2$data = _error$response2.data) === null || _error$response2$data === void 0 ? void 0 : (_error$response2$data2 = _error$response2$data.Errors) === null || _error$response2$data2 === void 0 ? void 0 : (_error$response2$data3 = _error$response2$data2[0]) === null || _error$response2$data3 === void 0 ? void 0 : _error$response2$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to initiate reconnection"
|
|
23121
|
+
});
|
|
23122
|
+
setTimeout(closeToastOfError, 5000);
|
|
23123
|
+
},
|
|
23124
|
+
onSuccess: function (createdData, variables) {
|
|
23125
|
+
try {
|
|
23126
|
+
var _createdData$WaterCon;
|
|
23127
|
+
return Promise.resolve(updatePayloadOfWSRestoration(createdData === null || createdData === void 0 ? void 0 : (_createdData$WaterCon = createdData.WaterConnection) === null || _createdData$WaterCon === void 0 ? void 0 : _createdData$WaterCon[0], "WATER")).then(function (response) {
|
|
23128
|
+
let waterConnectionUpdate = {
|
|
23129
|
+
WaterConnection: response,
|
|
23130
|
+
disconnectRequest: false,
|
|
23131
|
+
reconnectRequest: true
|
|
23132
|
+
};
|
|
23133
|
+
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
23049
23134
|
onError: (error, variables) => {
|
|
23050
|
-
var _error$
|
|
23135
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3, _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
|
|
23051
23136
|
setIsEnableLoader(false);
|
|
23052
23137
|
setError({
|
|
23053
23138
|
key: "error",
|
|
23054
|
-
message: error !== null && error !== void 0 && (_error$
|
|
23139
|
+
message: error !== null && error !== void 0 && (_error$response3 = error.response) !== null && _error$response3 !== void 0 && (_error$response3$data = _error$response3.data) !== null && _error$response3$data !== void 0 && (_error$response3$data2 = _error$response3$data.Errors) !== null && _error$response3$data2 !== void 0 && (_error$response3$data3 = _error$response3$data2[0]) !== null && _error$response3$data3 !== void 0 && _error$response3$data3.message ? error === null || error === void 0 ? void 0 : (_error$response4 = error.response) === null || _error$response4 === void 0 ? void 0 : (_error$response4$data = _error$response4.data) === null || _error$response4$data === void 0 ? void 0 : (_error$response4$data2 = _error$response4$data.Errors) === null || _error$response4$data2 === void 0 ? void 0 : (_error$response4$data3 = _error$response4$data2[0]) === null || _error$response4$data3 === void 0 ? void 0 : _error$response4$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to submit reconnection"
|
|
23055
23140
|
});
|
|
23056
23141
|
setTimeout(closeToastOfError, 5000);
|
|
23057
23142
|
},
|
|
23058
|
-
onSuccess:
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
-
|
|
23063
|
-
|
|
23064
|
-
|
|
23065
|
-
|
|
23066
|
-
...waterConnectionUpdate,
|
|
23067
|
-
disconnectRequest: false,
|
|
23068
|
-
reconnectRequest: true
|
|
23069
|
-
};
|
|
23070
|
-
console.log("response");
|
|
23071
|
-
return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
|
|
23072
|
-
onError: (error, variables) => {
|
|
23073
|
-
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
23074
|
-
setIsEnableLoader(false);
|
|
23075
|
-
setError({
|
|
23076
|
-
key: "error",
|
|
23077
|
-
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
|
|
23078
|
-
});
|
|
23079
|
-
setTimeout(closeToastOfError, 5000);
|
|
23080
|
-
},
|
|
23081
|
-
onSuccess: (data, variables) => {
|
|
23082
|
-
var _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4;
|
|
23083
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23084
|
-
...applicationData,
|
|
23085
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
|
|
23086
|
-
});
|
|
23087
|
-
history.push(`/digit-ui/employee/ws/ws-restoration-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}`);
|
|
23088
|
-
}
|
|
23089
|
-
})).then(function () {});
|
|
23090
|
-
});
|
|
23091
|
-
} catch (e) {
|
|
23092
|
-
return Promise.reject(e);
|
|
23093
|
-
}
|
|
23143
|
+
onSuccess: (updatedData, variables) => {
|
|
23144
|
+
var _updatedData$WaterCon, _updatedData$WaterCon2, _updatedData$WaterCon3;
|
|
23145
|
+
setIsEnableLoader(false);
|
|
23146
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23147
|
+
...currentAppData,
|
|
23148
|
+
DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$WaterCon = updatedData.WaterConnection) === null || _updatedData$WaterCon === void 0 ? void 0 : _updatedData$WaterCon[0]
|
|
23149
|
+
});
|
|
23150
|
+
history.push(`/digit-ui/employee/ws/ws-restoration-response?applicationNumber=${updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$WaterCon2 = updatedData.WaterConnection) === null || _updatedData$WaterCon2 === void 0 ? void 0 : (_updatedData$WaterCon3 = _updatedData$WaterCon2[0]) === null || _updatedData$WaterCon3 === void 0 ? void 0 : _updatedData$WaterCon3.applicationNo}`);
|
|
23094
23151
|
}
|
|
23095
23152
|
})).then(function () {});
|
|
23096
|
-
}
|
|
23097
|
-
}()
|
|
23098
|
-
|
|
23099
|
-
|
|
23100
|
-
|
|
23101
|
-
|
|
23102
|
-
|
|
23103
|
-
|
|
23104
|
-
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23108
|
-
|
|
23109
|
-
|
|
23110
|
-
|
|
23111
|
-
|
|
23153
|
+
});
|
|
23154
|
+
} catch (e) {
|
|
23155
|
+
return Promise.reject(e);
|
|
23156
|
+
}
|
|
23157
|
+
}
|
|
23158
|
+
})).then(function () {});
|
|
23159
|
+
}
|
|
23160
|
+
}();
|
|
23161
|
+
if (_temp5 && _temp5.then) return _temp5.then(function () {});
|
|
23162
|
+
} else {
|
|
23163
|
+
const _temp7 = function (_payload$SewerageConn) {
|
|
23164
|
+
if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
|
|
23165
|
+
payload.SewerageConnection.isdisconnection = false;
|
|
23166
|
+
payload.SewerageConnection.isDisconnectionTemporary = true;
|
|
23167
|
+
payload.SewerageConnection["reconnectionReason"] = reasonText;
|
|
23168
|
+
payload.SewerageConnection.disconnectionReason = "";
|
|
23169
|
+
payload["reconnectRequest"] = true;
|
|
23170
|
+
payload.disconnectRequest = false;
|
|
23171
|
+
const _temp6 = function () {
|
|
23172
|
+
if (sewerageMutation) {
|
|
23173
|
+
setIsEnableLoader(true);
|
|
23174
|
+
return Promise.resolve(sewerageMutation(payload, {
|
|
23175
|
+
onError: (error, variables) => {
|
|
23176
|
+
var _error$response5, _error$response5$data, _error$response5$data2, _error$response5$data3, _error$response6, _error$response6$data, _error$response6$data2, _error$response6$data3;
|
|
23177
|
+
setIsEnableLoader(false);
|
|
23178
|
+
setError({
|
|
23179
|
+
key: "error",
|
|
23180
|
+
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$data3 = _error$response5$data2[0]) !== null && _error$response5$data3 !== void 0 && _error$response5$data3.message ? error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : (_error$response6$data3 = _error$response6$data2[0]) === null || _error$response6$data3 === void 0 ? void 0 : _error$response6$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to initiate reconnection"
|
|
23181
|
+
});
|
|
23182
|
+
setTimeout(closeToastOfError, 5000);
|
|
23183
|
+
},
|
|
23184
|
+
onSuccess: function (createdData, variables) {
|
|
23185
|
+
try {
|
|
23186
|
+
var _createdData$Sewerage;
|
|
23187
|
+
return Promise.resolve(updatePayloadOfWSRestoration(createdData === null || createdData === void 0 ? void 0 : (_createdData$Sewerage = createdData.SewerageConnections) === null || _createdData$Sewerage === void 0 ? void 0 : _createdData$Sewerage[0], "SEWERAGE")).then(function (response) {
|
|
23188
|
+
let sewerageConnectionUpdate = {
|
|
23189
|
+
SewerageConnection: response,
|
|
23190
|
+
disconnectRequest: false,
|
|
23191
|
+
reconnectRequest: true
|
|
23192
|
+
};
|
|
23193
|
+
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
23112
23194
|
onError: (error, variables) => {
|
|
23113
|
-
var _error$
|
|
23195
|
+
var _error$response7, _error$response7$data, _error$response7$data2, _error$response7$data3, _error$response8, _error$response8$data, _error$response8$data2, _error$response8$data3;
|
|
23114
23196
|
setIsEnableLoader(false);
|
|
23115
23197
|
setError({
|
|
23116
23198
|
key: "error",
|
|
23117
|
-
message: error !== null && error !== void 0 && (_error$
|
|
23199
|
+
message: error !== null && error !== void 0 && (_error$response7 = error.response) !== null && _error$response7 !== void 0 && (_error$response7$data = _error$response7.data) !== null && _error$response7$data !== void 0 && (_error$response7$data2 = _error$response7$data.Errors) !== null && _error$response7$data2 !== void 0 && (_error$response7$data3 = _error$response7$data2[0]) !== null && _error$response7$data3 !== void 0 && _error$response7$data3.message ? error === null || error === void 0 ? void 0 : (_error$response8 = error.response) === null || _error$response8 === void 0 ? void 0 : (_error$response8$data = _error$response8.data) === null || _error$response8$data === void 0 ? void 0 : (_error$response8$data2 = _error$response8$data.Errors) === null || _error$response8$data2 === void 0 ? void 0 : (_error$response8$data3 = _error$response8$data2[0]) === null || _error$response8$data3 === void 0 ? void 0 : _error$response8$data3.message : (error === null || error === void 0 ? void 0 : error.message) || "Failed to submit reconnection"
|
|
23118
23200
|
});
|
|
23119
23201
|
setTimeout(closeToastOfError, 5000);
|
|
23120
23202
|
},
|
|
23121
|
-
onSuccess:
|
|
23122
|
-
|
|
23123
|
-
|
|
23124
|
-
|
|
23125
|
-
|
|
23126
|
-
|
|
23127
|
-
|
|
23128
|
-
|
|
23129
|
-
...sewerageConnectionUpdate,
|
|
23130
|
-
disconnectRequest: false,
|
|
23131
|
-
reconnectRequest: true
|
|
23132
|
-
};
|
|
23133
|
-
return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
|
|
23134
|
-
onError: (error, variables) => {
|
|
23135
|
-
var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
|
|
23136
|
-
setIsEnableLoader(false);
|
|
23137
|
-
setError({
|
|
23138
|
-
key: "error",
|
|
23139
|
-
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
|
|
23140
|
-
});
|
|
23141
|
-
setTimeout(closeToastOfError, 5000);
|
|
23142
|
-
},
|
|
23143
|
-
onSuccess: (data, variables) => {
|
|
23144
|
-
var _data$SewerageConnect2, _data$SewerageConnect3, _data$SewerageConnect4;
|
|
23145
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23146
|
-
...applicationData,
|
|
23147
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
|
|
23148
|
-
});
|
|
23149
|
-
history.push(`/digit-ui/employee/ws/ws-restoration-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}`);
|
|
23150
|
-
}
|
|
23151
|
-
})).then(function () {});
|
|
23152
|
-
});
|
|
23153
|
-
} catch (e) {
|
|
23154
|
-
return Promise.reject(e);
|
|
23155
|
-
}
|
|
23203
|
+
onSuccess: (updatedData, variables) => {
|
|
23204
|
+
var _updatedData$Sewerage, _updatedData$Sewerage2, _updatedData$Sewerage3;
|
|
23205
|
+
setIsEnableLoader(false);
|
|
23206
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
23207
|
+
...currentAppData,
|
|
23208
|
+
DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$Sewerage = updatedData.SewerageConnections) === null || _updatedData$Sewerage === void 0 ? void 0 : _updatedData$Sewerage[0]
|
|
23209
|
+
});
|
|
23210
|
+
history.push(`/digit-ui/employee/ws/ws-restoration-response?applicationNumber=${updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$Sewerage2 = updatedData.SewerageConnections) === null || _updatedData$Sewerage2 === void 0 ? void 0 : (_updatedData$Sewerage3 = _updatedData$Sewerage2[0]) === null || _updatedData$Sewerage3 === void 0 ? void 0 : _updatedData$Sewerage3.applicationNo}`);
|
|
23156
23211
|
}
|
|
23157
23212
|
})).then(function () {});
|
|
23158
|
-
}
|
|
23159
|
-
}()
|
|
23160
|
-
|
|
23213
|
+
});
|
|
23214
|
+
} catch (e) {
|
|
23215
|
+
return Promise.reject(e);
|
|
23216
|
+
}
|
|
23161
23217
|
}
|
|
23162
|
-
}();
|
|
23163
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
23218
|
+
})).then(function () {});
|
|
23164
23219
|
}
|
|
23165
23220
|
}();
|
|
23166
|
-
if (
|
|
23167
|
-
}
|
|
23168
|
-
}
|
|
23169
|
-
|
|
23170
|
-
|
|
23171
|
-
}
|
|
23172
|
-
|
|
23173
|
-
|
|
23221
|
+
if (_temp6 && _temp6.then) return _temp6.then(function () {});
|
|
23222
|
+
}
|
|
23223
|
+
}();
|
|
23224
|
+
if (_temp7 && _temp7.then) return _temp7.then(function () {});
|
|
23225
|
+
}
|
|
23226
|
+
}();
|
|
23227
|
+
if (_temp8 && _temp8.then) return _temp8.then(function () {});
|
|
23228
|
+
});
|
|
23174
23229
|
} catch (e) {
|
|
23175
23230
|
return Promise.reject(e);
|
|
23176
23231
|
}
|
|
23177
23232
|
};
|
|
23178
23233
|
if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
23179
23234
|
if (userType === 'citizen') {
|
|
23180
|
-
var _disconnectionData$
|
|
23235
|
+
var _disconnectionData$re3, _disconnectionData$re4;
|
|
23181
23236
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CitizenInfoLabel, {
|
|
23182
23237
|
style: {
|
|
23183
23238
|
margin: "0px",
|
|
@@ -23232,7 +23287,7 @@ const WSRestorationForm = _ref => {
|
|
|
23232
23287
|
optionKey: "i18nKey",
|
|
23233
23288
|
t: t,
|
|
23234
23289
|
name: "reason",
|
|
23235
|
-
value: (_disconnectionData$
|
|
23290
|
+
value: ((_disconnectionData$re3 = disconnectionData.reason) === null || _disconnectionData$re3 === void 0 ? void 0 : _disconnectionData$re3.value) || (typeof disconnectionData.reason === "string" ? disconnectionData.reason : ""),
|
|
23236
23291
|
onChange: e => filedChange({
|
|
23237
23292
|
code: "reason",
|
|
23238
23293
|
value: e.target.value
|
|
@@ -23244,7 +23299,7 @@ const WSRestorationForm = _ref => {
|
|
|
23244
23299
|
const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), 'yyyy-MM-dd').toString();
|
|
23245
23300
|
history.push(match.path.replace("restoration-application", "check"));
|
|
23246
23301
|
},
|
|
23247
|
-
disabled: (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$
|
|
23302
|
+
disabled: (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re4 = disconnectionData.reason) === null || _disconnectionData$re4 === void 0 ? void 0 : _disconnectionData$re4.value) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) === "" ? true : false
|
|
23248
23303
|
}), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
23249
23304
|
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
23250
23305
|
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
@@ -23272,22 +23327,48 @@ const WSRestorationForm = _ref => {
|
|
|
23272
23327
|
paddingTop: "20px",
|
|
23273
23328
|
marginTop: "10px"
|
|
23274
23329
|
}
|
|
23275
|
-
},
|
|
23330
|
+
}, !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl4 = applicationData.applicationData) !== null && _applicationData$appl4 !== void 0 && _applicationData$appl4.connectionNo) ? /*#__PURE__*/React__default.createElement("div", {
|
|
23331
|
+
style: {
|
|
23332
|
+
marginBottom: "20px"
|
|
23333
|
+
}
|
|
23334
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, null, t("WS_SEARCH_CONNECTION_LABEL") || "Search Disconnected Connection"), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
23335
|
+
style: {
|
|
23336
|
+
fontWeight: "700",
|
|
23337
|
+
marginTop: "10px"
|
|
23338
|
+
}
|
|
23339
|
+
}, t("WS_CONSUMER_CODE_LABEL") || "Connection / K-Number"), /*#__PURE__*/React__default.createElement("div", {
|
|
23340
|
+
className: "field",
|
|
23341
|
+
style: {
|
|
23342
|
+
display: "flex",
|
|
23343
|
+
gap: "10px",
|
|
23344
|
+
alignItems: "center"
|
|
23345
|
+
}
|
|
23346
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
23347
|
+
t: t,
|
|
23348
|
+
type: "text",
|
|
23349
|
+
value: searchConnNo,
|
|
23350
|
+
onChange: e => setSearchConnNo(e.target.value),
|
|
23351
|
+
placeholder: t("ENTER_CONNECTION_NUMBER") || "Enter Connection Number / K-Number"
|
|
23352
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23353
|
+
label: isSearching ? t("SEARCHING") || "Searching..." : t("ES_COMMON_SEARCH") || "Search",
|
|
23354
|
+
onSubmit: () => fetchConnection(searchConnNo),
|
|
23355
|
+
disabled: isSearching || !(searchConnNo !== null && searchConnNo !== void 0 && searchConnNo.trim())
|
|
23356
|
+
})))) : /*#__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, {
|
|
23276
23357
|
key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
|
|
23277
23358
|
label: `${t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL")}`,
|
|
23278
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23359
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl5 = applicationData.applicationData) === null || _applicationData$appl5 === void 0 ? void 0 : _applicationData$appl5.connectionNo,
|
|
23279
23360
|
className: "border-none"
|
|
23280
23361
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
23281
23362
|
key: t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL"),
|
|
23282
23363
|
label: `${t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL")}`,
|
|
23283
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23364
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl6 = applicationData.applicationData) === null || _applicationData$appl6 === void 0 ? void 0 : _applicationData$appl6.serviceType,
|
|
23284
23365
|
className: "border-none"
|
|
23285
23366
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
23286
23367
|
key: t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL"),
|
|
23287
23368
|
label: `${t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL")}`,
|
|
23288
|
-
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$
|
|
23369
|
+
text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl7 = applicationData.applicationData) === null || _applicationData$appl7 === void 0 ? void 0 : _applicationData$appl7.propertyId,
|
|
23289
23370
|
className: "border-none"
|
|
23290
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
23371
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
|
|
23291
23372
|
style: {
|
|
23292
23373
|
marginTop: "-5px",
|
|
23293
23374
|
fontWeight: "700",
|
|
@@ -23306,7 +23387,7 @@ const WSRestorationForm = _ref => {
|
|
|
23306
23387
|
whiteSpace: Digit.Utils.browser.isMobile() ? "unset" : "nowrap",
|
|
23307
23388
|
fontSize: "medium"
|
|
23308
23389
|
}
|
|
23309
|
-
}, t("SHOULD_BE_DATE") + " " + (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) + " " + t("DAYS_OF_APPLICATION_DATE")))), /*#__PURE__*/React__default.createElement("div", {
|
|
23390
|
+
}, t("SHOULD_BE_DATE") + " " + ((slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0) + " " + t("DAYS_OF_APPLICATION_DATE")))), /*#__PURE__*/React__default.createElement("div", {
|
|
23310
23391
|
className: "field"
|
|
23311
23392
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.DatePicker, {
|
|
23312
23393
|
date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
|
|
@@ -23330,7 +23411,7 @@ const WSRestorationForm = _ref => {
|
|
|
23330
23411
|
optionKey: "i18nKey",
|
|
23331
23412
|
t: t,
|
|
23332
23413
|
name: "reason",
|
|
23333
|
-
value: (_disconnectionData$
|
|
23414
|
+
value: ((_disconnectionData$re5 = disconnectionData.reason) === null || _disconnectionData$re5 === void 0 ? void 0 : _disconnectionData$re5.value) || (typeof disconnectionData.reason === "string" ? disconnectionData.reason : ""),
|
|
23334
23415
|
onChange: e => filedChange({
|
|
23335
23416
|
code: "reason",
|
|
23336
23417
|
value: e.target.value
|
|
@@ -23351,7 +23432,8 @@ const WSRestorationForm = _ref => {
|
|
|
23351
23432
|
onSubmit: () => onSubmit(disconnectionData),
|
|
23352
23433
|
style: {
|
|
23353
23434
|
margin: "10px 10px 0px 0px"
|
|
23354
|
-
}
|
|
23435
|
+
},
|
|
23436
|
+
disabled: !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl8 = applicationData.applicationData) !== null && _applicationData$appl8 !== void 0 && _applicationData$appl8.connectionNo) || isSearching
|
|
23355
23437
|
})));
|
|
23356
23438
|
};
|
|
23357
23439
|
|
|
@@ -23404,7 +23486,7 @@ function WSDisconnectionDocumentsForm(_ref) {
|
|
|
23404
23486
|
config: config,
|
|
23405
23487
|
onSelect: handleSubmit
|
|
23406
23488
|
}, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => {
|
|
23407
|
-
return /*#__PURE__*/React__default.createElement(SelectDocument$
|
|
23489
|
+
return /*#__PURE__*/React__default.createElement(SelectDocument$1, {
|
|
23408
23490
|
key: index,
|
|
23409
23491
|
document: document,
|
|
23410
23492
|
t: t,
|
|
@@ -23434,7 +23516,7 @@ function WSDisconnectionDocumentsForm(_ref) {
|
|
|
23434
23516
|
onClose: () => setError(null)
|
|
23435
23517
|
})));
|
|
23436
23518
|
}
|
|
23437
|
-
function SelectDocument$
|
|
23519
|
+
function SelectDocument$1(_ref2) {
|
|
23438
23520
|
var _doc$dropdownData, _selectedDocument$cod2, _selectedDocument$cod3, _selectedDocument$cod4, _selectedDocument$cod5, _selectedDocument$cod6, _selectedDocument$cod7, _selectedDocument$cod8, _selectedDocument$cod9, _selectedDocument$cod0, _selectedDocument$cod1, _selectedDocument$cod10, _selectedDocument$cod11, _selectedDocument$cod12, _selectedDocument$cod13, _selectedDocument$cod14, _selectedDocument$cod15;
|
|
23439
23521
|
let {
|
|
23440
23522
|
t,
|
|
@@ -23678,7 +23760,7 @@ const BannerPicker = props => {
|
|
|
23678
23760
|
});
|
|
23679
23761
|
};
|
|
23680
23762
|
const WSDisconnectAcknowledgement = () => {
|
|
23681
|
-
var _disconnectionData$
|
|
23763
|
+
var _disconnectionData$Di3;
|
|
23682
23764
|
const {
|
|
23683
23765
|
t
|
|
23684
23766
|
} = reactI18next.useTranslation();
|
|
@@ -23689,15 +23771,14 @@ const WSDisconnectAcknowledgement = () => {
|
|
|
23689
23771
|
PDFdata.then(res => Digit.Utils.pdf.generatev1(res));
|
|
23690
23772
|
};
|
|
23691
23773
|
const getPaymentUrl = () => {
|
|
23692
|
-
var _disconnectionData$Di, _disconnectionData$Di2, _disconnectionData$
|
|
23774
|
+
var _disconnectionData$Di, _disconnectionData$Di2, _disconnectionData$pr, _disconnectionData$pr2;
|
|
23693
23775
|
const appNo = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di === void 0 ? void 0 : _disconnectionData$Di.applicationNo;
|
|
23694
|
-
const connNo = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di2 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di2 === void 0 ? void 0 : _disconnectionData$Di2.connectionNo;
|
|
23695
23776
|
const isWater = appNo === null || appNo === void 0 ? void 0 : appNo.includes("WS");
|
|
23696
23777
|
const businessService = isWater ? "WS.DISCONNECTION" : "SW.DISCONNECTION";
|
|
23697
|
-
const
|
|
23698
|
-
const tenantId = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$
|
|
23778
|
+
const formattedApplicationNo = appNo ? appNo.split("/").join("+") : "";
|
|
23779
|
+
const tenantId = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di2 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di2 === void 0 ? void 0 : _disconnectionData$Di2.tenantId;
|
|
23699
23780
|
const ownerName = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$pr = disconnectionData.property) === null || _disconnectionData$pr === void 0 ? void 0 : (_disconnectionData$pr2 = _disconnectionData$pr.owners) === null || _disconnectionData$pr2 === void 0 ? void 0 : _disconnectionData$pr2.map(o => o.name).join(",");
|
|
23700
|
-
return `/digit-ui/citizen/payment/my-bills/${businessService}/${
|
|
23781
|
+
return `/digit-ui/citizen/payment/my-bills/${businessService}/${formattedApplicationNo}?workflow=WNS&tenantId=${tenantId}&ConsumerName=${ownerName}&isDisoconnectFlow=true&consumerCode=${appNo}`;
|
|
23701
23782
|
};
|
|
23702
23783
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
23703
23784
|
style: {
|
|
@@ -23706,7 +23787,7 @@ const WSDisconnectAcknowledgement = () => {
|
|
|
23706
23787
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, null, /*#__PURE__*/React__default.createElement(BannerPicker, {
|
|
23707
23788
|
isSuccess: true,
|
|
23708
23789
|
message: t("WS_APPLICATION_COMPLETED_SUCCESSFULLY_LABEL"),
|
|
23709
|
-
applicationNumber: disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$
|
|
23790
|
+
applicationNumber: disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di3 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di3 === void 0 ? void 0 : _disconnectionData$Di3.applicationNo
|
|
23710
23791
|
}), " ", /*#__PURE__*/React__default.createElement("successSvg", null)), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardText, null, t('WS_DISCONNECTION_APPLICATION_SUCC_MSG')), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
23711
23792
|
label: t("WS_DOWNLOAD_ACK_FORM"),
|
|
23712
23793
|
onSubmit: handleDownloadPdf
|
|
@@ -24777,7 +24858,7 @@ const WSDjbEmployee = _ref => {
|
|
|
24777
24858
|
borderBottom: "1px solid #e0e0e0"
|
|
24778
24859
|
}
|
|
24779
24860
|
}, t("ABG_COMMON_TABLE_COL_ACTION")))), /*#__PURE__*/React__default.createElement("tbody", null, formData.dueVerification.map((dueItem, index) => {
|
|
24780
|
-
var _formData$serviceName, _formData$application, _dueItem$kno;
|
|
24861
|
+
var _formData$serviceName, _formData$application, _dueItem$kno, _formData$serviceName2, _formData$application2;
|
|
24781
24862
|
return /*#__PURE__*/React__default.createElement("tr", {
|
|
24782
24863
|
key: `due-${index}`,
|
|
24783
24864
|
style: {
|
|
@@ -24815,8 +24896,8 @@ const WSDjbEmployee = _ref => {
|
|
|
24815
24896
|
className: "link"
|
|
24816
24897
|
}, /*#__PURE__*/React__default.createElement(reactRouterDom.Link, {
|
|
24817
24898
|
to: {
|
|
24818
|
-
pathname: `/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("/", "+")}`,
|
|
24819
|
-
search: `?workflow=WNS&tenantId=${tenantId}&ConsumerName=${dueItem === null || dueItem === void 0 ? void 0 : dueItem.fullName}&consumerCode=${dueItem === null || dueItem === void 0 ? void 0 : dueItem.kno}`,
|
|
24899
|
+
pathname: userType === "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}`,
|
|
24900
|
+
search: userType === "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`,
|
|
24820
24901
|
state: {
|
|
24821
24902
|
fromApplicationDetails: true
|
|
24822
24903
|
}
|
|
@@ -25500,7 +25581,7 @@ const SearchFormFieldsComponents = _ref => {
|
|
|
25500
25581
|
};
|
|
25501
25582
|
|
|
25502
25583
|
const FilterFormFieldsComponent = _ref => {
|
|
25503
|
-
var _statuses$filter, _statuses$filter2, _statuses$filter3, _statuses$filter4, _statuses$filter5, _statuses$filter6, _statuses$filter7;
|
|
25584
|
+
var _statuses$filter, _statuses$filter2, _statuses$filter3, _statuses$filter4, _statuses$filter5, _statuses$filter6, _statuses$filter7, _statuses$filter8, _statuses$filter9;
|
|
25504
25585
|
let {
|
|
25505
25586
|
statuses,
|
|
25506
25587
|
isInboxLoading,
|
|
@@ -25529,16 +25610,20 @@ const FilterFormFieldsComponent = _ref => {
|
|
|
25529
25610
|
totalModifyWSCount = 0,
|
|
25530
25611
|
totalDisconnectionWSCount = 0,
|
|
25531
25612
|
totalMutationWSCount = 0,
|
|
25613
|
+
totalReconnectionWSCount = 0,
|
|
25532
25614
|
totalnewSWCOunt = 0,
|
|
25533
25615
|
totalModifySWCount = 0,
|
|
25534
|
-
totalDisconnectionSWCount = 0
|
|
25616
|
+
totalDisconnectionSWCount = 0,
|
|
25617
|
+
totalReconnectionSWCount = 0;
|
|
25535
25618
|
const totalnewWS = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter = statuses.filter(e => e.businessservice === "NewWS1")) === null || _statuses$filter === void 0 ? void 0 : _statuses$filter.forEach(data => totalnewWSCount = totalnewWSCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25536
25619
|
const totalModifyWS = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter2 = statuses.filter(e => e.businessservice === "ModifyWSConnection")) === null || _statuses$filter2 === void 0 ? void 0 : _statuses$filter2.forEach(data => totalModifyWSCount = totalModifyWSCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25537
25620
|
const totalDisconnectionWS = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter3 = statuses.filter(e => e.businessservice === "DisconnectWSConnection")) === null || _statuses$filter3 === void 0 ? void 0 : _statuses$filter3.forEach(data => totalDisconnectionWSCount = totalDisconnectionWSCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25538
25621
|
const totalMutationWS = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter4 = statuses.filter(e => e.businessservice === "mutationWSConnection")) === null || _statuses$filter4 === void 0 ? void 0 : _statuses$filter4.forEach(data => totalMutationWSCount = totalMutationWSCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25539
|
-
const
|
|
25540
|
-
const
|
|
25541
|
-
const
|
|
25622
|
+
const totalReconnectionWS = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter5 = statuses.filter(e => e.businessservice === "WSReconnection")) === null || _statuses$filter5 === void 0 ? void 0 : _statuses$filter5.forEach(data => totalReconnectionWSCount = totalReconnectionWSCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25623
|
+
const totalnewSW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter6 = statuses.filter(e => e.businessservice === "NewSW1")) === null || _statuses$filter6 === void 0 ? void 0 : _statuses$filter6.forEach(data => totalnewSWCOunt = totalnewSWCOunt + (data === null || data === void 0 ? void 0 : data.count));
|
|
25624
|
+
const totalModifySW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter7 = statuses.filter(e => e.businessservice === "ModifySWConnection")) === null || _statuses$filter7 === void 0 ? void 0 : _statuses$filter7.forEach(data => totalModifySWCount = totalModifySWCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25625
|
+
const totalDisconnectionSW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter8 = statuses.filter(e => e.businessservice === "DisconnectSWConnection")) === null || _statuses$filter8 === void 0 ? void 0 : _statuses$filter8.forEach(data => totalDisconnectionSWCount = totalDisconnectionSWCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25626
|
+
const totalReconnectionSW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter9 = statuses.filter(e => e.businessservice === "SWReconnection")) === null || _statuses$filter9 === void 0 ? void 0 : _statuses$filter9.forEach(data => totalReconnectionSWCount = totalReconnectionSWCount + (data === null || data === void 0 ? void 0 : data.count));
|
|
25542
25627
|
const applicationTypeStatuses = checkPathName ? [{
|
|
25543
25628
|
code: "NewWS1",
|
|
25544
25629
|
name: `${t("CS_COMMON_INBOX_NEWWS1")} (${totalnewWSCount})`
|
|
@@ -25551,6 +25636,9 @@ const FilterFormFieldsComponent = _ref => {
|
|
|
25551
25636
|
}, {
|
|
25552
25637
|
code: "mutationWSConnection",
|
|
25553
25638
|
name: `${t("CS_COMMON_INBOX_MUTATIONWSCONNECTION") || t("WS_MUTATION_CONNECTION") || "Water Mutation"} (${totalMutationWSCount})`
|
|
25639
|
+
}, {
|
|
25640
|
+
code: "WSReconnection",
|
|
25641
|
+
name: `${t("CS_COMMON_INBOX_WSRECONNECTION") || t("WS_RECONNECTION") || "Water Reconnection"} (${totalReconnectionWSCount})`
|
|
25554
25642
|
}] : [{
|
|
25555
25643
|
code: "NewSW1",
|
|
25556
25644
|
name: `${t("CS_COMMON_INBOX_NEWSW1")} (${totalnewSWCOunt})`
|
|
@@ -25560,6 +25648,9 @@ const FilterFormFieldsComponent = _ref => {
|
|
|
25560
25648
|
}, {
|
|
25561
25649
|
code: "DisconnectSWConnection",
|
|
25562
25650
|
name: `${t("CS_COMMON_INBOX_DISCONNECTIONSW")} (${totalDisconnectionSWCount})`
|
|
25651
|
+
}, {
|
|
25652
|
+
code: "SWReconnection",
|
|
25653
|
+
name: `${t("CS_COMMON_INBOX_SWRECONNECTION") || t("SW_RECONNECTION") || "Sewerage Reconnection"} (${totalReconnectionSWCount})`
|
|
25563
25654
|
}];
|
|
25564
25655
|
const selectrole = (listOfSelections, props) => {
|
|
25565
25656
|
const res = listOfSelections.map(propsData => {
|
|
@@ -25646,11 +25737,11 @@ const FilterFormFieldsComponent = _ref => {
|
|
|
25646
25737
|
props.onChange(value);
|
|
25647
25738
|
}
|
|
25648
25739
|
const renderStatusCheckBoxes = React.useMemo(() => {
|
|
25649
|
-
var _statuses$
|
|
25650
|
-
return statuses === null || statuses === void 0 ? void 0 : (_statuses$
|
|
25740
|
+
var _statuses$filter0;
|
|
25741
|
+
return statuses === null || statuses === void 0 ? void 0 : (_statuses$filter0 = statuses.filter(e => {
|
|
25651
25742
|
const value = selectedApplicationType;
|
|
25652
25743
|
return value.includes(e.businessservice);
|
|
25653
|
-
})) === null || _statuses$
|
|
25744
|
+
})) === null || _statuses$filter0 === void 0 ? void 0 : _statuses$filter0.map((status, index) => {
|
|
25654
25745
|
var _props$value6;
|
|
25655
25746
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.CheckBox, {
|
|
25656
25747
|
key: index + 1,
|
|
@@ -25901,7 +25992,7 @@ const WSInbox = _ref => {
|
|
|
25901
25992
|
consumerNo: ""
|
|
25902
25993
|
};
|
|
25903
25994
|
const filterFormDefaultValues = {
|
|
25904
|
-
businessService: checkPathName ? ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection"] : ["NewSW1", "ModifySWConnection", "DisconnectSWConnection"],
|
|
25995
|
+
businessService: checkPathName ? ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection", "WSReconnection"] : ["NewSW1", "ModifySWConnection", "DisconnectSWConnection", "SWReconnection"],
|
|
25905
25996
|
moduleName: checkPathName ? "ws-services" : "sw-services",
|
|
25906
25997
|
locality: [],
|
|
25907
25998
|
assignee: "ASSIGNED_TO_ALL",
|
|
@@ -26338,8 +26429,8 @@ const SearchFields = _ref => {
|
|
|
26338
26429
|
});
|
|
26339
26430
|
let businessServices = [];
|
|
26340
26431
|
let selectedService = "";
|
|
26341
|
-
businessServices = ["NewWS1", "NewSW1", "ModifyWSConnection", "ModifySWConnection", "DisconnectWSConnection", "DisconnectSWConnection"];
|
|
26342
|
-
if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "NEW_WATER_CONNECTION") selectedService = "NewWS1";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "NEW_SEWERAGE_CONNECTION") selectedService = "NewSW1";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "MODIFY_WATER_CONNECTION") selectedService = "ModifyWSConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "MODIFY_SEWERAGE_CONNECTION") selectedService = "ModifySWConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "DISCONNECT_WATER_CONNECTION") selectedService = "DisconnectWSConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "DISCONNECT_SEWERAGE_CONNECTION") selectedService = "DisconnectSWConnection";
|
|
26432
|
+
businessServices = ["NewWS1", "NewSW1", "ModifyWSConnection", "ModifySWConnection", "DisconnectWSConnection", "DisconnectSWConnection", "WSReconnection", "SWReconnection"];
|
|
26433
|
+
if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "NEW_WATER_CONNECTION") selectedService = "NewWS1";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "NEW_SEWERAGE_CONNECTION") selectedService = "NewSW1";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "MODIFY_WATER_CONNECTION") selectedService = "ModifyWSConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "MODIFY_SEWERAGE_CONNECTION") selectedService = "ModifySWConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "DISCONNECT_WATER_CONNECTION") selectedService = "DisconnectWSConnection";else if (applicationType && (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "DISCONNECT_SEWERAGE_CONNECTION") selectedService = "DisconnectSWConnection";else if (applicationType && ((applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "RECONNECT_WATER_CONNECTION" || (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "WATER_RECONNECTION")) selectedService = "WSReconnection";else if (applicationType && ((applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "RECONNECT_SEWERAGE_CONNECTION" || (applicationType === null || applicationType === void 0 ? void 0 : applicationType.code) === "SEWERAGE_RECONNECTION")) selectedService = "SWReconnection";
|
|
26343
26434
|
const {
|
|
26344
26435
|
data: statusData,
|
|
26345
26436
|
isLoading
|
|
@@ -28248,7 +28339,7 @@ const WSCard = () => {
|
|
|
28248
28339
|
sessionStorage.removeItem("IsDetailsExists");
|
|
28249
28340
|
sessionStorage.removeItem("Digit.WS_DISCONNECTION");
|
|
28250
28341
|
const filterFormDefaultValues = {
|
|
28251
|
-
businessService: ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection"],
|
|
28342
|
+
businessService: ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection", "WSReconnection"],
|
|
28252
28343
|
moduleName: "ws-services",
|
|
28253
28344
|
locality: [],
|
|
28254
28345
|
applicationStatus: [],
|
|
@@ -28326,6 +28417,10 @@ const WSCard = () => {
|
|
|
28326
28417
|
label: t("WS_DISCONNECTION"),
|
|
28327
28418
|
link: `/digit-ui/employee/ws/new-disconnection`,
|
|
28328
28419
|
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
28420
|
+
}, {
|
|
28421
|
+
label: t("WS_RECONNECTION"),
|
|
28422
|
+
link: `/digit-ui/employee/ws/new-restoration`,
|
|
28423
|
+
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK", "SW_CEMP", "SW_APPROVER", "SW_FIELD_INSPECTOR", "SW_DOC_VERIFIER", "SW_CLERK"]
|
|
28329
28424
|
}].filter(link => link.roles ? checkForEmployee(link.roles) : true)
|
|
28330
28425
|
};
|
|
28331
28426
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
|
|
@@ -29915,13 +30010,6 @@ const WSCreate = () => {
|
|
|
29915
30010
|
const newConfig$1 = [{
|
|
29916
30011
|
head: "NEW_DISCONNECTION",
|
|
29917
30012
|
body: [{
|
|
29918
|
-
route: "docsrequired",
|
|
29919
|
-
component: "WSDisconnectionDocsRequired",
|
|
29920
|
-
key: "data",
|
|
29921
|
-
type: "component",
|
|
29922
|
-
withoutLabel: true,
|
|
29923
|
-
nextStep: "k-number"
|
|
29924
|
-
}, {
|
|
29925
30013
|
route: "k-number",
|
|
29926
30014
|
component: "WSDisconnectionKNumber",
|
|
29927
30015
|
key: "WSDisconnectionKNumber",
|
|
@@ -29941,16 +30029,7 @@ const newConfig$1 = [{
|
|
|
29941
30029
|
key: "WSDisconnectionForm",
|
|
29942
30030
|
type: "component",
|
|
29943
30031
|
withoutLabel: true,
|
|
29944
|
-
nextStep: "
|
|
29945
|
-
}, {
|
|
29946
|
-
route: "documents-upload",
|
|
29947
|
-
component: "WSDisconnectionDocumentsForm",
|
|
29948
|
-
key: "WSDisconnectionDocumentsForm",
|
|
29949
|
-
type: "component",
|
|
29950
|
-
isMandatory: true,
|
|
29951
|
-
withoutLabel: true,
|
|
29952
|
-
nextStep: "check",
|
|
29953
|
-
hideInEmployee: true
|
|
30032
|
+
nextStep: "check"
|
|
29954
30033
|
}, {
|
|
29955
30034
|
route: "check",
|
|
29956
30035
|
component: "WSDisconnectionCheckPage",
|
|
@@ -29986,25 +30065,6 @@ const newConfig$1 = [{
|
|
|
29986
30065
|
isDisonnectionEdit: true,
|
|
29987
30066
|
withoutLabel: true
|
|
29988
30067
|
}]
|
|
29989
|
-
}, {
|
|
29990
|
-
head: "WS_COMMON_PLUMBER_DETAILS",
|
|
29991
|
-
isDisonnectionEditByConfig: true,
|
|
29992
|
-
body: [{
|
|
29993
|
-
type: "component",
|
|
29994
|
-
key: "plumberDetails",
|
|
29995
|
-
component: "WSActivationPlumberDetails",
|
|
29996
|
-
withoutLabel: true
|
|
29997
|
-
}]
|
|
29998
|
-
}, {
|
|
29999
|
-
head: "WS_COMMON_DOCS",
|
|
30000
|
-
isDisonnectionEdit: true,
|
|
30001
|
-
isDisonnectionEditByConfig: true,
|
|
30002
|
-
body: [{
|
|
30003
|
-
type: "component",
|
|
30004
|
-
key: "DocumentsRequired",
|
|
30005
|
-
component: "WSDocumentsEmployee",
|
|
30006
|
-
withoutLabel: true
|
|
30007
|
-
}]
|
|
30008
30068
|
}]
|
|
30009
30069
|
}, {
|
|
30010
30070
|
head: "RE_SUBMIT_DISCONNECTION_APPLICATION",
|
|
@@ -30014,16 +30074,7 @@ const newConfig$1 = [{
|
|
|
30014
30074
|
key: "WSDisconnectionForm",
|
|
30015
30075
|
type: "component",
|
|
30016
30076
|
withoutLabel: true,
|
|
30017
|
-
nextStep: "
|
|
30018
|
-
}, {
|
|
30019
|
-
route: "documents-upload",
|
|
30020
|
-
component: "WSDisconnectionDocumentsForm",
|
|
30021
|
-
key: "WSDisconnectionDocumentsForm",
|
|
30022
|
-
type: "component",
|
|
30023
|
-
isMandatory: true,
|
|
30024
|
-
withoutLabel: true,
|
|
30025
|
-
nextStep: "resubmit-check",
|
|
30026
|
-
hideInEmployee: true
|
|
30077
|
+
nextStep: "check"
|
|
30027
30078
|
}, {
|
|
30028
30079
|
route: "check",
|
|
30029
30080
|
component: "WSReSubmitDisconnectionCheckPage",
|
|
@@ -30068,7 +30119,7 @@ const WSDisconnection = () => {
|
|
|
30068
30119
|
(_newConfig$filter = newConfig.filter(e => e.head === "NEW_DISCONNECTION")) === null || _newConfig$filter === void 0 ? void 0 : _newConfig$filter.forEach(obj => {
|
|
30069
30120
|
config = config.concat(obj.body.filter(a => !a.hideInCitizen));
|
|
30070
30121
|
});
|
|
30071
|
-
config.indexRoute = "
|
|
30122
|
+
config.indexRoute = "k-number";
|
|
30072
30123
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
30073
30124
|
const {
|
|
30074
30125
|
component,
|
|
@@ -32424,7 +32475,7 @@ const Rebate_menu = [{
|
|
|
32424
32475
|
value: "Others"
|
|
32425
32476
|
}];
|
|
32426
32477
|
const WSFeeEstimation = _ref => {
|
|
32427
|
-
var _wsAdditionalDetails$, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
32478
|
+
var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
|
|
32428
32479
|
let {
|
|
32429
32480
|
wsAdditionalDetails,
|
|
32430
32481
|
workflowDetails
|
|
@@ -32440,15 +32491,21 @@ const WSFeeEstimation = _ref => {
|
|
|
32440
32491
|
const [showToast, setShowToast] = React.useState(null);
|
|
32441
32492
|
const [billDetails, setBillDetails] = React.useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
|
|
32442
32493
|
const [values, setValues] = React.useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []);
|
|
32494
|
+
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
|
+
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 displayedTotalAmount = 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
|
+
const displayedIsPaid = isDisconnectionExecuted ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.status) === "PAID" : isPaid;
|
|
32443
32500
|
const stateCode = Digit.ULBService.getStateId();
|
|
32444
32501
|
const {
|
|
32445
32502
|
isMdmsLoading,
|
|
32446
32503
|
data: mdmsRes
|
|
32447
32504
|
} = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
|
|
32448
32505
|
React.useEffect(() => {
|
|
32449
|
-
var _wsAdditionalDetails$
|
|
32506
|
+
var _wsAdditionalDetails$4, _wsAdditionalDetails$5, _sessionFormData$bill;
|
|
32450
32507
|
const data = {
|
|
32451
|
-
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32508
|
+
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$4 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : (_wsAdditionalDetails$5 = _wsAdditionalDetails$4.appDetails) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : _wsAdditionalDetails$5.additionalDetails)
|
|
32452
32509
|
};
|
|
32453
32510
|
if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
|
|
32454
32511
|
var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
|
|
@@ -32502,8 +32559,8 @@ const WSFeeEstimation = _ref => {
|
|
|
32502
32559
|
const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
|
|
32503
32560
|
const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
|
|
32504
32561
|
if (adhocAmount || rebateAmount) {
|
|
32505
|
-
var _wsAdditionalDetails$
|
|
32506
|
-
const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32562
|
+
var _wsAdditionalDetails$6, _wsAdditionalDetails$7;
|
|
32563
|
+
const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$6 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : (_wsAdditionalDetails$7 = _wsAdditionalDetails$6.data) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : _wsAdditionalDetails$7.totalAmount;
|
|
32507
32564
|
if (rebateAmount > totalAmount) {
|
|
32508
32565
|
setShowToast({
|
|
32509
32566
|
isError: false,
|
|
@@ -32512,16 +32569,16 @@ const WSFeeEstimation = _ref => {
|
|
|
32512
32569
|
message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
|
|
32513
32570
|
});
|
|
32514
32571
|
} else {
|
|
32515
|
-
var _wsAdditionalDetails$
|
|
32516
|
-
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32517
|
-
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32572
|
+
var _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _wsAdditionalDetails$19;
|
|
32573
|
+
const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$10 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$10 === void 0 ? void 0 : (_wsAdditionalDetails$11 = _wsAdditionalDetails$10.appDetails) === null || _wsAdditionalDetails$11 === void 0 ? void 0 : _wsAdditionalDetails$11.applicationNo;
|
|
32574
|
+
const tenantId = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$12 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$12 === void 0 ? void 0 : (_wsAdditionalDetails$13 = _wsAdditionalDetails$12.appDetails) === null || _wsAdditionalDetails$13 === void 0 ? void 0 : _wsAdditionalDetails$13.tenantId;
|
|
32518
32575
|
const appAdditionalDetails = {
|
|
32519
|
-
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32576
|
+
...(wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$14 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$14 === void 0 ? void 0 : (_wsAdditionalDetails$15 = _wsAdditionalDetails$14.appDetails) === null || _wsAdditionalDetails$15 === void 0 ? void 0 : _wsAdditionalDetails$15.additionalDetails),
|
|
32520
32577
|
...fields
|
|
32521
32578
|
};
|
|
32522
32579
|
wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
|
|
32523
32580
|
const data = {
|
|
32524
|
-
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32581
|
+
CalculationCriteria: (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$16 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$16 === void 0 ? void 0 : (_wsAdditionalDetails$17 = _wsAdditionalDetails$16.appDetails) === null || _wsAdditionalDetails$17 === void 0 ? void 0 : _wsAdditionalDetails$17.service) == "WATER" ? [{
|
|
32525
32582
|
applicationNo: applicationNo,
|
|
32526
32583
|
tenantId: tenantId,
|
|
32527
32584
|
waterConnection: wsAdditionalDetails.additionalDetails.appDetails
|
|
@@ -32532,7 +32589,7 @@ const WSFeeEstimation = _ref => {
|
|
|
32532
32589
|
}],
|
|
32533
32590
|
isconnectionCalculation: false
|
|
32534
32591
|
};
|
|
32535
|
-
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$
|
|
32592
|
+
let businessService = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$18 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$18 === void 0 ? void 0 : (_wsAdditionalDetails$19 = _wsAdditionalDetails$18.appDetails) === null || _wsAdditionalDetails$19 === void 0 ? void 0 : _wsAdditionalDetails$19.service) == "WATER" ? "WS" : "SW";
|
|
32536
32593
|
Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
|
|
32537
32594
|
var _result$Calculation, _result$Calculation$, _result$Calculation$$, _result$Calculation3, _result$Calculation3$, _result$Calculation4, _result$Calculation4$, _result$Calculation5, _result$Calculation5$, _result$Calculation6, _result$Calculation6$, _result$Calculation7, _result$Calculation7$, _result$Calculation8;
|
|
32538
32595
|
if ((result === null || result === void 0 ? void 0 : (_result$Calculation = result.Calculation) === null || _result$Calculation === void 0 ? void 0 : (_result$Calculation$ = _result$Calculation[0]) === null || _result$Calculation$ === void 0 ? void 0 : (_result$Calculation$$ = _result$Calculation$.taxHeadEstimates) === null || _result$Calculation$$ === void 0 ? void 0 : _result$Calculation$$.length) > 0) {
|
|
@@ -32610,7 +32667,7 @@ const WSFeeEstimation = _ref => {
|
|
|
32610
32667
|
maxWidth: "100%",
|
|
32611
32668
|
minWidth: "280px"
|
|
32612
32669
|
}
|
|
32613
|
-
}, values && /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement("div", null,
|
|
32670
|
+
}, values && /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement("div", null, displayedValues === null || displayedValues === void 0 ? void 0 : displayedValues.map((value, index) => {
|
|
32614
32671
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
32615
32672
|
className: "border-none",
|
|
32616
32673
|
key: `${value.title}`,
|
|
@@ -32627,7 +32684,7 @@ const WSFeeEstimation = _ref => {
|
|
|
32627
32684
|
className: "border-none",
|
|
32628
32685
|
key: `WS_COMMON_TOTAL_AMT`,
|
|
32629
32686
|
label: `${t(`WS_COMMON_TOTAL_AMT`)}`,
|
|
32630
|
-
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9",
|
|
32687
|
+
text: /*#__PURE__*/React__default.createElement("span", null, "\u20B9", displayedTotalAmount ? Number(displayedTotalAmount).toFixed(2) : "0.00"),
|
|
32631
32688
|
textStyle: {
|
|
32632
32689
|
fontSize: "24px",
|
|
32633
32690
|
fontWeight: "700"
|
|
@@ -32636,7 +32693,7 @@ const WSFeeEstimation = _ref => {
|
|
|
32636
32693
|
className: "border-none",
|
|
32637
32694
|
key: `CS_INBOX_STATUS_FILTER`,
|
|
32638
32695
|
label: `${t(`CS_INBOX_STATUS_FILTER`)}`,
|
|
32639
|
-
text:
|
|
32696
|
+
text: displayedIsPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
|
|
32640
32697
|
textStyle: !isPaid ? {
|
|
32641
32698
|
color: "#D83A2F"
|
|
32642
32699
|
} : {
|
|
@@ -33370,6 +33427,7 @@ const WSApplicationDetails = () => {
|
|
|
33370
33427
|
}
|
|
33371
33428
|
}) || false;
|
|
33372
33429
|
const applicationStatus = (data === null || data === void 0 ? void 0 : (_data$WaterConnection15 = data.WaterConnection) === null || _data$WaterConnection15 === void 0 ? void 0 : (_data$WaterConnection16 = _data$WaterConnection15[0]) === null || _data$WaterConnection16 === void 0 ? void 0 : _data$WaterConnection16.applicationStatus) || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect15 = data.SewerageConnections) === null || _data$SewerageConnect15 === void 0 ? void 0 : (_data$SewerageConnect16 = _data$SewerageConnect15[0]) === null || _data$SewerageConnect16 === void 0 ? void 0 : _data$SewerageConnect16.applicationStatus);
|
|
33430
|
+
const isDisconnectionExecuted = applicationStatus === "DISCONNECTION_EXECUTED";
|
|
33373
33431
|
const isPaid = applicationStatus && applicationStatus !== "INITIATED" && applicationStatus !== "PENDING_APPROVAL_FOR_MUTATION" && applicationStatus !== "PENDING_FOR_PAYMENT" && applicationStatus !== "PENDING_FOR_FINAL_PAYMENT" && applicationStatus !== "PENDING_FOR_ADDITIONAL_PAYMENT" ? true : false;
|
|
33374
33432
|
const {
|
|
33375
33433
|
isLoading: isAppDetailsLoading,
|
|
@@ -33906,7 +33964,7 @@ const WSApplicationDetails = () => {
|
|
|
33906
33964
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
33907
33965
|
label: t("WS_EMPLOYEE_DESIGNATION"),
|
|
33908
33966
|
text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
|
|
33909
|
-
}), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
33967
|
+
}), !isDisconnectionExecuted && (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
33910
33968
|
label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
|
|
33911
33969
|
text: /*#__PURE__*/React__default.createElement("span", {
|
|
33912
33970
|
style: {
|
|
@@ -34026,7 +34084,7 @@ const WSApplicationDetails = () => {
|
|
|
34026
34084
|
fontWeight: "bold"
|
|
34027
34085
|
}
|
|
34028
34086
|
}, t("BILL_ALREADY_PAID"))));
|
|
34029
|
-
}))))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
34087
|
+
}))))), !isDisconnectionExecuted && /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
34030
34088
|
styles: {
|
|
34031
34089
|
fontSize: "28px"
|
|
34032
34090
|
}
|
|
@@ -34078,7 +34136,7 @@ const WSApplicationDetails = () => {
|
|
|
34078
34136
|
marginBottom: "20px"
|
|
34079
34137
|
}
|
|
34080
34138
|
}) : null)));
|
|
34081
|
-
})), (data === null || data === void 0 ? void 0 : (_data$WaterConnection120 = data.WaterConnection) === null || _data$WaterConnection120 === void 0 ? void 0 : (_data$WaterConnection121 = _data$WaterConnection120[0]) === null || _data$WaterConnection121 === void 0 ? void 0 : _data$WaterConnection121.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection122 = data.WaterConnection) === null || _data$WaterConnection122 === void 0 ? void 0 : (_data$WaterConnection123 = _data$WaterConnection122[0]) === null || _data$WaterConnection123 === void 0 ? void 0 : _data$WaterConnection123.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection124 = data.WaterConnection) === null || _data$WaterConnection124 === void 0 ? void 0 : (_data$WaterConnection125 = _data$WaterConnection124[0]) === null || _data$WaterConnection125 === void 0 ? void 0 : _data$WaterConnection125.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect115 = data.SewerageConnections) === null || _data$SewerageConnect115 === void 0 ? void 0 : (_data$SewerageConnect116 = _data$SewerageConnect115[0]) === null || _data$SewerageConnect116 === void 0 ? void 0 : _data$SewerageConnect116.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect117 = data.SewerageConnections) === null || _data$SewerageConnect117 === void 0 ? void 0 : (_data$SewerageConnect118 = _data$SewerageConnect117[0]) === null || _data$SewerageConnect118 === void 0 ? void 0 : _data$SewerageConnect118.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect119 = data.SewerageConnections) === null || _data$SewerageConnect119 === void 0 ? void 0 : (_data$SewerageConnect120 = _data$SewerageConnect119[0]) === null || _data$SewerageConnect120 === void 0 ? void 0 : _data$SewerageConnect120.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" ? /*#__PURE__*/React__default.createElement("div", {
|
|
34139
|
+
}))), (data === null || data === void 0 ? void 0 : (_data$WaterConnection120 = data.WaterConnection) === null || _data$WaterConnection120 === void 0 ? void 0 : (_data$WaterConnection121 = _data$WaterConnection120[0]) === null || _data$WaterConnection121 === void 0 ? void 0 : _data$WaterConnection121.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection122 = data.WaterConnection) === null || _data$WaterConnection122 === void 0 ? void 0 : (_data$WaterConnection123 = _data$WaterConnection122[0]) === null || _data$WaterConnection123 === void 0 ? void 0 : _data$WaterConnection123.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$WaterConnection124 = data.WaterConnection) === null || _data$WaterConnection124 === void 0 ? void 0 : (_data$WaterConnection125 = _data$WaterConnection124[0]) === null || _data$WaterConnection125 === void 0 ? void 0 : _data$WaterConnection125.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect115 = data.SewerageConnections) === null || _data$SewerageConnect115 === void 0 ? void 0 : (_data$SewerageConnect116 = _data$SewerageConnect115[0]) === null || _data$SewerageConnect116 === void 0 ? void 0 : _data$SewerageConnect116.applicationStatus) === "PENDING_FOR_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect117 = data.SewerageConnections) === null || _data$SewerageConnect117 === void 0 ? void 0 : (_data$SewerageConnect118 = _data$SewerageConnect117[0]) === null || _data$SewerageConnect118 === void 0 ? void 0 : _data$SewerageConnect118.applicationStatus) === "PENDING_FOR_FINAL_PAYMENT" || (data === null || data === void 0 ? void 0 : (_data$SewerageConnect119 = data.SewerageConnections) === null || _data$SewerageConnect119 === void 0 ? void 0 : (_data$SewerageConnect120 = _data$SewerageConnect119[0]) === null || _data$SewerageConnect120 === void 0 ? void 0 : _data$SewerageConnect120.applicationStatus) === "PENDING_FOR_ADDITIONAL_PAYMENT" ? /*#__PURE__*/React__default.createElement("div", {
|
|
34082
34140
|
style: {
|
|
34083
34141
|
marginTop: "10px"
|
|
34084
34142
|
}
|
|
@@ -34533,7 +34591,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
|
|
|
34533
34591
|
};
|
|
34534
34592
|
|
|
34535
34593
|
const ConnectionDetails$5 = () => {
|
|
34536
|
-
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state41, _state42, _state43, _state44, _state44$connectionHo, _state44$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect48, _data$SewerageConnect49, _data$SewerageConnect50, _data$SewerageConnect51, _state45, _state46, _state49,
|
|
34594
|
+
var _Digit$SessionStorage, _user$info, _data$SewerageConnect, _data$SewerageConnect2, _data$WaterConnection, _data$WaterConnection2, _Object$keys, _connectionData$Water, _connectionData$Water2, _connectionData$Sewer, _connectionData$Sewer2, _data$WaterConnection3, _data$WaterConnection4, _data$SewerageConnect3, _data$SewerageConnect4, _data$WaterConnection5, _data$WaterConnection6, _data$SewerageConnect5, _data$SewerageConnect6, _data$WaterConnection7, _data$WaterConnection8, _data$WaterConnection9, _data$WaterConnection0, _data$SewerageConnect7, _data$SewerageConnect8, _data$SewerageConnect9, _data$SewerageConnect0, _state, _state$applicationNo, _state2, _state3, _state4, _state4$applicationTy, _state5, _state6, _state7, _state8, _state8$applicationTy, _state9, _state0, _state1, _state10, _state10$applicationT, _state11, _state12, _state13, _state14, _state15, _state15$applicationT, _state16, _state16$waterSource, _state16$waterSource$, _state17, _state18, _state18$waterSource, _state18$waterSource$, _state19, _state20, _state21, _state22, _state22$additionalDe, _state23, _state23$applicationT, _state24, _state24$additionalDe, _state24$additionalDe2, _state25, _state25$additionalDe, _state25$additionalDe2, _state26, _state26$additionalDe, _state27, _state27$additionalDe, _state28, _state28$additionalDe, _state28$additionalDe2, _state29, _state29$additionalDe, _state30, _state31, _state32, _state33, _state33$property, _state33$property$own, _PTData$Properties2, _PTData$Properties2$, _PTData$Properties3, _PTData$Properties3$, _PTData$Properties3$$, _PTData$Properties3$$2, _PTData$Properties4, _PTData$Properties4$, _user$info2, _user$info2$userName, _user$info3, _user$info4, _state34, _state34$additionalDe, _state34$additionalDe2, _state35, _state35$additionalDe, _state35$additionalDe2, _state36, _state36$additionalDe, _state37, _state37$additionalDe, _state38, _state38$additionalDe, _state39, _state39$additionalDe, _state40, _state40$additionalDe, _state41, _state42, _state43, _state44, _state44$connectionHo, _state44$connectionHo2, _data$WaterConnection16, _data$WaterConnection17, _data$WaterConnection18, _data$WaterConnection19, _data$SewerageConnect12, _data$SewerageConnect13, _data$SewerageConnect14, _data$SewerageConnect15, _data$WaterConnection20, _data$WaterConnection21, _data$WaterConnection22, _data$WaterConnection23, _data$SewerageConnect16, _data$SewerageConnect17, _data$SewerageConnect18, _data$SewerageConnect19, _data$WaterConnection24, _data$WaterConnection25, _data$WaterConnection26, _data$WaterConnection27, _data$SewerageConnect20, _data$SewerageConnect21, _data$SewerageConnect22, _data$SewerageConnect23, _data$WaterConnection28, _data$WaterConnection29, _data$WaterConnection30, _data$WaterConnection31, _data$SewerageConnect24, _data$SewerageConnect25, _data$SewerageConnect26, _data$SewerageConnect27, _data$WaterConnection32, _data$WaterConnection33, _data$WaterConnection34, _data$WaterConnection35, _data$SewerageConnect28, _data$SewerageConnect29, _data$SewerageConnect30, _data$SewerageConnect31, _data$WaterConnection36, _data$WaterConnection37, _data$WaterConnection38, _data$WaterConnection39, _data$SewerageConnect32, _data$SewerageConnect33, _data$SewerageConnect34, _data$SewerageConnect35, _data$WaterConnection40, _data$WaterConnection41, _data$WaterConnection42, _data$WaterConnection43, _data$SewerageConnect36, _data$SewerageConnect37, _data$SewerageConnect38, _data$SewerageConnect39, _data$WaterConnection44, _data$WaterConnection45, _data$WaterConnection46, _data$WaterConnection47, _data$SewerageConnect40, _data$SewerageConnect41, _data$SewerageConnect42, _data$SewerageConnect43, _data$WaterConnection48, _data$WaterConnection49, _data$WaterConnection50, _data$WaterConnection51, _data$SewerageConnect44, _data$SewerageConnect45, _data$SewerageConnect46, _data$SewerageConnect47, _data$WaterConnection52, _data$WaterConnection53, _data$WaterConnection54, _data$WaterConnection55, _data$SewerageConnect48, _data$SewerageConnect49, _data$SewerageConnect50, _data$SewerageConnect51, _state45, _state46, _state49, _state49$status, _state50, _state50$applicationS, _state51, _paymentDetails$data17, _paymentDetails$data18;
|
|
34537
34595
|
const {
|
|
34538
34596
|
t
|
|
34539
34597
|
} = reactI18next.useTranslation();
|
|
@@ -34765,7 +34823,7 @@ const ConnectionDetails$5 = () => {
|
|
|
34765
34823
|
var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
|
|
34766
34824
|
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) {
|
|
34767
34825
|
console.log("Payment", paymentDetails);
|
|
34768
|
-
let pathname = `/digit-ui/citizen/ws/restoration-application`;
|
|
34826
|
+
let pathname = `/digit-ui/citizen/ws/restore-application/restoration-application`;
|
|
34769
34827
|
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
34770
34828
|
...state,
|
|
34771
34829
|
serviceType: isSW ? "SEWERAGE" : "WATER"
|
|
@@ -35218,7 +35276,7 @@ const ConnectionDetails$5 = () => {
|
|
|
35218
35276
|
marginBottom: "20px"
|
|
35219
35277
|
}
|
|
35220
35278
|
}) : null)));
|
|
35221
|
-
})), ((
|
|
35279
|
+
})), ((_state49 = state) === null || _state49 === void 0 ? void 0 : (_state49$status = _state49.status) === null || _state49$status === void 0 ? void 0 : _state49$status.toLowerCase()) === "inactive" || ((_state50 = state) === null || _state50 === void 0 ? void 0 : (_state50$applicationS = _state50.applicationStatus) === null || _state50$applicationS === void 0 ? void 0 : _state50$applicationS.toLowerCase()) === "inactive" || ((_state51 = state) === null || _state51 === void 0 ? void 0 : _state51.applicationStatus) === "DISCONNECTION_EXECUTED" || isDisconnectionDone ? /*#__PURE__*/React__default.createElement("div", {
|
|
35222
35280
|
style: {
|
|
35223
35281
|
display: "flex",
|
|
35224
35282
|
justifyContent: "flex-end",
|
|
@@ -35226,9 +35284,9 @@ const ConnectionDetails$5 = () => {
|
|
|
35226
35284
|
width: "100%"
|
|
35227
35285
|
}
|
|
35228
35286
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
35229
|
-
label: t("
|
|
35230
|
-
onSubmit:
|
|
35231
|
-
})) :
|
|
35287
|
+
label: t("WS_RECONNECTION_BUTTON"),
|
|
35288
|
+
onSubmit: onActionSelectRestoration
|
|
35289
|
+
})) : /*#__PURE__*/React__default.createElement("div", {
|
|
35232
35290
|
style: {
|
|
35233
35291
|
display: "flex",
|
|
35234
35292
|
justifyContent: "flex-end",
|
|
@@ -35236,8 +35294,8 @@ const ConnectionDetails$5 = () => {
|
|
|
35236
35294
|
width: "100%"
|
|
35237
35295
|
}
|
|
35238
35296
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
35239
|
-
label: t("
|
|
35240
|
-
onSubmit:
|
|
35297
|
+
label: t("WS_DISCONNECTION_BUTTON"),
|
|
35298
|
+
onSubmit: onActionSelect
|
|
35241
35299
|
})), showModal ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
35242
35300
|
open: showModal,
|
|
35243
35301
|
headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
|
|
@@ -35251,8 +35309,8 @@ const ConnectionDetails$5 = () => {
|
|
|
35251
35309
|
actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
|
|
35252
35310
|
hideSubmit: true,
|
|
35253
35311
|
actionSingleSubmit: () => {
|
|
35254
|
-
var
|
|
35255
|
-
history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((
|
|
35312
|
+
var _state52, _state53;
|
|
35313
|
+
history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.connectionNo)}/${tenantId}?consumerCode=${(_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
|
|
35256
35314
|
setshowModal(false);
|
|
35257
35315
|
},
|
|
35258
35316
|
popupStyles: mobileView ? {
|
|
@@ -37665,7 +37723,6 @@ const CheckPage$1 = () => {
|
|
|
37665
37723
|
const history = reactRouterDom.useHistory();
|
|
37666
37724
|
const match = reactRouterDom.useRouteMatch();
|
|
37667
37725
|
const value = Digit.SessionStorage.get("WS_DISCONNECTION");
|
|
37668
|
-
const [documents, setDocuments] = React.useState(value.WSDisconnectionForm.documents || []);
|
|
37669
37726
|
let routeLink = `/digit-ui/citizen/ws/disconnect-application`;
|
|
37670
37727
|
if (window.location.href.includes("/edit-application")) routeLink = `/digit-ui/citizen/ws/edit-disconnect-application`;
|
|
37671
37728
|
function routeTo(jumpTo) {
|
|
@@ -37705,13 +37762,12 @@ const CheckPage$1 = () => {
|
|
|
37705
37762
|
};
|
|
37706
37763
|
const onSubmit = function (data) {
|
|
37707
37764
|
try {
|
|
37765
|
+
var _value$applicationDat;
|
|
37708
37766
|
return Promise.resolve(createPayloadOfWSDisconnection(data, {
|
|
37709
|
-
applicationData: value
|
|
37710
|
-
}, value.serviceType)).then(function (payload) {
|
|
37767
|
+
applicationData: (value === null || value === void 0 ? void 0 : value.applicationData) || value
|
|
37768
|
+
}, (value === null || value === void 0 ? void 0 : value.serviceType) || (value === null || value === void 0 ? void 0 : (_value$applicationDat = value.applicationData) === null || _value$applicationDat === void 0 ? void 0 : _value$applicationDat.serviceType))).then(function (payload) {
|
|
37711
37769
|
const _temp4 = function (_payload$WaterConnect) {
|
|
37712
37770
|
if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
|
|
37713
|
-
var _payload$WaterConnect2;
|
|
37714
|
-
(_payload$WaterConnect2 = payload.WaterConnection) !== null && _payload$WaterConnect2 !== void 0 && _payload$WaterConnect2.isDisconnectionTemporary ? payload.WaterConnection["endDate"] = convertDateToEpoch(value.WSDisconnectionForm.endDate) || "" : "";
|
|
37715
37771
|
const _temp = function () {
|
|
37716
37772
|
if (waterMutation) {
|
|
37717
37773
|
setIsEnableLoader(true);
|
|
@@ -37767,7 +37823,6 @@ const CheckPage$1 = () => {
|
|
|
37767
37823
|
} else {
|
|
37768
37824
|
const _temp3 = function (_payload$SewerageConn) {
|
|
37769
37825
|
if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
|
|
37770
|
-
payload.SewerageConnection.isDisconnectionTemporary ? payload.SewerageConnection["endDate"] = convertDateToEpoch(value.WSDisconnectionForm.endDate) || "" : "";
|
|
37771
37826
|
const _temp2 = function () {
|
|
37772
37827
|
if (sewerageMutation) {
|
|
37773
37828
|
setIsEnableLoader(true);
|
|
@@ -37880,48 +37935,6 @@ const CheckPage$1 = () => {
|
|
|
37880
37935
|
className: "border-none",
|
|
37881
37936
|
label: t("WS_DISCONNECTION_REASON"),
|
|
37882
37937
|
text: t(value.WSDisconnectionForm.reason.value.i18nKey)
|
|
37883
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
37884
|
-
styles: {
|
|
37885
|
-
fontSize: "28px"
|
|
37886
|
-
}
|
|
37887
|
-
}, t("WS_COMMON_DOCUMENT_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
37888
|
-
label: /*#__PURE__*/React__default.createElement(digitUiReactComponents.EditIcon, {
|
|
37889
|
-
style: {
|
|
37890
|
-
marginTop: "-20px",
|
|
37891
|
-
float: "right",
|
|
37892
|
-
position: "relative",
|
|
37893
|
-
bottom: "32px"
|
|
37894
|
-
}
|
|
37895
|
-
}),
|
|
37896
|
-
style: {
|
|
37897
|
-
width: "100px",
|
|
37898
|
-
display: "inline"
|
|
37899
|
-
},
|
|
37900
|
-
onClick: () => routeTo(`${routeLink}/documents-upload`)
|
|
37901
|
-
}), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
|
|
37902
|
-
var _doc$documentType;
|
|
37903
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
37904
|
-
key: `doc-${index}`
|
|
37905
|
-
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, null, t(doc === null || doc === void 0 ? void 0 : (_doc$documentType = doc.documentType) === null || _doc$documentType === void 0 ? void 0 : _doc$documentType.split('.').slice(0, 2).join('_'))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
37906
|
-
className: "border-none",
|
|
37907
|
-
label: t("WS_DOCUMENT_NUMBER"),
|
|
37908
|
-
text: (doc === null || doc === void 0 ? void 0 : doc.documentNumber) || (doc === null || doc === void 0 ? void 0 : doc.documentUid) || t("NA")
|
|
37909
|
-
}), /*#__PURE__*/React__default.createElement(WSDocument, {
|
|
37910
|
-
value: {
|
|
37911
|
-
documents: value.WSDisconnectionForm
|
|
37912
|
-
},
|
|
37913
|
-
Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
|
|
37914
|
-
index: index,
|
|
37915
|
-
showFileName: true
|
|
37916
|
-
}), (documents === null || documents === void 0 ? void 0 : documents.length) != index + 1 ? /*#__PURE__*/React__default.createElement("hr", {
|
|
37917
|
-
style: {
|
|
37918
|
-
color: "#cccccc",
|
|
37919
|
-
backgroundColor: "#cccccc",
|
|
37920
|
-
height: "2px",
|
|
37921
|
-
marginTop: "20px",
|
|
37922
|
-
marginBottom: "20px"
|
|
37923
|
-
}
|
|
37924
|
-
}) : null)));
|
|
37925
37938
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
37926
37939
|
style: {
|
|
37927
37940
|
display: "flex",
|
|
@@ -38125,188 +38138,8 @@ const CheckPage$2 = () => {
|
|
|
38125
38138
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
38126
38139
|
className: "employee-form-section-wrapper"
|
|
38127
38140
|
}, /*#__PURE__*/React__default.createElement(DisconnectTimeline, {
|
|
38128
|
-
currentStep: 3,
|
|
38129
|
-
flow: "RESTORATION"
|
|
38130
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
38131
|
-
style: {
|
|
38132
|
-
width: "100%"
|
|
38133
|
-
}
|
|
38134
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
38135
|
-
styles: {
|
|
38136
|
-
fontSize: "32px"
|
|
38137
|
-
}
|
|
38138
|
-
}, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38139
|
-
style: {
|
|
38140
|
-
paddingRight: "16px"
|
|
38141
|
-
}
|
|
38142
|
-
}, /*#__PURE__*/React__default.createElement("div", {
|
|
38143
|
-
style: {
|
|
38144
|
-
display: "inline"
|
|
38145
|
-
}
|
|
38146
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardHeader, {
|
|
38147
|
-
styles: {
|
|
38148
|
-
fontSize: "28px"
|
|
38149
|
-
}
|
|
38150
|
-
}, t("WS_RESTORATION_APPLICATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
38151
|
-
label: /*#__PURE__*/React__default.createElement(digitUiReactComponents.EditIcon, {
|
|
38152
|
-
style: {
|
|
38153
|
-
marginTop: "-20px",
|
|
38154
|
-
float: "right",
|
|
38155
|
-
position: "relative",
|
|
38156
|
-
bottom: "32px"
|
|
38157
|
-
}
|
|
38158
|
-
}),
|
|
38159
|
-
style: {
|
|
38160
|
-
width: "100px",
|
|
38161
|
-
display: "inline"
|
|
38162
|
-
},
|
|
38163
|
-
onClick: () => routeTo(`${routeLink}/application-form`)
|
|
38164
|
-
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38165
|
-
className: "border-none",
|
|
38166
|
-
label: t("WS_RESTORATION_CONSUMER_NUMBER"),
|
|
38167
|
-
text: value.connectionNo
|
|
38168
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38169
|
-
className: "border-none",
|
|
38170
|
-
label: t("WS_RESTORATION_PROPOSED_DATE"),
|
|
38171
|
-
text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
|
|
38172
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38173
|
-
className: "border-none",
|
|
38174
|
-
label: t("WS_RESTORATION_REASON"),
|
|
38175
|
-
text: value.WSDisconnectionForm.reason.value
|
|
38176
|
-
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38177
|
-
style: {
|
|
38178
|
-
paddingRight: "16px"
|
|
38179
|
-
}
|
|
38180
|
-
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
38181
|
-
label: t("CS_COMMON_SUBMIT"),
|
|
38182
|
-
onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
|
|
38183
|
-
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
38184
|
-
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
38185
|
-
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
38186
|
-
onClose: () => setError(null)
|
|
38187
|
-
}))));
|
|
38188
|
-
};
|
|
38189
|
-
|
|
38190
|
-
const CheckPage$3 = () => {
|
|
38191
|
-
var _value$applicationDat;
|
|
38192
|
-
const {
|
|
38193
|
-
t
|
|
38194
|
-
} = reactI18next.useTranslation();
|
|
38195
|
-
const history = reactRouterDom.useHistory();
|
|
38196
|
-
const match = reactRouterDom.useRouteMatch();
|
|
38197
|
-
const value = Digit.SessionStorage.get("WS_DISCONNECTION");
|
|
38198
|
-
const [documents, setDocuments] = React.useState(value.WSDisconnectionForm.documents || []);
|
|
38199
|
-
let routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
|
|
38200
|
-
if (window.location.href.includes("/resubmit")) routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
|
|
38201
|
-
function routeTo(jumpTo) {
|
|
38202
|
-
location.href = jumpTo;
|
|
38203
|
-
}
|
|
38204
|
-
const [isEnableLoader, setIsEnableLoader] = React.useState(false);
|
|
38205
|
-
const {
|
|
38206
|
-
isLoading: updatingWaterApplicationLoading,
|
|
38207
|
-
isError: updateWaterApplicationError,
|
|
38208
|
-
data: updateWaterResponse,
|
|
38209
|
-
error: updateWaterError,
|
|
38210
|
-
mutate: waterUpdateMutation
|
|
38211
|
-
} = Digit.Hooks.ws.useWSApplicationActions("WATER");
|
|
38212
|
-
const {
|
|
38213
|
-
isLoading: updatingSewerageApplicationLoading,
|
|
38214
|
-
isError: updateSewerageApplicationError,
|
|
38215
|
-
data: updateSewerageResponse,
|
|
38216
|
-
error: updateSewerageError,
|
|
38217
|
-
mutate: sewerageUpdateMutation
|
|
38218
|
-
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
38219
|
-
const closeToastOfError = () => {
|
|
38220
|
-
setShowToast(null);
|
|
38221
|
-
};
|
|
38222
|
-
const onSubmit = function (data) {
|
|
38223
|
-
try {
|
|
38224
|
-
return Promise.resolve(createPayloadOfWSReSubmitDisconnection(data, value, value.serviceType)).then(function (payload) {
|
|
38225
|
-
const _temp4 = function (_payload$WaterConnect) {
|
|
38226
|
-
if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
|
|
38227
|
-
const _temp = function () {
|
|
38228
|
-
if (waterUpdateMutation) {
|
|
38229
|
-
setIsEnableLoader(true);
|
|
38230
|
-
return Promise.resolve(waterUpdateMutation(payload, {
|
|
38231
|
-
onError: (error, variables) => {
|
|
38232
|
-
var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
|
|
38233
|
-
setIsEnableLoader(false);
|
|
38234
|
-
setError({
|
|
38235
|
-
key: "error",
|
|
38236
|
-
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
|
|
38237
|
-
});
|
|
38238
|
-
setTimeout(closeToastOfError, 5000);
|
|
38239
|
-
},
|
|
38240
|
-
onSuccess: function (data, variables) {
|
|
38241
|
-
try {
|
|
38242
|
-
var _data$WaterConnection, _data$WaterConnection2, _data$WaterConnection3;
|
|
38243
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
38244
|
-
...(value === null || value === void 0 ? void 0 : value.applicationData),
|
|
38245
|
-
...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
|
|
38246
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0]
|
|
38247
|
-
});
|
|
38248
|
-
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : (_data$WaterConnection3 = _data$WaterConnection2[0]) === null || _data$WaterConnection3 === void 0 ? void 0 : _data$WaterConnection3.applicationNo}`);
|
|
38249
|
-
return Promise.resolve();
|
|
38250
|
-
} catch (e) {
|
|
38251
|
-
return Promise.reject(e);
|
|
38252
|
-
}
|
|
38253
|
-
}
|
|
38254
|
-
})).then(function () {});
|
|
38255
|
-
}
|
|
38256
|
-
}();
|
|
38257
|
-
if (_temp && _temp.then) return _temp.then(function () {});
|
|
38258
|
-
} else {
|
|
38259
|
-
const _temp3 = function (_payload$SewerageConn) {
|
|
38260
|
-
if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
|
|
38261
|
-
const _temp2 = function () {
|
|
38262
|
-
if (sewerageUpdateMutation) {
|
|
38263
|
-
setIsEnableLoader(true);
|
|
38264
|
-
return Promise.resolve(sewerageUpdateMutation(payload, {
|
|
38265
|
-
onError: (error, variables) => {
|
|
38266
|
-
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
38267
|
-
setIsEnableLoader(false);
|
|
38268
|
-
setError({
|
|
38269
|
-
key: "error",
|
|
38270
|
-
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
|
|
38271
|
-
});
|
|
38272
|
-
setTimeout(closeToastOfError, 5000);
|
|
38273
|
-
},
|
|
38274
|
-
onSuccess: function (data, variables) {
|
|
38275
|
-
try {
|
|
38276
|
-
var _data$SewerageConnect, _data$SewerageConnect2, _data$SewerageConnect3;
|
|
38277
|
-
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
38278
|
-
...(value === null || value === void 0 ? void 0 : value.applicationData),
|
|
38279
|
-
...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
|
|
38280
|
-
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0]
|
|
38281
|
-
});
|
|
38282
|
-
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : (_data$SewerageConnect3 = _data$SewerageConnect2[0]) === null || _data$SewerageConnect3 === void 0 ? void 0 : _data$SewerageConnect3.applicationNo}`);
|
|
38283
|
-
return Promise.resolve();
|
|
38284
|
-
} catch (e) {
|
|
38285
|
-
return Promise.reject(e);
|
|
38286
|
-
}
|
|
38287
|
-
}
|
|
38288
|
-
})).then(function () {});
|
|
38289
|
-
}
|
|
38290
|
-
}();
|
|
38291
|
-
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
38292
|
-
}
|
|
38293
|
-
}();
|
|
38294
|
-
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
38295
|
-
}
|
|
38296
|
-
}();
|
|
38297
|
-
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
38298
|
-
});
|
|
38299
|
-
} catch (e) {
|
|
38300
|
-
return Promise.reject(e);
|
|
38301
|
-
}
|
|
38302
|
-
};
|
|
38303
|
-
if (isEnableLoader) {
|
|
38304
|
-
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
38305
|
-
}
|
|
38306
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
38307
|
-
className: "employee-form-section-wrapper"
|
|
38308
|
-
}, /*#__PURE__*/React__default.createElement(DisconnectTimeline, {
|
|
38309
|
-
currentStep: 3
|
|
38141
|
+
currentStep: 3,
|
|
38142
|
+
flow: "RESTORATION"
|
|
38310
38143
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
38311
38144
|
style: {
|
|
38312
38145
|
width: "100%"
|
|
@@ -38327,7 +38160,7 @@ const CheckPage$3 = () => {
|
|
|
38327
38160
|
styles: {
|
|
38328
38161
|
fontSize: "28px"
|
|
38329
38162
|
}
|
|
38330
|
-
}, t("
|
|
38163
|
+
}, t("WS_RESTORATION_APPLICATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
38331
38164
|
label: /*#__PURE__*/React__default.createElement(digitUiReactComponents.EditIcon, {
|
|
38332
38165
|
style: {
|
|
38333
38166
|
marginTop: "-20px",
|
|
@@ -38343,24 +38176,161 @@ const CheckPage$3 = () => {
|
|
|
38343
38176
|
onClick: () => routeTo(`${routeLink}/application-form`)
|
|
38344
38177
|
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38345
38178
|
className: "border-none",
|
|
38346
|
-
label: t("
|
|
38347
|
-
text: value.connectionNo
|
|
38348
|
-
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38349
|
-
className: "border-none",
|
|
38350
|
-
label: t("WS_DISCONNECTION_TYPE"),
|
|
38351
|
-
text: t(value.WSDisconnectionForm.type.value.i18nKey)
|
|
38179
|
+
label: t("WS_RESTORATION_CONSUMER_NUMBER"),
|
|
38180
|
+
text: value.connectionNo
|
|
38352
38181
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38353
38182
|
className: "border-none",
|
|
38354
|
-
label: t("
|
|
38183
|
+
label: t("WS_RESTORATION_PROPOSED_DATE"),
|
|
38355
38184
|
text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
|
|
38356
38185
|
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38357
38186
|
className: "border-none",
|
|
38358
|
-
label: t("
|
|
38187
|
+
label: t("WS_RESTORATION_REASON"),
|
|
38359
38188
|
text: value.WSDisconnectionForm.reason.value
|
|
38360
38189
|
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38361
38190
|
style: {
|
|
38362
38191
|
paddingRight: "16px"
|
|
38363
38192
|
}
|
|
38193
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
38194
|
+
label: t("CS_COMMON_SUBMIT"),
|
|
38195
|
+
onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
|
|
38196
|
+
})), error && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
38197
|
+
error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
|
|
38198
|
+
label: t(error === null || error === void 0 ? void 0 : error.message),
|
|
38199
|
+
onClose: () => setError(null)
|
|
38200
|
+
}))));
|
|
38201
|
+
};
|
|
38202
|
+
|
|
38203
|
+
const CheckPage$3 = () => {
|
|
38204
|
+
var _value$applicationDat;
|
|
38205
|
+
const {
|
|
38206
|
+
t
|
|
38207
|
+
} = reactI18next.useTranslation();
|
|
38208
|
+
const history = reactRouterDom.useHistory();
|
|
38209
|
+
const match = reactRouterDom.useRouteMatch();
|
|
38210
|
+
const value = Digit.SessionStorage.get("WS_DISCONNECTION");
|
|
38211
|
+
let routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
|
|
38212
|
+
if (window.location.href.includes("/resubmit")) routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
|
|
38213
|
+
function routeTo(jumpTo) {
|
|
38214
|
+
location.href = jumpTo;
|
|
38215
|
+
}
|
|
38216
|
+
const [isEnableLoader, setIsEnableLoader] = React.useState(false);
|
|
38217
|
+
const {
|
|
38218
|
+
isLoading: updatingWaterApplicationLoading,
|
|
38219
|
+
isError: updateWaterApplicationError,
|
|
38220
|
+
data: updateWaterResponse,
|
|
38221
|
+
error: updateWaterError,
|
|
38222
|
+
mutate: waterUpdateMutation
|
|
38223
|
+
} = Digit.Hooks.ws.useWSApplicationActions("WATER");
|
|
38224
|
+
const {
|
|
38225
|
+
isLoading: updatingSewerageApplicationLoading,
|
|
38226
|
+
isError: updateSewerageApplicationError,
|
|
38227
|
+
data: updateSewerageResponse,
|
|
38228
|
+
error: updateSewerageError,
|
|
38229
|
+
mutate: sewerageUpdateMutation
|
|
38230
|
+
} = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
|
|
38231
|
+
const closeToastOfError = () => {
|
|
38232
|
+
setShowToast(null);
|
|
38233
|
+
};
|
|
38234
|
+
const onSubmit = function (data) {
|
|
38235
|
+
try {
|
|
38236
|
+
return Promise.resolve(createPayloadOfWSReSubmitDisconnection(data, value, value.serviceType)).then(function (payload) {
|
|
38237
|
+
const _temp4 = function (_payload$WaterConnect) {
|
|
38238
|
+
if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
|
|
38239
|
+
const _temp = function () {
|
|
38240
|
+
if (waterUpdateMutation) {
|
|
38241
|
+
setIsEnableLoader(true);
|
|
38242
|
+
return Promise.resolve(waterUpdateMutation(payload, {
|
|
38243
|
+
onError: (error, variables) => {
|
|
38244
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
|
|
38245
|
+
setIsEnableLoader(false);
|
|
38246
|
+
setError({
|
|
38247
|
+
key: "error",
|
|
38248
|
+
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
|
|
38249
|
+
});
|
|
38250
|
+
setTimeout(closeToastOfError, 5000);
|
|
38251
|
+
},
|
|
38252
|
+
onSuccess: function (data, variables) {
|
|
38253
|
+
try {
|
|
38254
|
+
var _data$WaterConnection, _data$WaterConnection2, _data$WaterConnection3;
|
|
38255
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
38256
|
+
...(value === null || value === void 0 ? void 0 : value.applicationData),
|
|
38257
|
+
...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
|
|
38258
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0]
|
|
38259
|
+
});
|
|
38260
|
+
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : (_data$WaterConnection3 = _data$WaterConnection2[0]) === null || _data$WaterConnection3 === void 0 ? void 0 : _data$WaterConnection3.applicationNo}`);
|
|
38261
|
+
return Promise.resolve();
|
|
38262
|
+
} catch (e) {
|
|
38263
|
+
return Promise.reject(e);
|
|
38264
|
+
}
|
|
38265
|
+
}
|
|
38266
|
+
})).then(function () {});
|
|
38267
|
+
}
|
|
38268
|
+
}();
|
|
38269
|
+
if (_temp && _temp.then) return _temp.then(function () {});
|
|
38270
|
+
} else {
|
|
38271
|
+
const _temp3 = function (_payload$SewerageConn) {
|
|
38272
|
+
if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
|
|
38273
|
+
const _temp2 = function () {
|
|
38274
|
+
if (sewerageUpdateMutation) {
|
|
38275
|
+
setIsEnableLoader(true);
|
|
38276
|
+
return Promise.resolve(sewerageUpdateMutation(payload, {
|
|
38277
|
+
onError: (error, variables) => {
|
|
38278
|
+
var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
|
|
38279
|
+
setIsEnableLoader(false);
|
|
38280
|
+
setError({
|
|
38281
|
+
key: "error",
|
|
38282
|
+
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
|
|
38283
|
+
});
|
|
38284
|
+
setTimeout(closeToastOfError, 5000);
|
|
38285
|
+
},
|
|
38286
|
+
onSuccess: function (data, variables) {
|
|
38287
|
+
try {
|
|
38288
|
+
var _data$SewerageConnect, _data$SewerageConnect2, _data$SewerageConnect3;
|
|
38289
|
+
Digit.SessionStorage.set("WS_DISCONNECTION", {
|
|
38290
|
+
...(value === null || value === void 0 ? void 0 : value.applicationData),
|
|
38291
|
+
...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
|
|
38292
|
+
DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0]
|
|
38293
|
+
});
|
|
38294
|
+
history.push(`/digit-ui/citizen/ws/disconnect-acknowledge?applicationNumber=${data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : (_data$SewerageConnect3 = _data$SewerageConnect2[0]) === null || _data$SewerageConnect3 === void 0 ? void 0 : _data$SewerageConnect3.applicationNo}`);
|
|
38295
|
+
return Promise.resolve();
|
|
38296
|
+
} catch (e) {
|
|
38297
|
+
return Promise.reject(e);
|
|
38298
|
+
}
|
|
38299
|
+
}
|
|
38300
|
+
})).then(function () {});
|
|
38301
|
+
}
|
|
38302
|
+
}();
|
|
38303
|
+
if (_temp2 && _temp2.then) return _temp2.then(function () {});
|
|
38304
|
+
}
|
|
38305
|
+
}();
|
|
38306
|
+
if (_temp3 && _temp3.then) return _temp3.then(function () {});
|
|
38307
|
+
}
|
|
38308
|
+
}();
|
|
38309
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
38310
|
+
});
|
|
38311
|
+
} catch (e) {
|
|
38312
|
+
return Promise.reject(e);
|
|
38313
|
+
}
|
|
38314
|
+
};
|
|
38315
|
+
if (isEnableLoader) {
|
|
38316
|
+
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
38317
|
+
}
|
|
38318
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
38319
|
+
className: "employee-form-section-wrapper"
|
|
38320
|
+
}, /*#__PURE__*/React__default.createElement(DisconnectTimeline, {
|
|
38321
|
+
currentStep: 3
|
|
38322
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
38323
|
+
style: {
|
|
38324
|
+
width: "100%"
|
|
38325
|
+
}
|
|
38326
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, {
|
|
38327
|
+
styles: {
|
|
38328
|
+
fontSize: "32px"
|
|
38329
|
+
}
|
|
38330
|
+
}, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38331
|
+
style: {
|
|
38332
|
+
paddingRight: "16px"
|
|
38333
|
+
}
|
|
38364
38334
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
38365
38335
|
style: {
|
|
38366
38336
|
display: "inline"
|
|
@@ -38369,7 +38339,7 @@ const CheckPage$3 = () => {
|
|
|
38369
38339
|
styles: {
|
|
38370
38340
|
fontSize: "28px"
|
|
38371
38341
|
}
|
|
38372
|
-
}, t("
|
|
38342
|
+
}, t("WS_DISCONNECTION_APPLICATION_DETAILS")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LinkButton, {
|
|
38373
38343
|
label: /*#__PURE__*/React__default.createElement(digitUiReactComponents.EditIcon, {
|
|
38374
38344
|
style: {
|
|
38375
38345
|
marginTop: "-20px",
|
|
@@ -38382,28 +38352,28 @@ const CheckPage$3 = () => {
|
|
|
38382
38352
|
width: "100px",
|
|
38383
38353
|
display: "inline"
|
|
38384
38354
|
},
|
|
38385
|
-
onClick: () => routeTo(`${routeLink}/
|
|
38386
|
-
})),
|
|
38387
|
-
|
|
38388
|
-
|
|
38389
|
-
|
|
38390
|
-
|
|
38391
|
-
|
|
38392
|
-
|
|
38393
|
-
|
|
38394
|
-
|
|
38395
|
-
|
|
38396
|
-
|
|
38397
|
-
|
|
38398
|
-
|
|
38399
|
-
|
|
38400
|
-
|
|
38401
|
-
|
|
38402
|
-
|
|
38403
|
-
|
|
38404
|
-
|
|
38405
|
-
}
|
|
38406
|
-
}
|
|
38355
|
+
onClick: () => routeTo(`${routeLink}/application-form`)
|
|
38356
|
+
})), /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38357
|
+
className: "border-none",
|
|
38358
|
+
label: t("WS_DISCONNECTION_CONSUMER_NUMBER"),
|
|
38359
|
+
text: value.connectionNo || (value === null || value === void 0 ? void 0 : (_value$applicationDat = value.applicationData) === null || _value$applicationDat === void 0 ? void 0 : _value$applicationDat.connectionNo)
|
|
38360
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38361
|
+
className: "border-none",
|
|
38362
|
+
label: t("WS_DISCONNECTION_TYPE"),
|
|
38363
|
+
text: t(value.WSDisconnectionForm.type.value.i18nKey)
|
|
38364
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38365
|
+
className: "border-none",
|
|
38366
|
+
label: t("WS_DISCONNECTION_PROPOSED_DATE"),
|
|
38367
|
+
text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
|
|
38368
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
|
|
38369
|
+
className: "border-none",
|
|
38370
|
+
label: t("WS_DISCONNECTION_REASON"),
|
|
38371
|
+
text: value.WSDisconnectionForm.reason.value
|
|
38372
|
+
}))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
38373
|
+
style: {
|
|
38374
|
+
paddingRight: "16px"
|
|
38375
|
+
}
|
|
38376
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
38407
38377
|
label: t("CS_COMMON_SUBMIT"),
|
|
38408
38378
|
onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
|
|
38409
38379
|
})))));
|
|
@@ -43296,8 +43266,10 @@ const WorkflowTimeline = _ref => {
|
|
|
43296
43266
|
if (!timeline || timeline.length === 0) {
|
|
43297
43267
|
return null;
|
|
43298
43268
|
}
|
|
43299
|
-
const getStatusClass = index => {
|
|
43300
|
-
|
|
43269
|
+
const getStatusClass = (index, checkpoint) => {
|
|
43270
|
+
var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
|
|
43271
|
+
const isTerminal = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) === "CONNECTION_ACTIVATED" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.status) === "ACTIVE" || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state4 = checkpoint.state) === null || _checkpoint$state4 === void 0 ? void 0 : _checkpoint$state4.isTerminateState);
|
|
43272
|
+
if (index === 0 && !isTerminal) return "current2";
|
|
43301
43273
|
return "completed2";
|
|
43302
43274
|
};
|
|
43303
43275
|
const convertEpochToDateTime = epoch => {
|
|
@@ -43330,8 +43302,8 @@ const WorkflowTimeline = _ref => {
|
|
|
43330
43302
|
}, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React__default.createElement("div", {
|
|
43331
43303
|
className: hideTimeline ? "hidden-content" : "timeline-container2"
|
|
43332
43304
|
}, timeline.map((checkpoint, index) => {
|
|
43333
|
-
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$
|
|
43334
|
-
const statusClass = getStatusClass(index);
|
|
43305
|
+
var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
|
|
43306
|
+
const statusClass = getStatusClass(index, checkpoint);
|
|
43335
43307
|
const showLine = index !== timeline.length - 1 && timeline.length > 1;
|
|
43336
43308
|
const epochTime = (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta = checkpoint.auditDetails) === null || _checkpoint$auditDeta === void 0 ? void 0 : _checkpoint$auditDeta.lastModifiedTime) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$auditDeta2 = checkpoint.auditDetails) === null || _checkpoint$auditDeta2 === void 0 ? void 0 : _checkpoint$auditDeta2.createdTime);
|
|
43337
43309
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -43349,13 +43321,13 @@ const WorkflowTimeline = _ref => {
|
|
|
43349
43321
|
className: "timeline-header2"
|
|
43350
43322
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
43351
43323
|
className: "timeline-title2"
|
|
43352
|
-
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$
|
|
43324
|
+
}, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state5 = checkpoint.state) === null || _checkpoint$state5 === void 0 ? void 0 : _checkpoint$state5.state}`)), /*#__PURE__*/React__default.createElement("span", {
|
|
43353
43325
|
className: "timeline-date2"
|
|
43354
43326
|
}, convertEpochToDateTime(epochTime))), /*#__PURE__*/React__default.createElement("div", {
|
|
43355
43327
|
className: "timeline-body2"
|
|
43356
43328
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
43357
43329
|
className: `timeline-status-tag2 status-${statusClass}`
|
|
43358
|
-
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$
|
|
43330
|
+
}, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state6 = checkpoint.state) === null || _checkpoint$state6 === void 0 ? void 0 : _checkpoint$state6.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state7 = checkpoint.state) === null || _checkpoint$state7 === void 0 ? void 0 : _checkpoint$state7.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React__default.createElement("div", {
|
|
43359
43331
|
className: "timeline-comment2"
|
|
43360
43332
|
}, checkpoint.comment)), (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$assigner = checkpoint.assigner) === null || _checkpoint$assigner === void 0 ? void 0 : _checkpoint$assigner.name) && /*#__PURE__*/React__default.createElement("div", {
|
|
43361
43333
|
className: "timeline-footer2"
|
|
@@ -46910,7 +46882,7 @@ const BPADocuments = _ref => {
|
|
|
46910
46882
|
if (applicationStatus === "DOC_VERIFICATION_INPROGRESS" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0) setCheckEnablingDocs(true);else setCheckEnablingDocs(false);
|
|
46911
46883
|
}, [applicationData, bpaActionsDetails]);
|
|
46912
46884
|
return /*#__PURE__*/React__default.createElement("div", null, bpaTaxDocuments === null || bpaTaxDocuments === void 0 ? void 0 : bpaTaxDocuments.map((document, index) => {
|
|
46913
|
-
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SelectDocument$
|
|
46885
|
+
return /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(SelectDocument$2, {
|
|
46914
46886
|
key: index,
|
|
46915
46887
|
index: index,
|
|
46916
46888
|
document: document,
|
|
@@ -46927,7 +46899,7 @@ const BPADocuments = _ref => {
|
|
|
46927
46899
|
}));
|
|
46928
46900
|
}));
|
|
46929
46901
|
};
|
|
46930
|
-
function SelectDocument$
|
|
46902
|
+
function SelectDocument$2(_ref2) {
|
|
46931
46903
|
var _doc$dropdownData, _doc$uploadedDocument;
|
|
46932
46904
|
let {
|
|
46933
46905
|
t,
|
|
@@ -47174,7 +47146,7 @@ function InspectionReport(_ref) {
|
|
|
47174
47146
|
})));
|
|
47175
47147
|
}
|
|
47176
47148
|
|
|
47177
|
-
function SelectDocument$
|
|
47149
|
+
function SelectDocument$3(_ref) {
|
|
47178
47150
|
let {
|
|
47179
47151
|
t,
|
|
47180
47152
|
document: doc,
|
|
@@ -47423,7 +47395,7 @@ const NOCDocuments = _ref2 => {
|
|
|
47423
47395
|
minWidth: "80px"
|
|
47424
47396
|
}
|
|
47425
47397
|
}), checkEnablingDocs && (nocTaxDocuments === null || nocTaxDocuments === void 0 ? void 0 : nocTaxDocuments.map((document, index) => {
|
|
47426
|
-
return /*#__PURE__*/React__default.createElement(SelectDocument$
|
|
47398
|
+
return /*#__PURE__*/React__default.createElement(SelectDocument$3, {
|
|
47427
47399
|
key: index,
|
|
47428
47400
|
document: document,
|
|
47429
47401
|
t: t,
|
|
@@ -49412,7 +49384,7 @@ const WSApprovalChecklist = _ref => {
|
|
|
49412
49384
|
};
|
|
49413
49385
|
|
|
49414
49386
|
function ApplicationDetailsContent(_ref) {
|
|
49415
|
-
var _applicationDetails$a, _applicationDetails$a2, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data29, _workflowDetails$data30;
|
|
49387
|
+
var _applicationDetails$a, _applicationData$appl, _applicationDetails$a2, _workflowDetails$data11, _workflowDetails$data12, _workflowDetails$data13, _workflowDetails$data14, _workflowDetails$data15, _workflowDetails$data16, _workflowDetails$data17, _workflowDetails$data18, _workflowDetails$data19, _workflowDetails$data20, _workflowDetails$data21, _workflowDetails$data29, _workflowDetails$data30;
|
|
49416
49388
|
let {
|
|
49417
49389
|
applicationDetails,
|
|
49418
49390
|
workflowDetails,
|
|
@@ -49683,6 +49655,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
49683
49655
|
var _detail$additionalDet;
|
|
49684
49656
|
return detail === null || detail === void 0 ? void 0 : (_detail$additionalDet = detail.additionalDetails) === null || _detail$additionalDet === void 0 ? void 0 : _detail$additionalDet.documents;
|
|
49685
49657
|
});
|
|
49658
|
+
const isDisconnectionExecuted = (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) === "DISCONNECTION_EXECUTED" && (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl = applicationData.applicationType) === null || _applicationData$appl === void 0 ? void 0 : _applicationData$appl.includes("DISCONNECT"));
|
|
49686
49659
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, {
|
|
49687
49660
|
className: "employeeCard-override"
|
|
49688
49661
|
}, isInfoLabel ? /*#__PURE__*/React__default.createElement(InfoDetails, {
|
|
@@ -49693,7 +49666,7 @@ function ApplicationDetailsContent(_ref) {
|
|
|
49693
49666
|
infoClickInfoLabel: getClickInfoDetails(),
|
|
49694
49667
|
infoClickInfoLabel1: getClickInfoDetails1()
|
|
49695
49668
|
}) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
|
|
49696
|
-
var _detail$title, _detail$values, _detail$additionalDet2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _detail$additionalDet3, _applicationDetails$a6, _applicationDetails$a7, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet1, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _detail$additionalDet20, _applicationData$
|
|
49669
|
+
var _detail$title, _detail$values, _detail$additionalDet2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _detail$additionalDet3, _applicationDetails$a6, _applicationDetails$a7, _detail$additionalDet4, _detail$additionalDet5, _detail$additionalDet6, _detail$additionalDet7, _detail$additionalDet8, _detail$additionalDet9, _detail$additionalDet0, _workflowDetails$data, _workflowDetails$data2, _detail$additionalDet1, _detail$additionalDet10, _detail$additionalDet11, _detail$additionalDet12, _detail$additionalDet13, _detail$additionalDet14, _detail$additionalDet15, _detail$additionalDet16, _detail$additionalDet17, _detail$additionalDet18, _detail$additionalDet19, _workflowDetails$data3, _workflowDetails$data4, _workflowDetails$data5, _workflowDetails$data6, _workflowDetails$data7, _workflowDetails$data8, _workflowDetails$data9, _workflowDetails$data0, _workflowDetails$data1, _workflowDetails$data10, _detail$additionalDet20, _applicationData$appl2, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
|
|
49697
49670
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, {
|
|
49698
49671
|
key: index
|
|
49699
49672
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -49919,12 +49892,12 @@ function ApplicationDetailsContent(_ref) {
|
|
|
49919
49892
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.subOccupancyTableDetails) && /*#__PURE__*/React__default.createElement(SubOccupancyTable, {
|
|
49920
49893
|
edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
|
|
49921
49894
|
applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
|
|
49922
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl) && /*#__PURE__*/React__default.createElement(DocumentsPreview, {
|
|
49895
|
+
}), !isDisconnectionExecuted && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl) && /*#__PURE__*/React__default.createElement(DocumentsPreview, {
|
|
49923
49896
|
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl
|
|
49924
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents) && index === documentsDetailIndex && /*#__PURE__*/React__default.createElement(PropertyDocuments, {
|
|
49897
|
+
}), !isDisconnectionExecuted && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet18 = detail.additionalDetails) === null || _detail$additionalDet18 === void 0 ? void 0 : _detail$additionalDet18.documents) && index === documentsDetailIndex && /*#__PURE__*/React__default.createElement(PropertyDocuments, {
|
|
49925
49898
|
documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents,
|
|
49926
49899
|
applicationStatus: (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data3 = workflowDetails.data) === null || _workflowDetails$data3 === void 0 ? void 0 : (_workflowDetails$data4 = _workflowDetails$data3.actionState) === null || _workflowDetails$data4 === void 0 ? void 0 : _workflowDetails$data4.state) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data5 = workflowDetails.data) === null || _workflowDetails$data5 === void 0 ? void 0 : (_workflowDetails$data6 = _workflowDetails$data5.processInstances) === null || _workflowDetails$data6 === void 0 ? void 0 : (_workflowDetails$data7 = _workflowDetails$data6[0]) === null || _workflowDetails$data7 === void 0 ? void 0 : (_workflowDetails$data8 = _workflowDetails$data7.state) === null || _workflowDetails$data8 === void 0 ? void 0 : _workflowDetails$data8.state) || (workflowDetails === null || workflowDetails === void 0 ? void 0 : (_workflowDetails$data9 = workflowDetails.data) === null || _workflowDetails$data9 === void 0 ? void 0 : (_workflowDetails$data0 = _workflowDetails$data9.ProcessInstances) === null || _workflowDetails$data0 === void 0 ? void 0 : (_workflowDetails$data1 = _workflowDetails$data0[0]) === null || _workflowDetails$data1 === void 0 ? void 0 : (_workflowDetails$data10 = _workflowDetails$data1.state) === null || _workflowDetails$data10 === void 0 ? void 0 : _workflowDetails$data10.state) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) || (applicationData === null || applicationData === void 0 ? void 0 : applicationData.status)
|
|
49927
|
-
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && !(applicationData !== null && applicationData !== void 0 && (_applicationData$
|
|
49900
|
+
}), !isDisconnectionExecuted && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet20 = detail.additionalDetails) === null || _detail$additionalDet20 === void 0 ? void 0 : _detail$additionalDet20.documents) && !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl2 = applicationData.applicationType) !== null && _applicationData$appl2 !== void 0 && _applicationData$appl2.includes("MUTATION")) && !(businessService !== null && businessService !== void 0 && businessService.includes("MUTATION")) && ["PENDING_FOR_FIELD_INSPECTION", "PENDING_APPROVAL_FOR_CONNECTION", "PENDING_FOR_CONNECTION_ACTIVATION", "PENDING_FOR_RECONNECTION", "PENDING_FOR_DUE_VERIFICATION", "PENDING_FOR_BILLING_CLERK_REVIEW", "PENDING_FOR_ASO_APPROVAL", "PENDING_FOR_ZRO_APPROVAL", "PENDING_FOR_AE_APPROVAL", "PENDING_FOR_FINAL_PAYMENT", "CONNECTION_ACTIVATED", "PENDING_FOR_CONNECTION_ACTIVATION", "PENDING_FOR_CITIZEN_ACTION"].includes(applicationData === null || applicationData === void 0 ? void 0 : applicationData.applicationStatus) && /*#__PURE__*/React__default.createElement(DueVerification, {
|
|
49928
49901
|
applicationData: applicationData
|
|
49929
49902
|
}), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React__default.createElement(PropertyEstimates, {
|
|
49930
49903
|
taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
|
|
@@ -50288,7 +50261,7 @@ function ApplicationDetailsWarningPopup(_ref) {
|
|
|
50288
50261
|
}
|
|
50289
50262
|
|
|
50290
50263
|
const ApplicationDetails = props => {
|
|
50291
|
-
var _workflowDetails$data;
|
|
50264
|
+
var _selectedAction$actio, _workflowDetails$data;
|
|
50292
50265
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
50293
50266
|
const state = Digit.ULBService.getStateId();
|
|
50294
50267
|
const {
|
|
@@ -50303,6 +50276,7 @@ const ApplicationDetails = props => {
|
|
|
50303
50276
|
const [showModal, setShowModal] = React.useState(false);
|
|
50304
50277
|
const [isEnableLoader, setIsEnableLoader] = React.useState(false);
|
|
50305
50278
|
const [isWarningPop, setWarningPopUp] = React.useState(false);
|
|
50279
|
+
const [showConfirmation, setShowConfirmation] = React.useState(false);
|
|
50306
50280
|
const [approvalChecklist, setApprovalChecklist] = React.useState({});
|
|
50307
50281
|
const {
|
|
50308
50282
|
applicationDetails,
|
|
@@ -50419,7 +50393,7 @@ const ApplicationDetails = props => {
|
|
|
50419
50393
|
const closeWarningPopup = () => {
|
|
50420
50394
|
setWarningPopUp(false);
|
|
50421
50395
|
};
|
|
50422
|
-
const
|
|
50396
|
+
const executeSubmitAction = function (data, nocData, isOBPS) {
|
|
50423
50397
|
if (nocData === void 0) {
|
|
50424
50398
|
nocData = false;
|
|
50425
50399
|
}
|
|
@@ -50549,6 +50523,33 @@ const ApplicationDetails = props => {
|
|
|
50549
50523
|
return Promise.reject(e);
|
|
50550
50524
|
}
|
|
50551
50525
|
};
|
|
50526
|
+
const submitAction = function (data, nocData, isOBPS) {
|
|
50527
|
+
if (nocData === void 0) {
|
|
50528
|
+
nocData = false;
|
|
50529
|
+
}
|
|
50530
|
+
if (isOBPS === void 0) {
|
|
50531
|
+
isOBPS = {};
|
|
50532
|
+
}
|
|
50533
|
+
try {
|
|
50534
|
+
if (moduleCode !== null && moduleCode !== void 0 && moduleCode.includes("WS")) {
|
|
50535
|
+
setShowConfirmation({
|
|
50536
|
+
data,
|
|
50537
|
+
nocData,
|
|
50538
|
+
isOBPS
|
|
50539
|
+
});
|
|
50540
|
+
return Promise.resolve();
|
|
50541
|
+
}
|
|
50542
|
+
return executeSubmitAction(data, nocData, isOBPS);
|
|
50543
|
+
} catch (e) {
|
|
50544
|
+
return Promise.reject(e);
|
|
50545
|
+
}
|
|
50546
|
+
};
|
|
50547
|
+
const actionName = (selectedAction === null || selectedAction === void 0 ? void 0 : (_selectedAction$actio = selectedAction.action) === null || _selectedAction$actio === void 0 ? void 0 : _selectedAction$actio.replace(/[ _-]+/g, " ").toLowerCase()) || "this action";
|
|
50548
|
+
const confirmSubmitAction = () => {
|
|
50549
|
+
const confirmationData = showConfirmation;
|
|
50550
|
+
setShowConfirmation(false);
|
|
50551
|
+
return executeSubmitAction(confirmationData.data, confirmationData.nocData, confirmationData.isOBPS);
|
|
50552
|
+
};
|
|
50552
50553
|
if (isLoading || isEnableLoader) {
|
|
50553
50554
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
|
|
50554
50555
|
}
|
|
@@ -50584,7 +50585,31 @@ const ApplicationDetails = props => {
|
|
|
50584
50585
|
showApprovalChecklist: showApprovalChecklist,
|
|
50585
50586
|
moduleCode: moduleCode,
|
|
50586
50587
|
cardFormWrapperClassName: "modal-form"
|
|
50587
|
-
}) : null,
|
|
50588
|
+
}) : null, showConfirmation ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Modal, {
|
|
50589
|
+
headerBarMain: /*#__PURE__*/React__default.createElement("h1", {
|
|
50590
|
+
className: "heading-m"
|
|
50591
|
+
}, "Confirmation"),
|
|
50592
|
+
headerBarEnd: /*#__PURE__*/React__default.createElement("div", {
|
|
50593
|
+
onClick: () => setShowConfirmation(false),
|
|
50594
|
+
style: {
|
|
50595
|
+
cursor: "pointer",
|
|
50596
|
+
fontSize: "16px",
|
|
50597
|
+
padding: "10px"
|
|
50598
|
+
}
|
|
50599
|
+
}, "\u2715"),
|
|
50600
|
+
actionCancelLabel: "Cancel",
|
|
50601
|
+
actionCancelOnSubmit: () => setShowConfirmation(false),
|
|
50602
|
+
actionSaveLabel: "Yes",
|
|
50603
|
+
actionSaveOnSubmit: confirmSubmitAction
|
|
50604
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
50605
|
+
style: {
|
|
50606
|
+
padding: "16px"
|
|
50607
|
+
}
|
|
50608
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
50609
|
+
style: {
|
|
50610
|
+
fontSize: "16px"
|
|
50611
|
+
}
|
|
50612
|
+
}, "Are you sure you want to ", actionName, " ?"))) : null, isWarningPop ? /*#__PURE__*/React__default.createElement(ApplicationDetailsWarningPopup, {
|
|
50588
50613
|
action: selectedAction,
|
|
50589
50614
|
workflowDetails: workflowDetails,
|
|
50590
50615
|
businessService: businessService,
|
|
@@ -51110,16 +51135,16 @@ const ApplicationDetails$1 = () => {
|
|
|
51110
51135
|
};
|
|
51111
51136
|
|
|
51112
51137
|
const GetConnectionDetails = () => {
|
|
51113
|
-
var _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a10, _applicationDetails$a11, _applicationDetails$a12, _mdmsCommonmastersDat, _applicationDetails$a14, _applicationDetails$
|
|
51138
|
+
var _applicationDetails$a, _applicationDetails$a2, _applicationDetails$a3, _applicationDetails$a4, _applicationDetails$a5, _applicationDetails$a6, _applicationDetails$a7, _applicationDetails$a8, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a10, _applicationDetails$a11, _applicationDetails$a12, _mdmsCommonmastersDat, _applicationDetails$a14, _applicationDetails$a19, _applicationDetails$a20, _applicationDetails$a21, _applicationDetails$a22, _applicationDetails$a23, _applicationDetails$f5, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$f6, _applicationDetails$f7;
|
|
51114
51139
|
const getBillSearch = function () {
|
|
51115
51140
|
try {
|
|
51116
51141
|
const _temp = function (_applicationDetails$f8) {
|
|
51117
51142
|
if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f8 = applicationDetails.fetchBillsData) === null || _applicationDetails$f8 === void 0 ? void 0 : _applicationDetails$f8.length) > 0) {
|
|
51118
|
-
var _applicationDetails$
|
|
51143
|
+
var _applicationDetails$a24;
|
|
51119
51144
|
const service = serviceType === "WATER" ? "WS" : "SW";
|
|
51120
51145
|
let wsSearchFilters = {
|
|
51121
51146
|
isConnectionSearch: true,
|
|
51122
|
-
connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
51147
|
+
connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a24 = applicationDetails.applicationData) === null || _applicationDetails$a24 === void 0 ? void 0 : _applicationDetails$a24.connectionNo
|
|
51123
51148
|
};
|
|
51124
51149
|
return Promise.resolve(Digit.WSService.search({
|
|
51125
51150
|
tenantId,
|
|
@@ -51132,8 +51157,8 @@ const GetConnectionDetails = () => {
|
|
|
51132
51157
|
bussinessService: service
|
|
51133
51158
|
};
|
|
51134
51159
|
if ((wsConnectionDetails === null || wsConnectionDetails === void 0 ? void 0 : (_wsConnectionDetails$5 = wsConnectionDetails.WaterConnection) === null || _wsConnectionDetails$5 === void 0 ? void 0 : _wsConnectionDetails$5.length) > 0 || (wsConnectionDetails === null || wsConnectionDetails === void 0 ? void 0 : (_wsConnectionDetails$6 = wsConnectionDetails.SewerageConnections) === null || _wsConnectionDetails$6 === void 0 ? void 0 : _wsConnectionDetails$6.length) > 0) {
|
|
51135
|
-
var _applicationDetails$
|
|
51136
|
-
downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
51160
|
+
var _applicationDetails$a25;
|
|
51161
|
+
downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo, filters);
|
|
51137
51162
|
}
|
|
51138
51163
|
});
|
|
51139
51164
|
}
|
|
@@ -51328,9 +51353,11 @@ const GetConnectionDetails = () => {
|
|
|
51328
51353
|
});
|
|
51329
51354
|
} else {
|
|
51330
51355
|
var _billData$2, _applicationDetails$f4;
|
|
51331
|
-
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") {
|
|
51356
|
+
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
|
+
var _applicationDetails$a18;
|
|
51332
51358
|
Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
|
|
51333
|
-
|
|
51359
|
+
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
|
+
history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
|
|
51334
51361
|
} else {
|
|
51335
51362
|
setshowModal(true);
|
|
51336
51363
|
}
|
|
@@ -51343,11 +51370,12 @@ const GetConnectionDetails = () => {
|
|
|
51343
51370
|
getBillAmendmentButton();
|
|
51344
51371
|
} else if (action === "DISCONNECTION_BUTTON") {
|
|
51345
51372
|
getDisconnectionButton();
|
|
51346
|
-
} else if (action === "RESTORATION_BUTTON") {
|
|
51373
|
+
} else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
|
|
51347
51374
|
getRestorationButton();
|
|
51348
51375
|
}
|
|
51349
51376
|
}
|
|
51350
|
-
const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$
|
|
51377
|
+
const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : _applicationDetails$a19.status) === "Active" ? true : false;
|
|
51378
|
+
const isDisconnectedOrInactive = !checkApplicationStatus || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a20 = applicationDetails.applicationData) === null || _applicationDetails$a20 === void 0 ? void 0 : (_applicationDetails$a21 = _applicationDetails$a20.status) === null || _applicationDetails$a21 === void 0 ? void 0 : _applicationDetails$a21.toLowerCase()) === "inactive" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a22 = applicationDetails.applicationData) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.applicationStatus) === "DISCONNECTION_EXECUTED" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.isDisconnectionDone) || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a23 = applicationDetails.applicationData) === null || _applicationDetails$a23 === void 0 ? void 0 : _applicationDetails$a23.isDisconnectionTemporary);
|
|
51351
51379
|
const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
|
|
51352
51380
|
const showActionRestoration = ["RESTORATION_BUTTON"];
|
|
51353
51381
|
let dowloadOptions = [];
|
|
@@ -51431,7 +51459,7 @@ const GetConnectionDetails = () => {
|
|
|
51431
51459
|
ref: actionMenuRef,
|
|
51432
51460
|
label: t("WF_TAKE_ACTION"),
|
|
51433
51461
|
onSubmit: () => setDisplayMenu(!displayMenu)
|
|
51434
|
-
})) :
|
|
51462
|
+
})) : isDisconnectedOrInactive ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.ActionBar, null, displayMenu ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.Menu, {
|
|
51435
51463
|
options: showActionRestoration,
|
|
51436
51464
|
localeKeyPrefix: "WS",
|
|
51437
51465
|
t: t,
|
|
@@ -54861,9 +54889,6 @@ const Step3_UploadDocuments = _ref => {
|
|
|
54861
54889
|
}, {
|
|
54862
54890
|
code: "VOTER_ID",
|
|
54863
54891
|
i18nKey: "Voter ID"
|
|
54864
|
-
}, {
|
|
54865
|
-
code: "PAN",
|
|
54866
|
-
i18nKey: "PAN Card"
|
|
54867
54892
|
}, {
|
|
54868
54893
|
code: "OTHER",
|
|
54869
54894
|
i18nKey: "Any other document configured by DJB"
|
|
@@ -55220,7 +55245,7 @@ const Step3_UploadDocuments = _ref => {
|
|
|
55220
55245
|
flex: 1
|
|
55221
55246
|
}
|
|
55222
55247
|
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
55223
|
-
type:
|
|
55248
|
+
type: "text",
|
|
55224
55249
|
value: documentNumber,
|
|
55225
55250
|
onChange: e => {
|
|
55226
55251
|
if (!isDocumentUidLocked) {
|
|
@@ -55244,6 +55269,7 @@ const Step3_UploadDocuments = _ref => {
|
|
|
55244
55269
|
disabled: isDocumentUidLocked,
|
|
55245
55270
|
style: {
|
|
55246
55271
|
marginBottom: "0",
|
|
55272
|
+
WebkitTextSecurity: showDocumentNumber ? "none" : "disc",
|
|
55247
55273
|
...(fieldErrors.documentNumber ? {
|
|
55248
55274
|
border: "1px solid #d32f2f"
|
|
55249
55275
|
} : {}),
|
|
@@ -56832,7 +56858,7 @@ const DisconnectionApplication = () => {
|
|
|
56832
56858
|
newConfig$1.filter(e => e.head === "NEW_DISCONNECTION").forEach(obj => {
|
|
56833
56859
|
config = config.concat(obj.body.filter(a => !a.hideInEmployee));
|
|
56834
56860
|
});
|
|
56835
|
-
config.indexRoute = "
|
|
56861
|
+
config.indexRoute = "k-number";
|
|
56836
56862
|
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
56837
56863
|
const {
|
|
56838
56864
|
component,
|
|
@@ -56860,56 +56886,24 @@ const DisconnectionApplication = () => {
|
|
|
56860
56886
|
})));
|
|
56861
56887
|
};
|
|
56862
56888
|
|
|
56863
|
-
const
|
|
56864
|
-
params && Object.keys(params).map(key => {
|
|
56865
|
-
path = path.replace(`:${key}`, params[key]);
|
|
56866
|
-
});
|
|
56867
|
-
return path;
|
|
56868
|
-
};
|
|
56869
|
-
const DisconnectionApplication$1 = () => {
|
|
56889
|
+
const RestorationApplication = () => {
|
|
56870
56890
|
const {
|
|
56871
56891
|
t
|
|
56872
56892
|
} = reactI18next.useTranslation();
|
|
56873
56893
|
const match = reactRouterDom.useRouteMatch();
|
|
56874
|
-
const
|
|
56875
|
-
|
|
56876
|
-
|
|
56877
|
-
|
|
56878
|
-
|
|
56879
|
-
|
|
56880
|
-
|
|
56881
|
-
|
|
56882
|
-
|
|
56883
|
-
|
|
56884
|
-
config
|
|
56885
|
-
|
|
56886
|
-
|
|
56887
|
-
}
|
|
56888
|
-
console.log("configconfig", config);
|
|
56889
|
-
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, config.map((routeObj, index) => {
|
|
56890
|
-
const {
|
|
56891
|
-
component,
|
|
56892
|
-
texts,
|
|
56893
|
-
inputs,
|
|
56894
|
-
key,
|
|
56895
|
-
isSkipEnabled
|
|
56896
|
-
} = routeObj;
|
|
56897
|
-
const Component = Digit.ComponentRegistryService.getComponent("WSRestorationForm");
|
|
56898
|
-
return /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
56899
|
-
path: `${getPath$6(match.path, match.params)}/new-restoration`,
|
|
56900
|
-
key: index
|
|
56901
|
-
}, /*#__PURE__*/React__default.createElement(Component, {
|
|
56902
|
-
config: {
|
|
56903
|
-
texts,
|
|
56904
|
-
inputs,
|
|
56905
|
-
key,
|
|
56906
|
-
isSkipEnabled
|
|
56907
|
-
},
|
|
56908
|
-
t: t,
|
|
56909
|
-
userType: "employee"
|
|
56910
|
-
}));
|
|
56911
|
-
}), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Redirect, {
|
|
56912
|
-
to: `${getPath$6(match.path, match.params)}/${config.indexRoute}`
|
|
56894
|
+
const Component = Digit.ComponentRegistryService.getComponent("WSRestorationForm");
|
|
56895
|
+
return /*#__PURE__*/React__default.createElement(reactRouterDom.Switch, null, /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
56896
|
+
path: `${match.path}/new-restoration`
|
|
56897
|
+
}, /*#__PURE__*/React__default.createElement(Component, {
|
|
56898
|
+
config: {},
|
|
56899
|
+
t: t,
|
|
56900
|
+
userType: "employee"
|
|
56901
|
+
})), /*#__PURE__*/React__default.createElement(reactRouterDom.Route, {
|
|
56902
|
+
path: `${match.path}`
|
|
56903
|
+
}, /*#__PURE__*/React__default.createElement(Component, {
|
|
56904
|
+
config: {},
|
|
56905
|
+
t: t,
|
|
56906
|
+
userType: "employee"
|
|
56913
56907
|
})));
|
|
56914
56908
|
};
|
|
56915
56909
|
|
|
@@ -57778,7 +57772,7 @@ const EditDisconnectionByConfig = () => {
|
|
|
57778
57772
|
const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
|
|
57779
57773
|
React.useEffect(() => {
|
|
57780
57774
|
if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
|
|
57781
|
-
const config = newConfig.find(conf => conf.isDisonnectionEdit);
|
|
57775
|
+
const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
|
|
57782
57776
|
if (config) {
|
|
57783
57777
|
var _config$body;
|
|
57784
57778
|
config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
|
|
@@ -57918,7 +57912,7 @@ const EditDisconnectionByConfig$1 = () => {
|
|
|
57918
57912
|
const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
|
|
57919
57913
|
React.useEffect(() => {
|
|
57920
57914
|
if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
|
|
57921
|
-
const config = newConfig.find(conf => conf.isDisonnectionEdit);
|
|
57915
|
+
const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
|
|
57922
57916
|
if (config) {
|
|
57923
57917
|
var _config$body;
|
|
57924
57918
|
config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
|
|
@@ -58066,7 +58060,7 @@ const ResubmitDisconnection = () => {
|
|
|
58066
58060
|
} = Digit.Hooks.ws.useWSApplicationActions(serviceType);
|
|
58067
58061
|
React.useEffect(() => {
|
|
58068
58062
|
if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
|
|
58069
|
-
const config = newConfig.find(conf => conf.isDisonnectionEdit);
|
|
58063
|
+
const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
|
|
58070
58064
|
if (config) {
|
|
58071
58065
|
var _config$body;
|
|
58072
58066
|
config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
|
|
@@ -59673,7 +59667,6 @@ const OLDApplication = () => {
|
|
|
59673
59667
|
};
|
|
59674
59668
|
|
|
59675
59669
|
const FitterSandbox = _ref => {
|
|
59676
|
-
var _applicationData$addi;
|
|
59677
59670
|
let {
|
|
59678
59671
|
t,
|
|
59679
59672
|
action,
|
|
@@ -59818,22 +59811,7 @@ const FitterSandbox = _ref => {
|
|
|
59818
59811
|
margin: 0,
|
|
59819
59812
|
textTransform: "uppercase"
|
|
59820
59813
|
}
|
|
59821
|
-
}, "
|
|
59822
|
-
style: {
|
|
59823
|
-
fontSize: "14px",
|
|
59824
|
-
color: "#6e5e5e",
|
|
59825
|
-
margin: "4px 0 0 0"
|
|
59826
|
-
}
|
|
59827
|
-
}, "Simulate the physical field actions of Delhi Jal Board fitter ", (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$addi = applicationData.additionalDetails) === null || _applicationData$addi === void 0 ? void 0 : _applicationData$addi.ownerName) || "Amit Kumar", "."))), /*#__PURE__*/React__default.createElement("div", {
|
|
59828
|
-
style: {
|
|
59829
|
-
backgroundColor: "#ffeded",
|
|
59830
|
-
color: "#d4351c",
|
|
59831
|
-
padding: "4px 12px",
|
|
59832
|
-
borderRadius: "4px",
|
|
59833
|
-
fontSize: "12px",
|
|
59834
|
-
fontWeight: "700"
|
|
59835
|
-
}
|
|
59836
|
-
}, "FIELD SIMULATOR")), /*#__PURE__*/React__default.createElement("div", {
|
|
59814
|
+
}, "ENTER METER FITTER DETAILS")))), /*#__PURE__*/React__default.createElement("div", {
|
|
59837
59815
|
style: {
|
|
59838
59816
|
display: "flex",
|
|
59839
59817
|
gap: "16px",
|
|
@@ -60056,6 +60034,7 @@ const WSExecuteDisconnection = () => {
|
|
|
60056
60034
|
const serviceType = (state === null || state === void 0 ? void 0 : state.serviceType) || (applicationData !== null && applicationData !== void 0 && (_applicationData$appl = applicationData.applicationNo) !== null && _applicationData$appl !== void 0 && _applicationData$appl.includes("WS") ? "WATER" : "SEWERAGE");
|
|
60057
60035
|
const history = reactRouterDom.useHistory();
|
|
60058
60036
|
const [showConfirmation, setShowConfirmation] = React.useState(false);
|
|
60037
|
+
const actionName = ((action === null || action === void 0 ? void 0 : action.action) || action || "execute disconnection").replace(/[ _-]+/g, " ").toLowerCase();
|
|
60059
60038
|
const [payload, setPayload] = React.useState(null);
|
|
60060
60039
|
const [isEnableLoader, setIsEnableLoader] = React.useState(false);
|
|
60061
60040
|
const [showToast, setShowToast] = React.useState(null);
|
|
@@ -60132,7 +60111,7 @@ const WSExecuteDisconnection = () => {
|
|
|
60132
60111
|
style: {
|
|
60133
60112
|
fontSize: "16px"
|
|
60134
60113
|
}
|
|
60135
|
-
}, "Are you sure you want to
|
|
60114
|
+
}, "Are you sure you want to ", actionName, " ?"))), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
|
|
60136
60115
|
error: showToast.key === "error",
|
|
60137
60116
|
label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
|
|
60138
60117
|
onClose: () => setShowToast(null)
|
|
@@ -60293,7 +60272,7 @@ const componentsToRegister = {
|
|
|
60293
60272
|
WSEditModifyApplication: EditModifyApplication,
|
|
60294
60273
|
WSMutationApplication: MutationApplication,
|
|
60295
60274
|
WSDisconnectionApplication: DisconnectionApplication,
|
|
60296
|
-
WSRestorationApplication:
|
|
60275
|
+
WSRestorationApplication: RestorationApplication,
|
|
60297
60276
|
WSEditApplicationByConfig: WSEditApplicationByConfig,
|
|
60298
60277
|
WSGetDisconnectionDetails: GetDisconnectionDetails,
|
|
60299
60278
|
WSModifyApplicationDetails: ModifyApplicationDetails,
|