[WEB-522] chore: handled maximum no of char that user can enter in estimate point create and update (#4913)

* chore: handled maximum no of char that user can enter in estimate point create and update

* chore: typo
This commit is contained in:
guru_sainath
2024-06-24 13:27:59 +05:30
committed by GitHub
parent 716a35779c
commit 1c8e709870
3 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,8 @@
// types
import { TEstimateSystems } from "@plane/types";
export const MAX_ESTIMATE_POINT_INPUT_LENGTH = 20;
export enum EEstimateSystem {
POINTS = "points",
CATEGORIES = "categories",

View File

@@ -11,7 +11,7 @@ import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimate } from "@/hooks/store";
// plane web constants
import { EEstimateSystem } from "@/plane-web/constants/estimates";
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointCreate = {
workspaceSlug: string;
@@ -155,7 +155,7 @@ export const EstimatePointCreate: FC<TEstimatePointCreate> = observer((props) =>
const inputProps = {
type: inputFieldType,
pattern: inputFieldType === "number" ? "[0-9]*" : undefined,
maxlength: inputFieldType === "number" ? undefined : 24,
maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};
return (

View File

@@ -11,7 +11,7 @@ import { isEstimatePointValuesRepeated } from "@/helpers/estimates";
// hooks
import { useEstimatePoint } from "@/hooks/store";
// plane web constants
import { EEstimateSystem } from "@/plane-web/constants/estimates";
import { EEstimateSystem, MAX_ESTIMATE_POINT_INPUT_LENGTH } from "@/plane-web/constants/estimates";
type TEstimatePointUpdate = {
workspaceSlug: string;
@@ -163,7 +163,7 @@ export const EstimatePointUpdate: FC<TEstimatePointUpdate> = observer((props) =>
const inputProps = {
type: inputFieldType,
pattern: inputFieldType === "number" ? "[0-9]*" : undefined,
maxlength: inputFieldType === "number" ? undefined : 24,
maxlength: MAX_ESTIMATE_POINT_INPUT_LENGTH,
};
return (