@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.
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useMemo, useEffect, useRef, Fragment as Fragment$1, useReducer, useCallback } from 'react';
2
2
  import { useTranslation } from 'react-i18next';
3
3
  import { Link, useHistory, useLocation, Switch, Route, useRouteMatch, Redirect, useParams } from 'react-router-dom';
4
- import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, CardSubHeader, StatusTable, Row, Menu, Modal, TextArea, Toast, PrintBtnCommon, MultiLink, LinkButton, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, DatePicker, DeleteIcon, WrapUnMaskComponent, MobileNumber, UploadFile, ViewsIcon, RemoveIcon, CardSectionHeader, RadioButtons, InfoIcon, Header, FilterFormField, RemoveableTag as RemoveableTag$1, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, OTPInput, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$g, BreakLine, CheckPoint, ConnectingCheckPoints, ButtonSelector as ButtonSelector$1, CitizenHomeCard } from '@djb25/digit-ui-react-components';
4
+ import { Loader, Card, KeyNote, SubmitBar, InfoBannerIcon, SearchForm, SearchField, Dropdown, TextInput, Table, Banner, CardText, ActionBar, HomeIcon, AppContainer, ModuleHeader, ArrowLeft, PrivateRoute, LayoutWrapper, VerticalTimeline, CollapsibleCardPage, LabelFieldPair, CardLabel, CardLabelError, CheckBox, CardSubHeader, StatusTable, Row, Menu, Modal, TextArea, Toast, PrintBtnCommon, MultiLink, LinkButton, TickMark, FormStep, RadioOrSelect, CardHeader, CitizenInfoLabel, DatePicker, DeleteIcon, WrapUnMaskComponent, MobileNumber, UploadFile, ViewsIcon, RemoveIcon, RadioButtons, InfoIcon, CardSectionHeader, Header, FilterFormField, RemoveableTag as RemoveableTag$1, MultiSelectDropdown, InboxComposer, DropIcon, WSICon, EmployeeModuleCard, SearchAction, PopUp, DetailsCard, CloseSvg, Localities, DownloadBtnCommon, CollectionIcon, ResponseComposer, TelePhone, DisplayPhotos, PDFSvg, GenericFileIcon, EditIcon, Label, OTPInput, CardSectionSubText, DownloadIcon, CardLabelDesc, FormComposer, MultiUploadWrapper, Close as Close$g, BreakLine, CheckPoint, ConnectingCheckPoints, ButtonSelector as ButtonSelector$1, CitizenHomeCard } from '@djb25/digit-ui-react-components';
5
5
  import { useForm, Controller, useWatch, useFormContext } from 'react-hook-form';
6
6
  import { read, utils as utils$1 } from 'xlsx';
7
7
  import { useQueryClient, useQuery } from 'react-query';
@@ -1124,7 +1124,7 @@ const createPayloadOfWSDisconnection = function (data, storeData, service) {
1124
1124
  };
1125
1125
  const createPayloadOfWSReconnection = function (data, storeData, service) {
1126
1126
  try {
1127
- var _Digit$UserService$ge0, _Digit$UserService$ge1, _storeData$applicatio70, _storeData$applicatio71, _storeData$applicatio96, _storeData$applicatio97, _storeData$applicatio98, _storeData$applicatio99, _storeData$applicatio100, _storeData$applicatio101, _data$type4, _data$type4$value, _data$type5, _data$type5$value, _data$reason$value3, _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$type6, _data$type6$value, _data$reason$value4, _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;
1127
+ 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;
1128
1128
  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;
1129
1129
  let plumberInfo = [];
1130
1130
  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) {
@@ -1146,9 +1146,10 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1146
1146
  connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio101 = storeData.applicationData) === null || _storeData$applicatio101 === void 0 ? void 0 : _storeData$applicatio101.connectionHolders,
1147
1147
  applicationType: "WATER_RECONNECTION",
1148
1148
  dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
1149
- isdisconnection: true,
1150
- 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" || (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,
1151
- disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$value3 = data.reason.value) === null || _data$reason$value3 === void 0 ? void 0 : _data$reason$value3.code,
1149
+ isdisconnection: false,
1150
+ isDisconnectionTemporary: true,
1151
+ 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) || "",
1152
+ disconnectionReason: "",
1152
1153
  documents: data === null || data === void 0 ? void 0 : data.documents,
1153
1154
  water: true,
1154
1155
  sewerage: false,
@@ -1191,9 +1192,10 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1191
1192
  connectionHolders: storeData === null || storeData === void 0 ? void 0 : (_storeData$applicatio121 = storeData.applicationData) === null || _storeData$applicatio121 === void 0 ? void 0 : _storeData$applicatio121.connectionHolders,
1192
1193
  applicationType: "WATER_RECONNECTION",
1193
1194
  dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
1194
- isdisconnection: true,
1195
- isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type6 = data.type) === null || _data$type6 === void 0 ? void 0 : (_data$type6$value = _data$type6.value) === null || _data$type6$value === void 0 ? void 0 : _data$type6$value.code) === "Temporary" ? true : false,
1196
- 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,
1195
+ isdisconnection: false,
1196
+ isDisconnectionTemporary: true,
1197
+ 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) || "",
1198
+ disconnectionReason: "",
1197
1199
  documents: data === null || data === void 0 ? void 0 : data.documents,
1198
1200
  water: false,
1199
1201
  sewerage: true,
@@ -1231,14 +1233,14 @@ const createPayloadOfWSReconnection = function (data, storeData, service) {
1231
1233
  };
1232
1234
  const createPayloadOfWSReSubmitDisconnection = function (data, storeData, service) {
1233
1235
  try {
1234
- var _Digit$UserService$ge10, _Digit$UserService$ge11, _data$type7, _data$type7$value, _data$reason$value5, _storeData$applicatio135, _data$type8, _data$type8$value, _data$reason$value6, _storeData$applicatio136, _Digit13, _Digit13$Customizatio, _Digit13$Customizatio2, _Digit14, _Digit14$Customizatio, _Digit14$Customizatio2;
1236
+ 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;
1235
1237
  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;
1236
1238
  let wsPayload = {
1237
1239
  WaterConnection: {
1238
1240
  ...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
1239
1241
  dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
1240
- isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type7 = data.type) === null || _data$type7 === void 0 ? void 0 : (_data$type7$value = _data$type7.value) === null || _data$type7$value === void 0 ? void 0 : _data$type7$value.code) === "Temporary" ? true : false,
1241
- 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,
1242
+ 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,
1243
+ 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,
1242
1244
  documents: data === null || data === void 0 ? void 0 : data.documents,
1243
1245
  water: true,
1244
1246
  sewerage: false,
@@ -1260,8 +1262,8 @@ const createPayloadOfWSReSubmitDisconnection = function (data, storeData, servic
1260
1262
  ...(storeData === null || storeData === void 0 ? void 0 : storeData.applicationData),
1261
1263
  dateEffectiveFrom: convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date),
1262
1264
  isdisconnection: true,
1263
- isDisconnectionTemporary: (data === null || data === void 0 ? void 0 : (_data$type8 = data.type) === null || _data$type8 === void 0 ? void 0 : (_data$type8$value = _data$type8.value) === null || _data$type8$value === void 0 ? void 0 : _data$type8$value.code) === "Temporary" ? true : false,
1264
- disconnectionReason: data === null || data === void 0 ? void 0 : (_data$reason$value6 = data.reason.value) === null || _data$reason$value6 === void 0 ? void 0 : _data$reason$value6.code,
1265
+ 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,
1266
+ 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,
1265
1267
  documents: data === null || data === void 0 ? void 0 : data.documents,
1266
1268
  water: false,
1267
1269
  sewerage: true,
@@ -11131,6 +11133,7 @@ const WSZROVerificationDetails = () => {
11131
11133
  const [toast, setToast] = useState(null);
11132
11134
  const [isSuccess, setIsSuccess] = useState(false);
11133
11135
  const [apiResponse, setApiResponse] = useState(null);
11136
+ const [showConfirmation, setShowConfirmation] = useState(false);
11134
11137
  useEffect(() => {
11135
11138
  let timer;
11136
11139
  if (isSuccess) {
@@ -11142,6 +11145,9 @@ const WSZROVerificationDetails = () => {
11142
11145
  if (timer) clearTimeout(timer);
11143
11146
  };
11144
11147
  }, [isSuccess, history]);
11148
+ const requestActionConfirmation = () => {
11149
+ setShowConfirmation(true);
11150
+ };
11145
11151
  const caseDataFromState = (_location$state = location.state) === null || _location$state === void 0 ? void 0 : _location$state.caseData;
11146
11152
  const searchParams = new URLSearchParams(location.search);
11147
11153
  const connectionNumber = searchParams.get("connectionNumber");
@@ -11320,7 +11326,7 @@ const WSZROVerificationDetails = () => {
11320
11326
  actionCancelLabel: t("CS_COMMON_CANCEL"),
11321
11327
  actionCancelOnSubmit: closeModal,
11322
11328
  actionSaveLabel: selectedAction === "VERIFY" ? t("WF_ZRO_VERIFY") : t("WF_ZRO_REJECT"),
11323
- actionSaveOnSubmit: submitAction
11329
+ actionSaveOnSubmit: requestActionConfirmation
11324
11330
  }, /*#__PURE__*/React.createElement("div", {
11325
11331
  style: {
11326
11332
  marginBottom: "16px"
@@ -11329,7 +11335,29 @@ const WSZROVerificationDetails = () => {
11329
11335
  name: "comments",
11330
11336
  value: comments,
11331
11337
  onChange: e => setComments(e.target.value)
11332
- }))), toast && /*#__PURE__*/React.createElement(Toast, {
11338
+ }))), showConfirmation && /*#__PURE__*/React.createElement(Modal, {
11339
+ headerBarMain: /*#__PURE__*/React.createElement(Heading, {
11340
+ label: "Confirmation"
11341
+ }),
11342
+ headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
11343
+ onClick: () => setShowConfirmation(false)
11344
+ }),
11345
+ actionCancelLabel: t("CS_COMMON_CANCEL"),
11346
+ actionCancelOnSubmit: () => setShowConfirmation(false),
11347
+ actionSaveLabel: "Yes",
11348
+ actionSaveOnSubmit: () => {
11349
+ setShowConfirmation(false);
11350
+ submitAction();
11351
+ }
11352
+ }, /*#__PURE__*/React.createElement("div", {
11353
+ style: {
11354
+ padding: "16px"
11355
+ }
11356
+ }, /*#__PURE__*/React.createElement("p", {
11357
+ style: {
11358
+ fontSize: "16px"
11359
+ }
11360
+ }, "Are you sure you want to ", (selectedAction === null || selectedAction === void 0 ? void 0 : selectedAction.toLowerCase()) || "this action", " ?"))), toast && /*#__PURE__*/React.createElement(Toast, {
11333
11361
  error: toast.error,
11334
11362
  label: toast.message,
11335
11363
  onClose: () => setToast(null)
@@ -15954,12 +15982,20 @@ const ConnectionDetails$2 = _props => {
15954
15982
  fontSize: "12px",
15955
15983
  marginTop: "-21px"
15956
15984
  };
15957
- return /*#__PURE__*/React.createElement(React.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ACK_COMMON_APP_NO_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
15985
+ return /*#__PURE__*/React.createElement(React.Fragment, null, !window.location.href.includes("by-config") && !window.location.href.includes("ws/modify-application") ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ACK_COMMON_APP_NO_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
15986
+ style: {
15987
+ color: "red"
15988
+ }
15989
+ }, "*")), /*#__PURE__*/React.createElement("div", {
15958
15990
  className: "field"
15959
15991
  }, /*#__PURE__*/React.createElement(TextInput, {
15960
15992
  disabled: true,
15961
15993
  value: filters === null || filters === void 0 ? void 0 : filters.applicationNumber
15962
- }))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_CONN_TYPE")}*`), /*#__PURE__*/React.createElement(Controller, {
15994
+ }))) : null, (filters === null || filters === void 0 ? void 0 : filters.service) === "WATER" ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_CONN_TYPE"), " ", /*#__PURE__*/React.createElement("span", {
15995
+ style: {
15996
+ color: "red"
15997
+ }
15998
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
15963
15999
  control: control,
15964
16000
  name: "connectionType",
15965
16001
  defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.connectionType,
@@ -15985,7 +16021,11 @@ const ConnectionDetails$2 = _props => {
15985
16021
  }
15986
16022
  }), localFormState.touched.connectionType && errors !== null && errors !== void 0 && (_errors$connectionTyp2 = errors.connectionType) !== null && _errors$connectionTyp2 !== void 0 && _errors$connectionTyp2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
15987
16023
  style: errorStyle
15988
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_WATER_SOURCE")}*`), /*#__PURE__*/React.createElement(Controller, {
16024
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$connectionTyp3 = errors.connectionType) === null || _errors$connectionTyp3 === void 0 ? void 0 : _errors$connectionTyp3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_WATER_SOURCE"), " ", /*#__PURE__*/React.createElement("span", {
16025
+ style: {
16026
+ color: "red"
16027
+ }
16028
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
15989
16029
  control: control,
15990
16030
  name: "waterSource",
15991
16031
  defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.waterSource,
@@ -16028,7 +16068,11 @@ const ConnectionDetails$2 = _props => {
16028
16068
  }
16029
16069
  }), localFormState.touched.waterSource && errors !== null && errors !== void 0 && (_errors$waterSource2 = errors.waterSource) !== null && _errors$waterSource2 !== void 0 && _errors$waterSource2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16030
16070
  style: errorStyle
16031
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$waterSource3 = errors.waterSource) === null || _errors$waterSource3 === void 0 ? void 0 : _errors$waterSource3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_WATER_SUB_SOURCE")}*`), /*#__PURE__*/React.createElement(Controller, {
16071
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$waterSource3 = errors.waterSource) === null || _errors$waterSource3 === void 0 ? void 0 : _errors$waterSource3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_WATER_SUB_SOURCE"), " ", /*#__PURE__*/React.createElement("span", {
16072
+ style: {
16073
+ color: "red"
16074
+ }
16075
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
16032
16076
  control: control,
16033
16077
  name: "sourceSubData",
16034
16078
  defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.sourceSubData,
@@ -16054,7 +16098,11 @@ const ConnectionDetails$2 = _props => {
16054
16098
  }
16055
16099
  }), localFormState.touched.sourceSubData && errors !== null && errors !== void 0 && (_errors$sourceSubData2 = errors.sourceSubData) !== null && _errors$sourceSubData2 !== void 0 && _errors$sourceSubData2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16056
16100
  style: errorStyle
16057
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$sourceSubData3 = errors.sourceSubData) === null || _errors$sourceSubData3 === void 0 ? void 0 : _errors$sourceSubData3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PIPE_SIZE_IN_INCHES_LABEL")}*`), /*#__PURE__*/React.createElement(Controller, {
16101
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$sourceSubData3 = errors.sourceSubData) === null || _errors$sourceSubData3 === void 0 ? void 0 : _errors$sourceSubData3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PIPE_SIZE_IN_INCHES_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16102
+ style: {
16103
+ color: "red"
16104
+ }
16105
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
16058
16106
  control: control,
16059
16107
  name: "pipeSize",
16060
16108
  defaultValue: connectionDetail === null || connectionDetail === void 0 ? void 0 : connectionDetail.pipeSize,
@@ -16080,7 +16128,11 @@ const ConnectionDetails$2 = _props => {
16080
16128
  }
16081
16129
  }), localFormState.touched.pipeSize && errors !== null && errors !== void 0 && (_errors$pipeSize2 = errors.pipeSize) !== null && _errors$pipeSize2 !== void 0 && _errors$pipeSize2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16082
16130
  style: errorStyle
16083
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$pipeSize3 = errors.pipeSize) === null || _errors$pipeSize3 === void 0 ? void 0 : _errors$pipeSize3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_NO_OF_TAPS")}*`), /*#__PURE__*/React.createElement("div", {
16131
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$pipeSize3 = errors.pipeSize) === null || _errors$pipeSize3 === void 0 ? void 0 : _errors$pipeSize3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_NO_OF_TAPS"), " ", /*#__PURE__*/React.createElement("span", {
16132
+ style: {
16133
+ color: "red"
16134
+ }
16135
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16084
16136
  className: "field"
16085
16137
  }, /*#__PURE__*/React.createElement(Controller, {
16086
16138
  control: control,
@@ -16114,7 +16166,11 @@ const ConnectionDetails$2 = _props => {
16114
16166
  }
16115
16167
  })), localFormState.touched.noOfTaps && errors !== null && errors !== void 0 && (_errors$noOfTaps2 = errors.noOfTaps) !== null && _errors$noOfTaps2 !== void 0 && _errors$noOfTaps2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16116
16168
  style: errorStyle
16117
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfTaps3 = errors.noOfTaps) === null || _errors$noOfTaps3 === void 0 ? void 0 : _errors$noOfTaps3.message) : null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_NUMBER_WATER_CLOSETS_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
16169
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfTaps3 = errors.noOfTaps) === null || _errors$noOfTaps3 === void 0 ? void 0 : _errors$noOfTaps3.message) : null)) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_NUMBER_WATER_CLOSETS_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16170
+ style: {
16171
+ color: "red"
16172
+ }
16173
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16118
16174
  className: "field"
16119
16175
  }, /*#__PURE__*/React.createElement(Controller, {
16120
16176
  control: control,
@@ -16148,7 +16204,11 @@ const ConnectionDetails$2 = _props => {
16148
16204
  }
16149
16205
  })), localFormState.touched.noOfWaterClosets && errors !== null && errors !== void 0 && (_errors$noOfWaterClos2 = errors.noOfWaterClosets) !== null && _errors$noOfWaterClos2 !== void 0 && _errors$noOfWaterClos2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16150
16206
  style: errorStyle
16151
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_NO_OF_TOILETS")}*`), /*#__PURE__*/React.createElement("div", {
16207
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$noOfWaterClos3 = errors.noOfWaterClosets) === null || _errors$noOfWaterClos3 === void 0 ? void 0 : _errors$noOfWaterClos3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_NO_OF_TOILETS"), " ", /*#__PURE__*/React.createElement("span", {
16208
+ style: {
16209
+ color: "red"
16210
+ }
16211
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16152
16212
  className: "field"
16153
16213
  }, /*#__PURE__*/React.createElement(Controller, {
16154
16214
  control: control,
@@ -16332,7 +16392,11 @@ const PlumberDetails = _props => {
16332
16392
  fontSize: "12px",
16333
16393
  marginTop: "-21px"
16334
16394
  };
16335
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY")}*`), /*#__PURE__*/React.createElement(Controller, {
16395
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ADDN_DETAILS_PLUMBER_PROVIDED_BY"), " ", /*#__PURE__*/React.createElement("span", {
16396
+ style: {
16397
+ color: "red"
16398
+ }
16399
+ }, "*")), /*#__PURE__*/React.createElement(Controller, {
16336
16400
  control: control,
16337
16401
  name: "detailsProvidedBy",
16338
16402
  defaultValue: plumberDetail === null || plumberDetail === void 0 ? void 0 : plumberDetail.detailsProvidedBy,
@@ -16373,7 +16437,11 @@ const PlumberDetails = _props => {
16373
16437
  }
16374
16438
  }), localFormState.touched.detailsProvidedBy && errors !== null && errors !== void 0 && (_errors$detailsProvid2 = errors.detailsProvidedBy) !== null && _errors$detailsProvid2 !== void 0 && _errors$detailsProvid2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16375
16439
  style: errorStyle
16376
- }, " ", 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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLIMBER_LICENSE_NO_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
16440
+ }, " ", 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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PLIMBER_LICENSE_NO_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16441
+ style: {
16442
+ color: "red"
16443
+ }
16444
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16377
16445
  className: "field"
16378
16446
  }, /*#__PURE__*/React.createElement(Controller, {
16379
16447
  control: control,
@@ -16405,7 +16473,11 @@ const PlumberDetails = _props => {
16405
16473
  }
16406
16474
  })), localFormState.touched.plumberLicenseNo && errors !== null && errors !== void 0 && (_errors$plumberLicens2 = errors.plumberLicenseNo) !== null && _errors$plumberLicens2 !== void 0 && _errors$plumberLicens2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16407
16475
  style: errorStyle
16408
- }, errors === null || errors === void 0 ? void 0 : (_errors$plumberLicens3 = errors.plumberLicenseNo) === null || _errors$plumberLicens3 === void 0 ? void 0 : _errors$plumberLicens3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ADDN_DETAILS_PLUMBER_NAME_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
16476
+ }, errors === null || errors === void 0 ? void 0 : (_errors$plumberLicens3 = errors.plumberLicenseNo) === null || _errors$plumberLicens3 === void 0 ? void 0 : _errors$plumberLicens3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ADDN_DETAILS_PLUMBER_NAME_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16477
+ style: {
16478
+ color: "red"
16479
+ }
16480
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16409
16481
  className: "field"
16410
16482
  }, /*#__PURE__*/React.createElement(Controller, {
16411
16483
  control: control,
@@ -16437,7 +16509,11 @@ const PlumberDetails = _props => {
16437
16509
  }
16438
16510
  })), localFormState.touched.plumberName && errors !== null && errors !== void 0 && (_errors$plumberName2 = errors.plumberName) !== null && _errors$plumberName2 !== void 0 && _errors$plumberName2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16439
16511
  style: errorStyle
16440
- }, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_PLUMBER_MOBILE_NO_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
16512
+ }, " ", errors === null || errors === void 0 ? void 0 : (_errors$plumberName3 = errors.plumberName) === null || _errors$plumberName3 === void 0 ? void 0 : _errors$plumberName3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_PLUMBER_MOBILE_NO_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16513
+ style: {
16514
+ color: "red"
16515
+ }
16516
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16441
16517
  className: "field"
