@djb25/digit-ui-module-ws 1.0.49 → 1.0.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -10046,7 +10046,7 @@ const BILLSBreadCrumbs = _ref => {
10046
10046
  }));
10047
10047
  };
10048
10048
  const App$1 = _ref2 => {
10049
- var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg;
10049
+ var _Digit, _Digit$ComponentRegis, _Digit2, _Digit2$ComponentRegi, _Digit3, _Digit3$ComponentRegi, _Digit4, _Digit4$ComponentRegi, _Digit5, _Digit5$ComponentRegi, _Digit6, _Digit6$ComponentRegi, _Digit7, _Digit7$ComponentRegi, _Digit8, _Digit8$ComponentRegi, _Digit9, _Digit9$ComponentRegi, _Digit0, _Digit0$ComponentRegi, _Digit1, _Digit1$ComponentRegi, _Digit10, _Digit10$ComponentReg, _Digit11, _Digit11$ComponentReg, _Digit12, _Digit12$ComponentReg, _Digit13, _Digit13$ComponentReg, _Digit14, _Digit14$ComponentReg, _Digit15, _Digit15$ComponentReg, _Digit16, _Digit16$ComponentReg, _Digit17, _Digit17$ComponentReg, _Digit18, _Digit18$ComponentReg, _Digit19, _Digit19$ComponentReg, _Digit20, _Digit20$ComponentReg, _Digit21, _Digit21$ComponentReg, _Digit22, _Digit22$ComponentReg, _Digit23, _Digit23$ComponentReg, _Digit24, _Digit24$ComponentReg, _Digit25, _Digit25$ComponentReg, _Digit26, _Digit26$ComponentReg, _Digit27, _Digit27$ComponentReg, _Digit28, _Digit28$ComponentReg, _Digit29, _Digit29$ComponentReg, _Digit30, _Digit30$ComponentReg;
10050
10050
  let path = _ref2.path;
10051
10051
  const location = reactRouterDom.useLocation();
10052
10052
  const WSDocsRequired = (_Digit = Digit) === null || _Digit === void 0 ? void 0 : (_Digit$ComponentRegis = _Digit.ComponentRegistryService) === null || _Digit$ComponentRegis === void 0 ? void 0 : _Digit$ComponentRegis.getComponent("WSDocsRequired");
@@ -10066,21 +10066,22 @@ const App$1 = _ref2 => {
10066
10066
  const WSConsumptionDetails = (_Digit13 = Digit) === null || _Digit13 === void 0 ? void 0 : (_Digit13$ComponentReg = _Digit13.ComponentRegistryService) === null || _Digit13$ComponentReg === void 0 ? void 0 : _Digit13$ComponentReg.getComponent("WSConsumptionDetails");
10067
10067
  const WSModifyApplication = (_Digit14 = Digit) === null || _Digit14 === void 0 ? void 0 : (_Digit14$ComponentReg = _Digit14.ComponentRegistryService) === null || _Digit14$ComponentReg === void 0 ? void 0 : _Digit14$ComponentReg.getComponent("WSModifyApplication");
10068
10068
  const WSEditModifyApplication = (_Digit15 = Digit) === null || _Digit15 === void 0 ? void 0 : (_Digit15$ComponentReg = _Digit15.ComponentRegistryService) === null || _Digit15$ComponentReg === void 0 ? void 0 : _Digit15$ComponentReg.getComponent("WSEditModifyApplication");
10069
- const WSDisconnectionApplication = (_Digit16 = Digit) === null || _Digit16 === void 0 ? void 0 : (_Digit16$ComponentReg = _Digit16.ComponentRegistryService) === null || _Digit16$ComponentReg === void 0 ? void 0 : _Digit16$ComponentReg.getComponent("WSDisconnectionApplication");
10070
- const WSRestorationApplication = (_Digit17 = Digit) === null || _Digit17 === void 0 ? void 0 : (_Digit17$ComponentReg = _Digit17.ComponentRegistryService) === null || _Digit17$ComponentReg === void 0 ? void 0 : _Digit17$ComponentReg.getComponent("WSRestorationApplication");
10071
- const WSEditApplicationByConfig = (_Digit18 = Digit) === null || _Digit18 === void 0 ? void 0 : (_Digit18$ComponentReg = _Digit18.ComponentRegistryService) === null || _Digit18$ComponentReg === void 0 ? void 0 : _Digit18$ComponentReg.getComponent("WSEditApplicationByConfig");
10072
- const WSBillIAmendMentInbox = (_Digit19 = Digit) === null || _Digit19 === void 0 ? void 0 : (_Digit19$ComponentReg = _Digit19.ComponentRegistryService) === null || _Digit19$ComponentReg === void 0 ? void 0 : _Digit19$ComponentReg.getComponent("WSBillIAmendMentInbox");
10073
- const WSGetDisconnectionDetails = (_Digit20 = Digit) === null || _Digit20 === void 0 ? void 0 : (_Digit20$ComponentReg = _Digit20.ComponentRegistryService) === null || _Digit20$ComponentReg === void 0 ? void 0 : _Digit20$ComponentReg.getComponent("WSGetDisconnectionDetails");
10074
- const WSModifyApplicationDetails = (_Digit21 = Digit) === null || _Digit21 === void 0 ? void 0 : (_Digit21$ComponentReg = _Digit21.ComponentRegistryService) === null || _Digit21$ComponentReg === void 0 ? void 0 : _Digit21$ComponentReg.getComponent("WSModifyApplicationDetails");
10075
- const WSEditDisconnectionApplication = (_Digit22 = Digit) === null || _Digit22 === void 0 ? void 0 : (_Digit22$ComponentReg = _Digit22.ComponentRegistryService) === null || _Digit22$ComponentReg === void 0 ? void 0 : _Digit22$ComponentReg.getComponent("WSEditDisconnectionApplication");
10076
- const WSEditDisconnectionByConfig = (_Digit23 = Digit) === null || _Digit23 === void 0 ? void 0 : (_Digit23$ComponentReg = _Digit23.ComponentRegistryService) === null || _Digit23$ComponentReg === void 0 ? void 0 : _Digit23$ComponentReg.getComponent("WSEditDisconnectionByConfig");
10077
- const WSResubmitDisconnection = (_Digit24 = Digit) === null || _Digit24 === void 0 ? void 0 : (_Digit24$ComponentReg = _Digit24.ComponentRegistryService) === null || _Digit24$ComponentReg === void 0 ? void 0 : _Digit24$ComponentReg.getComponent("WSResubmitDisconnection");
10078
- const WSSearchIntegrated = (_Digit25 = Digit) === null || _Digit25 === void 0 ? void 0 : (_Digit25$ComponentReg = _Digit25.ComponentRegistryService) === null || _Digit25$ComponentReg === void 0 ? void 0 : _Digit25$ComponentReg.getComponent("WSSearchIntegrated");
10079
- const WSBulkBillGeneration = (_Digit26 = Digit) === null || _Digit26 === void 0 ? void 0 : (_Digit26$ComponentReg = _Digit26.ComponentRegistryService) === null || _Digit26$ComponentReg === void 0 ? void 0 : _Digit26$ComponentReg.getComponent("WSBulkBillGeneration");
10080
- const CPTCreateProperty = (_Digit27 = Digit) === null || _Digit27 === void 0 ? void 0 : (_Digit27$ComponentReg = _Digit27.ComponentRegistryService) === null || _Digit27$ComponentReg === void 0 ? void 0 : _Digit27$ComponentReg.getComponent("CPTCreateProperty");
10081
- const CPTAcknowledgement = (_Digit28 = Digit) === null || _Digit28 === void 0 ? void 0 : (_Digit28$ComponentReg = _Digit28.ComponentRegistryService) === null || _Digit28$ComponentReg === void 0 ? void 0 : _Digit28$ComponentReg.getComponent("CPTAcknowledgement");
10082
- const WSInfoPage = (_Digit29 = Digit) === null || _Digit29 === void 0 ? void 0 : (_Digit29$ComponentReg = _Digit29.ComponentRegistryService) === null || _Digit29$ComponentReg === void 0 ? void 0 : _Digit29$ComponentReg.getComponent("WSInfoPage");
10083
- const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/water/bulk-bill");
10069
+ const WSMutationApplication = (_Digit16 = Digit) === null || _Digit16 === void 0 ? void 0 : (_Digit16$ComponentReg = _Digit16.ComponentRegistryService) === null || _Digit16$ComponentReg === void 0 ? void 0 : _Digit16$ComponentReg.getComponent("WSMutationApplication");
10070
+ const WSDisconnectionApplication = (_Digit17 = Digit) === null || _Digit17 === void 0 ? void 0 : (_Digit17$ComponentReg = _Digit17.ComponentRegistryService) === null || _Digit17$ComponentReg === void 0 ? void 0 : _Digit17$ComponentReg.getComponent("WSDisconnectionApplication");
10071
+ const WSRestorationApplication = (_Digit18 = Digit) === null || _Digit18 === void 0 ? void 0 : (_Digit18$ComponentReg = _Digit18.ComponentRegistryService) === null || _Digit18$ComponentReg === void 0 ? void 0 : _Digit18$ComponentReg.getComponent("WSRestorationApplication");
10072
+ const WSEditApplicationByConfig = (_Digit19 = Digit) === null || _Digit19 === void 0 ? void 0 : (_Digit19$ComponentReg = _Digit19.ComponentRegistryService) === null || _Digit19$ComponentReg === void 0 ? void 0 : _Digit19$ComponentReg.getComponent("WSEditApplicationByConfig");
10073
+ const WSBillIAmendMentInbox = (_Digit20 = Digit) === null || _Digit20 === void 0 ? void 0 : (_Digit20$ComponentReg = _Digit20.ComponentRegistryService) === null || _Digit20$ComponentReg === void 0 ? void 0 : _Digit20$ComponentReg.getComponent("WSBillIAmendMentInbox");
10074
+ const WSGetDisconnectionDetails = (_Digit21 = Digit) === null || _Digit21 === void 0 ? void 0 : (_Digit21$ComponentReg = _Digit21.ComponentRegistryService) === null || _Digit21$ComponentReg === void 0 ? void 0 : _Digit21$ComponentReg.getComponent("WSGetDisconnectionDetails");
10075
+ const WSModifyApplicationDetails = (_Digit22 = Digit) === null || _Digit22 === void 0 ? void 0 : (_Digit22$ComponentReg = _Digit22.ComponentRegistryService) === null || _Digit22$ComponentReg === void 0 ? void 0 : _Digit22$ComponentReg.getComponent("WSModifyApplicationDetails");
10076
+ const WSEditDisconnectionApplication = (_Digit23 = Digit) === null || _Digit23 === void 0 ? void 0 : (_Digit23$ComponentReg = _Digit23.ComponentRegistryService) === null || _Digit23$ComponentReg === void 0 ? void 0 : _Digit23$ComponentReg.getComponent("WSEditDisconnectionApplication");
10077
+ const WSEditDisconnectionByConfig = (_Digit24 = Digit) === null || _Digit24 === void 0 ? void 0 : (_Digit24$ComponentReg = _Digit24.ComponentRegistryService) === null || _Digit24$ComponentReg === void 0 ? void 0 : _Digit24$ComponentReg.getComponent("WSEditDisconnectionByConfig");
10078
+ const WSResubmitDisconnection = (_Digit25 = Digit) === null || _Digit25 === void 0 ? void 0 : (_Digit25$ComponentReg = _Digit25.ComponentRegistryService) === null || _Digit25$ComponentReg === void 0 ? void 0 : _Digit25$ComponentReg.getComponent("WSResubmitDisconnection");
10079
+ const WSSearchIntegrated = (_Digit26 = Digit) === null || _Digit26 === void 0 ? void 0 : (_Digit26$ComponentReg = _Digit26.ComponentRegistryService) === null || _Digit26$ComponentReg === void 0 ? void 0 : _Digit26$ComponentReg.getComponent("WSSearchIntegrated");
10080
+ const WSBulkBillGeneration = (_Digit27 = Digit) === null || _Digit27 === void 0 ? void 0 : (_Digit27$ComponentReg = _Digit27.ComponentRegistryService) === null || _Digit27$ComponentReg === void 0 ? void 0 : _Digit27$ComponentReg.getComponent("WSBulkBillGeneration");
10081
+ const CPTCreateProperty = (_Digit28 = Digit) === null || _Digit28 === void 0 ? void 0 : (_Digit28$ComponentReg = _Digit28.ComponentRegistryService) === null || _Digit28$ComponentReg === void 0 ? void 0 : _Digit28$ComponentReg.getComponent("CPTCreateProperty");
10082
+ const CPTAcknowledgement = (_Digit29 = Digit) === null || _Digit29 === void 0 ? void 0 : (_Digit29$ComponentReg = _Digit29.ComponentRegistryService) === null || _Digit29$ComponentReg === void 0 ? void 0 : _Digit29$ComponentReg.getComponent("CPTAcknowledgement");
10083
+ const WSInfoPage = (_Digit30 = Digit) === null || _Digit30 === void 0 ? void 0 : (_Digit30$ComponentReg = _Digit30.ComponentRegistryService) === null || _Digit30$ComponentReg === void 0 ? void 0 : _Digit30$ComponentReg.getComponent("WSInfoPage");
10084
+ const locationCheck = window.location.href.includes("/employee/ws/new-application") || window.location.href.includes("/employee/ws/modify-application") || window.location.href.includes("/employee/ws/mutation-application") || window.location.href.includes("/employee/ws/edit-application") || window.location.href.includes("/employee/ws/activate-connection") || window.location.href.includes("/employee/ws/application-details") || window.location.href.includes("/employee/ws/modify-details") || window.location.href.includes("/employee/ws/ws-response") || window.location.href.includes("/employee/ws/new-disconnection/application-form") || window.location.href.includes("/employee/ws/ws-disconnection-response") || window.location.href.includes("/employee/ws/consumption-details") || window.location.href.includes("/employee/ws/edit-disconnection-application") || window.location.href.includes("/employee/ws/config-by-disconnection-application") || window.location.href.includes("/employee/ws/resubmit-disconnection-application") || window.location.href.includes("/employee/ws/water/bulk-bill");
10084
10085
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
10085
10086
  return /*#__PURE__*/React__default.createElement("div", {
10086
10087
  className: "app-container"
@@ -10220,6 +10221,9 @@ const App$1 = _ref2 => {
10220
10221
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
10221
10222
  path: path + "/modify-application-edit",
10222
10223
  component: WSEditModifyApplication
10224
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
10225
+ path: path + "/mutation-application",
10226
+ component: WSMutationApplication
10223
10227
  }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
10224
10228
  path: path + "/disconnection-application",
10225
10229
  component: WSDisconnectionDocsRequired
@@ -15060,7 +15064,7 @@ const WSActivationPageDetails = _ref => {
15060
15064
  const _useTranslation = reactI18next.useTranslation(),
15061
15065
  t = _useTranslation.t;
15062
15066
  const filters = getQueryStringParams(location.search);
15063
- const _ref2 = window.location.href.includes("modify") ? React.useState(formData !== null && formData !== void 0 && formData.activationDetails ? [formData === null || formData === void 0 ? void 0 : (_formData$activationD = formData.activationDetails) === null || _formData$activationD === void 0 ? void 0 : _formData$activationD[0]] : [createActivationDetails()]) : React.useState((formData === null || formData === void 0 ? void 0 : formData.activationDetails) || [createActivationDetails()]),
15067
+ const _ref2 = window.location.href.includes("modify") || window.location.href.includes("mutation") ? React.useState(formData !== null && formData !== void 0 && formData.activationDetails ? [formData === null || formData === void 0 ? void 0 : (_formData$activationD = formData.activationDetails) === null || _formData$activationD === void 0 ? void 0 : _formData$activationD[0]] : [createActivationDetails()]) : React.useState((formData === null || formData === void 0 ? void 0 : formData.activationDetails) || [createActivationDetails()]),
15064
15068
  activationDetails = _ref2[0],
15065
15069
  setActivationDetails = _ref2[1];
15066
15070
  const _useState = React.useState({
@@ -15160,7 +15164,7 @@ const ConnectionDetails$3 = _props => {
15160
15164
  trigger();
15161
15165
  }, [formData === null || formData === void 0 ? void 0 : (_formData$connectionD = formData.connectionDetails) === null || _formData$connectionD === void 0 ? void 0 : (_formData$connectionD2 = _formData$connectionD[0]) === null || _formData$connectionD2 === void 0 ? void 0 : _formData$connectionD2.connectionType]);
15162
15166
  React.useEffect(() => {
15163
- if (window.location.href.includes("modify")) trigger();
15167
+ if (window.location.href.includes("modify") || window.location.href.includes("mutation")) trigger();
15164
15168
  }, [activationDetails, formData === null || formData === void 0 ? void 0 : formData.ConnectionDetails, formData === null || formData === void 0 ? void 0 : formData.ConnectionHolderDetails, formData === null || formData === void 0 ? void 0 : formData.DocumentsRequired, formData === null || formData === void 0 ? void 0 : formData.connectionDetails, formData === null || formData === void 0 ? void 0 : formData.cpt]);
15165
15169
  React.useEffect(() => {
15166
15170
  var _formState$errors$con;
@@ -15323,7 +15327,7 @@ const ConnectionDetails$3 = _props => {
15323
15327
  }
15324
15328
  }))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
15325
15329
  style: errorStyle
15326
- }, localFormState.touched.connectionExecutionDate ? errors === null || errors === void 0 ? void 0 : (_errors$connectionExe2 = errors.connectionExecutionDate) === null || _errors$connectionExe2 === void 0 ? void 0 : _errors$connectionExe2.message : ""), window.location.href.includes("modify") ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
15330
+ }, localFormState.touched.connectionExecutionDate ? errors === null || errors === void 0 ? void 0 : (_errors$connectionExe2 = errors.connectionExecutionDate) === null || _errors$connectionExe2 === void 0 ? void 0 : _errors$connectionExe2.message : ""), window.location.href.includes("modify") || window.location.href.includes("mutation") ? /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, {
15327
15331
  style: isMobile && isEmployee ? {
15328
15332
  fontWeight: "700",
15329
15333
  width: "100%"
@@ -20630,7 +20634,7 @@ const _excluded = ["t", "config", "onSelect", "formData", "formState", "setError
20630
20634
  const NUMBER_PATTERN = /^\d+$/;
20631
20635
  const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
20632
20636
  const PropertyWaterConnection = _ref => {
20633
- var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11;
20637
+ var _formData$cpt2, _errors$useDetails, _errors$useDetails2, _errors$useDetails3, _errors$useDetails4, _errors$useDetails5, _errors$useDetails6, _errors$useDetails7, _errors$useDetails8, _errors$useDetails9, _errors$useDetails0, _errors$useDetails1, _errors$useDetails10, _errors$useDetails11, _errors$useDetails12;
20634
20638
  let t = _ref.t,
20635
20639
  config = _ref.config,
20636
20640
  onSelect = _ref.onSelect,
@@ -20651,8 +20655,9 @@ const PropertyWaterConnection = _ref => {
20651
20655
  SelectYearofConstruction: null,
20652
20656
  NumberofDwellingUnits: "",
20653
20657
  NumberofRooms: "",
20654
- hospitalBeds: "",
20655
- numnberOfStudents: ""
20658
+ numberOfBeds: "",
20659
+ numberOfStudents: "",
20660
+ ServantQuartersRoom: ""
20656
20661
  }
20657
20662
  }
20658
20663
  }),
@@ -20691,6 +20696,8 @@ const PropertyWaterConnection = _ref => {
20691
20696
  const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
20692
20697
  const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
20693
20698
  const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
20699
+ const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
20700
+ const isServentHouse = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "Apartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "FlatOrApartment" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "IndividualHouse";
20694
20701
  const yearOptions = React.useMemo(() => {
20695
20702
  const currentYear = new Date().getFullYear();
20696
20703
  const years = [];
@@ -20820,8 +20827,9 @@ const PropertyWaterConnection = _ref => {
20820
20827
  setValue("useDetails.SelectYearofConstruction", null);
20821
20828
  setValue("useDetails.NumberofDwellingUnits", "");
20822
20829
  setValue("useDetails.NumberofRooms", "");
20823
- setValue("useDetails.hospitalBeds", "");
20824
- setValue("useDetails.numnberOfStudents", "");
20830
+ setValue("useDetails.numberOfBeds", "");
20831
+ setValue("useDetails.numberOfStudents", "");
20832
+ setValue("useDetails.ServantQuartersRoom", "");
20825
20833
  }
20826
20834
  }, [formData === null || formData === void 0 ? void 0 : (_formData$cpt2 = formData.cpt) === null || _formData$cpt2 === void 0 ? void 0 : _formData$cpt2.details, formData === null || formData === void 0 ? void 0 : formData.cpt, categoryOptions, propertyTypeOptions, usageTypeOptions, floorOptions, yearOptions, categoryTypeList, setValue]);
20827
20835
  const lastErrorState = React__default.useRef(null);
@@ -21004,7 +21012,7 @@ const PropertyWaterConnection = _ref => {
21004
21012
  })
21005
21013
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21006
21014
  style: errorStyle
21007
- }, errors.useDetails.SelectYearofConstruction.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React__default.createElement("div", {
21015
+ }, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React__default.createElement("div", {
21008
21016
  className: "form-field"
21009
21017
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
21010
21018
  t: t,
@@ -21016,7 +21024,7 @@ const PropertyWaterConnection = _ref => {
21016
21024
  }),
21017
21025
  name: "useDetails.NumberofDwellingUnits",
21018
21026
  disabled: isPropertyFound
21019
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21027
+ }))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofDwellingUnits) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21020
21028
  style: errorStyle
