@djb25/digit-ui-module-ws 1.0.48 → 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.
@@ -10043,7 +10043,7 @@ const BILLSBreadCrumbs = _ref => {
10043
10043
  }));
10044
10044
  };
10045
10045
  const App$1 = _ref2 => {
10046
- 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;
10046
+ 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;
10047
10047
  let path = _ref2.path;
10048
10048
  const location = useLocation();
10049
10049
  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");
@@ -10063,21 +10063,22 @@ const App$1 = _ref2 => {
10063
10063
  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");
10064
10064
  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");
10065
10065
  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");
10066
- 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");
10067
- 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");
10068
- 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");
10069
- 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");
10070
- 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");
10071
- 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");
10072
- 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");
10073
- 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");
10074
- 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");
10075
- 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");
10076
- 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");
10077
- 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");
10078
- 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");
10079
- 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");
10080
- 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");
10066
+ 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");
10067
+ 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");
10068
+ 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");
10069
+ 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");
10070
+ 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");
10071
+ 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");
10072
+ 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");
10073
+ 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");
10074
+ 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");
10075
+ 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");
10076
+ 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");
10077
+ 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");
10078
+ 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");
10079
+ 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");
10080
+ 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");
10081
+ 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");
10081
10082
  const locationCheckReqDocs = window.location.href.includes("/employee/ws/create-application") || window.location.href.includes("/employee/ws/new-disconnection/docsrequired");
10082
10083
  return /*#__PURE__*/React.createElement("div", {
10083
10084
  className: "app-container"
@@ -10217,6 +10218,9 @@ const App$1 = _ref2 => {
10217
10218
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
10218
10219
  path: path + "/modify-application-edit",
10219
10220
  component: WSEditModifyApplication
10221
+ }), /*#__PURE__*/React.createElement(PrivateRoute, {
10222
+ path: path + "/mutation-application",
10223
+ component: WSMutationApplication
10220
10224
  }), /*#__PURE__*/React.createElement(PrivateRoute, {
10221
10225
  path: path + "/disconnection-application",
10222
10226
  component: WSDisconnectionDocsRequired
@@ -15057,7 +15061,7 @@ const WSActivationPageDetails = _ref => {
15057
15061
  const _useTranslation = useTranslation(),
15058
15062
  t = _useTranslation.t;
15059
15063
  const filters = getQueryStringParams(location.search);
15060
- const _ref2 = window.location.href.includes("modify") ? 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()]) : useState((formData === null || formData === void 0 ? void 0 : formData.activationDetails) || [createActivationDetails()]),
15064
+ const _ref2 = window.location.href.includes("modify") || window.location.href.includes("mutation") ? 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()]) : useState((formData === null || formData === void 0 ? void 0 : formData.activationDetails) || [createActivationDetails()]),
15061
15065
  activationDetails = _ref2[0],
15062
15066
  setActivationDetails = _ref2[1];
15063
15067
  const _useState = useState({
@@ -15157,7 +15161,7 @@ const ConnectionDetails$3 = _props => {
15157
15161
  trigger();
15158
15162
  }, [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]);
15159
15163
  useEffect(() => {
15160
- if (window.location.href.includes("modify")) trigger();
15164
+ if (window.location.href.includes("modify") || window.location.href.includes("mutation")) trigger();
15161
15165
  }, [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]);
15162
15166
  useEffect(() => {
15163
15167
  var _formState$errors$con;
@@ -15320,7 +15324,7 @@ const ConnectionDetails$3 = _props => {
15320
15324
  }
15321
15325
  }))), /*#__PURE__*/React.createElement(CardLabelError, {
15322
15326
  style: errorStyle
15323
- }, 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.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
15327
+ }, 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.createElement("div", null, /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, {
15324
15328
  style: isMobile && isEmployee ? {
15325
15329
  fontWeight: "700",
15326
15330
  width: "100%"
@@ -20627,7 +20631,7 @@ const _excluded = ["t", "config", "onSelect", "formData", "formState", "setError
20627
20631
  const NUMBER_PATTERN = /^\d+$/;
20628
20632
  const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
20629
20633
  const PropertyWaterConnection = _ref => {
20630
- 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;
20634
+ 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;
20631
20635
  let t = _ref.t,
20632
20636
  config = _ref.config,
20633
20637
  onSelect = _ref.onSelect,
@@ -20644,10 +20648,13 @@ const PropertyWaterConnection = _ref => {
20644
20648
  noOfFloors: null,
20645
20649
  plotArea: "",
20646
20650
  builtUpArea: "",
20651
+ farArea: "",
20647
20652
  SelectYearofConstruction: null,
20648
20653
  NumberofDwellingUnits: "",
20649
20654
  NumberofRooms: "",
20650
- hospitalBeds: ""
20655
+ numberOfBeds: "",
20656
+ numberOfStudents: "",
20657
+ ServantQuartersRoom: ""
20651
20658
  }
20652
20659
  }
20653
20660
  }),
@@ -20685,6 +20692,9 @@ const PropertyWaterConnection = _ref => {
20685
20692
  const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
20686
20693
  const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
20687
20694
  const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
20695
+ const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
20696
+ const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
20697
+ 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";
20688
20698
  const yearOptions = useMemo(() => {
20689
20699
  const currentYear = new Date().getFullYear();
20690
20700
  const years = [];
@@ -20810,10 +20820,13 @@ const PropertyWaterConnection = _ref => {
20810
20820
  setValue("useDetails.noOfFloors", null);
20811
20821
  setValue("useDetails.plotArea", "");
20812
20822
  setValue("useDetails.builtUpArea", "");
20823
+ setValue("useDetails.farArea", "");
20813
20824
  setValue("useDetails.SelectYearofConstruction", null);
20814
20825
  setValue("useDetails.NumberofDwellingUnits", "");
20815
20826
  setValue("useDetails.NumberofRooms", "");
20816
- setValue("useDetails.hospitalBeds", "");
20827
+ setValue("useDetails.numberOfBeds", "");
20828
+ setValue("useDetails.numberOfStudents", "");
20829
+ setValue("useDetails.ServantQuartersRoom", "");
20817
20830
  }
20818
20831
  }, [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]);
20819
20832
  const lastErrorState = React.useRef(null);
@@ -20839,7 +20852,7 @@ const PropertyWaterConnection = _ref => {
20839
20852
  };
20840
20853
  return /*#__PURE__*/React.createElement(CollapsibleCardPage, {
20841
20854
  title: t("WS_PROPERTY_AND_WATER_CONNECTION_USE_DETAILS") + (config !== null && config !== void 0 && config.isAutomaticFill ? " " + t("(Automatic Fill by Property)") : ""),
20842
- defaultOpen: false,
20855
+ defaultOpen: config !== null && config !== void 0 && config.isAutomaticFill ? false : true,
20843
20856
  style: props.style
20844
20857
  }, /*#__PURE__*/React.createElement("div", {
20845
20858
  className: "formcomposer-section-grid"
@@ -20963,7 +20976,21 @@ const PropertyWaterConnection = _ref => {
20963
20976
  disabled: isPropertyFound
20964
20977
  }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React.createElement(CardLabelError, {
20965
20978
  style: errorStyle
20966
- }, errors.useDetails.builtUpArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SELECT_YEAR_OF_CONSTRUCTION") + "*"), /*#__PURE__*/React.createElement("div", {
20979
+ }, errors.useDetails.builtUpArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React.createElement("div", {
20980
+ className: "form-field"
20981
+ }, /*#__PURE__*/React.createElement(TextInput, {
20982
+ t: t,
20983
+ inputRef: register({
20984
+ pattern: {
20985
+ value: DECIMAL_PATTERN,
20986
+ message: t("ERR_INVALID_DECIMAL")
20987
+ }
20988
+ }),
20989
+ name: "useDetails.farArea",
20990
+ disabled: isPropertyFound
20991
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.farArea) && /*#__PURE__*/React.createElement(CardLabelError, {
20992
+ style: errorStyle
20993
+ }, errors.useDetails.farArea.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_SELECT_YEAR_OF_CONSTRUCTION") + "*"), /*#__PURE__*/React.createElement("div", {
20967
20994
  className: "form-field"
20968
20995
  }, /*#__PURE__*/React.createElement(Controller, {
20969
20996
  control: control,
@@ -20980,9 +21007,9 @@ const PropertyWaterConnection = _ref => {
20980
21007
  onBlur: props.onBlur,
20981
21008
  disable: isPropertyFound
20982
21009
  })
20983
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
21010
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.SelectYearofConstruction) && /*#__PURE__*/React.createElement(CardLabelError, {
20984
21011
  style: errorStyle
20985
- }, errors.useDetails.SelectYearofConstruction.message), /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React.createElement("div", {
21012
+ }, errors.useDetails.SelectYearofConstruction.message), isDwellingUnit ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React.createElement("div", {
20986
21013
  className: "form-field"
20987
21014
  }, /*#__PURE__*/React.createElement(TextInput, {
20988
21015
  t: t,
@@ -20994,7 +21021,7 @@ const PropertyWaterConnection = _ref => {
20994
21021
  }),
20995
21022
  name: "useDetails.NumberofDwellingUnits",
20996
21023
  disabled: isPropertyFound
20997
- }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.NumberofDwellingUnits) && /*#__PURE__*/React.createElement(CardLabelError, {
21024
+ }))) : 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.createElement(CardLabelError, {
20998
21025
  style: errorStyle
20999
21026
  }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_NUMBER_OF_ROOMS") + "*"), /*#__PURE__*/React.createElement("div", {
21000
21027
  className: "form-field"
@@ -21009,7 +21036,7 @@ const PropertyWaterConnection = _ref => {
21009
21036
  }),
21010
21037
  name: "useDetails.NumberofRooms",
21011
21038
  disabled: isPropertyFound
21012
- }))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails0 = errors.useDetails) === null || _errors$useDetails0 === void 0 ? void 0 : _errors$useDetails0.NumberofRooms) && /*#__PURE__*/React.createElement(CardLabelError, {
21039
+ }))) : null, isHotelRestaurantProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.NumberofRooms) && /*#__PURE__*/React.createElement(CardLabelError, {
21013
21040
  style: errorStyle
21014
21041
  }, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, t("WS_NUMBER_OF_BEDS") + "*"), /*#__PURE__*/React.createElement("div", {
21015
21042
  className: "form-field"
@@ -21022,11 +21049,39 @@ const PropertyWaterConnection = _ref => {
21022
21049
  },
21023
21050
  required: isHospitalProperty ? t("REQUIRED_FIELD") : false
21024
21051
  }),
