Turn current exceptions into purchasing, manufacturing, and planning follow-through.
-
diff --git a/client/src/modules/gantt/GanttPage.tsx b/client/src/modules/workbench/WorkbenchPage.tsx
similarity index 91%
rename from client/src/modules/gantt/GanttPage.tsx
rename to client/src/modules/workbench/WorkbenchPage.tsx
index 62a5a15..19bcb51 100644
--- a/client/src/modules/gantt/GanttPage.tsx
+++ b/client/src/modules/workbench/WorkbenchPage.tsx
@@ -1,14 +1,10 @@
-import { Gantt } from "@svar-ui/react-gantt";
-import "@svar-ui/react-gantt/style.css";
import type { DemandPlanningRollupDto, GanttTaskDto, PlanningExceptionDto, PlanningTimelineDto } from "@mrp/shared";
import { useEffect, useMemo, useState } from "react";
import { Link } from "react-router-dom";
import { useAuth } from "../../auth/AuthProvider";
import { ApiError, api } from "../../lib/api";
-import { useTheme } from "../../theme/ThemeProvider";
-
-type WorkbenchMode = "overview" | "gantt" | "heatmap" | "agenda";
+type WorkbenchMode = "overview" | "heatmap" | "agenda";
type FocusRecord = {
id: string;
title: string;
@@ -98,9 +94,8 @@ function buildFocusRecords(tasks: GanttTaskDto[]) {
}));
}
-export function GanttPage() {
+export function WorkbenchPage() {
const { token } = useAuth();
- const { mode } = useTheme();
const [timeline, setTimeline] = useState
(null);
const [planningRollup, setPlanningRollup] = useState(null);
const [status, setStatus] = useState("Loading live planning timeline...");
@@ -126,15 +121,11 @@ export function GanttPage() {
}, [token]);
const tasks = timeline?.tasks ?? [];
- const links = timeline?.links ?? [];
const summary = timeline?.summary;
const exceptions = timeline?.exceptions ?? [];
const focusRecords = useMemo(() => buildFocusRecords(tasks), [tasks]);
const focusById = useMemo(() => new Map(focusRecords.map((record) => [record.id, record])), [focusRecords]);
const selectedFocus = selectedFocusId ? focusById.get(selectedFocusId) ?? null : focusRecords[0] ?? null;
- const ganttCellHeight = 38;
- const ganttScaleHeight = 54;
- const ganttHeight = Math.max(520, tasks.length * ganttCellHeight + ganttScaleHeight);
const heatmap = useMemo(() => {
const start = summary ? startOfDay(new Date(summary.horizonStart)) : startOfDay(new Date());
@@ -181,7 +172,6 @@ export function GanttPage() {
const modeOptions: Array<{ value: WorkbenchMode; label: string; detail: string }> = [
{ value: "overview", label: "Overview", detail: "Dense planner board" },
- { value: "gantt", label: "Timeline", detail: "Classic gantt lens" },
{ value: "heatmap", label: "Heatmap", detail: "Load by day" },
{ value: "agenda", label: "Agenda", detail: "Upcoming due flow" },
];
@@ -267,30 +257,6 @@ export function GanttPage() {
{workbenchMode === "overview" ?
: null}
- {workbenchMode === "gantt" ? (
-
-
-
-
Schedule Window
-
{summary ? `${formatDate(summary.horizonStart)} through ${formatDate(summary.horizonEnd)}` : "Waiting for live schedule data."}
-
-
{tasks.length} schedule rows
-
-
- ({
- ...task,
- start: new Date(task.start),
- end: new Date(task.end),
- parent: task.parentId ?? undefined,
- }))}
- links={links}
- cellHeight={ganttCellHeight}
- scaleHeight={ganttScaleHeight}
- />
-
-
- ) : null}
{workbenchMode === "heatmap" ?
: null}
{workbenchMode === "agenda" ?
: null}
@@ -312,7 +278,6 @@ export function GanttPage() {