[WEB-3737]chore: estimates code refactor and translations (#6857)
* * chore: refactored estimates components. * chore: added translations for estimates components. * fix: translation key update
This commit is contained in:
parent
9c1b158291
commit
9c10235fca
38 changed files with 1309 additions and 133 deletions
13
web/ce/components/estimates/helper.tsx
Normal file
13
web/ce/components/estimates/helper.tsx
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import { TEstimateSystemKeys } from "@plane/types";
|
||||
import { EEstimateSystem } from "@plane/types/src/enums";
|
||||
|
||||
export const isEstimateSystemEnabled = (key: TEstimateSystemKeys) => {
|
||||
switch (key) {
|
||||
case EEstimateSystem.POINTS:
|
||||
return true;
|
||||
case EEstimateSystem.CATEGORIES:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
export * from "./estimate-list-item-buttons";
|
||||
export * from "./update";
|
||||
export * from "./points";
|
||||
export * from "./helper";
|
||||
|
|
|
|||
1
web/ce/components/estimates/inputs/index.ts
Normal file
1
web/ce/components/estimates/inputs/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export * from "./time-input";
|
||||
8
web/ce/components/estimates/inputs/time-input.tsx
Normal file
8
web/ce/components/estimates/inputs/time-input.tsx
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import { FC } from "react";
|
||||
|
||||
export type TEstimateTimeInputProps = {
|
||||
value?: number;
|
||||
handleEstimateInputValue: (value: string) => void;
|
||||
};
|
||||
|
||||
export const EstimateTimeInput: FC<TEstimateTimeInputProps> = () => <></>;
|
||||
|
|
@ -2,16 +2,18 @@
|
|||
|
||||
import { FC } from "react";
|
||||
|
||||
import { TEstimateTypeErrorObject } from "@plane/types";
|
||||
import { TEstimatePointsObject, TEstimateSystemKeys, TEstimateTypeErrorObject } from "@plane/types";
|
||||
|
||||
type TEstimatePointDelete = {
|
||||
export type TEstimatePointDelete = {
|
||||
workspaceSlug: string;
|
||||
projectId: string;
|
||||
estimateId: string;
|
||||
estimatePointId: string;
|
||||
estimatePoints: TEstimatePointsObject[];
|
||||
callback: () => void;
|
||||
estimatePointError?: TEstimateTypeErrorObject | undefined;
|
||||
handleEstimatePointError?: (newValue: string, message: string | undefined, mode?: "add" | "delete") => void;
|
||||
estimateSystem: TEstimateSystemKeys;
|
||||
};
|
||||
|
||||
export const EstimatePointDelete: FC<TEstimatePointDelete> = () => <></>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue