diff --git a/apps/app/components/core/board-view/single-board.tsx b/apps/app/components/core/board-view/single-board.tsx index a4f869cb3..16fe0e887 100644 --- a/apps/app/components/core/board-view/single-board.tsx +++ b/apps/app/components/core/board-view/single-board.tsx @@ -99,7 +99,7 @@ export const SingleBoard: React.FC = ({ )} -
+
{groupedByIssues?.[groupTitle].map((issue, index) => ( = ({ cycles }) => { + const router = useRouter(); + const { workspaceSlug, projectId } = router.query; + // rendering issues on gantt sidebar const GanttSidebarBlockView = ({ data }: any) => (
@@ -23,12 +28,14 @@ export const CyclesListGanttChartView: FC = ({ cycles }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: ICycle }) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/cycles/gantt-chart.tsx b/apps/app/components/cycles/gantt-chart.tsx index 04de7afb7..44abc392b 100644 --- a/apps/app/components/cycles/gantt-chart.tsx +++ b/apps/app/components/cycles/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const CycleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/gantt-chart/blocks/index.tsx b/apps/app/components/gantt-chart/blocks/index.tsx index 113ca8964..f2d44b294 100644 --- a/apps/app/components/gantt-chart/blocks/index.tsx +++ b/apps/app/components/gantt-chart/blocks/index.tsx @@ -18,7 +18,7 @@ export const GanttChartBlocks: FC<{ return (
@@ -39,12 +39,12 @@ export const GanttChartBlocks: FC<{ >
- {block?.start_date ? datePreview(block?.start_date, true) : "-"} + {block?.start_date ? datePreview(block?.start_date) : "-"}
- {block?.target_date ? datePreview(block?.target_date, true) : "-"} + {block?.target_date ? datePreview(block?.target_date) : "-"}
diff --git a/apps/app/components/gantt-chart/chart/index.tsx b/apps/app/components/gantt-chart/chart/index.tsx index 6724c3552..72d6888e2 100644 --- a/apps/app/components/gantt-chart/chart/index.tsx +++ b/apps/app/components/gantt-chart/chart/index.tsx @@ -37,6 +37,7 @@ import { datePreview, currentViewDataWithView } from "../data"; import { useChart } from "../hooks"; type ChartViewRootProps = { + border: boolean; title: null | string; loaderTitle: string; blocks: any; @@ -46,6 +47,7 @@ type ChartViewRootProps = { }; export const ChartViewRoot: FC = ({ + border, title, blocks = null, loaderTitle, @@ -214,10 +216,12 @@ export const ChartViewRoot: FC = ({
{/* chart title */} -
+ {/*
{title && (
{title}
@@ -233,7 +237,7 @@ export const ChartViewRoot: FC = ({ {blocks.length} {loaderTitle}
)} -
+
*/} {/* chart header */}
@@ -248,10 +252,23 @@ export const ChartViewRoot: FC = ({ )}
*/} -
- {`${datePreview(currentViewData?.data?.startDate)} - ${datePreview( - currentViewData?.data?.endDate - )}`} + {title && ( +
+
{title}
+
+ Gantt View Beta +
+
+ )} + +
+ {blocks === null ? ( +
Loading...
+ ) : ( +
+ {blocks.length} {loaderTitle} +
+ )}
@@ -260,7 +277,7 @@ export const ChartViewRoot: FC = ({ allViews.map((_chatView: any, _idx: any) => (
handleChartView(_chatView?.key)} @@ -272,7 +289,7 @@ export const ChartViewRoot: FC = ({
Today diff --git a/apps/app/components/gantt-chart/chart/month.tsx b/apps/app/components/gantt-chart/chart/month.tsx index 15d02c488..197ac9930 100644 --- a/apps/app/components/gantt-chart/chart/month.tsx +++ b/apps/app/components/gantt-chart/chart/month.tsx @@ -37,7 +37,7 @@ export const MonthChartView: FC = () => {
diff --git a/apps/app/components/gantt-chart/root.tsx b/apps/app/components/gantt-chart/root.tsx index 787df0e46..c52bc55b0 100644 --- a/apps/app/components/gantt-chart/root.tsx +++ b/apps/app/components/gantt-chart/root.tsx @@ -5,6 +5,7 @@ import { ChartViewRoot } from "./chart"; import { ChartContextProvider } from "./contexts"; type GanttChartRootProps = { + border?: boolean; title: null | string; loaderTitle: string; blocks: any; @@ -14,6 +15,7 @@ type GanttChartRootProps = { }; export const GanttChartRoot: FC = ({ + border = true, title = null, blocks, loaderTitle = "blocks", @@ -23,6 +25,7 @@ export const GanttChartRoot: FC = ({ }) => ( = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date @@ -67,8 +68,9 @@ export const IssueGanttChartView: FC = ({}) => { : []; return ( -
+
= ({ noChevron position={position} disabled={isNotAllowed} + selfPositioned={selfPositioned} + dropdownWidth="w-full min-w-[8rem]" /> ); }; diff --git a/apps/app/components/modules/gantt-chart.tsx b/apps/app/components/modules/gantt-chart.tsx index 0d11da2c0..fa92964c1 100644 --- a/apps/app/components/modules/gantt-chart.tsx +++ b/apps/app/components/modules/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const ModuleIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/modules/modules-list-gantt-chart.tsx b/apps/app/components/modules/modules-list-gantt-chart.tsx index edff17a95..cb1c7bc07 100644 --- a/apps/app/components/modules/modules-list-gantt-chart.tsx +++ b/apps/app/components/modules/modules-list-gantt-chart.tsx @@ -1,5 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; +import { useRouter } from "next/router"; // components import { GanttChartRoot } from "components/gantt-chart"; // types @@ -12,6 +14,9 @@ type Props = { }; export const ModulesListGanttChartView: FC = ({ modules }) => { + const router = useRouter(); + const { workspaceSlug, projectId } = router.query; + // rendering issues on gantt sidebar const GanttSidebarBlockView = ({ data }: any) => (
@@ -27,15 +32,17 @@ export const ModulesListGanttChartView: FC = ({ modules }) => { // rendering issues on gantt card const GanttBlockView = ({ data }: { data: IModule }) => ( -
-
s.value === data.status)?.color }} - /> -
- {data?.name} -
-
+ + +
s.value === data.status)?.color }} + /> +
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date diff --git a/apps/app/components/ui/custom-search-select.tsx b/apps/app/components/ui/custom-search-select.tsx index ef0943377..fb1c0a88c 100644 --- a/apps/app/components/ui/custom-search-select.tsx +++ b/apps/app/components/ui/custom-search-select.tsx @@ -29,6 +29,7 @@ type CustomSearchSelectProps = { selfPositioned?: boolean; multiple?: boolean; footerOption?: JSX.Element; + dropdownWidth?: string; }; export const CustomSearchSelect = ({ label, @@ -47,6 +48,7 @@ export const CustomSearchSelect = ({ selfPositioned = false, multiple = false, footerOption, + dropdownWidth, }: CustomSearchSelectProps) => { const [query, setQuery] = useState(""); @@ -108,7 +110,9 @@ export const CustomSearchSelect = ({ position === "right" ? "right-0" : "left-0" } ${ verticalPosition === "top" ? "bottom-full mb-1" : "mt-1" - } z-10 origin-top-right rounded-md bg-brand-surface-1 text-xs shadow-lg focus:outline-none`} + } z-10 origin-top-right rounded-md bg-brand-surface-1 text-xs shadow-lg focus:outline-none ${ + dropdownWidth ? dropdownWidth : `` + } `} >
diff --git a/apps/app/components/views/gantt-chart.tsx b/apps/app/components/views/gantt-chart.tsx index 461f46835..dc81f70fa 100644 --- a/apps/app/components/views/gantt-chart.tsx +++ b/apps/app/components/views/gantt-chart.tsx @@ -1,7 +1,7 @@ import { FC } from "react"; - +// next imports +import Link from "next/link"; import { useRouter } from "next/router"; - // components import { GanttChartRoot } from "components/gantt-chart"; // hooks @@ -32,15 +32,17 @@ export const ViewIssuesGanttChartView: FC = ({}) => { // rendering issues on gantt card const GanttBlockView = ({ data }: any) => ( -
-
-
- {data?.name} -
-
+ + +
+
+ {data?.name} +
+
+ ); // handle gantt issue start date and target date