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
feat: add assignment notifications for supplier quote and purchase invoice
Brad Barbin8f9710da2adf
diff --git a/apps/carbon/app/components/Layout/Topbar/Notifications.tsx b/apps/carbon/app/components/Layout/Topbar/Notifications.tsxindex 4de73a549d..ad3caf7a1a 100644--- a/apps/carbon/app/components/Layout/Topbar/Notifications.tsx+++ b/apps/carbon/app/components/Layout/Topbar/Notifications.tsx@@ -122,59 +122,76 @@ function GenericNotification({onClose: () => void;}) {switch (event) {- case NotificationEvent.PurchaseOrderAssignment:+ case NotificationEvent.DigitalQuoteResponse:return (<Notification- icon={<LuShoppingCart />}- to={path.to.purchaseOrderDetails(id)}+ icon={<LuDollarSign />}+ to={path.to.quoteDetails(id)}{...props}/>);- case NotificationEvent.SalesRfqAssignment:+ case NotificationEvent.JobAssignment:return (<Notification- icon={<RiProgress2Line />}- to={path.to.salesRfq(id)}+ icon={<LuHammer />}+ to={path.to.jobDetails(id)}{...props}/>);- case NotificationEvent.QuoteAssignment:++ case NotificationEvent.QuoteExpired:return (<Notification- icon={<RiProgress4Line />}+ icon={<LuCalendarX />}to={path.to.quoteDetails(id)}{...props}/>);- case NotificationEvent.SalesOrderAssignment:+ case NotificationEvent.PurchaseInvoiceAssignment:return (<Notification- icon={<RiProgress8Line />}- to={path.to.salesOrderDetails(id)}+ icon={<LuShoppingCart />}+ to={path.to.purchaseInvoiceDetails(id)}{...props}/>);- case NotificationEvent.JobAssignment:+ case NotificationEvent.PurchaseOrderAssignment:return (<Notification- icon={<LuHammer />}- to={path.to.jobDetails(id)}+ icon={<LuShoppingCart />}+ to={path.to.purchaseOrderDetails(id)}{...props}/>);- case NotificationEvent.DigitalQuoteResponse:+ case NotificationEvent.QuoteAssignment:return (<Notification- icon={<LuDollarSign />}+ icon={<RiProgress4Line />}to={path.to.quoteDetails(id)}{...props}/>);- case NotificationEvent.QuoteExpired:+ case NotificationEvent.SalesRfqAssignment:return (<Notification- icon={<LuCalendarX />}- to={path.to.quoteDetails(id)}+ icon={<RiProgress2Line />}+ to={path.to.salesRfq(id)}+ {...props}+ />+ );+ case NotificationEvent.SalesOrderAssignment:+ return (+ <Notification+ icon={<RiProgress8Line />}+ to={path.to.salesOrderDetails(id)}+ {...props}+ />+ );+ case NotificationEvent.SupplierQuoteAssignment:+ return (+ <Notification+ icon={<LuDollarSign />}+ to={path.to.supplierQuoteDetails(id)}{...props}/>);diff --git a/apps/carbon/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx b/apps/carbon/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsxindex 6394b05d24..f188388f78 100644--- a/apps/carbon/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx+++ b/apps/carbon/app/modules/production/ui/Schedule/Kanban/components/ItemCard.tsx@@ -167,21 +167,21 @@ export function ItemCard({}))}>- <div className="flex w-full max-w-full justify-between">- <div className="flex flex-col space-y-0">+ <div className="flex w-full max-w-full justify-between items-start gap-0">+ <div className="flex flex-col space-y-0 min-w-0">{item.subtitle && (- <span className="text-xs text-muted-foreground line-clamp-1">+ <span className="text-xs text-muted-foreground truncate">{item.subtitle}</span>)}<Linkto={`${item.link}?selectedOperation=${item.id}`}- className="mr-auto font-semibold line-clamp-1"+ className="mr-auto font-semibold truncate">{item.title}</Link></div>- <HStack spacing={0} className="-mr-4">+ <HStack spacing={0} className="flex-shrink-0 -mr-4"><IconButtonaria-label="Highlight job"icon={isHighlighted ? <LuFlashlightOff /> : <LuFlashlight />}diff --git a/apps/carbon/app/novu/workflows.ts b/apps/carbon/app/novu/workflows.tsindex a53f49517a..0f316519df 100644--- a/apps/carbon/app/novu/workflows.ts+++ b/apps/carbon/app/novu/workflows.ts@@ -12,11 +12,13 @@ const payloadSchema = z.object({event: z.enum([NotificationEvent.DigitalQuoteResponse,NotificationEvent.JobAssignment,+ NotificationEvent.PurchaseInvoiceAssignment,NotificationEvent.PurchaseOrderAssignment,NotificationEvent.QuoteAssignment,NotificationEvent.QuoteExpired,NotificationEvent.SalesOrderAssignment,NotificationEvent.SalesRfqAssignment,+ NotificationEvent.SupplierQuoteAssignment,]),from: z.string().optional(),});diff --git a/apps/carbon/app/routes/api+/assign.ts b/apps/carbon/app/routes/api+/assign.tsindex ac159ccc1d..c0ed26a45f 100644--- a/apps/carbon/app/routes/api+/assign.ts+++ b/apps/carbon/app/routes/api+/assign.ts@@ -73,6 +73,10 @@ function getNotificationEvent(table: string): NotificationEvent | null {return NotificationEvent.JobAssignment;case "purchaseOrder":return NotificationEvent.PurchaseOrderAssignment;+ case "purchaseInvoice":+ return NotificationEvent.PurchaseInvoiceAssignment;+ case "supplierQuote":+ return NotificationEvent.SupplierQuoteAssignment;default:return null;}diff --git a/apps/carbon/app/trigger/notify.ts b/apps/carbon/app/trigger/notify.tsindex 71e22512b5..683459d4cb 100644--- a/apps/carbon/app/trigger/notify.ts+++ b/apps/carbon/app/trigger/notify.ts@@ -44,10 +44,12 @@ export const notifyTask = task({function getWorkflow(type: NotificationEvent) {switch (type) {case NotificationEvent.JobAssignment:+ case NotificationEvent.PurchaseInvoiceAssignment:case NotificationEvent.PurchaseOrderAssignment:case NotificationEvent.QuoteAssignment:case NotificationEvent.SalesOrderAssignment:case NotificationEvent.SalesRfqAssignment:+ case NotificationEvent.SupplierQuoteAssignment:return NotificationWorkflow.Assignment;case NotificationEvent.DigitalQuoteResponse:return NotificationWorkflow.DigitalQuoteResponse;diff --git a/packages/notifications/src/index.ts b/packages/notifications/src/index.tsindex 4322f0f74b..d4df113db3 100644--- a/packages/notifications/src/index.ts+++ b/packages/notifications/src/index.ts@@ -11,11 +11,13 @@ export enum NotificationWorkflow {export enum NotificationEvent {DigitalQuoteResponse = "digital-quote-response",JobAssignment = "job-assignment",+ PurchaseInvoiceAssignment = "purchase-invoice-assignment",PurchaseOrderAssignment = "purchase-order-assignment",QuoteAssignment = "quote-assignment",QuoteExpired = "quote-expired",SalesOrderAssignment = "sales-order-assignment",SalesRfqAssignment = "sales-rfq-assignment",+ SupplierQuoteAssignment = "supplier-quote-assignment",}export enum NotificationType {