mirror of
https://github.com/makeplane/plane.git
synced 2025-12-29 00:24:56 +01:00
fix: validating and showing proper alert estimate point has to be taken greater than 0 in create and update (#430)
This commit is contained in:
@@ -112,8 +112,12 @@ export const EstimatePointSwitchRoot: FC<TEstimatePointSwitchRoot> = observer((p
|
||||
if ([(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(estimateSystemSwitchType)) {
|
||||
estimatePoints?.map((estimatePoint) => {
|
||||
if (estimateSystemSwitchType && estimatePoint.value && estimatePoint.value != "") {
|
||||
if (Number(estimatePoint.value) && Number(estimatePoint.value) >= 0) {
|
||||
estimatePointArray.push(estimatePoint.value);
|
||||
if (!isNaN(Number(estimatePoint.value))) {
|
||||
if (Number(estimatePoint.value) <= 0) {
|
||||
handleEstimatePointError(estimatePoint.key, "", "", "Estimate point should be greater than 0.");
|
||||
} else {
|
||||
estimatePointArray.push(estimatePoint.value);
|
||||
}
|
||||
} else {
|
||||
handleEstimatePointError(estimatePoint.key, "", "", "Estimate point value should be a number.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user