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.

docs: update the image

Brad Barbin46a554d10ecc
diff --git a/apps/carbon/app/components/CreateableCombobox.tsx b/apps/carbon/app/components/CreateableCombobox.tsx
index 871e2370bc..a42e92af37 100644
--- a/apps/carbon/app/components/CreateableCombobox.tsx
+++ b/apps/carbon/app/components/CreateableCombobox.tsx
@@ -107,7 +107,7 @@ const CreatableCombobox = forwardRef<HTMLButtonElement, CreatableComboboxProps>(
onSelect={() => {
props.onCreateOption?.(search);
}}
- value={search}
+ value={search.trim()}
>
<span>Create</span>
<span className="ml-1 font-bold">{search}</span>
diff --git a/apps/carbon/app/modules/sales/ui/Quotation/QuotationDocuments/QuotationDocuments.tsx b/apps/carbon/app/modules/sales/ui/Quotation/QuotationDocuments/QuotationDocuments.tsx
index 383724132d..5d9bb14daf 100644
--- a/apps/carbon/app/modules/sales/ui/Quotation/QuotationDocuments/QuotationDocuments.tsx
+++ b/apps/carbon/app/modules/sales/ui/Quotation/QuotationDocuments/QuotationDocuments.tsx
@@ -48,12 +48,10 @@ const QuotationDocuments = ({
<Card>
<HStack className="justify-between items-start">
<CardHeader>
- <CardTitle>
- {isExternal ? "External" : "Internal"} Attachments
- </CardTitle>
+ <CardTitle>Documents</CardTitle>
</CardHeader>
<CardAction>
- <QuotationDocumentForm isExternal={isExternal} id={id} />
+ <QuotationDocumentForm isExternal={false} id={id} />
</CardAction>
</HStack>
<CardContent>
diff --git a/apps/carbon/app/routes/x+/quote+/$id.details.tsx b/apps/carbon/app/routes/x+/quote+/$id.details.tsx
index a4aaf55a19..b65e906d62 100644
--- a/apps/carbon/app/routes/x+/quote+/$id.details.tsx
+++ b/apps/carbon/app/routes/x+/quote+/$id.details.tsx
@@ -3,8 +3,9 @@ import { redirect } from "@remix-run/node";
import { useParams } from "@remix-run/react";
import { validationError } from "remix-validated-form";
import { useRouteData } from "~/hooks";
-import type { Quotation } from "~/modules/sales";
+import type { Quotation, QuotationAttachment } from "~/modules/sales";
import {
+ QuotationDocuments,
QuotationForm,
quotationValidator,
upsertQuote,
@@ -60,7 +61,10 @@ export async function action({ request, params }: ActionFunctionArgs) {
export default function QuotationBasicRoute() {
const { id } = useParams();
if (!id) throw new Error("Could not find id");
- const quoteData = useRouteData<{ quotation: Quotation }>(path.to.quote(id));
+ const quoteData = useRouteData<{
+ quotation: Quotation;
+ internalDocuments: QuotationAttachment[];
+ }>(path.to.quote(id));
if (!quoteData) throw new Error("Could not find quote data");
const initialValues = {
@@ -78,5 +82,14 @@ export default function QuotationBasicRoute() {
notes: quoteData?.quotation?.notes ?? "",
};
- return <QuotationForm initialValues={initialValues} />;
+ return (
+ <>
+ <QuotationForm initialValues={initialValues} />
+ <QuotationDocuments
+ id={id}
+ attachments={quoteData.internalDocuments}
+ isExternal={false}
+ />
+ </>
+ );
}
diff --git a/apps/carbon/app/routes/x+/quote+/$id.tsx b/apps/carbon/app/routes/x+/quote+/$id.tsx
index c6516452df..9f736e3c47 100644
--- a/apps/carbon/app/routes/x+/quote+/$id.tsx
+++ b/apps/carbon/app/routes/x+/quote+/$id.tsx
@@ -133,7 +133,7 @@ export default function QuotationRoute() {
Preview
</a>
</MenubarItem>
- <MenubarItem>Release</MenubarItem>
+ <MenubarItem isDisabled>Release</MenubarItem>
</Menubar>
<Outlet />
@@ -173,29 +173,11 @@ const data: BillOfMaterialNode[] = [
children: [
{
id: "cnc03dgmu0l0h0gm0330",
- label: "P000000001",
- type: "line",
- children: [
- {
- id: "cnc03dgmu0l0h0gm0330",
- // parentId: "cn9v3tldq0l1lvlkrqmg",
- label: "Assemblies",
- type: "assemblies",
- },
- {
- id: "cnc03dgmu0l0h0gm0330",
- label: "Operations",
- type: "operations",
- },
- ],
- },
- {
- id: "2",
label: "P00001233",
type: "line",
children: [
{
- id: "3",
+ id: "cnc03dgmu0l0h0gm0330",
label: "Assemblies",
type: "assemblies",
children: [
@@ -246,7 +228,7 @@ const data: BillOfMaterialNode[] = [
],
},
{
- id: "11",
+ id: "cnc03dgmu0l0h0gm0330",
label: "Operations",
type: "operations",
children: [
@@ -340,7 +322,7 @@ const BillOfMaterialItem = ({
<AiOutlinePartition className="w-4 h-4 mr-2" />
{label}
</span>
- <span className="bg-orange-500 rounded-full h-2 w-2 inline-block ml-2" />
+ <span className="bg-green-500 rounded-full h-2 w-2 inline-block ml-2" />
</Link>
</Button>
);
diff --git a/apps/carbon/app/utils/path.ts b/apps/carbon/app/utils/path.ts
index ee0f880612..c6da3b2925 100644
--- a/apps/carbon/app/utils/path.ts
+++ b/apps/carbon/app/utils/path.ts
@@ -479,3 +479,7 @@ export const onboardingSequence = [
export const getStoragePath = (bucket: string, path: string) => {
return `${SUPABASE_API_URL}/storage/v1/object/public/${bucket}/${path}`;
};
+
+export const requestReferrer = (request: Request) => {
+ return request.headers.get("referer");
+};
diff --git a/packages/database/src/seed/employee-types.ts b/packages/database/src/seed/employee-types.ts
index 477b2b77e8..971f616ce3 100644
--- a/packages/database/src/seed/employee-types.ts
+++ b/packages/database/src/seed/employee-types.ts
@@ -27,12 +27,12 @@ export const employeeTypePermissionsDefinitions: Record<
>
> = {
Admin: {
- // Accounting: {
- // create: true,
- // update: true,
- // delete: true,
- // view: true,
- // },
+ Accounting: {
+ create: true,
+ update: true,
+ delete: true,
+ view: true,
+ },
Invoicing: {
create: true,
update: true,
@@ -113,12 +113,12 @@ export const employeeTypePermissionsDefinitions: Record<
},
},
"Project Manager": {
- // Accounting: {
- // create: false,
- // update: false,
- // delete: false,
- // view: false,
- // },
+ Accounting: {
+ create: false,
+ update: false,
+ delete: false,
+ view: false,
+ },
Invoicing: {
create: false,
update: false,
@@ -199,12 +199,12 @@ export const employeeTypePermissionsDefinitions: Record<
},
},
Sales: {
- // Accounting: {
- // create: false,
- // update: false,
- // delete: false,
- // view: false,
- // },
+ Accounting: {
+ create: false,
+ update: false,
+ delete: false,
+ view: false,
+ },
Invoicing: {
create: false,
update: false,
diff --git a/packages/database/src/seed/features.ts b/packages/database/src/seed/features.ts
index 0655f594e2..0b4534f4ab 100644
--- a/packages/database/src/seed/features.ts
+++ b/packages/database/src/seed/features.ts
@@ -1,7 +1,7 @@
import { v4 as uuidv4 } from "uuid";
const possibleFeatures = [
- // "Accounting",
+ "Accounting",
"Documents",
"Inventory",
"Invoicing",
diff --git a/www/components/pages/Home.tsx b/www/components/Home/Home.tsx
similarity index 98%
rename from www/components/pages/Home.tsx
rename to www/components/Home/Home.tsx
index 1b9b5f129b..d621654cc5 100644
--- a/www/components/pages/Home.tsx
+++ b/www/components/Home/Home.tsx
@@ -3,8 +3,7 @@
import { clamp, motion, useMotionValueEvent, useScroll } from "framer-motion";
import Head from "next/head";
import React, { useState } from "react";
-import Features from "../features";
-import MacbookScroll from "../macbook";
+import { Features, MacbookScroll } from "./components";
function Gradient() {
const { scrollYProgress } = useScroll();
diff --git a/www/components/features.tsx b/www/components/Home/components/features.tsx
similarity index 97%
rename from www/components/features.tsx
rename to www/components/Home/components/features.tsx
index 1e84f335f5..828129f449 100644
--- a/www/components/features.tsx
+++ b/www/components/Home/components/features.tsx
@@ -4,7 +4,7 @@ import { GiSpeedometer } from "react-icons/gi";
import { GoSync } from "react-icons/go";
import { HiCode, HiFingerPrint } from "react-icons/hi";
import { TbBuildingFactory2 } from "react-icons/tb";
-import { useGlowPointer } from "../hooks/useGlowPointer";
+import { useGlowPointer } from "../../../hooks/useGlowPointer";
declare global {
interface Window {
diff --git a/www/components/Home/components/index.ts b/www/components/Home/components/index.ts
new file mode 100644
index 0000000000..a6d5f5c9ba
--- /dev/null
+++ b/www/components/Home/components/index.ts
@@ -0,0 +1,5 @@
+import Features from "./features";
+import MacbookScroll from "./macbook";
+import Sticky from "./sticky";
+
+export { Features, MacbookScroll, Sticky };
diff --git a/www/components/macbook.tsx b/www/components/Home/components/macbook.tsx
similarity index 99%
rename from www/components/macbook.tsx
rename to www/components/Home/components/macbook.tsx
index 19c5003b1d..6c13aecab7 100644
--- a/www/components/macbook.tsx
+++ b/www/components/Home/components/macbook.tsx
@@ -23,7 +23,7 @@ import type { MotionValue } from "framer-motion";
import { motion, useScroll, useTransform } from "framer-motion";
import Image from "next/image";
import React, { useEffect, useRef, useState } from "react";
-import { cn } from "../utils/cn";
+import { cn } from "../../../utils/cn";
const MacbookScroll = ({
showGradient,
diff --git a/www/components/sticky.tsx b/www/components/Home/components/sticky.tsx
similarity index 100%
rename from www/components/sticky.tsx
rename to www/components/Home/components/sticky.tsx
diff --git a/www/components/Home/index.ts b/www/components/Home/index.ts
new file mode 100644
index 0000000000..319199160b
--- /dev/null
+++ b/www/components/Home/index.ts
@@ -0,0 +1,3 @@
+import Home from "./Home";
+
+export default Home;
diff --git a/www/components/index.ts b/www/components/index.ts
deleted file mode 100644
index 48f3622884..0000000000
--- a/www/components/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import Features from "./features";
-import Sticky from "./sticky";
-
-export { Features, Sticky };
diff --git a/www/pages/develop/index.mdx b/www/pages/develop/index.mdx
index 35fbfb4cb9..e0e1492856 100644
--- a/www/pages/develop/index.mdx
+++ b/www/pages/develop/index.mdx
@@ -3,7 +3,7 @@ title: Develop - Introduction
description: Carbon ERP is a high-performance, open-source ERP
---
-import { Features } from "../../components";
+import { Features } from "../../components/Home/components";
# Carbon ERP
diff --git a/www/pages/index.mdx b/www/pages/index.mdx
index 40cc89b565..ed7d3bb0d6 100644
--- a/www/pages/index.mdx
+++ b/www/pages/index.mdx
@@ -2,6 +2,6 @@
title: Carbon ERP | An open source high performance ERP
---
-import Home from "../components/pages/Home";
+import Home from "../components/Home";
<Home />
diff --git a/www/pages/learn/introduction.mdx b/www/pages/learn/introduction.mdx
index b3585559f1..5145280d93 100644
--- a/www/pages/learn/introduction.mdx
+++ b/www/pages/learn/introduction.mdx
@@ -3,8 +3,6 @@ title: Learn - Introduction
description: Carbon ERP is a high-performance, open-source ERP
---
-import { Features } from "../../components";
-
# Carbon ERP
Carbon ERP is an open-source ERP. There are a few differences between Carbon and other open-source ERPs:
diff --git a/www/public/carbon-dark.jpg b/www/public/carbon-dark.jpg
index 6b22e2f36d..b4f30dd7fe 100644
Binary files a/www/public/carbon-dark.jpg and b/www/public/carbon-dark.jpg differ
diff --git a/www/public/carbon-light.jpg b/www/public/carbon-light.jpg
index f9b2649483..2966e2b5d6 100644
Binary files a/www/public/carbon-light.jpg and b/www/public/carbon-light.jpg differ