21025
- name: "useDetails.hospitalBeds",
21052
+ name: "useDetails.numberOfBeds",
21026
21053
  disabled: isPropertyFound
21027
- }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.hospitalBeds) && /*#__PURE__*/React.createElement(CardLabelError, {
21054
+ }))) : 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.createElement(CardLabelError, {
21028
21055
  style: errorStyle
21029
- }, errors.useDetails.hospitalBeds.message)));
21056
+ }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_NUMBER_OF_STUDENTS")), /*#__PURE__*/React.createElement("div", {
21057
+ className: "form-field"
21058
+ }, /*#__PURE__*/React.createElement(TextInput, {
21059
+ t: t,
21060
+ inputRef: register({
21061
+ pattern: {
21062
+ value: NUMBER_PATTERN,
21063
+ message: t("ERR_INVALID_NUMBER")
21064
+ }
21065
+ }),
21066
+ name: "useDetails.numberOfStudents",
21067
+ disabled: isPropertyFound
21068
+ }))) : 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.createElement(CardLabelError, {
21069
+ style: errorStyle
21070
+ }, errors.useDetails.numberOfStudents.message), isServentHouse ? /*#__PURE__*/React.createElement(LabelFieldPair, null, /*#__PURE__*/React.createElement(CardLabel, null, "" + t("WS_SERVENT_HOUSE")), /*#__PURE__*/React.createElement("div", {
21071
+ className: "form-field"
21072
+ }, /*#__PURE__*/React.createElement(TextInput, {
21073
+ t: t,
21074
+ inputRef: register({
21075
+ pattern: {
21076
+ value: NUMBER_PATTERN,
21077
+ message: t("ERR_INVALID_NUMBER")
21078
+ }
21079
+ }),
21080
+ name: "useDetails.ServantQuartersRoom",
21081
+ disabled: isPropertyFound
21082
+ }))) : 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.createElement(CardLabelError, {
21083
+ style: errorStyle
21084
+ }, errors.useDetails.ServantQuartersRoom.message)));
21030
21085
  };
21031
21086
 
