diff --git a/apps/app/components/cycles/active-cycle-details.tsx b/apps/app/components/cycles/active-cycle-details.tsx index 0bb5a6bcb..21f37e5a6 100644 --- a/apps/app/components/cycles/active-cycle-details.tsx +++ b/apps/app/components/cycles/active-cycle-details.tsx @@ -41,11 +41,10 @@ import { truncateText } from "helpers/string.helper"; // types import { ICycle, IIssue } from "types"; // fetch-keys -import { CURRENT_CYCLE_LIST, CYCLES_LIST, CYCLE_ISSUES } from "constants/fetch-keys"; +import { CURRENT_CYCLE_LIST, CYCLES_LIST, CYCLE_ISSUES_WITH_PARAMS } from "constants/fetch-keys"; type TSingleStatProps = { cycle: ICycle; - isCompleted?: boolean; }; const stateGroups = [ @@ -76,7 +75,7 @@ const stateGroups = [ }, ]; -export const ActiveCycleDetails: React.FC = ({ cycle, isCompleted = false }) => { +export const ActiveCycleDetails: React.FC = ({ cycle }) => { const router = useRouter(); const { workspaceSlug, projectId } = router.query; @@ -165,17 +164,20 @@ export const ActiveCycleDetails: React.FC = ({ cycle, isComple }); }; - const { data: issues } = useSWR( - workspaceSlug && projectId && cycle.id ? CYCLE_ISSUES(cycle.id as string) : null, + const { data: issues } = useSWR( + workspaceSlug && projectId && cycle.id + ? CYCLE_ISSUES_WITH_PARAMS(cycle.id, { priority: "high" }) + : null, workspaceSlug && projectId && cycle.id ? () => - cyclesService.getCycleIssues( + cyclesService.getCycleIssuesWithParams( workspaceSlug as string, projectId as string, - cycle.id as string + cycle.id, + { priority: "high" } ) : null - ); + ) as { data: IIssue[] }; const progressIndicatorData = stateGroups.map((group, index) => ({ id: index, diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx index 97519f41a..2bd2aa1b9 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/cycles/index.tsx @@ -200,7 +200,7 @@ const ProjectCycles: NextPage = () => { {cyclesView !== "gantt_chart" && ( - + {currentCycle?.[0] ? ( ) : ( diff --git a/apps/app/services/cycles.service.ts b/apps/app/services/cycles.service.ts index d305ee63e..c8af558d2 100644 --- a/apps/app/services/cycles.service.ts +++ b/apps/app/services/cycles.service.ts @@ -77,7 +77,7 @@ class ProjectCycleServices extends APIService { workspaceSlug: string, projectId: string, cycleId: string, - queries?: Partial + queries?: any ): Promise { return this.get( `/api/workspaces/${workspaceSlug}/projects/${projectId}/cycles/${cycleId}/cycle-issues/`,