diff --git a/web/components/cycles/transfer-issues.tsx b/web/components/cycles/transfer-issues.tsx index 7c0d0d475..517df4421 100644 --- a/web/components/cycles/transfer-issues.tsx +++ b/web/components/cycles/transfer-issues.tsx @@ -16,12 +16,13 @@ import { CYCLE_DETAILS } from "constants/fetch-keys"; type Props = { handleClick: () => void; + disabled?: boolean; }; const cycleService = new CycleService(); export const TransferIssues: React.FC = (props) => { - const { handleClick } = props; + const { handleClick, disabled = false } = props; const router = useRouter(); const { workspaceSlug, projectId, cycleId } = router.query; @@ -46,7 +47,12 @@ export const TransferIssues: React.FC = (props) => { {isEmpty(cycleDetails?.progress_snapshot) && transferableIssuesCount > 0 && (
-
diff --git a/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx b/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx index 4f7088c38..bc9c8c397 100644 --- a/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx +++ b/web/components/issues/issue-layouts/roots/cycle-layout-root.tsx @@ -3,6 +3,7 @@ import { useRouter } from "next/router"; import { observer } from "mobx-react-lite"; import useSWR from "swr"; import size from "lodash/size"; +import isEmpty from "lodash/isEmpty"; // hooks import { useCycle, useIssues } from "hooks/store"; // components @@ -89,7 +90,12 @@ export const CycleLayoutRoot: React.FC = observer(() => { <> setTransferIssuesModal(false)} isOpen={transferIssuesModal} />
- {cycleStatus === "completed" && setTransferIssuesModal(true)} />} + {cycleStatus === "completed" && ( + setTransferIssuesModal(true)} + disabled={!isEmpty(cycleDetails?.progress_snapshot) ?? false} + /> + )} {issues?.groupedIssueIds?.length === 0 ? (