21021
21029
  }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_NUMBER_OF_ROOMS") + "*"), /*#__PURE__*/React__default.createElement("div", {
21022
21030
  className: "form-field"
@@ -21044,11 +21052,11 @@ const PropertyWaterConnection = _ref => {
21044
21052
  },
21045
21053
  required: isHospitalProperty ? t("REQUIRED_FIELD") : false
21046
21054
  }),
21047
- name: "useDetails.hospitalBeds",
21055
+ name: "useDetails.numberOfBeds",
21048
21056
  disabled: isPropertyFound
21049
- }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.hospitalBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21057
+ }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21050
21058
  style: errorStyle
21051
- }, errors.useDetails.hospitalBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_STUDENTS")), /*#__PURE__*/React__default.createElement("div", {
21059
+ }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_STUDENTS")), /*#__PURE__*/React__default.createElement("div", {
21052
21060
  className: "form-field"
21053
21061
  }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
21054
21062
  t: t,
@@ -21058,11 +21066,25 @@ const PropertyWaterConnection = _ref => {
21058
21066
  message: t("ERR_INVALID_NUMBER")
21059
21067
  }
21060
21068
  }),
21061
- name: "useDetails.numnberOfStudents",
21069
+ name: "useDetails.numberOfStudents",
21062
21070
  disabled: isPropertyFound
