@djb25/digit-ui-module-ws 1.0.50 → 1.0.52
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 +904 -35
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +905 -36
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
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,770 @@ 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
|
+
reset = _useForm.reset;
|
|
9681
|
+
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9682
|
+
const _useTranslation = reactI18next.useTranslation(),
|
|
9683
|
+
t = _useTranslation.t;
|
|
9684
|
+
const _Digit$Hooks$ws$useWS = Digit.Hooks.ws.useWSCalculater({
|
|
9685
|
+
tenantId
|
|
9686
|
+
}),
|
|
9687
|
+
calculateCharges = _Digit$Hooks$ws$useWS.mutate;
|
|
9688
|
+
const _Digit$Hooks$pt$usePr = Digit.Hooks.pt.usePropertyMDMS(tenantId, "PropertyTax", ["PropertyCategory", "PropertyType", "PropertyNewUsageType"]),
|
|
9689
|
+
ptServicesMastersData = _Digit$Hooks$pt$usePr.data;
|
|
9690
|
+
const _Digit$Hooks$ws$useMD = Digit.Hooks.ws.useMDMS(tenantId, "ws-services-masters", ["WsCategoryType"]),
|
|
9691
|
+
wsServicesMastersData = _Digit$Hooks$ws$useMD.data;
|
|
9692
|
+
const _useState = React.useState([]),
|
|
9693
|
+
categoryTypeList = _useState[0],
|
|
9694
|
+
setCategoryTypeList = _useState[1];
|
|
9695
|
+
const _useState2 = React.useState(null),
|
|
9696
|
+
calculationData = _useState2[0],
|
|
9697
|
+
setCalculationData = _useState2[1];
|
|
9698
|
+
React.useEffect(() => {
|
|
9699
|
+
var _wsServicesMastersDat;
|
|
9700
|
+
const categories = (wsServicesMastersData === null || wsServicesMastersData === void 0 ? void 0 : (_wsServicesMastersDat = wsServicesMastersData["ws-services-masters"]) === null || _wsServicesMastersDat === void 0 ? void 0 : _wsServicesMastersDat.WsCategoryType) || [];
|
|
9701
|
+
categories.forEach(data => data.i18nKey = data.i18nKey || "WS_CATEGORY_" + data.code);
|
|
9702
|
+
setCategoryTypeList(categories);
|
|
9703
|
+
}, [wsServicesMastersData]);
|
|
9704
|
+
React.useEffect(() => {
|
|
9705
|
+
if (props.register) {
|
|
9706
|
+
props.register({
|
|
9707
|
+
name: "cpt"
|
|
9708
|
+
});
|
|
9709
|
+
}
|
|
9710
|
+
}, [props.register]);
|
|
9711
|
+
const formValue = watch();
|
|
9712
|
+
const watchCategoryType = watch("useDetails.categoryType");
|
|
9713
|
+
const watchPropertyType = watch("useDetails.propertyType");
|
|
9714
|
+
const watchPropertyCategory = watch("useDetails.propertyCategory");
|
|
9715
|
+
const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
|
|
9716
|
+
const isHospitalProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOSPITAL_NURSING_HOME" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HospitalNursingHome";
|
|
9717
|
+
const isHotelRestaurantProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HOTEL_OR_RESTAURANT" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "HotelOrRestaurant";
|
|
9718
|
+
const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
|
|
9719
|
+
const isDwellingUnit = (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL" || (watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : watchPropertyCategory.code) === "RESIDENTIAL";
|
|
9720
|
+
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";
|
|
9721
|
+
const categoryOptions = React.useMemo(() => {
|
|
9722
|
+
var _ptServicesMastersDat, _ptServicesMastersDat2;
|
|
9723
|
+
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)) || [];
|
|
9724
|
+
if (watchCategoryType !== null && watchCategoryType !== void 0 && watchCategoryType.code) {
|
|
9725
|
+
options = options.filter(item => item.type === watchCategoryType.code);
|
|
9726
|
+
}
|
|
9727
|
+
return options.map(item => ({
|
|
9728
|
+
code: item.code,
|
|
9729
|
+
name: item.name
|
|
9730
|
+
}));
|
|
9731
|
+
}, [ptServicesMastersData, watchCategoryType]);
|
|
9732
|
+
React.useEffect(() => {
|
|
9733
|
+
if (watchCategoryType && watchPropertyCategory) {
|
|
9734
|
+
const isCategoryValid = categoryOptions.some(opt => opt.code === watchPropertyCategory.code);
|
|
9735
|
+
if (!isCategoryValid) {
|
|
9736
|
+
setValue("useDetails.propertyCategory", null);
|
|
9737
|
+
}
|
|
9738
|
+
}
|
|
9739
|
+
}, [watchCategoryType, categoryOptions, setValue, watchPropertyCategory]);
|
|
9740
|
+
const propertyTypeOptions = React.useMemo(() => {
|
|
9741
|
+
var _ptServicesMastersDat3, _ptServicesMastersDat4;
|
|
9742
|
+
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)) || [];
|
|
9743
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
9744
|
+
var _watchPropertyCategor;
|
|
9745
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor = watchPropertyCategory.code) === null || _watchPropertyCategor === void 0 ? void 0 : _watchPropertyCategor.toUpperCase()) !== "MIXED") {
|
|
9746
|
+
options = options.filter(item => {
|
|
9747
|
+
var _item$type, _watchPropertyCategor2;
|
|
9748
|
+
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());
|
|
9749
|
+
});
|
|
9750
|
+
}
|
|
9751
|
+
}
|
|
9752
|
+
return options.map(item => ({
|
|
9753
|
+
code: item.code,
|
|
9754
|
+
name: item.name
|
|
9755
|
+
}));
|
|
9756
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
9757
|
+
React.useEffect(() => {
|
|
9758
|
+
if (watchPropertyCategory && watchPropertyType) {
|
|
9759
|
+
const isTypeValid = propertyTypeOptions.some(opt => opt.code === watchPropertyType.code);
|
|
9760
|
+
if (!isTypeValid) {
|
|
9761
|
+
setValue("useDetails.propertyType", null);
|
|
9762
|
+
}
|
|
9763
|
+
}
|
|
9764
|
+
}, [watchPropertyCategory, propertyTypeOptions, setValue, watchPropertyType]);
|
|
9765
|
+
const usageTypeOptions = React.useMemo(() => {
|
|
9766
|
+
var _ptServicesMastersDat5, _ptServicesMastersDat6;
|
|
9767
|
+
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)) || [];
|
|
9768
|
+
if (watchPropertyCategory !== null && watchPropertyCategory !== void 0 && watchPropertyCategory.code) {
|
|
9769
|
+
var _watchPropertyCategor3;
|
|
9770
|
+
if ((watchPropertyCategory === null || watchPropertyCategory === void 0 ? void 0 : (_watchPropertyCategor3 = watchPropertyCategory.code) === null || _watchPropertyCategor3 === void 0 ? void 0 : _watchPropertyCategor3.toUpperCase()) !== "MIXED") {
|
|
9771
|
+
options = options.filter(item => {
|
|
9772
|
+
var _item$type2, _watchPropertyCategor4;
|
|
9773
|
+
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());
|
|
9774
|
+
});
|
|
9775
|
+
}
|
|
9776
|
+
}
|
|
9777
|
+
return options.map(item => ({
|
|
9778
|
+
code: item.code,
|
|
9779
|
+
name: item.name
|
|
9780
|
+
}));
|
|
9781
|
+
}, [ptServicesMastersData, watchPropertyCategory]);
|
|
9782
|
+
React.useEffect(() => {
|
|
9783
|
+
if (watchPropertyType && watchWaterConnectionUsageType) {
|
|
9784
|
+
const isUsageTypeValid = usageTypeOptions.some(opt => opt.code === watchWaterConnectionUsageType.code);
|
|
9785
|
+
if (!isUsageTypeValid) {
|
|
9786
|
+
setValue("useDetails.WaterConnectionUsageType", null);
|
|
9787
|
+
}
|
|
9788
|
+
}
|
|
9789
|
+
}, [watchPropertyType, usageTypeOptions, setValue, watchWaterConnectionUsageType]);
|
|
9790
|
+
const lastSentValue = React__default.useRef(null);
|
|
9791
|
+
React.useEffect(() => {
|
|
9792
|
+
if (!lodash.isEqual(lastSentValue.current, formValue)) {
|
|
9793
|
+
lastSentValue.current = lodash.cloneDeep(formValue);
|
|
9794
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(config === null || config === void 0 ? void 0 : config.key, formValue);
|
|
9795
|
+
}
|
|
9796
|
+
}, [formValue, config === null || config === void 0 ? void 0 : config.key, onSelect]);
|
|
9797
|
+
React.useEffect(() => {
|
|
9798
|
+
var _formData$cpt;
|
|
9799
|
+
if (formData !== null && formData !== void 0 && (_formData$cpt = formData.cpt) !== null && _formData$cpt !== void 0 && _formData$cpt.details) {
|
|
9800
|
+
var _details$usageCategor, _details$landArea, _details$superBuiltUp;
|
|
9801
|
+
const details = formData.cpt.details;
|
|
9802
|
+
const additionalDetails = (details === null || details === void 0 ? void 0 : details.additionalDetails) || {};
|
|
9803
|
+
const catType = additionalDetails.categoryType || ((_details$usageCategor = details.usageCategory) !== null && _details$usageCategor !== void 0 && _details$usageCategor.includes("RESIDENTIAL") ? "DOMESTIC" : "NON_DOMESTIC");
|
|
9804
|
+
setValue("useDetails.categoryType", (categoryTypeList === null || categoryTypeList === void 0 ? void 0 : categoryTypeList.find(o => o.code === catType)) || null);
|
|
9805
|
+
setValue("useDetails.propertyCategory", (categoryOptions === null || categoryOptions === void 0 ? void 0 : categoryOptions.find(o => o.code === (additionalDetails.propertyCategory || details.usageCategory))) || null);
|
|
9806
|
+
setValue("useDetails.propertyType", (propertyTypeOptions === null || propertyTypeOptions === void 0 ? void 0 : propertyTypeOptions.find(o => o.code === (additionalDetails.propertyType || details.propertyType))) || null);
|
|
9807
|
+
setValue("useDetails.WaterConnectionUsageType", (usageTypeOptions === null || usageTypeOptions === void 0 ? void 0 : usageTypeOptions.find(o => o.code === additionalDetails.waterConnectionUsageType)) || null);
|
|
9808
|
+
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()) || "");
|
|
9809
|
+
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()) || "");
|
|
9810
|
+
setValue("useDetails.NumberofDwellingUnits", additionalDetails.numberOfDwellingUnits || additionalDetails.noOfDwellingUnits || (details === null || details === void 0 ? void 0 : details.noOfDwellingUnits) || "");
|
|
9811
|
+
setValue("useDetails.NumberofRooms", additionalDetails.numberOfRooms || additionalDetails.noOfRooms || (details === null || details === void 0 ? void 0 : details.noOfRooms) || "");
|
|
9812
|
+
setValue("useDetails.colonyName", additionalDetails.colonyName || "");
|
|
9813
|
+
} else if ((formData === null || formData === void 0 ? void 0 : formData.cpt) === null) {
|
|
9814
|
+
setValue("useDetails.categoryType", null);
|
|
9815
|
+
setValue("useDetails.propertyCategory", null);
|
|
9816
|
+
setValue("useDetails.propertyType", null);
|
|
9817
|
+
setValue("useDetails.WaterConnectionUsageType", null);
|
|
9818
|
+
setValue("useDetails.plotArea", "");
|
|
9819
|
+
setValue("useDetails.builtUpArea", "");
|
|
9820
|
+
setValue("useDetails.farArea", "");
|
|
9821
|
+
setValue("useDetails.NumberofDwellingUnits", "");
|
|
9822
|
+
setValue("useDetails.NumberofRooms", "");
|
|
9823
|
+
setValue("useDetails.numberOfBeds", "");
|
|
9824
|
+
setValue("useDetails.numberOfStudents", "");
|
|
9825
|
+
setValue("useDetails.ServantQuartersRoom", "");
|
|
9826
|
+
setValue("useDetails.colonyName", "");
|
|
9827
|
+
}
|
|
9828
|
+
}, [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]);
|
|
9829
|
+
const lastErrorState = React__default.useRef(null);
|
|
9830
|
+
React.useEffect(() => {
|
|
9831
|
+
const hasErrors = Object.keys(errors).length > 0;
|
|
9832
|
+
if (lastErrorState.current !== hasErrors) {
|
|
9833
|
+
lastErrorState.current = hasErrors;
|
|
9834
|
+
if (hasErrors) {
|
|
9835
|
+
if (setError) setError(config === null || config === void 0 ? void 0 : config.key, {
|
|
9836
|
+
type: "custom",
|
|
9837
|
+
message: "Validation failed"
|
|
9838
|
+
});
|
|
9839
|
+
} else {
|
|
9840
|
+
if (clearErrors) clearErrors(config === null || config === void 0 ? void 0 : config.key);
|
|
9841
|
+
}
|
|
9842
|
+
}
|
|
9843
|
+
}, [errors, config === null || config === void 0 ? void 0 : config.key, setError, clearErrors]);
|
|
9844
|
+
const errorStyle = {
|
|
9845
|
+
width: "70%",
|
|
9846
|
+
marginLeft: "30%",
|
|
9847
|
+
fontSize: "12px",
|
|
9848
|
+
marginTop: "-21px"
|
|
9849
|
+
};
|
|
9850
|
+
const isMobile = window.Digit.Utils.browser.isMobile();
|
|
9851
|
+
const handleSubmit = () => {
|
|
9852
|
+
const payload = WSCalculationPayload(formValue);
|
|
9853
|
+
calculateCharges(payload, {
|
|
9854
|
+
onSuccess: data => {
|
|
9855
|
+
setCalculationData(data);
|
|
9856
|
+
onSelect === null || onSelect === void 0 ? void 0 : onSelect(config === null || config === void 0 ? void 0 : config.key, _extends({}, formValue, {
|
|
9857
|
+
payload,
|
|
9858
|
+
calculationResponse: data
|
|
9859
|
+
}));
|
|
9860
|
+
},
|
|
9861
|
+
onError: error => {
|
|
9862
|
+
var _error$response, _error$response$data, _error$response$data$, _error$response$data$2;
|
|
9863
|
+
if (setError) setError(config === null || config === void 0 ? void 0 : config.key, {
|
|
9864
|
+
type: "custom",
|
|
9865
|
+
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")
|
|
9866
|
+
});
|
|
9867
|
+
}
|
|
9868
|
+
});
|
|
9869
|
+
};
|
|
9870
|
+
const RenderCalculationDetails = _ref2 => {
|
|
9871
|
+
var _data$Calculation, _calc$calculationDeta, _calc$calculationDeta2, _calc$calculationDeta3, _waterDemandDetail$co, _waterDemandDetail$co2, _waterDemandDetail$co3, _waterDemandDetail$co4, _waterDemandDetail$co5, _waterDemandDetail$co6, _waterDemandDetail$co7, _waterDemandDetail$co8, _waterDemandDetail$co9, _waterDemandDetail$co0, _waterDemandDetail$co1, _waterDemandDetail$co10, _waterDemandDetail$co11, _waterDemandDetail$co12, _waterDemandDetail$co13, _waterDemandDetail$co14, _waterDemandDetail$co15, _waterDemandDetail$co16, _infraDetail$waterCom, _infraDetail$sewerCom, _infraDetail$grossIFC, _infraDetail$rebateAm, _infraDetail$netIFC;
|
|
9872
|
+
let data = _ref2.data;
|
|
9873
|
+
if (!data) return null;
|
|
9874
|
+
const calc = (_data$Calculation = data.Calculation) === null || _data$Calculation === void 0 ? void 0 : _data$Calculation[0];
|
|
9875
|
+
if (!calc) return null;
|
|
9876
|
+
const propertyDetail = ((_calc$calculationDeta = calc.calculationDetail) === null || _calc$calculationDeta === void 0 ? void 0 : _calc$calculationDeta.propertyDetail) || {};
|
|
9877
|
+
const waterDemandDetail = ((_calc$calculationDeta2 = calc.calculationDetail) === null || _calc$calculationDeta2 === void 0 ? void 0 : _calc$calculationDeta2.waterDemandDetail) || {};
|
|
9878
|
+
const infraDetail = ((_calc$calculationDeta3 = calc.calculationDetail) === null || _calc$calculationDeta3 === void 0 ? void 0 : _calc$calculationDeta3.infrastructureChargeDetail) || {};
|
|
9879
|
+
const taxHeadEstimates = calc.taxHeadEstimates || [];
|
|
9880
|
+
const totalAmount = calc.totalAmount;
|
|
9881
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
9882
|
+
className: "ws-calc-details-wrapper"
|
|
9883
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.Card, null, /*#__PURE__*/React__default.createElement("div", {
|
|
9884
|
+
className: "ws-calc-detail-card"
|
|
9885
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9886
|
+
className: "ws-calc-detail-card-header"
|
|
9887
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9888
|
+
className: "ws-calc-detail-card-badge"
|
|
9889
|
+
}, "1"), /*#__PURE__*/React__default.createElement("h3", {
|
|
9890
|
+
className: "ws-calc-detail-card-title"
|
|
9891
|
+
}, t("WS_PROPERTY_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
|
|
9892
|
+
className: "ws-calc-property-box"
|
|
9893
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9894
|
+
className: "ws-calc-grid-4"
|
|
9895
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9896
|
+
className: "ws-calc-label"
|
|
9897
|
+
}, t("WS_PROPERTY_TYPE")), /*#__PURE__*/React__default.createElement("div", {
|
|
9898
|
+
className: "ws-calc-value"
|
|
9899
|
+
}, propertyDetail.propertyType || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9900
|
+
className: "ws-calc-label"
|
|
9901
|
+
}, t("WS_PROPERTY_CATEGORY")), /*#__PURE__*/React__default.createElement("div", {
|
|
9902
|
+
className: "ws-calc-value"
|
|
9903
|
+
}, propertyDetail.usageCategory || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9904
|
+
className: "ws-calc-label"
|
|
9905
|
+
}, t("WS_WATER_CONNECTION_USAGE_TYPE")), /*#__PURE__*/React__default.createElement("div", {
|
|
9906
|
+
className: "ws-calc-value"
|
|
9907
|
+
}, propertyDetail.waterConnectionUsageType || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9908
|
+
className: "ws-calc-label"
|
|
9909
|
+
}, t("WS_COLONY_CATEGORY")), /*#__PURE__*/React__default.createElement("div", {
|
|
9910
|
+
className: "ws-calc-pill"
|
|
9911
|
+
}, propertyDetail.colonyCategory || "-"))), /*#__PURE__*/React__default.createElement("hr", {
|
|
9912
|
+
className: "ws-calc-hr"
|
|
9913
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
9914
|
+
className: "ws-calc-grid-4"
|
|
9915
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9916
|
+
className: "ws-calc-label"
|
|
9917
|
+
}, t("WS_LAND_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
9918
|
+
className: "ws-calc-value"
|
|
9919
|
+
}, propertyDetail.landArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9920
|
+
className: "ws-calc-label"
|
|
9921
|
+
}, t("WS_FAR_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
9922
|
+
className: "ws-calc-value"
|
|
9923
|
+
}, propertyDetail.farArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9924
|
+
className: "ws-calc-label"
|
|
9925
|
+
}, t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
9926
|
+
className: "ws-calc-value"
|
|
9927
|
+
}, ((_waterDemandDetail$co = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co === void 0 ? void 0 : _waterDemandDetail$co.built_up_area) || 0, " sq. m.")), (propertyDetail.coveredArea > 0 || ((_waterDemandDetail$co2 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co2 === void 0 ? void 0 : _waterDemandDetail$co2.covered_area) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9928
|
+
className: "ws-calc-label"
|
|
9929
|
+
}, t("WS_COVERED_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
9930
|
+
className: "ws-calc-value"
|
|
9931
|
+
}, propertyDetail.coveredArea || ((_waterDemandDetail$co3 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co3 === void 0 ? void 0 : _waterDemandDetail$co3.covered_area), " sq. m.")), (propertyDetail.numberOfDwellingUnits > 0 || ((_waterDemandDetail$co4 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co4 === void 0 ? void 0 : _waterDemandDetail$co4.dwelling_units) > 0 || ((_waterDemandDetail$co5 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co5 === void 0 ? void 0 : _waterDemandDetail$co5.total_du) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9932
|
+
className: "ws-calc-label"
|
|
9933
|
+
}, t("WS_NUMBER_OF_DWELLING_UNITS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9934
|
+
className: "ws-calc-value"
|
|
9935
|
+
}, propertyDetail.numberOfDwellingUnits || ((_waterDemandDetail$co6 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co6 === void 0 ? void 0 : _waterDemandDetail$co6.dwelling_units) || ((_waterDemandDetail$co7 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co7 === void 0 ? void 0 : _waterDemandDetail$co7.total_du))), (propertyDetail.numberOfBeds > 0 || ((_waterDemandDetail$co8 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co8 === void 0 ? void 0 : _waterDemandDetail$co8.total_beds) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9936
|
+
className: "ws-calc-label"
|
|
9937
|
+
}, t("WS_NUMBER_OF_BEDS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9938
|
+
className: "ws-calc-value"
|
|
9939
|
+
}, propertyDetail.numberOfBeds || ((_waterDemandDetail$co9 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co9 === void 0 ? void 0 : _waterDemandDetail$co9.total_beds))), (propertyDetail.numberOfRooms > 0 || ((_waterDemandDetail$co0 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co0 === void 0 ? void 0 : _waterDemandDetail$co0.total_rooms) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9940
|
+
className: "ws-calc-label"
|
|
9941
|
+
}, t("WS_NUMBER_OF_ROOMS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9942
|
+
className: "ws-calc-value"
|
|
9943
|
+
}, propertyDetail.numberOfRooms || ((_waterDemandDetail$co1 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co1 === void 0 ? void 0 : _waterDemandDetail$co1.total_rooms))), (propertyDetail.numberOfStudents > 0 || ((_waterDemandDetail$co10 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co10 === void 0 ? void 0 : _waterDemandDetail$co10.total_students) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9944
|
+
className: "ws-calc-label"
|
|
9945
|
+
}, t("WS_NUMBER_OF_STUDENTS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9946
|
+
className: "ws-calc-value"
|
|
9947
|
+
}, propertyDetail.numberOfStudents || ((_waterDemandDetail$co11 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co11 === void 0 ? void 0 : _waterDemandDetail$co11.total_students))), (propertyDetail.numberOfStaff > 0 || ((_waterDemandDetail$co12 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co12 === void 0 ? void 0 : _waterDemandDetail$co12.total_staff) > 0) && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9948
|
+
className: "ws-calc-label"
|
|
9949
|
+
}, t("WS_NUMBER_OF_STAFF")), /*#__PURE__*/React__default.createElement("div", {
|
|
9950
|
+
className: "ws-calc-value"
|
|
9951
|
+
}, propertyDetail.numberOfStaff || ((_waterDemandDetail$co13 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co13 === void 0 ? void 0 : _waterDemandDetail$co13.total_staff))), ((_waterDemandDetail$co14 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co14 === void 0 ? void 0 : _waterDemandDetail$co14.total_seats) > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9952
|
+
className: "ws-calc-label"
|
|
9953
|
+
}, t("WS_NUMBER_OF_SEATS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9954
|
+
className: "ws-calc-value"
|
|
9955
|
+
}, waterDemandDetail.contextVariables.total_seats)), ((_waterDemandDetail$co15 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co15 === void 0 ? void 0 : _waterDemandDetail$co15.highest_shift_strength) > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9956
|
+
className: "ws-calc-label"
|
|
9957
|
+
}, t("WS_HIGHEST_SHIFT_STRENGTH")), /*#__PURE__*/React__default.createElement("div", {
|
|
9958
|
+
className: "ws-calc-value"
|
|
9959
|
+
}, waterDemandDetail.contextVariables.highest_shift_strength)), ((_waterDemandDetail$co16 = waterDemandDetail.contextVariables) === null || _waterDemandDetail$co16 === void 0 ? void 0 : _waterDemandDetail$co16.sanctioned_beds) > 0 && /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9960
|
+
className: "ws-calc-label"
|
|
9961
|
+
}, t("WS_SANCTIONED_BEDS")), /*#__PURE__*/React__default.createElement("div", {
|
|
9962
|
+
className: "ws-calc-value"
|
|
9963
|
+
}, waterDemandDetail.contextVariables.sanctioned_beds))))), /*#__PURE__*/React__default.createElement("div", {
|
|
9964
|
+
className: "ws-calc-detail-card"
|
|
9965
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9966
|
+
className: "ws-calc-detail-card-header"
|
|
9967
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9968
|
+
className: "ws-calc-detail-card-badge"
|
|
9969
|
+
}, "2"), /*#__PURE__*/React__default.createElement("h3", {
|
|
9970
|
+
className: "ws-calc-detail-card-title"
|
|
9971
|
+
}, t("WS_WATER_DEMAND_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
|
|
9972
|
+
className: "ws-calc-split-card"
|
|
9973
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9974
|
+
className: "ws-calc-split-left"
|
|
9975
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9976
|
+
className: "ws-calc-row"
|
|
9977
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9978
|
+
className: "ws-calc-row-label"
|
|
9979
|
+
}, t("WS_MATCHED_NORM_CODE")), /*#__PURE__*/React__default.createElement("span", {
|
|
9980
|
+
className: "ws-calc-row-value"
|
|
9981
|
+
}, waterDemandDetail.matchedNormCode || "-")), /*#__PURE__*/React__default.createElement("div", {
|
|
9982
|
+
className: "ws-calc-row"
|
|
9983
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9984
|
+
className: "ws-calc-row-label"
|
|
9985
|
+
}, t("WS_MATCHED_NORM_NAME")), /*#__PURE__*/React__default.createElement("span", {
|
|
9986
|
+
className: "ws-calc-row-value-right"
|
|
9987
|
+
}, waterDemandDetail.matchedNormName || "-")), /*#__PURE__*/React__default.createElement("div", {
|
|
9988
|
+
className: "ws-calc-row"
|
|
9989
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9990
|
+
className: "ws-calc-row-label"
|
|
9991
|
+
}, t("WS_FORMULA_USED")), /*#__PURE__*/React__default.createElement("span", {
|
|
9992
|
+
className: "ws-calc-row-value"
|
|
9993
|
+
}, waterDemandDetail.formulaUsed || "-")), /*#__PURE__*/React__default.createElement("div", {
|
|
9994
|
+
className: "ws-calc-row"
|
|
9995
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
9996
|
+
className: "ws-calc-row-label"
|
|
9997
|
+
}, t("WS_CALCULATED_OCCUPANCY")), /*#__PURE__*/React__default.createElement("span", {
|
|
9998
|
+
className: "ws-calc-row-value"
|
|
9999
|
+
}, waterDemandDetail.calculatedOccupancy || 0, " Persons")), /*#__PURE__*/React__default.createElement("div", {
|
|
10000
|
+
className: "ws-calc-row-last"
|
|
10001
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10002
|
+
className: "ws-calc-row-label"
|
|
10003
|
+
}, t("WS_LPCD_SELECTED")), /*#__PURE__*/React__default.createElement("span", {
|
|
10004
|
+
className: "ws-calc-row-value"
|
|
10005
|
+
}, waterDemandDetail.chosenLpcd || 0, " LPD"))), /*#__PURE__*/React__default.createElement("div", {
|
|
10006
|
+
className: "ws-calc-split-right"
|
|
10007
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10008
|
+
className: "ws-calc-row"
|
|
10009
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10010
|
+
className: "ws-calc-row-label"
|
|
10011
|
+
}, t("WS_BASE_DEMAND")), /*#__PURE__*/React__default.createElement("span", {
|
|
10012
|
+
className: "ws-calc-row-value"
|
|
10013
|
+
}, waterDemandDetail.baseDemand || 0, " L/day")), /*#__PURE__*/React__default.createElement("div", {
|
|
10014
|
+
className: "ws-calc-row",
|
|
10015
|
+
style: {
|
|
10016
|
+
marginBottom: "24px"
|
|
10017
|
+
}
|
|
10018
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10019
|
+
className: "ws-calc-row-label"
|
|
10020
|
+
}, t("WS_CONTINGENCY")), /*#__PURE__*/React__default.createElement("span", {
|
|
10021
|
+
className: "ws-calc-row-value"
|
|
10022
|
+
}, waterDemandDetail.contingencyPercentage || 0, "%")), /*#__PURE__*/React__default.createElement("div", {
|
|
10023
|
+
className: "ws-calc-highlight-blue"
|
|
10024
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10025
|
+
className: "ws-calc-highlight-blue-label"
|
|
10026
|
+
}, t("WS_TOTAL_WATER_DEMAND")), /*#__PURE__*/React__default.createElement("span", {
|
|
10027
|
+
className: "ws-calc-highlight-blue-value"
|
|
10028
|
+
}, waterDemandDetail.totalWaterDemandLPD || 0, " L/day"))))), /*#__PURE__*/React__default.createElement("div", {
|
|
10029
|
+
className: "ws-calc-detail-card"
|
|
10030
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10031
|
+
className: "ws-calc-detail-card-header"
|
|
10032
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10033
|
+
className: "ws-calc-detail-card-badge"
|
|
10034
|
+
}, "3"), /*#__PURE__*/React__default.createElement("h3", {
|
|
10035
|
+
className: "ws-calc-detail-card-title"
|
|
10036
|
+
}, t("WS_INFRASTRUCTURE_CHARGE_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
|
|
10037
|
+
className: "ws-calc-split-card"
|
|
10038
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10039
|
+
className: "ws-calc-split-left"
|
|
10040
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10041
|
+
className: "ws-calc-row"
|
|
10042
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10043
|
+
className: "ws-calc-row-label"
|
|
10044
|
+
}, t("WS_COLONY_CATEGORY")), /*#__PURE__*/React__default.createElement("span", {
|
|
10045
|
+
className: "ws-calc-row-value"
|
|
10046
|
+
}, infraDetail.colonyCategory || "-")), /*#__PURE__*/React__default.createElement("div", {
|
|
10047
|
+
className: "ws-calc-row"
|
|
10048
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10049
|
+
className: "ws-calc-row-label"
|
|
10050
|
+
}, t("WS_PLOT_AREA")), /*#__PURE__*/React__default.createElement("span", {
|
|
10051
|
+
className: "ws-calc-row-value"
|
|
10052
|
+
}, infraDetail.plotArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", {
|
|
10053
|
+
className: "ws-calc-row"
|
|
10054
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10055
|
+
className: "ws-calc-row-label"
|
|
10056
|
+
}, t("WS_MINIMUM_PLOT_AREA")), /*#__PURE__*/React__default.createElement("span", {
|
|
10057
|
+
className: "ws-calc-row-value"
|
|
10058
|
+
}, infraDetail.minimumPlotArea || 0, " sq. m.")), /*#__PURE__*/React__default.createElement("div", {
|
|
10059
|
+
className: "ws-calc-row"
|
|
10060
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10061
|
+
className: "ws-calc-row-label"
|
|
10062
|
+
}, t("WS_WATER_RATE")), /*#__PURE__*/React__default.createElement("span", {
|
|
10063
|
+
className: "ws-calc-row-value"
|
|
10064
|
+
}, "\u20B9 ", infraDetail.waterRatePerLPD || 0, " / LPD")), /*#__PURE__*/React__default.createElement("div", {
|
|
10065
|
+
className: "ws-calc-row-last"
|
|
10066
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10067
|
+
className: "ws-calc-row-label"
|
|
10068
|
+
}, t("WS_SEWER_RATE")), /*#__PURE__*/React__default.createElement("span", {
|
|
10069
|
+
className: "ws-calc-row-value"
|
|
10070
|
+
}, "\u20B9 ", infraDetail.sewerRatePerLPD || 0, " / LPD"))), /*#__PURE__*/React__default.createElement("div", {
|
|
10071
|
+
className: "ws-calc-split-right"
|
|
10072
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10073
|
+
className: "ws-calc-row"
|
|
10074
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10075
|
+
className: "ws-calc-row-label"
|
|
10076
|
+
}, t("WS_WATER_COMPONENT_IFC")), /*#__PURE__*/React__default.createElement("span", {
|
|
10077
|
+
className: "ws-calc-row-value"
|
|
10078
|
+
}, "\u20B9 ", ((_infraDetail$waterCom = infraDetail.waterComponentIFC) === null || _infraDetail$waterCom === void 0 ? void 0 : _infraDetail$waterCom.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
|
|
10079
|
+
className: "ws-calc-row"
|
|
10080
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10081
|
+
className: "ws-calc-row-label"
|
|
10082
|
+
}, t("WS_SEWER_COMPONENT_IFC")), /*#__PURE__*/React__default.createElement("span", {
|
|
10083
|
+
className: "ws-calc-row-value"
|
|
10084
|
+
}, "\u20B9 ", ((_infraDetail$sewerCom = infraDetail.sewerComponentIFC) === null || _infraDetail$sewerCom === void 0 ? void 0 : _infraDetail$sewerCom.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
|
|
10085
|
+
className: "ws-calc-row"
|
|
10086
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10087
|
+
className: "ws-calc-row-label"
|
|
10088
|
+
}, t("WS_GROSS_IFC")), /*#__PURE__*/React__default.createElement("span", {
|
|
10089
|
+
className: "ws-calc-row-value"
|
|
10090
|
+
}, "\u20B9 ", ((_infraDetail$grossIFC = infraDetail.grossIFC) === null || _infraDetail$grossIFC === void 0 ? void 0 : _infraDetail$grossIFC.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
|
|
10091
|
+
className: "ws-calc-row"
|
|
10092
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10093
|
+
className: "ws-calc-row-label"
|
|
10094
|
+
}, t("WS_REBATE"), " (", infraDetail.rebatePercentage || 0, "%)"), /*#__PURE__*/React__default.createElement("span", {
|
|
10095
|
+
className: "ws-calc-row-value-red"
|
|
10096
|
+
}, "- \u20B9 ", ((_infraDetail$rebateAm = infraDetail.rebateAmount) === null || _infraDetail$rebateAm === void 0 ? void 0 : _infraDetail$rebateAm.toLocaleString("en-IN")) || 0)), /*#__PURE__*/React__default.createElement("div", {
|
|
10097
|
+
className: "ws-calc-highlight-green"
|
|
10098
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10099
|
+
className: "ws-calc-highlight-green-label"
|
|
10100
|
+
}, t("WS_NET_INFRASTRUCTURE_CHARGE")), /*#__PURE__*/React__default.createElement("span", {
|
|
10101
|
+
className: "ws-calc-highlight-green-value"
|
|
10102
|
+
}, "\u20B9 ", ((_infraDetail$netIFC = infraDetail.netIFC) === null || _infraDetail$netIFC === void 0 ? void 0 : _infraDetail$netIFC.toLocaleString("en-IN")) || 0))))), /*#__PURE__*/React__default.createElement("div", {
|
|
10103
|
+
className: "ws-calc-detail-card",
|
|
10104
|
+
style: {
|
|
10105
|
+
marginBottom: "0"
|
|
10106
|
+
}
|
|
10107
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10108
|
+
className: "ws-calc-detail-card-header"
|
|
10109
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10110
|
+
className: "ws-calc-detail-card-badge"
|
|
10111
|
+
}, "4"), /*#__PURE__*/React__default.createElement("h3", {
|
|
10112
|
+
className: "ws-calc-detail-card-title"
|
|
10113
|
+
}, t("WS_FEE_SUMMARY"))), /*#__PURE__*/React__default.createElement("div", {
|
|
10114
|
+
className: "ws-calc-split-card",
|
|
10115
|
+
style: {
|
|
10116
|
+
marginBottom: "0"
|
|
10117
|
+
}
|
|
10118
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10119
|
+
className: "ws-calc-split-left",
|
|
10120
|
+
style: {
|
|
10121
|
+
display: "flex",
|
|
10122
|
+
flexDirection: "column",
|
|
10123
|
+
justifyContent: "center"
|
|
10124
|
+
}
|
|
10125
|
+
}, taxHeadEstimates.map((taxHead, index) => {
|
|
10126
|
+
var _taxHead$estimateAmou;
|
|
10127
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10128
|
+
key: index,
|
|
10129
|
+
className: "ws-calc-row"
|
|
10130
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10131
|
+
className: "ws-calc-row-label"
|
|
10132
|
+
}, t(taxHead.taxHeadCode)), /*#__PURE__*/React__default.createElement("span", {
|
|
10133
|
+
className: "ws-calc-row-value"
|
|
10134
|
+
}, "\u20B9 ", (_taxHead$estimateAmou = taxHead.estimateAmount) === null || _taxHead$estimateAmou === void 0 ? void 0 : _taxHead$estimateAmou.toLocaleString("en-IN")));
|
|
10135
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
10136
|
+
className: "ws-calc-highlight-purple"
|
|
10137
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
10138
|
+
className: "ws-calc-highlight-purple-label"
|
|
10139
|
+
}, t("WS_TOTAL_AMOUNT_PAYABLE")), /*#__PURE__*/React__default.createElement("span", {
|
|
10140
|
+
className: "ws-calc-highlight-purple-value"
|
|
10141
|
+
}, "\u20B9 ", totalAmount === null || totalAmount === void 0 ? void 0 : totalAmount.toLocaleString("en-IN")))))));
|
|
10142
|
+
};
|
|
10143
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
10144
|
+
className: "employee-form-section-wrapper"
|
|
10145
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.VerticalTimeline, {
|
|
10146
|
+
config: [{
|
|
10147
|
+
timeLine: [{
|
|
10148
|
+
actions: t("WS_CALCULATION"),
|
|
10149
|
+
currentStep: 1
|
|
10150
|
+
}]
|
|
10151
|
+
}],
|
|
10152
|
+
showFinalStep: false
|
|
10153
|
+
}), /*#__PURE__*/React__default.createElement("div", {
|
|
10154
|
+
style: {
|
|
10155
|
+
flex: 1
|
|
10156
|
+
}
|
|
10157
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CollapsibleCardPage, {
|
|
10158
|
+
title: t("WS_CALCULATION"),
|
|
10159
|
+
defaultOpen: true,
|
|
10160
|
+
style: props.style
|
|
10161
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
10162
|
+
className: "formcomposer-section-grid"
|
|
10163
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.LabelFieldPair, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardLabel, null, t("WS_CATEGORY_TYPE") + "*"), /*#__PURE__*/React__default.createElement("div", {
|
|
10164
|
+
className: "form-field"
|
|
10165
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
10166
|
+
control: control,
|
|
10167
|
+
name: "useDetails.categoryType",
|
|
10168
|
+
rules: {
|
|
10169
|
+
required: t("REQUIRED_FIELD")
|
|
10170
|
+
},
|
|
10171
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10172
|
+
option: categoryTypeList,
|
|
10173
|
+
optionKey: "i18nKey",
|
|
10174
|
+
selected: props.value,
|
|
10175
|
+
select: props.onChange,
|
|
10176
|
+
t: t,
|
|
10177
|
+
onBlur: props.onBlur
|
|
10178
|
+
})
|
|
10179
|
+
}))), (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, {
|
|
10180
|
+
style: errorStyle
|
|
10181
|
+
}, 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", {
|
|
10182
|
+
className: "form-field"
|
|
10183
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
10184
|
+
control: control,
|
|
10185
|
+
name: "useDetails.propertyCategory",
|
|
10186
|
+
rules: {
|
|
10187
|
+
required: t("REQUIRED_FIELD")
|
|
10188
|
+
},
|
|
10189
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10190
|
+
option: categoryOptions,
|
|
10191
|
+
optionKey: "name",
|
|
10192
|
+
selected: props.value,
|
|
10193
|
+
select: props.onChange,
|
|
10194
|
+
t: t,
|
|
10195
|
+
onBlur: props.onBlur
|
|
10196
|
+
})
|
|
10197
|
+
}))), (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, {
|
|
10198
|
+
style: errorStyle
|
|
10199
|
+
}, 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", {
|
|
10200
|
+
className: "form-field"
|
|
10201
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
10202
|
+
control: control,
|
|
10203
|
+
name: "useDetails.propertyType",
|
|
10204
|
+
rules: {
|
|
10205
|
+
required: t("REQUIRED_FIELD")
|
|
10206
|
+
},
|
|
10207
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10208
|
+
option: propertyTypeOptions,
|
|
10209
|
+
optionKey: "name",
|
|
10210
|
+
selected: props.value,
|
|
10211
|
+
select: props.onChange,
|
|
10212
|
+
t: t,
|
|
10213
|
+
onBlur: props.onBlur
|
|
10214
|
+
})
|
|
10215
|
+
}))), (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, {
|
|
10216
|
+
style: errorStyle
|
|
10217
|
+
}, 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", {
|
|
10218
|
+
className: "form-field"
|
|
10219
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
10220
|
+
control: control,
|
|
10221
|
+
name: "useDetails.WaterConnectionUsageType",
|
|
10222
|
+
rules: {
|
|
10223
|
+
required: t("REQUIRED_FIELD")
|
|
10224
|
+
},
|
|
10225
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10226
|
+
option: usageTypeOptions,
|
|
10227
|
+
optionKey: "name",
|
|
10228
|
+
selected: props.value,
|
|
10229
|
+
select: props.onChange,
|
|
10230
|
+
t: t,
|
|
10231
|
+
onBlur: props.onBlur
|
|
10232
|
+
})
|
|
10233
|
+
}))), (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, {
|
|
10234
|
+
style: errorStyle
|
|
10235
|
+
}, 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", {
|
|
10236
|
+
className: "form-field"
|
|
10237
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
10238
|
+
control: control,
|
|
10239
|
+
name: "useDetails.colonyName",
|
|
10240
|
+
rules: {
|
|
10241
|
+
required: t("REQUIRED_FIELD")
|
|
10242
|
+
},
|
|
10243
|
+
render: props => /*#__PURE__*/React__default.createElement(digitUiReactComponents.Dropdown, {
|
|
10244
|
+
option: colonyNameOptions,
|
|
10245
|
+
optionKey: "name",
|
|
10246
|
+
selected: props.value,
|
|
10247
|
+
select: props.onChange,
|
|
10248
|
+
t: t,
|
|
10249
|
+
onBlur: props.onBlur
|
|
10250
|
+
})
|
|
10251
|
+
}))), (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, {
|
|
10252
|
+
style: errorStyle
|
|
10253
|
+
}, 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", {
|
|
10254
|
+
className: "form-field"
|
|
10255
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10256
|
+
t: t,
|
|
10257
|
+
inputRef: register({
|
|
10258
|
+
pattern: {
|
|
10259
|
+
value: DECIMAL_PATTERN,
|
|
10260
|
+
message: t("ERR_INVALID_DECIMAL")
|
|
10261
|
+
}
|
|
10262
|
+
}),
|
|
10263
|
+
name: "useDetails.plotArea"
|
|
10264
|
+
}))), (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, {
|
|
10265
|
+
style: errorStyle
|
|
10266
|
+
}, 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", {
|
|
10267
|
+
className: "form-field"
|
|
10268
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10269
|
+
t: t,
|
|
10270
|
+
inputRef: register({
|
|
10271
|
+
pattern: {
|
|
10272
|
+
value: DECIMAL_PATTERN,
|
|
10273
|
+
message: t("ERR_INVALID_DECIMAL")
|
|
10274
|
+
}
|
|
10275
|
+
}),
|
|
10276
|
+
name: "useDetails.builtUpArea"
|
|
10277
|
+
}))), (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, {
|
|
10278
|
+
style: errorStyle
|
|
10279
|
+
}, 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", {
|
|
10280
|
+
className: "form-field"
|
|
10281
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10282
|
+
t: t,
|
|
10283
|
+
inputRef: register({
|
|
10284
|
+
pattern: {
|
|
10285
|
+
value: DECIMAL_PATTERN,
|
|
10286
|
+
message: t("ERR_INVALID_DECIMAL")
|
|
10287
|
+
}
|
|
10288
|
+
}),
|
|
10289
|
+
name: "useDetails.farArea"
|
|
10290
|
+
}))), (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, {
|
|
10291
|
+
style: errorStyle
|
|
10292
|
+
}, 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", {
|
|
10293
|
+
className: "form-field"
|
|
10294
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10295
|
+
t: t,
|
|
10296
|
+
inputRef: register({
|
|
10297
|
+
pattern: {
|
|
10298
|
+
value: NUMBER_PATTERN,
|
|
10299
|
+
message: t("ERR_INVALID_NUMBER")
|
|
10300
|
+
}
|
|
10301
|
+
}),
|
|
10302
|
+
name: "useDetails.NumberofDwellingUnits"
|
|
10303
|
+
}))) : 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, {
|
|
10304
|
+
style: errorStyle
|
|
10305
|
+
}, 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", {
|
|
10306
|
+
className: "form-field"
|
|
10307
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10308
|
+
t: t,
|
|
10309
|
+
inputRef: register({
|
|
10310
|
+
pattern: {
|
|
10311
|
+
value: NUMBER_PATTERN,
|
|
10312
|
+
message: t("ERR_INVALID_NUMBER")
|
|
10313
|
+
},
|
|
10314
|
+
required: isHotelRestaurantProperty ? t("REQUIRED_FIELD") : false
|
|
10315
|
+
}),
|
|
10316
|
+
name: "useDetails.NumberofRooms"
|
|
10317
|
+
}))) : 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, {
|
|
10318
|
+
style: errorStyle
|
|
10319
|
+
}, 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", {
|
|
10320
|
+
className: "form-field"
|
|
10321
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10322
|
+
t: t,
|
|
10323
|
+
inputRef: register({
|
|
10324
|
+
pattern: {
|
|
10325
|
+
value: NUMBER_PATTERN,
|
|
10326
|
+
message: t("ERR_INVALID_NUMBER")
|
|
10327
|
+
},
|
|
10328
|
+
required: isHospitalProperty ? t("REQUIRED_FIELD") : false
|
|
10329
|
+
}),
|
|
10330
|
+
name: "useDetails.numberOfBeds"
|
|
10331
|
+
}))) : 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, {
|
|
10332
|
+
style: errorStyle
|
|
10333
|
+
}, 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", {
|
|
10334
|
+
className: "form-field"
|
|
10335
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10336
|
+
t: t,
|
|
10337
|
+
inputRef: register({
|
|
10338
|
+
pattern: {
|
|
10339
|
+
value: NUMBER_PATTERN,
|
|
10340
|
+
message: t("ERR_INVALID_NUMBER")
|
|
10341
|
+
}
|
|
10342
|
+
}),
|
|
10343
|
+
name: "useDetails.numberOfStudents"
|
|
10344
|
+
}))) : 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, {
|
|
10345
|
+
style: errorStyle
|
|
10346
|
+
}, 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", {
|
|
10347
|
+
className: "form-field"
|
|
10348
|
+
}, /*#__PURE__*/React__default.createElement(digitUiReactComponents.TextInput, {
|
|
10349
|
+
t: t,
|
|
10350
|
+
inputRef: register({
|
|
10351
|
+
pattern: {
|
|
10352
|
+
value: NUMBER_PATTERN,
|
|
10353
|
+
message: t("ERR_INVALID_NUMBER")
|
|
10354
|
+
}
|
|
10355
|
+
}),
|
|
10356
|
+
name: "useDetails.ServantQuartersRoom"
|
|
10357
|
+
}))) : 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, {
|
|
10358
|
+
style: errorStyle
|
|
10359
|
+
}, errors.useDetails.ServantQuartersRoom.message))), /*#__PURE__*/React__default.createElement("div", {
|
|
10360
|
+
style: {
|
|
10361
|
+
display: "flex",
|
|
10362
|
+
marginTop: "24px",
|
|
10363
|
+
marginBottom: "32px",
|
|
10364
|
+
justifyContent: isMobile ? "center" : "flex-end",
|
|
10365
|
+
alignItems: "center"
|
|
10366
|
+
}
|
|
10367
|
+
}, /*#__PURE__*/React__default.createElement("button", {
|
|
10368
|
+
type: "button",
|
|
10369
|
+
className: "clear-search generic-button",
|
|
10370
|
+
style: {
|
|
10371
|
+
marginRight: "24px"
|
|
10372
|
+
},
|
|
10373
|
+
onClick: () => {
|
|
10374
|
+
reset();
|
|
10375
|
+
setCalculationData(null);
|
|
10376
|
+
}
|
|
10377
|
+
}, t("CS_COMMON_CLEAR_SEARCH")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
|
|
10378
|
+
label: t("ES_COMMON_CALCULATE"),
|
|
10379
|
+
onSubmit: handleSubmit
|
|
10380
|
+
})), calculationData && /*#__PURE__*/React__default.createElement(RenderCalculationDetails, {
|
|
10381
|
+
data: calculationData
|
|
10382
|
+
})));
|
|
10383
|
+
};
|
|
10384
|
+
|
|
9598
10385
|
const BILLSBreadCrumbs = _ref => {
|
|
9599
10386
|
var _applicationDetails$a, _applicationDetails$a9, _applicationDetails$a0, _applicationDetails$a1, _applicationDetails$a13, _applicationDetails$a14, _reciept_data$Payment2;
|
|
9600
10387
|
const getRecieptSearch = function (tenantId, payments, consumerCodes, receiptKey) {
|
|
@@ -10020,6 +10807,10 @@ const BILLSBreadCrumbs = _ref => {
|
|
|
10020
10807
|
path: "/digit-ui/employee/ws/water/bulk-bil",
|
|
10021
10808
|
label: t("CS_TITLE_BULK_BILL"),
|
|
10022
10809
|
show: location.pathname.includes("/ws/water/bulk-bill") ? true : false
|
|
10810
|
+
}, {
|
|
10811
|
+
path: "/digit-ui/employee/ws/water/calculation",
|
|
10812
|
+
label: t("WS_CALCULATION"),
|
|
10813
|
+
show: location.pathname.includes("/ws/water/calculation") ? true : false
|
|
10023
10814
|
}];
|
|
10024
10815
|
let lastCrumbIndex = findLastIndex(crumbs, "show", true);
|
|
10025
10816
|
crumbs[lastCrumbIndex] = _extends({}, crumbs[lastCrumbIndex], {
|
|
@@ -10277,6 +11068,11 @@ const App$1 = _ref2 => {
|
|
|
10277
11068
|
component: props => /*#__PURE__*/React__default.createElement(WSBulkBillGeneration, _extends({}, props, {
|
|
10278
11069
|
parentRoute: path
|
|
10279
11070
|
}))
|
|
11071
|
+
}), /*#__PURE__*/React__default.createElement(digitUiReactComponents.PrivateRoute, {
|
|
11072
|
+
path: path + "/water/calculation",
|
|
11073
|
+
component: props => /*#__PURE__*/React__default.createElement(WSCalculation, _extends({}, props, {
|
|
11074
|
+
parentRoute: path
|
|
11075
|
+
}))
|
|
10280
11076
|
}))))));
|
|
10281
11077
|
};
|
|
10282
11078
|
|
|
@@ -20630,9 +21426,9 @@ const WSDjbEmployee = _ref => {
|
|
|
20630
21426
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, FormContent);
|
|
20631
21427
|
};
|
|
20632
21428
|
|
|
20633
|
-
const _excluded = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
|
|
20634
|
-
const NUMBER_PATTERN = /^\d+$/;
|
|
20635
|
-
const DECIMAL_PATTERN = /^\d+(\.\d{1,2})?$/;
|
|
21429
|
+
const _excluded$1 = ["t", "config", "onSelect", "formData", "formState", "setError", "clearErrors"];
|
|
21430
|
+
const NUMBER_PATTERN$1 = /^\d+$/;
|
|
21431
|
+
const DECIMAL_PATTERN$1 = /^\d+(\.\d{1,2})?$/;
|
|
20636
21432
|
const PropertyWaterConnection = _ref => {
|
|
20637
21433
|
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
21434
|
let t = _ref.t,
|
|
@@ -20641,7 +21437,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
20641
21437
|
formData = _ref.formData,
|
|
20642
21438
|
setError = _ref.setError,
|
|
20643
21439
|
clearErrors = _ref.clearErrors,
|
|
20644
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21440
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
20645
21441
|
const _useForm = reactHookForm.useForm({
|
|
20646
21442
|
defaultValues: (formData === null || formData === void 0 ? void 0 : formData[config.key]) || {
|
|
20647
21443
|
useDetails: {
|
|
@@ -20957,7 +21753,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
20957
21753
|
t: t,
|
|
20958
21754
|
inputRef: register({
|
|
20959
21755
|
pattern: {
|
|
20960
|
-
value: DECIMAL_PATTERN,
|
|
21756
|
+
value: DECIMAL_PATTERN$1,
|
|
20961
21757
|
message: t("ERR_INVALID_DECIMAL")
|
|
20962
21758
|
}
|
|
20963
21759
|
}),
|
|
@@ -20971,7 +21767,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
20971
21767
|
t: t,
|
|
20972
21768
|
inputRef: register({
|
|
20973
21769
|
pattern: {
|
|
20974
|
-
value: DECIMAL_PATTERN,
|
|
21770
|
+
value: DECIMAL_PATTERN$1,
|
|
20975
21771
|
message: t("ERR_INVALID_DECIMAL")
|
|
20976
21772
|
}
|
|
20977
21773
|
}),
|
|
@@ -20985,7 +21781,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
20985
21781
|
t: t,
|
|
20986
21782
|
inputRef: register({
|
|
20987
21783
|
pattern: {
|
|
20988
|
-
value: DECIMAL_PATTERN,
|
|
21784
|
+
value: DECIMAL_PATTERN$1,
|
|
20989
21785
|
message: t("ERR_INVALID_DECIMAL")
|
|
20990
21786
|
}
|
|
20991
21787
|
}),
|
|
@@ -21018,7 +21814,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
21018
21814
|
t: t,
|
|
21019
21815
|
inputRef: register({
|
|
21020
21816
|
pattern: {
|
|
21021
|
-
value: NUMBER_PATTERN,
|
|
21817
|
+
value: NUMBER_PATTERN$1,
|
|
21022
21818
|
message: t("ERR_INVALID_NUMBER")
|
|
21023
21819
|
}
|
|
21024
21820
|
}),
|
|
@@ -21032,7 +21828,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
21032
21828
|
t: t,
|
|
21033
21829
|
inputRef: register({
|
|
21034
21830
|
pattern: {
|
|
21035
|
-
value: NUMBER_PATTERN,
|
|
21831
|
+
value: NUMBER_PATTERN$1,
|
|
21036
21832
|
message: t("ERR_INVALID_NUMBER")
|
|
21037
21833
|
},
|
|
21038
21834
|
required: isHotelRestaurantProperty ? t("REQUIRED_FIELD") : false
|
|
@@ -21047,7 +21843,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
21047
21843
|
t: t,
|
|
21048
21844
|
inputRef: register({
|
|
21049
21845
|
pattern: {
|
|
21050
|
-
value: NUMBER_PATTERN,
|
|
21846
|
+
value: NUMBER_PATTERN$1,
|
|
21051
21847
|
message: t("ERR_INVALID_NUMBER")
|
|
21052
21848
|
},
|
|
21053
21849
|
required: isHospitalProperty ? t("REQUIRED_FIELD") : false
|
|
@@ -21062,7 +21858,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
21062
21858
|
t: t,
|
|
21063
21859
|
inputRef: register({
|
|
21064
21860
|
pattern: {
|
|
21065
|
-
value: NUMBER_PATTERN,
|
|
21861
|
+
value: NUMBER_PATTERN$1,
|
|
21066
21862
|
message: t("ERR_INVALID_NUMBER")
|
|
21067
21863
|
}
|
|
21068
21864
|
}),
|
|
@@ -21076,7 +21872,7 @@ const PropertyWaterConnection = _ref => {
|
|
|
21076
21872
|
t: t,
|
|
21077
21873
|
inputRef: register({
|
|
21078
21874
|
pattern: {
|
|
21079
|
-
value: NUMBER_PATTERN,
|
|
21875
|
+
value: NUMBER_PATTERN$1,
|
|
21080
21876
|
message: t("ERR_INVALID_NUMBER")
|
|
21081
21877
|
}
|
|
21082
21878
|
}),
|
|
@@ -22048,7 +22844,7 @@ const SearchFields = _ref => {
|
|
|
22048
22844
|
}, t("CS_COMMON_CLEAR_SEARCH"))));
|
|
22049
22845
|
};
|
|
22050
22846
|
|
|
22051
|
-
const _excluded$
|
|
22847
|
+
const _excluded$2 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
|
|
22052
22848
|
_excluded2 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"];
|
|
22053
22849
|
const MobileSearchApplication = _ref => {
|
|
22054
22850
|
let Controller = _ref.Controller,
|
|
@@ -22095,7 +22891,7 @@ const MobileSearchApplication = _ref => {
|
|
|
22095
22891
|
let currentlyActiveMobileModal = _ref2.currentlyActiveMobileModal,
|
|
22096
22892
|
searchFormFieldsComponentProps = _ref2.searchFormFieldsComponentProps,
|
|
22097
22893
|
tenantId = _ref2.tenantId,
|
|
22098
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
22894
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
|
|
22099
22895
|
const closeMobilePopupModal = props.closeMobilePopupModal;
|
|
22100
22896
|
switch (currentlyActiveMobileModal) {
|
|
22101
22897
|
case "SearchFormComponent":
|
|
@@ -22530,7 +23326,7 @@ const SearchFields$1 = _ref => {
|
|
|
22530
23326
|
}, t("WS_SEARCH_CONNECTION_RESET_BUTTON"))));
|
|
22531
23327
|
};
|
|
22532
23328
|
|
|
22533
|
-
const _excluded$
|
|
23329
|
+
const _excluded$3 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"],
|
|
22534
23330
|
_excluded2$1 = ["currentlyActiveMobileModal", "searchFormFieldsComponentProps", "tenantId"];
|
|
22535
23331
|
const MobileSearchWater = _ref => {
|
|
22536
23332
|
let Controller = _ref.Controller,
|
|
@@ -22575,7 +23371,7 @@ const MobileSearchWater = _ref => {
|
|
|
22575
23371
|
let currentlyActiveMobileModal = _ref2.currentlyActiveMobileModal,
|
|
22576
23372
|
searchFormFieldsComponentProps = _ref2.searchFormFieldsComponentProps,
|
|
22577
23373
|
tenantId = _ref2.tenantId,
|
|
22578
|
-
props = _objectWithoutPropertiesLoose(_ref2, _excluded$
|
|
23374
|
+
props = _objectWithoutPropertiesLoose(_ref2, _excluded$3);
|
|
22579
23375
|
const closeMobilePopupModal = props.closeMobilePopupModal;
|
|
22580
23376
|
switch (currentlyActiveMobileModal) {
|
|
22581
23377
|
case "SearchFormComponent":
|
|
@@ -23810,6 +24606,10 @@ const WSCard = () => {
|
|
|
23810
24606
|
label: t("WS_WATER_APPLICATION_SEARCH"),
|
|
23811
24607
|
link: "/digit-ui/employee/ws/water/search-application",
|
|
23812
24608
|
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
|
|
24609
|
+
}, {
|
|
24610
|
+
label: t("WS_CALCULATION"),
|
|
24611
|
+
link: "/digit-ui/employee/ws/water/calculation",
|
|
24612
|
+
roles: ["WS_CEMP", "WS_APPROVER", "WS_FIELD_INSPECTOR", "WS_DOC_VERIFIER", "WS_CLERK"]
|
|
23813
24613
|
}]
|
|
23814
24614
|
};
|
|
23815
24615
|
return /*#__PURE__*/React__default.createElement(digitUiReactComponents.EmployeeModuleCard, propsForModuleCard);
|
|
@@ -29005,7 +29805,7 @@ const WSFeeEstimation = _ref => {
|
|
|
29005
29805
|
};
|
|
29006
29806
|
|
|
29007
29807
|
const ViewBreakup = _ref => {
|
|
29008
|
-
var _breakUpData$calculat, _breakUpData$calculat2, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
29808
|
+
var _breakUpData$calculat, _breakUpData$calculat2, _breakUpData$calculat3, _wsAdditionalDetails$8, _breakUpData$billSlab4, _breakUpData$billSlab5, _breakUpData$billSlab6, _breakUpData$billSlab7, _breakUpData$billSlab8, _breakUpData$billSlab9;
|
|
29009
29809
|
let wsAdditionalDetails = _ref.wsAdditionalDetails,
|
|
29010
29810
|
print = _ref.print,
|
|
29011
29811
|
download = _ref.download;
|
|
@@ -29116,11 +29916,8 @@ const ViewBreakup = _ref => {
|
|
|
29116
29916
|
title: t("WS_APPLICATION_FEE_HEADER"),
|
|
29117
29917
|
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
29918
|
}, {
|
|
29119
|
-
title: "
|
|
29120
|
-
values:
|
|
29121
|
-
}, {
|
|
29122
|
-
title: "Water demand details",
|
|
29123
|
-
values: waterDemandRows.map(_ref4 => {
|
|
29919
|
+
title: "Property details",
|
|
29920
|
+
values: propertyRows.map(_ref4 => {
|
|
29124
29921
|
let label = _ref4.label,
|
|
29125
29922
|
value = _ref4.value,
|
|
29126
29923
|
currency = _ref4.currency,
|
|
@@ -29132,8 +29929,11 @@ const ViewBreakup = _ref => {
|
|
|
29132
29929
|
};
|
|
29133
29930
|
})
|
|
29134
29931
|
}, {
|
|
29135
|
-
title: "
|
|
29136
|
-
values:
|
|
29932
|
+
title: "Taxes",
|
|
29933
|
+
values: amountRows(breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$billSlab3 = breakUpData.billSlabData) === null || _breakUpData$billSlab3 === void 0 ? void 0 : _breakUpData$billSlab3.TAX)
|
|
29934
|
+
}, {
|
|
29935
|
+
title: "Water demand details",
|
|
29936
|
+
values: waterDemandRows.map(_ref5 => {
|
|
29137
29937
|
let label = _ref5.label,
|
|
29138
29938
|
value = _ref5.value,
|
|
29139
29939
|
currency = _ref5.currency,
|
|
@@ -29144,6 +29944,19 @@ const ViewBreakup = _ref => {
|
|
|
29144
29944
|
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
29145
29945
|
};
|
|
29146
29946
|
})
|
|
29947
|
+
}, {
|
|
29948
|
+
title: "Infrastructure charge details",
|
|
29949
|
+
values: infrastructureChargeRows.map(_ref6 => {
|
|
29950
|
+
let label = _ref6.label,
|
|
29951
|
+
value = _ref6.value,
|
|
29952
|
+
currency = _ref6.currency,
|
|
29953
|
+
unit = _ref6.unit,
|
|
29954
|
+
isText = _ref6.isText;
|
|
29955
|
+
return {
|
|
29956
|
+
title: label,
|
|
29957
|
+
value: currency ? "\u20B9" + formatNumber(value) : isText ? value || "-" : "" + formatNumber(value) + unit
|
|
29958
|
+
};
|
|
29959
|
+
})
|
|
29147
29960
|
}, {
|
|
29148
29961
|
title: "Total",
|
|
29149
29962
|
values: [{
|
|
@@ -29185,8 +29998,58 @@ const ViewBreakup = _ref => {
|
|
|
29185
29998
|
printWindow.focus();
|
|
29186
29999
|
printWindow.print();
|
|
29187
30000
|
};
|
|
29188
|
-
const
|
|
29189
|
-
const
|
|
30001
|
+
const propertyDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat = breakUpData.calculationDetail) === null || _breakUpData$calculat === void 0 ? void 0 : _breakUpData$calculat.propertyDetail;
|
|
30002
|
+
const waterDemandDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat2 = breakUpData.calculationDetail) === null || _breakUpData$calculat2 === void 0 ? void 0 : _breakUpData$calculat2.waterDemandDetail;
|
|
30003
|
+
const infrastructureChargeDetail = breakUpData === null || breakUpData === void 0 ? void 0 : (_breakUpData$calculat3 = breakUpData.calculationDetail) === null || _breakUpData$calculat3 === void 0 ? void 0 : _breakUpData$calculat3.infrastructureChargeDetail;
|
|
30004
|
+
const propertyRows = propertyDetail ? [{
|
|
30005
|
+
label: "Property ID",
|
|
30006
|
+
value: propertyDetail.propertyId,
|
|
30007
|
+
isText: true
|
|
30008
|
+
}, {
|
|
30009
|
+
label: "Property type",
|
|
30010
|
+
value: propertyDetail.propertyType,
|
|
30011
|
+
isText: true
|
|
30012
|
+
}, {
|
|
30013
|
+
label: "Plot area",
|
|
30014
|
+
value: propertyDetail.landArea,
|
|
30015
|
+
unit: " (sq. meter.)"
|
|
30016
|
+
}, {
|
|
30017
|
+
label: "Built-up area",
|
|
30018
|
+
value: propertyDetail.superBuiltUpArea,
|
|
30019
|
+
unit: " (sq. meter.)"
|
|
30020
|
+
}, {
|
|
30021
|
+
label: "farArea",
|
|
30022
|
+
value: propertyDetail.farArea,
|
|
30023
|
+
isText: true
|
|
30024
|
+
}, {
|
|
30025
|
+
label: "coveredArea",
|
|
30026
|
+
value: propertyDetail.coveredArea,
|
|
30027
|
+
isText: true
|
|
30028
|
+
}, {
|
|
30029
|
+
label: "numberOfDwellingUnits",
|
|
30030
|
+
value: propertyDetail.numberOfDwellingUnits,
|
|
30031
|
+
isText: true
|
|
30032
|
+
}, {
|
|
30033
|
+
label: "numberOfBeds",
|
|
30034
|
+
value: propertyDetail.numberOfBeds,
|
|
30035
|
+
isText: true
|
|
30036
|
+
}, {
|
|
30037
|
+
label: "numberOfRooms",
|
|
30038
|
+
value: propertyDetail.numberOfRooms,
|
|
30039
|
+
isText: true
|
|
30040
|
+
}, {
|
|
30041
|
+
label: "numberOfStudents",
|
|
30042
|
+
value: propertyDetail.numberOfStudents,
|
|
30043
|
+
isText: true
|
|
30044
|
+
}, {
|
|
30045
|
+
label: "numberOfStaff",
|
|
30046
|
+
value: propertyDetail.numberOfStaff,
|
|
30047
|
+
isText: true
|
|
30048
|
+
}, {
|
|
30049
|
+
label: "Usage category",
|
|
30050
|
+
value: propertyDetail.usageCategory,
|
|
30051
|
+
isText: true
|
|
30052
|
+
}] : [];
|
|
29190
30053
|
const waterDemandRows = waterDemandDetail ? [{
|
|
29191
30054
|
label: "Calculated occupancy",
|
|
29192
30055
|
value: waterDemandDetail.calculatedOccupancy,
|
|
@@ -29328,6 +30191,12 @@ const ViewBreakup = _ref => {
|
|
|
29328
30191
|
textStyle: {
|
|
29329
30192
|
textAlign: "right"
|
|
29330
30193
|
}
|
|
30194
|
+
})), propertyRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
30195
|
+
style: {
|
|
30196
|
+
margin: "10px 0px"
|
|
30197
|
+
}
|
|
30198
|
+
}, "Property details"), /*#__PURE__*/React__default.createElement(DetailRows, {
|
|
30199
|
+
rows: propertyRows
|
|
29331
30200
|
})), waterDemandRows.length > 0 && /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(digitUiReactComponents.CardSectionHeader, {
|
|
29332
30201
|
style: {
|
|
29333
30202
|
margin: "10px 0px"
|
|
@@ -34057,7 +34926,7 @@ const WSPropertyLocationDetails = props => {
|
|
|
34057
34926
|
return /*#__PURE__*/React__default.createElement(PropertyLocationDetails, props);
|
|
34058
34927
|
};
|
|
34059
34928
|
|
|
34060
|
-
const _excluded$
|
|
34929
|
+
const _excluded$4 = ["errors"],
|
|
34061
34930
|
_excluded2$2 = ["register", "control", "watch", "setValue", "unregister", "handleSubmit", "formState", "getValues", "reset"];
|
|
34062
34931
|
const ApplicationBillAmendment = () => {
|
|
34063
34932
|
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 +34983,7 @@ const ApplicationBillAmendment = () => {
|
|
|
34114
34983
|
handleSubmit = _useForm.handleSubmit,
|
|
34115
34984
|
_useForm$formState = _useForm.formState,
|
|
34116
34985
|
errors = _useForm$formState.errors,
|
|
34117
|
-
rest = _objectWithoutPropertiesLoose(_useForm$formState, _excluded$
|
|
34986
|
+
rest = _objectWithoutPropertiesLoose(_useForm$formState, _excluded$4),
|
|
34118
34987
|
getValues = _useForm.getValues,
|
|
34119
34988
|
methods = _objectWithoutPropertiesLoose(_useForm, _excluded2$2);
|
|
34120
34989
|
const _Digit$Hooks$ws$useAp = Digit.Hooks.ws.useApplicationActionsBillAmendUpdate(),
|
|
@@ -34979,8 +35848,8 @@ const DECLARATION_POINTS = ["I understand that sanction of connection does not a
|
|
|
34979
35848
|
const NAME_PATTERN = /^[a-zA-Z\s.'-]{1,50}$/;
|
|
34980
35849
|
const EMAIL_PATTERN = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/;
|
|
34981
35850
|
const MOBILE_PATTERN = /^[6-9][0-9]{9}$/;
|
|
34982
|
-
const NUMBER_PATTERN$
|
|
34983
|
-
const DECIMAL_PATTERN$
|
|
35851
|
+
const NUMBER_PATTERN$2 = /^\d+$/;
|
|
35852
|
+
const DECIMAL_PATTERN$2 = /^\d+(\.\d{1,2})?$/;
|
|
34984
35853
|
const IFSC_PATTERN = /^[A-Z]{4}0[A-Z0-9]{6}$/;
|
|
34985
35854
|
const ACCOUNT_PATTERN = /^[0-9]{9,18}$/;
|
|
34986
35855
|
const COLLAPSIBLE_CONTENT_TAB = "__WS_SECTION_CONTENT__";
|
|
@@ -37249,7 +38118,7 @@ const NewApplication = () => {
|
|
|
37249
38118
|
errorStyle: !!getFieldError("useDetails.plotArea"),
|
|
37250
38119
|
inputRef: register({
|
|
37251
38120
|
pattern: {
|
|
37252
|
-
value: DECIMAL_PATTERN$
|
|
38121
|
+
value: DECIMAL_PATTERN$2,
|
|
37253
38122
|
message: "Enter a valid numeric value."
|
|
37254
38123
|
},
|
|
37255
38124
|
required: "Plot Area is required."
|
|
@@ -37263,7 +38132,7 @@ const NewApplication = () => {
|
|
|
37263
38132
|
errorStyle: !!getFieldError("useDetails.builtUpArea"),
|
|
37264
38133
|
inputRef: register({
|
|
37265
38134
|
pattern: {
|
|
37266
|
-
value: DECIMAL_PATTERN$
|
|
38135
|
+
value: DECIMAL_PATTERN$2,
|
|
37267
38136
|
message: "Enter a valid numeric value."
|
|
37268
38137
|
},
|
|
37269
38138
|
required: "Built Up Area is required."
|
|
@@ -37294,7 +38163,7 @@ const NewApplication = () => {
|
|
|
37294
38163
|
errorStyle: !!getFieldError("useDetails.NumberofDwellingUnits"),
|
|
37295
38164
|
inputRef: register({
|
|
37296
38165
|
pattern: {
|
|
37297
|
-
value: DECIMAL_PATTERN$
|
|
38166
|
+
value: DECIMAL_PATTERN$2,
|
|
37298
38167
|
message: "Enter a valid numeric value."
|
|
37299
38168
|
},
|
|
37300
38169
|
required: "Built Up Area is required."
|
|
@@ -37308,7 +38177,7 @@ const NewApplication = () => {
|
|
|
37308
38177
|
errorStyle: !!getFieldError("useDetails.NumberofRooms"),
|
|
37309
38178
|
inputRef: register({
|
|
37310
38179
|
pattern: {
|
|
37311
|
-
value: DECIMAL_PATTERN$
|
|
38180
|
+
value: DECIMAL_PATTERN$2,
|
|
37312
38181
|
message: "Enter a valid numeric value."
|
|
37313
38182
|
},
|
|
37314
38183
|
required: "Built Up Area is required."
|
|
@@ -37322,7 +38191,7 @@ const NewApplication = () => {
|
|
|
37322
38191
|
errorStyle: !!getFieldError("useDetails.hospitalBeds"),
|
|
37323
38192
|
inputRef: register({
|
|
37324
38193
|
pattern: {
|
|
37325
|
-
value: NUMBER_PATTERN$
|
|
38194
|
+
value: NUMBER_PATTERN$2,
|
|
37326
38195
|
message: "Enter a valid whole number."
|
|
37327
38196
|
},
|
|
37328
38197
|
required: isHospitalProperty ? "No. of Beds is required for Hospital / Nursing Home." : false
|