feat(admin): items_base browser and AdminPageShell on core pages
Co-authored-by: Cursor <[email protected]>
This commit is contained in:
1 parent
7138ae4445
commit
98613af875
42 files changed
+2196
-698
No files matched your search
+11
-7
@@ -102,14 +102,18 @@ export async function fetchAdminList<TRow = PrismaModel>(
|
||||
const { search, page, sort, order } = parsed;
|
||||
|
||||
// Build WHERE clause
|
||||
const searchWhere =
|
||||
const searchOr =
|
||||
search && config.searchFields.length > 0
|
||||
? {
|
||||
OR: config.searchFields.map((field) =>
|
||||
buildFieldCondition(field, search),
|
||||
),
|
||||
}
|
||||
: {};
|
||||
? config.searchFields.map((field) => buildFieldCondition(field, search))
|
||||
: [];
|
||||
// Exact numeric id match (furni / rooms / items lookup by id).
|
||||
if (search && /^\d+$/.test(search)) {
|
||||
const asId = Number(search);
|
||||
if (Number.isFinite(asId) && asId > 0) {
|
||||
searchOr.push({ id: asId });
|
||||
}
|
||||
}
|
||||
const searchWhere = searchOr.length > 0 ? { OR: searchOr } : {};
|
||||
|
||||
// Apply URL filter_* params via filterMap
|
||||
const filterWhere: Record<string, unknown> = {};
|
||||
|
||||
Reference in new issue
Block a user