21063
- }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.numnberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21071
+ }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.numberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21064
21072
  style: errorStyle
21065
- }, errors.useDetails.numnberOfStudents.message)));
21073
+ }, errors.useDetails.numberOfStudents.message), isServentHouse ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_SERVENT_HOUSE")), /*#__PURE__*/React__default.createElement("div", {
21074
+ className: "form-field"
21075
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
21076
+ t: t,
21077
+ inputRef: register({
21078
+ pattern: {
21079
+ value: NUMBER_PATTERN,
21080
+ message: t("ERR_INVALID_NUMBER")
21081
+ }
21082
+ }),
21083
+ name: "useDetails.ServantQuartersRoom",
21084
+ disabled: isPropertyFound
21085
+ }))) : null, isServentHouse && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails12 = errors.useDetails) === null || _errors$useDetails12 === void 0 ? void 0 : _errors$useDetails12.ServantQuartersRoom) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
21086
+ style: errorStyle
21087
+ }, errors.useDetails.ServantQuartersRoom.message)));
21066
21088
  };
21067
21089
 
21068
21090
  const WSPropertyWaterConnection = props => {
@@ -28983,8 +29005,10 @@ const WSFeeEstimation = _ref => {
28983
29005
  };
28984
29006
 
28985
29007
  const ViewBreakup = _ref => {
28986
- var _wsAdditionalDetails$, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6;
28987
- let wsAdditionalDetails = _ref.wsAdditionalDetails;
29008
+ var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
29009
+ let wsAdditionalDetails = _ref.wsAdditionalDetails,
29010
+ print = _ref.print,
29011
+ download = _ref.download;
28988
29012
  const _useTranslation = reactI18next.useTranslation(),
28989
29013
  t = _useTranslation.t;
28990
29014
  const _useState = React.useState(false),
@@ -28993,6 +29017,44 @@ const ViewBreakup = _ref => {
28993
29017
  const _useState2 = React.useState({}),
28994
29018
  breakUpData = _useState2[0],
28995
29019
  setBreakUpData = _useState2[1];
29020
+ const breakupRef = React.useRef(null);
29021
+ const formatNumber = function (value, maximumFractionDigits) {
29022
+ if (maximumFractionDigits === void 0) {
29023
+ maximumFractionDigits = 2;
29024
+ }
29025
+ return Number(value || 0).toLocaleString("en-IN", {
29026
+ maximumFractionDigits
29027
+ });
29028
+ };
29029
+ const formatCurrency = value => /*#__PURE__*/React__default.createElement("span", null, "\u20B9", formatNumber(value));
29030
+ const DetailRows = _ref2 => {
29031
+ let rows = _ref2.rows;
29032
+ return rows.map(_ref3 => {
29033
+ let label = _ref3.label,
29034
+ value = _ref3.value,
29035
+ _ref3$currency = _ref3.currency,
29036
+ currency = _ref3$currency === void 0 ? false : _ref3$currency,
29037
+ _ref3$unit = _ref3.unit,
29038
+ unit = _ref3$unit === void 0 ? "" : _ref3$unit,
29039
+ _ref3$isText = _ref3.isText,
29040
+ isText = _ref3$isText === void 0 ? false : _ref3$isText;
29041
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29042
+ className: "border-none",
29043
+ rowContainerStyle: {
29044
+ margin: "0px"
29045
+ },
29046
+ labelStyle: {
29047
+ width: "50%"
29048
+ },
29049
+ key: label,
29050
+ label: label,
29051
+ text: currency ? formatCurrency(value) : isText ? value || "-" : "" + formatNumber(value) + unit,
29052
+ textStyle: {
29053
+ textAlign: "right"
29054
+ }
29055
+ });
29056
+ });
29057
+ };
28996
29058
  const Heading = props => {
28997
29059
  return /*#__PURE__*/React__default.createElement("h1", {
28998
29060
  className: "heading-m"
@@ -29015,21 +29077,181 @@ const ViewBreakup = _ref => {
29015
29077
  }, /*#__PURE__*/React__default.createElement(Close, null));
29016
29078
  };
29017
29079
  const onPopupOpen = () => {
29018
- var _sessionBillFormData$;
29019
- let breakupData = wsAdditionalDetails.additionalDetails.data || {};
29080
+ var _wsAdditionalDetails$, _sessionBillFormData$;
29081
+ let breakupData = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$ === void 0 ? void 0 : _wsAdditionalDetails$.data) || {};
29020
29082
  const sessionBillData = sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA");
29021
29083
  const sessionBillFormData = sessionBillData ? JSON.parse(sessionBillData) : {};
29022
29084
  if (sessionBillFormData !== null && sessionBillFormData !== void 0 && (_sessionBillFormData$ = sessionBillFormData.value) !== null && _sessionBillFormData$ !== void 0 && _sessionBillFormData$.totalAmount) breakupData = sessionBillFormData === null || sessionBillFormData === void 0 ? void 0 : sessionBillFormData.value;
29023
29085
  setBreakUpData(breakupData);
29024
29086
  showPopUp(true);
29025
29087
  };
29088
+ const getBreakupReportDetails = () => {
29089
+ var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3;
29090
+ const amountRows = function (rows) {
29091
+ if (rows === void 0) {
29092
+ rows = [];
29093
+ }
29094
+ return rows.map(row => ({
29095
+ title: t(row === null || row === void 0 ? void 0 : row.taxHeadCode),
29096
+ value: "\u20B9" + formatNumber(row === null || row === void 0 ? void 0 : row.amount)
29097
+ }));
29098
+ };
29099
+ const connectionHolder = 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$4 = _wsAdditionalDetails$3.connectionHolders) === null || _wsAdditionalDetails$4 === void 0 ? void 0 : _wsAdditionalDetails$4[0];
29100
+ const applicantName = [connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.name, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.middleName, connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.lastName].filter(Boolean).join(" ") || "-";
29101
+ const mobileNumber = (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || "-";
29102
+ const appNumber = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$5 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$5 === void 0 ? void 0 : (_wsAdditionalDetails$6 = _wsAdditionalDetails$5.data) === null || _wsAdditionalDetails$6 === void 0 ? void 0 : _wsAdditionalDetails$6.applicationNo) || (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$7 = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$7 === void 0 ? void 0 : _wsAdditionalDetails$7.applicationNumber) || "-";
29103
+ return [{
29104
+ title: "Applicant Details",
29105
+ values: [{
29106
+ title: "Application Number",
29107
+ value: appNumber
29108
+ }, {
29109
+ title: "Applicant Name",
29110
+ value: applicantName
29111
+ }, {
29112
+ title: "Mobile Number",
29113
+ value: mobileNumber
29114
+ }]
29115
+ }, {
29116
+ title: t("WS_APPLICATION_FEE_HEADER"),
29117
+ values: amountRows([...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab = breakUpData.billSlabData) === null || _breakUpData$billSlab === void 0 ? void 0 : _breakUpData$billSlab.FEE) || []), ...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab2 = breakUpData.billSlabData) === null || _breakUpData$billSlab2 === void 0 ? void 0 : _breakUpData$billSlab2.CHARGES) || [])])
29118
+ }, {
29119
+ title: "Taxes",
29120
+ values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
29121
+ }, {
29122
+ title: "Water demand details",
29123
+ values: waterDemandRows.map(_ref4 => {
29124
+ let label = _ref4.label,
29125
+ value = _ref4.value,
29126
+ currency = _ref4.currency,
29127
+ unit = _ref4.unit,
29128
+ isText = _ref4.isText;
29129
+ return {
29130
+ title: label,
29131
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29132
+ };
29133
+ })
29134
+ }, {
29135
+ title: "Infrastructure charge details",
29136
+ values: infrastructureChargeRows.map(_ref5 => {
29137
+ let label = _ref5.label,
29138
+ value = _ref5.value,
29139
+ currency = _ref5.currency,
29140
+ unit = _ref5.unit,
29141
+ isText = _ref5.isText;
29142
+ return {
29143
+ title: label,
29144
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29145
+ };
29146
+ })
29147
+ }, {
29148
+ title: "Total",
29149
+ values: [{
29150
+ title: t("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),
29151
+ value: "\u20B9" + formatNumber(breakUpData === null || breakUpData === void 0 ? void 0 : breakUpData.totalAmount)
29152
+ }]
29153
+ }].filter(section => section.values.length > 0);
29154
+ };
29155
+ const generateBreakupReport = mode => {
29156
+ var _Digit$Utils, _Digit$Utils$pdf;
29157
+ const generateReport = (_Digit$Utils = Digit.Utils) === null || _Digit$Utils === void 0 ? void 0 : (_Digit$Utils$pdf = _Digit$Utils.pdf) === null || _Digit$Utils$pdf === void 0 ? void 0 : _Digit$Utils$pdf.generateCalculationBreakupReport;
29158
+ if (typeof generateReport === "function") {
29159
+ return generateReport({
29160
+ tenantId: Digit.ULBService.getCurrentTenantId(),
29161
+ heading: t("WS_CALCULATION_BREAKUP"),
29162
+ details: getBreakupReportDetails(),
29163
+ t,
29164
+ mode
29165
+ });
29166
+ }
29167
+ return mode === "download" ? Digit.Download.PDF(breakupRef, t("WS_CALCULATION_BREAKUP")) : null;
29168
+ };
29169
+ const handleDownload = () => generateBreakupReport("download");
29170
+ const handlePrint = () => {
29171
+ var _Digit$Utils2, _Digit$Utils2$pdf, _breakupRef$current, _window$mSewaApp, _window$mSewaApp$isMs;
29172
+ if ((_Digit$Utils2 = Digit.Utils) !== null && _Digit$Utils2 !== void 0 && (_Digit$Utils2$pdf = _Digit$Utils2.pdf) !== null && _Digit$Utils2$pdf !== void 0 && _Digit$Utils2$pdf.generateCalculationBreakupReport) {
29173
+ return generateBreakupReport("print");
29174
+ }
29175
+ const content = (_breakupRef$current = breakupRef.current) === null || _breakupRef$current === void 0 ? void 0 : _breakupRef$current.innerHTML;
29176
+ if (!content) return;
29177
+ if ((_window$mSewaApp = window.mSewaApp) !== null && _window$mSewaApp !== void 0 && (_window$mSewaApp$isMs = _window$mSewaApp.isMsewaApp) !== null && _window$mSewaApp$isMs !== void 0 && _window$mSewaApp$isMs.call(_window$mSewaApp)) {
29178
+ window.mSewaApp.downloadBase64File(window.btoa(unescape(encodeURIComponent(content))), t("WS_CALCULATION_BREAKUP"));
29179
+ return;
29180
+ }
29181
+ const printWindow = window.open("", "");
29182
+ if (!printWindow) return;
29183
+ printWindow.document.write("<html><body>" + content + "</body></html>");
29184
+ printWindow.document.close();
29185
+ printWindow.focus();
29186
+ printWindow.print();
29187
+ };
29188
+ const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.waterDemandDetail;
29189
+ const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.infrastructureChargeDetail;
29190
+ const waterDemandRows = waterDemandDetail ? [{
29191
+ label: "Calculated occupancy",
29192
+ value: waterDemandDetail.calculatedOccupancy,
29193
+ unit: " person"
29194
+ }, {
29195
+ label: "Applied LPCD",
29196
+ value: waterDemandDetail.chosenLpcd,
29197
+ unit: " LPD"
29198
+ }, {
29199
+ label: "Base demand",
29200
+ value: waterDemandDetail.baseDemand,
29201
+ unit: " LPD"
29202
+ }, {
29203
+ label: "Contingency/Floating Occupancy",
29204
+ value: waterDemandDetail.contingencyPercentage,
29205
+ unit: "%"
29206
+ }, {
29207
+ label: "Total water demand",
29208
+ value: waterDemandDetail.totalWaterDemandLPD,
29209
+ unit: " LPD"
29210
+ }] : [];
29211
+ const infrastructureChargeRows = infrastructureChargeDetail ? [{
29212
+ label: "Colony category",
29213
+ value: infrastructureChargeDetail.colonyCategory,
29214
+ isText: true
29215
+ }, {
29216
+ label: "Plot area",
29217
+ value: infrastructureChargeDetail.plotArea,
29218
+ unit: " (sq. meter.)"
29219
+ }, {
29220
+ label: "Water rate",
29221
+ value: infrastructureChargeDetail.waterRatePerLPD,
29222
+ currency: true
29223
+ }, {
29224
+ label: "Sewer rate",
29225
+ value: infrastructureChargeDetail.sewerRatePerLPD,
29226
+ currency: true
29227
+ }, {
29228
+ label: "Water Infra Charges",
29229
+ value: infrastructureChargeDetail.waterComponentIFC,
29230
+ currency: true
29231
+ }, {
29232
+ label: "Sewer Infra Charges",
29233
+ value: infrastructureChargeDetail.sewerComponentIFC,
29234
+ currency: true
29235
+ }, {
29236
+ label: "Rebate",
29237
+ value: infrastructureChargeDetail.rebatePercentage,
29238
+ unit: "%"
29239
+ }, {
29240
+ label: "Rebate amount",
29241
+ value: infrastructureChargeDetail.rebateAmount,
29242
+ currency: true
29243
+ }, {
29244
+ label: "Net IFC",
29245
+ value: infrastructureChargeDetail.netIFC,
29246
+ currency: true
29247
+ }] : [];
29026
29248
  return /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
