Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dev: Helpers * dev: views * dev: Chart views Month, Year and Day * dev: Chart Workflow updates * update: scroll functionality implementation * update: data vaidation * update: date renders and issue filter in the month view * update: new date render month view * update: scroll enabled left in chart * update: Item render from the date it created. * update: width implementation in chat view * dev: chart render functionality in the gantt chart * update: month view fix * dev: chart render issues resolved * update: fixed allchat views * update: updated week view default values * update: integrated chart view in issues * update: grabble and sidebar logic impleemntation and integrated gantt in issues * update: Preview gantt chart in month view * fix: mutation in gantt chart after creating a new issue * chore: cycles and modules list gantt chart * update: Ui changes on gantt view * fix: gantt chart height, chore: remove link from issue --------- Co-authored-by: Aaryan Khandelwal <aaryankhandu123@gmail.com>
- Loading branch information
1 parent
9ccc35d
commit e1e9a5e
Showing
49 changed files
with
3,251 additions
and
140 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useRouter } from "next/router"; | ||
|
||
// components | ||
import { CycleIssuesGanttChartView } from "components/cycles"; | ||
import { IssueGanttChartView } from "components/issues/gantt-chart"; | ||
import { ModuleIssuesGanttChartView } from "components/modules"; | ||
import { ViewIssuesGanttChartView } from "components/views"; | ||
|
||
export const GanttChartView = () => { | ||
const router = useRouter(); | ||
const { cycleId, moduleId, viewId } = router.query; | ||
|
||
return ( | ||
<> | ||
{cycleId ? ( | ||
<CycleIssuesGanttChartView /> | ||
) : moduleId ? ( | ||
<ModuleIssuesGanttChartView /> | ||
) : viewId ? ( | ||
<ViewIssuesGanttChartView /> | ||
) : ( | ||
<IssueGanttChartView /> | ||
)} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { FC } from "react"; | ||
|
||
// components | ||
import { GanttChartRoot } from "components/gantt-chart"; | ||
// types | ||
import { ICycle } from "types"; | ||
|
||
type Props = { | ||
cycles: ICycle[]; | ||
}; | ||
|
||
export const CyclesListGanttChartView: FC<Props> = ({ cycles }) => { | ||
// rendering issues on gantt sidebar | ||
const GanttSidebarBlockView = ({ data }: any) => ( | ||
<div className="relative flex w-full h-full items-center p-1 overflow-hidden gap-1"> | ||
<div | ||
className="rounded-sm flex-shrink-0 w-[10px] h-[10px] flex justify-center items-center" | ||
style={{ backgroundColor: "#858e96" }} | ||
/> | ||
<div className="text-brand-base text-sm">{data?.name}</div> | ||
</div> | ||
); | ||
|
||
// rendering issues on gantt card | ||
const GanttBlockView = ({ data }: { data: ICycle }) => ( | ||
<div className="relative flex w-full h-full overflow-hidden"> | ||
<div className="flex-shrink-0 w-[4px] h-auto" style={{ backgroundColor: "#858e96" }} /> | ||
<div className="inline-block text-brand-base text-sm whitespace-nowrap py-[4px] px-1.5"> | ||
{data?.name} | ||
</div> | ||
</div> | ||
); | ||
|
||
// handle gantt issue start date and target date | ||
const handleUpdateDates = async (data: any) => { | ||
const payload = { | ||
id: data?.id, | ||
start_date: data?.start_date, | ||
target_date: data?.target_date, | ||
}; | ||
}; | ||
|
||
const blockFormat = (blocks: any) => | ||
blocks && blocks.length > 0 | ||
? blocks.map((_block: any) => { | ||
if (_block?.start_date && _block.target_date) console.log("_block", _block); | ||
return { | ||
start_date: new Date(_block.created_at), | ||
target_date: new Date(_block.updated_at), | ||
data: _block, | ||
}; | ||
}) | ||
: []; | ||
|
||
return ( | ||
<div className="w-full h-full overflow-y-auto"> | ||
<GanttChartRoot | ||
title={"Cycles"} | ||
loaderTitle="Cycles" | ||
blocks={cycles ? blockFormat(cycles) : null} | ||
blockUpdateHandler={handleUpdateDates} | ||
sidebarBlockRender={(data: any) => <GanttSidebarBlockView data={data} />} | ||
blockRender={(data: any) => <GanttBlockView data={data} />} | ||
/> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.
e1e9a5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
plane-dev – ./apps/app
plane-dev-plane.vercel.app
plane-dev-git-develop-plane.vercel.app
plane-dev.vercel.app