16442
16518
  }, /*#__PURE__*/React.createElement(Controller, {
16443
16519
  control: control,
@@ -16667,7 +16743,11 @@ const ConnectionDetails$3 = _props => {
16667
16743
  fontSize: "12px",
16668
16744
  marginTop: "-21px"
16669
16745
  };
16670
- return /*#__PURE__*/React.createElement(React.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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_METER_ID")}*`), /*#__PURE__*/React.createElement("div", {
16746
+ return /*#__PURE__*/React.createElement(React.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.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_METER_ID"), " ", /*#__PURE__*/React.createElement("span", {
16747
+ style: {
16748
+ color: "red"
16749
+ }
16750
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16671
16751
  className: "field"
16672
16752
  }, /*#__PURE__*/React.createElement(Controller, {
16673
16753
  control: control,
@@ -16701,13 +16781,18 @@ const ConnectionDetails$3 = _props => {
16701
16781
  }
16702
16782
  })), localFormState.touched.meterId && errors !== null && errors !== void 0 && (_errors$meterId2 = errors.meterId) !== null && _errors$meterId2 !== void 0 && _errors$meterId2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16703
16783
  style: errorStyle
16704
- }, errors === null || errors === void 0 ? void 0 : (_errors$meterId3 = errors.meterId) === null || _errors$meterId3 === void 0 ? void 0 : _errors$meterId3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_ADDN_DETAIL_METER_INSTALL_DATE")}*`), /*#__PURE__*/React.createElement("div", {
16784
+ }, errors === null || errors === void 0 ? void 0 : (_errors$meterId3 = errors.meterId) === null || _errors$meterId3 === void 0 ? void 0 : _errors$meterId3.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_ADDN_DETAIL_METER_INSTALL_DATE"), " ", /*#__PURE__*/React.createElement("span", {
16785
+ style: {
16786
+ color: "red"
16787
+ }
16788
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16705
16789
  className: "field"
16706
16790
  }, /*#__PURE__*/React.createElement(Controller, {
16707
16791
  name: "meterInstallationDate",
16708
16792
  rules: {
16709
16793
  required: t("REQUIRED_FIELD")
16710
16794
  },
16795
+ isMandatory: true,
16711
16796
  defaultValue: activationDetail === null || activationDetail === void 0 ? void 0 : activationDetail.meterInstallationDate,
16712
16797
  control: control,
16713
16798
  render: props => /*#__PURE__*/React.createElement(DatePicker, {
@@ -16717,7 +16802,11 @@ const ConnectionDetails$3 = _props => {
16717
16802
  })
16718
16803
  })), localFormState.touched.meterInstallationDate && errors !== null && errors !== void 0 && (_errors$meterInstalla = errors.meterInstallationDate) !== null && _errors$meterInstalla !== void 0 && _errors$meterInstalla.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16719
16804
  style: errorStyle
16720
- }, errors === null || errors === void 0 ? void 0 : (_errors$meterInstalla2 = errors.meterInstallationDate) === null || _errors$meterInstalla2 === void 0 ? void 0 : _errors$meterInstalla2.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_INITIAL_METER_READING_LABEL")}*`), /*#__PURE__*/React.createElement("div", {
16805
+ }, errors === null || errors === void 0 ? void 0 : (_errors$meterInstalla2 = errors.meterInstallationDate) === null || _errors$meterInstalla2 === void 0 ? void 0 : _errors$meterInstalla2.message) : null), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_INITIAL_METER_READING_LABEL"), " ", /*#__PURE__*/React.createElement("span", {
16806
+ style: {
16807
+ color: "red"
16808
+ }
16809
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16721
16810
  className: "field"
16722
16811
  }, /*#__PURE__*/React.createElement(Controller, {
16723
16812
  type: "number",
@@ -16751,13 +16840,18 @@ const ConnectionDetails$3 = _props => {
16751
16840
  }
16752
16841
  })), localFormState.touched.meterInitialReading && errors !== null && errors !== void 0 && (_errors$meterInitialR2 = errors.meterInitialReading) !== null && _errors$meterInitialR2 !== void 0 && _errors$meterInitialR2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16753
16842
  style: errorStyle
16754
- }, 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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_SERV_DETAIL_CONN_EXECUTION_DATE")}*`), /*#__PURE__*/React.createElement("div", {
16843
+ }, 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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SERV_DETAIL_CONN_EXECUTION_DATE"), " ", /*#__PURE__*/React.createElement("span", {
16844
+ style: {
16845
+ color: "red"
16846
+ }
16847
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16755
16848
  className: "field"
16756
16849
  }, /*#__PURE__*/React.createElement(Controller, {
16757
16850
  name: "connectionExecutionDate",
16758
16851
  rules: {
16759
16852
  required: t("REQUIRED_FIELD")
16760
16853
  },
16854
+ isMandatory: true,
16761
16855
  defaultValue: activationDetail === null || activationDetail === void 0 ? void 0 : activationDetail.connectionExecutionDate,
16762
16856
  control: control,
16763
16857
  render: props => {
@@ -16772,7 +16866,11 @@ const ConnectionDetails$3 = _props => {
16772
16866
  }
16773
16867
  })), localFormState.touched.connectionExecutionDate && errors !== null && errors !== void 0 && (_errors$connectionExe2 = errors.connectionExecutionDate) !== null && _errors$connectionExe2 !== void 0 && _errors$connectionExe2.message ? /*#__PURE__*/React.createElement(CardLabelError, {
16774
16868
  style: errorStyle
16775
- }, 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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, `${t("WS_MODIFICATIONS_EFFECTIVE_FROM")}*`), /*#__PURE__*/React.createElement("div", {
16869
+ }, 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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_MODIFICATIONS_EFFECTIVE_FROM"), " ", /*#__PURE__*/React.createElement("span", {
16870
+ style: {
16871
+ color: "red"
16872
+ }
16873
+ }, "*")), /*#__PURE__*/React.createElement("div", {
16776
16874
  className: "field"
16777
16875
  }, /*#__PURE__*/React.createElement(Controller, {
16778
16876
  name: "dateEffectiveFrom",
@@ -19803,7 +19901,6 @@ const ConnectionDetails$4 = _props => {
19803
19901
  };
19804
19902
 
19805
19903
  const WSDisconnectionDocsRequired = _ref => {
19806
- var _wsDocs$Disconnection2;
19807
19904
  let {
19808
19905
  userType
19809
19906
  } = _ref;
@@ -19814,12 +19911,7 @@ const WSDisconnectionDocsRequired = _ref => {
19814
19911
  const location = useLocation();
19815
19912
  const match = useRouteMatch();
19816
19913
  const tenantId = Digit.ULBService.getStateId();
19817
- const {
19818
- isLoading: wsDocsLoading,
19819
- data: wsDocs
19820
- } = Digit.Hooks.ws.WSSearchMdmsTypes.useWSServicesMasters(tenantId, "DisconnectionDocuments");
19821
19914
  if (userType === "citizen") {
19822
- var _wsDocs$Disconnection;
19823
19915
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(CardHeader, null, t(`WS_COMMON_APPLICATION_DISCONNECTION`)), /*#__PURE__*/React.createElement(CitizenInfoLabel, {
19824
19916
  style: {
19825
19917
  margin: "0px"
@@ -19846,37 +19938,7 @@ const WSDisconnectionDocsRequired = _ref => {
19846
19938
  color: "#0B0C0C",
19847
19939
  marginTop: "12px"
19848
19940
  }
19849
- }, t(`WS_NEW_CONNECTION_TEST_3`)), wsDocsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement(Fragment$1, null, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((doc, index) => {
19850
- var _doc$dropdownData;
19851
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
19852
- style: {
19853
- fontWeight: 700,
19854
- marginBottom: "8px"
19855
- },
19856
- key: index
19857
- }, /*#__PURE__*/React.createElement("div", {
19858
- style: {
19859
- display: "flex"
19860
- }
19861
- }, /*#__PURE__*/React.createElement("div", null, `${index + 1}.`, "\xA0"), /*#__PURE__*/React.createElement("div", null, ` ${t(doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_'))}`))), /*#__PURE__*/React.createElement("div", {
19862
- style: {
19863
- marginBottom: "16px",
19864
- marginLeft: "18px",
19865
- color: 'gray'
19866
- }
19867
- }, doc === null || doc === void 0 ? void 0 : (_doc$dropdownData = doc.dropdownData) === null || _doc$dropdownData === void 0 ? void 0 : _doc$dropdownData.map((value, index) => {
19868
- var _doc$dropdownData2;
19869
- 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.createElement("span", {
19870
- style: {
19871
- color: 'gray'
19872
- }
19873
- }, `${t(value === null || value === void 0 ? void 0 : value.i18nKey)}, `) : /*#__PURE__*/React.createElement("span", {
19874
- style: {
19875
- color: 'gray'
19876
- }
19877
- }, `${t(value === null || value === void 0 ? void 0 : value.i18nKey)}`);
19878
- })));
19879
- })), /*#__PURE__*/React.createElement(SubmitBar, {
19941
+ }, t(`WS_NEW_CONNECTION_TEST_3`)), /*#__PURE__*/React.createElement(SubmitBar, {
19880
19942
  label: t(`CS_COMMON_NEXT`),
19881
19943
  onSubmit: () => {
19882
19944
  history.push(`${match.path.replace("docsrequired", "application-form")}${location.search}`);
@@ -19884,43 +19946,7 @@ const WSDisconnectionDocsRequired = _ref => {
19884
19946
  }
19885
19947
  })));
19886
19948
  }
19887
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, wsDocsLoading ? /*#__PURE__*/React.createElement(Loader, null) : /*#__PURE__*/React.createElement("div", {
19888
- id: "documents-div"
19889
- }, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection2 = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection2 === void 0 ? void 0 : _wsDocs$Disconnection2.map((doc, index) => {
19890
- var _doc$dropdownData3;
19891
- return /*#__PURE__*/React.createElement("div", {
19892
- key: index,
19893
- style: {
19894
- marginTop: "16px"
19895
- }
19896
- }, /*#__PURE__*/React.createElement(CardSectionHeader, {
19897
- style: {
19898
- marginBottom: "16px",
19899
- lineHeight: "28px",
19900
- fontSize: "24px"
19901
- }
19902
- }, t(doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_'))), doc.dropdownData && doc.dropdownData.length > 1 && /*#__PURE__*/React.createElement("p", {
19903
- style: {
19904
- lineHeight: "24px",
19905
- fontSize: "16px"
19906
- }
19907
- }, t(`${doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_')}_DESCRIPTION`)), /*#__PURE__*/React.createElement("div", {
19908
- style: {
19909
- margin: "16px 0",
19910
- lineHeight: "18px",
19911
- fontSize: "16px"
19912
- }
19913
- }, 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.createElement("p", {
19914
- style: {
19915
- fontWeight: "bold",
19916
- lineHeight: "32px"
19917
- }
19918
- }, `${idx + 1}. ${t(value === null || value === void 0 ? void 0 : value.i18nKey)}`))), /*#__PURE__*/React.createElement("p", {
19919
- style: {
19920
- fontSize: "16px"
19921
- }
19922
- }, t(`${doc === null || doc === void 0 ? void 0 : doc.code.replace('.', '_')}_BELOW_DESCRIPTION`)));
19923
- })), /*#__PURE__*/React.createElement(ActionBar, {
19949
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Card, null, /*#__PURE__*/React.createElement(ActionBar, {
19924
19950
  style: {
19925
19951
  display: "flex",
19926
19952
  justifyContent: "flex-end",
@@ -19934,8 +19960,7 @@ const WSDisconnectionDocsRequired = _ref => {
19934
19960
  },
19935
19961
  style: {
19936
19962
  margin: "10px 10px 0px 0px"
19937
- },
19938
- disabled: wsDocsLoading ? true : false
19963
+ }
19939
19964
  }))));
19940
19965
  };
19941
19966
 
@@ -20583,6 +20608,28 @@ function addDays(dirtyDate, dirtyAmount) {
20583
20608
  return date;
20584
20609
  }
20585
20610
 
