diff --git a/web/core/components/cycles/analytics-sidebar/issue-progress.tsx b/web/core/components/cycles/analytics-sidebar/issue-progress.tsx index c0ece831c00..f911b4418ad 100644 --- a/web/core/components/cycles/analytics-sidebar/issue-progress.tsx +++ b/web/core/components/cycles/analytics-sidebar/issue-progress.tsx @@ -32,7 +32,7 @@ type Options = { export const cycleEstimateOptions: Options[] = [ { value: "issues", label: "Work items" }, - { value: "points", label: "Points" }, + { value: "points", label: "Estimates" }, ]; export const cycleChartOptions: Options[] = [ { value: "burndown", label: "Burn-down" }, diff --git a/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx b/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx index 7eba6418d90..2899b7ca3af 100644 --- a/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx +++ b/web/core/components/cycles/dropdowns/estimate-type-dropdown.tsx @@ -1,5 +1,7 @@ import React from "react"; +import { observer } from "mobx-react-lite"; import { TCycleEstimateType } from "@plane/types"; +import { EEstimateSystem } from "@plane/types/src/enums"; import { CustomSelect } from "@plane/ui"; import { useCycle, useProjectEstimates } from "@/hooks/store"; import { cycleEstimateOptions } from "../analytics-sidebar"; @@ -12,12 +14,13 @@ type TProps = { cycleId: string; }; -export const EstimateTypeDropdown = (props: TProps) => { +export const EstimateTypeDropdown = observer((props: TProps) => { const { value, onChange, projectId, cycleId, showDefault = false } = props; const { getIsPointsDataAvailable } = useCycle(); - const { areEstimateEnabledByProjectId } = useProjectEstimates(); + const { areEstimateEnabledByProjectId, currentProjectEstimateType } = useProjectEstimates(); const isCurrentProjectEstimateEnabled = projectId && areEstimateEnabledByProjectId(projectId) ? true : false; - return getIsPointsDataAvailable(cycleId) || isCurrentProjectEstimateEnabled ? ( + return (getIsPointsDataAvailable(cycleId) || isCurrentProjectEstimateEnabled) && + currentProjectEstimateType !== EEstimateSystem.CATEGORIES ? (