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
style: show title of bill of material or bill of process when expanded
Brad Barbin2398955d84f9
diff --git a/apps/erp/app/components/SortableList.tsx b/apps/erp/app/components/SortableList.tsxindex 9b170c5960..8eb2c3ba8c 100644--- a/apps/erp/app/components/SortableList.tsx+++ b/apps/erp/app/components/SortableList.tsx@@ -112,11 +112,13 @@ function SortableListItem<T>({whileDrag={{ zIndex: 9999 }}><div className={cn(isExpanded ? "w-full" : "", "z-20 ")}>- <motion.div- className="grid items-center justify-between grid-cols-[1fr_auto] w-full gap-2 py-1"- layout="position"- >- {!isExpanded ? (+ <motion.div className="w-full py-3 px-3" layout="position">+ <div+ className={cn(+ "items-center justify-between w-full gap-2",+ isExpanded && "flex flex-col flex-grow"+ )}+ ><div className="flex flex-col w-full"><div className="flex w-full items-center gap-x-2 truncate pl-3">{/* List Remove Actions */}@@ -141,7 +143,7 @@ function SortableListItem<T>({><HStackclassName={cn(- "w-full justify-between",+ "w-full justify-between pr-8",!isReadOnly && "cursor-grab")}>@@ -182,9 +184,9 @@ function SortableListItem<T>({</div></div></div>- ) : null}- {/* List Item Children */}+ {/* List Item Children */}+ </div>{renderExtra && renderExtra(item)}</motion.div>{item.footer && (diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsxindex 1e806e3f35..3097bb7720 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx@@ -336,13 +336,7 @@ const BillOfMaterial = ({handleDrag={onCloseOnDrag}className="my-2 "renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -355,11 +349,7 @@ const BillOfMaterial = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -684,12 +674,14 @@ function MaterialForm({}}}>- <Hidden name="id" />- <Hidden name="makeMethodId" />- <Hidden name="itemReadableId" value={itemData.itemReadableId} />- <Hidden name="order" />- <Hidden name="kit" value={itemData.kit.toString()} />- <VStack className="pt-4">+ <div>+ <Hidden name="id" />+ <Hidden name="makeMethodId" />+ <Hidden name="itemReadableId" value={itemData.itemReadableId} />+ <Hidden name="order" />+ <Hidden name="kit" value={itemData.kit.toString()} />+ </div>+ <VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><ItemdisabledItems={[params.itemId!]}diff --git a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsxindex 7edbd019df..9bd7c52a2e 100644--- a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx+++ b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx@@ -645,13 +645,7 @@ const BillOfProcess = ({handleDrag={() => setSelectedItemId(null)}className="my-2"renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center gap-2 pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -664,11 +658,7 @@ const BillOfProcess = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -1024,9 +1014,12 @@ function OperationForm({}}}>- <Hidden name="id" />- <Hidden name="makeMethodId" />- <Hidden name="order" />+ <div>+ <Hidden name="id" />+ <Hidden name="makeMethodId" />+ <Hidden name="order" />+ </div>+<div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><Processname="processId"diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsxindex 030d21da66..8723a6a478 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx@@ -108,7 +108,7 @@ function makeItem(return {id: material.id!,title: (- <VStack spacing={0} className="py-2.5 cursor-pointer">+ <VStack spacing={0} className="py-1 cursor-pointer"><h3 className="font-semibold truncate">{material.itemReadableId}</h3>{material?.description && (<span className="text-xs text-muted-foreground">@@ -409,13 +409,7 @@ const JobBillOfMaterial = ({handleDrag={onCloseOnDrag}className="my-2 "renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -443,11 +437,7 @@ const JobBillOfMaterial = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -753,7 +743,7 @@ function MaterialForm({{itemData.methodType === "Make" && (<Hidden name="unitCost" value={itemData.unitCost} />)}- <VStack className="pt-4">+ <VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><ItemdisabledItems={[params.itemId!]}diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsxindex e109f8f34d..3e42bf1d2c 100644--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx@@ -858,13 +858,7 @@ const JobBillOfProcess = ({handleDrag={onCloseOnDrag}className="my-2 "renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center gap-2 pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -877,11 +871,7 @@ const JobBillOfProcess = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -2026,9 +2016,11 @@ function OperationForm({}}}>- <Hidden name="id" />- <Hidden name="jobMakeMethodId" />- <Hidden name="order" />+ <div>+ <Hidden name="id" />+ <Hidden name="jobMakeMethodId" />+ <Hidden name="order" />+ </div><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><Processname="processId"diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsxindex 941ed826e6..6a8b5d65e0 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx@@ -113,7 +113,7 @@ function makeItem(return {id: material.id!,title: (- <VStack spacing={0} className="py-2.5 cursor-pointer">+ <VStack spacing={0} className="py-1 cursor-pointer"><h3 className="font-semibold truncate">{material.itemReadableId}</h3>{material?.description && (<span className="text-xs text-muted-foreground">@@ -425,13 +425,7 @@ const QuoteBillOfMaterial = ({handleDrag={onCloseOnDrag}className="my-2 "renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -444,11 +438,7 @@ const QuoteBillOfMaterial = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -732,7 +722,7 @@ function MaterialForm({{itemData.methodType === "Make" && (<Hidden name="unitCost" value={itemData.unitCost} />)}- <VStack className="pt-4">+ <VStack><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><ItemdisabledItems={[params.itemId!]}diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsxindex a166c8d9b2..5dd8504c6b 100644--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx@@ -689,13 +689,7 @@ const QuoteBillOfProcess = ({handleDrag={onCloseOnDrag}className="my-2 "renderExtra={(item) => (- <div- key={`${isOpen}`}- className={cn(- "flex h-full flex-col items-center justify-center gap-2 pl-2",- isOpen ? "py-1" : "py-3 "- )}- >+ <div key={`${isOpen}`}><motion.buttonlayoutonClick={@@ -708,11 +702,7 @@ const QuoteBillOfProcess = ({}}key="collapse"- className={cn(- isOpen- ? "absolute right-3 top-3 z-10 "- : "relative z-10 ml-auto mr-3 "- )}+ className={cn("absolute right-3 top-3 z-10")}>{isOpen ? (<motion.span@@ -1801,9 +1791,11 @@ function OperationForm({}}}>- <Hidden name="id" />- <Hidden name="quoteMakeMethodId" />- <Hidden name="order" />+ <div>+ <Hidden name="id" />+ <Hidden name="quoteMakeMethodId" />+ <Hidden name="order" />+ </div><div className="grid w-full gap-x-8 gap-y-4 grid-cols-1 lg:grid-cols-3"><Processname="processId"