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
ui-nit(erp): phone Documents uploads from the app-bar +, upgrade card keeps its rounded top, modules sheet closes when you tap the current module
aashu2ca10f725cf5
diff --git a/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsx b/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsxindex be286a9641..1df53a9bd3 100644--- a/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsx+++ b/apps/erp/app/components/Layout/Mobile/ModulesSheet.tsx@@ -43,31 +43,41 @@ export function ModulesSheet({</BottomSheetTitle></BottomSheetHeader><BottomSheetBody>- <div className="grid grid-cols-3 gap-3 sm:grid-cols-4">- <ImplementationData>- {(data) => {- const item = getImplementationNavItem(data, i18n);- return item ? <ModuleCard module={item} /> : null;- }}- </ImplementationData>- {modules.map((module) => (- <ModuleCard key={module.key} module={module} />- ))}- </div>- {settingsModule ? (- <div className="mt-4 border-t border-border pt-2">- <PrefetchLink- to={settingsModule.to}- className={sheetRowClassName}- >- <SheetRowContent- icon={<settingsModule.icon />}- label={settingsModule.name}- trailing="drill"- />- </PrefetchLink>+ {/* A tap closes the sheet even when the module is the current page,+ where navigating leaves the path (and so the sheet) unchanged. */}+ <div+ onClick={(event) => {+ if ((event.target as HTMLElement).closest("a")) {+ onOpenChange(false);+ }+ }}+ >+ <div className="grid grid-cols-3 gap-3 sm:grid-cols-4">+ <ImplementationData>+ {(data) => {+ const item = getImplementationNavItem(data, i18n);+ return item ? <ModuleCard module={item} /> : null;+ }}+ </ImplementationData>+ {modules.map((module) => (+ <ModuleCard key={module.key} module={module} />+ ))}</div>- ) : null}+ {settingsModule ? (+ <div className="mt-4 border-t border-border pt-2">+ <PrefetchLink+ to={settingsModule.to}+ className={sheetRowClassName}+ >+ <SheetRowContent+ icon={<settingsModule.icon />}+ label={settingsModule.name}+ trailing="drill"+ />+ </PrefetchLink>+ </div>+ ) : null}+ </div></BottomSheetBody></BottomSheetContent></BottomSheet>diff --git a/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx b/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsxindex 89da3fb5cd..c8edbfccb6 100644--- a/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx+++ b/apps/erp/app/components/UpgradeOverlay/UpgradeOverlay.tsx@@ -51,7 +51,9 @@ function UpgradeOverlayCard({ children, className }: WithChildren) {return (<div className="absolute inset-0 flex items-center justify-center"><Card className={cn("max-w-md shadow-lg", className)}>- <CardContent className="flex flex-col items-center text-center gap-4 pt-6">+ {/* A floating card with no header: keep the panel's full rounded+ border on phones, where CardContent flattens its top under a header. */}+ <CardContent className="flex flex-col items-center text-center gap-4 pt-6 max-md:rounded-xl max-md:border-x max-md:border-b">{children}</CardContent></Card>diff --git a/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx b/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsxindex 212a5acc73..8a96e8bb8a 100644--- a/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx+++ b/apps/erp/app/modules/documents/ui/Documents/DocumentCreateForm.tsx@@ -10,8 +10,9 @@ import { File, toast, useViewport } from "@carbon/react";import { Trans, useLingui } from "@lingui/react/macro";import { nanoid } from "nanoid";import type { ChangeEvent } from "react";-import { LuUpload } from "react-icons/lu";+import { LuPlus, LuUpload } from "react-icons/lu";import { useSubmit } from "react-router";+import { AppBarAction } from "~/components/New";import { useUser } from "~/hooks";import { path } from "~/utils/path";@@ -89,13 +90,25 @@ const DocumentCreateForm = () => {});};+ // Phones: a "+" in the app bar, like New on every other list.+ if (isPhone) {+ return (+ <AppBarAction>+ <File+ isIcon+ variant="ghost"+ size="lg"+ aria-label={t`Upload`}+ onChange={uploadFile}+ >+ <LuPlus className="size-6" />+ </File>+ </AppBarAction>+ );+ }+return (- <File- leftIcon={<LuUpload />}- onChange={uploadFile}- // Phones: Upload is the list's one primary action.- variant={isPhone ? "primary" : undefined}- >+ <File leftIcon={<LuUpload />} onChange={uploadFile}><Trans>Upload</Trans></File>);