20611
+ function addMonths(dirtyDate, dirtyAmount) {
20612
+ requiredArgs(2, arguments);
20613
+ var date = toDate(dirtyDate);
20614
+ var amount = toInteger(dirtyAmount);
20615
+ if (isNaN(amount)) {
20616
+ return new Date(NaN);
20617
+ }
20618
+ if (!amount) {
20619
+ return date;
20620
+ }
20621
+ var dayOfMonth = date.getDate();
20622
+ var endOfDesiredMonth = new Date(date.getTime());
20623
+ endOfDesiredMonth.setMonth(date.getMonth() + amount + 1, 0);
20624
+ var daysInMonth = endOfDesiredMonth.getDate();
20625
+ if (dayOfMonth >= daysInMonth) {
20626
+ return endOfDesiredMonth;
20627
+ } else {
20628
+ date.setFullYear(endOfDesiredMonth.getFullYear(), endOfDesiredMonth.getMonth(), dayOfMonth);
20629
+ return date;
20630
+ }
20631
+ }
20632
+
20586
20633
  function addMilliseconds(dirtyDate, dirtyAmount) {
20587
20634
  requiredArgs(2, arguments);
20588
20635
  var timestamp = toDate(dirtyDate).getTime();
@@ -22031,8 +22078,33 @@ function cleanEscapedString(input) {
22031
22078
  return input.match(escapedStringRegExp)[1].replace(doubleQuoteRegExp, "'");
22032
22079
  }
22033
22080
 
22081
+ const DISCONNECTION_REASONS = {
22082
+ Permanent: [{
22083
+ code: "PROPERTY_DEMOLITION_RECONSTRUCTION",
22084
+ i18nKey: "Property Demolition/Reconstruction"
22085
+ }, {
22086
+ code: "PERMANENT_RELOCATION_FROM_DELHI",
22087
+ i18nKey: "Permanent Relocation from Delhi"
22088
+ }, {
22089
+ code: "SHIFTING_TO_ALTERNATE_BORING_SOURCE",
22090
+ i18nKey: "Shifting to alternate boring source"
22091
+ }, {
22092
+ code: "PROPERTY_CLOSED_VACANT_LONG_TERM",
22093
+ i18nKey: "Property Closed/Vacant long term"
22094
+ }],
22095
+ Temporary: [{
22096
+ code: "TEMPORARY_RELOCATION_TRAVELLING_ABROAD",
22097
+ i18nKey: "Temporary relocation/Travelling abroad"
22098
+ }, {
22099
+ code: "MINOR_PROPERTY_RENOVATION_BUILDING_MAINTENANCE",
22100
+ i18nKey: "Minor property renovation/building maintenance"
22101
+ }, {
22102
+ code: "TEMPORARY_SHIFT_TO_ALTERNATIVE_WATER_SOURCE",
22103
+ i18nKey: "Temporary shift to alternative water source"
22104
+ }]
22105
+ };
22034
22106
  const WSDisconnectionForm = _ref => {
22035
- var _location$state, _applicationData$appl, _applicationData$appl2, _applicationData$appl3, _applicationData$appl4, _applicationData$appl5, _applicationData$WSDi, _applicationData$appl6, _disconnectionData$ty8, _disconnectionData$ty9, _disconnectionData$ty0, _disconnectionData$ty1, _disconnectionData$ty10, _disconnectionData$re6, _disconnectionData$re7, _disconnectionData$re8, _wsDocs$Disconnection, _disconnectionData$re9, _disconnectionData$re0, _disconnectionData$ty11, _disconnectionData$ty12, _disconnectionData$ty13, _disconnectionData$ty14;
22107
+ 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;
22036
22108
  let {
22037
22109
  t,
22038
22110
  config,
@@ -22056,7 +22128,8 @@ const WSDisconnectionForm = _ref => {
22056
22128
  date: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
22057
22129
  endDate: applicationData.WSDisconnectionForm ? (applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$WSDi = applicationData.WSDisconnectionForm) === null || _applicationData$WSDi === void 0 ? void 0 : _applicationData$WSDi.endDate) || "" : "",
22058
22130
  reason: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
22059
- documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
22131
+ documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : [],
22132
+ requestedPeriodMonths: ((_applicationData$WSDi2 = applicationData.WSDisconnectionForm) === null || _applicationData$WSDi2 === void 0 ? void 0 : _applicationData$WSDi2.requestedPeriodMonths) || 12
22060
22133
  });
22061
22134
  const [documents, setDocuments] = useState(applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
22062
22135
  const [error, setError] = useState(null);
@@ -22069,10 +22142,6 @@ const WSDisconnectionForm = _ref => {
22069
22142
  isMdmsLoading,
22070
22143
  data: mdmsData
22071
22144
  } = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["disconnectionType"]);
22072
- const {
22073
- loading,
22074
- data: disconnectionReason
22075
- } = Digit.Hooks.ws.useMDMS(stateCode, "ws-services-masters", ["DisconnectionReason"]);
22076
22145
  const {
22077
22146
  isLoading: wsDocsLoading,
22078
22147
  data: wsDocs
@@ -22132,14 +22201,11 @@ const WSDisconnectionForm = _ref => {
22132
22201
  setDisconnectionTypeList(disconnectionTypes);
22133
22202
  }, [mdmsData]);
22134
22203
  useEffect(() => {
22135
- var _disconnectionReason$;
22136
- const disconnectionReasons = (disconnectionReason === null || disconnectionReason === void 0 ? void 0 : (_disconnectionReason$ = disconnectionReason["ws-services-masters"]) === null || _disconnectionReason$ === void 0 ? void 0 : _disconnectionReason$.DisconnectionReason) || [];
22137
- disconnectionReasons === null || disconnectionReasons === void 0 ? void 0 : disconnectionReasons.forEach(data => {
22138
- var _data$code2;
22139
- return data.i18nKey = `WS_DISCONNECTIONTYPE_${stringReplaceAll(data === null || data === void 0 ? void 0 : (_data$code2 = data.code) === null || _data$code2 === void 0 ? void 0 : _data$code2.toUpperCase(), " ", "_")}`;
22140
- });
22141
- setDisconnectionReasonList(disconnectionReasons);
22142
- }, [disconnectionReason]);
22204
+ var _disconnectionData$ty, _disconnectionData$ty2;
22205
+ 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();
22206
+ const disconnectionType = selectedType === "temporary" ? "Temporary" : selectedType === "permanent" ? "Permanent" : "";
22207
+ setDisconnectionReasonList(DISCONNECTION_REASONS[disconnectionType] || []);
22208
+ }, [disconnectionData.type]);
22143
22209
  useEffect(() => {
22144
22210
  Digit.SessionStorage.set("WS_DISCONNECTION", {
22145
22211
  ...applicationData,
@@ -22151,10 +22217,19 @@ const WSDisconnectionForm = _ref => {
22151
22217
  });
22152
22218
  const onSkip = () => onSelect();
22153
22219
  const filedChange = val => {
22220
+ var _val$value, _disconnectionData$ty3, _disconnectionData$ty4;
22154
22221
  const oldData = {
22155
22222
  ...disconnectionData
22156
22223
  };
22157
22224
  oldData[val.code] = val;
22225
+ 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)) {
22226
+ var _val$value2;
22227
+ oldData.reason = "";
22228
+ if (String(((_val$value2 = val.value) === null || _val$value2 === void 0 ? void 0 : _val$value2.code) || "").toLowerCase() === "temporary") {
22229
+ oldData.date = oldData.date || format(addDays(new Date(), (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0), "yyyy-MM-dd");
22230
+ oldData.endDate = format(addMonths(new Date(oldData.date), oldData.requestedPeriodMonths || 12), "yyyy-MM-dd");
22231
+ }
22232
+ }
22158
22233
  setDisconnectionData(oldData);
22159
22234
  };
22160
22235
  const onSubmit = function (data) {
@@ -22186,7 +22261,7 @@ const WSDisconnectionForm = _ref => {
22186
22261
  }, 3000);
22187
22262
  } else {
22188
22263
  const _temp5 = function (_disconnectionData$re) {
22189
- if (wsDocsLoading || documents.length < 2 || (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) === "") {
22264
+ 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) === "") {
22190
22265
  setError({
22191
22266
  warning: true,
22192
22267
  message: "PLEASE_FILL_MANDATORY_DETAILS"
@@ -22327,7 +22402,7 @@ const WSDisconnectionForm = _ref => {
22327
22402
  };
22328
22403
  if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React.createElement(Loader, null);
22329
22404
  if (userType === "citizen") {
22330
- var _disconnectionData$ty, _disconnectionData$ty2, _disconnectionData$ty3, _disconnectionData$ty4, _disconnectionData$ty5, _disconnectionData$re2, _disconnectionData$re3, _disconnectionData$re4, _disconnectionData$re5;
22405
+ var _disconnectionData$ty5, _disconnectionData$ty6, _disconnectionData$ty7, _disconnectionData$ty8, _disconnectionData$ty9, _disconnectionData$ty10, _disconnectionData$ty11, _disconnectionData$re2, _disconnectionData$re3, _disconnectionData$re4, _disconnectionData$re5;
22331
22406
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CitizenInfoLabel, {
22332
22407
  textStyle: {
22333
22408
  color: "#0B0C0C"
@@ -22357,8 +22432,8 @@ const WSDisconnectionForm = _ref => {
22357
22432
  t: t,
22358
22433
  options: disconnectionTypeList,
22359
22434
  optionsKey: "i18nKey",
22360
- value: (_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,
22361
- selectedOption: (_disconnectionData$ty3 = disconnectionData.type) === null || _disconnectionData$ty3 === void 0 ? void 0 : _disconnectionData$ty3.value,
22435
+ 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,
22436
+ selectedOption: (_disconnectionData$ty7 = disconnectionData.type) === null || _disconnectionData$ty7 === void 0 ? void 0 : _disconnectionData$ty7.value,
22362
22437
  isMandatory: false,
22363
22438
  onSelect: val => filedChange({
22364
22439
  code: "type",
@@ -22368,7 +22443,7 @@ const WSDisconnectionForm = _ref => {
22368
22443
  inputStyle: isMobile ? {
22369
22444
  marginLeft: "unset"
22370
22445
  } : {}
22371
- }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
22446
+ }))), ((_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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
22372
22447
  className: "card-label-smaller"
22373
22448
  }, t("WS_DISCONNECTION_PROPOSED_DATE") + "*", /*#__PURE__*/React.createElement("div", {
22374
22449
  className: `tooltip`,
@@ -22387,36 +22462,59 @@ const WSDisconnectionForm = _ref => {
22387
22462
  }, /*#__PURE__*/React.createElement(DatePicker, {
22388
22463
  date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
22389
22464
  onChange: date => {
22465
+ var _disconnectionData$ty0, _disconnectionData$ty1;
22390
22466
  setDisconnectionData({
22391
22467
  ...disconnectionData,
22392
- date: date
22468
+ date: date,
22469
+ 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
22393
22470
  });
22394
22471
  }
22395
- }))), ((_disconnectionData$ty4 = disconnectionData.type) === null || _disconnectionData$ty4 === void 0 ? void 0 : (_disconnectionData$ty5 = _disconnectionData$ty4.value) === null || _disconnectionData$ty5 === void 0 ? void 0 : _disconnectionData$ty5.code) === "Temporary" ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
22396
- className: "card-label-smaller"
22397
- }, t("WS_DISCONNECTION_PROPOSED_END_DATE") + "*", /*#__PURE__*/React.createElement("div", {
22398
- className: `tooltip`,
22472
+ }))), ((_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.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement("div", {
22399
22473
  style: {
22400
- position: "absolute"
22474
+ width: "100%"
22401
22475
  }
22402
- }, /*#__PURE__*/React.createElement(InfoIcon, null), /*#__PURE__*/React.createElement("span", {
22403
- className: "tooltiptext",
22476
+ }, /*#__PURE__*/React.createElement(CardLabel, {
22477
+ className: "card-label-smaller"
22478
+ }, "REQUESTED PERIOD (IN MONTHS)"), /*#__PURE__*/React.createElement("div", {
22404
22479
  style: {
22405
- whiteSpace: Digit.Utils.browser.isMobile() ? "unset" : "nowrap",
22406
- fontSize: "medium",
22407
- width: Digit.Utils.browser.isMobile() ? "150px" : "unset"
22480
+ display: "flex",
22481
+ alignItems: "center",
22482
+ gap: "10px",
22483
+ marginTop: "8px"
22408
22484
  }
22409
- }, t("SHOULD_BE_DATE") + " " + " " + t("DAYS_OF_PROPOSED_DATE")))), /*#__PURE__*/React.createElement("div", {
22410
- className: "field"
22411
- }, /*#__PURE__*/React.createElement(DatePicker, {
22412
- date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.endDate,
22413
- onChange: date => {
22485
+ }, /*#__PURE__*/React.createElement(TextInput, {
22486
+ type: "number",
22487
+ min: "1",
22488
+ max: "24",
22489
+ value: disconnectionData.requestedPeriodMonths,
22490
+ onChange: event => {
22491
+ const months = Math.min(24, Math.max(1, Number(event.target.value)));
22414
22492
  setDisconnectionData({
22415
22493
  ...disconnectionData,
22416
- endDate: date
22494
+ requestedPeriodMonths: months,
22495
+ endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
22417
22496
  });
22418
22497
  }
22419
- }))) : "", /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
22498
+ }), /*#__PURE__*/React.createElement("span", {
22499
+ style: {
22500
+ fontWeight: 600,
22501
+ color: "#4f6380"
22502
+ }
22503
+ }, "Months (Max 24 Months / 2 Years)")), /*#__PURE__*/React.createElement("div", {
22504
+ style: {
22505
+ marginTop: "12px",
22506
+ padding: "16px",
22507
+ border: "1px solid #f5c542",
22508
+ borderRadius: "16px",
22509
+ background: "#fffaf0",
22510
+ color: "#572b00",
22511
+ lineHeight: 1.5
22512
+ }
22513
+ }, /*#__PURE__*/React.createElement("strong", null, "\u26A0\uFE0F DJB Regulatory Warning Alert:"), /*#__PURE__*/React.createElement("div", {
22514
+ style: {
22515
+ marginTop: "4px"
22516
+ }
22517
+ }, "In case water connections remain disconnected beyond ", /*#__PURE__*/React.createElement("strong", null, "2 years (24 months)"), ", the service line will be ", /*#__PURE__*/React.createElement("strong", null, "permanently disconnected"), " from the main distribution lines, and re-opening will require standard new connection sanction fees.")))) : "", /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
22420
22518
  className: "card-label-smaller"
22421
22519
  }, t("WS_DISCONNECTION_REASON") + "*"), /*#__PURE__*/React.createElement("div", {
22422
22520
  className: "field"
@@ -22443,7 +22541,7 @@ const WSDisconnectionForm = _ref => {
22443
22541
  }, /*#__PURE__*/React.createElement(SubmitBar, {
22444
22542
  label: t("CS_COMMON_NEXT"),
22445
22543
  onSubmit: () => {
22446
- var _disconnectionData$ty6, _disconnectionData$ty7;
22544
+ var _disconnectionData$ty12, _disconnectionData$ty13;
22447
22545
  const appDate = new Date();
22448
22546
  const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), "yyyy-MM-dd").toString();
22449
22547
  if (convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) < convertDateToEpoch(proposedDate)) {
@@ -22454,7 +22552,7 @@ const WSDisconnectionForm = _ref => {
22454
22552
  setTimeout(() => {
22455
22553
  setError(false);
22456
22554
  }, 3000);
22457
- } else if ((disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$ty6 = disconnectionData.type) === null || _disconnectionData$ty6 === void 0 ? void 0 : (_disconnectionData$ty7 = _disconnectionData$ty6.value) === null || _disconnectionData$ty7 === void 0 ? void 0 : _disconnectionData$ty7.code) == "Temporary" && parseInt(convertDateToEpoch(disconnectionData.endDate)) <= parseInt(convertDateToEpoch(disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date))) {
22555
+ } 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))) {
22458
22556
  console.log("Temporary connection");
22459
22557
  setError({
22460
22558
  key: "error",
@@ -22464,7 +22562,7 @@ const WSDisconnectionForm = _ref => {
22464
22562
  setError(false);
22465
22563
  }, 3000);
22466
22564
  } else {
22467
- history.push(match.path.replace("application-form", "documents-upload"));
22565
+ history.push(match.path.replace("application-form", "check"));
22468
22566
  }
22469
22567
  },
22470
22568
  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
@@ -22582,8 +22680,8 @@ const WSDisconnectionForm = _ref => {
22582
22680
  t: t,
22583
22681
  options: disconnectionTypeList,
22584
22682
  optionsKey: "i18nKey",
22585
- value: (_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,
22586
- selectedOption: (_disconnectionData$ty0 = disconnectionData.type) === null || _disconnectionData$ty0 === void 0 ? void 0 : _disconnectionData$ty0.value,
22683
+ 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,
22684
+ selectedOption: (_disconnectionData$ty16 = disconnectionData.type) === null || _disconnectionData$ty16 === void 0 ? void 0 : _disconnectionData$ty16.value,
22587
22685
  isMandatory: false,
22588
22686
  onSelect: val => filedChange({
22589
22687
  code: "type",
@@ -22609,11 +22707,11 @@ const WSDisconnectionForm = _ref => {
22609
22707
  style: {
22610
22708
  margin: 0
22611
22709
  }
22612
- }, t("WS_DISCONNECTION_PROPOSED_DATE"))), /*#__PURE__*/React.createElement("div", {
22710
+ }, ((_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.createElement("div", {
22613
22711
  style: {
22614
22712
  paddingLeft: isMobileForm ? "0" : "42px"
22615
22713
  }
22616
- }, /*#__PURE__*/React.createElement("div", {
22714
+ }, ((_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.createElement("div", {
22617
22715
  style: fieldStyle
22618
22716
  }, /*#__PURE__*/React.createElement("h4", {
22619
22717
  style: labelStyle
@@ -22635,37 +22733,61 @@ const WSDisconnectionForm = _ref => {
22635
22733
  style: inputWrapperStyle
22636
22734
  }, /*#__PURE__*/React.createElement(DatePicker, {
22637
22735
  date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
22638
- onChange: date => setDisconnectionData({
22639
- ...disconnectionData,
22640
- date: date
22641
- })
22642
- }))), ((_disconnectionData$ty1 = disconnectionData.type) === null || _disconnectionData$ty1 === void 0 ? void 0 : (_disconnectionData$ty10 = _disconnectionData$ty1.value) === null || _disconnectionData$ty10 === void 0 ? void 0 : _disconnectionData$ty10.code) === "Temporary" && /*#__PURE__*/React.createElement("div", {
22736
+ onChange: date => {
22737
+ var _disconnectionData$ty21, _disconnectionData$ty22;
22738
+ return setDisconnectionData({
22739
+ ...disconnectionData,
22740
+ date: date,
22741
+ 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
22742
+ });
22743
+ }
22744
+ }))), ((_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.createElement("div", {
22643
22745
  style: fieldStyle
22746
+ }, /*#__PURE__*/React.createElement("div", {
22747
+ style: {
22748
+ width: "100%"
22749
+ }
22644
22750
  }, /*#__PURE__*/React.createElement("h4", {
22645
22751
  style: labelStyle
22646
- }, t("WS_DISCONNECTION_PROPOSED_END_DATE"), " *", /*#__PURE__*/React.createElement("div", {
22647
- className: "tooltip",
22752
+ }, "REQUESTED PERIOD (IN MONTHS)"), /*#__PURE__*/React.createElement("div", {
22648
22753
  style: {
22649
- marginLeft: "8px",
22650
- position: "relative",
22651
- top: "2px"
22754
+ display: "flex",
22755
+ alignItems: "center",
22756
+ gap: "10px"
22652
22757
  }
22653
- }, /*#__PURE__*/React.createElement(InfoIcon, null), /*#__PURE__*/React.createElement("span", {
22654
- className: "tooltiptext",
22758
+ }, /*#__PURE__*/React.createElement(TextInput, {
22759
+ type: "number",
22760
+ min: "1",
22761
+ max: "24",
22762
+ value: disconnectionData.requestedPeriodMonths,
22763
+ onChange: event => {
22764
+ const months = Math.min(24, Math.max(1, Number(event.target.value)));
22765
+ setDisconnectionData({
22766
+ ...disconnectionData,
22767
+ requestedPeriodMonths: months,
22768
+ endDate: disconnectionData.date ? format(addMonths(new Date(disconnectionData.date), months), "yyyy-MM-dd") : ""
22769
+ });
22770
+ }
22771
+ }), /*#__PURE__*/React.createElement("span", {
22655
22772
  style: {
22656
- whiteSpace: isMobileForm ? "unset" : "nowrap",
22657
- fontSize: "medium",
22658
- width: isMobileForm ? "200px" : "300px"
22773
+ fontWeight: 600,
22774
+ color: "#4f6380"
22659
22775
  }
22660
- }, t("SHOULD_BE_DATE") + " " + t("DAYS_OF_APPLICATION_END_DATE")))), /*#__PURE__*/React.createElement("div", {
22661
- style: inputWrapperStyle
22662
- }, /*#__PURE__*/React.createElement(DatePicker, {
22663
- date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.endDate,
22664
- onChange: date => setDisconnectionData({
22665
- ...disconnectionData,
22666
- endDate: date
22667
- })
22668
- }))))), /*#__PURE__*/React.createElement("div", {
22776
+ }, "Months (Max 24 Months / 2 Years)")), /*#__PURE__*/React.createElement("div", {
22777
+ style: {
22778
+ marginTop: "12px",
22779
+ padding: "16px",
22780
+ border: "1px solid #f5c542",
22781
+ borderRadius: "16px",
22782
+ background: "#fffaf0",
22783
+ color: "#572b00",
22784
+ lineHeight: 1.5
22785
+ }
22786
+ }, /*#__PURE__*/React.createElement("strong", null, "\u26A0\uFE0F DJB Regulatory Warning Alert:"), /*#__PURE__*/React.createElement("div", {
22787
+ style: {
22788
+ marginTop: "4px"
22789
+ }
22790
+ }, "In case water connections remain disconnected beyond ", /*#__PURE__*/React.createElement("strong", null, "2 years (24 months)"), ", the service line will be ", /*#__PURE__*/React.createElement("strong", null, "permanently disconnected"), " from the main distribution lines, and re-opening will require standard new connection sanction fees.")))))), /*#__PURE__*/React.createElement("div", {
22669
22791
  style: sectionStyle
22670
22792
  }, /*#__PURE__*/React.createElement("div", {
22671
22793
  style: headerFlexStyle
@@ -22698,31 +22820,7 @@ const WSDisconnectionForm = _ref => {
22698
22820
  value: e
22699
22821
  }),
22700
22822
  labelKey: "WS_DISCONNECTION_REASON"
22701
- }))))), /*#__PURE__*/React.createElement("div", {
22702
- style: sectionStyle
22703
- }, /*#__PURE__*/React.createElement("div", {
22704
- style: headerFlexStyle
22705
- }, /*#__PURE__*/React.createElement("div", {
22706
- style: numberBadgeStyle
22707
- }, "5"), /*#__PURE__*/React.createElement(CardSectionHeader, {
22708
- style: {
22709
- margin: 0
22710
- }
22711
- }, t("WS_DISCONNECTION_DOCUMENTS"), " *")), /*#__PURE__*/React.createElement("div", {
22712
- style: {
22713
- paddingLeft: isMobileForm ? "0" : "42px"
22714
- }
22715
- }, 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.createElement(SelectDocument$1, {
22716
- key: index,
22717
- document: document,
22718
- t: t,
22719
- error: docError,
22720
- setError: setDocError,
22721
- setDocuments: setDocuments,
22722
- documents: documents,
22723
- setCheckRequiredFields: setCheckRequiredFields,
22724
- isMobileForm: isMobileForm
22725
- })))), docError && /*#__PURE__*/React.createElement(Toast, {
22823
+ }))))), docError && /*#__PURE__*/React.createElement(Toast, {
22726
22824
  error: (docError === null || docError === void 0 ? void 0 : docError.key) === "error",
22727
22825
  label: t(docError === null || docError === void 0 ? void 0 : docError.message),
22728
22826
  warning: docError === null || docError === void 0 ? void 0 : docError.warning,
@@ -22741,159 +22839,15 @@ const WSDisconnectionForm = _ref => {
22741
22839
  }, /*#__PURE__*/React.createElement(SubmitBar, {
22742
22840
  label: t("ACTION_TEST_SUBMIT"),
22743
22841
  onSubmit: () => onSubmit(disconnectionData),
22744
- disabled: wsDocsLoading || documents.length < 2 || !(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$ty11 = disconnectionData.type) !== null && _disconnectionData$ty11 !== void 0 && (_disconnectionData$ty12 = _disconnectionData$ty11.value) !== null && _disconnectionData$ty12 !== void 0 && _disconnectionData$ty12.code) || (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$ty13 = disconnectionData.type) === null || _disconnectionData$ty13 === void 0 ? void 0 : (_disconnectionData$ty14 = _disconnectionData$ty13.value) === null || _disconnectionData$ty14 === void 0 ? void 0 : _disconnectionData$ty14.code) === "Temporary" && !(disconnectionData !== null && disconnectionData !== void 0 && disconnectionData.endDate),
22842
+ 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),
22745
22843
  style: {
22746
22844
  margin: "10px 10px 0px 0px"
22747
22845
  }
22748
22846
  }))));
22749
22847
  };
22750
- function SelectDocument$1(_ref2) {
22751
- var _doc$dropdownData;
22752
- let {
22753
- t,
22754
- key,
22755
- document: doc,
22756
- setDocuments,
22757
- error,
22758
- setError,
22759
- documents,
22760
- setCheckRequiredFields,
22761
- isMobileForm
22762
- } = _ref2;
22763
- const filteredDocument = documents === null || documents === void 0 ? void 0 : documents.filter(item => {
22764
- var _item$documentType;
22765
- 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);
22766
- })[0];
22767
- const tenantId = Digit.ULBService.getCurrentTenantId();
22768
- const [selectedDocument, setSelectedDocument] = useState(filteredDocument ? {
22769
- ...filteredDocument,
22770
- active: true,
22771
- code: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType,
22772
- i18nKey: filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.documentType
22773
- } : (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] : {});
22774
- const [file, setFile] = useState(null);
22775
- const [uploadedFile, setUploadedFile] = useState(() => (filteredDocument === null || filteredDocument === void 0 ? void 0 : filteredDocument.fileStoreId) || null);
22776
- const handleSelectDocument = value => setSelectedDocument(value);
22777
- function selectfile(e) {
22778
- setFile(e.target.files[0]);
22779
- }
22780
- useEffect(() => {
22781
- if (selectedDocument !== null && selectedDocument !== void 0 && selectedDocument.code) {
22782
- setDocuments(prev => {
22783
- 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));
22784
- if ((uploadedFile === null || uploadedFile === void 0 ? void 0 : uploadedFile.length) === 0 || uploadedFile === null) return filteredDocumentsByDocumentType;
22785
- const filteredDocumentsByFileStoreId = filteredDocumentsByDocumentType === null || filteredDocumentsByDocumentType === void 0 ? void 0 : filteredDocumentsByDocumentType.filter(item => (item === null || item === void 0 ? void 0 : item.fileStoreId) !== uploadedFile);
22786
- return [...filteredDocumentsByFileStoreId, {
22787
- documentType: selectedDocument === null || selectedDocument === void 0 ? void 0 : selectedDocument.code,
22788
- fileStoreId: uploadedFile,
22789
- documentUid: uploadedFile,
22790
- fileName: (file === null || file === void 0 ? void 0 : file.name) || ""
22791
- }];
22792
- });
22793
- }
22794
- }, [uploadedFile, selectedDocument]);
22795
- useEffect(() => {
22796
- (function () {
22797
- try {
22798
- const _temp0 = function () {
22799
- if (file) {
22800
- setError(null);
22801
- const _temp9 = function () {
22802
- if (file.size >= 5242880) {
22803
- setError({
22804
- key: "error",
22805
- message: "CS_MAXIMUM_UPLOAD_SIZE_EXCEEDED"
22806
- });
22807
- } else {
22808
- const _temp8 = _catch(function () {
22809
- setUploadedFile(null);
22810
- return Promise.resolve(Digit.UploadServices.Filestorage("WS", file, tenantId === null || tenantId === void 0 ? void 0 : tenantId.split(".")[0])).then(function (response) {
22811
- var _response$data, _response$data$files;
22812
- 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) {
22813
- var _response$data2, _response$data2$files;
22814
- 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);
22815
- } else {
22816
- setError({
22817
- key: "error",
22818
- message: "CS_FILE_UPLOAD_ERROR"
22819
- });
22820
- }
22821
- });
22822
- }, function () {
22823
- setError({
22824
- key: "error",
22825
- message: "CS_FILE_UPLOAD_ERROR"
22826
- });
22827
- });
22828
- if (_temp8 && _temp8.then) return _temp8.then(function () {});
22829
- }
22830
- }();
22831
- if (_temp9 && _temp9.then) return _temp9.then(function () {});
22832
- }
22833
- }();
22834
- return _temp0 && _temp0.then ? _temp0.then(function () {}) : void 0;
22835
- } catch (e) {
22836
- Promise.reject(e);
22837
- }
22838
- })();
22839
- }, [file]);
22840
- const fieldStyle = {
22841
- display: "flex",
22842
- flexDirection: isMobileForm ? "column" : "row",
22843
- alignItems: isMobileForm ? "flex-start" : "flex-start",
22844
- justifyContent: "space-between",
22845
- gap: "10px",
22846
- width: "100%",
22847
- marginBottom: "16px"
22848
- };
22849
- const labelStyle = {
22850
- fontWeight: "700",
22851
- color: "#0B0C0C",
22852
- fontSize: "16px",
22853
- margin: 0,
22854
- display: "flex",
22855
- alignItems: "center",
22856
- width: isMobileForm ? "100%" : "30%"
22857
- };
22858
- const inputWrapperStyle = {
22859
- width: isMobileForm ? "100%" : "65%"
22860
- };
22861
- return /*#__PURE__*/React.createElement("div", {
22862
- style: {
22863
- marginBottom: "24px"
22864
- }
22865
- }, /*#__PURE__*/React.createElement("div", {
22866
- style: fieldStyle
22867
- }, /*#__PURE__*/React.createElement("h4", {
22868
- style: labelStyle
22869
- }, t(doc === null || doc === void 0 ? void 0 : doc.i18nKey), " *"), /*#__PURE__*/React.createElement("div", {
22870
- style: inputWrapperStyle
22871
- }, /*#__PURE__*/React.createElement("div", {
22872
- style: {
22873
- marginBottom: "8px"
22874
- }
22875
- }, /*#__PURE__*/React.createElement(Dropdown, {
22876
- t: t,
22877
- isMandatory: false,
22878
- option: doc === null || doc === void 0 ? void 0 : doc.dropdownData,
22879
- selected: selectedDocument,
22880
- optionKey: "i18nKey",
22881
- select: handleSelectDocument
22882
- })), /*#__PURE__*/React.createElement(UploadFile, {
22883
- id: `noc-doc-1-${key}`,
22884
- extraStyleName: "propertyCreate",
22885
- accept: "image/*, .pdf, .png, .jpeg, .jpg",
22886
- onUpload: selectfile,
22887
- onDelete: () => {
22888
- setUploadedFile(null);
22889
- setCheckRequiredFields(true);
22890
- },
22891
- message: uploadedFile ? `1 ${t(`CS_ACTION_FILEUPLOADED`)}` : t(`ES_NO_FILE_SELECTED_LABEL`)
22892
- }))));
22893
- }
22894
22848
 
