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/points/create.tsx b/web/core/components/estimates/points/create.tsx index 0816575b3..0707b6137 100644 --- a/web/core/components/estimates/points/create.tsx +++ b/web/core/components/estimates/points/create.tsx @@ -5,13 +5,13 @@ import { observer } from "mobx-react"; import { Check, Info, X } from "lucide-react"; import { TEstimatePointsObject, TEstimateSystemKeys } from "@plane/types"; import { Spinner, TOAST_TYPE, Tooltip, setToast } from "@plane/ui"; -// constants -import { EEstimateSystem } from "@/constants/estimates"; // helpers import { cn } from "@/helpers/common.helper"; import { isEstimatePointValuesRepeated } from "@/helpers/estimates"; // hooks import { useEstimate } from "@/hooks/store"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; type TEstimatePointCreate = { workspaceSlug: string; diff --git a/web/core/components/estimates/points/preview.tsx b/web/core/components/estimates/points/preview.tsx index bfd9bd9dc..e8f27e00d 100644 --- a/web/core/components/estimates/points/preview.tsx +++ b/web/core/components/estimates/points/preview.tsx @@ -4,7 +4,8 @@ import { GripVertical, Pencil, Trash2 } from "lucide-react"; import { TEstimatePointsObject, TEstimateSystemKeys } from "@plane/types"; // components import { EstimatePointUpdate, EstimatePointDelete } from "@/components/estimates/points"; -import { minEstimatesCount } from "@/constants/estimates"; +// plane web constants +import { estimateCount } from "@/plane-web/constants/estimates"; type TEstimatePointItemPreview = { workspaceSlug: string; @@ -61,7 +62,7 @@ export const EstimatePointItemPreview: FC = observer( > - {estimatePoints.length > minEstimatesCount && ( + {estimatePoints.length > estimateCount.min && (
diff --git a/web/core/components/estimates/points/update.tsx b/web/core/components/estimates/points/update.tsx index faf55f522..ccb0f92da 100644 --- a/web/core/components/estimates/points/update.tsx +++ b/web/core/components/estimates/points/update.tsx @@ -5,13 +5,13 @@ import { observer } from "mobx-react"; import { Check, Info, X } from "lucide-react"; import { TEstimatePointsObject, TEstimateSystemKeys } from "@plane/types"; import { Spinner, TOAST_TYPE, Tooltip, setToast } from "@plane/ui"; -// constants -import { EEstimateSystem } from "@/constants/estimates"; // helpers import { cn } from "@/helpers/common.helper"; import { isEstimatePointValuesRepeated } from "@/helpers/estimates"; // hooks import { useEstimatePoint } from "@/hooks/store"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; type TEstimatePointUpdate = { workspaceSlug: string; diff --git a/web/core/components/estimates/root.tsx b/web/core/components/estimates/root.tsx index 1e5df5492..4cecd9478 100644 --- a/web/core/components/estimates/root.tsx +++ b/web/core/components/estimates/root.tsx @@ -7,12 +7,13 @@ import { EstimateEmptyScreen, EstimateDisableSwitch, CreateEstimateModal, - UpdateEstimateModal, DeleteEstimateModal, EstimateList, } from "@/components/estimates"; // hooks import { useProject, useProjectEstimates } from "@/hooks/store"; +// plane web components +import { UpdateEstimateModal } from "@/plane-web/components/estimates"; type TEstimateRoot = { workspaceSlug: string; diff --git a/web/core/components/estimates/update/index.ts b/web/core/components/estimates/update/index.ts deleted file mode 100644 index 7de8cb988..000000000 --- a/web/core/components/estimates/update/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from "./modal"; -export * from "./stage-one"; diff --git a/web/core/components/estimates/update/modal.tsx b/web/core/components/estimates/update/modal.tsx deleted file mode 100644 index 2ffde8ca5..000000000 --- a/web/core/components/estimates/update/modal.tsx +++ /dev/null @@ -1,44 +0,0 @@ -"use client"; - -import { FC } from "react"; -import { observer } from "mobx-react"; -import { Button } from "@plane/ui"; -// components -import { EModalPosition, EModalWidth, ModalCore } from "@/components/core"; -import { EstimateUpdateStageOne } from "@/components/estimates"; - -type TUpdateEstimateModal = { - workspaceSlug: string; - projectId: string; - estimateId: string | undefined; - isOpen: boolean; - handleClose: () => void; -}; - -export const UpdateEstimateModal: FC = observer((props) => { - // props - const { isOpen, handleClose } = props; - - return ( - -
- {/* heading */} -
-
-
Edit estimate system
-
-
- -
- -
- -
- -
-
-
- ); -}); 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 b031f453c..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"; -// constants -import { ESTIMATE_OPTIONS_STAGE_ONE } from "@/constants/estimates"; -// helpers -import { cn } from "@/helpers/common.helper"; - -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/components/modules/analytics-sidebar/issue-progress.tsx b/web/core/components/modules/analytics-sidebar/issue-progress.tsx index bc222c882..625b5ed2a 100644 --- a/web/core/components/modules/analytics-sidebar/issue-progress.tsx +++ b/web/core/components/modules/analytics-sidebar/issue-progress.tsx @@ -12,12 +12,13 @@ import { CustomSelect, Spinner } from "@plane/ui"; import ProgressChart from "@/components/core/sidebar/progress-chart"; import { ModuleProgressStats } from "@/components/modules"; // constants -import { EEstimateSystem } from "@/constants/estimates"; import { EIssueFilterType, EIssuesStoreType } from "@/constants/issue"; // helpers import { getDate } from "@/helpers/date-time.helper"; // hooks import { useIssues, useModule, useProjectEstimates } from "@/hooks/store"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; type TModuleAnalyticsProgress = { workspaceSlug: string; diff --git a/web/core/components/modules/analytics-sidebar/root.tsx b/web/core/components/modules/analytics-sidebar/root.tsx index b195d9fa3..66c85d4b4 100644 --- a/web/core/components/modules/analytics-sidebar/root.tsx +++ b/web/core/components/modules/analytics-sidebar/root.tsx @@ -34,8 +34,6 @@ import { import { LinkModal, LinksList } from "@/components/core"; import { DateRangeDropdown, MemberDropdown } from "@/components/dropdowns"; import { ArchiveModuleModal, DeleteModuleModal, ModuleAnalyticsProgress } from "@/components/modules"; -// constant -import { EEstimateSystem } from "@/constants/estimates"; import { MODULE_LINK_CREATED, MODULE_LINK_DELETED, @@ -49,6 +47,8 @@ import { getDate, renderFormattedPayloadDate } from "@/helpers/date-time.helper" import { copyUrlToClipboard } from "@/helpers/string.helper"; // hooks import { useModule, useUser, useEventTracker, useProjectEstimates } from "@/hooks/store"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; const defaultValues: Partial = { lead_id: "", diff --git a/web/core/components/modules/module-card-item.tsx b/web/core/components/modules/module-card-item.tsx index c19629242..e80af8166 100644 --- a/web/core/components/modules/module-card-item.tsx +++ b/web/core/components/modules/module-card-item.tsx @@ -12,7 +12,6 @@ import { FavoriteStar } from "@/components/core"; import { ButtonAvatars } from "@/components/dropdowns/member/avatar"; import { ModuleQuickActions } from "@/components/modules"; // constants -import { EEstimateSystem } from "@/constants/estimates"; import { MODULE_FAVORITED, MODULE_UNFAVORITED } from "@/constants/event-tracker"; import { MODULE_STATUS } from "@/constants/module"; import { EUserProjectRoles } from "@/constants/project"; @@ -22,6 +21,8 @@ import { generateQueryParams } from "@/helpers/router.helper"; // hooks import { useEventTracker, useMember, useModule, useProjectEstimates, useUser } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; type Props = { moduleId: string; diff --git a/web/core/components/modules/module-list-item.tsx b/web/core/components/modules/module-list-item.tsx index cf756795e..ddbfad897 100644 --- a/web/core/components/modules/module-list-item.tsx +++ b/web/core/components/modules/module-list-item.tsx @@ -10,13 +10,13 @@ import { CircularProgressIndicator } from "@plane/ui"; // components import { ListItem } from "@/components/core/list"; import { ModuleListItemAction } from "@/components/modules"; -// constants -import { EEstimateSystem } from "@/constants/estimates"; // helpers import { generateQueryParams } from "@/helpers/router.helper"; // hooks import { useAppRouter, useModule, useProjectEstimates } from "@/hooks/store"; import { usePlatformOS } from "@/hooks/use-platform-os"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; type Props = { moduleId: string; 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 new file mode 100644 index 000000000..06376ef9d --- /dev/null +++ b/web/ee/constants/estimates.ts @@ -0,0 +1 @@ +export * from "ce/constants/estimates"; diff --git a/web/helpers/estimates.ts b/web/helpers/estimates.ts index cf8cd2dc8..62676503d 100644 --- a/web/helpers/estimates.ts +++ b/web/helpers/estimates.ts @@ -1,4 +1,5 @@ -import { EEstimateSystem } from "@/constants/estimates"; +// plane web constants +import { EEstimateSystem } from "@/plane-web/constants/estimates"; export const isEstimatePointValuesRepeated = ( estimatePoints: string[],