Add buttons to the book description page

This commit is contained in:
adityachandelgit
2025-03-28 05:40:53 -06:00
committed by Aditya Chandel
parent 6004c2cbaa
commit 3630b27e37
4 changed files with 117 additions and 33 deletions
@@ -50,6 +50,11 @@ export class BookService {
).subscribe();
}
getBookByIdFromState(bookId: number): Book | undefined {
const currentState = this.bookStateSubject.value;
return currentState.books?.find(book => book.id === bookId);
}
updateBookShelves(bookIds: Set<number | undefined>, shelvesToAssign: Set<number | undefined>, shelvesToUnassign: Set<number | undefined>): Observable<Book[]> {
const requestPayload = {
bookIds: Array.from(bookIds),