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.

style: BoP before BoM

Brad Barbinca419935791d
diff --git a/apps/carbon/app/modules/sales/ui/useSalesSubmodules.tsx b/apps/carbon/app/modules/sales/ui/useSalesSubmodules.tsx
index 37b9f6cc82..87a9276b26 100644
--- a/apps/carbon/app/modules/sales/ui/useSalesSubmodules.tsx
+++ b/apps/carbon/app/modules/sales/ui/useSalesSubmodules.tsx
@@ -7,16 +7,20 @@ const salesRoutes: AuthenticatedRouteGroup[] = [
name: "Manage",
routes: [
{
- name: "Sales Orders",
- to: path.to.salesOrders,
+ name: "Customers",
+ to: path.to.customers,
+ },
+ {
+ name: "RFQs",
+ to: "#", // path.to.rfqs,
},
{
- name: "Quotations",
+ name: "Quotes",
to: path.to.quotes,
},
{
- name: "Customers",
- to: path.to.customers,
+ name: "Orders",
+ to: path.to.salesOrders,
},
],
},
diff --git a/apps/carbon/app/modules/shared/ui/CadModelUpload.tsx b/apps/carbon/app/modules/shared/ui/CadModelUpload.tsx
index 14fc69bdb1..dcb8b7ba3e 100644
--- a/apps/carbon/app/modules/shared/ui/CadModelUpload.tsx
+++ b/apps/carbon/app/modules/shared/ui/CadModelUpload.tsx
@@ -11,6 +11,24 @@ type CadModelUploadProps = {
onFileChange: (file: File | null) => void;
};
+const supportedFileTypes = [
+ "step",
+ "stp",
+ "stl",
+ "obj",
+ "fbx",
+ "amf",
+ "iges",
+ "ipt",
+ "prt",
+ "sldprt",
+ "sldasm",
+ "asm",
+ "iam",
+ "3dm",
+ "3ds",
+];
+
const CadModelUpload = ({
file,
loading,
@@ -27,21 +45,9 @@ const CadModelUpload = ({
const fileSizeLimit = fileSizeLimitMb * 1024 * 1024;
const fileExtension = file.name.split(".").pop()?.toLowerCase();
- if (
- !fileExtension ||
- ![
- "step",
- "stp",
- "stl",
- "obj",
- "fbx",
- "amf",
- "iges",
- "ipt",
- "prt",
- ].includes(fileExtension)
- ) {
+ if (!fileExtension || !supportedFileTypes.includes(fileExtension)) {
toast.error("File type not supported");
+
return;
}
@@ -103,8 +109,7 @@ const CadModelUpload = ({
Choose file to upload or drag and drop
</p>
<p className="text-xs text-muted-foreground group-hover:text-foreground">
- Supports *.stp, *.step, *.stl, *.obj, *.fbx, *.amf, *.iges,
- *.ipt, *.prt files
+ Supports {supportedFileTypes.join(", ")} files
</p>
</>
)}
diff --git a/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.$makeMethodId.$materialId.tsx b/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
index 947fdb9d51..faa7b4c354 100644
--- a/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
+++ b/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
@@ -109,16 +109,16 @@ export default function MethodMaterialMakePage() {
type={item.type}
initialValues={item}
/>
- <BillOfMaterial
- key={`bom:${itemId}:${makeMethodId}:${materialId}`}
- makeMethodId={makeMethodId}
- materials={methodMaterials}
- />
<BillOfProcess
key={`bop:${itemId}:${makeMethodId}:${materialId}`}
makeMethodId={makeMethodId}
operations={methodOperations}
/>
+ <BillOfMaterial
+ key={`bom:${itemId}:${makeMethodId}:${materialId}`}
+ makeMethodId={makeMethodId}
+ materials={methodMaterials}
+ />
</VStack>
);
}
diff --git a/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.method.tsx b/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.method.tsx
index 52de5fe765..bd56dd4e47 100644
--- a/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.method.tsx
+++ b/apps/carbon/app/routes/x+/fixture+/$itemId.manufacturing.method.tsx
@@ -21,17 +21,17 @@ export default function MakeMethodRoute() {
return (
<VStack spacing={2} className="p-2">
- <BillOfMaterial
+ <BillOfProcess
key={itemId}
makeMethodId={makeMethodId}
// @ts-ignore
- materials={manufacturingRouteData?.methodMaterials ?? []}
+ operations={manufacturingRouteData?.methodOperations ?? []}
/>
- <BillOfProcess
+ <BillOfMaterial
key={itemId}
makeMethodId={makeMethodId}
// @ts-ignore
- operations={manufacturingRouteData?.methodOperations ?? []}
+ materials={manufacturingRouteData?.methodMaterials ?? []}
/>
</VStack>
);
diff --git a/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.$makeMethodId.$materialId.tsx b/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
index cfb0628f81..287192a462 100644
--- a/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
+++ b/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.$makeMethodId.$materialId.tsx
@@ -109,16 +109,16 @@ export default function MethodMaterialMakePage() {
type={item.type}
initialValues={item}
/>
- <BillOfMaterial
- key={`bom:${itemId}:${makeMethodId}:${materialId}`}
- makeMethodId={makeMethodId}
- materials={methodMaterials}
- />
<BillOfProcess
key={`bop:${itemId}:${makeMethodId}:${materialId}`}
makeMethodId={makeMethodId}
operations={methodOperations}
/>
+ <BillOfMaterial
+ key={`bom:${itemId}:${makeMethodId}:${materialId}`}
+ makeMethodId={makeMethodId}
+ materials={methodMaterials}
+ />
</VStack>
);
}
diff --git a/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.method.tsx b/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.method.tsx
index 4f561d2373..e0c833a472 100644
--- a/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.method.tsx
+++ b/apps/carbon/app/routes/x+/part+/$itemId.manufacturing.method.tsx
@@ -117,17 +117,17 @@ export default function MakeMethodRoute() {
key={itemId}
initialValues={manufacturingInitialValues}
/>
- <BillOfMaterial
+ <BillOfProcess
key={itemId}
makeMethodId={makeMethodId}
// @ts-ignore
- materials={manufacturingRouteData?.methodMaterials ?? []}
+ operations={manufacturingRouteData?.methodOperations ?? []}
/>
- <BillOfProcess
+ <BillOfMaterial
key={itemId}
makeMethodId={makeMethodId}
// @ts-ignore
- operations={manufacturingRouteData?.methodOperations ?? []}
+ materials={manufacturingRouteData?.methodMaterials ?? []}
/>
</VStack>
);