refactor: replace genre with tags in frontend TypeScript

- Add fetchTagValues() function in bookshelf.ts
- Update custom-section-builder field id from "genre" to "tags"
- Genre code preserved as comments for easy restoration if needed
- collection-rules.ts already supports both genre and tags

Updates the frontend TypeScript to use tags instead of genre for filtering.
Genre code is preserved in comments for future use if the genre field
is populated.

Relates to IMPLEMENTATION_TAGS_FILTER.md Phase 4
This commit is contained in:
2026-03-25 20:38:21 -04:00
parent b16ee343f8
commit 4ea110cfeb
2 changed files with 33 additions and 5 deletions
+25 -2
View File
@@ -45,9 +45,32 @@ const FILTER_FIELDS: FilterField[] = [
],
valueType: "text",
},
// {
// id: "genre",
// label: "Genre",
// operators: [
// { id: "equals", label: "Equals", requiresValue: true },
// { id: "not_equals", label: "Not Equals", requiresValue: true },
// { id: "in", label: "In", requiresValue: true },
// { id: "not_in", label: "Not In", requiresValue: true },
// ],
// valueType: "select",
// options: [
// "Fiction",
// "Non-Fiction",
// "Sci-Fi",
// "Fantasy",
// "Mystery",
// "Romance",
// "Thriller",
// "Biography",
// "History",
// "Self-Help",
// ],
// },
{
id: "genre",
label: "Genre",
id: "tags",
label: "Tags",
operators: [
{ id: "equals", label: "Equals", requiresValue: true },
{ id: "not_equals", label: "Not Equals", requiresValue: true },