ZXDB: Releases browser filters, schema lists, and fixes
- UI: Add /zxdb hub cards for Entries and Releases; implement Releases browser
with URL‑synced filters (q, year, sort, DL language/machine, file/scheme/source/case, demo)
and a paginated table (Entry ID, Title, Release #, Year).
- API: Add GET /api/zxdb/releases/search (Zod‑validated, Node runtime) supporting
title, year, sort, and downloads‑based filters; return paged JSON.
- Repo: Rewrite searchReleases to Drizzle QB; correct ORDER BY on releases.release_year;
implement EXISTS on downloads using explicit "from downloads as d"; return JSON‑safe rows.
- Schema: Align Drizzle models with ZXDB for releases/downloads; add lookups
availabletypes, currencies, roletypes, and roles relation.
- API (lookups): Add GET /api/zxdb/{availabletypes,currencies,roletypes} for dropdowns.
- Stability: JSON‑clone SSR payloads before passing to Client Components to avoid
RowDataPacket serialization errors.
Signed-off-by: Junie@lucy.xalior.com
This commit is contained in:
@@ -1,12 +1,9 @@
|
||||
Show downloads even without releases rows
|
||||
ZXDB: Add Phase A schema models and list APIs; align repo
|
||||
|
||||
Add synthetic release groups in getEntryById so downloads
|
||||
are displayed even when there are no matching rows in
|
||||
`releases` for a given entry. Group by `release_seq`,
|
||||
attach downloads, and sort groups for stable order.
|
||||
- Schema: add Drizzle models for availabletypes, currencies, roletypes, issues, magazines, role relations
|
||||
- Repo: add list/search functions for new lookups (availabletypes, currencies, roletypes)
|
||||
- API: expose /api/zxdb/{availabletypes,currencies,roletypes} list endpoints
|
||||
- UI: (deferred) existing pages can now populate dropdowns with proper names where needed
|
||||
- Keeps previous releases/downloads fixes intact
|
||||
|
||||
This fixes cases like /zxdb/entries/1 where `downloads`
|
||||
exist for the entry but `releases` is empty, resulting in
|
||||
no downloads shown in the UI.
|
||||
|
||||
Signed-off-by: Junie@devbox
|
||||
Signed-off-by: Junie@HOSTNAME
|
||||
|
||||
Reference in New Issue
Block a user