@djb25/digit-ui-module-ws 1.0.52 → 1.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9713,6 +9713,8 @@ const WSCalculation = _ref => {
9713
9713
  const watchPropertyType = watch("useDetails.propertyType");
9714
9714
  const watchPropertyCategory = watch("useDetails.propertyCategory");
9715
9715
  const watchWaterConnectionUsageType = watch("useDetails.WaterConnectionUsageType");
9716
+ const watchColonyName = watch("useDetails.colonyName");
9717
+ const isCalculateButtonEnabled = watchCategoryType && watchPropertyCategory && watchPropertyType && watchWaterConnectionUsageType && watchColonyName;
9716
9718
  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
9719
  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
9720
  const isSchoolCollegeProperty = (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "School" || (watchPropertyType === null || watchPropertyType === void 0 ? void 0 : watchPropertyType.code) === "College";
@@ -10376,7 +10378,8 @@ const WSCalculation = _ref => {
10376
10378
  }
10377
10379
  }, t("CS_COMMON_CLEAR_SEARCH")), /*#__PURE__*/React__default.createElement(digitUiReactComponents.SubmitBar, {
10378
10380
  label: t("ES_COMMON_CALCULATE"),
10379
- onSubmit: handleSubmit
10381
+ onSubmit: handleSubmit,
10382
+ disabled: !isCalculateButtonEnabled
10380
10383
  })), calculationData && /*#__PURE__*/React__default.createElement(RenderCalculationDetails, {
10381
10384
  data: calculationData
10382
10385
  })));