feat(library): backlog status, rating, notes and priority in the UI
Build, Test & Push Frontend / quality-check (push) Successful in 7s
Build, Test & Push Frontend / docker (push) Successful in 31s

Detail page gets an edit card. The library gets status badges, status filter
chips and a debounced name search, both kept in the URL.
This commit is contained in:
lobo committed 2026-09-24 11:04:42 +02:00
1 parent 7b676f0a1e
commit f94e0aff15
9 files changed
+394 -13

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
export const GAME_STATUSES = ['BACKLOG', 'PLAYING', 'FINISHED', 'COMPLETED', 'DROPPED'];
export const GAME_PRIORITIES = ['HIGH', 'MEDIUM', 'LOW'];
// Radix Select has no empty value, so "no priority" needs its own value in the form.
export const NO_PRIORITY = 'NONE';
export const parseStatus = (value) => (GAME_STATUSES.includes(value) ? value : null);
export const toBacklogRequest = ({status, rating, notes, priority}) => ({
status,
rating: rating || null,
notes: notes?.trim() ? notes : null,
priority: priority === NO_PRIORITY ? null : priority,
});
export const libraryQuery = ({page, size, sort, status, q}) => {
const params = new URLSearchParams({page: String(page), size: String(size), sort});
if (status) params.set('status', status);
if (q?.trim()) params.set('q', q.trim());
return params.toString();
};