Delete LibraryBrowser component

This commit is contained in:
aditya.chandel
2024-12-21 20:26:49 -07:00
parent e68117c1bc
commit dec80ff7b5
9 changed files with 256 additions and 140 deletions
@@ -175,6 +175,13 @@ export class LibraryAndBookService {
return computed(() => this.libraryBooksMap().get(libraryId) || []);
}
getShelfBooks(shelfId: number) {
return computed(() => {
const allBooks = Array.from(this.libraryBooksMap().values()).flat();
return allBooks.filter(book => book.shelves?.some(shelf => shelf.id === shelfId));
});
}
loadBooksSignal(libraryId: number) {
if (!this.loadedLibraries.has(libraryId)) {
this.http.get<Book[]>(`${this.libraryUrl}/${libraryId}/book`).pipe(