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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1856,6 +1856,29 @@ const checkForNA = function (value) {
1856
1856
  }
1857
1857
  return value && value != null && value !== undefined && value !== "" && value !== "Image" ? value : " NA";
1858
1858
  };
1859
+ const WSCalculationPayload = (data, tenantId) => {
1860
+ var _useDetails$colonyNam, _useDetails$categoryT, _useDetails$propertyC, _useDetails$propertyT, _useDetails$propertyC2, _useDetails$WaterConn, _useDetails$noOfFloor;
1861
+ const useDetails = (data === null || data === void 0 ? void 0 : data.useDetails) || data || {};
1862
+ const payload = {
1863
+ connectionType: (data === null || data === void 0 ? void 0 : data.connectionType) || "METERED",
1864
+ colonyCategory: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$colonyNam = useDetails.colonyName) === null || _useDetails$colonyNam === void 0 ? void 0 : _useDetails$colonyNam.code) || (useDetails === null || useDetails === void 0 ? void 0 : useDetails.colonyCategory) || "",
1865
+ categoryType: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$categoryT = useDetails.categoryType) === null || _useDetails$categoryT === void 0 ? void 0 : _useDetails$categoryT.code) || "",
1866
+ propertyCategory: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC = useDetails.propertyCategory) === null || _useDetails$propertyC === void 0 ? void 0 : _useDetails$propertyC.code) || "",
1867
+ propertyType: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyT = useDetails.propertyType) === null || _useDetails$propertyT === void 0 ? void 0 : _useDetails$propertyT.code) || "",
1868
+ usageCategory: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$propertyC2 = useDetails.propertyCategory) === null || _useDetails$propertyC2 === void 0 ? void 0 : _useDetails$propertyC2.code) || "",
1869
+ waterConnectionUsageType: (useDetails === null || useDetails === void 0 ? void 0 : (_useDetails$WaterConn = useDetails.WaterConnectionUsageType) === null || _useDetails$WaterConn === void 0 ? void 0 : _useDetails$WaterConn.code) || "",
1870
+ landArea: useDetails !== null && useDetails !== void 0 && useDetails.plotArea ? Number(useDetails.plotArea) : 0,
1871
+ builtUpArea: useDetails !== null && useDetails !== void 0 && useDetails.builtUpArea ? Number(useDetails.builtUpArea) : 0,
1872
+ farArea: useDetails !== null && useDetails !== void 0 && useDetails.farArea ? Number(useDetails.farArea) : 0,
1873
+ numberOfFloors: useDetails !== null && useDetails !== void 0 && (_useDetails$noOfFloor = useDetails.noOfFloors) !== null && _useDetails$noOfFloor !== void 0 && _useDetails$noOfFloor.code ? Number(useDetails.noOfFloors.code) : 0,
1874
+ numberOfStudents: useDetails !== null && useDetails !== void 0 && useDetails.numberOfStudents ? Number(useDetails.numberOfStudents) : 0,
1875
+ numberOfBeds: useDetails !== null && useDetails !== void 0 && useDetails.numberOfBeds ? Number(useDetails.numberOfBeds) : 0
1876
+ };
1877
+ if (useDetails !== null && useDetails !== void 0 && useDetails.NumberofRooms) payload.numberOfRooms = Number(useDetails.NumberofRooms);
1878
+ if (useDetails !== null && useDetails !== void 0 && useDetails.NumberofDwellingUnits) payload.numberOfDwellingUnits = Number(useDetails.NumberofDwellingUnits);
1879
+ if (useDetails !== null && useDetails !== void 0 && useDetails.ServantQuartersRoom) payload.servantQuartersRoom = Number(useDetails.ServantQuartersRoom);
1880
+ return payload;
1881
+ };
1859
1882
 
1860
1883
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
1861
1884
 
@@ -9595,6 +9618,722 @@ const WSDisconnectionResponse$1 = props => {
9595
9618
  }))));
9596
9619
  };
9597
9620
 
