diff --git a/web/ce/components/cycles/analytics-sidebar/base.tsx b/web/ce/components/cycles/analytics-sidebar/base.tsx index c259a4a81..40f098a2d 100644 --- a/web/ce/components/cycles/analytics-sidebar/base.tsx +++ b/web/ce/components/cycles/analytics-sidebar/base.tsx @@ -59,7 +59,7 @@ export const SidebarChart: FC = observer((props) => { } }; return ( - <> +
@@ -92,6 +92,6 @@ export const SidebarChart: FC = observer((props) => { )}
- + ); }); diff --git a/web/core/components/cycles/active-cycle/use-cycles-details.ts b/web/core/components/cycles/active-cycle/use-cycles-details.ts index 2bfe9951e..e0f48869a 100644 --- a/web/core/components/cycles/active-cycle/use-cycles-details.ts +++ b/web/core/components/cycles/active-cycle/use-cycles-details.ts @@ -30,13 +30,13 @@ const useCyclesDetails = (props: IActiveCycleDetails) => { // fetch cycle details useSWR( - workspaceSlug && projectId && cycle?.id ? `PROJECT_ACTIVE_CYCLE_${projectId}_PROGRESS` : null, + workspaceSlug && projectId && cycle?.id ? `PROJECT_ACTIVE_CYCLE_${projectId}_PROGRESS_${cycle.id}` : null, workspaceSlug && projectId && cycle?.id ? () => fetchActiveCycleProgress(workspaceSlug, projectId, cycle.id) : null, { revalidateIfStale: false, revalidateOnFocus: false } ); useSWR( workspaceSlug && projectId && cycle?.id && !cycle?.distribution - ? `PROJECT_ACTIVE_CYCLE_${projectId}_DURATION` + ? `PROJECT_ACTIVE_CYCLE_${projectId}_DURATION_${cycle.id}` : null, workspaceSlug && projectId && cycle?.id && !cycle?.distribution ? () => fetchActiveCycleAnalytics(workspaceSlug, projectId, cycle.id, "issues") @@ -44,7 +44,7 @@ const useCyclesDetails = (props: IActiveCycleDetails) => { ); useSWR( workspaceSlug && projectId && cycle?.id && !cycle?.estimate_distribution - ? `PROJECT_ACTIVE_CYCLE_${projectId}_ESTIMATE_DURATION` + ? `PROJECT_ACTIVE_CYCLE_${projectId}_ESTIMATE_DURATION_${cycle.id}` : null, workspaceSlug && projectId && cycle?.id && !cycle?.estimate_distribution ? () => fetchActiveCycleAnalytics(workspaceSlug, projectId, cycle.id, "points") diff --git a/web/core/components/cycles/analytics-sidebar/issue-progress.tsx b/web/core/components/cycles/analytics-sidebar/issue-progress.tsx index 47f9df5e5..c0ece831c 100644 --- a/web/core/components/cycles/analytics-sidebar/issue-progress.tsx +++ b/web/core/components/cycles/analytics-sidebar/issue-progress.tsx @@ -1,6 +1,6 @@ "use client"; -import { FC, Fragment, useCallback, useMemo } from "react"; +import { FC, useCallback, useMemo } from "react"; import isEmpty from "lodash/isEmpty"; import isEqual from "lodash/isEqual"; import { observer } from "mobx-react"; @@ -133,7 +133,7 @@ export const CycleAnalyticsProgress: FC = observer((pro if (!cycleDetails) return <>; return (
- + {({ open }) => (
{/* progress bar header */} @@ -161,24 +161,34 @@ export const CycleAnalyticsProgress: FC = observer((pro )} - - - {/* progress detailed view */} - {chartDistributionData && ( -
- + + {cycleStartDate && cycleEndDate ? ( + <> + {isCycleDateValid && ( + + )} + {/* progress detailed view */} + {chartDistributionData && ( +
+ +
+ )} + + ) : ( +
+ {t("no_data_yet")}
)}
diff --git a/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx b/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx index eaa460f7a..992d7f3ca 100644 --- a/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx +++ b/web/core/components/cycles/analytics-sidebar/sidebar-details.tsx @@ -125,7 +125,7 @@ export const CycleSidebarDetails: FC = observer((props) => { {/** * NOTE: Render this section when estimate points of he projects is enabled and the estimate system is points */} - {isEstimatePointValid && ( + {isEstimatePointValid && !isCompleted && (