29027
29249
  style: {
29028
29250
  lineHeight: "19px",
29029
29251
  maxWidth: "950px",
29030
29252
  minWidth: "280px"
29031
29253
  }
29032
- }, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$ !== void 0 && _wsAdditionalDetails$.isViewBreakup ? /*#__PURE__*/React__default.createElement("div", {
29254
+ }, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$8 !== void 0 && _wsAdditionalDetails$8.isViewBreakup ? /*#__PURE__*/React__default.createElement("div", {
29033
29255
  onClick: e => onPopupOpen(),
29034
29256
  style: {
29035
29257
  marginTop: "12px"
@@ -29040,6 +29262,9 @@ const ViewBreakup = _ref => {
29040
29262
  headerBarMain: /*#__PURE__*/React__default.createElement(Heading, {
29041
29263
  label: t("WS_CALCULATION_BREAKUP")
29042
29264
  }),
29265
+ width: "950px",
29266
+ print: print || handlePrint,
29267
+ download: download || handleDownload,
29043
29268
  headerBarEnd: /*#__PURE__*/React__default.createElement(CloseBtn, {
29044
29269
  onClick: () => {
29045
29270
  showPopUp(false);
@@ -29055,16 +29280,13 @@ const ViewBreakup = _ref => {
29055
29280
  popupModuleMianStyles: {
29056
29281
  paddingTop: "0px"
29057
29282
  }
29058
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, {
29059
- style: {
29060
- padding: "10px",
29061
- paddingTop: "0px"
29062
- }
29063
- }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29283
+ }, /*#__PURE__*/React__default.createElement("div", {
29284
+ ref: breakupRef
29285
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.StatusTable, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29064
29286
  style: {
29065
29287
  margin: "10px 0px"
29066
29288
  }
29067
- }, t("WS_APPLICATION_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab = breakUpData.billSlabData) === null || _breakUpData$billSlab === void 0 ? void 0 : (_breakUpData$billSlab2 = _breakUpData$billSlab.FEE) === null || _breakUpData$billSlab2 === void 0 ? void 0 : _breakUpData$billSlab2.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29289
+ }, t("WS_APPLICATION_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab4 = breakUpData.billSlabData) === null || _breakUpData$billSlab4 === void 0 ? void 0 : (_breakUpData$billSlab5 = _breakUpData$billSlab4.FEE) === null || _breakUpData$billSlab5 === void 0 ? void 0 : _breakUpData$billSlab5.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29068
29290
  className: "border-none",
29069
29291
  rowContainerStyle: {
29070
29292
  margin: "0px"
@@ -29078,11 +29300,7 @@ const ViewBreakup = _ref => {
29078
29300
  textStyle: {
29079
29301
  textAlign: "right"
29080
29302
  }
29081
- })), /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29082
- style: {
29083
- margin: "10px 0px"
29084
- }
29085
- }, t("WS_SERVICE_FEE_HEADER")), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : (_breakUpData$billSlab4 = _breakUpData$billSlab3.CHARGES) === null || _breakUpData$billSlab4 === void 0 ? void 0 : _breakUpData$billSlab4.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29303
+ })), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab6 = breakUpData.billSlabData) === null || _breakUpData$billSlab6 === void 0 ? void 0 : (_breakUpData$billSlab7 = _breakUpData$billSlab6.CHARGES) === null || _breakUpData$billSlab7 === void 0 ? void 0 : _breakUpData$billSlab7.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29086
29304
  className: "border-none",
29087
29305
  rowContainerStyle: {
29088
29306
  margin: "0px"
@@ -29096,7 +29314,7 @@ const ViewBreakup = _ref => {
29096
29314
  textStyle: {
29097
29315
  textAlign: "right"
29098
29316
  }
29099
- })), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab5 = breakUpData.billSlabData) === null || _breakUpData$billSlab5 === void 0 ? void 0 : (_breakUpData$billSlab6 = _breakUpData$billSlab5.TAX) === null || _breakUpData$billSlab6 === void 0 ? void 0 : _breakUpData$billSlab6.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29317
+ })), breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab8 = breakUpData.billSlabData) === null || _breakUpData$billSlab8 === void 0 ? void 0 : (_breakUpData$billSlab9 = _breakUpData$billSlab8.TAX) === null || _breakUpData$billSlab9 === void 0 ? void 0 : _breakUpData$billSlab9.map(data => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Row, {
29100
29318
  className: "border-none",
29101
29319
  rowContainerStyle: {
29102
29320
  margin: "0px"
@@ -29110,6 +29328,18 @@ const ViewBreakup = _ref => {
29110
29328
  textStyle: {
29111
29329
  textAlign: "right"
29112
29330
  }
29331
+ })), waterDemandRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29332
+ style: {
29333
+ margin: "10px 0px"
29334
+ }
29335
+ }, "Water demand details"), /*#__PURE__*/React__default.createElement(DetailRows, {
29336
+ rows: waterDemandRows
29337
+ })), infrastructureChargeRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29338
+ style: {
29339
+ margin: "10px 0px"
29340
+ }
29341
+ }, "Infrastructure charge details"), /*#__PURE__*/React__default.createElement(DetailRows, {
29342
+ rows: infrastructureChargeRows
29113
29343
  })), /*#__PURE__*/React__default.createElement("hr", {
29114
29344
  style: {
29115
29345
  color: "#cccccc",
@@ -29132,7 +29362,7 @@ const ViewBreakup = _ref => {
29132
29362
  fontWeight: "700",
29133
29363
  fontSize: "24px"
29134
29364
  }
29135
- })))));
29365
+ }))))));
29136
29366
  };
