v0.18.1 patch — Pantry: location dropdown shows Kitchen only
Filter locations to Kitchen and its children (fridge, freezer, pantry shelves, etc.). Display the full path so "Kitchen › Freezer" shows instead of just "Freezer". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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 } }),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user