lost added via ALTER TYPE ... ADD VALUE (hand-written migration, stays an enum -- see the schema.prisma comment on why: status values are read directly by business logic like createAssignment()s in_stock gate, a lookup table would not actually decouple that). IMPORT_STATUS_MAP gains lost/missing -> lost mappings for CSV import/re-sync. /assets page gets a Category filter dropdown (alongside the existing Status/Model/search filters) that also narrows the Model dropdown to that category -- with 135 models after the 2026-08-24 real-data import, an unfiltered Model list is unwieldy. Picking a Category resets the Model filter if the currently-selected model does not belong to it. tsc/lint clean, no Vitest coverage -- same deviation as the rest of this branch, see CLAUDE.md.
This commit is contained in:
+3
-1
@@ -3,7 +3,7 @@ import { Prisma } from "@prisma/client";
|
||||
import { prisma } from "./prisma";
|
||||
import { splitCsvLine, splitCsvLines, normalizeHeader, csvField } from "./csv";
|
||||
|
||||
export type AssetItemStatus = "in_stock" | "assigned" | "repair" | "retired";
|
||||
export type AssetItemStatus = "in_stock" | "assigned" | "repair" | "retired" | "lost";
|
||||
|
||||
export interface AssetItemRecord {
|
||||
id: string;
|
||||
@@ -455,6 +455,8 @@ const IMPORT_STATUS_MAP: Record<string, AssetItemStatus> = {
|
||||
"in repair": "repair",
|
||||
retired: "retired",
|
||||
disposed: "retired",
|
||||
lost: "lost",
|
||||
missing: "lost",
|
||||
};
|
||||
|
||||
function statusFromImportText(text: string): AssetItemStatus | null {
|
||||
|
||||
Reference in New Issue
Block a user