diff --git a/src/app/(dashboard)/kitchen/pantry/page.tsx b/src/app/(dashboard)/kitchen/pantry/page.tsx index 1bbee37..71d21c3 100644 --- a/src/app/(dashboard)/kitchen/pantry/page.tsx +++ b/src/app/(dashboard)/kitchen/pantry/page.tsx @@ -17,7 +17,17 @@ export default async function PantryPage() { plant: { select: { id: true, commonName: true, variety: true } }, }, }), - db.location.findMany({ where: { active: true }, orderBy: { name: "asc" }, select: { id: true, name: true } }), + db.location.findMany({ + where: { + active: true, + OR: [ + { name: { equals: "Kitchen", mode: "insensitive" } }, + { path: { contains: "Kitchen", mode: "insensitive" } }, + ], + }, + orderBy: { path: "asc" }, + select: { id: true, name: true, path: true }, + }), db.plant.findMany({ where: { active: true }, orderBy: { commonName: "asc" }, select: { id: true, commonName: true, variety: true } }), ]); diff --git a/src/components/pantry/pantry-client.tsx b/src/components/pantry/pantry-client.tsx index 1b77666..0daec43 100644 --- a/src/components/pantry/pantry-client.tsx +++ b/src/components/pantry/pantry-client.tsx @@ -26,7 +26,7 @@ export type PantryItem = { notes: string | null; }; -export type LocationOption = { id: string; name: string }; +export type LocationOption = { id: string; name: string; path: string | null }; export type PlantOption = { id: string; commonName: string; variety: string | null }; const SOURCE_LABELS: Record = { diff --git a/src/components/pantry/pantry-item-dialog.tsx b/src/components/pantry/pantry-item-dialog.tsx index a1aefed..6b4bdc1 100644 --- a/src/components/pantry/pantry-item-dialog.tsx +++ b/src/components/pantry/pantry-item-dialog.tsx @@ -341,7 +341,7 @@ export function PantryItemDialog({ item, locations, plants, onSuccess }: Props)