22895
22849
  const WSRestorationForm = _ref => {
22896
- var _applicationData$appl2, _applicationData$appl3, _applicationData$appl4, _disconnectionData$re4;
22850
+ var _applicationData$appl, _applicationData$appl4, _applicationData$appl5, _applicationData$appl6, _applicationData$appl7, _disconnectionData$re5, _applicationData$appl8;
22897
22851
  let {
22898
22852
  t,
22899
22853
  config,
@@ -22903,16 +22857,22 @@ const WSRestorationForm = _ref => {
22903
22857
  const stateCode = Digit.ULBService.getStateId();
22904
22858
  const tenantId = Digit.ULBService.getCurrentTenantId();
22905
22859
  const isMobile = window.Digit.Utils.browser.isMobile();
22906
- const applicationData = Digit.SessionStorage.get("WS_DISCONNECTION");
22860
+ const sessionData = Digit.SessionStorage.get("WS_DISCONNECTION") || {};
22861
+ const [applicationData, setApplicationData] = useState(sessionData);
22907
22862
  const history = useHistory();
22908
22863
  const match = useRouteMatch();
22864
+ const location = useLocation();
22865
+ const queryParams = new URLSearchParams(location.search);
22866
+ const connectionNumberFromQuery = queryParams.get("connectionNumber") || queryParams.get("applicationNumber") || "";
22867
+ const [searchConnNo, setSearchConnNo] = 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) || "");
22868
+ const [isSearching, setIsSearching] = useState(false);
22909
22869
  const [disconnectionData, setDisconnectionData] = useState({
22910
- type: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.type : "",
22911
- date: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
22912
- reason: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
22913
- documents: applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
22870
+ type: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.type : "",
22871
+ date: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.date : "",
22872
+ reason: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.reason : "",
22873
+ documents: applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []
22914
22874
  });
22915
- const [documents, setDocuments] = useState(applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
22875
+ const [documents, setDocuments] = useState(applicationData !== null && applicationData !== void 0 && applicationData.WSDisconnectionForm ? applicationData.WSDisconnectionForm.documents : []);
22916
22876
  const [error, setError] = useState(null);
22917
22877
  const [disconnectionTypeList, setDisconnectionTypeList] = useState([]);
22918
22878
  const [checkRequiredFields, setCheckRequiredFields] = useState(false);
@@ -22963,6 +22923,105 @@ const WSRestorationForm = _ref => {
22963
22923
  const closeToastOfError = () => {
22964
22924
  setError(null);
22965
22925
  };
22926
+ const fetchConnection = function (connNo) {
22927
+ try {
22928
+ const trimmed = (connNo || "").trim();
22929
+ if (!trimmed) {
22930
+ setError({
22931
+ warning: true,
22932
+ message: "PLEASE_ENTER_CONNECTION_NUMBER"
22933
+ });
22934
+ setTimeout(() => setError(null), 3000);
22935
+ return Promise.resolve();
22936
+ }
22937
+ setIsSearching(true);
22938
+ return Promise.resolve(_catch(function () {
22939
+ const searchParams = {
22940
+ connectionNumber: trimmed,
22941
+ searchType: "CONNECTION",
22942
+ isConnectionSearch: true
22943
+ };
22944
+ let detectedService = "WATER";
22945
+ return Promise.resolve(Digit.WSService.search({
22946
+ tenantId,
22947
+ filters: searchParams,
22948
+ businessService: "WS"
22949
+ }).catch(() => null)).then(function (wsRes) {
22950
+ var _wsRes$WaterConnectio;
22951
+ function _temp4() {
22952
+ function _temp2() {
22953
+ const fullData = {
22954
+ applicationData: conn,
22955
+ propertyDetails,
22956
+ connectionNo: conn.connectionNo,
22957
+ serviceType: detectedService
22958
+ };
22959
+ setApplicationData(fullData);
22960
+ Digit.SessionStorage.set("WS_DISCONNECTION", fullData);
22961
+ setIsSearching(false);
22962
+ }
22963
+ if (!conn) {
22964
+ setIsSearching(false);
22965
+ setError({
22966
+ key: "error",
22967
+ message: "CONNECTION_NOT_FOUND"
22968
+ });
22969
+ setTimeout(() => setError(null), 4000);
22970
+ return;
22971
+ }
22972
+ conn.serviceType = detectedService;
22973
+ let propertyDetails = null;
22974
+ const _temp = function (_conn) {
22975
+ if ((_conn = conn) !== null && _conn !== void 0 && _conn.propertyId) {
22976
+ var _conn2;
22977
+ return Promise.resolve(Digit.PTService.search({
22978
+ tenantId: ((_conn2 = conn) === null || _conn2 === void 0 ? void 0 : _conn2.tenantId) || tenantId,
22979
+ filters: {
22980
+ propertyIds: conn.propertyId
22981
+ },
22982
+ auth: true
22983
+ }).catch(() => null)).then(function (ptRes) {
22984
+ var _ptRes$Properties;
22985
+ propertyDetails = ptRes === null || ptRes === void 0 ? void 0 : (_ptRes$Properties = ptRes.Properties) === null || _ptRes$Properties === void 0 ? void 0 : _ptRes$Properties[0];
22986
+ });
22987
+ }
22988
+ }();
22989
+ return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
22990
+ }
22991
+ let conn = wsRes === null || wsRes === void 0 ? void 0 : (_wsRes$WaterConnectio = wsRes.WaterConnection) === null || _wsRes$WaterConnectio === void 0 ? void 0 : _wsRes$WaterConnectio[0];
22992
+ const _temp3 = function () {
22993
+ if (!conn) {
22994
+ return Promise.resolve(Digit.WSService.search({
22995
+ tenantId,
22996
+ filters: searchParams,
22997
+ businessService: "SW"
22998
+ }).catch(() => null)).then(function (swRes) {
22999
+ var _swRes$SewerageConnec;
23000
+ conn = swRes === null || swRes === void 0 ? void 0 : (_swRes$SewerageConnec = swRes.SewerageConnections) === null || _swRes$SewerageConnec === void 0 ? void 0 : _swRes$SewerageConnec[0];
23001
+ if (conn) detectedService = "SEWERAGE";
23002
+ });
23003
+ }
23004
+ }();
23005
+ return _temp3 && _temp3.then ? _temp3.then(_temp4) : _temp4(_temp3);
23006
+ });
23007
+ }, function (e) {
23008
+ setIsSearching(false);
23009
+ setError({
23010
+ key: "error",
23011
+ message: (e === null || e === void 0 ? void 0 : e.message) || "Failed to search connection"
23012
+ });
23013
+ setTimeout(() => setError(null), 4000);
23014
+ }));
23015
+ } catch (e) {
23016
+ return Promise.reject(e);
23017
+ }
23018
+ };
23019
+ useEffect(() => {
23020
+ var _applicationData$appl2;
23021
+ if (!(applicationData !== null && applicationData !== void 0 && (_applicationData$appl2 = applicationData.applicationData) !== null && _applicationData$appl2 !== void 0 && _applicationData$appl2.connectionNo) && connectionNumberFromQuery) {
23022
+ fetchConnection(connectionNumberFromQuery);
23023
+ }
23024
+ }, [connectionNumberFromQuery]);
22966
23025
  useEffect(() => {
22967
23026
  const oldData = {
22968
23027
  ...disconnectionData
@@ -23007,174 +23066,170 @@ const WSRestorationForm = _ref => {
23007
23066
  };
23008
23067
  const onSubmit = function (data) {
23009
23068
  try {
23069
+ var _disconnectionData$re, _disconnectionData$re2, _applicationData$appl3, _currentAppData$appli, _currentAppData$appli2;
23070
+ 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;
23010
23071
  const appDate = new Date();
23011
- const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), 'yyyy-MM-dd').toString();
23012
- const _temp6 = function () {
23013
- if (convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date) <= convertDateToEpoch(proposedDate)) {
23014
- setError({
23015
- key: "error",
23016
- message: "PROPOSED_DISCONNECTION_INVALID_DATE"
23017
- });
23018
- setTimeout(() => {
23019
- setError(false);
23020
- }, 3000);
23021
- } else {
23022
- const _temp5 = function (_disconnectionData$re) {
23023
- 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) === "") {
23024
- setError({
23025
- warning: true,
23026
- message: "PLEASE_FILL_MANDATORY_DETAILS"
23027
- });
23028
- setTimeout(() => {
23029
- setError(false);
23030
- }, 3000);
23031
- } else {
23032
- var _applicationData$appl;
23033
- return Promise.resolve(createPayloadOfWSReconnection(data, applicationData, applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl = applicationData.applicationData) === null || _applicationData$appl === void 0 ? void 0 : _applicationData$appl.serviceType)).then(function (payload) {
23034
- const _temp4 = function (_payload$WaterConnect) {
23035
- if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
23036
- payload.WaterConnection.isdisconnection = false;
23037
- payload.WaterConnection.isDisconnectionTemporary = true;
23038
- payload.WaterConnection["reconnectionReason"] = payload.WaterConnection.disconnectionReason;
23039
- payload.WaterConnection.disconnectionReason = "";
23040
- payload["reconnectRequest"] = true;
23041
- payload.disconnectRequest = false;
23042
- const _temp = function () {
23043
- if (waterMutation) {
23044
- setIsEnableLoader(true);
23045
- return Promise.resolve(waterMutation(payload, {
23072
+ const proposedDate = format(addDays(appDate, slaDays), 'yyyy-MM-dd').toString();
23073
+ 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();
23074
+ if (slaDays > 0 && data !== null && data !== void 0 && data.date && convertDateToEpoch(data === null || data === void 0 ? void 0 : data.date) < convertDateToEpoch(proposedDate)) {
23075
+ setError({
23076
+ key: "error",
23077
+ message: "PROPOSED_RESTORATION_INVALID_DATE"
23078
+ });
23079
+ setTimeout(() => setError(null), 3000);
23080
+ return Promise.resolve();
23081
+ }
23082
+ if (!reasonText || !(disconnectionData !== null && disconnectionData !== void 0 && disconnectionData.date)) {
23083
+ setError({
23084
+ warning: true,
23085
+ message: "PLEASE_FILL_MANDATORY_DETAILS"
23086
+ });
23087
+ setTimeout(() => setError(null), 3000);
23088
+ return Promise.resolve();
23089
+ }
23090
+ 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");
23091
+ if (!(currentAppData !== null && currentAppData !== void 0 && (_currentAppData$appli = currentAppData.applicationData) !== null && _currentAppData$appli !== void 0 && _currentAppData$appli.connectionNo)) {
23092
+ setError({
23093
+ key: "error",
23094
+ message: "PLEASE_SEARCH_AND_SELECT_CONNECTION"
23095
+ });
23096
+ setTimeout(() => setError(null), 3000);
23097
+ return Promise.resolve();
23098
+ }
23099
+ 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) {
23100
+ const _temp8 = function (_payload$WaterConnect) {
23101
+ if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
23102
+ payload.WaterConnection.isdisconnection = false;
23103
+ payload.WaterConnection.isDisconnectionTemporary = true;
23104
+ payload.WaterConnection["reconnectionReason"] = reasonText;
23105
+ payload.WaterConnection.disconnectionReason = "";
23106
+ payload["reconnectRequest"] = true;
23107
+ payload.disconnectRequest = false;
23108
+ const _temp5 = function () {
23109
+ if (waterMutation) {
23110
+ setIsEnableLoader(true);
23111
+ return Promise.resolve(waterMutation(payload, {
23112
+ onError: (error, variables) => {
23113
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2, _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
23114
+ setIsEnableLoader(false);
23115
+ setError({
23116
+ key: "error",
23117
+ 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"
23118
+ });
23119
+ setTimeout(closeToastOfError, 5000);
23120
+ },
23121
+ onSuccess: function (createdData, variables) {
23122
+ try {
23123
+ var _createdData$WaterCon;
23124
+ 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) {
23125
+ let waterConnectionUpdate = {
23126
+ WaterConnection: response,
23127
+ disconnectRequest: false,
23128
+ reconnectRequest: true
23129
+ };
23130
+ return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
23046
23131
  onError: (error, variables) => {
23047
- var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
23132
+ var _error$response3, _error$response3$data, _error$response3$data2, _error$response3$data3, _error$response4, _error$response4$data, _error$response4$data2, _error$response4$data3;
23048
23133
  setIsEnableLoader(false);
23049
23134
  setError({
23050
23135
  key: "error",
23051
- 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
23136
+ 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"
23052
23137
  });
23053
23138
  setTimeout(closeToastOfError, 5000);
23054
23139
  },
23055
- onSuccess: function (data, variables) {
23056
- try {
23057
- var _data$WaterConnection;
23058
- return Promise.resolve(updatePayloadOfWSRestoration(data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0], "WATER")).then(function (response) {
23059
- let waterConnectionUpdate = {
23060
- WaterConnection: response
23061
- };
23062
- waterConnectionUpdate = {
23063
- ...waterConnectionUpdate,
23064
- disconnectRequest: false,
23065
- reconnectRequest: true
23066
- };
23067
- console.log("response");
23068
- return Promise.resolve(waterUpdateMutation(waterConnectionUpdate, {
23069
- onError: (error, variables) => {
23070
- var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
23071
- setIsEnableLoader(false);
23072
- setError({
23073
- key: "error",
23074
- 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
23075
- });
23076
- setTimeout(closeToastOfError, 5000);
23077
- },
23078
- onSuccess: (data, variables) => {
23079
- var _data$WaterConnection2, _data$WaterConnection3, _data$WaterConnection4;
23080
- Digit.SessionStorage.set("WS_DISCONNECTION", {
23081
- ...applicationData,
23082
- DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection2 = data.WaterConnection) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2[0]
23083
- });
23084
- 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}`);
23085
- }
23086
- })).then(function () {});
23087
- });
23088
- } catch (e) {
23089
- return Promise.reject(e);
23090
- }
23140
+ onSuccess: (updatedData, variables) => {
23141
+ var _updatedData$WaterCon, _updatedData$WaterCon2, _updatedData$WaterCon3;
23142
+ setIsEnableLoader(false);
23143
+ Digit.SessionStorage.set("WS_DISCONNECTION", {
23144
+ ...currentAppData,
23145
+ DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$WaterCon = updatedData.WaterConnection) === null || _updatedData$WaterCon === void 0 ? void 0 : _updatedData$WaterCon[0]
23146
+ });
23147
+ 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}`);
23091
23148
  }
23092
23149
  })).then(function () {});
23093
- }
23094
- }();
23095
- if (_temp && _temp.then) return _temp.then(function () {});
23096
- } else {
23097
- const _temp3 = function (_payload$SewerageConn) {
23098
- if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
23099
- payload.SewerageConnection.isdisconnection = false;
23100
- payload.SewerageConnection["reconnectionReason"] = payload.SewerageConnection.disconnectionReason;
23101
- payload.SewerageConnection.disconnectionReason = "";
23102
- payload.SewerageConnection.isDisconnectionTemporary = true;
23103
- payload["reconnectRequest"] = true;
23104
- payload.disconnectRequest = false;
23105
- const _temp2 = function () {
23106
- if (sewerageMutation) {
23107
- setIsEnableLoader(true);
23108
- return Promise.resolve(sewerageMutation(payload, {
23150
+ });
23151
+ } catch (e) {
23152
+ return Promise.reject(e);
23153
+ }
23154
+ }
23155
+ })).then(function () {});
23156
+ }
23157
+ }();
23158
+ if (_temp5 && _temp5.then) return _temp5.then(function () {});
23159
+ } else {
23160
+ const _temp7 = function (_payload$SewerageConn) {
23161
+ if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
23162
+ payload.SewerageConnection.isdisconnection = false;
23163
+ payload.SewerageConnection.isDisconnectionTemporary = true;
23164
+ payload.SewerageConnection["reconnectionReason"] = reasonText;
23165
+ payload.SewerageConnection.disconnectionReason = "";
23166
+ payload["reconnectRequest"] = true;
23167
+ payload.disconnectRequest = false;
23168
+ const _temp6 = function () {
23169
+ if (sewerageMutation) {
23170
+ setIsEnableLoader(true);
23171
+ return Promise.resolve(sewerageMutation(payload, {
23172
+ onError: (error, variables) => {
23173
+ var _error$response5, _error$response5$data, _error$response5$data2, _error$response5$data3, _error$response6, _error$response6$data, _error$response6$data2, _error$response6$data3;
23174
+ setIsEnableLoader(false);
23175
+ setError({
23176
+ key: "error",
23177
+ 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"
23178
+ });
23179
+ setTimeout(closeToastOfError, 5000);
23180
+ },
23181
+ onSuccess: function (createdData, variables) {
23182
+ try {
23183
+ var _createdData$Sewerage;
23184
+ 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) {
23185
+ let sewerageConnectionUpdate = {
23186
+ SewerageConnection: response,
23187
+ disconnectRequest: false,
23188
+ reconnectRequest: true
23189
+ };
23190
+ return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
23109
23191
  onError: (error, variables) => {
23110
- var _error$response5, _error$response5$data, _error$response5$data2, _error$response6, _error$response6$data, _error$response6$data2;
23192
+ var _error$response7, _error$response7$data, _error$response7$data2, _error$response7$data3, _error$response8, _error$response8$data, _error$response8$data2, _error$response8$data3;
23111
23193
  setIsEnableLoader(false);
23112
23194
  setError({
23113
23195
  key: "error",
23114
- message: error !== null && error !== void 0 && (_error$response5 = error.response) !== null && _error$response5 !== void 0 && (_error$response5$data = _error$response5.data) !== null && _error$response5$data !== void 0 && (_error$response5$data2 = _error$response5$data.Errors) !== null && _error$response5$data2 !== void 0 && _error$response5$data2[0].message ? error === null || error === void 0 ? void 0 : (_error$response6 = error.response) === null || _error$response6 === void 0 ? void 0 : (_error$response6$data = _error$response6.data) === null || _error$response6$data === void 0 ? void 0 : (_error$response6$data2 = _error$response6$data.Errors) === null || _error$response6$data2 === void 0 ? void 0 : _error$response6$data2[0].message : error
23196
+ 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"
23115
23197
  });
23116
23198
  setTimeout(closeToastOfError, 5000);
23117
23199
  },
23118
- onSuccess: function (data, variables) {
23119
- try {
23120
- var _data$SewerageConnect;
23121
- return Promise.resolve(updatePayloadOfWSRestoration(data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0], "SEWERAGE")).then(function (response) {
23122
- let sewerageConnectionUpdate = {
23123
- SewerageConnection: response
23124
- };
23125
- sewerageConnectionUpdate = {
23126
- ...sewerageConnectionUpdate,
23127
- disconnectRequest: false,
23128
- reconnectRequest: true
23129
- };
23130
- return Promise.resolve(sewerageUpdateMutation(sewerageConnectionUpdate, {
23131
- onError: (error, variables) => {
23132
- var _error$response7, _error$response7$data, _error$response7$data2, _error$response8, _error$response8$data, _error$response8$data2;
23133
- setIsEnableLoader(false);
23134
- setError({
23135
- key: "error",
23136
- 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
23137
- });
23138
- setTimeout(closeToastOfError, 5000);
23139
- },
23140
- onSuccess: (data, variables) => {
23141
- var _data$SewerageConnect2, _data$SewerageConnect3, _data$SewerageConnect4;
23142
- Digit.SessionStorage.set("WS_DISCONNECTION", {
23143
- ...applicationData,
23144
- DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect2 = data.SewerageConnections) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2[0]
23145
- });
23146
- 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}`);
23147
- }
23148
- })).then(function () {});
23149
- });
23150
- } catch (e) {
23151
- return Promise.reject(e);
23152
- }
23200
+ onSuccess: (updatedData, variables) => {
23201
+ var _updatedData$Sewerage, _updatedData$Sewerage2, _updatedData$Sewerage3;
23202
+ setIsEnableLoader(false);
23203
+ Digit.SessionStorage.set("WS_DISCONNECTION", {
23204
+ ...currentAppData,
23205
+ DisconnectionResponse: updatedData === null || updatedData === void 0 ? void 0 : (_updatedData$Sewerage = updatedData.SewerageConnections) === null || _updatedData$Sewerage === void 0 ? void 0 : _updatedData$Sewerage[0]
23206
+ });
23207
+ 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}`);
23153
23208
  }
23154
23209
  })).then(function () {});
23155
- }
23156
- }();
23157
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
23210
+ });
23211
+ } catch (e) {
23212
+ return Promise.reject(e);
23213
+ }
23158
23214
  }
23159
- }();
23160
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
23215
+ })).then(function () {});
23161
23216
  }
23162
23217
  }();
23163
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
23164
- });
23165
- }
23166
- }();
23167
- if (_temp5 && _temp5.then) return _temp5.then(function () {});
23168
- }
23169
- }();
23170
- return Promise.resolve(_temp6 && _temp6.then ? _temp6.then(function () {}) : void 0);
23218
+ if (_temp6 && _temp6.then) return _temp6.then(function () {});
23219
+ }
23220
+ }();
23221
+ if (_temp7 && _temp7.then) return _temp7.then(function () {});
23222
+ }
23223
+ }();
23224
+ if (_temp8 && _temp8.then) return _temp8.then(function () {});
23225
+ });
23171
23226
  } catch (e) {
23172
23227
  return Promise.reject(e);
23173
23228
  }
23174
23229
  };
23175
23230
  if (isMdmsLoading || wsDocsLoading || isEnableLoader || slaLoading) return /*#__PURE__*/React.createElement(Loader, null);
