data and layout cleanup

This commit is contained in:
2026-03-15 21:26:08 -05:00
parent ac0c6e4365
commit 8029b308e9
4 changed files with 19 additions and 160 deletions

View File

@@ -48,6 +48,9 @@ export function GanttPage() {
const links = timeline?.links ?? [];
const summary = timeline?.summary;
const exceptions = timeline?.exceptions ?? [];
const ganttCellHeight = 44;
const ganttScaleHeight = 56;
const ganttHeight = Math.max(420, tasks.length * ganttCellHeight + ganttScaleHeight);
return (
<section className="space-y-4">
@@ -104,7 +107,7 @@ export function GanttPage() {
</section>
<div className="grid gap-3 xl:grid-cols-[minmax(0,1.2fr)_360px]">
<div
className={`gantt-theme overflow-auto rounded-[20px] border border-line/70 bg-surface/90 p-4 shadow-panel 2xl:p-5 ${
className={`gantt-theme overflow-x-auto overflow-y-visible rounded-[20px] border border-line/70 bg-surface/90 p-4 shadow-panel 2xl:p-5 ${
mode === "dark" ? "wx-willow-dark-theme" : "wx-willow-theme"
}`}
>
@@ -119,15 +122,19 @@ export function GanttPage() {
{tasks.length} schedule rows
</div>
</div>
<Gantt
tasks={tasks.map((task: GanttTaskDto) => ({
...task,
start: new Date(task.start),
end: new Date(task.end),
parent: task.parentId ?? undefined,
}))}
links={links}
/>
<div style={{ height: `${ganttHeight}px`, minWidth: "100%" }}>
<Gantt
tasks={tasks.map((task: GanttTaskDto) => ({
...task,
start: new Date(task.start),
end: new Date(task.end),
parent: task.parentId ?? undefined,
}))}
links={links}
cellHeight={ganttCellHeight}
scaleHeight={ganttScaleHeight}
/>
</div>
</div>
<aside className="space-y-3">
<section className="rounded-[20px] border border-line/70 bg-surface/90 p-4 shadow-panel 2xl:p-5">