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.

style: remove colored tags for work centers and processes

Brad Barbin244d76d6c964
diff --git a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
index f08ad848cb..106805975e 100644
--- a/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Abilities/AbilitiesTable.tsx
@@ -2,7 +2,7 @@ import {
AvatarGroup,
AvatarGroupList,
AvatarOverflowIndicator,
- Enumerable,
+ Badge,
MenuIcon,
MenuItem,
} from "@carbon/react";
@@ -68,11 +68,13 @@ const AbilitiesTable = memo(({ data, count }: AbilitiesTableProps) => {
accessorKey: "name",
header: "Ability",
cell: ({ row }) => (
- <Enumerable
- value={row.original.name}
+ <Badge
+ variant="secondary"
onClick={() => navigate(path.to.ability(row.original.id))}
className="cursor-pointer"
- />
+ >
+ {row.original.name}
+ </Badge>
),
},
{
diff --git a/apps/carbon/app/modules/resources/ui/Processes/ProcessesTable.tsx b/apps/carbon/app/modules/resources/ui/Processes/ProcessesTable.tsx
index 848ce3b843..193f8da5f0 100644
--- a/apps/carbon/app/modules/resources/ui/Processes/ProcessesTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/Processes/ProcessesTable.tsx
@@ -18,6 +18,7 @@ import { useCustomColumns } from "~/hooks/useCustomColumns";
import { type Process } from "~/modules/resources";
import { standardFactorType } from "~/modules/shared";
import { usePeople } from "~/stores";
+import type { ListItem } from "~/types";
import { path } from "~/utils/path";
type ProcessesTableProps = {
@@ -45,11 +46,13 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {
accessorKey: "name",
header: "Process",
cell: ({ row }) => (
- <Enumerable
- value={row.original.name}
+ <Badge
+ variant="secondary"
onClick={() => navigate(row.original.id!)}
className="cursor-pointer"
- />
+ >
+ {row.original.name}
+ </Badge>
),
},
{
@@ -67,11 +70,16 @@ const ProcessesTable = memo(({ data, count }: ProcessesTableProps) => {
header: "Work Centers",
cell: ({ row }) => (
<span className="flex gap-2 items-center flex-wrap py-2">
- {((row.original.workCenters ?? []) as Array<{ name: string }>).map(
- (wc) => (
- <Enumerable key={wc.name} value={wc.name} />
- )
- )}
+ {((row.original.workCenters ?? []) as Array<ListItem>).map((wc) => (
+ <Badge
+ key={wc.name}
+ variant="secondary"
+ onClick={() => navigate(path.to.workCenter(wc.id))}
+ className="cursor-pointer"
+ >
+ {wc.name}
+ </Badge>
+ ))}
</span>
),
},
diff --git a/apps/carbon/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx b/apps/carbon/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
index 48a9f8c08d..3107a381be 100644
--- a/apps/carbon/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
+++ b/apps/carbon/app/modules/resources/ui/WorkCenters/WorkCentersTable.tsx
@@ -1,4 +1,5 @@
import {
+ Badge,
Enumerable,
HStack,
MenuIcon,
@@ -74,11 +75,13 @@ const WorkCentersTable = memo(
header: "Work Center",
cell: ({ row }) => (
<HStack>
- <Enumerable
- value={row.original.name}
+ <Badge
+ variant="secondary"
onClick={() => navigate(row.original.id!)}
className="cursor-pointer"
- />
+ >
+ {row.original.name}
+ </Badge>
{row.original.requiredAbilityId && (
<BsFillCheckCircleFill
@@ -94,9 +97,16 @@ const WorkCentersTable = memo(
header: "Processes",
cell: ({ row }) => (
<span className="flex gap-2 items-center flex-wrap py-2">
- {((row.original.processes ?? []) as Array<{ name: string }>).map(
+ {((row.original.processes ?? []) as Array<ListItem>).map(
(process) => (
- <Enumerable key={process.name} value={process.name} />
+ <Badge
+ key={process.name}
+ variant="secondary"
+ onClick={() => navigate(path.to.process(process.id))}
+ className="cursor-pointer"
+ >
+ {row.original.name}
+ </Badge>
)
)}
</span>