23176
23231
  if (userType === 'citizen') {
23177
- var _disconnectionData$re2, _disconnectionData$re3;
23232
+ var _disconnectionData$re3, _disconnectionData$re4;
23178
23233
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CitizenInfoLabel, {
23179
23234
  style: {
23180
23235
  margin: "0px",
@@ -23229,7 +23284,7 @@ const WSRestorationForm = _ref => {
23229
23284
  optionKey: "i18nKey",
23230
23285
  t: t,
23231
23286
  name: "reason",
23232
- value: (_disconnectionData$re2 = disconnectionData.reason) === null || _disconnectionData$re2 === void 0 ? void 0 : _disconnectionData$re2.value,
23287
+ value: ((_disconnectionData$re3 = disconnectionData.reason) === null || _disconnectionData$re3 === void 0 ? void 0 : _disconnectionData$re3.value) || (typeof disconnectionData.reason === "string" ? disconnectionData.reason : ""),
23233
23288
  onChange: e => filedChange({
23234
23289
  code: "reason",
23235
23290
  value: e.target.value
@@ -23241,7 +23296,7 @@ const WSRestorationForm = _ref => {
23241
23296
  const proposedDate = format(addDays(appDate, slaData === null || slaData === void 0 ? void 0 : slaData.slaDays), 'yyyy-MM-dd').toString();
23242
23297
  history.push(match.path.replace("restoration-application", "check"));
23243
23298
  },
23244
- disabled: (disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$re3 = disconnectionData.reason) === null || _disconnectionData$re3 === void 0 ? void 0 : _disconnectionData$re3.value) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.reason) === "" || (disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date) === "" ? true : false
23299
+ 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
23245
23300
  }), error && /*#__PURE__*/React.createElement(Toast, {
23246
23301
  error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
23247
23302
  label: t(error === null || error === void 0 ? void 0 : error.message),
@@ -23269,22 +23324,48 @@ const WSRestorationForm = _ref => {
23269
23324
  paddingTop: "20px",
23270
23325
  marginTop: "10px"
23271
23326
  }
23272
- }, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("CS_TITLE_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
23327
+ }, !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl4 = applicationData.applicationData) !== null && _applicationData$appl4 !== void 0 && _applicationData$appl4.connectionNo) ? /*#__PURE__*/React.createElement("div", {
23328
+ style: {
23329
+ marginBottom: "20px"
23330
+ }
23331
+ }, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("WS_SEARCH_CONNECTION_LABEL") || "Search Disconnected Connection"), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
23332
+ style: {
23333
+ fontWeight: "700",
23334
+ marginTop: "10px"
23335
+ }
23336
+ }, t("WS_CONSUMER_CODE_LABEL") || "Connection / K-Number"), /*#__PURE__*/React.createElement("div", {
23337
+ className: "field",
23338
+ style: {
23339
+ display: "flex",
23340
+ gap: "10px",
23341
+ alignItems: "center"
23342
+ }
23343
+ }, /*#__PURE__*/React.createElement(TextInput, {
23344
+ t: t,
23345
+ type: "text",
23346
+ value: searchConnNo,
23347
+ onChange: e => setSearchConnNo(e.target.value),
23348
+ placeholder: t("ENTER_CONNECTION_NUMBER") || "Enter Connection Number / K-Number"
23349
+ }), /*#__PURE__*/React.createElement(SubmitBar, {
23350
+ label: isSearching ? t("SEARCHING") || "Searching..." : t("ES_COMMON_SEARCH") || "Search",
23351
+ onSubmit: () => fetchConnection(searchConnNo),
23352
+ disabled: isSearching || !(searchConnNo !== null && searchConnNo !== void 0 && searchConnNo.trim())
23353
+ })))) : /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardSectionHeader, null, t("CS_TITLE_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
23273
23354
  key: t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL"),
23274
23355
  label: `${t("PDF_STATIC_LABEL_CONSUMER_NUMBER_LABEL")}`,
23275
- text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl2 = applicationData.applicationData) === null || _applicationData$appl2 === void 0 ? void 0 : _applicationData$appl2.connectionNo,
23356
+ text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl5 = applicationData.applicationData) === null || _applicationData$appl5 === void 0 ? void 0 : _applicationData$appl5.connectionNo,
23276
23357
  className: "border-none"
23277
23358
  }), /*#__PURE__*/React.createElement(Row, {
23278
23359
  key: t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL"),
23279
23360
  label: `${t("PDF_STATIC_LABEL_TYPE_OF_SERVICE_LABEL")}`,
23280
- text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl3 = applicationData.applicationData) === null || _applicationData$appl3 === void 0 ? void 0 : _applicationData$appl3.serviceType,
23361
+ text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl6 = applicationData.applicationData) === null || _applicationData$appl6 === void 0 ? void 0 : _applicationData$appl6.serviceType,
23281
23362
  className: "border-none"
