inventory1
This commit is contained in:
17
client/src/modules/inventory/InventoryStatusBadge.tsx
Normal file
17
client/src/modules/inventory/InventoryStatusBadge.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import type { InventoryItemStatus } from "@mrp/shared/dist/inventory/types.js";
|
||||
|
||||
import { inventoryStatusPalette } from "./config";
|
||||
|
||||
const labels: Record<InventoryItemStatus, string> = {
|
||||
DRAFT: "Draft",
|
||||
ACTIVE: "Active",
|
||||
OBSOLETE: "Obsolete",
|
||||
};
|
||||
|
||||
export function InventoryStatusBadge({ status }: { status: InventoryItemStatus }) {
|
||||
return (
|
||||
<span className={`inline-flex items-center rounded-full px-3 py-1 text-xs font-semibold uppercase tracking-[0.14em] ${inventoryStatusPalette[status]}`}>
|
||||
{labels[status]}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user