import Link from "next/link"; import { useRouter } from "next/router"; // ui import { Tooltip } from "components/ui"; // helpers import { renderShortDate } from "helpers/date-time.helper"; // types import { ICycle, IIssue, IModule } from "types"; // constants import { MODULE_STATUS } from "constants/module"; export const IssueGanttBlock = ({ issue }: { issue: IIssue }) => { const router = useRouter(); const { workspaceSlug } = router.query; return ( {issue.name} {renderShortDate(issue.start_date ?? "")} to{" "} {renderShortDate(issue.target_date ?? "")} } position="top-left" > {issue.name} ); }; export const CycleGanttBlock = ({ cycle }: { cycle: ICycle }) => { const router = useRouter(); const { workspaceSlug } = router.query; return ( {cycle.name} {renderShortDate(cycle.start_date ?? "")} to {renderShortDate(cycle.end_date ?? "")} } position="top-left" > {cycle.name} ); }; export const ModuleGanttBlock = ({ module }: { module: IModule }) => { const router = useRouter(); const { workspaceSlug } = router.query; return ( s.value === module.status)?.color }} /> {module.name} {renderShortDate(module.start_date ?? "")} to{" "} {renderShortDate(module.target_date ?? "")} } position="top-left" > {module.name} ); };