21032
21087
  const WSPropertyWaterConnection = props => {
@@ -28947,8 +29002,10 @@ const WSFeeEstimation = _ref => {
28947
29002
  };
28948
29003
 
28949
29004
  const ViewBreakup = _ref => {
28950
- var _wsAdditionalDetails$, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6;
28951
- let wsAdditionalDetails = _ref.wsAdditionalDetails;
29005
+ var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
29006
+ let wsAdditionalDetails = _ref.wsAdditionalDetails,
29007
+ print = _ref.print,
29008
+ download = _ref.download;
28952
29009
  const _useTranslation = useTranslation(),
28953
29010
  t = _useTranslation.t;
28954
29011
  const _useState = useState(false),
@@ -28957,6 +29014,44 @@ const ViewBreakup = _ref => {
28957
29014
  const _useState2 = useState({}),
28958
29015
  breakUpData = _useState2[0],
28959
29016
  setBreakUpData = _useState2[1];
29017
+ const breakupRef = useRef(null);
29018
+ const formatNumber = function (value, maximumFractionDigits) {
29019
+ if (maximumFractionDigits === void 0) {
29020
+ maximumFractionDigits = 2;
29021
+ }
29022
+ return Number(value || 0).toLocaleString("en-IN", {
29023
+ maximumFractionDigits
29024
+ });
29025
+ };
29026
+ const formatCurrency = value => /*#__PURE__*/React.createElement("span", null, "\u20B9", formatNumber(value));
29027
+ const DetailRows = _ref2 => {
29028
+ let rows = _ref2.rows;
29029
+ return rows.map(_ref3 => {
29030
+ let label = _ref3.label,
29031
+ value = _ref3.value,
29032
+ _ref3$currency = _ref3.currency,
29033
+ currency = _ref3$currency === void 0 ? false : _ref3$currency,
29034
+ _ref3$unit = _ref3.unit,
29035
+ unit = _ref3$unit === void 0 ? "" : _ref3$unit,
29036
+ _ref3$isText = _ref3.isText,
29037
+ isText = _ref3$isText === void 0 ? false : _ref3$isText;
29038
+ return /*#__PURE__*/React.createElement(Row, {
29039
+ className: "border-none",
29040
+ rowContainerStyle: {
29041
+ margin: "0px"
29042
+ },
29043
+ labelStyle: {
29044
+ width: "50%"
29045
+ },
29046
+ key: label,
29047
+ label: label,
29048
+ text: currency ? formatCurrency(value) : isText ? value || "-" : "" + formatNumber(value) + unit,
29049
+ textStyle: {
29050
+ textAlign: "right"
29051
+ }
29052
+ });
29053
+ });
29054
+ };
28960
29055
  const Heading = props => {
28961
29056
  return /*#__PURE__*/React.createElement("h1", {
28962
29057
  className: "heading-m"
@@ -28979,21 +29074,181 @@ const ViewBreakup = _ref => {
28979
29074
  }, /*#__PURE__*/React.createElement(Close, null));
28980
29075
  };
28981
29076
  const onPopupOpen = () => {
28982
- var _sessionBillFormData$;
28983
- let breakupData = wsAdditionalDetails.additionalDetails.data || {};
29077
+ var _wsAdditionalDetails$, _sessionBillFormData$;
29078
+ let breakupData = (wsAdditionalDetails === null || wsAdditionalDetails === void 0 ? void 0 : (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) === null || _wsAdditionalDetails$ === void 0 ? void 0 : _wsAdditionalDetails$.data) || {};
28984
29079
  const sessionBillData = sessionStorage.getItem("Digit.ADHOC_BILL_ADD_REBATE_DATA");
28985
29080
  const sessionBillFormData = sessionBillData ? JSON.parse(sessionBillData) : {};
28986
29081
  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;
28987
29082
  setBreakUpData(breakupData);
28988
29083
  showPopUp(true);
28989
29084
  };
29085
+ const getBreakupReportDetails = () => {
29086
+ var _wsAdditionalDetails$2, _wsAdditionalDetails$3, _wsAdditionalDetails$4, _wsAdditionalDetails$5, _wsAdditionalDetails$6, _wsAdditionalDetails$7, _breakUpData$billSlab, _breakUpData$billSlab2, _breakUpData$billSlab3;
29087
+ const amountRows = function (rows) {
29088
+ if (rows === void 0) {
29089
+ rows = [];
29090
+ }
29091
+ return rows.map(row => ({
29092
+ title: t(row === null || row === void 0 ? void 0 : row.taxHeadCode),
29093
+ value: "\u20B9" + formatNumber(row === null || row === void 0 ? void 0 : row.amount)
29094
+ }));
29095
+ };
29096
+ 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];
29097
+ 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(" ") || "-";
29098
+ const mobileNumber = (connectionHolder === null || connectionHolder === void 0 ? void 0 : connectionHolder.mobileNumber) || "-";
29099
+ 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) || "-";
29100
+ return [{
29101
+ title: "Applicant Details",
29102
+ values: [{
29103
+ title: "Application Number",
29104
+ value: appNumber
29105
+ }, {
29106
+ title: "Applicant Name",
29107
+ value: applicantName
29108
+ }, {
29109
+ title: "Mobile Number",
29110
+ value: mobileNumber
29111
+ }]
29112
+ }, {
29113
+ title: t("WS_APPLICATION_FEE_HEADER"),
29114
+ 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) || [])])
29115
+ }, {
29116
+ title: "Taxes",
29117
+ values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
29118
+ }, {
29119
+ title: "Water demand details",
29120
+ values: waterDemandRows.map(_ref4 => {
29121
+ let label = _ref4.label,
29122
+ value = _ref4.value,
29123
+ currency = _ref4.currency,
29124
+ unit = _ref4.unit,
29125
+ isText = _ref4.isText;
29126
+ return {
29127
+ title: label,
29128
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29129
+ };
29130
+ })
29131
+ }, {
29132
+ title: "Infrastructure charge details",
29133
+ values: infrastructureChargeRows.map(_ref5 => {
29134
+ let label = _ref5.label,
29135
+ value = _ref5.value,
29136
+ currency = _ref5.currency,
29137
+ unit = _ref5.unit,
29138
+ isText = _ref5.isText;
29139
+ return {
29140
+ title: label,
29141
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29142
+ };
29143
+ })
29144
+ }, {
29145
+ title: "Total",
29146
+ values: [{
29147
+ title: t("PDF_STATIC_LABEL_CONSOLIDATED_TLAPP_TOTAL_AMOUNT"),
29148
+ value: "\u20B9" + formatNumber(breakUpData === null || breakUpData === void 0 ? void 0 : breakUpData.totalAmount)
29149
+ }]
29150
+ }].filter(section => section.values.length > 0);
29151
+ };
29152
+ const generateBreakupReport = mode => {
29153
+ var _Digit$Utils, _Digit$Utils$pdf;
29154
+ 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;
29155
+ if (typeof generateReport === "function") {
29156
+ return generateReport({
29157
+ tenantId: Digit.ULBService.getCurrentTenantId(),
29158
+ heading: t("WS_CALCULATION_BREAKUP"),
29159
+ details: getBreakupReportDetails(),
29160
+ t,
29161
+ mode
29162
+ });
29163
+ }
29164
+ return mode === "download" ? Digit.Download.PDF(breakupRef, t("WS_CALCULATION_BREAKUP")) : null;
29165
+ };
29166
+ const handleDownload = () => generateBreakupReport("download");
29167
+ const handlePrint = () => {
29168
+ var _Digit$Utils2, _Digit$Utils2$pdf, _breakupRef$current, _window$mSewaApp, _window$mSewaApp$isMs;
29169
+ 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) {
29170
+ return generateBreakupReport("print");
29171
+ }
29172
+ const content = (_breakupRef$current = breakupRef.current) === null || _breakupRef$current === void 0 ? void 0 : _breakupRef$current.innerHTML;
29173
+ if (!content) return;
29174
+ 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)) {
29175
+ window.mSewaApp.downloadBase64File(window.btoa(unescape(encodeURIComponent(content))), t("WS_CALCULATION_BREAKUP"));
29176
+ return;
29177
+ }
29178
+ const printWindow = window.open("", "");
29179
+ if (!printWindow) return;
29180
+ printWindow.document.write("<html><body>" + content + "</body></html>");
29181
+ printWindow.document.close();
29182
+ printWindow.focus();
29183
+ printWindow.print();
29184
+ };
29185
+ const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.waterDemandDetail;
29186
+ const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.infrastructureChargeDetail;
29187
+ const waterDemandRows = waterDemandDetail ? [{
29188
+ label: "Calculated occupancy",
29189
+ value: waterDemandDetail.calculatedOccupancy,
29190
+ unit: " person"
29191
+ }, {
29192
+ label: "Applied LPCD",
29193
+ value: waterDemandDetail.chosenLpcd,
29194
+ unit: " LPD"
29195
+ }, {
29196
+ label: "Base demand",
29197
+ value: waterDemandDetail.baseDemand,
29198
+ unit: " LPD"
29199
+ }, {
29200
+ label: "Contingency/Floating Occupancy",
29201
+ value: waterDemandDetail.contingencyPercentage,
29202
+ unit: "%"
29203
+ }, {
29204
+ label: "Total water demand",
29205
+ value: waterDemandDetail.totalWaterDemandLPD,
29206
+ unit: " LPD"
29207
+ }] : [];
29208
+ const infrastructureChargeRows = infrastructureChargeDetail ? [{
29209
+ label: "Colony category",
29210
+ value: infrastructureChargeDetail.colonyCategory,
29211
+ isText: true
29212
+ }, {
29213
+ label: "Plot area",
29214
+ value: infrastructureChargeDetail.plotArea,
29215
+ unit: " (sq. meter.)"
29216
+ }, {
29217
+ label: "Water rate",
29218
+ value: infrastructureChargeDetail.waterRatePerLPD,
29219
+ currency: true
29220
+ }, {
29221
+ label: "Sewer rate",
29222
+ value: infrastructureChargeDetail.sewerRatePerLPD,
29223
+ currency: true
29224
+ }, {
29225
+ label: "Water Infra Charges",
29226
+ value: infrastructureChargeDetail.waterComponentIFC,
29227
+ currency: true
29228
+ }, {
29229
+ label: "Sewer Infra Charges",
29230
+ value: infrastructureChargeDetail.sewerComponentIFC,
29231
+ currency: true
29232
+ }, {
29233
+ label: "Rebate",
29234
+ value: infrastructureChargeDetail.rebatePercentage,
29235
+ unit: "%"
29236
+ }, {
29237
+ label: "Rebate amount",
29238
+ value: infrastructureChargeDetail.rebateAmount,
29239
+ currency: true
29240
+ }, {
29241
+ label: "Net IFC",
29242
+ value: infrastructureChargeDetail.netIFC,
29243
+ currency: true
29244
+ }] : [];
28990
29245
  return /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement("div", {
28991
29246
  style: {
28992
29247
  lineHeight: "19px",
28993
29248
  maxWidth: "950px",
28994
29249
  minWidth: "280px"
28995
29250
  }
28996
- }, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$ = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$ !== void 0 && _wsAdditionalDetails$.isViewBreakup ? /*#__PURE__*/React.createElement("div", {
29251
+ }, wsAdditionalDetails !== null && wsAdditionalDetails !== void 0 && (_wsAdditionalDetails$8 = wsAdditionalDetails.additionalDetails) !== null && _wsAdditionalDetails$8 !== void 0 && _wsAdditionalDetails$8.isViewBreakup ? /*#__PURE__*/React.createElement("div", {
28997
29252
  onClick: e => onPopupOpen(),
28998
29253
  style: {
28999
29254
  marginTop: "12px"
@@ -29004,6 +29259,9 @@ const ViewBreakup = _ref => {
29004
29259
  headerBarMain: /*#__PURE__*/React.createElement(Heading, {
29005
29260
  label: t("WS_CALCULATION_BREAKUP")
29006
29261
  }),
29262
+ width: "950px",
29263
+ print: print || handlePrint,
29264
+ download: download || handleDownload,
29007
29265
  headerBarEnd: /*#__PURE__*/React.createElement(CloseBtn, {
29008
29266
  onClick: () => {
29009
29267
  showPopUp(false);
@@ -29019,16 +29277,13 @@ const ViewBreakup = _ref => {
29019
29277
  popupModuleMianStyles: {
29020
29278
  paddingTop: "0px"
29021
29279
  }
29022
- }, /*#__PURE__*/React.createElement(StatusTable, {
29023
- style: {
29024
- padding: "10px",
29025
- paddingTop: "0px"
29026
- }
29027
- }, /*#__PURE__*/React.createElement(CardSectionHeader, {
29280
+ }, /*#__PURE__*/React.createElement("div", {
29281
+ ref: breakupRef
29282
+ }, /*#__PURE__*/React.createElement(StatusTable, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
29028
29283
  style: {
29029
29284
  margin: "10px 0px"
29030
29285
  }
29031
- }, 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.createElement(Row, {
29286
+ }, 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.createElement(Row, {
29032
29287
  className: "border-none",
29033
29288
  rowContainerStyle: {
29034
29289
  margin: "0px"
@@ -29042,11 +29297,7 @@ const ViewBreakup = _ref => {
29042
29297
  textStyle: {
29043
29298
  textAlign: "right"
29044
29299
  }
29045
- })), /*#__PURE__*/React.createElement(CardSectionHeader, {
29046
- style: {
29047
- margin: "10px 0px"
29048
- }
29049
- }, 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.createElement(Row, {
29300
+ })), 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.createElement(Row, {
29050
29301
  className: "border-none",
29051
29302
  rowContainerStyle: {
29052
29303
  margin: "0px"
@@ -29060,7 +29311,7 @@ const ViewBreakup = _ref => {
29060
29311
  textStyle: {
29061
29312
  textAlign: "right"
29062
29313
  }
29063
- })), 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.createElement(Row, {
29314
+ })), 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.createElement(Row, {
29064
29315
  className: "border-none",
29065
29316
  rowContainerStyle: {
29066
29317
  margin: "0px"
@@ -29074,6 +29325,18 @@ const ViewBreakup = _ref => {
29074
29325
  textStyle: {
29075
29326
  textAlign: "right"
29076
29327
  }
29328
+ })), waterDemandRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
29329
+ style: {
29330
+ margin: "10px 0px"
29331
+ }
29332
+ }, "Water demand details"), /*#__PURE__*/React.createElement(DetailRows, {
29333
+ rows: waterDemandRows
29334
+ })), infrastructureChargeRows.length > 0 && /*#__PURE__*/React.createElement(Fragment$1, null, /*#__PURE__*/React.createElement(CardSectionHeader, {
29335
+ style: {
29336
+ margin: "10px 0px"
29337
+ }
29338
+ }, "Infrastructure charge details"), /*#__PURE__*/React.createElement(DetailRows, {
29339
+ rows: infrastructureChargeRows
29077
29340
  })), /*#__PURE__*/React.createElement("hr", {
29078
29341
  style: {
29079
29342
  color: "#cccccc",
@@ -29096,7 +29359,7 @@ const ViewBreakup = _ref => {
29096
29359
  fontWeight: "700",
29097
29360
  fontSize: "24px"
29098
29361
  }
29099
- })))));
29362
+ }))))));
29100
29363
  };
29101
29364
 
29102
29365
  const checkForNA$1 = value => {
@@ -45294,16 +45557,16 @@ const ApplicationDetails$1 = () => {
45294
45557
  };
45295
45558
 
45296
45559
  const GetConnectionDetails = () => {
45297
- 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$a17, _applicationDetails$f4, _applicationDetails$p2, _applicationDetails$p3, _applicationDetails$a18, _applicationDetails$a19, _applicationDetails$a20, _applicationDetails$f5, _applicationDetails$f6;
45560
+ 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$p3, _applicationDetails$p4, _applicationDetails$a19, _applicationDetails$a20, _applicationDetails$a21, _applicationDetails$f6, _applicationDetails$f7;
45298
45561
  const getBillSearch = function () {
45299
45562
  try {
45300
- const _temp = function (_applicationDetails$f7) {
45301
- if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f7 = applicationDetails.fetchBillsData) === null || _applicationDetails$f7 === void 0 ? void 0 : _applicationDetails$f7.length) > 0) {
45302
- var _applicationDetails$a21;
45563
+ const _temp = function (_applicationDetails$f8) {
45564
+ if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f8 = applicationDetails.fetchBillsData) === null || _applicationDetails$f8 === void 0 ? void 0 : _applicationDetails$f8.length) > 0) {
45565
+ var _applicationDetails$a22;
45303
45566
  const service = serviceType === "WATER" ? "WS" : "SW";
45304
45567
  let wsSearchFilters = {
45305
45568
  isConnectionSearch: true,
45306
- connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a21 = applicationDetails.applicationData) === null || _applicationDetails$a21 === void 0 ? void 0 : _applicationDetails$a21.connectionNo
45569
+ connectionNumber: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a22 = applicationDetails.applicationData) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.connectionNo
45307
45570
  };
45308
45571
  return Promise.resolve(Digit.WSService.search({
45309
45572
  tenantId,
@@ -45316,8 +45579,8 @@ const GetConnectionDetails = () => {
45316
45579
  bussinessService: service
45317
45580
  };
45318
45581
  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) {
45319
- var _applicationDetails$a22;
45320
- downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a22 = applicationDetails.applicationData) === null || _applicationDetails$a22 === void 0 ? void 0 : _applicationDetails$a22.connectionNo, filters);
45582
+ var _applicationDetails$a23;
45583
+ downloadAndOpenPdf(applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a23 = applicationDetails.applicationData) === null || _applicationDetails$a23 === void 0 ? void 0 : _applicationDetails$a23.connectionNo, filters);
45321
45584
  }