23282
23363
  }), /*#__PURE__*/React.createElement(Row, {
23283
23364
  key: t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL"),
23284
23365
  label: `${t("PDF_STATIC_LABEL_PROPERTY_ID_LABEL")}`,
23285
- text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl4 = applicationData.applicationData) === null || _applicationData$appl4 === void 0 ? void 0 : _applicationData$appl4.propertyId,
23366
+ text: applicationData === null || applicationData === void 0 ? void 0 : (_applicationData$appl7 = applicationData.applicationData) === null || _applicationData$appl7 === void 0 ? void 0 : _applicationData$appl7.propertyId,
23286
23367
  className: "border-none"
23287
- })), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
23368
+ }))), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
23288
23369
  style: {
23289
23370
  marginTop: "-5px",
23290
23371
  fontWeight: "700",
@@ -23303,7 +23384,7 @@ const WSRestorationForm = _ref => {
23303
23384
  whiteSpace: Digit.Utils.browser.isMobile() ? "unset" : "nowrap",
23304
23385
  fontSize: "medium"
23305
23386
  }
23306
- }, t("SHOULD_BE_DATE") + " " + (slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) + " " + t("DAYS_OF_APPLICATION_DATE")))), /*#__PURE__*/React.createElement("div", {
23387
+ }, t("SHOULD_BE_DATE") + " " + ((slaData === null || slaData === void 0 ? void 0 : slaData.slaDays) || 0) + " " + t("DAYS_OF_APPLICATION_DATE")))), /*#__PURE__*/React.createElement("div", {
23307
23388
  className: "field"
23308
23389
  }, /*#__PURE__*/React.createElement(DatePicker, {
23309
23390
  date: disconnectionData === null || disconnectionData === void 0 ? void 0 : disconnectionData.date,
@@ -23327,7 +23408,7 @@ const WSRestorationForm = _ref => {
23327
23408
  optionKey: "i18nKey",
23328
23409
  t: t,
23329
23410
  name: "reason",
23330
- value: (_disconnectionData$re4 = disconnectionData.reason) === null || _disconnectionData$re4 === void 0 ? void 0 : _disconnectionData$re4.value,
23411
+ value: ((_disconnectionData$re5 = disconnectionData.reason) === null || _disconnectionData$re5 === void 0 ? void 0 : _disconnectionData$re5.value) || (typeof disconnectionData.reason === "string" ? disconnectionData.reason : ""),
23331
23412
  onChange: e => filedChange({
23332
23413
  code: "reason",
23333
23414
  value: e.target.value
@@ -23348,7 +23429,8 @@ const WSRestorationForm = _ref => {
23348
23429
  onSubmit: () => onSubmit(disconnectionData),
23349
23430
  style: {
23350
23431
  margin: "10px 10px 0px 0px"
23351
- }
23432
+ },
23433
+ disabled: !(applicationData !== null && applicationData !== void 0 && (_applicationData$appl8 = applicationData.applicationData) !== null && _applicationData$appl8 !== void 0 && _applicationData$appl8.connectionNo) || isSearching
23352
23434
  })));
23353
23435
  };
23354
23436
 
@@ -23401,7 +23483,7 @@ function WSDisconnectionDocumentsForm(_ref) {
23401
23483
  config: config,
23402
23484
  onSelect: handleSubmit
23403
23485
  }, wsDocs === null || wsDocs === void 0 ? void 0 : (_wsDocs$Disconnection = wsDocs.DisconnectionDocuments) === null || _wsDocs$Disconnection === void 0 ? void 0 : _wsDocs$Disconnection.map((document, index) => {
23404
- return /*#__PURE__*/React.createElement(SelectDocument$2, {
23486
+ return /*#__PURE__*/React.createElement(SelectDocument$1, {
23405
23487
  key: index,
23406
23488
  document: document,
23407
23489
  t: t,
@@ -23431,7 +23513,7 @@ function WSDisconnectionDocumentsForm(_ref) {
23431
23513
  onClose: () => setError(null)
23432
23514
  })));
23433
23515
  }
23434
- function SelectDocument$2(_ref2) {
23516
+ function SelectDocument$1(_ref2) {
23435
23517
  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;
23436
23518
  let {
23437
23519
  t,
@@ -23675,7 +23757,7 @@ const BannerPicker = props => {
23675
23757
  });
23676
23758
  };
23677
23759
  const WSDisconnectAcknowledgement = () => {
23678
- var _disconnectionData$Di4;
23760
+ var _disconnectionData$Di3;
23679
23761
  const {
23680
23762
  t
23681
23763
  } = useTranslation();
@@ -23686,15 +23768,14 @@ const WSDisconnectAcknowledgement = () => {
23686
23768
  PDFdata.then(res => Digit.Utils.pdf.generatev1(res));
23687
23769
  };
23688
23770
  const getPaymentUrl = () => {
23689
- var _disconnectionData$Di, _disconnectionData$Di2, _disconnectionData$Di3, _disconnectionData$pr, _disconnectionData$pr2;
23771
+ var _disconnectionData$Di, _disconnectionData$Di2, _disconnectionData$pr, _disconnectionData$pr2;
23690
23772
  const appNo = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di === void 0 ? void 0 : _disconnectionData$Di.applicationNo;
23691
- const connNo = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di2 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di2 === void 0 ? void 0 : _disconnectionData$Di2.connectionNo;
23692
23773
  const isWater = appNo === null || appNo === void 0 ? void 0 : appNo.includes("WS");
23693
23774
  const businessService = isWater ? "WS.DISCONNECTION" : "SW.DISCONNECTION";
23694
- const formattedConnNo = connNo ? connNo.split("/").join("+") : "";
23695
- const tenantId = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di3 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di3 === void 0 ? void 0 : _disconnectionData$Di3.tenantId;
23775
+ const formattedApplicationNo = appNo ? appNo.split("/").join("+") : "";
23776
+ const tenantId = disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di2 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di2 === void 0 ? void 0 : _disconnectionData$Di2.tenantId;
23696
23777
  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(",");
23697
- return `/digit-ui/citizen/payment/my-bills/${businessService}/${formattedConnNo}?workflow=WNS&tenantId=${tenantId}&ConsumerName=${ownerName}&isDisoconnectFlow=true&consumerCode=${appNo}`;
23778
+ return `/digit-ui/citizen/payment/my-bills/${businessService}/${formattedApplicationNo}?workflow=WNS&tenantId=${tenantId}&ConsumerName=${ownerName}&isDisoconnectFlow=true&consumerCode=${appNo}`;
23698
23779
  };
23699
23780
  return /*#__PURE__*/React.createElement(Card, {
23700
23781
  style: {
@@ -23703,7 +23784,7 @@ const WSDisconnectAcknowledgement = () => {
23703
23784
  }, /*#__PURE__*/React.createElement(CardSectionHeader, null, /*#__PURE__*/React.createElement(BannerPicker, {
23704
23785
  isSuccess: true,
23705
23786
  message: t("WS_APPLICATION_COMPLETED_SUCCESSFULLY_LABEL"),
23706
- applicationNumber: disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di4 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di4 === void 0 ? void 0 : _disconnectionData$Di4.applicationNo
23787
+ applicationNumber: disconnectionData === null || disconnectionData === void 0 ? void 0 : (_disconnectionData$Di3 = disconnectionData.DisconnectionResponse) === null || _disconnectionData$Di3 === void 0 ? void 0 : _disconnectionData$Di3.applicationNo
23707
23788
  }), " ", /*#__PURE__*/React.createElement("successSvg", null)), /*#__PURE__*/React.createElement(CardText, null, t('WS_DISCONNECTION_APPLICATION_SUCC_MSG')), /*#__PURE__*/React.createElement(SubmitBar, {
23708
23789
  label: t("WS_DOWNLOAD_ACK_FORM"),
23709
23790
  onSubmit: handleDownloadPdf
@@ -24774,7 +24855,7 @@ const WSDjbEmployee = _ref => {
24774
24855
  borderBottom: "1px solid #e0e0e0"
24775
24856
  }
24776
24857
  }, t("ABG_COMMON_TABLE_COL_ACTION")))), /*#__PURE__*/React.createElement("tbody", null, formData.dueVerification.map((dueItem, index) => {
24777
- var _formData$serviceName, _formData$application, _dueItem$kno;
24858
+ var _formData$serviceName, _formData$application, _dueItem$kno, _formData$serviceName2, _formData$application2;
24778
24859
  return /*#__PURE__*/React.createElement("tr", {
24779
24860
  key: `due-${index}`,
24780
24861
  style: {
@@ -24812,8 +24893,8 @@ const WSDjbEmployee = _ref => {
24812
24893
  className: "link"
24813
24894
  }, /*#__PURE__*/React.createElement(Link, {
24814
24895
  to: {
24815
- 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("/", "+")}`,
24816
- 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}`,
24896
+ 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}`,
24897
+ 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`,
24817
24898
  state: {
24818
24899
  fromApplicationDetails: true
24819
24900
  }
@@ -25497,7 +25578,7 @@ const SearchFormFieldsComponents = _ref => {
25497
25578
  };
25498
25579
 
25499
25580
  const FilterFormFieldsComponent = _ref => {
25500
- var _statuses$filter, _statuses$filter2, _statuses$filter3, _statuses$filter4, _statuses$filter5, _statuses$filter6, _statuses$filter7;
25581
+ var _statuses$filter, _statuses$filter2, _statuses$filter3, _statuses$filter4, _statuses$filter5, _statuses$filter6, _statuses$filter7, _statuses$filter8, _statuses$filter9;
25501
25582
  let {
25502
25583
  statuses,
25503
25584
  isInboxLoading,
@@ -25526,16 +25607,20 @@ const FilterFormFieldsComponent = _ref => {
25526
25607
  totalModifyWSCount = 0,
25527
25608
  totalDisconnectionWSCount = 0,
25528
25609
  totalMutationWSCount = 0,
25610
+ totalReconnectionWSCount = 0,
25529
25611
  totalnewSWCOunt = 0,
25530
25612
  totalModifySWCount = 0,
25531
- totalDisconnectionSWCount = 0;
25613
+ totalDisconnectionSWCount = 0,
25614
+ totalReconnectionSWCount = 0;
25532
25615
  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));
25533
25616
  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));
25534
25617
  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));
25535
25618
  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));
25536
- const totalnewSW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter5 = statuses.filter(e => e.businessservice === "NewSW1")) === null || _statuses$filter5 === void 0 ? void 0 : _statuses$filter5.forEach(data => totalnewSWCOunt = totalnewSWCOunt + (data === null || data === void 0 ? void 0 : data.count));
25537
- const totalModifySW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter6 = statuses.filter(e => e.businessservice === "ModifySWConnection")) === null || _statuses$filter6 === void 0 ? void 0 : _statuses$filter6.forEach(data => totalModifySWCount = totalModifySWCount + (data === null || data === void 0 ? void 0 : data.count));
25538
- const totalDisconnectionSW = statuses === null || statuses === void 0 ? void 0 : (_statuses$filter7 = statuses.filter(e => e.businessservice === "DisconnectSWConnection")) === null || _statuses$filter7 === void 0 ? void 0 : _statuses$filter7.forEach(data => totalDisconnectionSWCount = totalDisconnectionSWCount + (data === null || data === void 0 ? void 0 : data.count));
25619
+ 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));
25620
+ 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));
25621
+ 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));
25622
+ 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));
25623
+ 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));
25539
25624
  const applicationTypeStatuses = checkPathName ? [{
25540
25625
  code: "NewWS1",
25541
25626
  name: `${t("CS_COMMON_INBOX_NEWWS1")} (${totalnewWSCount})`
@@ -25548,6 +25633,9 @@ const FilterFormFieldsComponent = _ref => {
25548
25633
  }, {
25549
25634
  code: "mutationWSConnection",
25550
25635
  name: `${t("CS_COMMON_INBOX_MUTATIONWSCONNECTION") || t("WS_MUTATION_CONNECTION") || "Water Mutation"} (${totalMutationWSCount})`
25636
+ }, {
25637
+ code: "WSReconnection",
25638
+ name: `${t("CS_COMMON_INBOX_WSRECONNECTION") || t("WS_RECONNECTION") || "Water Reconnection"} (${totalReconnectionWSCount})`
25551
25639
  }] : [{
25552
25640
  code: "NewSW1",
25553
25641
  name: `${t("CS_COMMON_INBOX_NEWSW1")} (${totalnewSWCOunt})`
@@ -25557,6 +25645,9 @@ const FilterFormFieldsComponent = _ref => {
25557
25645
  }, {
25558
25646
  code: "DisconnectSWConnection",
25559
25647
  name: `${t("CS_COMMON_INBOX_DISCONNECTIONSW")} (${totalDisconnectionSWCount})`
25648
+ }, {
25649
+ code: "SWReconnection",
25650
+ name: `${t("CS_COMMON_INBOX_SWRECONNECTION") || t("SW_RECONNECTION") || "Sewerage Reconnection"} (${totalReconnectionSWCount})`
25560
25651
  }];
25561
25652
  const selectrole = (listOfSelections, props) => {
25562
25653
  const res = listOfSelections.map(propsData => {
@@ -25643,11 +25734,11 @@ const FilterFormFieldsComponent = _ref => {
25643
25734
  props.onChange(value);
25644
25735
  }
25645
25736
  const renderStatusCheckBoxes = useMemo(() => {
25646
- var _statuses$filter8;
25647
- return statuses === null || statuses === void 0 ? void 0 : (_statuses$filter8 = statuses.filter(e => {
25737
+ var _statuses$filter0;
25738
+ return statuses === null || statuses === void 0 ? void 0 : (_statuses$filter0 = statuses.filter(e => {
25648
25739
  const value = selectedApplicationType;
25649
25740
  return value.includes(e.businessservice);
25650
- })) === null || _statuses$filter8 === void 0 ? void 0 : _statuses$filter8.map((status, index) => {
25741
+ })) === null || _statuses$filter0 === void 0 ? void 0 : _statuses$filter0.map((status, index) => {
25651
25742
  var _props$value6;
25652
25743
  return /*#__PURE__*/React.createElement(CheckBox, {
25653
25744
  key: index + 1,
@@ -25898,7 +25989,7 @@ const WSInbox = _ref => {
25898
25989
  consumerNo: ""
25899
25990
  };
25900
25991
  const filterFormDefaultValues = {
25901
- businessService: checkPathName ? ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection"] : ["NewSW1", "ModifySWConnection", "DisconnectSWConnection"],
25992
+ businessService: checkPathName ? ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection", "WSReconnection"] : ["NewSW1", "ModifySWConnection", "DisconnectSWConnection", "SWReconnection"],
25902
25993
  moduleName: checkPathName ? "ws-services" : "sw-services",
25903
25994
  locality: [],
25904
25995
  assignee: "ASSIGNED_TO_ALL",
@@ -26335,8 +26426,8 @@ const SearchFields = _ref => {
26335
26426
  });
26336
26427
  let businessServices = [];
26337
26428
  let selectedService = "";
26338
- businessServices = ["NewWS1", "NewSW1", "ModifyWSConnection", "ModifySWConnection", "DisconnectWSConnection", "DisconnectSWConnection"];
26339
- 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";
26429
+ businessServices = ["NewWS1", "NewSW1", "ModifyWSConnection", "ModifySWConnection", "DisconnectWSConnection", "DisconnectSWConnection", "WSReconnection", "SWReconnection"];
26430
+ 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";
26340
26431
  const {
26341
26432
  data: statusData,
26342
26433
  isLoading
@@ -28245,7 +28336,7 @@ const WSCard = () => {
28245
28336
  sessionStorage.removeItem("IsDetailsExists");
28246
28337
  sessionStorage.removeItem("Digit.WS_DISCONNECTION");
28247
28338
  const filterFormDefaultValues = {
28248
- businessService: ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection"],
28339
+ businessService: ["NewWS1", "ModifyWSConnection", "DisconnectWSConnection", "mutationWSConnection", "WSReconnection"],
28249
28340
  moduleName: "ws-services",
28250
28341
  locality: [],
28251
28342
  applicationStatus: [],
@@ -28323,6 +28414,10 @@ const WSCard = () => {
28323
28414
  label: t("WS_DISCONNECTION"),
28324
28415
  link: `/digit-ui/employee/ws/new-disconnection`,
28325
28416
  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"]
28417
+ }, {
28418
+ label: t("WS_RECONNECTION"),
28419
+ link: `/digit-ui/employee/ws/new-restoration`,
28420
+ 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"]
28326
28421
  }].filter(link => link.roles ? checkForEmployee(link.roles) : true)
28327
28422
  };
28328
28423
  return /*#__PURE__*/React.createElement(EmployeeModuleCard, propsForModuleCard);
@@ -29912,13 +30007,6 @@ const WSCreate = () => {
29912
30007
  const newConfig$1 = [{
29913
30008
  head: "NEW_DISCONNECTION",
29914
30009
  body: [{
29915
- route: "docsrequired",
29916
- component: "WSDisconnectionDocsRequired",
29917
- key: "data",
29918
- type: "component",
29919
- withoutLabel: true,
29920
- nextStep: "k-number"
29921
- }, {
29922
30010
  route: "k-number",
29923
30011
  component: "WSDisconnectionKNumber",
29924
30012
  key: "WSDisconnectionKNumber",
@@ -29938,16 +30026,7 @@ const newConfig$1 = [{
29938
30026
  key: "WSDisconnectionForm",
29939
30027
  type: "component",
29940
30028
  withoutLabel: true,
29941
- nextStep: "documents-upload"
29942
- }, {
29943
- route: "documents-upload",
29944
- component: "WSDisconnectionDocumentsForm",
29945
- key: "WSDisconnectionDocumentsForm",
29946
- type: "component",
29947
- isMandatory: true,
29948
- withoutLabel: true,
29949
- nextStep: "check",
29950
- hideInEmployee: true
30029
+ nextStep: "check"
29951
30030
  }, {
29952
30031
  route: "check",
29953
30032
  component: "WSDisconnectionCheckPage",
@@ -29983,25 +30062,6 @@ const newConfig$1 = [{
29983
30062
  isDisonnectionEdit: true,
29984
30063
  withoutLabel: true
29985
30064
  }]
29986
- }, {
29987
- head: "WS_COMMON_PLUMBER_DETAILS",
29988
- isDisonnectionEditByConfig: true,
29989
- body: [{
29990
- type: "component",
29991
- key: "plumberDetails",
29992
- component: "WSActivationPlumberDetails",
29993
- withoutLabel: true
29994
- }]
29995
- }, {
29996
- head: "WS_COMMON_DOCS",
29997
- isDisonnectionEdit: true,
29998
- isDisonnectionEditByConfig: true,
29999
- body: [{
30000
- type: "component",
30001
- key: "DocumentsRequired",
30002
- component: "WSDocumentsEmployee",
30003
- withoutLabel: true
30004
- }]
30005
30065
  }]
30006
30066
  }, {
30007
30067
  head: "RE_SUBMIT_DISCONNECTION_APPLICATION",
@@ -30011,16 +30071,7 @@ const newConfig$1 = [{
30011
30071
  key: "WSDisconnectionForm",
30012
30072
  type: "component",
30013
30073
  withoutLabel: true,
30014
- nextStep: "documents-upload"
30015
- }, {
30016
- route: "documents-upload",
30017
- component: "WSDisconnectionDocumentsForm",
30018
- key: "WSDisconnectionDocumentsForm",
30019
- type: "component",
30020
- isMandatory: true,
30021
- withoutLabel: true,
30022
- nextStep: "resubmit-check",
30023
- hideInEmployee: true
30074
+ nextStep: "check"
30024
30075
  }, {
30025
30076
  route: "check",
30026
30077
  component: "WSReSubmitDisconnectionCheckPage",
@@ -30065,7 +30116,7 @@ const WSDisconnection = () => {
30065
30116
  (_newConfig$filter = newConfig.filter(e => e.head === "NEW_DISCONNECTION")) === null || _newConfig$filter === void 0 ? void 0 : _newConfig$filter.forEach(obj => {
30066
30117
  config = config.concat(obj.body.filter(a => !a.hideInCitizen));
30067
30118
  });
30068
- config.indexRoute = "docsrequired";
30119
+ config.indexRoute = "k-number";
30069
30120
  return /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
30070
30121
  const {
30071
30122
  component,
@@ -32421,7 +32472,7 @@ const Rebate_menu = [{
32421
32472
  value: "Others"
32422
32473
  }];
32423
32474
  const WSFeeEstimation = _ref => {
32424
- var _wsAdditionalDetails$, _fields$adhocPenaltyR, _fields$adhocRebateRe;
32475
+ var _wsAdditionalDetails$, _wsAdditionalDetails$2, _wsAdditionalDetails$3, _billDetails$billDeta, _billDetails$billDeta2, _fields$adhocPenaltyR, _fields$adhocRebateRe;
32425
32476
  let {
32426
32477
  wsAdditionalDetails,
32427
32478
  workflowDetails
@@ -32437,15 +32488,21 @@ const WSFeeEstimation = _ref => {
32437
32488
  const [showToast, setShowToast] = useState(null);
32438
32489
  const [billDetails, setBillDetails] = useState(wsAdditionalDetails.additionalDetails.data ? wsAdditionalDetails.additionalDetails.data : {});
32439
32490
  const [values, setValues] = useState(wsAdditionalDetails.additionalDetails.values ? wsAdditionalDetails.additionalDetails.values : []);
32491
+ 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";
32492
+ const displayedValues = isDisconnectionExecuted ? values.filter(value => (value === null || value === void 0 ? void 0 : value.title) === "WS_DISCONNECTION_FEE") : values;
32493
+ 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) || [];
32494
+ const disconnectionFee = billRows.find(row => (row === null || row === void 0 ? void 0 : row.taxHeadCode) === "WS_DISCONNECTION_FEE");
32495
+ 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;
32496
+ const displayedIsPaid = isDisconnectionExecuted ? (disconnectionFee === null || disconnectionFee === void 0 ? void 0 : disconnectionFee.status) === "PAID" : isPaid;
32440
32497
  const stateCode = Digit.ULBService.getStateId();
32441
32498
  const {
32442
32499
  isMdmsLoading,
32443
32500
  data: mdmsRes
32444
32501
  } = Digit.Hooks.ws.useMDMS(stateCode, "BillingService", ["TaxHeadMaster"]);
32445
32502
  useEffect(() => {
32446
- var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _sessionFormData$bill;
32503
+ var _wsAdditionalDetails$4, _wsAdditionalDetails$5, _sessionFormData$bill;
32447
32504
  const data = {
32448
- ...(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.additionalDetails)
32505
+ ...(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)
32449
32506
  };
32450
32507
  if ((sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$bill = sessionFormData.billDetails) === null || _sessionFormData$bill === void 0 ? void 0 : _sessionFormData$bill.length) > 0) {
32451
32508
  var _sessionFormData$bill2, _sessionFormData$bill3, _sessionFormData$bill4, _sessionFormData$bill5, _sessionFormData$bill6, _sessionFormData$bill7, _sessionFormData$bill8, _sessionFormData$bill9, _sessionFormData$bill0, _sessionFormData$bill1, _sessionFormData$bill10;
@@ -32499,8 +32556,8 @@ const WSFeeEstimation = _ref => {
32499
32556
  const adhocAmount = fields !== null && fields !== void 0 && fields.adhocPenalty ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocPenalty) : 0;
32500
32557
  const rebateAmount = fields !== null && fields !== void 0 && fields.adhocRebate ? Number(fields === null || fields === void 0 ? void 0 : fields.adhocRebate) : 0;
32501
32558
  if (adhocAmount || rebateAmount) {
32502
- var _wsAdditionalDetails$4, _wsAdditionalDetails$5;
32503
- const totalAmount = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$4 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : (_wsAdditionalDetails$5 = _wsAdditionalDetails$4.data) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : _wsAdditionalDetails$5.totalAmount;
32559
+ var _wsAdditionalDetails$6, _wsAdditionalDetails$7;
32560
+ 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;
32504
32561
  if (rebateAmount > totalAmount) {
32505
32562
  setShowToast({
32506
32563
  isError: false,
@@ -32509,16 +32566,16 @@ const WSFeeEstimation = _ref => {
32509
32566
  message: t("ERR_WS_REBATE_GREATER_THAN_AMOUNT")
32510
32567
  });
32511
32568
  } else {
32512
- var _wsAdditionalDetails$0, _wsAdditionalDetails$1, _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _wsAdditionalDetails$17;
32513
- const applicationNo = wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$0 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$0 === void 0 ? void 0 : (_wsAdditionalDetails$1 = _wsAdditionalDetails$0.appDetails) === null || _wsAdditionalDetails$1 === void 0 ? void 0 : _wsAdditionalDetails$1.applicationNo;
32514
- const tenantId = 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.tenantId;
32569
+ var _wsAdditionalDetails$10, _wsAdditionalDetails$11, _wsAdditionalDetails$12, _wsAdditionalDetails$13, _wsAdditionalDetails$14, _wsAdditionalDetails$15, _wsAdditionalDetails$16, _wsAdditionalDetails$17, _wsAdditionalDetails$18, _wsAdditionalDetails$19;
32570
+ 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;
32571
+ 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;
32515
32572
  const appAdditionalDetails = {
32516
- ...(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.additionalDetails),
32573
+ ...(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),
32517
32574
  ...fields
32518
32575
  };
32519
32576
  wsAdditionalDetails.additionalDetails.appDetails.additionalDetails = appAdditionalDetails;
32520
32577
  const data = {
32521
- CalculationCriteria: (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.service) == "WATER" ? [{
32578
+ 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" ? [{
32522
32579
  applicationNo: applicationNo,
32523
32580
  tenantId: tenantId,
32524
32581
  waterConnection: wsAdditionalDetails.additionalDetails.appDetails
@@ -32529,7 +32586,7 @@ const WSFeeEstimation = _ref => {
32529
32586
  }],
32530
32587
  isconnectionCalculation: false
32531
32588
  };
32532
- let businessService = (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" ? "WS" : "SW";
32589
+ 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";
32533
32590
  Digit.WSService.wsCalculationEstimate(data, businessService).then((result, err) => {
32534
32591
  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;
32535
32592
  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) {
@@ -32607,7 +32664,7 @@ const WSFeeEstimation = _ref => {
32607
32664
  maxWidth: "100%",
32608
32665
  minWidth: "280px"
32609
32666
  }
32610
- }, values && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", null, values === null || values === void 0 ? void 0 : values.map((value, index) => {
32667
+ }, values && /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement("div", null, displayedValues === null || displayedValues === void 0 ? void 0 : displayedValues.map((value, index) => {
32611
32668
  return /*#__PURE__*/React.createElement(Row, {
32612
32669
  className: "border-none",
32613
32670
  key: `${value.title}`,
@@ -32624,7 +32681,7 @@ const WSFeeEstimation = _ref => {
32624
32681
  className: "border-none",
32625
32682
  key: `WS_COMMON_TOTAL_AMT`,
32626
32683
  label: `${t(`WS_COMMON_TOTAL_AMT`)}`,
32627
- text: /*#__PURE__*/React.createElement("span", null, "\u20B9", billDetails !== null && billDetails !== void 0 && billDetails.totalAmount ? Number(billDetails === null || billDetails === void 0 ? void 0 : billDetails.totalAmount).toFixed(2) : "0.00"),
32684
+ text: /*#__PURE__*/React.createElement("span", null, "\u20B9", displayedTotalAmount ? Number(displayedTotalAmount).toFixed(2) : "0.00"),
32628
32685
  textStyle: {
32629
32686
  fontSize: "24px",
32630
32687
  fontWeight: "700"
@@ -32633,7 +32690,7 @@ const WSFeeEstimation = _ref => {
32633
32690
  className: "border-none",
32634
32691
  key: `CS_INBOX_STATUS_FILTER`,
32635
32692
  label: `${t(`CS_INBOX_STATUS_FILTER`)}`,
32636
- text: isPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
32693
+ text: displayedIsPaid ? t("WS_COMMON_PAID_LABEL") : t("WS_COMMON_NOT_PAID"),
32637
32694
  textStyle: !isPaid ? {
32638
32695
  color: "#D83A2F"
32639
32696
  } : {
@@ -33367,6 +33424,7 @@ const WSApplicationDetails = () => {
33367
33424
  }
33368
33425
  }) || false;
33369
33426
  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);
33427
+ const isDisconnectionExecuted = applicationStatus === "DISCONNECTION_EXECUTED";
33370
33428
  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;
33371
33429
  const {
33372
33430
  isLoading: isAppDetailsLoading,
@@ -33903,7 +33961,7 @@ const WSApplicationDetails = () => {
33903
33961
  }), /*#__PURE__*/React.createElement(Row, {
33904
33962
  label: t("WS_EMPLOYEE_DESIGNATION"),
33905
33963
  text: `${t(checkForNA$1(djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.designation))}`
33906
- }), (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
33964
+ }), !isDisconnectionExecuted && (djbEmployee === null || djbEmployee === void 0 ? void 0 : djbEmployee.document) && /*#__PURE__*/React.createElement(Row, {
33907
33965
  label: t("WS_UPLOAD_EMPLOYEE_ID_DOC"),
33908
33966
  text: /*#__PURE__*/React.createElement("span", {
33909
33967
  style: {
@@ -34023,7 +34081,7 @@ const WSApplicationDetails = () => {
34023
34081
  fontWeight: "bold"
34024
34082
  }
34025
34083
  }, t("BILL_ALREADY_PAID"))));
34026
- }))))), /*#__PURE__*/React.createElement(CardHeader, {
34084
+ }))))), !isDisconnectionExecuted && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CardHeader, {
34027
34085
  styles: {
34028
34086
  fontSize: "28px"
34029
34087
  }
@@ -34075,7 +34133,7 @@ const WSApplicationDetails = () => {
34075
34133
  marginBottom: "20px"
34076
34134
  }
34077
34135
  }) : null)));
34078
- })), (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.createElement("div", {
34136
+ }))), (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.createElement("div", {
34079
34137
  style: {
34080
34138
  marginTop: "10px"
34081
34139
  }
@@ -34530,7 +34588,7 @@ const getConnectionDetailsPDF = function (application, property, tenantInfo, t)
34530
34588
  };
34531
34589
 
34532
34590
  const ConnectionDetails$5 = () => {
34533
- 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, _state50, _state51, _state52, _state53, _state54, _paymentDetails$data17, _paymentDetails$data18;
34591
+ 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;
34534
34592
  const {
34535
34593
  t
34536
34594
  } = useTranslation();
@@ -34762,7 +34820,7 @@ const ConnectionDetails$5 = () => {
34762
34820
  var _paymentDetails$data8, _paymentDetails$data9, _paymentDetails$data0, _paymentDetails$data1, _paymentDetails$data10, _paymentDetails$data11, _paymentDetails$data12, _paymentDetails$data13, _paymentDetails$data14, _paymentDetails$data15, _paymentDetails$data16;
34763
34821
  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) {
34764
34822
  console.log("Payment", paymentDetails);
34765
- let pathname = `/digit-ui/citizen/ws/restoration-application`;
34823
+ let pathname = `/digit-ui/citizen/ws/restore-application/restoration-application`;
34766
34824
  Digit.SessionStorage.set("WS_DISCONNECTION", {
34767
34825
  ...state,
34768
34826
  serviceType: isSW ? "SEWERAGE" : "WATER"
@@ -35215,7 +35273,7 @@ const ConnectionDetails$5 = () => {
35215
35273
  marginBottom: "20px"
35216
35274
  }
35217
35275
  }) : null)));
35218
- })), (((_state49 = state) === null || _state49 === void 0 ? void 0 : _state49.status) !== "inactive" || ((_state50 = state) === null || _state50 === void 0 ? void 0 : _state50.applicationStatus) !== "Inactive" || ((_state51 = state) === null || _state51 === void 0 ? void 0 : _state51.applicationStatus) !== "INACTIVE") && !isDisconnectionDone ? /*#__PURE__*/React.createElement("div", {
35276
+ })), ((_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.createElement("div", {
35219
35277
  style: {
35220
35278
  display: "flex",
35221
35279
  justifyContent: "flex-end",
@@ -35223,9 +35281,9 @@ const ConnectionDetails$5 = () => {
35223
35281
  width: "100%"
35224
35282
  }
35225
35283
  }, /*#__PURE__*/React.createElement(SubmitBar, {
35226
- label: t("WS_DISCONNECTION_BUTTON"),
35227
- onSubmit: onActionSelect
35228
- })) : ((_state52 = state) === null || _state52 === void 0 ? void 0 : _state52.applicationStatus) == "DISCONNECTION_EXECUTED" && ((_state53 = state) === null || _state53 === void 0 ? void 0 : _state53.status) == "Inactive" && ((_state54 = state) === null || _state54 === void 0 ? void 0 : _state54.isDisconnectionTemporary) && /*#__PURE__*/React.createElement("div", {
35284
+ label: t("WS_RECONNECTION_BUTTON"),
35285
+ onSubmit: onActionSelectRestoration
35286
+ })) : /*#__PURE__*/React.createElement("div", {
35229
35287
  style: {
35230
35288
  display: "flex",
35231
35289
  justifyContent: "flex-end",
@@ -35233,8 +35291,8 @@ const ConnectionDetails$5 = () => {
35233
35291
  width: "100%"
35234
35292
  }
35235
35293
  }, /*#__PURE__*/React.createElement(SubmitBar, {
35236
- label: t("WS_RECONNECTION_BUTTON"),
35237
- onSubmit: onActionSelectRestoration
35294
+ label: t("WS_DISCONNECTION_BUTTON"),
35295
+ onSubmit: onActionSelect
35238
35296
  })), showModal ? /*#__PURE__*/React.createElement(Modal, {
35239
35297
  open: showModal,
35240
35298
  headerBarMain: /*#__PURE__*/React.createElement(Heading, {
@@ -35248,8 +35306,8 @@ const ConnectionDetails$5 = () => {
35248
35306
  actionSingleLabel: t("COMMON_MAKE_PAYMENT"),
35249
35307
  hideSubmit: true,
35250
35308
  actionSingleSubmit: () => {
35251
- var _state55, _state56;
35252
- history.push(`/digit-ui/citizen/payment/collect/${isSW ? "SW" : "WS"}/${encodeURIComponent((_state55 = state) === null || _state55 === void 0 ? void 0 : _state55.connectionNo)}/${tenantId}?consumerCode=${(_state56 = state) === null || _state56 === void 0 ? void 0 : _state56.connectionNo}&&tenantId=${tenantId}&&workflow=WNS`);
35309
+ var _state52, _state53;
35310
+ 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`);
35253
35311
  setshowModal(false);
35254
35312
  },
35255
35313
  popupStyles: mobileView ? {
@@ -37662,7 +37720,6 @@ const CheckPage$1 = () => {
37662
37720
  const history = useHistory();
37663
37721
  const match = useRouteMatch();
37664
37722
  const value = Digit.SessionStorage.get("WS_DISCONNECTION");
37665
- const [documents, setDocuments] = useState(value.WSDisconnectionForm.documents || []);
37666
37723
  let routeLink = `/digit-ui/citizen/ws/disconnect-application`;
37667
37724
  if (window.location.href.includes("/edit-application")) routeLink = `/digit-ui/citizen/ws/edit-disconnect-application`;
37668
37725
  function routeTo(jumpTo) {
@@ -37702,13 +37759,12 @@ const CheckPage$1 = () => {
37702
37759
  };
37703
37760
  const onSubmit = function (data) {
37704
37761
  try {
37762
+ var _value$applicationDat;
37705
37763
  return Promise.resolve(createPayloadOfWSDisconnection(data, {
37706
- applicationData: value
37707
- }, value.serviceType)).then(function (payload) {
37764
+ applicationData: (value === null || value === void 0 ? void 0 : value.applicationData) || value
37765
+ }, (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) {
37708
37766
  const _temp4 = function (_payload$WaterConnect) {
37709
37767
  if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
37710
- var _payload$WaterConnect2;
37711
- (_payload$WaterConnect2 = payload.WaterConnection) !== null && _payload$WaterConnect2 !== void 0 && _payload$WaterConnect2.isDisconnectionTemporary ? payload.WaterConnection["endDate"] = convertDateToEpoch(value.WSDisconnectionForm.endDate) || "" : "";
37712
37768
  const _temp = function () {
37713
37769
  if (waterMutation) {
37714
37770
  setIsEnableLoader(true);
@@ -37764,7 +37820,6 @@ const CheckPage$1 = () => {
37764
37820
  } else {
37765
37821
  const _temp3 = function (_payload$SewerageConn) {
37766
37822
  if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
37767
- payload.SewerageConnection.isDisconnectionTemporary ? payload.SewerageConnection["endDate"] = convertDateToEpoch(value.WSDisconnectionForm.endDate) || "" : "";
37768
37823
  const _temp2 = function () {
37769
37824
  if (sewerageMutation) {
37770
37825
  setIsEnableLoader(true);
@@ -37877,48 +37932,6 @@ const CheckPage$1 = () => {
37877
37932
  className: "border-none",
37878
37933
  label: t("WS_DISCONNECTION_REASON"),
37879
37934
  text: t(value.WSDisconnectionForm.reason.value.i18nKey)
37880
- })), /*#__PURE__*/React.createElement(CardHeader, {
37881
- styles: {
37882
- fontSize: "28px"
37883
- }
37884
- }, t("WS_COMMON_DOCUMENT_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
37885
- label: /*#__PURE__*/React.createElement(EditIcon, {
37886
- style: {
37887
- marginTop: "-20px",
37888
- float: "right",
37889
- position: "relative",
37890
- bottom: "32px"
37891
- }
37892
- }),
37893
- style: {
37894
- width: "100px",
37895
- display: "inline"
37896
- },
37897
- onClick: () => routeTo(`${routeLink}/documents-upload`)
37898
- }), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
37899
- var _doc$documentType;
37900
- return /*#__PURE__*/React.createElement("div", {
37901
- key: `doc-${index}`
37902
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(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.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
37903
- className: "border-none",
37904
- label: t("WS_DOCUMENT_NUMBER"),
37905
- text: (doc === null || doc === void 0 ? void 0 : doc.documentNumber) || (doc === null || doc === void 0 ? void 0 : doc.documentUid) || t("NA")
37906
- }), /*#__PURE__*/React.createElement(WSDocument, {
37907
- value: {
37908
- documents: value.WSDisconnectionForm
37909
- },
37910
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
37911
- index: index,
37912
- showFileName: true
37913
- }), (documents === null || documents === void 0 ? void 0 : documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
37914
- style: {
37915
- color: "#cccccc",
37916
- backgroundColor: "#cccccc",
37917
- height: "2px",
37918
- marginTop: "20px",
37919
- marginBottom: "20px"
37920
- }
37921
- }) : null)));
37922
37935
  })), /*#__PURE__*/React.createElement("div", {
37923
37936
  style: {
37924
37937
  display: "flex",
@@ -38122,188 +38135,8 @@ const CheckPage$2 = () => {
38122
38135
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
38123
38136
  className: "employee-form-section-wrapper"
38124
38137
  }, /*#__PURE__*/React.createElement(DisconnectTimeline, {
38125
- currentStep: 3,
38126
- flow: "RESTORATION"
38127
- }), /*#__PURE__*/React.createElement("div", {
38128
- style: {
38129
- width: "100%"
38130
- }
38131
- }, /*#__PURE__*/React.createElement(Header, {
38132
- styles: {
38133
- fontSize: "32px"
38134
- }
38135
- }, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(Card, {
38136
- style: {
38137
- paddingRight: "16px"
38138
- }
38139
- }, /*#__PURE__*/React.createElement("div", {
38140
- style: {
38141
- display: "inline"
38142
- }
38143
- }, /*#__PURE__*/React.createElement(CardHeader, {
38144
- styles: {
38145
- fontSize: "28px"
38146
- }
38147
- }, t("WS_RESTORATION_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
38148
- label: /*#__PURE__*/React.createElement(EditIcon, {
38149
- style: {
38150
- marginTop: "-20px",
38151
- float: "right",
38152
- position: "relative",
38153
- bottom: "32px"
38154
- }
38155
- }),
38156
- style: {
38157
- width: "100px",
38158
- display: "inline"
38159
- },
38160
- onClick: () => routeTo(`${routeLink}/application-form`)
38161
- })), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
38162
- className: "border-none",
38163
- label: t("WS_RESTORATION_CONSUMER_NUMBER"),
38164
- text: value.connectionNo
38165
- }), /*#__PURE__*/React.createElement(Row, {
38166
- className: "border-none",
38167
- label: t("WS_RESTORATION_PROPOSED_DATE"),
38168
- text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
38169
- }), /*#__PURE__*/React.createElement(Row, {
38170
- className: "border-none",
38171
- label: t("WS_RESTORATION_REASON"),
38172
- text: value.WSDisconnectionForm.reason.value
38173
- }))), /*#__PURE__*/React.createElement(Card, {
38174
- style: {
38175
- paddingRight: "16px"
38176
- }
38177
- }, /*#__PURE__*/React.createElement(SubmitBar, {
38178
- label: t("CS_COMMON_SUBMIT"),
38179
- onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
38180
- })), error && /*#__PURE__*/React.createElement(Toast, {
38181
- error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
38182
- label: t(error === null || error === void 0 ? void 0 : error.message),
38183
- onClose: () => setError(null)
38184
- }))));
38185
- };
38186
-
38187
- const CheckPage$3 = () => {
38188
- var _value$applicationDat;
38189
- const {
38190
- t
38191
- } = useTranslation();
38192
- const history = useHistory();
38193
- const match = useRouteMatch();
38194
- const value = Digit.SessionStorage.get("WS_DISCONNECTION");
38195
- const [documents, setDocuments] = useState(value.WSDisconnectionForm.documents || []);
38196
- let routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
38197
- if (window.location.href.includes("/resubmit")) routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
38198
- function routeTo(jumpTo) {
38199
- location.href = jumpTo;
38200
- }
38201
- const [isEnableLoader, setIsEnableLoader] = useState(false);
38202
- const {
38203
- isLoading: updatingWaterApplicationLoading,
38204
- isError: updateWaterApplicationError,
38205
- data: updateWaterResponse,
38206
- error: updateWaterError,
38207
- mutate: waterUpdateMutation
38208
- } = Digit.Hooks.ws.useWSApplicationActions("WATER");
38209
- const {
38210
- isLoading: updatingSewerageApplicationLoading,
38211
- isError: updateSewerageApplicationError,
38212
- data: updateSewerageResponse,
38213
- error: updateSewerageError,
38214
- mutate: sewerageUpdateMutation
38215
- } = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
38216
- const closeToastOfError = () => {
38217
- setShowToast(null);
38218
- };
38219
- const onSubmit = function (data) {
38220
- try {
38221
- return Promise.resolve(createPayloadOfWSReSubmitDisconnection(data, value, value.serviceType)).then(function (payload) {
38222
- const _temp4 = function (_payload$WaterConnect) {
38223
- if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
38224
- const _temp = function () {
38225
- if (waterUpdateMutation) {
38226
- setIsEnableLoader(true);
38227
- return Promise.resolve(waterUpdateMutation(payload, {
38228
- onError: (error, variables) => {
38229
- var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
38230
- setIsEnableLoader(false);
38231
- setError({
38232
- key: "error",
38233
- 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
38234
- });
38235
- setTimeout(closeToastOfError, 5000);
38236
- },
38237
- onSuccess: function (data, variables) {
38238
- try {
38239
- var _data$WaterConnection, _data$WaterConnection2, _data$WaterConnection3;
38240
- Digit.SessionStorage.set("WS_DISCONNECTION", {
38241
- ...(value === null || value === void 0 ? void 0 : value.applicationData),
38242
- ...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
38243
- DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0]
38244
- });
38245
- 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}`);
38246
- return Promise.resolve();
38247
- } catch (e) {
38248
- return Promise.reject(e);
38249
- }
38250
- }
38251
- })).then(function () {});
38252
- }
38253
- }();
38254
- if (_temp && _temp.then) return _temp.then(function () {});
38255
- } else {
38256
- const _temp3 = function (_payload$SewerageConn) {
38257
- if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
38258
- const _temp2 = function () {
38259
- if (sewerageUpdateMutation) {
38260
- setIsEnableLoader(true);
38261
- return Promise.resolve(sewerageUpdateMutation(payload, {
38262
- onError: (error, variables) => {
38263
- var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
38264
- setIsEnableLoader(false);
38265
- setError({
38266
- key: "error",
38267
- 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
38268
- });
38269
- setTimeout(closeToastOfError, 5000);
38270
- },
38271
- onSuccess: function (data, variables) {
38272
- try {
38273
- var _data$SewerageConnect, _data$SewerageConnect2, _data$SewerageConnect3;
38274
- Digit.SessionStorage.set("WS_DISCONNECTION", {
38275
- ...(value === null || value === void 0 ? void 0 : value.applicationData),
38276
- ...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
38277
- DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0]
38278
- });
38279
- 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}`);
38280
- return Promise.resolve();
38281
- } catch (e) {
38282
- return Promise.reject(e);
38283
- }
38284
- }
38285
- })).then(function () {});
38286
- }
38287
- }();
38288
- if (_temp2 && _temp2.then) return _temp2.then(function () {});
38289
- }
38290
- }();
38291
- if (_temp3 && _temp3.then) return _temp3.then(function () {});
38292
- }
38293
- }();
38294
- if (_temp4 && _temp4.then) return _temp4.then(function () {});
38295
- });
38296
- } catch (e) {
38297
- return Promise.reject(e);
38298
- }
38299
- };
38300
- if (isEnableLoader) {
38301
- return /*#__PURE__*/React.createElement(Loader, null);
38302
- }
38303
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
38304
- className: "employee-form-section-wrapper"
38305
- }, /*#__PURE__*/React.createElement(DisconnectTimeline, {
38306
- currentStep: 3
38138
+ currentStep: 3,
38139
+ flow: "RESTORATION"
38307
38140
  }), /*#__PURE__*/React.createElement("div", {
38308
38141
  style: {
38309
38142
  width: "100%"
@@ -38324,7 +38157,7 @@ const CheckPage$3 = () => {
38324
38157
  styles: {
38325
38158
  fontSize: "28px"
38326
38159
  }
38327
- }, t("WS_DISCONNECTION_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
38160
+ }, t("WS_RESTORATION_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
38328
38161
  label: /*#__PURE__*/React.createElement(EditIcon, {
38329
38162
  style: {
38330
38163
  marginTop: "-20px",
@@ -38340,24 +38173,161 @@ const CheckPage$3 = () => {
38340
38173
  onClick: () => routeTo(`${routeLink}/application-form`)
38341
38174
  })), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
38342
38175
  className: "border-none",
38343
- label: t("WS_DISCONNECTION_CONSUMER_NUMBER"),
38344
- text: value.connectionNo || (value === null || value === void 0 ? void 0 : (_value$applicationDat = value.applicationData) === null || _value$applicationDat === void 0 ? void 0 : _value$applicationDat.connectionNo)
38345
- }), /*#__PURE__*/React.createElement(Row, {
38346
- className: "border-none",
38347
- label: t("WS_DISCONNECTION_TYPE"),
38348
- text: t(value.WSDisconnectionForm.type.value.i18nKey)
38176
+ label: t("WS_RESTORATION_CONSUMER_NUMBER"),
38177
+ text: value.connectionNo
38349
38178
  }), /*#__PURE__*/React.createElement(Row, {
38350
38179
  className: "border-none",
38351
- label: t("WS_DISCONNECTION_PROPOSED_DATE"),
38180
+ label: t("WS_RESTORATION_PROPOSED_DATE"),
38352
38181
  text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
38353
38182
  }), /*#__PURE__*/React.createElement(Row, {
38354
38183
  className: "border-none",
38355
- label: t("WS_DISCONNECTION_REASON"),
38184
+ label: t("WS_RESTORATION_REASON"),
38356
38185
  text: value.WSDisconnectionForm.reason.value
38357
38186
  }))), /*#__PURE__*/React.createElement(Card, {
38358
38187
  style: {
38359
38188
  paddingRight: "16px"
38360
38189
  }
38190
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
38191
+ label: t("CS_COMMON_SUBMIT"),
38192
+ onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
38193
+ })), error && /*#__PURE__*/React.createElement(Toast, {
38194
+ error: (error === null || error === void 0 ? void 0 : error.key) === "error" ? true : false,
38195
+ label: t(error === null || error === void 0 ? void 0 : error.message),
38196
+ onClose: () => setError(null)
38197
+ }))));
38198
+ };
38199
+
38200
+ const CheckPage$3 = () => {
38201
+ var _value$applicationDat;
38202
+ const {
38203
+ t
38204
+ } = useTranslation();
38205
+ const history = useHistory();
38206
+ const match = useRouteMatch();
38207
+ const value = Digit.SessionStorage.get("WS_DISCONNECTION");
38208
+ let routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
38209
+ if (window.location.href.includes("/resubmit")) routeLink = `/digit-ui/citizen/ws/resubmit-disconnect-application`;
38210
+ function routeTo(jumpTo) {
38211
+ location.href = jumpTo;
38212
+ }
38213
+ const [isEnableLoader, setIsEnableLoader] = useState(false);
38214
+ const {
38215
+ isLoading: updatingWaterApplicationLoading,
38216
+ isError: updateWaterApplicationError,
38217
+ data: updateWaterResponse,
38218
+ error: updateWaterError,
38219
+ mutate: waterUpdateMutation
38220
+ } = Digit.Hooks.ws.useWSApplicationActions("WATER");
38221
+ const {
38222
+ isLoading: updatingSewerageApplicationLoading,
38223
+ isError: updateSewerageApplicationError,
38224
+ data: updateSewerageResponse,
38225
+ error: updateSewerageError,
38226
+ mutate: sewerageUpdateMutation
38227
+ } = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
38228
+ const closeToastOfError = () => {
38229
+ setShowToast(null);
38230
+ };
38231
+ const onSubmit = function (data) {
38232
+ try {
38233
+ return Promise.resolve(createPayloadOfWSReSubmitDisconnection(data, value, value.serviceType)).then(function (payload) {
38234
+ const _temp4 = function (_payload$WaterConnect) {
38235
+ if (payload !== null && payload !== void 0 && (_payload$WaterConnect = payload.WaterConnection) !== null && _payload$WaterConnect !== void 0 && _payload$WaterConnect.water) {
38236
+ const _temp = function () {
38237
+ if (waterUpdateMutation) {
38238
+ setIsEnableLoader(true);
38239
+ return Promise.resolve(waterUpdateMutation(payload, {
38240
+ onError: (error, variables) => {
38241
+ var _error$response, _error$response$data, _error$response$data$, _error$response2, _error$response2$data, _error$response2$data2;
38242
+ setIsEnableLoader(false);
38243
+ setError({
38244
+ key: "error",
38245
+ 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
38246
+ });
38247
+ setTimeout(closeToastOfError, 5000);
38248
+ },
38249
+ onSuccess: function (data, variables) {
38250
+ try {
38251
+ var _data$WaterConnection, _data$WaterConnection2, _data$WaterConnection3;
38252
+ Digit.SessionStorage.set("WS_DISCONNECTION", {
38253
+ ...(value === null || value === void 0 ? void 0 : value.applicationData),
38254
+ ...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
38255
+ DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : _data$WaterConnection[0]
38256
+ });
38257
+ 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}`);
38258
+ return Promise.resolve();
38259
+ } catch (e) {
38260
+ return Promise.reject(e);
38261
+ }
38262
+ }
38263
+ })).then(function () {});
38264
+ }
38265
+ }();
38266
+ if (_temp && _temp.then) return _temp.then(function () {});
38267
+ } else {
38268
+ const _temp3 = function (_payload$SewerageConn) {
38269
+ if (payload !== null && payload !== void 0 && (_payload$SewerageConn = payload.SewerageConnection) !== null && _payload$SewerageConn !== void 0 && _payload$SewerageConn.sewerage) {
38270
+ const _temp2 = function () {
38271
+ if (sewerageUpdateMutation) {
38272
+ setIsEnableLoader(true);
38273
+ return Promise.resolve(sewerageUpdateMutation(payload, {
38274
+ onError: (error, variables) => {
38275
+ var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
38276
+ setIsEnableLoader(false);
38277
+ setError({
38278
+ key: "error",
38279
+ 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
38280
+ });
38281
+ setTimeout(closeToastOfError, 5000);
38282
+ },
38283
+ onSuccess: function (data, variables) {
38284
+ try {
38285
+ var _data$SewerageConnect, _data$SewerageConnect2, _data$SewerageConnect3;
38286
+ Digit.SessionStorage.set("WS_DISCONNECTION", {
38287
+ ...(value === null || value === void 0 ? void 0 : value.applicationData),
38288
+ ...(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm),
38289
+ DisconnectionResponse: data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : _data$SewerageConnect[0]
38290
+ });
38291
+ 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}`);
38292
+ return Promise.resolve();
38293
+ } catch (e) {
38294
+ return Promise.reject(e);
38295
+ }
38296
+ }
38297
+ })).then(function () {});
38298
+ }
38299
+ }();
38300
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
38301
+ }
38302
+ }();
38303
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
38304
+ }
38305
+ }();
38306
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
38307
+ });
38308
+ } catch (e) {
38309
+ return Promise.reject(e);
38310
+ }
38311
+ };
38312
+ if (isEnableLoader) {
38313
+ return /*#__PURE__*/React.createElement(Loader, null);
38314
+ }
38315
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
38316
+ className: "employee-form-section-wrapper"
38317
+ }, /*#__PURE__*/React.createElement(DisconnectTimeline, {
38318
+ currentStep: 3
38319
+ }), /*#__PURE__*/React.createElement("div", {
38320
+ style: {
38321
+ width: "100%"
38322
+ }
38323
+ }, /*#__PURE__*/React.createElement(Header, {
38324
+ styles: {
38325
+ fontSize: "32px"
38326
+ }
38327
+ }, t("WS_COMMON_SUMMARY")), /*#__PURE__*/React.createElement(Card, {
38328
+ style: {
38329
+ paddingRight: "16px"
38330
+ }
38361
38331
  }, /*#__PURE__*/React.createElement("div", {
38362
38332
  style: {
38363
38333
  display: "inline"
@@ -38366,7 +38336,7 @@ const CheckPage$3 = () => {
38366
38336
  styles: {
38367
38337
  fontSize: "28px"
38368
38338
  }
38369
- }, t("WS_COMMON_DOCUMENT_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
38339
+ }, t("WS_DISCONNECTION_APPLICATION_DETAILS")), /*#__PURE__*/React.createElement(LinkButton, {
38370
38340
  label: /*#__PURE__*/React.createElement(EditIcon, {
38371
38341
  style: {
38372
38342
  marginTop: "-20px",
@@ -38379,28 +38349,28 @@ const CheckPage$3 = () => {
38379
38349
  width: "100px",
38380
38350
  display: "inline"
38381
38351
  },
38382
- onClick: () => routeTo(`${routeLink}/documents-upload`)
38383
- })), documents && (documents === null || documents === void 0 ? void 0 : documents.map((doc, index) => {
38384
- var _doc$documentType;
38385
- return /*#__PURE__*/React.createElement("div", {
38386
- key: `doc-${index}`
38387
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(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.createElement(StatusTable, null, /*#__PURE__*/React.createElement(WSDocument, {
38388
- value: {
38389
- documents: value.WSDisconnectionForm
38390
- },
38391
- Code: doc === null || doc === void 0 ? void 0 : doc.documentType,
38392
- index: index,
38393
- showFileName: true
38394
- }), (documents === null || documents === void 0 ? void 0 : documents.length) != index + 1 ? /*#__PURE__*/React.createElement("hr", {
38395
- style: {
38396
- color: "#cccccc",
38397
- backgroundColor: "#cccccc",
38398
- height: "2px",
38399
- marginTop: "20px",
38400
- marginBottom: "20px"
38401
- }
38402
- }) : null)));
38403
- })), /*#__PURE__*/React.createElement(SubmitBar, {
38352
+ onClick: () => routeTo(`${routeLink}/application-form`)
38353
+ })), /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(Row, {
38354
+ className: "border-none",
38355
+ label: t("WS_DISCONNECTION_CONSUMER_NUMBER"),
38356
+ text: value.connectionNo || (value === null || value === void 0 ? void 0 : (_value$applicationDat = value.applicationData) === null || _value$applicationDat === void 0 ? void 0 : _value$applicationDat.connectionNo)
38357
+ }), /*#__PURE__*/React.createElement(Row, {
38358
+ className: "border-none",
38359
+ label: t("WS_DISCONNECTION_TYPE"),
38360
+ text: t(value.WSDisconnectionForm.type.value.i18nKey)
38361
+ }), /*#__PURE__*/React.createElement(Row, {
38362
+ className: "border-none",
38363
+ label: t("WS_DISCONNECTION_PROPOSED_DATE"),
38364
+ text: convertEpochToDate(convertDateToEpoch(value.WSDisconnectionForm.date))
38365
+ }), /*#__PURE__*/React.createElement(Row, {
38366
+ className: "border-none",
38367
+ label: t("WS_DISCONNECTION_REASON"),
38368
+ text: value.WSDisconnectionForm.reason.value
38369
+ }))), /*#__PURE__*/React.createElement(Card, {
38370
+ style: {
38371
+ paddingRight: "16px"
38372
+ }
38373
+ }, /*#__PURE__*/React.createElement(SubmitBar, {
38404
38374
  label: t("CS_COMMON_SUBMIT"),
38405
38375
  onSubmit: () => onSubmit(value === null || value === void 0 ? void 0 : value.WSDisconnectionForm)
38406
38376
  })))));
@@ -43293,8 +43263,10 @@ const WorkflowTimeline = _ref => {
43293
43263
  if (!timeline || timeline.length === 0) {
43294
43264
  return null;
43295
43265
  }
43296
- const getStatusClass = index => {
43297
- if (index === 0) return "current2";
43266
+ const getStatusClass = (index, checkpoint) => {
43267
+ var _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$state4;
43268
+ 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);
43269
+ if (index === 0 && !isTerminal) return "current2";
43298
43270
  return "completed2";
43299
43271
  };
43300
43272
  const convertEpochToDateTime = epoch => {
@@ -43327,8 +43299,8 @@ const WorkflowTimeline = _ref => {
43327
43299
  }, t("WORKFLOW_TIMELINE"))), /*#__PURE__*/React.createElement("div", {
43328
43300
  className: hideTimeline ? "hidden-content" : "timeline-container2"
43329
43301
  }, timeline.map((checkpoint, index) => {
43330
- var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state, _checkpoint$state2, _checkpoint$state3, _checkpoint$assigner, _checkpoint$assigner2;
43331
- const statusClass = getStatusClass(index);
43302
+ var _checkpoint$auditDeta, _checkpoint$auditDeta2, _checkpoint$state5, _checkpoint$state6, _checkpoint$state7, _checkpoint$assigner, _checkpoint$assigner2;
43303
+ const statusClass = getStatusClass(index, checkpoint);
43332
43304
  const showLine = index !== timeline.length - 1 && timeline.length > 1;
43333
43305
  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);
43334
43306
  return /*#__PURE__*/React.createElement("div", {
@@ -43346,13 +43318,13 @@ const WorkflowTimeline = _ref => {
43346
43318
  className: "timeline-header2"
43347
43319
  }, /*#__PURE__*/React.createElement("div", {
43348
43320
  className: "timeline-title2"
43349
- }, t(`WF_${checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state = checkpoint.state) === null || _checkpoint$state === void 0 ? void 0 : _checkpoint$state.state}`)), /*#__PURE__*/React.createElement("span", {
43321
+ }, 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.createElement("span", {
43350
43322
  className: "timeline-date2"
43351
43323
  }, convertEpochToDateTime(epochTime))), /*#__PURE__*/React.createElement("div", {
43352
43324
  className: "timeline-body2"
43353
43325
  }, /*#__PURE__*/React.createElement("div", {
43354
43326
  className: `timeline-status-tag2 status-${statusClass}`
43355
- }, t((checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state2 = checkpoint.state) === null || _checkpoint$state2 === void 0 ? void 0 : _checkpoint$state2.applicationStatus) || (checkpoint === null || checkpoint === void 0 ? void 0 : (_checkpoint$state3 = checkpoint.state) === null || _checkpoint$state3 === void 0 ? void 0 : _checkpoint$state3.state))), (checkpoint === null || checkpoint === void 0 ? void 0 : checkpoint.comment) && /*#__PURE__*/React.createElement("div", {
43327
+ }, 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.createElement("div", {
43356
43328
  className: "timeline-comment2"
43357
43329
  }, 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.createElement("div", {
43358
43330
  className: "timeline-footer2"
@@ -46907,7 +46879,7 @@ const BPADocuments = _ref => {
46907
46879
  if (applicationStatus === "DOC_VERIFICATION_INPROGRESS" && (actions === null || actions === void 0 ? void 0 : actions.length) > 0) setCheckEnablingDocs(true);else setCheckEnablingDocs(false);
46908
46880
  }, [applicationData, bpaActionsDetails]);
46909
46881
  return /*#__PURE__*/React.createElement("div", null, bpaTaxDocuments === null || bpaTaxDocuments === void 0 ? void 0 : bpaTaxDocuments.map((document, index) => {
46910
- return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SelectDocument$3, {
46882
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(SelectDocument$2, {
46911
46883
  key: index,
46912
46884
  index: index,
46913
46885
  document: document,
@@ -46924,7 +46896,7 @@ const BPADocuments = _ref => {
46924
46896
  }));
46925
46897
  }));
46926
46898
  };
46927
- function SelectDocument$3(_ref2) {
46899
+ function SelectDocument$2(_ref2) {
46928
46900
  var _doc$dropdownData, _doc$uploadedDocument;
46929
46901
  let {
46930
46902
  t,
@@ -47171,7 +47143,7 @@ function InspectionReport(_ref) {
47171
47143
  })));
47172
47144
  }
47173
47145
 
47174
- function SelectDocument$4(_ref) {
47146
+ function SelectDocument$3(_ref) {
47175
47147
  let {
47176
47148
  t,
47177
47149
  document: doc,
@@ -47420,7 +47392,7 @@ const NOCDocuments = _ref2 => {
47420
47392
  minWidth: "80px"
47421
47393
  }
47422
47394
  }), checkEnablingDocs && (nocTaxDocuments === null || nocTaxDocuments === void 0 ? void 0 : nocTaxDocuments.map((document, index) => {
47423
- return /*#__PURE__*/React.createElement(SelectDocument$4, {
47395
+ return /*#__PURE__*/React.createElement(SelectDocument$3, {
47424
47396
  key: index,
47425
47397
  document: document,
47426
47398
  t: t,
@@ -49409,7 +49381,7 @@ const WSApprovalChecklist = _ref => {
49409
49381
  };
49410
49382
 
49411
49383
  function ApplicationDetailsContent(_ref) {
49412
- 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;
49384
+ 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;
49413
49385
  let {
49414
49386
  applicationDetails,
49415
49387
  workflowDetails,
@@ -49680,6 +49652,7 @@ function ApplicationDetailsContent(_ref) {
49680
49652
  var _detail$additionalDet;
49681
49653
  return detail === null || detail === void 0 ? void 0 : (_detail$additionalDet = detail.additionalDetails) === null || _detail$additionalDet === void 0 ? void 0 : _detail$additionalDet.documents;
49682
49654
  });
49655
+ 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"));
49683
49656
  return /*#__PURE__*/React.createElement(Card, {
49684
49657
  className: "employeeCard-override"
49685
49658
  }, isInfoLabel ? /*#__PURE__*/React.createElement(InfoDetails, {
@@ -49690,7 +49663,7 @@ function ApplicationDetailsContent(_ref) {
49690
49663
  infoClickInfoLabel: getClickInfoDetails(),
49691
49664
  infoClickInfoLabel1: getClickInfoDetails1()
49692
49665
  }) : null, applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a2 = applicationDetails.applicationDetails) === null || _applicationDetails$a2 === void 0 ? void 0 : _applicationDetails$a2.map((detail, index) => {
49693
- 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$appl, _detail$additionalDet21, _detail$additionalDet22, _detail$additionalDet23, _detail$additionalDet24, _detail$additionalDet25, _detail$additionalDet26, _detail$additionalDet27, _detail$additionalDet28, _detail$additionalDet29;
49666
+ 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;
49694
49667
  return /*#__PURE__*/React.createElement(React.Fragment, {
49695
49668
  key: index
49696
49669
  }, /*#__PURE__*/React.createElement("div", {
@@ -49916,12 +49889,12 @@ function ApplicationDetailsContent(_ref) {
49916
49889
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet15 = detail.additionalDetails) === null || _detail$additionalDet15 === void 0 ? void 0 : _detail$additionalDet15.subOccupancyTableDetails) && /*#__PURE__*/React.createElement(SubOccupancyTable, {
49917
49890
  edcrDetails: detail === null || detail === void 0 ? void 0 : detail.additionalDetails,
49918
49891
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData
49919
- }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
49892
+ }), !isDisconnectionExecuted && (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet16 = detail.additionalDetails) === null || _detail$additionalDet16 === void 0 ? void 0 : _detail$additionalDet16.documentsWithUrl) && /*#__PURE__*/React.createElement(DocumentsPreview, {
49920
49893
  documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet17 = detail.additionalDetails) === null || _detail$additionalDet17 === void 0 ? void 0 : _detail$additionalDet17.documentsWithUrl
49921
- }), (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.createElement(PropertyDocuments, {
49894
+ }), !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.createElement(PropertyDocuments, {
49922
49895
  documents: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet19 = detail.additionalDetails) === null || _detail$additionalDet19 === void 0 ? void 0 : _detail$additionalDet19.documents,
49923
49896
  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)
49924
- }), (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$appl = applicationData.applicationType) !== null && _applicationData$appl !== void 0 && _applicationData$appl.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.createElement(DueVerification, {
49897
+ }), !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.createElement(DueVerification, {
49925
49898
  applicationData: applicationData
49926
49899
  }), (detail === null || detail === void 0 ? void 0 : (_detail$additionalDet21 = detail.additionalDetails) === null || _detail$additionalDet21 === void 0 ? void 0 : _detail$additionalDet21.taxHeadEstimatesCalculation) && /*#__PURE__*/React.createElement(PropertyEstimates, {
49927
49900
  taxHeadEstimatesCalculation: detail === null || detail === void 0 ? void 0 : (_detail$additionalDet22 = detail.additionalDetails) === null || _detail$additionalDet22 === void 0 ? void 0 : _detail$additionalDet22.taxHeadEstimatesCalculation
@@ -50285,7 +50258,7 @@ function ApplicationDetailsWarningPopup(_ref) {
50285
50258
  }
50286
50259
 
50287
50260
  const ApplicationDetails = props => {
50288
- var _workflowDetails$data;
50261
+ var _selectedAction$actio, _workflowDetails$data;
50289
50262
  const tenantId = Digit.ULBService.getCurrentTenantId();
50290
50263
  const state = Digit.ULBService.getStateId();
50291
50264
  const {
@@ -50300,6 +50273,7 @@ const ApplicationDetails = props => {
50300
50273
  const [showModal, setShowModal] = useState(false);
50301
50274
  const [isEnableLoader, setIsEnableLoader] = useState(false);
50302
50275
  const [isWarningPop, setWarningPopUp] = useState(false);
50276
+ const [showConfirmation, setShowConfirmation] = useState(false);
50303
50277
  const [approvalChecklist, setApprovalChecklist] = useState({});
50304
50278
  const {
50305
50279
  applicationDetails,
@@ -50416,7 +50390,7 @@ const ApplicationDetails = props => {
50416
50390
  const closeWarningPopup = () => {
50417
50391
  setWarningPopUp(false);
50418
50392
  };
50419
- const submitAction = function (data, nocData, isOBPS) {
50393
+ const executeSubmitAction = function (data, nocData, isOBPS) {
50420
50394
  if (nocData === void 0) {
50421
50395
  nocData = false;
50422
50396
  }
@@ -50546,6 +50520,33 @@ const ApplicationDetails = props => {
50546
50520
  return Promise.reject(e);
50547
50521
  }
50548
50522
  };
50523
+ const submitAction = function (data, nocData, isOBPS) {
50524
+ if (nocData === void 0) {
50525
+ nocData = false;
50526
+ }
50527
+ if (isOBPS === void 0) {
50528
+ isOBPS = {};
50529
+ }
50530
+ try {
50531
+ if (moduleCode !== null && moduleCode !== void 0 && moduleCode.includes("WS")) {
50532
+ setShowConfirmation({
50533
+ data,
50534
+ nocData,
50535
+ isOBPS
50536
+ });
50537
+ return Promise.resolve();
50538
+ }
50539
+ return executeSubmitAction(data, nocData, isOBPS);
50540
+ } catch (e) {
50541
+ return Promise.reject(e);
50542
+ }
50543
+ };
50544
+ 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";
50545
+ const confirmSubmitAction = () => {
50546
+ const confirmationData = showConfirmation;
50547
+ setShowConfirmation(false);
50548
+ return executeSubmitAction(confirmationData.data, confirmationData.nocData, confirmationData.isOBPS);
50549
+ };
50549
50550
  if (isLoading || isEnableLoader) {
50550
50551
  return /*#__PURE__*/React.createElement(Loader, null);
50551
50552
  }
@@ -50581,7 +50582,31 @@ const ApplicationDetails = props => {
50581
50582
  showApprovalChecklist: showApprovalChecklist,
50582
50583
  moduleCode: moduleCode,
50583
50584
  cardFormWrapperClassName: "modal-form"
50584
- }) : null, isWarningPop ? /*#__PURE__*/React.createElement(ApplicationDetailsWarningPopup, {
50585
+ }) : null, showConfirmation ? /*#__PURE__*/React.createElement(Modal, {
50586
+ headerBarMain: /*#__PURE__*/React.createElement("h1", {
50587
+ className: "heading-m"
50588
+ }, "Confirmation"),
50589
+ headerBarEnd: /*#__PURE__*/React.createElement("div", {
50590
+ onClick: () => setShowConfirmation(false),
50591
+ style: {
50592
+ cursor: "pointer",
50593
+ fontSize: "16px",
50594
+ padding: "10px"
50595
+ }
50596
+ }, "\u2715"),
50597
+ actionCancelLabel: "Cancel",
50598
+ actionCancelOnSubmit: () => setShowConfirmation(false),
50599
+ actionSaveLabel: "Yes",
50600
+ actionSaveOnSubmit: confirmSubmitAction
50601
+ }, /*#__PURE__*/React.createElement("div", {
50602
+ style: {
50603
+ padding: "16px"
50604
+ }
50605
+ }, /*#__PURE__*/React.createElement("p", {
50606
+ style: {
50607
+ fontSize: "16px"
50608
+ }
50609
+ }, "Are you sure you want to ", actionName, " ?"))) : null, isWarningPop ? /*#__PURE__*/React.createElement(ApplicationDetailsWarningPopup, {
50585
50610
  action: selectedAction,
50586
50611
  workflowDetails: workflowDetails,
50587
50612
  businessService: businessService,
@@ -51107,16 +51132,16 @@ const ApplicationDetails$1 = () => {
51107
51132
  };
51108
51133
 
51109
51134
  const GetConnectionDetails = () => {
51110
- 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$a18, _applicationDetails$f5, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$a19, _applicationDetails$a20, _applicationDetails$a21, _applicationDetails$f6, _applicationDetails$f7;
51135
+ 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;
51111
51136
  const getBillSearch = function () {
51112
51137
  try {
51113
51138
  const _temp = function (_applicationDetails$f8) {
51114
51139
  if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f8 = applicationDetails.fetchBillsData) === null || _applicationDetails$f8 === void 0 ? void 0 : _applicationDetails$f8.length) > 0) {
51115
- var _applicationDetails$a22;
51140
+ var _applicationDetails$a24;
51116
51141
  const service = serviceType === "WATER" ? "WS" : "SW";
51117
51142
  let wsSearchFilters = {
51118
51143
  isConnectionSearch: true,
51119
- connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a22 = applicationDetails.applicationData) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.connectionNo
51144
+ connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a24 = applicationDetails.applicationData) === null || _applicationDetails$a24 === void 0 ? void 0 : _applicationDetails$a24.connectionNo
51120
51145
  };
51121
51146
  return Promise.resolve(Digit.WSService.search({
51122
51147
  tenantId,
@@ -51129,8 +51154,8 @@ const GetConnectionDetails = () => {
51129
51154
  bussinessService: service
51130
51155
  };
51131
51156
  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) {
51132
- var _applicationDetails$a23;
51133
- downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a23 = applicationDetails.applicationData) === null || _applicationDetails$a23 === void 0 ? void 0 : _applicationDetails$a23.connectionNo, filters);
51157
+ var _applicationDetails$a25;
51158
+ downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a25 = applicationDetails.applicationData) === null || _applicationDetails$a25 === void 0 ? void 0 : _applicationDetails$a25.connectionNo, filters);
51134
51159
  }
51135
51160
  });
51136
51161
  }
@@ -51325,9 +51350,11 @@ const GetConnectionDetails = () => {
51325
51350
  });
51326
51351
  } else {
51327
51352
  var _billData$2, _applicationDetails$f4;
51328
- 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") {
51353
+ 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) {
51354
+ var _applicationDetails$a18;
51329
51355
  Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
51330
- history.push(`${pathname}`);
51356
+ const connectionNumber = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.connectionNo) || applicationNumber;
51357
+ history.push(`${pathname}?from=connection-details&connectionNumber=${encodeURIComponent(connectionNumber)}`);
51331
51358
  } else {
51332
51359
  setshowModal(true);
51333
51360
  }
@@ -51340,11 +51367,12 @@ const GetConnectionDetails = () => {
51340
51367
  getBillAmendmentButton();
51341
51368
  } else if (action === "DISCONNECTION_BUTTON") {
51342
51369
  getDisconnectionButton();
51343
- } else if (action === "RESTORATION_BUTTON") {
51370
+ } else if (action === "RESTORATION_BUTTON" || action === "RECONNECTION_BUTTON") {
51344
51371
  getRestorationButton();
51345
51372
  }
51346
51373
  }
51347
- const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a18 = applicationDetails.applicationData) === null || _applicationDetails$a18 === void 0 ? void 0 : _applicationDetails$a18.status) === "Active" ? true : false;
51374
+ 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;
51375
+ 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);
51348
51376
  const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
51349
51377
  const showActionRestoration = ["RESTORATION_BUTTON"];
51350
51378
  let dowloadOptions = [];
@@ -51428,7 +51456,7 @@ const GetConnectionDetails = () => {
51428
51456
  ref: actionMenuRef,
51429
51457
  label: t("WF_TAKE_ACTION"),
51430
51458
  onSubmit: () => setDisplayMenu(!displayMenu)
51431
- })) : applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a19 = applicationDetails.applicationData) !== null && _applicationDetails$a19 !== void 0 && _applicationDetails$a19.isDisconnectionTemporary && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a20 = applicationDetails.applicationData) === null || _applicationDetails$a20 === void 0 ? void 0 : _applicationDetails$a20.status) !== "Active" && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a21 = applicationDetails.applicationData) === null || _applicationDetails$a21 === void 0 ? void 0 : _applicationDetails$a21.applicationStatus) == "DISCONNECTION_EXECUTED" ? /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
51459
+ })) : isDisconnectedOrInactive ? /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
51432
51460
  options: showActionRestoration,
51433
51461
  localeKeyPrefix: "WS",
51434
51462
  t: t,
@@ -54858,9 +54886,6 @@ const Step3_UploadDocuments = _ref => {
54858
54886
  }, {
54859
54887
  code: "VOTER_ID",
54860
54888
  i18nKey: "Voter ID"
54861
- }, {
54862
- code: "PAN",
54863
- i18nKey: "PAN Card"
54864
54889
  }, {
54865
54890
  code: "OTHER",
54866
54891
  i18nKey: "Any other document configured by DJB"
@@ -55217,7 +55242,7 @@ const Step3_UploadDocuments = _ref => {
55217
55242
  flex: 1
55218
55243
  }
55219
55244
  }, /*#__PURE__*/React.createElement(TextInput, {
55220
- type: showDocumentNumber ? "text" : "password",
55245
+ type: "text",
55221
55246
  value: documentNumber,
55222
55247
  onChange: e => {
55223
55248
  if (!isDocumentUidLocked) {
@@ -55241,6 +55266,7 @@ const Step3_UploadDocuments = _ref => {
55241
55266
  disabled: isDocumentUidLocked,
55242
55267
  style: {
55243
55268
  marginBottom: "0",
55269
+ WebkitTextSecurity: showDocumentNumber ? "none" : "disc",
55244
55270
  ...(fieldErrors.documentNumber ? {
55245
55271
  border: "1px solid #d32f2f"
55246
55272
  } : {}),
@@ -56829,7 +56855,7 @@ const DisconnectionApplication = () => {
56829
56855
  newConfig$1.filter(e => e.head === "NEW_DISCONNECTION").forEach(obj => {
56830
56856
  config = config.concat(obj.body.filter(a => !a.hideInEmployee));
56831
56857
  });
56832
- config.indexRoute = "docsrequired";
56858
+ config.indexRoute = "k-number";
56833
56859
  return /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
56834
56860
  const {
56835
56861
  component,
@@ -56857,56 +56883,24 @@ const DisconnectionApplication = () => {
56857
56883
  })));
56858
56884
  };
56859
56885
 
56860
- const getPath$6 = (path, params) => {
56861
- params && Object.keys(params).map(key => {
56862
- path = path.replace(`:${key}`, params[key]);
56863
- });
56864
- return path;
56865
- };
56866
- const DisconnectionApplication$1 = () => {
56886
+ const RestorationApplication = () => {
56867
56887
  const {
56868
56888
  t
56869
56889
  } = useTranslation();
56870
56890
  const match = useRouteMatch();
56871
- const stateId = Digit.ULBService.getStateId();
56872
- let {
56873
- data: newConfig,
56874
- isLoading
56875
- } = Digit.Hooks.ws.useWSConfigMDMS.WSDisconnectionConfig(stateId, {});
56876
- let config = [];
56877
- if (!isLoading) {
56878
- newConfig.forEach(obj => {
56879
- config = config.concat(obj.body.filter(a => !a.hideInCitizen));
56880
- });
56881
- config.indexRoute = "new-restoration";
56882
- } else {
56883
- return /*#__PURE__*/React.createElement(Loader, null);
56884
- }
56885
- console.log("configconfig", config);
56886
- return /*#__PURE__*/React.createElement(Switch, null, config.map((routeObj, index) => {
56887
- const {
56888
- component,
56889
- texts,
56890
- inputs,
56891
- key,
56892
- isSkipEnabled
56893
- } = routeObj;
56894
- const Component = Digit.ComponentRegistryService.getComponent("WSRestorationForm");
56895
- return /*#__PURE__*/React.createElement(Route, {
56896
- path: `${getPath$6(match.path, match.params)}/new-restoration`,
56897
- key: index
56898
- }, /*#__PURE__*/React.createElement(Component, {
56899
- config: {
56900
- texts,
56901
- inputs,
56902
- key,
56903
- isSkipEnabled
56904
- },
56905
- t: t,
56906
- userType: "employee"
56907
- }));
56908
- }), /*#__PURE__*/React.createElement(Route, null, /*#__PURE__*/React.createElement(Redirect, {
56909
- to: `${getPath$6(match.path, match.params)}/${config.indexRoute}`
56891
+ const Component = Digit.ComponentRegistryService.getComponent("WSRestorationForm");
56892
+ return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(Route, {
56893
+ path: `${match.path}/new-restoration`
56894
+ }, /*#__PURE__*/React.createElement(Component, {
56895
+ config: {},
56896
+ t: t,
56897
+ userType: "employee"
56898
+ })), /*#__PURE__*/React.createElement(Route, {
56899
+ path: `${match.path}`
56900
+ }, /*#__PURE__*/React.createElement(Component, {
56901
+ config: {},
56902
+ t: t,
56903
+ userType: "employee"
56910
56904
  })));
56911
56905
  };
56912
56906
 
@@ -57775,7 +57769,7 @@ const EditDisconnectionByConfig = () => {
57775
57769
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
57776
57770
  useEffect(() => {
57777
57771
  if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
57778
- const config = newConfig.find(conf => conf.isDisonnectionEdit);
57772
+ const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
57779
57773
  if (config) {
57780
57774
  var _config$body;
57781
57775
  config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
@@ -57915,7 +57909,7 @@ const EditDisconnectionByConfig$1 = () => {
57915
57909
  const [sessionFormData, setSessionFormData, clearSessionFormData] = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {});
57916
57910
  useEffect(() => {
57917
57911
  if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
57918
- const config = newConfig.find(conf => conf.isDisonnectionEdit);
57912
+ const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
57919
57913
  if (config) {
57920
57914
  var _config$body;
57921
57915
  config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
@@ -58063,7 +58057,7 @@ const ResubmitDisconnection = () => {
58063
58057
  } = Digit.Hooks.ws.useWSApplicationActions(serviceType);
58064
58058
  useEffect(() => {
58065
58059
  if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
58066
- const config = newConfig.find(conf => conf.isDisonnectionEdit);
58060
+ const config = newConfig$1.find(conf => conf.isDisonnectionEdit);
58067
58061
  if (config) {
58068
58062
  var _config$body;
58069
58063
  config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
@@ -59670,7 +59664,6 @@ const OLDApplication = () => {
59670
59664
  };
59671
59665
 
59672
59666
  const FitterSandbox = _ref => {
59673
- var _applicationData$addi;
59674
59667
  let {
59675
59668
  t,
59676
59669
  action,
@@ -59815,22 +59808,7 @@ const FitterSandbox = _ref => {
59815
59808
  margin: 0,
59816
59809
  textTransform: "uppercase"
59817
59810
  }
59818
- }, "FITTER SANDBOX MOBILE TERMINAL (DIGITAL VERIFICATION)"), /*#__PURE__*/React.createElement("p", {
59819
- style: {
59820
- fontSize: "14px",
59821
- color: "#6e5e5e",
59822
- margin: "4px 0 0 0"
59823
- }
59824
- }, "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.createElement("div", {
59825
- style: {
59826
- backgroundColor: "#ffeded",
59827
- color: "#d4351c",
59828
- padding: "4px 12px",
59829
- borderRadius: "4px",
59830
- fontSize: "12px",
59831
- fontWeight: "700"
59832
- }
59833
- }, "FIELD SIMULATOR")), /*#__PURE__*/React.createElement("div", {
59811
+ }, "ENTER METER FITTER DETAILS")))), /*#__PURE__*/React.createElement("div", {
59834
59812
  style: {
59835
59813
  display: "flex",
59836
59814
  gap: "16px",
@@ -60053,6 +60031,7 @@ const WSExecuteDisconnection = () => {
60053
60031
  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");
60054
60032
  const history = useHistory();
60055
60033
  const [showConfirmation, setShowConfirmation] = useState(false);
60034
+ const actionName = ((action === null || action === void 0 ? void 0 : action.action) || action || "execute disconnection").replace(/[ _-]+/g, " ").toLowerCase();
60056
60035
  const [payload, setPayload] = useState(null);
60057
60036
  const [isEnableLoader, setIsEnableLoader] = useState(false);
60058
60037
  const [showToast, setShowToast] = useState(null);
@@ -60129,7 +60108,7 @@ const WSExecuteDisconnection = () => {
60129
60108
  style: {
60130
60109
  fontSize: "16px"
60131
60110
  }
60132
- }, "Are you sure you want to execute disconnection?"))), showToast && /*#__PURE__*/React.createElement(Toast, {
60111
+ }, "Are you sure you want to ", actionName, " ?"))), showToast && /*#__PURE__*/React.createElement(Toast, {
60133
60112
  error: showToast.key === "error",
60134
60113
  label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
60135
60114
  onClose: () => setShowToast(null)
@@ -60290,7 +60269,7 @@ const componentsToRegister = {
60290
60269
  WSEditModifyApplication: EditModifyApplication,
60291
60270
  WSMutationApplication: MutationApplication,
60292
60271
  WSDisconnectionApplication: DisconnectionApplication,
60293
- WSRestorationApplication: DisconnectionApplication$1,
60272
+ WSRestorationApplication: RestorationApplication,
60294
60273
  WSEditApplicationByConfig: WSEditApplicationByConfig,
60295
60274
  WSGetDisconnectionDetails: GetDisconnectionDetails,
60296
60275
  WSModifyApplicationDetails: ModifyApplicationDetails,