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(search): reorder search modal filter chips by likely use (#1374)
Brad Barbin233669a43c23
diff --git a/apps/erp/app/components/Layout/Topbar/Search/config.ts b/apps/erp/app/components/Layout/Topbar/Search/config.tsindex 4d890ee534..b06ce11836 100644--- a/apps/erp/app/components/Layout/Topbar/Search/config.ts+++ b/apps/erp/app/components/Layout/Topbar/Search/config.ts@@ -19,30 +19,12 @@ import {import type { EntityType } from "~/components/Layout/Topbar/Search/types";// Entity type styling configuration (keys must match EntityType)+// Order here drives the filter-chip order in the search modal.+// Ranked most-likely-to-be-searched first; issues and gauges last.export const entityTypeConfig: Record<EntityType,{ bgColor: string; textColor: string; icon: IconType }> = {- customer: {- bgColor: "bg-blue-100 dark:bg-blue-900/30",- textColor: "text-blue-600 dark:text-blue-400",- icon: LuSquareUser- },- supplier: {- bgColor: "bg-purple-100 dark:bg-purple-900/30",- textColor: "text-purple-600 dark:text-purple-400",- icon: PiShareNetworkFill- },- gauge: {- bgColor: "bg-amber-100 dark:bg-amber-900/30",- textColor: "text-amber-600 dark:text-amber-400",- icon: LuGauge- },- issue: {- bgColor: "bg-rose-100 dark:bg-rose-900/30",- textColor: "text-rose-600 dark:text-rose-400",- icon: LuOctagonAlert- },item: {bgColor: "bg-emerald-100 dark:bg-emerald-900/30",textColor: "text-emerald-600 dark:text-emerald-400",@@ -53,25 +35,25 @@ export const entityTypeConfig: Record<textColor: "text-orange-600 dark:text-orange-400",icon: LuHardHat},- employee: {- bgColor: "bg-cyan-100 dark:bg-cyan-900/30",- textColor: "text-cyan-600 dark:text-cyan-400",- icon: LuUser+ salesOrder: {+ bgColor: "bg-teal-100 dark:bg-teal-900/30",+ textColor: "text-teal-600 dark:text-teal-400",+ icon: RiProgress8Line},purchaseOrder: {bgColor: "bg-yellow-100 dark:bg-yellow-900/30",textColor: "text-yellow-600 dark:text-yellow-400",icon: LuShoppingCart},- salesInvoice: {- bgColor: "bg-green-100 dark:bg-green-900/30",- textColor: "text-green-600 dark:text-green-400",- icon: RiProgress8Line+ customer: {+ bgColor: "bg-blue-100 dark:bg-blue-900/30",+ textColor: "text-blue-600 dark:text-blue-400",+ icon: LuSquareUser},- purchaseInvoice: {- bgColor: "bg-red-100 dark:bg-red-900/30",- textColor: "text-red-600 dark:text-red-400",- icon: LuFileCheck+ supplier: {+ bgColor: "bg-purple-100 dark:bg-purple-900/30",+ textColor: "text-purple-600 dark:text-purple-400",+ icon: PiShareNetworkFill},quote: {bgColor: "bg-indigo-100 dark:bg-indigo-900/30",@@ -83,15 +65,35 @@ export const entityTypeConfig: Record<textColor: "text-pink-600 dark:text-pink-400",icon: RiProgress2Line},- salesOrder: {- bgColor: "bg-teal-100 dark:bg-teal-900/30",- textColor: "text-teal-600 dark:text-teal-400",- icon: RiProgress8Line- },supplierQuote: {bgColor: "bg-violet-100 dark:bg-violet-900/30",textColor: "text-violet-600 dark:text-violet-400",icon: LuPackageSearch+ },+ salesInvoice: {+ bgColor: "bg-green-100 dark:bg-green-900/30",+ textColor: "text-green-600 dark:text-green-400",+ icon: RiProgress8Line+ },+ purchaseInvoice: {+ bgColor: "bg-red-100 dark:bg-red-900/30",+ textColor: "text-red-600 dark:text-red-400",+ icon: LuFileCheck+ },+ employee: {+ bgColor: "bg-cyan-100 dark:bg-cyan-900/30",+ textColor: "text-cyan-600 dark:text-cyan-400",+ icon: LuUser+ },+ issue: {+ bgColor: "bg-rose-100 dark:bg-rose-900/30",+ textColor: "text-rose-600 dark:text-rose-400",+ icon: LuOctagonAlert+ },+ gauge: {+ bgColor: "bg-amber-100 dark:bg-amber-900/30",+ textColor: "text-amber-600 dark:text-amber-400",+ icon: LuGauge}};diff --git a/apps/erp/app/components/Layout/Topbar/Search/types.ts b/apps/erp/app/components/Layout/Topbar/Search/types.tsindex f5356f5609..973a95d599 100644--- a/apps/erp/app/components/Layout/Topbar/Search/types.ts+++ b/apps/erp/app/components/Layout/Topbar/Search/types.ts@@ -10,18 +10,18 @@ export type RecentSearch = Route & {};export type EntityType =- | "customer"- | "supplier"| "item"| "job"- | "employee"+ | "salesOrder"| "purchaseOrder"- | "salesInvoice"- | "purchaseInvoice"+ | "customer"+ | "supplier"| "quote"| "salesRfq"- | "salesOrder"| "supplierQuote"+ | "salesInvoice"+ | "purchaseInvoice"+ | "employee"| "issue"| "gauge";