45322
45585
  });
45323
45586
  }
@@ -45346,7 +45609,7 @@ const GetConnectionDetails = () => {
45346
45609
  showOptions = _useState3[0],
45347
45610
  setShowOptions = _useState3[1];
45348
45611
  const stateCode = Digit.ULBService.getStateId();
45349
- const actionConfig = ["MODIFY_CONNECTION_BUTTON", "BILL_AMENDMENT_BUTTON", "DISCONNECTION_BUTTON"];
45612
+ const actionConfig = ["MODIFY_CONNECTION_BUTTON", "MUTATION_BUTTON", "BILL_AMENDMENT_BUTTON", "DISCONNECTION_BUTTON"];
45350
45613
  const _Digit$Hooks$ws$useCo = Digit.Hooks.ws.useConnectionDetail(t, tenantId, applicationNumber, serviceType, {
45351
45614
  privacy: Digit.Utils.getPrivacyObject()
45352
45615
  }),
@@ -45448,8 +45711,29 @@ const GetConnectionDetails = () => {
45448
45711
  data: applicationDetails
45449
45712
  }));
45450
45713
  };
45714
+ const getMutationButton = () => {
45715
+ var _applicationDetails$f2, _applicationDetails$a16, _applicationDetails$p2;
45716
+ if (!checkApplicationStatus) {
45717
+ setshowActionToast({
45718
+ key: "error",
45719
+ label: "CONN_NOT_ACTIVE"
45720
+ });
45721
+ return;
45722
+ }
45723
+ if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f2 = applicationDetails.fetchBillsData[0]) === null || _applicationDetails$f2 === void 0 ? void 0 : _applicationDetails$f2.totalAmount) > 0) {
45724
+ setshowActionToast({
45725
+ key: "error",
45726
+ label: "WS_DUE_AMOUNT_SHOULD_BE_ZERO"
45727
+ });
45728
+ return;
45729
+ }
45730
+ let pathname = "/digit-ui/employee/ws/mutation-application?applicationNumber=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a16 = applicationDetails.applicationData) === null || _applicationDetails$a16 === void 0 ? void 0 : _applicationDetails$a16.connectionNo) + "&service=" + serviceType + "&propertyId=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p2 = applicationDetails.propertyDetails) === null || _applicationDetails$p2 === void 0 ? void 0 : _applicationDetails$p2.propertyId) + "&from=WS_COMMON_CONNECTION_DETAIL";
45731
+ history.push("" + pathname, JSON.stringify({
45732
+ data: applicationDetails
45733
+ }));
45734
+ };
45451
45735
  const getBillAmendmentButton = () => {
45452
- var _demandData$Demands, _applicationDetails$a16;
45736
+ var _demandData$Demands, _applicationDetails$a17;
45453
45737
  let isBillAmendNotApplicable = false;
45454
45738
  billData === null || billData === void 0 ? void 0 : billData.map(bill => {
45455
45739
  if ((bill === null || bill === void 0 ? void 0 : bill.status) === "INWORKFLOW") {
@@ -45470,7 +45754,7 @@ const GetConnectionDetails = () => {
45470
45754
  });
45471
45755
  return;
45472
45756
  }
45473
- history.push("/digit-ui/employee/ws/required-documents?connectionNumber=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a16 = applicationDetails.applicationData) === null || _applicationDetails$a16 === void 0 ? void 0 : _applicationDetails$a16.connectionNo) + "&tenantId=" + getTenantId + "&service=" + serviceType, JSON.stringify({
45757
+ history.push("/digit-ui/employee/ws/required-documents?connectionNumber=" + (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.connectionNo) + "&tenantId=" + getTenantId + "&service=" + serviceType, JSON.stringify({
45474
45758
  data: applicationDetails
45475
45759
  }));
45476
45760
  };
@@ -45490,9 +45774,9 @@ const GetConnectionDetails = () => {
45490
45774
  label: "WORKFLOW_IN_PROGRESS"
45491
45775
  });
45492
45776
  } else {
45493
- var _billData$, _applicationDetails$f2;
45777
+ var _billData$, _applicationDetails$f3;
45494
45778
  console.log("due", due, applicationDetails);
45495
- if (((_billData$ = billData[0]) === null || _billData$ === void 0 ? void 0 : _billData$.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f2 = applicationDetails.fetchBillsData) === null || _applicationDetails$f2 === void 0 ? void 0 : _applicationDetails$f2.length) <= 0 || due == "0" || due < 0) {
45779
+ if (((_billData$ = billData[0]) === null || _billData$ === void 0 ? void 0 : _billData$.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f3 = applicationDetails.fetchBillsData) === null || _applicationDetails$f3 === void 0 ? void 0 : _applicationDetails$f3.length) <= 0 || due == "0" || due < 0) {
45496
45780
  Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
45497
45781
  history.push("" + pathname);
45498
45782
  } else {
@@ -45508,8 +45792,8 @@ const GetConnectionDetails = () => {
45508
45792
  label: "WORKFLOW_IN_PROGRESS"
45509
45793
  });
