Skip to content

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.

fix(ui): truncate long titles in BoM/BoP rows so time badges aren't clipped

aashud4efed5276e6
diff --git a/apps/erp/app/components/SortableList.tsx b/apps/erp/app/components/SortableList.tsx
index 51934a196d..550b62c811 100644
--- a/apps/erp/app/components/SortableList.tsx
+++ b/apps/erp/app/components/SortableList.tsx
@@ -144,7 +144,7 @@ function SortableListItem<T>({
{typeof item.title === "string" ? (
<span
className={cn(
- "flex font-medium text-sm md:text-base truncate hover:underline cursor-pointer",
+ "flex min-w-0 font-medium text-sm md:text-base truncate hover:underline cursor-pointer",
item.checked ? "text-red-400" : "text-foreground"
)}
onClick={(e) => {
@@ -162,7 +162,10 @@ function SortableListItem<T>({
onSelectItem(item.id);
}
}}
- className={item.checked ? "text-red-400" : ""}
+ className={cn(
+ "min-w-0 flex-1",
+ item.checked && "text-red-400"
+ )}
>
{item.title}
</div>
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
index 1f2effb1d1..2ef1aa543b 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfMaterial.tsx
@@ -1250,8 +1250,8 @@ function makeItem(
id: material.id!,
title: (
<VStack spacing={0} className="py-1 cursor-pointer">
- <div className="flex items-center gap-2 group">
- <h3 className="font-semibold truncate">
+ <div className="flex w-full min-w-0 items-center gap-2 group">
+ <h3 className="font-semibold min-w-0 truncate">
{getItemReadableId(items, material.itemId) ?? ""}
</h3>
<ItemLifecycleBadge
diff --git a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
index e6ad47ba3e..f415b0293f 100644
--- a/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
+++ b/apps/erp/app/modules/items/ui/Item/BillOfProcess.tsx
@@ -3932,7 +3932,7 @@ function makeItem(
id: operation.id!,
title: (
<VStack spacing={0}>
- <h3 className="font-semibold truncate cursor-pointer">
+ <h3 className="font-semibold max-w-full truncate cursor-pointer">
{operation.description}
</h3>
{operation.operationType === "Outside Processing" && (
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
index 48ccb8476f..e5ce7671ee 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfMaterial.tsx
@@ -155,8 +155,10 @@ function makeItem(
id: material.id!,
title: (
<VStack spacing={0} className="py-1 cursor-pointer">
- <div className="flex items-center gap-2 group">
- <h3 className="font-semibold truncate">{itemReadableId ?? ""}</h3>
+ <div className="flex w-full min-w-0 items-center gap-2 group">
+ <h3 className="font-semibold min-w-0 truncate">
+ {itemReadableId ?? ""}
+ </h3>
<ItemLifecycleBadge
mode={items.find((i) => i.id === material.itemId)?.supersessionMode}
/>
diff --git a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
index becc60ace0..1cee166add 100644
--- a/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
+++ b/apps/erp/app/modules/production/ui/Jobs/JobBillOfProcess.tsx
@@ -265,8 +265,8 @@ function makeItem(
id: operation.id!,
title: (
<VStack spacing={0}>
- <HStack spacing={2}>
- <h3 className="font-semibold truncate cursor-pointer">
+ <HStack spacing={2} className="w-full min-w-0">
+ <h3 className="font-semibold min-w-0 truncate cursor-pointer">
{operation.description}
</h3>
{operation.reworkId && <Badge variant="red">Rework</Badge>}
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
index 49d10fb2cf..ffb81af2a7 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfMaterial.tsx
@@ -143,8 +143,8 @@ function makeItem(
id: material.id!,
title: (
<VStack spacing={0} className="py-1 cursor-pointer">
- <div className="flex items-center gap-2 group">
- <h3 className="font-semibold truncate">{itemReadableId}</h3>
+ <div className="flex w-full min-w-0 items-center gap-2 group">
+ <h3 className="font-semibold min-w-0 truncate">{itemReadableId}</h3>
{material.itemId && material.itemType && (
<Link
to={getLinkToItemDetails(material.itemType, material.itemId)}
diff --git a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
index 85d45004f0..57b1c49a92 100644
--- a/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
+++ b/apps/erp/app/modules/sales/ui/Quotes/QuoteBillOfProcess.tsx
@@ -184,7 +184,7 @@ function makeItem(
id: operation.id!,
title: (
<VStack spacing={0}>
- <h3 className="font-semibold truncate cursor-pointer">
+ <h3 className="font-semibold max-w-full truncate cursor-pointer">
{operation.description}
</h3>
{operation.operationType === "Outside Processing" && (