Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.
TypeScript ai-agentsbill-of-materialserpinventory-managementleanmanufacturingmanufacturing-execution-systemmcp-servermesmrpopen-source-erppostgresqlproduction-planningqmsquality-management-systemreact-routerself-hostedsupabasetraceabilitytypescript
fix: scrolling issue in mes
Brad Barbin04a7baef5c53
diff --git a/apps/mes/app/components/Kanban/components/ColumnCard.tsx b/apps/mes/app/components/Kanban/components/ColumnCard.tsxindex 38c23f92db..46d57a964e 100644--- a/apps/mes/app/components/Kanban/components/ColumnCard.tsx+++ b/apps/mes/app/components/Kanban/components/ColumnCard.tsx@@ -31,7 +31,7 @@ export function ColumnCard({...displaySettings}: ColumnCardProps) {const [params] = useUrlParams();- const currentFilters = params.getAll("filter");+ const currentFilters = params.getAll("filter").filter(Boolean);const itemsIds = useMemo(() => {return items.map((item) => item.id);}, [items]);@@ -130,7 +130,7 @@ export function ColumnCard({export function BoardContainer({ children }: { children: React.ReactNode }) {const dndContext = useDndContext();- const variations = cva("px-0 flex lg:justify-center", {+ const variations = cva("relative px-0 flex lg:justify-center", {variants: {dragging: {default: "snap-x snap-mandatory",diff --git a/apps/mes/app/routes/x+/_layout.tsx b/apps/mes/app/routes/x+/_layout.tsxindex fdf4b2831a..19ae2ba4b8 100644--- a/apps/mes/app/routes/x+/_layout.tsx+++ b/apps/mes/app/routes/x+/_layout.tsx@@ -3,7 +3,7 @@ import {destroyAuthSession,requireAuthSession,} from "@carbon/auth/session.server";-import { SidebarInset, SidebarProvider, TooltipProvider } from "@carbon/react";+import { SidebarProvider, TooltipProvider } from "@carbon/react";import type { ShouldRevalidateFunction } from "@remix-run/react";import { Outlet, useLoaderData, useNavigation } from "@remix-run/react";import type { LoaderFunctionArgs } from "@vercel/remix";@@ -126,9 +126,7 @@ export default function AuthenticatedRoute() {location={location}locations={locations}/>- <SidebarInset className="bg-card">- <Outlet />- </SidebarInset>+ <Outlet /></TooltipProvider></SidebarProvider></RealtimeDataProvider>diff --git a/apps/mes/app/routes/x+/active.tsx b/apps/mes/app/routes/x+/active.tsxindex c3b5a98986..b7452f1052 100644--- a/apps/mes/app/routes/x+/active.tsx+++ b/apps/mes/app/routes/x+/active.tsx@@ -59,7 +59,7 @@ export default function ActiveRoute() {}, [operations, searchTerm]);return (- <>+ <div className="flex flex-col flex-1"><header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-background"><div className="flex items-center gap-2 px-2"><SidebarTrigger />@@ -108,6 +108,6 @@ export default function ActiveRoute() {</div>)}</main>- </>+ </div>);}diff --git a/apps/mes/app/routes/x+/operations.tsx b/apps/mes/app/routes/x+/operations.tsxindex 7fe51eb6e8..37a44353cd 100644--- a/apps/mes/app/routes/x+/operations.tsx+++ b/apps/mes/app/routes/x+/operations.tsx@@ -240,73 +240,76 @@ export default function Operations() {}, [processes, workCenters]);return (- <>+ <div className="flex flex-col h-full w-full"><header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-background"><div className="flex items-center gap-2 px-2"><SidebarTrigger /><Heading size="h4">Schedule</Heading></div></header>- <main className="flex flex-1 w-full h-[calc(100vh-var(--header-height))] overflow-hidden">- <div className="flex flex-col h-full max-h-full w-full overflow-x-auto relative">- <HStack className="px-4 py-2 justify-between bg-card border-b border-border">+ <div className="flex flex-col h-full max-h-full overflow-auto relative">+ <HStack className="px-4 py-2 justify-between bg-card border-b border-border">+ <HStack>+ <SearchFilter param="search" size="sm" placeholder="Search" />++ <Filter filters={filters} />+ </HStack>+ </HStack>+ {currentFilters.length > 0 && (+ <HStack className="px-4 py-1.5 justify-between bg-card border-b border-border w-full"><HStack>- <SearchFilter param="search" size="sm" placeholder="Search" />- <Filter filters={filters} />+ <ActiveFilters filters={filters} /></HStack></HStack>- {currentFilters.length > 0 && (- <HStack className="h-[var(--filters-height)] px-4 py-1.5 justify-between bg-card border-b border-border w-full">- <HStack>- <ActiveFilters filters={filters} />- </HStack>- </HStack>- )}- {columns.length > 0 ? (- <ClientOnly- fallback={- <div className="flex h-full w-full items-center justify-center">- <Spinner className="h-8 w-8" />+ )}+ <div className="flex flex-grow h-full items-stretch overflow-hidden relative">+ <div className="flex flex-1 min-h-0 w-full relative">+ {columns.length > 0 ? (+ <ClientOnly+ fallback={+ <div className="flex w-full h-full items-center justify-center">+ <Spinner className="h-8 w-8" />+ </div>+ }+ >+ {() => (+ <Kanban+ columns={columns}+ items={items}+ showCustomer+ showDescription+ showDueDate+ showDuration+ showEmployee+ showProgress+ showStatus+ showSalesOrder+ />+ )}+ </ClientOnly>+ ) : hasFilters ? (+ <div className="flex flex-col w-full h-full items-center justify-center gap-4">+ <div className="flex justify-center items-center h-12 w-12 rounded-full bg-foreground text-background">+ <LuAlertTriangle className="h-6 w-6" /></div>- }- >- {() => (- <Kanban- columns={columns}- items={items}- showCustomer- showDescription- showDueDate- showDuration- showEmployee- showProgress={false}- showStatus- showSalesOrder- />- )}- </ClientOnly>- ) : hasFilters ? (- <div className="flex flex-col w-full h-full items-center justify-center gap-4">- <div className="flex justify-center items-center h-12 w-12 rounded-full bg-foreground text-background">- <LuAlertTriangle className="h-6 w-6" />+ <span className="text-xs font-mono font-light text-foreground uppercase">+ No results+ </span>+ <Button onClick={clearFilters}>Clear Filters</Button></div>- <span className="text-xs font-mono font-light text-foreground uppercase">- No results- </span>- <Button onClick={clearFilters}>Clear Filters</Button>- </div>- ) : (- <div className="flex flex-col w-full h-full items-center justify-center gap-4">- <div className="flex justify-center items-center h-12 w-12 rounded-full bg-foreground text-background">- <LuAlertTriangle className="h-6 w-6" />+ ) : (+ <div className="flex flex-col w-full h-full items-center justify-center gap-4">+ <div className="flex justify-center items-center h-12 w-12 rounded-full bg-foreground text-background">+ <LuAlertTriangle className="h-6 w-6" />+ </div>+ <span className="text-xs font-mono font-light text-foreground uppercase">+ No work centers exist+ </span></div>- <span className="text-xs font-mono font-light text-foreground uppercase">- No operations are scheduled- </span>- </div>- )}+ )}+ </div></div>- </main>- </>+ </div>+ </div>);}diff --git a/apps/mes/app/routes/x+/recent.tsx b/apps/mes/app/routes/x+/recent.tsxindex f113f5a100..685977f21e 100644--- a/apps/mes/app/routes/x+/recent.tsx+++ b/apps/mes/app/routes/x+/recent.tsx@@ -58,7 +58,7 @@ export default function ActiveRoute() {}, [operations, searchTerm]);return (- <>+ <div className="flex flex-col flex-1"><header className="sticky top-0 z-10 flex h-[var(--header-height)] shrink-0 items-center gap-2 transition-[width,height] ease-linear group-has-[[data-collapsible=icon]]/sidebar-wrapper:h-12 border-b bg-background"><div className="flex items-center gap-2 px-2"><SidebarTrigger />@@ -107,6 +107,6 @@ export default function ActiveRoute() {</div>)}</main>- </>+ </div>);}