45510
45794
  } else {
45511
- var _billData$2, _applicationDetails$f3;
45512
- if (((_billData$2 = billData[0]) === null || _billData$2 === void 0 ? void 0 : _billData$2.status) === "ACTIVE" || (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f3 = applicationDetails.fetchBillsData) === null || _applicationDetails$f3 === void 0 ? void 0 : _applicationDetails$f3.length) <= 0 || due === "0") {
45795
+ var _billData$2, _applicationDetails$f4;
45796
+ 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") {
45513
45797
  Digit.SessionStorage.set("WS_DISCONNECTION", applicationDetails);
45514
45798
  history.push("" + pathname);
45515
45799
  } else {
@@ -45520,6 +45804,8 @@ const GetConnectionDetails = () => {
45520
45804
  function onActionSelect(action) {
45521
45805
  if (action === "MODIFY_CONNECTION_BUTTON") {
45522
45806
  getModifyConnectionButton();
45807
+ } else if (action === "MUTATION_BUTTON") {
45808
+ getMutationButton();
45523
45809
  } else if (action === "BILL_AMENDMENT_BUTTON") {
45524
45810
  getBillAmendmentButton();
45525
45811
  } else if (action === "DISCONNECTION_BUTTON") {
@@ -45528,7 +45814,7 @@ const GetConnectionDetails = () => {
45528
45814
  getRestorationButton();
45529
45815
  }
45530
45816
  }
45531
- const checkApplicationStatusForDisconnection = (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a17 = applicationDetails.applicationData) === null || _applicationDetails$a17 === void 0 ? void 0 : _applicationDetails$a17.status) === "Active" ? true : false;
45817
+ 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;
45532
45818
  const showAction = checkApplicationStatusForDisconnection ? actionConfig : actionConfig.filter(item => item !== "DISCONNECTION_BUTTON");
45533
45819
  const showActionRestoration = ["RESTORATION_BUTTON"];
45534
45820
  let dowloadOptions = [];
@@ -45542,7 +45828,7 @@ const GetConnectionDetails = () => {
45542
45828
  label: t("WS_CONNECTION_DETAILS"),
45543
45829
  onClick: () => downloadConnectionDetails()
45544
45830
  };
45545
- if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f4 = applicationDetails.fetchBillsData) === null || _applicationDetails$f4 === void 0 ? void 0 : _applicationDetails$f4.length) > 0) dowloadOptions = [appFeeDownloadReceipt, connectionDetailsReceipt];else dowloadOptions = [connectionDetailsReceipt];
45831
+ if ((applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f5 = applicationDetails.fetchBillsData) === null || _applicationDetails$f5 === void 0 ? void 0 : _applicationDetails$f5.length) > 0) dowloadOptions = [appFeeDownloadReceipt, connectionDetailsReceipt];else dowloadOptions = [connectionDetailsReceipt];
45546
45832
  const Close = () => /*#__PURE__*/React.createElement("svg", {
45547
45833
  xmlns: "http://www.w3.org/2000/svg",
45548
45834
  viewBox: "0 0 24 24",
@@ -45608,7 +45894,7 @@ const GetConnectionDetails = () => {
45608
45894
  isDataLoading: isLoading,
45609
45895
  applicationData: applicationDetails === null || applicationDetails === void 0 ? void 0 : applicationDetails.applicationData,
45610
45896
  mutate: mutate,
45611
- businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p2 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p2 === void 0 ? void 0 : (_applicationDetails$p3 = _applicationDetails$p2[0]) === null || _applicationDetails$p3 === void 0 ? void 0 : _applicationDetails$p3.businessService,
45897
+ businessService: applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$p3 = applicationDetails.processInstancesDetails) === null || _applicationDetails$p3 === void 0 ? void 0 : (_applicationDetails$p4 = _applicationDetails$p3[0]) === null || _applicationDetails$p4 === void 0 ? void 0 : _applicationDetails$p4.businessService,
45612
45898
  moduleCode: "WS",
45613
45899
  showToast: showToast,
45614
45900
  setShowToast: setShowToast,
@@ -45626,7 +45912,7 @@ const GetConnectionDetails = () => {
45626
45912
  ref: actionMenuRef,
45627
45913
  label: t("WF_TAKE_ACTION"),
45628
45914
  onSubmit: () => setDisplayMenu(!displayMenu)
45629
- })) : applicationDetails !== null && applicationDetails !== void 0 && (_applicationDetails$a18 = applicationDetails.applicationData) !== null && _applicationDetails$a18 !== void 0 && _applicationDetails$a18.isDisconnectionTemporary && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a19 = applicationDetails.applicationData) === null || _applicationDetails$a19 === void 0 ? void 0 : _applicationDetails$a19.status) !== "Active" && (applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$a20 = applicationDetails.applicationData) === null || _applicationDetails$a20 === void 0 ? void 0 : _applicationDetails$a20.applicationStatus) == "DISCONNECTION_EXECUTED" ? /*#__PURE__*/React.createElement(ActionBar, null, displayMenu ? /*#__PURE__*/React.createElement(Menu, {
45915
+ })) : 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, {
45630
45916
  options: showActionRestoration,
45631
45917
  localeKeyPrefix: "WS",
45632
45918
  t: t,
@@ -45682,7 +45968,7 @@ const GetConnectionDetails = () => {
45682
45968
  className: "modal-header-ws"
45683
45969
  }, t("WS_CLEAR_DUES_DISCONNECTION_SUB_HEADER_LABEL"), " "), /*#__PURE__*/React.createElement("div", {
45684
45970
  className: "modal-body-ws"
45685
- }, /*#__PURE__*/React.createElement("span", null, t("WS_COMMON_TABLE_COL_AMT_DUE_LABEL"), ": \u20B9", due ? due : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f5 = applicationDetails.fetchBillsData) === null || _applicationDetails$f5 === void 0 ? void 0 : (_applicationDetails$f6 = _applicationDetails$f5[0]) === null || _applicationDetails$f6 === void 0 ? void 0 : _applicationDetails$f6.totalAmount))) : null, showActionToast && /*#__PURE__*/React.createElement(Toast, {
45971
+ }, /*#__PURE__*/React.createElement("span", null, t("WS_COMMON_TABLE_COL_AMT_DUE_LABEL"), ": \u20B9", due ? due : applicationDetails === null || applicationDetails === void 0 ? void 0 : (_applicationDetails$f6 = applicationDetails.fetchBillsData) === null || _applicationDetails$f6 === void 0 ? void 0 : (_applicationDetails$f7 = _applicationDetails$f6[0]) === null || _applicationDetails$f7 === void 0 ? void 0 : _applicationDetails$f7.totalAmount))) : null, showActionToast && /*#__PURE__*/React.createElement(Toast, {
45686
45972
  error: showActionToast.key,
45687
45973
  label: t("" + showActionToast.label),
45688
45974
  onClose: closeBillToast
@@ -45794,9 +46080,11 @@ const ActivateConnection = () => {
45794
46080
  }
45795
46081
  }, []);