29137
29367
 
29138
29368
  const checkForNA$1 = value => {
@@ -45853,9 +46083,11 @@ const ActivateConnection = () => {
45853
46083
  }
45854
46084
  }, []);
45855
46085
  React.useEffect(() => {
45856
- if (!isLoading) {
46086
+ if (!isLoading && newConfig && Array.isArray(newConfig)) {
45857
46087
  const config = newConfig.find(conf => conf.hideInCitizen);
45858
- setConfig(config);
46088
+ if (config) {
46089
+ setConfig(config);
46090
+ }
45859
46091
  }
45860
46092
  }, [newConfig]);
45861
46093
  React.useEffect(() => {
@@ -46364,16 +46596,18 @@ const EditApplication$1 = () => {
46364
46596
  }),
46365
46597
  propertyDetails = _Digit$Hooks$pt$usePr.data;
46366
46598
  React.useEffect(() => {
46367
- if (!isConfigLoading) {
46368
- var _config$body;
46599
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
46369
46600
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isEdit);
46370
- config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
46371
- let bodyDetails = [];
46372
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
46373
- if (data !== null && data !== void 0 && data.isEditConnection) bodyDetails.push(data);
46374
- });
46375
- config.body = bodyDetails;
46376
- setConfig(config);
46601
+ if (config) {
46602
+ var _config$body;
46603
+ config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
46604
+ let bodyDetails = [];
46605
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
46606
+ if (data !== null && data !== void 0 && data.isEditConnection) bodyDetails.push(data);
46607
+ });
46608
+ config.body = bodyDetails;
46609
+ setConfig(config);
46610
+ }
46377
46611
  }
