@djb25/digit-ui-module-ws 1.0.51 → 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 +55 -7
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +55 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9676,7 +9676,8 @@ const WSCalculation = _ref => {
|
|
|
9676
9676
|
register = _useForm.register,
|
|
9677
9677
|
errors = _useForm.formState.errors,
|
|
9678
9678
|
watch = _useForm.watch,
|
|
9679
|
-
setValue = _useForm.setValue
|
|
9679
|
+
setValue = _useForm.setValue,
|
|
9680
|
+
reset = _useForm.reset;
|
|
9680
9681
|
const tenantId = Digit.ULBService.getCurrentTenantId();
|
|
9681
9682
|
const _useTranslation = reactI18next.useTranslation(),
|
|
9682
9683
|
t = _useTranslation.t;
|
|
@@ -9867,7 +9868,7 @@ const WSCalculation = _ref => {
|
|
|
9867
9868
|
});
|
|
9868
9869
|
};
|
|
9869
9870
|
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
|
+
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;
|
|
9871
9872
|
let data = _ref2.data;
|
|
9872
9873
|
if (!data) return null;
|
|
9873
9874
|
const calc = (_data$Calculation = data.Calculation) === null || _data$Calculation === void 0 ? void 0 : _data$Calculation[0];
|
|
@@ -9890,7 +9891,7 @@ const WSCalculation = _ref => {
|
|
|
9890
9891
|
}, t("WS_PROPERTY_DETAILS"))), /*#__PURE__*/React__default.createElement("div", {
|
|
9891
9892
|
className: "ws-calc-property-box"
|
|
9892
9893
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9893
|
-
className: "ws-calc-grid-
|
|
9894
|
+
className: "ws-calc-grid-4"
|
|
9894
9895
|
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9895
9896
|
className: "ws-calc-label"
|
|
9896
9897
|
}, t("WS_PROPERTY_TYPE")), /*#__PURE__*/React__default.createElement("div", {
|
|
@@ -9903,7 +9904,7 @@ const WSCalculation = _ref => {
|
|
|
9903
9904
|
className: "ws-calc-label"
|
|
9904
9905
|
}, t("WS_WATER_CONNECTION_USAGE_TYPE")), /*#__PURE__*/React__default.createElement("div", {
|
|
9905
9906
|
className: "ws-calc-value"
|
|
9906
|
-
}, propertyDetail.
|
|
9907
|
+
}, propertyDetail.waterConnectionUsageType || "-")), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement("div", {
|
|
9907
9908
|
className: "ws-calc-label"
|
|
9908
9909
|
}, t("WS_COLONY_CATEGORY")), /*#__PURE__*/React__default.createElement("div", {
|
|
9909
9910
|
className: "ws-calc-pill"
|
|
@@ -9923,7 +9924,43 @@ const WSCalculation = _ref => {
|
|
|
9923
9924
|
className: "ws-calc-label"
|
|
9924
9925
|
}, t("WS_BUILT_UP_AREA")), /*#__PURE__*/React__default.createElement("div", {
|
|
9925
9926
|
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
|
+
}, ((_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", {
|
|
9927
9964
|
className: "ws-calc-detail-card"
|
|
9928
9965
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
9929
9966
|
className: "ws-calc-detail-card-header"
|
|
@@ -10324,9 +10361,20 @@ const WSCalculation = _ref => {
|
|
|
10324
10361
|
display: "flex",
|
|
10325
10362
|
marginTop: "24px",
|
|
10326
10363
|
marginBottom: "32px",
|
|
10327
|
-
justifyContent: isMobile ? "center" : "flex-end"
|
|
10364
|
+
justifyContent: isMobile ? "center" : "flex-end",
|
|
10365
|
+
alignItems: "center"
|
|
10328
10366
|
}
|
|
10329
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
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, {
|
|
10330
10378
|
label: t("ES_COMMON_CALCULATE"),
|
|
10331
10379
|
onSubmit: handleSubmit
|
|
10332
10380
|
})), calculationData && /*#__PURE__*/React__default.createElement(RenderCalculationDetails, {
|