diff --git a/web/core/components/estimates/estimate-list-item-buttons.tsx b/web/ce/components/estimates/estimate-list-item-buttons.tsx similarity index 56% rename from web/core/components/estimates/estimate-list-item-buttons.tsx rename to web/ce/components/estimates/estimate-list-item-buttons.tsx index d2da059ee..6911754f8 100644 --- a/web/core/components/estimates/estimate-list-item-buttons.tsx +++ b/web/ce/components/estimates/estimate-list-item-buttons.tsx @@ -1,6 +1,7 @@ import { FC } from "react"; import { observer } from "mobx-react"; -import { Pen, Trash } from "lucide-react"; +import { Crown, Pen, Trash } from "lucide-react"; +import { Tooltip } from "@plane/ui"; type TEstimateListItem = { estimateId: string; @@ -12,17 +13,24 @@ type TEstimateListItem = { }; export const EstimateListItemButtons: FC = observer((props) => { - const { estimateId, isAdmin, isEditable, onEditClick, onDeleteClick } = props; - if (!isAdmin || !isEditable) return <>; + const { estimateId, isAdmin, isEditable, onDeleteClick } = props; + if (!isAdmin || !isEditable) return <>; return (
-
+ } + position="top" > - - + + - - - - ); -}); diff --git a/web/core/components/estimates/update/stage-one.tsx b/web/core/components/estimates/update/stage-one.tsx deleted file mode 100644 index b64f7eb52..000000000 --- a/web/core/components/estimates/update/stage-one.tsx +++ /dev/null @@ -1,44 +0,0 @@ -"use client"; - -import { FC } from "react"; -import { Crown } from "lucide-react"; -import { TEstimateUpdateStageKeys } from "@plane/types"; -import { Tooltip } from "@plane/ui"; -// helpers -import { cn } from "@/helpers/common.helper"; -// plane web constants -import { ESTIMATE_OPTIONS_STAGE_ONE } from "@/plane-web/constants/estimates"; - -type TEstimateUpdateStageOne = { - handleEstimateEditType?: (stage: TEstimateUpdateStageKeys) => void; -}; - -export const EstimateUpdateStageOne: FC = (props) => { - const { handleEstimateEditType } = props; - - return ( -
- {ESTIMATE_OPTIONS_STAGE_ONE && - ESTIMATE_OPTIONS_STAGE_ONE.map((stage) => ( -
!stage?.is_ee && handleEstimateEditType && handleEstimateEditType(stage.key)} - > -

- {stage.title} - {stage?.is_ee && ( - - - - )} -

-

{stage.description}

-
- ))} -
- ); -}; diff --git a/web/core/constants/estimates.ts b/web/core/constants/estimates.ts deleted file mode 100644 index d50c55093..000000000 --- a/web/core/constants/estimates.ts +++ /dev/null @@ -1,136 +0,0 @@ -// types -import { TEstimateSystems } from "@plane/types"; - -export enum EEstimateSystem { - POINTS = "points", - CATEGORIES = "categories", - TIME = "time", -} - -export enum EEstimateUpdateStages { - CREATE = "create", - EDIT = "edit", - SWITCH = "switch", -} - -export const estimateCount.min = 2; -export const estimateCount.max = 6; - -export const ESTIMATE_SYSTEMS: TEstimateSystems = { - points: { - name: "Points", - templates: { - fibonacci: { - title: "Fibonacci", - values: [ - { id: undefined, key: 1, value: "1" }, - { id: undefined, key: 2, value: "2" }, - { id: undefined, key: 3, value: "3" }, - { id: undefined, key: 4, value: "5" }, - { id: undefined, key: 5, value: "8" }, - { id: undefined, key: 6, value: "13" }, - ], - }, - linear: { - title: "Linear", - values: [ - { id: undefined, key: 1, value: "1" }, - { id: undefined, key: 2, value: "2" }, - { id: undefined, key: 3, value: "3" }, - { id: undefined, key: 4, value: "4" }, - { id: undefined, key: 5, value: "5" }, - { id: undefined, key: 6, value: "6" }, - ], - }, - squares: { - title: "Squares", - values: [ - { id: undefined, key: 1, value: "1" }, - { id: undefined, key: 2, value: "4" }, - { id: undefined, key: 3, value: "9" }, - { id: undefined, key: 4, value: "16" }, - { id: undefined, key: 5, value: "25" }, - { id: undefined, key: 6, value: "36" }, - ], - }, - custom: { - title: "Custom", - values: [ - { id: undefined, key: 1, value: "1" }, - { id: undefined, key: 2, value: "2" }, - ], - hide: true, - }, - }, - is_available: true, - is_ee: false, - }, - categories: { - name: "Categories", - templates: { - t_shirt_sizes: { - title: "T-Shirt Sizes", - values: [ - { id: undefined, key: 1, value: "XS" }, - { id: undefined, key: 2, value: "S" }, - { id: undefined, key: 3, value: "M" }, - { id: undefined, key: 4, value: "L" }, - { id: undefined, key: 5, value: "XL" }, - { id: undefined, key: 6, value: "XXL" }, - ], - }, - easy_to_hard: { - title: "Easy to hard", - values: [ - { id: undefined, key: 1, value: "Easy" }, - { id: undefined, key: 2, value: "Medium" }, - { id: undefined, key: 3, value: "Hard" }, - { id: undefined, key: 4, value: "Very Hard" }, - ], - }, - custom: { - title: "Custom", - values: [ - { id: undefined, key: 1, value: "Easy" }, - { id: undefined, key: 2, value: "Hard" }, - ], - hide: true, - }, - }, - is_available: true, - is_ee: false, - }, - time: { - name: "Time", - templates: { - hours: { - title: "Hours", - values: [ - { id: undefined, key: 1, value: "1" }, - { id: undefined, key: 2, value: "2" }, - { id: undefined, key: 3, value: "3" }, - { id: undefined, key: 4, value: "4" }, - { id: undefined, key: 5, value: "5" }, - { id: undefined, key: 6, value: "6" }, - ], - }, - }, - is_available: false, - is_ee: true, - }, -}; - -export const ESTIMATE_OPTIONS_STAGE_ONE = [ - { - key: EEstimateUpdateStages.EDIT, - title: "Add, update or remove estimates", - description: "Manage current system either adding, updating or removing the points or categories.", - is_ee: true, - }, - { - key: EEstimateUpdateStages.SWITCH, - title: "Change estimate type", - description: "Convert your points system to categories system and vice versa.", - is_ee: true, - }, -]; diff --git a/web/ee/components/estimates/estimate-list-item-buttons.tsx b/web/ee/components/estimates/estimate-list-item-buttons.tsx new file mode 100644 index 000000000..4e5008ea5 --- /dev/null +++ b/web/ee/components/estimates/estimate-list-item-buttons.tsx @@ -0,0 +1 @@ +export * from "ce/components/estimates/estimate-list-item-buttons"; diff --git a/web/ee/components/estimates/index.ts b/web/ee/components/estimates/index.ts new file mode 100644 index 000000000..669788276 --- /dev/null +++ b/web/ee/components/estimates/index.ts @@ -0,0 +1 @@ +export * from "./estimate-list-item-buttons"; diff --git a/web/ee/components/estimates/update/index.ts b/web/ee/components/estimates/update/index.ts new file mode 100644 index 000000000..031608e25 --- /dev/null +++ b/web/ee/components/estimates/update/index.ts @@ -0,0 +1 @@ +export * from "./modal"; diff --git a/web/ee/components/estimates/update/modal.tsx b/web/ee/components/estimates/update/modal.tsx new file mode 100644 index 000000000..5c7d0b725 --- /dev/null +++ b/web/ee/components/estimates/update/modal.tsx @@ -0,0 +1 @@ +export * from "ce/components/estimates/update/modal"; diff --git a/web/ee/constants/estimates.ts b/web/ee/constants/estimates.ts index 654243fa1..06376ef9d 100644 --- a/web/ee/constants/estimates.ts +++ b/web/ee/constants/estimates.ts @@ -1,3 +1 @@ -import * as ceConstants from "@/plane-web/constants/estimates"; - -export { ceConstants }; +export * from "ce/constants/estimates";