46378
46612
  }, [newConfig]);
46379
46613
  React.useEffect(() => {
@@ -47026,19 +47260,21 @@ const ModifyApplication = () => {
47026
47260
  }),
47027
47261
  propertyDetails = _Digit$Hooks$pt$usePr.data;
47028
47262
  React.useEffect(() => {
47029
- if (!isConfigLoading) {
47030
- var _config$body;
47263
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47031
47264
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
47032
- config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47033
- let bodyDetails = [];
47034
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47035
- if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47036
- });
47037
- bodyDetails.forEach(bdyData => {
47038
- if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47039
- });
47040
- config.body = bodyDetails;
47041
- setConfig(config);
47265
+ if (config) {
47266
+ var _config$body;
47267
+ config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47268
+ let bodyDetails = [];
47269
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47270
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47271
+ });
47272
+ bodyDetails.forEach(bdyData => {
47273
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47274
+ });
47275
+ config.body = bodyDetails;
47276
+ setConfig(config);
47277
+ }
47042
47278
  }
47043
47279
  }, [newConfig]);
47044
47280
  React.useEffect(() => {
@@ -47343,19 +47579,21 @@ const EditModifyApplication = () => {
47343
47579
  }),
47344
47580
  propertyDetails = _Digit$Hooks$pt$usePr.data;
47345
47581
  React.useEffect(() => {
47346
- if (!isConfigLoading) {
47347
- var _config$body;
47582
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47348
47583
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
47349
- config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47350
- let bodyDetails = [];
47351
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47352
- if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47353
- });
47354
- bodyDetails.forEach(bdyData => {
47355
- if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47356
- });
47357
- config.body = bodyDetails;
47358
- setConfig(config);
47584
+ if (config) {
47585
+ var _config$body;
47586
+ config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47587
+ let bodyDetails = [];
47588
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47589
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47590
+ });
47591
+ bodyDetails.forEach(bdyData => {
47592
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47593
+ });
47594
+ config.body = bodyDetails;
47595
+ setConfig(config);
47596
+ }
47359
47597
  }
47360
47598
  }, [newConfig]);
47361
47599
  React.useEffect(() => {
@@ -47480,6 +47718,289 @@ const EditModifyApplication = () => {
47480
47718
  }));
47481
47719
  };
47482
47720
 