45796
46082
  useEffect(() => {
45797
- if (!isLoading) {
46083
+ if (!isLoading && newConfig && Array.isArray(newConfig)) {
45798
46084
  const config = newConfig.find(conf => conf.hideInCitizen);
45799
- setConfig(config);
46085
+ if (config) {
46086
+ setConfig(config);
46087
+ }
45800
46088
  }
45801
46089
  }, [newConfig]);
45802
46090
  useEffect(() => {
@@ -46305,16 +46593,18 @@ const EditApplication$1 = () => {
46305
46593
  }),
46306
46594
  propertyDetails = _Digit$Hooks$pt$usePr.data;
46307
46595
  useEffect(() => {
46308
- if (!isConfigLoading) {
46309
- var _config$body;
46596
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
46310
46597
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isEdit);
46311
- config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
46312
- let bodyDetails = [];
46313
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
46314
- if (data !== null && data !== void 0 && data.isEditConnection) bodyDetails.push(data);
46315
- });
46316
- config.body = bodyDetails;
46317
- setConfig(config);
46598
+ if (config) {
46599
+ var _config$body;
46600
+ config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
46601
+ let bodyDetails = [];
46602
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
46603
+ if (data !== null && data !== void 0 && data.isEditConnection) bodyDetails.push(data);
46604
+ });
46605
+ config.body = bodyDetails;
46606
+ setConfig(config);
46607
+ }
46318
46608
  }
46319
46609
  }, [newConfig]);
46320
46610
  useEffect(() => {
@@ -46967,19 +47257,21 @@ const ModifyApplication = () => {
46967
47257
  }),
46968
47258
  propertyDetails = _Digit$Hooks$pt$usePr.data;
46969
47259
  useEffect(() => {
46970
- if (!isConfigLoading) {
46971
- var _config$body;
47260
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
46972
47261
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
46973
- config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
46974
- let bodyDetails = [];
46975
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
46976
- if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
46977
- });
46978
- bodyDetails.forEach(bdyData => {
46979
- if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
46980
- });
46981
- config.body = bodyDetails;
46982
- setConfig(config);
47262
+ if (config) {
47263
+ var _config$body;
47264
+ config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47265
+ let bodyDetails = [];
47266
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47267
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47268
+ });
47269
+ bodyDetails.forEach(bdyData => {
47270
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47271
+ });
47272
+ config.body = bodyDetails;
47273
+ setConfig(config);
47274
+ }
46983
47275
  }
46984
47276
  }, [newConfig]);
46985
47277
  useEffect(() => {
@@ -47284,19 +47576,21 @@ const EditModifyApplication = () => {
47284
47576
  }),
47285
47577
  propertyDetails = _Digit$Hooks$pt$usePr.data;
47286
47578
  useEffect(() => {
47287
- if (!isConfigLoading) {
47288
- var _config$body;
47579
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47289
47580
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
47290
- config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47291
- let bodyDetails = [];
47292
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47293
- if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47294
- });
47295
- bodyDetails.forEach(bdyData => {
47296
- if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47297
- });
47298
- config.body = bodyDetails;
47299
- setConfig(config);
47581
+ if (config) {
47582
+ var _config$body;
47583
+ config.head = "WS_WATER_AND_SEWERAGE_MODIFY_CONNECTION_LABEL";
47584
+ let bodyDetails = [];
47585
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47586
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47587
+ });
47588
+ bodyDetails.forEach(bdyData => {
47589
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47590
+ });
47591
+ config.body = bodyDetails;
47592
+ setConfig(config);
47593
+ }
47300
47594
  }
47301
47595
  }, [newConfig]);
47302
47596
  useEffect(() => {
@@ -47421,6 +47715,289 @@ const EditModifyApplication = () => {
47421
47715
  }));
47422
47716
  };
47423
47717
 
