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.

feat: add external notes to supplier quotes

Brad Barbin2079db962773
diff --git a/apps/erp/app/routes/share+/quote.$id.tsx b/apps/erp/app/routes/share+/quote.$id.tsx
index b515f7d181..7b4b4c8471 100644
--- a/apps/erp/app/routes/share+/quote.$id.tsx
+++ b/apps/erp/app/routes/share+/quote.$id.tsx
@@ -571,7 +571,7 @@ const LineItems = ({
</span>
{Object.keys(line.externalNotes ?? {}).length > 0 && (
<div
- className="prose dark:prose-invert prose mt-2 text-muted-foreground"
+ className="prose dark:prose-invert mt-2 text-muted-foreground"
dangerouslySetInnerHTML={{
__html: generateHTML(line.externalNotes as JSONContent)
}}
diff --git a/apps/erp/app/routes/share+/supplier-quote.$id.tsx b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
index f900ef730e..d2f396610e 100644
--- a/apps/erp/app/routes/share+/supplier-quote.$id.tsx
+++ b/apps/erp/app/routes/share+/supplier-quote.$id.tsx
@@ -1,5 +1,6 @@
import { getCarbonServiceRole } from "@carbon/auth";
import { Input, TextArea, ValidatedForm } from "@carbon/form";
+import type { JSONContent } from "@carbon/react";
import {
Badge,
Button,
@@ -8,6 +9,7 @@ import {
CardHeader,
CardTitle,
Checkbox,
+ generateHTML,
Heading,
HStack,
Modal,
@@ -163,7 +165,10 @@ export async function loader({ params, request }: LoaderFunctionArgs) {
quote: quote.data,
company: company.data,
companySettings: companySettings.data,
- quoteLines: quoteLines.data ?? [],
+ quoteLines:
+ quoteLines.data?.map(({ internalNotes, ...line }) => ({
+ ...line
+ })) ?? [],
thumbnails: thumbnails,
quoteLinePrices: quoteLinePrices.data ?? []
}
@@ -283,6 +288,18 @@ const LineItems = ({
<span className="text-muted-foreground text-base truncate">
{line.description}
</span>
+
+ {line.externalNotes &&
+ Object.keys(line.externalNotes).length > 0 && (
+ <div
+ className="prose dark:prose-invert mt-2 text-muted-foreground"
+ dangerouslySetInnerHTML={{
+ __html: generateHTML(
+ line.externalNotes as JSONContent
+ )
+ }}
+ />
+ )}
</div>
</VStack>
</HStack>
@@ -323,7 +340,7 @@ const LinePricing = ({
quoteStatus,
quoteLinePrices
}: {
- line: SupplierQuoteLine;
+ line: Omit<SupplierQuoteLine, "internalNotes">;
currencyCode: string;
locale: string;
selectedLines: Record<number, SelectedLine>;