diff --git a/web/core/components/estimates/points/create.tsx b/web/core/components/estimates/points/create.tsx index 4a0967aa0..981714b5f 100644 --- a/web/core/components/estimates/points/create.tsx +++ b/web/core/components/estimates/points/create.tsx @@ -82,8 +82,14 @@ export const EstimatePointCreate: FC = observer((props) => if (!isRepeated) { if (currentEstimateType && [(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(currentEstimateType)) { - if (estimateInputValue && Number(estimateInputValue) && Number(estimateInputValue) >= 0) { - isEstimateValid = true; + if (estimateInputValue && !isNaN(Number(estimateInputValue))) { + if (Number(estimateInputValue) <= 0) { + handleEstimatePointError && + handleEstimatePointError(estimateInputValue, "Estimate point should be greater than 0."); + return; + } else { + isEstimateValid = true; + } } } else if (currentEstimateType && currentEstimateType === EEstimateSystem.CATEGORIES) { if (estimateInputValue && estimateInputValue.length > 0 && isNaN(Number(estimateInputValue))) { diff --git a/web/core/components/estimates/points/update.tsx b/web/core/components/estimates/points/update.tsx index 4194f4b2d..c6d28ba10 100644 --- a/web/core/components/estimates/points/update.tsx +++ b/web/core/components/estimates/points/update.tsx @@ -87,8 +87,14 @@ export const EstimatePointUpdate: FC = observer((props) => if (!isRepeated) { if (currentEstimateType && [(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(currentEstimateType)) { - if (estimateInputValue && Number(estimateInputValue) && Number(estimateInputValue) >= 0) { - isEstimateValid = true; + if (estimateInputValue && !isNaN(Number(estimateInputValue))) { + if (Number(estimateInputValue) <= 0) { + handleEstimatePointError && + handleEstimatePointError(estimateInputValue, "Estimate point should be greater than 0."); + return; + } else { + isEstimateValid = true; + } } } else if (currentEstimateType && currentEstimateType === EEstimateSystem.CATEGORIES) { if (estimateInputValue && estimateInputValue.length > 0 && isNaN(Number(estimateInputValue))) {