9621
+ const _excluded = ["config", "onSelect", "formData", "formState", "setError", "clearErrors"];
9622
+ const colonyNameOptions = [{
9623
+ code: "A",
9624
+ name: "A"
9625
+ }, {
9626
+ code: "B",
9627
+ name: "B"
9628
+ }, {
9629
+ code: "C",
9630
+ name: "C"
9631
+ }, {
9632
+ code: "D",
9633
+ name: "D"
9634
+ }, {
9635
+ code: "E",
9636
+ name: "E"
9637
+ }, {
9638
+ code: "F",
9639
+ name: "F"
9640
+ }, {
9641
+ code: "G",
9642
+ name: "G"
9643
+ }, {
9644
+ code: "H",
9645
+ name: "H"
9646
+ }];
9647
+ const NUMBER_PATTERN = /^\d+$/;
9648
+ const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
9649
+ const WSCalculation = _ref => {
9650
+ 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;
9651
+ let config = _ref.config,
9652
+ onSelect = _ref.onSelect,
9653
+ formData = _ref.formData,
9654
+ setError = _ref.setError,
9655
+ clearErrors = _ref.clearErrors,
9656
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
9657
+ const _useForm = reactHookForm.useForm({
9658
+ defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config === null || config === void 0 ? void 0 : config.key]) || {
9659
+ useDetails: {
9660
+ propertyCategory: null,
9661
+ propertyType: null,
9662
+ WaterConnectionUsageType: null,
9663
+ plotArea: "",
9664
+ builtUpArea: "",
9665
+ farArea: "",
9666
+ NumberofDwellingUnits: "",
9667
+ NumberofRooms: "",
9668
+ numberOfBeds: "",
9669
+ numberOfStudents: "",
9670
+ ServantQuartersRoom: "",
9671
+ colonyName: ""
9672
+ }
9673
+ }
9674
+ }),
9675
+ control = _useForm.control,
9676
+ register = _useForm.register,
9677
+ errors = _useForm.formState.errors,
9678
+ watch = _useForm.watch,
9679
+ setValue = _useForm.setValue;
9680
+ const tenantId = Digit.ULBService.getCurrentTenantId();
9681
+ const _useTranslation = reactI18next.useTranslation(),
9682
+ t = _useTranslation.t;
9683
+ const _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSCalculater({
9684
+ tenantId
9685
+ }),
9686
+ calculateCharges = _Digit$Hooks$ws$useWS.mutate;
9687
+ const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "PropertyNewUsageType"]),
9688
+ ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
9689
+ const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
9690
+ wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
9691
+ const _useState = React.useState([]),
9692
+ categoryTypeList = _useState[0],
9693
+ setCategoryTypeList = _useState[1];
9694
+ const _useState2 = React.useState(null),
9695
+ calculationData = _useState2[0],
9696
+ setCalculationData = _useState2[1];
9697
+ React.useEffect(() => {
9698
+ var _wsServicesMastersDat;
9699
+ const categories = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat === void 0 ? void 0 : _wsServicesMastersDat.WsCategoryType) || [];
9700
+ categories.forEach(data => data.i18nKey = data.i18nKey || "WS_CATEGORY_" + data.code);
9701
+ setCategoryTypeList(categories);
9702
+ }, [wsServicesMastersData]);
9703
+ React.useEffect(() => {
9704
+ if (props.register) {
9705
+ props.register({
9706
+ name: "cpt"
9707
+ });
9708
+ }
9709
+ }, [props.register]);
9710
+ const formValue = watch();
9711
+ const watchCategoryType = watch("useDetails.categoryType");
9712
+ const watchPropertyType = watch("useDetails.propertyType");
9713
+ const watchPropertyCategory = watch("useDetails.propertyCategory");
9714
+ const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
9715
+ const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
9716
+ const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
9717
+ const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
9718
+ const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
9719
+ 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";
9720
+ const categoryOptions = React.useMemo(() => {
9721
+ var _ptServicesMastersDat, _ptServicesMastersDat2;
9722
+ let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat === void 0 ? void 0 : (_ptServicesMastersDat2 = _ptServicesMastersDat.PropertyCategory) === null || _ptServicesMastersDat2 === void 0 ? void 0 : _ptServicesMastersDat2.filter(item => item.active)) || [];
9723
+ if (watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code) {
9724
+ options = options.filter(item => item.type === watchCategoryType.code);
9725
+ }
9726
+ return options.map(item => ({
9727
+ code: item.code,
9728
+ name: item.name
9729
+ }));
9730
+ }, [ptServicesMastersData, watchCategoryType]);
9731
+ React.useEffect(() => {
9732
+ if (watchCategoryType && watchPropertyCategory) {
9733
+ const isCategoryValid = categoryOptions.some(opt => opt.code === watchPropertyCategory.code);
9734
+ if (!isCategoryValid) {
9735
+ setValue("useDetails.propertyCategory", null);
9736
+ }
9737
+ }
9738
+ }, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
9739
+ const propertyTypeOptions = React.useMemo(() => {
9740
+ var _ptServicesMastersDat3, _ptServicesMastersDat4;
9741
+ let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat3 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat3 === void 0 ? void 0 : (_ptServicesMastersDat4 = _ptServicesMastersDat3.PropertyType) === null || _ptServicesMastersDat4 === void 0 ? void 0 : _ptServicesMastersDat4.filter(item => item.active)) || [];
9742
+ if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
9743
+ var _watchPropertyCategor;
9744
+ if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
9745
+ options = options.filter(item => {
9746
+ var _item$type, _watchPropertyCategor2;
9747
+ return ((_item$type = item.type) === null || _item$type === void 0 ? void 0 : _item$type.toUpperCase()) === ((_watchPropertyCategor2 = watchPropertyCategory.code) === null || _watchPropertyCategor2 === void 0 ? void 0 : _watchPropertyCategor2.toUpperCase());
9748
+ });
9749
+ }
9750
+ }
9751
+ return options.map(item => ({
9752
+ code: item.code,
9753
+ name: item.name
9754
+ }));
9755
+ }, [ptServicesMastersData, watchPropertyCategory]);
9756
+ React.useEffect(() => {
9757
+ if (watchPropertyCategory && watchPropertyType) {
9758
+ const isTypeValid = propertyTypeOptions.some(opt => opt.code === watchPropertyType.code);
9759
+ if (!isTypeValid) {
9760
+ setValue("useDetails.propertyType", null);
9761
+ }
9762
+ }
9763
+ }, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
9764
+ const usageTypeOptions = React.useMemo(() => {
9765
+ var _ptServicesMastersDat5, _ptServicesMastersDat6;
9766
+ let options = (ptServicesMastersData === null || ptServicesMastersData === void 0 ? void 0 : (_ptServicesMastersDat5 = ptServicesMastersData.PropertyTax) === null || _ptServicesMastersDat5 === void 0 ? void 0 : (_ptServicesMastersDat6 = _ptServicesMastersDat5.PropertyNewUsageType) === null || _ptServicesMastersDat6 === void 0 ? void 0 : _ptServicesMastersDat6.filter(item => item.active)) || [];
9767
+ if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
9768
+ var _watchPropertyCategor3;
9769
+ if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
9770
+ options = options.filter(item => {
9771
+ var _item$type2, _watchPropertyCategor4;
9772
+ return ((_item$type2 = item.type) === null || _item$type2 === void 0 ? void 0 : _item$type2.toUpperCase()) === ((_watchPropertyCategor4 = watchPropertyCategory.code) === null || _watchPropertyCategor4 === void 0 ? void 0 : _watchPropertyCategor4.toUpperCase());
9773
+ });
9774
+ }
9775
+ }
9776
+ return options.map(item => ({
9777
+ code: item.code,
9778
+ name: item.name
9779
+ }));
9780
+ }, [ptServicesMastersData, watchPropertyCategory]);
9781
+ React.useEffect(() => {
9782
+ if (watchPropertyType && watchWaterConnectionUsageType) {
9783
+ const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
9784
+ if (!isUsageTypeValid) {
9785
+ setValue("useDetails.WaterConnectionUsageType", null);
9786
+ }
9787
+ }
9788
+ }, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
9789
+ const lastSentValue = React__default.useRef(null);
9790
+ React.useEffect(() => {
9791
+ if (!lodash.isEqual(lastSentValue.current, formValue)) {
9792
+ lastSentValue.current = lodash.cloneDeep(formValue);
9793
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(config === null || config === void 0 ? void 0 : config.key, formValue);
9794
+ }
9795
+ }, [formValue, config === null || config === void 0 ? void 0 : config.key, onSelect]);
9796
+ React.useEffect(() => {
9797
+ var _formData$cpt;
9798
+ if (formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details) {
9799
+ var _details$usageCategor, _details$landArea, _details$superBuiltUp;
9800
+ const details = formData.cpt.details;
9801
+ const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
9802
+ const catType = additionalDetails.categoryType || ((_details$usageCategor = details.usageCategory) !== null && _details$usageCategor !== void 0 && _details$usageCategor.includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
9803
+ setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => o.code === catType)) || null);
9804
+ setValue("useDetails.propertyCategory", (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => o.code === (additionalDetails.propertyCategory || details.usageCategory))) || null);
9805
+ setValue("useDetails.propertyType", (propertyTypeOptions === null || propertyTypeOptions === void 0 ? void 0 : propertyTypeOptions.find(o => o.code === (additionalDetails.propertyType || details.propertyType))) || null);
9806
+ setValue("useDetails.WaterConnectionUsageType", (usageTypeOptions === null || usageTypeOptions === void 0 ? void 0 : usageTypeOptions.find(o => o.code === additionalDetails.waterConnectionUsageType)) || null);
9807
+ setValue("useDetails.plotArea", additionalDetails.plotArea || (details === null || details === void 0 ? void 0 : (_details$landArea = details.landArea) === null || _details$landArea === void 0 ? void 0 : _details$landArea.toString()) || "");
9808
+ setValue("useDetails.builtUpArea", additionalDetails.builtUpArea || (details === null || details === void 0 ? void 0 : (_details$superBuiltUp = details.superBuiltUpArea) === null || _details$superBuiltUp === void 0 ? void 0 : _details$superBuiltUp.toString()) || "");
9809
+ setValue("useDetails.NumberofDwellingUnits", additionalDetails.numberOfDwellingUnits || additionalDetails.noOfDwellingUnits || (details === null || details === void 0 ? void 0 : details.noOfDwellingUnits) || "");
9810
+ setValue("useDetails.NumberofRooms", additionalDetails.numberOfRooms || additionalDetails.noOfRooms || (details === null || details === void 0 ? void 0 : details.noOfRooms) || "");
9811
+ setValue("useDetails.colonyName", additionalDetails.colonyName || "");
9812
+ } else if ((formData === null || formData === void 0 ? void 0 : formData.cpt) === null) {
9813
+ setValue("useDetails.categoryType", null);
9814
+ setValue("useDetails.propertyCategory", null);
9815
+ setValue("useDetails.propertyType", null);
9816
+ setValue("useDetails.WaterConnectionUsageType", null);
9817
+ setValue("useDetails.plotArea", "");
9818
+ setValue("useDetails.builtUpArea", "");
9819
+ setValue("useDetails.farArea", "");
9820
+ setValue("useDetails.NumberofDwellingUnits", "");
9821
+ setValue("useDetails.NumberofRooms", "");
9822
+ setValue("useDetails.numberOfBeds", "");
9823
+ setValue("useDetails.numberOfStudents", "");
9824
+ setValue("useDetails.ServantQuartersRoom", "");
9825
+ setValue("useDetails.colonyName", "");
9826
+ }
9827
+ }, [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, categoryTypeList, setValue]);
9828
+ const lastErrorState = React__default.useRef(null);
9829
+ React.useEffect(() => {
9830
+ const hasErrors = Object.keys(errors).length > 0;
9831
+ if (lastErrorState.current !== hasErrors) {
9832
+ lastErrorState.current = hasErrors;
9833
+ if (hasErrors) {
9834
+ if (setError) setError(config === null || config === void 0 ? void 0 : config.key, {
9835
+ type: "custom",
9836
+ message: "Validation failed"
9837
+ });
9838
+ } else {
9839
+ if (clearErrors) clearErrors(config === null || config === void 0 ? void 0 : config.key);
9840
+ }
9841
+ }
9842
+ }, [errors, config === null || config === void 0 ? void 0 : config.key, setError, clearErrors]);
9843
+ const errorStyle = {
9844
+ width: "70%",
9845
+ marginLeft: "30%",
9846
+ fontSize: "12px",
9847
+ marginTop: "-21px"
9848
+ };
9849
+ const isMobile = window.Digit.Utils.browser.isMobile();
9850
+ const handleSubmit = () => {
9851
+ const payload = WSCalculationPayload(formValue);
9852
+ calculateCharges(payload, {
9853
+ onSuccess: data => {
9854
+ setCalculationData(data);
9855
+ onSelect === null || onSelect === void 0 ? void 0 : onSelect(config === null || config === void 0 ? void 0 : config.key, _extends({}, formValue, {
9856
+ payload,
9857
+ calculationResponse: data
9858
+ }));
9859
+ },
9860
+ onError: error => {
9861
+ var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
9862
+ if (setError) setError(config === null || config === void 0 ? void 0 : config.key, {
9863
+ type: "custom",
9864
+ message: (error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : (_error$response$data$ = _error$response$data.Errors) === null || _error$response$data$ === void 0 ? void 0 : (_error$response$data$2 = _error$response$data$[0]) === null || _error$response$data$2 === void 0 ? void 0 : _error$response$data$2.message) || t("WS_CALCULATION_FAILED")
9865
+ });
9866
+ }
9867
+ });
9868
+ };
9869
+ const RenderCalculationDetails = _ref2 => {
9870
+ var _data$Calculation, _calc$calculationDeta, _calc$calculationDeta2, _calc$calculationDeta3, _waterDemandDetail$co, _infraDetail$waterCom, _infraDetail$sewerCom, _infraDetail$grossIFC, _infraDetail$rebateAm, _infraDetail$netIFC;
9871
+ let data = _ref2.data;
9872
+ if (!data) return null;
9873
+ const calc = (_data$Calculation = data.Calculation) === null || _data$Calculation === void 0 ? void 0 : _data$Calculation[0];
9874
+ if (!calc) return null;
9875
+ const propertyDetail = ((_calc$calculationDeta = calc.calculationDetail) === null || _calc$calculationDeta === void 0 ? void 0 : _calc$calculationDeta.propertyDetail) || {};
9876
+ const waterDemandDetail = ((_calc$calculationDeta2 = calc.calculationDetail) === null || _calc$calculationDeta2 === void 0 ? void 0 : _calc$calculationDeta2.waterDemandDetail) || {};
9877
+ const infraDetail = ((_calc$calculationDeta3 = calc.calculationDetail) === null || _calc$calculationDeta3 === void 0 ? void 0 : _calc$calculationDeta3.infrastructureChargeDetail) || {};
9878
+ const taxHeadEstimates = calc.taxHeadEstimates || [];
9879
+ const totalAmount = calc.totalAmount;
9880
+ return /*#__PURE__*/React__default.createElement("div", {
9881
+ className: "ws-calc-details-wrapper"
9882
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("div", {
9883
+ className: "ws-calc-detail-card"
9884
+ }, /*#__PURE__*/React__default.createElement("div", {
9885
+ className: "ws-calc-detail-card-header"
9886
+ }, /*#__PURE__*/React__default.createElement("span", {
9887
+ className: "ws-calc-detail-card-badge"
9888
+ }, "1"), /*#__PURE__*/React__default.createElement("h3", {
9889
+ className: "ws-calc-detail-card-title"
9890
+ }, t("WS_PROPERTY_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
9891
+ className: "ws-calc-property-box"
9892
+ }, /*#__PURE__*/React__default.createElement("div", {
9893
+ className: "ws-calc-grid-3"
9894
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9895
+ className: "ws-calc-label"
9896
+ }, t("WS_PROPERTY_TYPE")), /*#__PURE__*/React__default.createElement("div", {
9897
+ className: "ws-calc-value"
9898
+ }, propertyDetail.propertyType || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9899
+ className: "ws-calc-label"
9900
+ }, t("WS_PROPERTY_CATEGORY")), /*#__PURE__*/React__default.createElement("div", {
9901
+ className: "ws-calc-value"
9902
+ }, propertyDetail.usageCategory || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9903
+ className: "ws-calc-label"
9904
+ }, t("WS_WATER_CONNECTION_USAGE_TYPE")), /*#__PURE__*/React__default.createElement("div", {
9905
+ className: "ws-calc-value"
9906
+ }, propertyDetail.usageCategory || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9907
+ className: "ws-calc-label"
9908
+ }, t("WS_COLONY_CATEGORY")), /*#__PURE__*/React__default.createElement("div", {
9909
+ className: "ws-calc-pill"
9910
+ }, propertyDetail.colonyCategory || "-"))), /*#__PURE__*/React__default.createElement("hr", {
9911
+ className: "ws-calc-hr"
9912
+ }), /*#__PURE__*/React__default.createElement("div", {
9913
+ className: "ws-calc-grid-4"
9914
+ }, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9915
+ className: "ws-calc-label"
9916
+ }, t("WS_LAND_AREA")), /*#__PURE__*/React__default.createElement("div", {
9917
+ className: "ws-calc-value"
9918
+ }, propertyDetail.landArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9919
+ className: "ws-calc-label"
9920
+ }, t("WS_FAR_AREA")), /*#__PURE__*/React__default.createElement("div", {
9921
+ className: "ws-calc-value"
9922
+ }, propertyDetail.farArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
9923
+ className: "ws-calc-label"
9924
+ }, t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
9925
+ className: "ws-calc-value"
9926
+ }, ((_waterDemandDetail$co = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co === void 0 ? void 0 : _waterDemandDetail$co.built_up_area) || 0, " sq. m."))))), /*#__PURE__*/React__default.createElement("div", {
9927
+ className: "ws-calc-detail-card"
9928
+ }, /*#__PURE__*/React__default.createElement("div", {
9929
+ className: "ws-calc-detail-card-header"
9930
+ }, /*#__PURE__*/React__default.createElement("span", {
9931
+ className: "ws-calc-detail-card-badge"
9932
+ }, "2"), /*#__PURE__*/React__default.createElement("h3", {
9933
+ className: "ws-calc-detail-card-title"
9934
+ }, t("WS_WATER_DEMAND_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
9935
+ className: "ws-calc-split-card"
9936
+ }, /*#__PURE__*/React__default.createElement("div", {
9937
+ className: "ws-calc-split-left"
9938
+ }, /*#__PURE__*/React__default.createElement("div", {
9939
+ className: "ws-calc-row"
9940
+ }, /*#__PURE__*/React__default.createElement("span", {
9941
+ className: "ws-calc-row-label"
9942
+ }, t("WS_MATCHED_NORM_CODE")), /*#__PURE__*/React__default.createElement("span", {
9943
+ className: "ws-calc-row-value"
9944
+ }, waterDemandDetail.matchedNormCode || "-")), /*#__PURE__*/React__default.createElement("div", {
9945
+ className: "ws-calc-row"
9946
+ }, /*#__PURE__*/React__default.createElement("span", {
9947
+ className: "ws-calc-row-label"
9948
+ }, t("WS_MATCHED_NORM_NAME")), /*#__PURE__*/React__default.createElement("span", {
9949
+ className: "ws-calc-row-value-right"
9950
+ }, waterDemandDetail.matchedNormName || "-")), /*#__PURE__*/React__default.createElement("div", {
9951
+ className: "ws-calc-row"
9952
+ }, /*#__PURE__*/React__default.createElement("span", {
9953
+ className: "ws-calc-row-label"
9954
+ }, t("WS_FORMULA_USED")), /*#__PURE__*/React__default.createElement("span", {
9955
+ className: "ws-calc-row-value"
9956
+ }, waterDemandDetail.formulaUsed || "-")), /*#__PURE__*/React__default.createElement("div", {
9957
+ className: "ws-calc-row"
9958
+ }, /*#__PURE__*/React__default.createElement("span", {
9959
+ className: "ws-calc-row-label"
9960
+ }, t("WS_CALCULATED_OCCUPANCY")), /*#__PURE__*/React__default.createElement("span", {
9961
+ className: "ws-calc-row-value"
9962
+ }, waterDemandDetail.calculatedOccupancy || 0, " Persons")), /*#__PURE__*/React__default.createElement("div", {
9963
+ className: "ws-calc-row-last"
9964
+ }, /*#__PURE__*/React__default.createElement("span", {
9965
+ className: "ws-calc-row-label"
9966
+ }, t("WS_LPCD_SELECTED")), /*#__PURE__*/React__default.createElement("span", {
9967
+ className: "ws-calc-row-value"
9968
+ }, waterDemandDetail.chosenLpcd || 0, " LPD"))), /*#__PURE__*/React__default.createElement("div", {
9969
+ className: "ws-calc-split-right"
9970
+ }, /*#__PURE__*/React__default.createElement("div", {
9971
+ className: "ws-calc-row"
9972
+ }, /*#__PURE__*/React__default.createElement("span", {
9973
+ className: "ws-calc-row-label"
9974
+ }, t("WS_BASE_DEMAND")), /*#__PURE__*/React__default.createElement("span", {
9975
+ className: "ws-calc-row-value"
9976
+ }, waterDemandDetail.baseDemand || 0, " L/day")), /*#__PURE__*/React__default.createElement("div", {
9977
+ className: "ws-calc-row",
9978
+ style: {
9979
+ marginBottom: "24px"
9980
+ }
9981
+ }, /*#__PURE__*/React__default.createElement("span", {
9982
+ className: "ws-calc-row-label"
9983
+ }, t("WS_CONTINGENCY")), /*#__PURE__*/React__default.createElement("span", {
9984
+ className: "ws-calc-row-value"
9985
+ }, waterDemandDetail.contingencyPercentage || 0, "%")), /*#__PURE__*/React__default.createElement("div", {
9986
+ className: "ws-calc-highlight-blue"
9987
+ }, /*#__PURE__*/React__default.createElement("span", {
9988
+ className: "ws-calc-highlight-blue-label"
9989
+ }, t("WS_TOTAL_WATER_DEMAND")), /*#__PURE__*/React__default.createElement("span", {
9990
+ className: "ws-calc-highlight-blue-value"
9991
+ }, waterDemandDetail.totalWaterDemandLPD || 0, " L/day"))))), /*#__PURE__*/React__default.createElement("div", {
9992
+ className: "ws-calc-detail-card"
9993
+ }, /*#__PURE__*/React__default.createElement("div", {
9994
+ className: "ws-calc-detail-card-header"
9995
+ }, /*#__PURE__*/React__default.createElement("span", {
9996
+ className: "ws-calc-detail-card-badge"
9997
+ }, "3"), /*#__PURE__*/React__default.createElement("h3", {
9998
+ className: "ws-calc-detail-card-title"
9999
+ }, t("WS_INFRASTRUCTURE_CHARGE_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
10000
+ className: "ws-calc-split-card"
10001
+ }, /*#__PURE__*/React__default.createElement("div", {
10002
+ className: "ws-calc-split-left"
10003
+ }, /*#__PURE__*/React__default.createElement("div", {
10004
+ className: "ws-calc-row"
10005
+ }, /*#__PURE__*/React__default.createElement("span", {
10006
+ className: "ws-calc-row-label"
10007
+ }, t("WS_COLONY_CATEGORY")), /*#__PURE__*/React__default.createElement("span", {
10008
+ className: "ws-calc-row-value"
10009
+ }, infraDetail.colonyCategory || "-")), /*#__PURE__*/React__default.createElement("div", {
10010
+ className: "ws-calc-row"
10011
+ }, /*#__PURE__*/React__default.createElement("span", {
10012
+ className: "ws-calc-row-label"
10013
+ }, t("WS_PLOT_AREA")), /*#__PURE__*/React__default.createElement("span", {
10014
+ className: "ws-calc-row-value"
10015
+ }, infraDetail.plotArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", {
10016
+ className: "ws-calc-row"
10017
+ }, /*#__PURE__*/React__default.createElement("span", {
10018
+ className: "ws-calc-row-label"
10019
+ }, t("WS_MINIMUM_PLOT_AREA")), /*#__PURE__*/React__default.createElement("span", {
10020
+ className: "ws-calc-row-value"
10021
+ }, infraDetail.minimumPlotArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", {
10022
+ className: "ws-calc-row"
10023
+ }, /*#__PURE__*/React__default.createElement("span", {
10024
+ className: "ws-calc-row-label"
10025
+ }, t("WS_WATER_RATE")), /*#__PURE__*/React__default.createElement("span", {
10026
+ className: "ws-calc-row-value"
10027
+ }, "\u20B9 ", infraDetail.waterRatePerLPD || 0, " / LPD")), /*#__PURE__*/React__default.createElement("div", {
10028
+ className: "ws-calc-row-last"
10029
+ }, /*#__PURE__*/React__default.createElement("span", {
10030
+ className: "ws-calc-row-label"
10031
+ }, t("WS_SEWER_RATE")), /*#__PURE__*/React__default.createElement("span", {
10032
+ className: "ws-calc-row-value"
10033
+ }, "\u20B9 ", infraDetail.sewerRatePerLPD || 0, " / LPD"))), /*#__PURE__*/React__default.createElement("div", {
10034
+ className: "ws-calc-split-right"
10035
+ }, /*#__PURE__*/React__default.createElement("div", {
10036
+ className: "ws-calc-row"
10037
+ }, /*#__PURE__*/React__default.createElement("span", {
10038
+ className: "ws-calc-row-label"
10039
+ }, t("WS_WATER_COMPONENT_IFC")), /*#__PURE__*/React__default.createElement("span", {
10040
+ className: "ws-calc-row-value"
10041
+ }, "\u20B9 ", ((_infraDetail$waterCom = infraDetail.waterComponentIFC) === null || _infraDetail$waterCom === void 0 ? void 0 : _infraDetail$waterCom.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
10042
+ className: "ws-calc-row"
10043
+ }, /*#__PURE__*/React__default.createElement("span", {
10044
+ className: "ws-calc-row-label"
10045
+ }, t("WS_SEWER_COMPONENT_IFC")), /*#__PURE__*/React__default.createElement("span", {
10046
+ className: "ws-calc-row-value"
10047
+ }, "\u20B9 ", ((_infraDetail$sewerCom = infraDetail.sewerComponentIFC) === null || _infraDetail$sewerCom === void 0 ? void 0 : _infraDetail$sewerCom.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
10048
+ className: "ws-calc-row"
10049
+ }, /*#__PURE__*/React__default.createElement("span", {
10050
+ className: "ws-calc-row-label"
10051
+ }, t("WS_GROSS_IFC")), /*#__PURE__*/React__default.createElement("span", {
10052
+ className: "ws-calc-row-value"
10053
+ }, "\u20B9 ", ((_infraDetail$grossIFC = infraDetail.grossIFC) === null || _infraDetail$grossIFC === void 0 ? void 0 : _infraDetail$grossIFC.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
10054
+ className: "ws-calc-row"
10055
+ }, /*#__PURE__*/React__default.createElement("span", {
10056
+ className: "ws-calc-row-label"
10057
+ }, t("WS_REBATE"), " (", infraDetail.rebatePercentage || 0, "%)"), /*#__PURE__*/React__default.createElement("span", {
10058
+ className: "ws-calc-row-value-red"
10059
+ }, "- \u20B9 ", ((_infraDetail$rebateAm = infraDetail.rebateAmount) === null || _infraDetail$rebateAm === void 0 ? void 0 : _infraDetail$rebateAm.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
10060
+ className: "ws-calc-highlight-green"
10061
+ }, /*#__PURE__*/React__default.createElement("span", {
10062
+ className: "ws-calc-highlight-green-label"
10063
+ }, t("WS_NET_INFRASTRUCTURE_CHARGE")), /*#__PURE__*/React__default.createElement("span", {
10064
+ className: "ws-calc-highlight-green-value"
10065
+ }, "\u20B9 ", ((_infraDetail$netIFC = infraDetail.netIFC) === null || _infraDetail$netIFC === void 0 ? void 0 : _infraDetail$netIFC.toLocaleString("en-IN")) || 0))))), /*#__PURE__*/React__default.createElement("div", {
10066
+ className: "ws-calc-detail-card",
10067
+ style: {
10068
+ marginBottom: "0"
10069
+ }
10070
+ }, /*#__PURE__*/React__default.createElement("div", {
10071
+ className: "ws-calc-detail-card-header"
10072
+ }, /*#__PURE__*/React__default.createElement("span", {
10073
+ className: "ws-calc-detail-card-badge"
10074
+ }, "4"), /*#__PURE__*/React__default.createElement("h3", {
10075
+ className: "ws-calc-detail-card-title"
10076
+ }, t("WS_FEE_SUMMARY"))), /*#__PURE__*/React__default.createElement("div", {
10077
+ className: "ws-calc-split-card",
10078
+ style: {
10079
+ marginBottom: "0"
10080
+ }
10081
+ }, /*#__PURE__*/React__default.createElement("div", {
10082
+ className: "ws-calc-split-left",
10083
+ style: {
10084
+ display: "flex",
10085
+ flexDirection: "column",
10086
+ justifyContent: "center"
10087
+ }
10088
+ }, taxHeadEstimates.map((taxHead, index) => {
10089
+ var _taxHead$estimateAmou;
10090
+ return /*#__PURE__*/React__default.createElement("div", {
10091
+ key: index,
10092
+ className: "ws-calc-row"
10093
+ }, /*#__PURE__*/React__default.createElement("span", {
10094
+ className: "ws-calc-row-label"
10095
+ }, t(taxHead.taxHeadCode)), /*#__PURE__*/React__default.createElement("span", {
10096
+ className: "ws-calc-row-value"
10097
+ }, "\u20B9 ", (_taxHead$estimateAmou = taxHead.estimateAmount) === null || _taxHead$estimateAmou === void 0 ? void 0 : _taxHead$estimateAmou.toLocaleString("en-IN")));
10098
+ })), /*#__PURE__*/React__default.createElement("div", {
10099
+ className: "ws-calc-highlight-purple"
10100
+ }, /*#__PURE__*/React__default.createElement("span", {
10101
+ className: "ws-calc-highlight-purple-label"
10102
+ }, t("WS_TOTAL_AMOUNT_PAYABLE")), /*#__PURE__*/React__default.createElement("span", {
10103
+ className: "ws-calc-highlight-purple-value"
10104
+ }, "\u20B9 ", totalAmount === null || totalAmount === void 0 ? void 0 : totalAmount.toLocaleString("en-IN")))))));
10105
+ };
10106
+ return /*#__PURE__*/React__default.createElement("div", {
10107
+ className: "employee-form-section-wrapper"
10108
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
10109
+ config: [{
10110
+ timeLine: [{
10111
+ actions: t("WS_CALCULATION"),
10112
+ currentStep: 1
10113
+ }]
10114
+ }],
10115
+ showFinalStep: false
10116
+ }), /*#__PURE__*/React__default.createElement("div", {
10117
+ style: {
10118
+ flex: 1
10119
+ }
10120
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
10121
+ title: t("WS_CALCULATION"),
10122
+ defaultOpen: true,
10123
+ style: props.style
10124
+ }, /*#__PURE__*/React__default.createElement("div", {
10125
+ className: "formcomposer-section-grid"
10126
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_CATEGORY_TYPE") + "*"), /*#__PURE__*/React__default.createElement("div", {
10127
+ className: "form-field"
10128
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
10129
+ control: control,
10130
+ name: "useDetails.categoryType",
10131
+ rules: {
10132
+ required: t("REQUIRED_FIELD")
10133
+ },
10134
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
10135
+ option: categoryTypeList,
10136
+ optionKey: "i18nKey",
10137
+ selected: props.value,
10138
+ select: props.onChange,
10139
+ t: t,
10140
+ onBlur: props.onBlur
10141
+ })
10142
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails = errors.useDetails) === null || _errors$useDetails === void 0 ? void 0 : _errors$useDetails.categoryType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10143
+ style: errorStyle
10144
+ }, errors.useDetails.categoryType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_PROPERTY_CATEGORY") + "*"), /*#__PURE__*/React__default.createElement("div", {
10145
+ className: "form-field"
10146
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
10147
+ control: control,
10148
+ name: "useDetails.propertyCategory",
10149
+ rules: {
10150
+ required: t("REQUIRED_FIELD")
10151
+ },
10152
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
10153
+ option: categoryOptions,
10154
+ optionKey: "name",
10155
+ selected: props.value,
10156
+ select: props.onChange,
10157
+ t: t,
10158
+ onBlur: props.onBlur
10159
+ })
10160
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails2 = errors.useDetails) === null || _errors$useDetails2 === void 0 ? void 0 : _errors$useDetails2.propertyCategory) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10161
+ style: errorStyle
10162
+ }, errors.useDetails.propertyCategory.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_PROPERTY_TYPE") + "*"), /*#__PURE__*/React__default.createElement("div", {
10163
+ className: "form-field"
10164
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
10165
+ control: control,
10166
+ name: "useDetails.propertyType",
10167
+ rules: {
10168
+ required: t("REQUIRED_FIELD")
10169
+ },
10170
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
10171
+ option: propertyTypeOptions,
10172
+ optionKey: "name",
10173
+ selected: props.value,
10174
+ select: props.onChange,
10175
+ t: t,
10176
+ onBlur: props.onBlur
10177
+ })
10178
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails3 = errors.useDetails) === null || _errors$useDetails3 === void 0 ? void 0 : _errors$useDetails3.propertyType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10179
+ style: errorStyle
10180
+ }, errors.useDetails.propertyType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_WATER_CONNECTION_USAGE_TYPE") + "*"), /*#__PURE__*/React__default.createElement("div", {
10181
+ className: "form-field"
10182
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
10183
+ control: control,
10184
+ name: "useDetails.WaterConnectionUsageType",
10185
+ rules: {
10186
+ required: t("REQUIRED_FIELD")
10187
+ },
10188
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
10189
+ option: usageTypeOptions,
10190
+ optionKey: "name",
10191
+ selected: props.value,
10192
+ select: props.onChange,
10193
+ t: t,
10194
+ onBlur: props.onBlur
10195
+ })
10196
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails4 = errors.useDetails) === null || _errors$useDetails4 === void 0 ? void 0 : _errors$useDetails4.WaterConnectionUsageType) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10197
+ style: errorStyle
10198
+ }, errors.useDetails.WaterConnectionUsageType.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_COLONY_NAME") + "*"), /*#__PURE__*/React__default.createElement("div", {
10199
+ className: "form-field"
10200
+ }, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
10201
+ control: control,
10202
+ name: "useDetails.colonyName",
10203
+ rules: {
10204
+ required: t("REQUIRED_FIELD")
10205
+ },
10206
+ render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
10207
+ option: colonyNameOptions,
10208
+ optionKey: "name",
10209
+ selected: props.value,
10210
+ select: props.onChange,
10211
+ t: t,
10212
+ onBlur: props.onBlur
10213
+ })
10214
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails5 = errors.useDetails) === null || _errors$useDetails5 === void 0 ? void 0 : _errors$useDetails5.colonyName) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10215
+ style: errorStyle
10216
+ }, errors.useDetails.colonyName.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_PLOT_AREA")), /*#__PURE__*/React__default.createElement("div", {
10217
+ className: "form-field"
10218
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10219
+ t: t,
10220
+ inputRef: register({
10221
+ pattern: {
10222
+ value: DECIMAL_PATTERN,
10223
+ message: t("ERR_INVALID_DECIMAL")
10224
+ }
10225
+ }),
10226
+ name: "useDetails.plotArea"
10227
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails6 = errors.useDetails) === null || _errors$useDetails6 === void 0 ? void 0 : _errors$useDetails6.plotArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10228
+ style: errorStyle
10229
+ }, errors.useDetails.plotArea.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
10230
+ className: "form-field"
10231
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10232
+ t: t,
10233
+ inputRef: register({
10234
+ pattern: {
10235
+ value: DECIMAL_PATTERN,
10236
+ message: t("ERR_INVALID_DECIMAL")
10237
+ }
10238
+ }),
10239
+ name: "useDetails.builtUpArea"
10240
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails7 = errors.useDetails) === null || _errors$useDetails7 === void 0 ? void 0 : _errors$useDetails7.builtUpArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10241
+ style: errorStyle
10242
+ }, errors.useDetails.builtUpArea.message), /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_FAR_AREA")), /*#__PURE__*/React__default.createElement("div", {
10243
+ className: "form-field"
10244
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10245
+ t: t,
10246
+ inputRef: register({
10247
+ pattern: {
10248
+ value: DECIMAL_PATTERN,
10249
+ message: t("ERR_INVALID_DECIMAL")
10250
+ }
10251
+ }),
10252
+ name: "useDetails.farArea"
10253
+ }))), (errors === null || errors === void 0 ? void 0 : (_errors$useDetails8 = errors.useDetails) === null || _errors$useDetails8 === void 0 ? void 0 : _errors$useDetails8.farArea) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10254
+ style: errorStyle
10255
+ }, errors.useDetails.farArea.message), isDwellingUnit ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React__default.createElement("div", {
10256
+ className: "form-field"
10257
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10258
+ t: t,
10259
+ inputRef: register({
10260
+ pattern: {
10261
+ value: NUMBER_PATTERN,
10262
+ message: t("ERR_INVALID_NUMBER")
10263
+ }
10264
+ }),
10265
+ name: "useDetails.NumberofDwellingUnits"
10266
+ }))) : null, isDwellingUnit && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails9 = errors.useDetails) === null || _errors$useDetails9 === void 0 ? void 0 : _errors$useDetails9.NumberofDwellingUnits) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10267
+ style: errorStyle
10268
+ }, errors.useDetails.NumberofDwellingUnits.message), isHotelRestaurantProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_NUMBER_OF_ROOMS") + "*"), /*#__PURE__*/React__default.createElement("div", {
10269
+ className: "form-field"
10270
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10271
+ t: t,
10272
+ inputRef: register({
10273
+ pattern: {
10274
+ value: NUMBER_PATTERN,
10275
+ message: t("ERR_INVALID_NUMBER")
10276
+ },
10277
+ required: isHotelRestaurantProperty ? t("REQUIRED_FIELD") : false
10278
+ }),
10279
+ name: "useDetails.NumberofRooms"
10280
+ }))) : 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__default.createElement(digitUiReactComponents.CardLabelError, {
10281
+ style: errorStyle
10282
+ }, errors.useDetails.NumberofRooms.message), isHospitalProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_NUMBER_OF_BEDS") + "*"), /*#__PURE__*/React__default.createElement("div", {
10283
+ className: "form-field"
10284
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10285
+ t: t,
10286
+ inputRef: register({
10287
+ pattern: {
10288
+ value: NUMBER_PATTERN,
10289
+ message: t("ERR_INVALID_NUMBER")
10290
+ },
10291
+ required: isHospitalProperty ? t("REQUIRED_FIELD") : false
10292
+ }),
10293
+ name: "useDetails.numberOfBeds"
10294
+ }))) : null, isHospitalProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails1 = errors.useDetails) === null || _errors$useDetails1 === void 0 ? void 0 : _errors$useDetails1.numberOfBeds) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10295
+ style: errorStyle
10296
+ }, errors.useDetails.numberOfBeds.message), isSchoolCollegeProperty ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_NUMBER_OF_STUDENTS")), /*#__PURE__*/React__default.createElement("div", {
10297
+ className: "form-field"
10298
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10299
+ t: t,
10300
+ inputRef: register({
10301
+ pattern: {
10302
+ value: NUMBER_PATTERN,
10303
+ message: t("ERR_INVALID_NUMBER")
10304
+ }
10305
+ }),
10306
+ name: "useDetails.numberOfStudents"
10307
+ }))) : null, isSchoolCollegeProperty && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails10 = errors.useDetails) === null || _errors$useDetails10 === void 0 ? void 0 : _errors$useDetails10.numberOfStudents) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10308
+ style: errorStyle
10309
+ }, errors.useDetails.numberOfStudents.message), isServentHouse ? /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, "" + t("WS_SERVENT_HOUSE")), /*#__PURE__*/React__default.createElement("div", {
10310
+ className: "form-field"
10311
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
10312
+ t: t,
10313
+ inputRef: register({
10314
+ pattern: {
10315
+ value: NUMBER_PATTERN,
10316
+ message: t("ERR_INVALID_NUMBER")
10317
+ }
10318
+ }),
10319
+ name: "useDetails.ServantQuartersRoom"
10320
+ }))) : null, isServentHouse && (errors === null || errors === void 0 ? void 0 : (_errors$useDetails11 = errors.useDetails) === null || _errors$useDetails11 === void 0 ? void 0 : _errors$useDetails11.ServantQuartersRoom) && /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabelError, {
10321
+ style: errorStyle
10322
+ }, errors.useDetails.ServantQuartersRoom.message))), /*#__PURE__*/React__default.createElement("div", {
10323
+ style: {
10324
+ display: "flex",
10325
+ marginTop: "24px",
10326
+ marginBottom: "32px",
10327
+ justifyContent: isMobile ? "center" : "flex-end"
10328
+ }
10329
+ }, /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
10330
+ label: t("ES_COMMON_CALCULATE"),
10331
+ onSubmit: handleSubmit
10332
+ })), calculationData && /*#__PURE__*/React__default.createElement(RenderCalculationDetails, {
10333
+ data: calculationData
10334
+ })));
10335
+ };
10336
+
9598
10337
  const BILLSBreadCrumbs = _ref => {
9599
10338
  var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
9600
10339
  const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
@@ -10020,6 +10759,10 @@ const BILLSBreadCrumbs = _ref => {
10020
10759
  path: "/digit-ui/employee/ws/water/bulk-bil",
10021
10760
  label: t("CS_TITLE_BULK_BILL"),
10022
10761
  show: location.pathname.includes("/ws/water/bulk-bill") ? true : false
10762
+ }, {
10763
+ path: "/digit-ui/employee/ws/water/calculation",
10764
+ label: t("WS_CALCULATION"),
10765
+ show: location.pathname.includes("/ws/water/calculation") ? true : false
10023
10766
  }];
