feat(books): surface custom metadata fields in table view

Adds support for displaying custom metadata as columns in the book
table view. The frontend now fetches active fields and dynamically
renders the corresponding cells, backed by book card API updates.

Closes #465
This commit is contained in:
neon
2026-06-29 22:42:40 +00:00
parent a4b39542a0
commit 9e40a3c86a
57 changed files with 1588 additions and 173 deletions
+1
View File
@@ -74,6 +74,7 @@ export type BookCard = {
hardcoverEditionId?: string | null;
narrators: string[];
tags: string[];
customMetadata: CustomMetadataBookValue[];
collapsedSeries?: import("./series-collapse").CollapsedSeriesInfo;
};
+10
View File
@@ -17,6 +17,16 @@ export interface CustomMetadataFieldDefinition {
usageCount: number;
}
/** Lean summary used for table column building. Omits admin-only attributes (usageCount, timestamps). */
export interface CustomMetadataFieldSummary {
id: number;
label: string;
type: CustomMetadataFieldType;
displayOrder: number;
archivedAt: string | null;
enabledLibraryIds: number[];
}
export interface CustomMetadataLibraryEnablement {
fieldId: number;
libraryId: number;