chore: estimate input type validation in estimate switch

This commit is contained in:
gurusainath
2024-07-09 15:08:18 +05:30
parent ad47203ad2
commit 56206eb204

View File

@@ -152,11 +152,9 @@ export const EstimatePointCreate: FC<TEstimatePointCreate> = observer((props) =>
};
// derived values
const inputFieldType =
estimateType && [(EEstimateSystem.TIME, EEstimateSystem.POINTS)].includes(estimateType) ? "number" : "text";
const inputProps = {
type: inputFieldType,
pattern: inputFieldType === "number" ? "[0-9]*" : undefined,
type: "text",
pattern: undefined,
maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};