10024
10767
  let lastCrumbIndex = findLastIndex(crumbs, "show", true);
10025
10768
  crumbs[lastCrumbIndex] = _extends({}, crumbs[lastCrumbIndex], {
@@ -10277,6 +11020,11 @@ const App$1 = _ref2 => {
10277
11020
  component: props => /*#__PURE__*/React__default.createElement(WSBulkBillGeneration, _extends({}, props, {
10278
11021
  parentRoute: path
10279
11022
  }))
11023
+ }), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
11024
+ path: path + "/water/calculation",
11025
+ component: props => /*#__PURE__*/React__default.createElement(WSCalculation, _extends({}, props, {
11026
+ parentRoute: path
11027
+ }))
10280
11028
  }))))));
10281
11029
  };
10282
11030
 
@@ -20630,9 +21378,9 @@ const WSDjbEmployee = _ref => {
20630
21378
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, FormContent);
20631
21379
  };
20632
21380
 
20633
- const _excluded = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
20634
- const NUMBER_PATTERN = /^\d+$/;
20635
- const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
21381
+ const _excluded$1 = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
21382
+ const NUMBER_PATTERN$1 = /^\d+$/;
21383
+ const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
20636
21384
  const PropertyWaterConnection = _ref => {
20637
21385
  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;
20638
21386
  let t = _ref.t,
@@ -20641,7 +21389,7 @@ const PropertyWaterConnection = _ref => {
20641
21389
  formData = _ref.formData,
20642
21390
  setError = _ref.setError,
20643
21391
  clearErrors = _ref.clearErrors,
20644
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
21392
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
20645
21393
  const _useForm = reactHookForm.useForm({
20646
21394
  defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config.key]) || {
20647
21395
  useDetails: {
@@ -20957,7 +21705,7 @@ const PropertyWaterConnection = _ref => {
20957
21705
  t: t,
20958
21706
  inputRef: register({
20959
21707
  pattern: {
20960
- value: DECIMAL_PATTERN,
21708
+ value: DECIMAL_PATTERN$1,
20961
21709
  message: t("ERR_INVALID_DECIMAL")
20962
21710
  }
20963
21711
  }),
@@ -20971,7 +21719,7 @@ const PropertyWaterConnection = _ref => {
20971
21719
  t: t,
20972
21720
  inputRef: register({
20973
21721
  pattern: {
20974
- value: DECIMAL_PATTERN,
21722
+ value: DECIMAL_PATTERN$1,
20975
21723
  message: t("ERR_INVALID_DECIMAL")
20976
21724
  }
20977
21725
  }),
@@ -20985,7 +21733,7 @@ const PropertyWaterConnection = _ref => {
20985
21733
  t: t,
20986
21734
  inputRef: register({
20987
21735
  pattern: {
20988
- value: DECIMAL_PATTERN,
21736
+ value: DECIMAL_PATTERN$1,
20989
21737
  message: t("ERR_INVALID_DECIMAL")
20990
21738
  }
20991
21739
  }),
@@ -21018,7 +21766,7 @@ const PropertyWaterConnection = _ref => {
21018
21766
  t: t,
21019
21767
  inputRef: register({
21020
21768
  pattern: {
21021
- value: NUMBER_PATTERN,
21769
+ value: NUMBER_PATTERN$1,
21022
21770
  message: t("ERR_INVALID_NUMBER")
21023
21771
  }
21024
21772
  }),
@@ -21032,7 +21780,7 @@ const PropertyWaterConnection = _ref => {
21032
21780
  t: t,
21033
21781
  inputRef: register({
21034
21782
  pattern: {
21035
- value: NUMBER_PATTERN,
21783
+ value: NUMBER_PATTERN$1,
21036
21784
  message: t("ERR_INVALID_NUMBER")
21037
21785
  },
21038
21786
  required: isHotelRestaurantProperty ? t("REQUIRED_FIELD") : false
@@ -21047,7 +21795,7 @@ const PropertyWaterConnection = _ref => {
21047
21795
  t: t,
21048
21796
  inputRef: register({
21049
21797
  pattern: {
21050
- value: NUMBER_PATTERN,
21798
+ value: NUMBER_PATTERN$1,
21051
21799
  message: t("ERR_INVALID_NUMBER")
21052
21800
  },
21053
21801
  required: isHospitalProperty ? t("REQUIRED_FIELD") : false
@@ -21062,7 +21810,7 @@ const PropertyWaterConnection = _ref => {
21062
21810
  t: t,
21063
21811
  inputRef: register({
21064
21812
  pattern: {
21065
- value: NUMBER_PATTERN,
21813
+ value: NUMBER_PATTERN$1,
21066
21814
  message: t("ERR_INVALID_NUMBER")
21067
21815
  }
21068
21816
  }),
@@ -21076,7 +21824,7 @@ const PropertyWaterConnection = _ref => {
21076
21824
  t: t,
21077
21825
  inputRef: register({
21078
21826
  pattern: {
21079
- value: NUMBER_PATTERN,
21827
+ value: NUMBER_PATTERN$1,
21080
21828
  message: t("ERR_INVALID_NUMBER")
21081
21829
  }
21082
21830
  }),
@@ -22048,7 +22796,7 @@ const SearchFields = _ref => {
22048
22796
  }, t("CS_COMMON_CLEAR_SEARCH"))));
22049
22797
  };
22050
22798
 
22051
- const _excluded$1 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
22799
+ const _excluded$2 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
22052
22800
  _excluded2 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"];
22053
22801
  const MobileSearchApplication = _ref => {
22054
22802
  let Controller = _ref.Controller,
@@ -22095,7 +22843,7 @@ const MobileSearchApplication = _ref => {
22095
22843
  let currentlyActiveMobileModal = _ref2.currentlyActiveMobileModal,
22096
22844
  searchFormFieldsComponentProps = _ref2.searchFormFieldsComponentProps,
22097
22845
  tenantId = _ref2.tenantId,
22098
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$1);
22846
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
22099
22847
  const closeMobilePopupModal = props.closeMobilePopupModal;
22100
22848
  switch (currentlyActiveMobileModal) {
22101
22849
  case "SearchFormComponent":
@@ -22530,7 +23278,7 @@ const SearchFields$1 = _ref => {
22530
23278
  }, t("WS_SEARCH_CONNECTION_RESET_BUTTON"))));
22531
23279
  };
22532
23280
 
22533
- const _excluded$2 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
23281
+ const _excluded$3 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
22534
23282
  _excluded2$1 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"];
22535
23283
  const MobileSearchWater = _ref => {
22536
23284
  let Controller = _ref.Controller,
@@ -22575,7 +23323,7 @@ const MobileSearchWater = _ref => {
22575
23323
  let currentlyActiveMobileModal = _ref2.currentlyActiveMobileModal,
22576
23324
  searchFormFieldsComponentProps = _ref2.searchFormFieldsComponentProps,
22577
23325
  tenantId = _ref2.tenantId,
22578
- props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
23326
+ props = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
22579
23327
  const closeMobilePopupModal = props.closeMobilePopupModal;
22580
23328
  switch (currentlyActiveMobileModal) {
22581
23329
  case "SearchFormComponent":
@@ -23810,6 +24558,10 @@ const WSCard = () => {
23810
24558
  label: t("WS_WATER_APPLICATION_SEARCH"),
23811
24559
  link: "/digit-ui/employee/ws/water/search-application",
23812
24560
  roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
24561
+ }, {
24562
+ label: t("WS_CALCULATION"),
24563
+ link: "/digit-ui/employee/ws/water/calculation",
24564
+ roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
23813
24565
  }]
23814
24566
  };
23815
24567
  return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
@@ -29005,7 +29757,7 @@ const WSFeeEstimation = _ref => {
29005
29757
  };
29006
29758
 
29007
29759
  const ViewBreakup = _ref => {
29008
- var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
29760
+ var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
29009
29761
  let wsAdditionalDetails = _ref.wsAdditionalDetails,
29010
29762
  print = _ref.print,
29011
29763
  download = _ref.download;
@@ -29116,11 +29868,8 @@ const ViewBreakup = _ref => {
29116
29868
  title: t("WS_APPLICATION_FEE_HEADER"),
29117
29869
  values: amountRows([...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab = breakUpData.billSlabData) === null || _breakUpData$billSlab === void 0 ? void 0 : _breakUpData$billSlab.FEE) || []), ...((breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab2 = breakUpData.billSlabData) === null || _breakUpData$billSlab2 === void 0 ? void 0 : _breakUpData$billSlab2.CHARGES) || [])])
29118
29870
  }, {
29119
- title: "Taxes",
29120
- values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
29121
- }, {
29122
- title: "Water demand details",
29123
- values: waterDemandRows.map(_ref4 => {
29871
+ title: "Property details",
29872
+ values: propertyRows.map(_ref4 => {
29124
29873
  let label = _ref4.label,
29125
29874
  value = _ref4.value,
29126
29875
  currency = _ref4.currency,
@@ -29132,8 +29881,11 @@ const ViewBreakup = _ref => {
29132
29881
  };
29133
29882
  })
29134
29883
  }, {
29135
- title: "Infrastructure charge details",
29136
- values: infrastructureChargeRows.map(_ref5 => {
29884
+ title: "Taxes",
29885
+ values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
29886
+ }, {
29887
+ title: "Water demand details",
29888
+ values: waterDemandRows.map(_ref5 => {
29137
29889
  let label = _ref5.label,
29138
29890
  value = _ref5.value,
29139
29891
  currency = _ref5.currency,
@@ -29144,6 +29896,19 @@ const ViewBreakup = _ref => {
29144
29896
  value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29145
29897
  };
29146
29898
  })
29899
+ }, {
29900
+ title: "Infrastructure charge details",
29901
+ values: infrastructureChargeRows.map(_ref6 => {
29902
+ let label = _ref6.label,
29903
+ value = _ref6.value,
29904
+ currency = _ref6.currency,
29905
+ unit = _ref6.unit,
29906
+ isText = _ref6.isText;
29907
+ return {
29908
+ title: label,
29909
+ value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
29910
+ };
29911
+ })
29147
29912
  }, {
29148
29913
  title: "Total",
29149
29914
  values: [{
@@ -29185,8 +29950,58 @@ const ViewBreakup = _ref => {
29185
29950
  printWindow.focus();
29186
29951
  printWindow.print();
29187
29952
  };
29188
- const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.waterDemandDetail;
29189
- const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.infrastructureChargeDetail;
29953
+ const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
29954
+ const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
29955
+ const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
29956
+ const propertyRows = propertyDetail ? [{
29957
+ label: "Property ID",
29958
+ value: propertyDetail.propertyId,
29959
+ isText: true
29960
+ }, {
29961
+ label: "Property type",
29962
+ value: propertyDetail.propertyType,
29963
+ isText: true
29964
+ }, {
29965
+ label: "Plot area",
29966
+ value: propertyDetail.landArea,
29967
+ unit: " (sq. meter.)"
29968
+ }, {
29969
+ label: "Built-up area",
29970
+ value: propertyDetail.superBuiltUpArea,
29971
+ unit: " (sq. meter.)"
29972
+ }, {
29973
+ label: "farArea",
29974
+ value: propertyDetail.farArea,
29975
+ isText: true
29976
+ }, {
29977
+ label: "coveredArea",
29978
+ value: propertyDetail.coveredArea,
29979
+ isText: true
29980
+ }, {
29981
+ label: "numberOfDwellingUnits",
29982
+ value: propertyDetail.numberOfDwellingUnits,
29983
+ isText: true
29984
+ }, {
29985
+ label: "numberOfBeds",
29986
+ value: propertyDetail.numberOfBeds,
29987
+ isText: true
29988
+ }, {
29989
+ label: "numberOfRooms",
29990
+ value: propertyDetail.numberOfRooms,
29991
+ isText: true
29992
+ }, {
29993
+ label: "numberOfStudents",
29994
+ value: propertyDetail.numberOfStudents,
29995
+ isText: true
29996
+ }, {
29997
+ label: "numberOfStaff",
29998
+ value: propertyDetail.numberOfStaff,
29999
+ isText: true
30000
+ }, {
30001
+ label: "Usage category",
30002
+ value: propertyDetail.usageCategory,
30003
+ isText: true
30004
+ }] : [];
29190
30005
  const waterDemandRows = waterDemandDetail ? [{
29191
30006
  label: "Calculated occupancy",
29192
30007
  value: waterDemandDetail.calculatedOccupancy,
@@ -29328,6 +30143,12 @@ const ViewBreakup = _ref => {
29328
30143
  textStyle: {
29329
30144
  textAlign: "right"
29330
30145
  }
30146
+ })), propertyRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
30147
+ style: {
30148
+ margin: "10px 0px"
30149
+ }
30150
+ }, "Property details"), /*#__PURE__*/React__default.createElement(DetailRows, {
30151
+ rows: propertyRows
29331
30152
  })), waterDemandRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
29332
30153
  style: {
29333
30154
  margin: "10px 0px"
@@ -34057,7 +34878,7 @@ const WSPropertyLocationDetails = props => {
34057
34878
  return /*#__PURE__*/React__default.createElement(PropertyLocationDetails, props);
34058
34879
  };
34059
34880
 
34060
- const _excluded$3 = ["errors"],
34881
+ const _excluded$4 = ["errors"],
34061
34882
  _excluded2$2 = ["register", "control", "watch", "setValue", "unregister", "handleSubmit", "formState", "getValues", "reset"];
34062
34883
  const ApplicationBillAmendment = () => {
34063
34884
  var _data$BillingService, _data$BillingService$, _data$BillingService2, _data$BillingService3, _state, _state$data, _state$data$applicati, _state$data$applicati2, _state$data$applicati3, _billSearchData, _billSearchData$filte, _billSearchData2, _state9, _state9$data, _errors$WS_REDUCED_AM, _errors$WS_ADDITIONAL, _billSearchData3, _errors$effectiveTill, _errors$effectiveTill2, _state12, _state12$data;
@@ -34114,7 +34935,7 @@ const ApplicationBillAmendment = () => {
34114
34935
  handleSubmit = _useForm.handleSubmit,
34115
34936
  _useForm$formState = _useForm.formState,
34116
34937
  errors = _useForm$formState.errors,
34117
- rest = _objectWithoutPropertiesLoose(_useForm$formState, _excluded$3),
34938
+ rest = _objectWithoutPropertiesLoose(_useForm$formState, _excluded$4),
34118
34939
  getValues = _useForm.getValues,
34119
34940
  methods = _objectWithoutPropertiesLoose(_useForm, _excluded2$2);
34120
34941
  const _Digit$Hooks$ws$useAp = Digit.Hooks.ws.useApplicationActionsBillAmendUpdate(),
@@ -34979,8 +35800,8 @@ const DECLARATION_POINTS = ["I understand that sanction of connection does not a
34979
35800
  const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
34980
35801
  const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
34981
35802
  const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
34982
- const NUMBER_PATTERN$1 = /^\d+$/;
34983
- const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
35803
+ const NUMBER_PATTERN$2 = /^\d+$/;
35804
+ const DECIMAL_PATTERN$2 = /^\d+(\.\d{1,2})?$/;
34984
35805
  const IFSC_PATTERN = /^[A-Z]{4}0[A-Z0-9]{6}$/;
34985
35806
  const ACCOUNT_PATTERN = /^[0-9]{9,18}$/;
34986
35807
  const COLLAPSIBLE_CONTENT_TAB = "__WS_SECTION_CONTENT__";
@@ -37249,7 +38070,7 @@ const NewApplication = () => {
37249
38070
  errorStyle: !!getFieldError("useDetails.plotArea"),
37250
38071
  inputRef: register({
37251
38072
  pattern: {
37252
- value: DECIMAL_PATTERN$1,
38073
+ value: DECIMAL_PATTERN$2,
37253
38074
  message: "Enter a valid numeric value."
37254
38075
  },
37255
38076
  required: "Plot Area is required."
@@ -37263,7 +38084,7 @@ const NewApplication = () => {
37263
38084
  errorStyle: !!getFieldError("useDetails.builtUpArea"),
37264
38085
  inputRef: register({
37265
38086
  pattern: {
37266
- value: DECIMAL_PATTERN$1,
38087
+ value: DECIMAL_PATTERN$2,
37267
38088
  message: "Enter a valid numeric value."
37268
38089
  },
37269
38090
  required: "Built Up Area is required."
@@ -37294,7 +38115,7 @@ const NewApplication = () => {
37294
38115
  errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
37295
38116
  inputRef: register({
37296
38117
  pattern: {
37297
- value: DECIMAL_PATTERN$1,
38118
+ value: DECIMAL_PATTERN$2,
37298
38119
  message: "Enter a valid numeric value."
37299
38120
  },
37300
38121
  required: "Built Up Area is required."
@@ -37308,7 +38129,7 @@ const NewApplication = () => {
37308
38129
  errorStyle: !!getFieldError("useDetails.NumberofRooms"),
37309
38130
  inputRef: register({
37310
38131
  pattern: {
37311
- value: DECIMAL_PATTERN$1,
38132
+ value: DECIMAL_PATTERN$2,
37312
38133
  message: "Enter a valid numeric value."
37313
38134
  },
37314
38135
  required: "Built Up Area is required."
@@ -37322,7 +38143,7 @@ const NewApplication = () => {
37322
38143
  errorStyle: !!getFieldError("useDetails.hospitalBeds"),
37323
38144
  inputRef: register({
37324
38145
  pattern: {
37325
- value: NUMBER_PATTERN$1,
38146
+ value: NUMBER_PATTERN$2,
37326
38147
  message: "Enter a valid whole number."
37327
38148
  },
37328
38149
  required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false