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: prettify keyboard shortcuts
Brad Barbine11a1e375e45
diff --git a/apps/carbon/app/components/Layout/Navigation/DetailSidebar.tsx b/apps/carbon/app/components/Layout/Navigation/DetailSidebar.tsxindex 9356288ea9..c6f8be8f4e 100644--- a/apps/carbon/app/components/Layout/Navigation/DetailSidebar.tsx+++ b/apps/carbon/app/components/Layout/Navigation/DetailSidebar.tsx@@ -9,6 +9,7 @@ import {VStack,useKeyboardShortcuts,} from "@carbon/react";+import { prettifyKeyboardShortcut } from "@carbon/utils";import { Link, useMatches, useNavigate } from "@remix-run/react";import type { IconType } from "react-icons";@@ -64,7 +65,7 @@ const DetailSidebar = ({ links }: DetailSidebarProps) => {</TooltipTrigger>{route.shortcut && (<TooltipContent side="right">- <HStack>{route.shortcut}</HStack>+ <HStack>{prettifyKeyboardShortcut(route.shortcut)}</HStack></TooltipContent>)}</Tooltip>diff --git a/apps/carbon/app/components/New.tsx b/apps/carbon/app/components/New.tsxindex 5ddba9cefe..c6cd78c8af 100644--- a/apps/carbon/app/components/New.tsx+++ b/apps/carbon/app/components/New.tsx@@ -1,7 +1,6 @@import {Button,HStack,- Kbd,Tooltip,TooltipContent,TooltipProvider,@@ -35,10 +34,7 @@ const New = ({ label, to }: NewProps) => {</Button></TooltipTrigger><TooltipContent>- <HStack>- <span>Press </span>- <Kbd>n</Kbd>- </HStack>+ <HStack>N</HStack></TooltipContent></Tooltip></TooltipProvider>diff --git a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable.tsx b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable.tsxindex 91a032586d..71571a9862 100644--- a/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable.tsx+++ b/apps/carbon/app/modules/purchasing/ui/PurchaseOrders/PurchaseOrdersTable.tsx@@ -66,6 +66,7 @@ const PurchaseOrdersTable = memo(<fetcher.Formmethod="post"action={path.to.purchaseOrderFavorite}+ className="flex items-center"><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="unfavorite" />@@ -80,6 +81,7 @@ const PurchaseOrdersTable = memo(<fetcher.Formmethod="post"action={path.to.purchaseOrderFavorite}+ className="flex items-center"><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="favorite" />diff --git a/apps/carbon/app/modules/purchasing/ui/RequestForQuotes/RequestForQuotesTable.tsx b/apps/carbon/app/modules/purchasing/ui/RequestForQuotes/RequestForQuotesTable.tsxindex 9c35a4c694..dc6577cc83 100644--- a/apps/carbon/app/modules/purchasing/ui/RequestForQuotes/RequestForQuotesTable.tsx+++ b/apps/carbon/app/modules/purchasing/ui/RequestForQuotes/RequestForQuotesTable.tsx@@ -64,6 +64,7 @@ const RequestForQuotesTable = memo(<fetcher.Formmethod="post"action={path.to.requestForQuoteFavorite}+ className="flex items-center"><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="unfavorite" />@@ -78,6 +79,7 @@ const RequestForQuotesTable = memo(<fetcher.Formmethod="post"action={path.to.requestForQuoteFavorite}+ className="flex items-center"><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="favorite" />diff --git a/apps/carbon/app/modules/sales/ui/Quotations/QuotationsTable.tsx b/apps/carbon/app/modules/sales/ui/Quotations/QuotationsTable.tsxindex da64e52f42..f0e982e624 100644--- a/apps/carbon/app/modules/sales/ui/Quotations/QuotationsTable.tsx+++ b/apps/carbon/app/modules/sales/ui/Quotations/QuotationsTable.tsx@@ -58,7 +58,11 @@ const QuotationsTable = memo(({ data, count }: QuotationsTableProps) => {cell: ({ row }) => (<HStack>{row.original.favorite ? (- <fetcher.Form method="post" action={path.to.quoteFavorite}>+ <fetcher.Form+ method="post"+ action={path.to.quoteFavorite}+ className="flex items-center"+ ><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="unfavorite" /><button type="submit">@@ -69,7 +73,11 @@ const QuotationsTable = memo(({ data, count }: QuotationsTableProps) => {</button></fetcher.Form>) : (- <fetcher.Form method="post" action={path.to.quoteFavorite}>+ <fetcher.Form+ method="post"+ action={path.to.quoteFavorite}+ className="flex items-center"+ ><input type="hidden" name="id" value={row.original.id!} /><input type="hidden" name="favorite" value="favorite" /><button type="submit">diff --git a/apps/carbon/app/routes/x+/accounting+/defaults.tsx b/apps/carbon/app/routes/x+/accounting+/defaults.tsxindex 8090b90d09..24e3864950 100644--- a/apps/carbon/app/routes/x+/accounting+/defaults.tsx+++ b/apps/carbon/app/routes/x+/accounting+/defaults.tsx@@ -88,7 +88,7 @@ export default function AccountDefaultsRoute() {}>(path.to.accounting);return (- <VStack className="h-full p-4 overflow-y-auto">+ <VStack className="bg-background h-full p-4 overflow-y-auto"><PageTitletitle="Account Defaults"subtitle="These accounts will be used to prepopulate posting grous when a new customer type, supplier type, part group, or location is created."diff --git a/packages/database/supabase/seed.sql b/packages/database/supabase/seed.sqlindex ecb6d803a4..c6b3792db5 100644--- a/packages/database/supabase/seed.sql+++ b/packages/database/supabase/seed.sql@@ -245,7 +245,7 @@ VALUES('51120', 'Customer Payment Discounts', 'Posting', 'cjgo71si60lg1aoj5pcg', NULL, 'Income Statement', 'Expense', 'Average', true, true, 'system'),('51235', 'Rounding Account', 'Posting', 'cjgo71si60lg1aoj5pcg', NULL, 'Income Statement', 'Expense', 'Average', true, true, 'system'),('51999', 'Interest, Total', 'End Total', 'cjgo71si60lg1aoj5pcg', NULL, 'Income Statement', 'Expense', 'Average', false, true, 'system'),- ('79999', 'Income Statement, Total', 'Total', 'cjgo71si60lg1aoj5pag', NULL, 'Income Statement', null, 'Average', true, true, 'system'),+ ('79999', 'Income Statement, Total', 'Total', 'cjgo71si60lg1aoj5pag', NULL, 'Income Statement', null, 'Average', false, true, 'system'),('80000', 'Balance Sheet', 'Begin Total', NULL, NULL, 'Balance Sheet', null, 'Average', false, true, 'system'),('80001', 'Assets', 'Begin Total', NULL, NULL, 'Balance Sheet', 'Asset', 'Average', false, true, 'system'),('81000', 'Fixed Assets', 'Begin Total', NULL, NULL, 'Balance Sheet', 'Asset', 'Average', false, true, 'system'),diff --git a/packages/utils/src/index.ts b/packages/utils/src/index.tsindex ac9ee6afd8..06a3986814 100644--- a/packages/utils/src/index.ts+++ b/packages/utils/src/index.ts@@ -2,6 +2,7 @@ export * from "./accounting";export * from "./date";export * from "./file";export * from "./geo";+export * from "./keyboard";export * from "./math";export * from "./ssr";export * from "./themes";diff --git a/packages/utils/src/keyboard.ts b/packages/utils/src/keyboard.tsnew file mode 100644index 0000000000..d1d1bf09e6--- /dev/null+++ b/packages/utils/src/keyboard.ts@@ -0,0 +1,10 @@+export function prettifyKeyboardShortcut(input: string) {+ return input+ .split("+")+ .join("")+ .replace("Command", "⌘")+ .replace("Shift", "⇧")+ .replace("Control", "⌃")+ .replace("Enter", "↩")+ .toUpperCase();+}