47721
+ const MutationApplication = () => {
47722
+ var _state, _details, _details2, _details2$application;
47723
+ const _useTranslation = reactI18next.useTranslation(),
47724
+ t = _useTranslation.t;
47725
+ let _useLocation = reactRouterDom.useLocation(),
47726
+ state = _useLocation.state;
47727
+ state = state ? typeof state === "string" ? JSON.parse(state) : state : {};
47728
+ const history = reactRouterDom.useHistory();
47729
+ let filters = getQueryStringParams(location.search);
47730
+ const _useState = React.useState(false),
47731
+ canSubmit = _useState[0],
47732
+ setSubmitValve = _useState[1];
47733
+ const _useState2 = React.useState(null),
47734
+ showToast = _useState2[0],
47735
+ setShowToast = _useState2[1];
47736
+ const _useState3 = React.useState({}),
47737
+ appData = _useState3[0],
47738
+ setAppData = _useState3[1];
47739
+ const _useState4 = React.useState({
47740
+ head: "",
47741
+ body: []
47742
+ }),
47743
+ config = _useState4[0],
47744
+ setConfig = _useState4[1];
47745
+ const _useState5 = React.useState(true),
47746
+ enabledLoader = _useState5[0],
47747
+ setEnabledLoader = _useState5[1];
47748
+ const _useState6 = React.useState(false),
47749
+ isAppDetailsPage = _useState6[0];
47750
+ const _useState7 = React.useState(false),
47751
+ isEnableLoader = _useState7[0],
47752
+ setIsEnableLoader = _useState7[1];
47753
+ let tenantId = Digit.ULBService.getCurrentTenantId();
47754
+ const serviceType = filters === null || filters === void 0 ? void 0 : filters.service;
47755
+ const stateId = Digit.ULBService.getStateId();
47756
+ let _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {}),
47757
+ newConfig = _Digit$Hooks$ws$useWS.data,
47758
+ isConfigLoading = _Digit$Hooks$ws$useWS.isLoading;
47759
+ let details = cloneDeep_1((_state = state) === null || _state === void 0 ? void 0 : _state.data);
47760
+ let _Digit$Hooks$ws$useWS2 = Digit.Hooks.ws.useWSDetailsPage(t, tenantId, (_details = details) === null || _details === void 0 ? void 0 : _details.applicationNo, (_details2 = details) === null || _details2 === void 0 ? void 0 : (_details2$application = _details2.applicationData) === null || _details2$application === void 0 ? void 0 : _details2$application.serviceType, {
47761
+ privacy: Digit.Utils.getPrivacyObject()
47762
+ }),
47763
+ applicationDetails = _Digit$Hooks$ws$useWS2.data;
47764
+ details = applicationDetails;
47765
+ const _useState8 = React.useState(new URLSearchParams(reactRouterDom.useLocation().search).get("propertyId")),
47766
+ propertyId = _useState8[0],
47767
+ setPropertyId = _useState8[1];
47768
+ const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
47769
+ sessionFormData = _Digit$Hooks$useSessi[0],
47770
+ setSessionFormData = _Digit$Hooks$useSessi[1],
47771
+ clearSessionFormData = _Digit$Hooks$useSessi[2];
47772
+ const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertySearch({
47773
+ filters: {
47774
+ propertyIds: propertyId
47775
+ },
47776
+ tenantId: tenantId
47777
+ }, {
47778
+ filters: {
47779
+ propertyIds: propertyId
47780
+ },
47781
+ tenantId: tenantId,
47782
+ enabled: propertyId && propertyId != "" ? true : false,
47783
+ privacy: Digit.Utils.getPrivacyObject()
47784
+ }),
47785
+ propertyDetails = _Digit$Hooks$pt$usePr.data;
47786
+ React.useEffect(() => {
47787
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47788
+ const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
47789
+ if (config) {
47790
+ var _config$body;
47791
+ config.head = "WS_WATER_AND_SEWERAGE_MUTATION_CONNECTION_LABEL";
47792
+ let bodyDetails = [];
47793
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47794
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47795
+ });
47796
+ bodyDetails.forEach(bdyData => {
47797
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47798
+ });
47799
+ config.body = bodyDetails;
47800
+ setConfig(config);
47801
+ }
47802
+ }
47803
+ }, [newConfig]);
47804
+ React.useEffect(() => {
47805
+ var _sessionFormData$cpt, _sessionFormData$cpt$, _sessionFormData$cpt2, _sessionFormData$cpt3;
47806
+ !propertyId && (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt = sessionFormData.cpt) === null || _sessionFormData$cpt === void 0 ? void 0 : (_sessionFormData$cpt$ = _sessionFormData$cpt.details) === null || _sessionFormData$cpt$ === void 0 ? void 0 : _sessionFormData$cpt$.propertyId) && setPropertyId(sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$cpt2 = sessionFormData.cpt) === null || _sessionFormData$cpt2 === void 0 ? void 0 : (_sessionFormData$cpt3 = _sessionFormData$cpt2.details) === null || _sessionFormData$cpt3 === void 0 ? void 0 : _sessionFormData$cpt3.propertyId);
47807
+ }, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
47808
+ React.useEffect(function () {
47809
+ try {
47810
+ const IsDetailsExists = sessionStorage.getItem("IsDetailsExists") ? JSON.parse(sessionStorage.getItem("IsDetailsExists")) : false;
47811
+ const _temp = function (_details3, _details3$application) {
47812
+ if ((_details3 = details) !== null && _details3 !== void 0 && (_details3$application = _details3.applicationData) !== null && _details3$application !== void 0 && _details3$application.id) {
47813
+ return Promise.resolve(convertApplicationData(details, serviceType, true, undefined, t)).then(function (convertAppData) {
47814
+ setSessionFormData(_extends({}, sessionFormData, convertAppData));
47815
+ setAppData(_extends({}, convertAppData));
47816
+ sessionStorage.setItem("IsDetailsExists", JSON.stringify(true));
47817
+ });
47818
+ }
47819
+ }();
47820
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
47821
+ } catch (e) {
47822
+ return Promise.reject(e);
47823
+ }
47824
+ }, [details, applicationDetails]);
47825
+ React.useEffect(() => {
47826
+ var _propertyDetails$Prop;
47827
+ setSessionFormData(_extends({}, sessionFormData, {
47828
+ cpt: {
47829
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop[0]
47830
+ }
47831
+ }));
47832
+ }, [propertyDetails]);
47833
+ React.useEffect(() => {
47834
+ var _sessionFormData$Conn, _sessionFormData$Conn2;
47835
+ if (sessionFormData !== null && sessionFormData !== void 0 && (_sessionFormData$Conn = sessionFormData.ConnectionDetails) !== null && _sessionFormData$Conn !== void 0 && (_sessionFormData$Conn2 = _sessionFormData$Conn[0]) !== null && _sessionFormData$Conn2 !== void 0 && _sessionFormData$Conn2.applicationNo) {
47836
+ setEnabledLoader(false);
47837
+ }
47838
+ }, [propertyDetails, sessionFormData, sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
47839
+ React.useEffect(() => {
47840
+ const timer = setTimeout(() => {
47841
+ var _sessionFormData$Conn3, _sessionFormData$Conn4, _sessionFormData$Conn5, _sessionFormData$Conn6, _sessionFormData$Conn7;
47842
+ if (isAppDetailsPage) window.location.href = window.location.origin + "/digit-ui/employee/ws/application-details?applicationNumber=" + (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$Conn3 = sessionFormData.ConnectionDetails) === null || _sessionFormData$Conn3 === void 0 ? void 0 : (_sessionFormData$Conn4 = _sessionFormData$Conn3[0]) === null || _sessionFormData$Conn4 === void 0 ? void 0 : _sessionFormData$Conn4.applicationNo) + "&service=" + (sessionFormData === null || sessionFormData === void 0 ? void 0 : (_sessionFormData$Conn5 = sessionFormData.ConnectionDetails) === null || _sessionFormData$Conn5 === void 0 ? void 0 : (_sessionFormData$Conn6 = _sessionFormData$Conn5[0]) === null || _sessionFormData$Conn6 === void 0 ? void 0 : (_sessionFormData$Conn7 = _sessionFormData$Conn6.serviceName) === null || _sessionFormData$Conn7 === void 0 ? void 0 : _sessionFormData$Conn7.toUpperCase());
47843
+ }, 3000);
47844
+ return () => clearTimeout(timer);
47845
+ }, [isAppDetailsPage]);
47846
+ const _Digit$Hooks$ws$useWa = Digit.Hooks.ws.useWaterCreateAPI("WATER"),
47847
+ waterMutation = _Digit$Hooks$ws$useWa.mutate;
47848
+ const _Digit$Hooks$ws$useWS3 = Digit.Hooks.ws.useWSApplicationActions("WATER");
47849
+ const _Digit$Hooks$ws$useWa2 = Digit.Hooks.ws.useWaterCreateAPI("SEWERAGE"),
47850
+ sewerageMutation = _Digit$Hooks$ws$useWa2.mutate;
47851
+ const _Digit$Hooks$ws$useWS4 = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
47852
+ const onFormValueChange = (setValue, formData, formState) => {
47853
+ var _formData$cpt, _formData$cpt$details;
47854
+ if (!lodash.isEqual(sessionFormData, formData)) {
47855
+ setSessionFormData(_extends({}, sessionFormData, formData));
47856
+ }
47857
+ if (Object.keys(formState.errors).length > 0 && Object.keys(formState.errors).length == 1 && formState.errors["owners"] && Object.values(formState.errors["owners"].type).filter(ob => ob.type === "required").length == 0 && !(formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && (_formData$cpt$details = _formData$cpt.details) !== null && _formData$cpt$details !== void 0 && _formData$cpt$details.propertyId)) setSubmitValve(true);else setSubmitValve(!Object.keys(formState.errors).length);
47858
+ };
47859
+ const onSubmit = function (data) {
47860
+ try {
47861
+ var _data$cpt, _propertyDetails$Prop2;
47862
+ if (!(data !== null && data !== void 0 && (_data$cpt = data.cpt) !== null && _data$cpt !== void 0 && _data$cpt.id) && !(propertyDetails !== null && propertyDetails !== void 0 && (_propertyDetails$Prop2 = propertyDetails.Properties) !== null && _propertyDetails$Prop2 !== void 0 && _propertyDetails$Prop2[0])) {
47863
+ var _data$cpt2;
47864
+ if (!(data !== null && data !== void 0 && (_data$cpt2 = data.cpt) !== null && _data$cpt2 !== void 0 && _data$cpt2.details) || !propertyDetails) {
47865
+ setShowToast({
47866
+ key: "error",
47867
+ message: "ERR_INVALID_PROPERTY_ID"
47868
+ });
47869
+ return Promise.resolve();
47870
+ }
47871
+ }
47872
+ const _temp7 = function () {
47873
+ if (!canSubmit) {
47874
+ setShowToast({
47875
+ warning: true,
47876
+ message: "PLEASE_FILL_MANDATORY_DETAILS"
47877
+ });
47878
+ setTimeout(() => {
47879
+ setShowToast(false);
47880
+ }, 3000);
47881
+ } else {
47882
+ var _data$cpt3;
47883
+ if (!(data !== null && data !== void 0 && (_data$cpt3 = data.cpt) !== null && _data$cpt3 !== void 0 && _data$cpt3.details)) {
47884
+ var _propertyDetails$Prop3;
47885
+ data.cpt = {
47886
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3[0]
47887
+ };
47888
+ }
47889
+ const details = sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS") ? JSON.parse(sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS")) : {};
47890
+ return Promise.resolve(convertModifyApplicationDetails(data, details, "APPLY_MUTATION")).then(function (convertAppData) {
47891
+ function _temp6() {
47892
+ const _temp4 = function () {
47893
+ if (serviceType !== "WATER") {
47894
+ const _temp3 = function () {
47895
+ if (sewerageMutation) {
47896
+ setIsEnableLoader(true);
47897
+ return Promise.resolve(sewerageMutation(reqDetails, {
47898
+ onError: (error, variables) => {
47899
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2, _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
47900
+ setIsEnableLoader(false);
47901
+ setShowToast({
47902
+ key: "error",
47903
+ 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
47904
+ });
47905
+ setTimeout(closeToastOfError, 5000);
47906
+ },
47907
+ onSuccess: function (data, variables) {
47908
+ try {
47909
+ var _data$SewerageConnect, _data$SewerageConnect2;
47910
+ clearSessionFormData();
47911
+ history.push("/digit-ui/employee/ws/ws-response?applicationNumber1=" + (data === null || data === void 0 ? void 0 : (_data$SewerageConnect = data.SewerageConnections) === null || _data$SewerageConnect === void 0 ? void 0 : (_data$SewerageConnect2 = _data$SewerageConnect[0]) === null || _data$SewerageConnect2 === void 0 ? void 0 : _data$SewerageConnect2.applicationNo));
47912
+ return Promise.resolve();
47913
+ } catch (e) {
47914
+ return Promise.reject(e);
47915
+ }
47916
+ }
47917
+ })).then(function () {});
47918
+ }
47919
+ }();
47920
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
47921
+ }
47922
+ }();
47923
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
47924
+ }
47925
+ convertAppData.applicationType = serviceType == "WATER" ? "MUTATION_WATER_CONNECTION" : "MUTATION_SEWERAGE_CONNECTION";
47926
+ const reqDetails = serviceType == "WATER" ? {
47927
+ WaterConnection: convertAppData,
47928
+ reconnectRequest: false,
47929
+ disconnectRequest: false
47930
+ } : {
47931
+ SewerageConnection: convertAppData,
47932
+ reconnectRequest: false,
47933
+ disconnectRequest: false
47934
+ };
47935
+ const _temp5 = function () {
47936
+ if (serviceType == "WATER") {
47937
+ const _temp2 = function () {
47938
+ if (waterMutation) {
47939
+ setIsEnableLoader(true);
47940
+ return Promise.resolve(waterMutation(reqDetails, {
47941
+ onError: (error, variables) => {
47942
+ var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
47943
+ setIsEnableLoader(false);
47944
+ setShowToast({
47945
+ key: "error",
47946
+ 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
47947
+ });
47948
+ setTimeout(closeToastOfError, 5000);
47949
+ },
47950
+ onSuccess: function (data, variables) {
47951
+ try {
47952
+ var _data$WaterConnection, _data$WaterConnection2;
47953
+ clearSessionFormData();
47954
+ history.push("/digit-ui/employee/ws/ws-response?applicationNumber=" + (data === null || data === void 0 ? void 0 : (_data$WaterConnection = data.WaterConnection) === null || _data$WaterConnection === void 0 ? void 0 : (_data$WaterConnection2 = _data$WaterConnection[0]) === null || _data$WaterConnection2 === void 0 ? void 0 : _data$WaterConnection2.applicationNo));
47955
+ return Promise.resolve();
47956
+ } catch (e) {
47957
+ return Promise.reject(e);
47958
+ }
47959
+ }
47960
+ })).then(function () {});
47961
+ }
47962
+ }();
47963
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
47964
+ }
47965
+ }();
47966
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
47967
+ });
47968
+ }
47969
+ }();
47970
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
47971
+ } catch (e) {
47972
+ return Promise.reject(e);
47973
+ }
47974
+ };
47975
+ const closeToastOfError = () => {
47976
+ setShowToast(null);
47977
+ };
47978
+ const closeToast = () => {
47979
+ setShowToast(null);
47980
+ };
47981
+ if (enabledLoader || isEnableLoader || isConfigLoading) {
47982
+ return /*#__PURE__*/React__default.createElement(digitUiReactComponents.Loader, null);
47983
+ }
47984
+ return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
47985
+ style: {
47986
+ marginLeft: "15px"
47987
+ }
47988
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Header, null, t(config.head))), /*#__PURE__*/React__default.createElement(digitUiReactComponents.FormComposer, {
47989
+ config: config.body,
47990
+ userType: "employee",
47991
+ onFormValueChange: onFormValueChange,
47992
+ label: t("CS_COMMON_SUBMIT"),
47993
+ onSubmit: onSubmit,
47994
+ defaultValues: sessionFormData,
47995
+ appData: appData
47996
+ }), showToast && /*#__PURE__*/React__default.createElement(digitUiReactComponents.Toast, {
47997
+ isDleteBtn: true,
47998
+ error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
47999
+ label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
48000
+ onClose: closeToast
48001
+ }));
48002
+ };
48003
+
47483
48004
  const getPath$5 = (path, params) => {
47484
48005
  params && Object.keys(params).map(key => {
47485
48006
  path = path.replace(":" + key, params[key]);
@@ -47722,16 +48243,18 @@ const WSEditApplicationByConfig = () => {
47722
48243
  }),
47723
48244
  propertyDetails = _Digit$Hooks$pt$usePr.data;
47724
48245
  React.useEffect(() => {
47725
- if (!isConfigLoading) {
47726
- var _config$body;
48246
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47727
48247
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isEditByConfig);
47728
- config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
47729
- let bodyDetails = [];
47730
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47731
- if (data !== null && data !== void 0 && data.isEditByConfigConnection) bodyDetails.push(data);
47732
- });
47733
- config.body = bodyDetails;
47734
- setConfig(config);
48248
+ if (config) {
48249
+ var _config$body;
48250
+ config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
48251
+ let bodyDetails = [];
48252
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48253
+ if (data !== null && data !== void 0 && data.isEditByConfigConnection) bodyDetails.push(data);
48254
+ });
48255
+ config.body = bodyDetails;
48256
+ setConfig(config);
48257
+ }
47735
48258
  }
