2023-05-20 12:00:15 +00:00
|
|
|
import { useRouter } from "next/router";
|
|
|
|
|
|
|
|
// components
|
|
|
|
import { CycleIssuesGanttChartView } from "components/cycles";
|
2023-07-23 16:44:41 +00:00
|
|
|
import { IssueGanttChartView } from "components/issues";
|
2023-05-20 12:00:15 +00:00
|
|
|
import { ModuleIssuesGanttChartView } from "components/modules";
|
|
|
|
import { ViewIssuesGanttChartView } from "components/views";
|
|
|
|
|
2023-09-13 14:03:58 +00:00
|
|
|
type Props = {
|
|
|
|
disableUserActions: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export const GanttChartView: React.FC<Props> = ({ disableUserActions }) => {
|
2023-05-20 12:00:15 +00:00
|
|
|
const router = useRouter();
|
|
|
|
const { cycleId, moduleId, viewId } = router.query;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
{cycleId ? (
|
2023-09-13 14:03:58 +00:00
|
|
|
<CycleIssuesGanttChartView disableUserActions={disableUserActions} />
|
2023-05-20 12:00:15 +00:00
|
|
|
) : moduleId ? (
|
2023-09-13 14:03:58 +00:00
|
|
|
<ModuleIssuesGanttChartView disableUserActions={disableUserActions} />
|
2023-05-20 12:00:15 +00:00
|
|
|
) : viewId ? (
|
2023-09-13 14:03:58 +00:00
|
|
|
<ViewIssuesGanttChartView disableUserActions={disableUserActions} />
|
2023-05-20 12:00:15 +00:00
|
|
|
) : (
|
2023-09-13 14:03:58 +00:00
|
|
|
<IssueGanttChartView disableUserActions={disableUserActions} />
|
2023-05-20 12:00:15 +00:00
|
|
|
)}
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|