47718
+ const MutationApplication = () => {
47719
+ var _state, _details, _details2, _details2$application;
47720
+ const _useTranslation = useTranslation(),
47721
+ t = _useTranslation.t;
47722
+ let _useLocation = useLocation(),
47723
+ state = _useLocation.state;
47724
+ state = state ? typeof state === "string" ? JSON.parse(state) : state : {};
47725
+ const history = useHistory();
47726
+ let filters = getQueryStringParams(location.search);
47727
+ const _useState = useState(false),
47728
+ canSubmit = _useState[0],
47729
+ setSubmitValve = _useState[1];
47730
+ const _useState2 = useState(null),
47731
+ showToast = _useState2[0],
47732
+ setShowToast = _useState2[1];
47733
+ const _useState3 = useState({}),
47734
+ appData = _useState3[0],
47735
+ setAppData = _useState3[1];
47736
+ const _useState4 = useState({
47737
+ head: "",
47738
+ body: []
47739
+ }),
47740
+ config = _useState4[0],
47741
+ setConfig = _useState4[1];
47742
+ const _useState5 = useState(true),
47743
+ enabledLoader = _useState5[0],
47744
+ setEnabledLoader = _useState5[1];
47745
+ const _useState6 = useState(false),
47746
+ isAppDetailsPage = _useState6[0];
47747
+ const _useState7 = useState(false),
47748
+ isEnableLoader = _useState7[0],
47749
+ setIsEnableLoader = _useState7[1];
47750
+ let tenantId = Digit.ULBService.getCurrentTenantId();
47751
+ const serviceType = filters === null || filters === void 0 ? void 0 : filters.service;
47752
+ const stateId = Digit.ULBService.getStateId();
47753
+ let _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSConfigMDMS.WSCreateConfig(stateId, {}),
47754
+ newConfig = _Digit$Hooks$ws$useWS.data,
47755
+ isConfigLoading = _Digit$Hooks$ws$useWS.isLoading;
47756
+ let details = cloneDeep_1((_state = state) === null || _state === void 0 ? void 0 : _state.data);
47757
+ 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, {
47758
+ privacy: Digit.Utils.getPrivacyObject()
47759
+ }),
47760
+ applicationDetails = _Digit$Hooks$ws$useWS2.data;
47761
+ details = applicationDetails;
47762
+ const _useState8 = useState(new URLSearchParams(useLocation().search).get("propertyId")),
47763
+ propertyId = _useState8[0],
47764
+ setPropertyId = _useState8[1];
47765
+ const _Digit$Hooks$useSessi = Digit.Hooks.useSessionStorage("PT_CREATE_EMP_WS_NEW_FORM", {}),
47766
+ sessionFormData = _Digit$Hooks$useSessi[0],
47767
+ setSessionFormData = _Digit$Hooks$useSessi[1],
47768
+ clearSessionFormData = _Digit$Hooks$useSessi[2];
47769
+ const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertySearch({
47770
+ filters: {
47771
+ propertyIds: propertyId
47772
+ },
47773
+ tenantId: tenantId
47774
+ }, {
47775
+ filters: {
47776
+ propertyIds: propertyId
47777
+ },
47778
+ tenantId: tenantId,
47779
+ enabled: propertyId && propertyId != "" ? true : false,
47780
+ privacy: Digit.Utils.getPrivacyObject()
47781
+ }),
47782
+ propertyDetails = _Digit$Hooks$pt$usePr.data;
47783
+ useEffect(() => {
47784
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47785
+ const config = newConfig.find(conf => conf.hideInCitizen && conf.isModify);
47786
+ if (config) {
47787
+ var _config$body;
47788
+ config.head = "WS_WATER_AND_SEWERAGE_MUTATION_CONNECTION_LABEL";
47789
+ let bodyDetails = [];
47790
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47791
+ if (data !== null && data !== void 0 && data.isModifyConnection) bodyDetails.push(data);
47792
+ });
47793
+ bodyDetails.forEach(bdyData => {
47794
+ if ((bdyData === null || bdyData === void 0 ? void 0 : bdyData.head) == "WS_COMMON_PROPERTY_DETAILS") bdyData.head = "";
47795
+ });
47796
+ config.body = bodyDetails;
47797
+ setConfig(config);
47798
+ }
47799
+ }
47800
+ }, [newConfig]);
47801
+ useEffect(() => {
47802
+ var _sessionFormData$cpt, _sessionFormData$cpt$, _sessionFormData$cpt2, _sessionFormData$cpt3;
47803
+ !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);
47804
+ }, [sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
47805
+ useEffect(function () {
47806
+ try {
47807
+ const IsDetailsExists = sessionStorage.getItem("IsDetailsExists") ? JSON.parse(sessionStorage.getItem("IsDetailsExists")) : false;
47808
+ const _temp = function (_details3, _details3$application) {
47809
+ if ((_details3 = details) !== null && _details3 !== void 0 && (_details3$application = _details3.applicationData) !== null && _details3$application !== void 0 && _details3$application.id) {
47810
+ return Promise.resolve(convertApplicationData(details, serviceType, true, undefined, t)).then(function (convertAppData) {
47811
+ setSessionFormData(_extends({}, sessionFormData, convertAppData));
47812
+ setAppData(_extends({}, convertAppData));
47813
+ sessionStorage.setItem("IsDetailsExists", JSON.stringify(true));
47814
+ });
47815
+ }
47816
+ }();
47817
+ return Promise.resolve(_temp && _temp.then ? _temp.then(function () {}) : void 0);
47818
+ } catch (e) {
47819
+ return Promise.reject(e);
47820
+ }
47821
+ }, [details, applicationDetails]);
47822
+ useEffect(() => {
47823
+ var _propertyDetails$Prop;
47824
+ setSessionFormData(_extends({}, sessionFormData, {
47825
+ cpt: {
47826
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop = propertyDetails.Properties) === null || _propertyDetails$Prop === void 0 ? void 0 : _propertyDetails$Prop[0]
47827
+ }
47828
+ }));
47829
+ }, [propertyDetails]);
47830
+ useEffect(() => {
47831
+ var _sessionFormData$Conn, _sessionFormData$Conn2;
47832
+ 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) {
47833
+ setEnabledLoader(false);
47834
+ }
47835
+ }, [propertyDetails, sessionFormData, sessionFormData === null || sessionFormData === void 0 ? void 0 : sessionFormData.cpt]);
47836
+ useEffect(() => {
47837
+ const timer = setTimeout(() => {
47838
+ var _sessionFormData$Conn3, _sessionFormData$Conn4, _sessionFormData$Conn5, _sessionFormData$Conn6, _sessionFormData$Conn7;
47839
+ 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());
47840
+ }, 3000);
47841
+ return () => clearTimeout(timer);
47842
+ }, [isAppDetailsPage]);
47843
+ const _Digit$Hooks$ws$useWa = Digit.Hooks.ws.useWaterCreateAPI("WATER"),
47844
+ waterMutation = _Digit$Hooks$ws$useWa.mutate;
47845
+ const _Digit$Hooks$ws$useWS3 = Digit.Hooks.ws.useWSApplicationActions("WATER");
47846
+ const _Digit$Hooks$ws$useWa2 = Digit.Hooks.ws.useWaterCreateAPI("SEWERAGE"),
47847
+ sewerageMutation = _Digit$Hooks$ws$useWa2.mutate;
47848
+ const _Digit$Hooks$ws$useWS4 = Digit.Hooks.ws.useWSApplicationActions("SEWERAGE");
47849
+ const onFormValueChange = (setValue, formData, formState) => {
47850
+ var _formData$cpt, _formData$cpt$details;
47851
+ if (!lodash.isEqual(sessionFormData, formData)) {
47852
+ setSessionFormData(_extends({}, sessionFormData, formData));
47853
+ }
47854
+ 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);
47855
+ };
47856
+ const onSubmit = function (data) {
47857
+ try {
47858
+ var _data$cpt, _propertyDetails$Prop2;
47859
+ 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])) {
47860
+ var _data$cpt2;
47861
+ if (!(data !== null && data !== void 0 && (_data$cpt2 = data.cpt) !== null && _data$cpt2 !== void 0 && _data$cpt2.details) || !propertyDetails) {
47862
+ setShowToast({
47863
+ key: "error",
47864
+ message: "ERR_INVALID_PROPERTY_ID"
47865
+ });
47866
+ return Promise.resolve();
47867
+ }
47868
+ }
47869
+ const _temp7 = function () {
47870
+ if (!canSubmit) {
47871
+ setShowToast({
47872
+ warning: true,
47873
+ message: "PLEASE_FILL_MANDATORY_DETAILS"
47874
+ });
47875
+ setTimeout(() => {
47876
+ setShowToast(false);
47877
+ }, 3000);
47878
+ } else {
47879
+ var _data$cpt3;
47880
+ if (!(data !== null && data !== void 0 && (_data$cpt3 = data.cpt) !== null && _data$cpt3 !== void 0 && _data$cpt3.details)) {
47881
+ var _propertyDetails$Prop3;
47882
+ data.cpt = {
47883
+ details: propertyDetails === null || propertyDetails === void 0 ? void 0 : (_propertyDetails$Prop3 = propertyDetails.Properties) === null || _propertyDetails$Prop3 === void 0 ? void 0 : _propertyDetails$Prop3[0]
47884
+ };
47885
+ }
47886
+ const details = sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS") ? JSON.parse(sessionStorage.getItem("WS_EDIT_APPLICATION_DETAILS")) : {};
47887
+ return Promise.resolve(convertModifyApplicationDetails(data, details, "APPLY_MUTATION")).then(function (convertAppData) {
47888
+ function _temp6() {
47889
+ const _temp4 = function () {
47890
+ if (serviceType !== "WATER") {
47891
+ const _temp3 = function () {
47892
+ if (sewerageMutation) {
47893
+ setIsEnableLoader(true);
47894
+ return Promise.resolve(sewerageMutation(reqDetails, {
47895
+ onError: (error, variables) => {
47896
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2, _error$response2, _error$response2$data, _error$response2$data2, _error$response2$data3;
47897
+ setIsEnableLoader(false);
47898
+ setShowToast({
47899
+ key: "error",
47900
+ 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
47901
+ });
47902
+ setTimeout(closeToastOfError, 5000);
47903
+ },
47904
+ onSuccess: function (data, variables) {
47905
+ try {
47906
+ var _data$SewerageConnect, _data$SewerageConnect2;
47907
+ clearSessionFormData();
47908
+ 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));
47909
+ return Promise.resolve();
47910
+ } catch (e) {
47911
+ return Promise.reject(e);
47912
+ }
47913
+ }
47914
+ })).then(function () {});
47915
+ }
47916
+ }();
47917
+ if (_temp3 && _temp3.then) return _temp3.then(function () {});
47918
+ }
47919
+ }();
47920
+ if (_temp4 && _temp4.then) return _temp4.then(function () {});
47921
+ }
47922
+ convertAppData.applicationType = serviceType == "WATER" ? "MUTATION_WATER_CONNECTION" : "MUTATION_SEWERAGE_CONNECTION";
47923
+ const reqDetails = serviceType == "WATER" ? {
47924
+ WaterConnection: convertAppData,
47925
+ reconnectRequest: false,
47926
+ disconnectRequest: false
47927
+ } : {
47928
+ SewerageConnection: convertAppData,
47929
+ reconnectRequest: false,
47930
+ disconnectRequest: false
47931
+ };
47932
+ const _temp5 = function () {
47933
+ if (serviceType == "WATER") {
47934
+ const _temp2 = function () {
47935
+ if (waterMutation) {
47936
+ setIsEnableLoader(true);
47937
+ return Promise.resolve(waterMutation(reqDetails, {
47938
+ onError: (error, variables) => {
47939
+ var _error$response3, _error$response3$data, _error$response3$data2, _error$response4, _error$response4$data, _error$response4$data2;
47940
+ setIsEnableLoader(false);
47941
+ setShowToast({
47942
+ key: "error",
47943
+ 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
47944
+ });
47945
+ setTimeout(closeToastOfError, 5000);
47946
+ },
47947
+ onSuccess: function (data, variables) {
47948
+ try {
47949
+ var _data$WaterConnection, _data$WaterConnection2;
47950
+ clearSessionFormData();
47951
+ 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));
47952
+ return Promise.resolve();
47953
+ } catch (e) {
47954
+ return Promise.reject(e);
47955
+ }
47956
+ }
47957
+ })).then(function () {});
47958
+ }
47959
+ }();
47960
+ if (_temp2 && _temp2.then) return _temp2.then(function () {});
47961
+ }
47962
+ }();
47963
+ return _temp5 && _temp5.then ? _temp5.then(_temp6) : _temp6(_temp5);
47964
+ });
47965
+ }
47966
+ }();
47967
+ return Promise.resolve(_temp7 && _temp7.then ? _temp7.then(function () {}) : void 0);
47968
+ } catch (e) {
47969
+ return Promise.reject(e);
47970
+ }
47971
+ };
47972
+ const closeToastOfError = () => {
47973
+ setShowToast(null);
47974
+ };
47975
+ const closeToast = () => {
47976
+ setShowToast(null);
47977
+ };
47978
+ if (enabledLoader || isEnableLoader || isConfigLoading) {
47979
+ return /*#__PURE__*/React.createElement(Loader, null);
47980
+ }
47981
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
47982
+ style: {
47983
+ marginLeft: "15px"
47984
+ }
47985
+ }, /*#__PURE__*/React.createElement(Header, null, t(config.head))), /*#__PURE__*/React.createElement(FormComposer, {
47986
+ config: config.body,
47987
+ userType: "employee",
47988
+ onFormValueChange: onFormValueChange,
47989
+ label: t("CS_COMMON_SUBMIT"),
47990
+ onSubmit: onSubmit,
47991
+ defaultValues: sessionFormData,
47992
+ appData: appData
47993
+ }), showToast && /*#__PURE__*/React.createElement(Toast, {
47994
+ isDleteBtn: true,
47995
+ error: (showToast === null || showToast === void 0 ? void 0 : showToast.key) === "error" ? true : false,
47996
+ label: t(showToast === null || showToast === void 0 ? void 0 : showToast.message),
47997
+ onClose: closeToast
47998
+ }));
47999
+ };
48000
+
47424
48001
  const getPath$5 = (path, params) => {
47425
48002
  params && Object.keys(params).map(key => {
47426
48003
  path = path.replace(":" + key, params[key]);
@@ -47663,16 +48240,18 @@ const WSEditApplicationByConfig = () => {
47663
48240
  }),
47664
48241
  propertyDetails = _Digit$Hooks$pt$usePr.data;
47665
48242
  useEffect(() => {
47666
- if (!isConfigLoading) {
47667
- var _config$body;
48243
+ if (!isConfigLoading && newConfig && Array.isArray(newConfig)) {
47668
48244
  const config = newConfig.find(conf => conf.hideInCitizen && conf.isEditByConfig);
47669
- config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
47670
- let bodyDetails = [];
47671
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
47672
- if (data !== null && data !== void 0 && data.isEditByConfigConnection) bodyDetails.push(data);
47673
- });
47674
- config.body = bodyDetails;
47675
- setConfig(config);
48245
+ if (config) {
48246
+ var _config$body;
48247
+ config.head = "WS_APP_FOR_WATER_AND_SEWERAGE_EDIT_LABEL";
48248
+ let bodyDetails = [];
48249
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48250
+ if (data !== null && data !== void 0 && data.isEditByConfigConnection) bodyDetails.push(data);
48251
+ });
48252
+ config.body = bodyDetails;
48253
+ setConfig(config);
48254
+ }
47676
48255
  }
47677
48256
  }, [newConfig]);
