mirror of
https://github.com/makeplane/plane
synced 2025-08-07 19:59:33 +00:00
[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:
@@ -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",
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user