47736
48259
  }, [newConfig]);
47737
48260
  React.useEffect(() => {
@@ -48340,16 +48863,18 @@ const EditDisconnectionByConfig = () => {
48340
48863
  sessionFormData = _Digit$Hooks$useSessi[0],
48341
48864
  setSessionFormData = _Digit$Hooks$useSessi[1];
48342
48865
  React.useEffect(() => {
48343
- if (!isLoading && !isConfigLoading) {
48344
- var _config$body;
48866
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48345
48867
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48346
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48347
- let bodyDetails = [];
48348
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48349
- if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48350
- });
48351
- config.body = bodyDetails;
48352
- setConfig(config);
48868
+ if (config) {
48869
+ var _config$body;
48870
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48871
+ let bodyDetails = [];
48872
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48873
+ if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48874
+ });
48875
+ config.body = bodyDetails;
48876
+ setConfig(config);
48877
+ }
48353
48878
  }
48354
48879
  }, [applicationDetails, isLoading, newConfig]);
48355
48880
  React.useEffect(function () {
@@ -48474,16 +48999,18 @@ const EditDisconnectionByConfig$1 = () => {
48474
48999
  sessionFormData = _Digit$Hooks$useSessi[0],
48475
49000
  setSessionFormData = _Digit$Hooks$useSessi[1];
48476
49001
  React.useEffect(() => {
48477
- if (!isLoading && !isConfigLoading) {
48478
- var _config$body;
49002
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48479
49003
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48480
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48481
- let bodyDetails = [];
48482
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48483
- if (data !== null && data !== void 0 && data.isDisonnectionEditByConfig) bodyDetails.push(data);
48484
- });
48485
- config.body = bodyDetails;
48486
- setConfig(config);
49004
+ if (config) {
49005
+ var _config$body;
49006
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
49007
+ let bodyDetails = [];
49008
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
49009
+ if (data !== null && data !== void 0 && data.isDisonnectionEditByConfig) bodyDetails.push(data);
49010
+ });
49011
+ config.body = bodyDetails;
49012
+ setConfig(config);
49013
+ }
48487
49014
  }
48488
49015
  }, [applicationDetails, isLoading, newConfig]);
48489
49016
  React.useEffect(function () {
@@ -48613,16 +49140,18 @@ const ResubmitDisconnection = () => {
48613
49140
  const _Digit$Hooks$ws$useWS2 = Digit.Hooks.ws.useWSApplicationActions(serviceType),
48614
49141
  mutate = _Digit$Hooks$ws$useWS2.mutate;
48615
49142
  React.useEffect(() => {
48616
- if (!isLoading && !isConfigLoading) {
48617
- var _config$body;
49143
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48618
49144
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48619
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48620
- let bodyDetails = [];
48621
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48622
- if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48623
- });
48624
- config.body = bodyDetails;
48625
- setConfig(config);
49145
+ if (config) {
49146
+ var _config$body;
49147
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
49148
+ let bodyDetails = [];
49149
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
49150
+ if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
49151
+ });
49152
+ config.body = bodyDetails;
49153
+ setConfig(config);
49154
+ }
48626
49155
  }
48627
49156
  }, [applicationDetails, isLoading, newConfig]);
48628
49157
  React.useEffect(function () {
@@ -50408,6 +50937,7 @@ const componentsToRegister = {
50408
50937
  WSConsumptionDetails: ConsumptionDetails,
50409
50938
  WSModifyApplication: ModifyApplication,
50410
50939
  WSEditModifyApplication: EditModifyApplication,
50940
+ WSMutationApplication: MutationApplication,
50411
50941
  WSDisconnectionApplication: DisconnectionApplication,
50412
50942
  WSRestorationApplication: DisconnectionApplication$1,
50413
50943
  WSEditApplicationByConfig: WSEditApplicationByConfig,