47678
48257
  useEffect(() => {
@@ -48281,16 +48860,18 @@ const EditDisconnectionByConfig = () => {
48281
48860
  sessionFormData = _Digit$Hooks$useSessi[0],
48282
48861
  setSessionFormData = _Digit$Hooks$useSessi[1];
48283
48862
  useEffect(() => {
48284
- if (!isLoading && !isConfigLoading) {
48285
- var _config$body;
48863
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48286
48864
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48287
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48288
- let bodyDetails = [];
48289
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48290
- if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48291
- });
48292
- config.body = bodyDetails;
48293
- setConfig(config);
48865
+ if (config) {
48866
+ var _config$body;
48867
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48868
+ let bodyDetails = [];
48869
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48870
+ if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48871
+ });
48872
+ config.body = bodyDetails;
48873
+ setConfig(config);
48874
+ }
48294
48875
  }
48295
48876
  }, [applicationDetails, isLoading, newConfig]);
48296
48877
  useEffect(function () {
@@ -48415,16 +48996,18 @@ const EditDisconnectionByConfig$1 = () => {
48415
48996
  sessionFormData = _Digit$Hooks$useSessi[0],
48416
48997
  setSessionFormData = _Digit$Hooks$useSessi[1];
48417
48998
  useEffect(() => {
48418
- if (!isLoading && !isConfigLoading) {
48419
- var _config$body;
48999
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48420
49000
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48421
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48422
- let bodyDetails = [];
48423
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48424
- if (data !== null && data !== void 0 && data.isDisonnectionEditByConfig) bodyDetails.push(data);
48425
- });
48426
- config.body = bodyDetails;
48427
- setConfig(config);
49001
+ if (config) {
49002
+ var _config$body;
49003
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
49004
+ let bodyDetails = [];
49005
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
49006
+ if (data !== null && data !== void 0 && data.isDisonnectionEditByConfig) bodyDetails.push(data);
49007
+ });
49008
+ config.body = bodyDetails;
49009
+ setConfig(config);
49010
+ }
48428
49011
  }
48429
49012
  }, [applicationDetails, isLoading, newConfig]);
48430
49013
  useEffect(function () {
@@ -48554,16 +49137,18 @@ const ResubmitDisconnection = () => {
48554
49137
  const _Digit$Hooks$ws$useWS2 = Digit.Hooks.ws.useWSApplicationActions(serviceType),
48555
49138
  mutate = _Digit$Hooks$ws$useWS2.mutate;
48556
49139
  useEffect(() => {
48557
- if (!isLoading && !isConfigLoading) {
48558
- var _config$body;
49140
+ if (!isLoading && !isConfigLoading && newConfig && Array.isArray(newConfig)) {
48559
49141
  const config = newConfig.find(conf => conf.isDisonnectionEdit);
48560
- config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
48561
- let bodyDetails = [];
48562
- config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
48563
- if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
48564
- });
48565
- config.body = bodyDetails;
48566
- setConfig(config);
49142
+ if (config) {
49143
+ var _config$body;
49144
+ config.head = "WS_WATER_SEWERAGE_DISCONNECTION_EDIT_LABEL";
49145
+ let bodyDetails = [];
49146
+ config === null || config === void 0 ? void 0 : (_config$body = config.body) === null || _config$body === void 0 ? void 0 : _config$body.forEach(data => {
49147
+ if (data !== null && data !== void 0 && data.isDisonnectionEdit) bodyDetails.push(data);
49148
+ });
49149
+ config.body = bodyDetails;
49150
+ setConfig(config);
49151
+ }
48567
49152
  }
48568
49153
  }, [applicationDetails, isLoading, newConfig]);
48569
49154
  useEffect(function () {
@@ -49707,7 +50292,7 @@ const OLDApplication = () => {
49707
50292
  withoutLabel: true,
49708
50293
  isAutomaticFill: true,
49709
50294
  texts: {
49710
- header: "PT_LOCATION_DETAILS " + t("(Automatic Fill by Property)")
50295
+ header: "" + t("PT_LOCATION_DETAILS_AUTOMATIC_FILL_BY_PROPERTY")
49711
50296
  },
49712
50297
  defaultOpen: false
49713
50298
  }]
@@ -50349,6 +50934,7 @@ const componentsToRegister = {
50349
50934
  WSConsumptionDetails: ConsumptionDetails,
50350
50935
  WSModifyApplication: ModifyApplication,
50351
50936
  WSEditModifyApplication: EditModifyApplication,
50937
+ WSMutationApplication: MutationApplication,
50352
50938
  WSDisconnectionApplication: DisconnectionApplication,
50353
50939
  WSRestorationApplication: DisconnectionApplication$1,
50354
50940
  WSEditApplicationByConfig: WSEditApplicationByConfig,