Add buttons to the book description page
This commit is contained in:
committed by
Aditya Chandel
parent
6004c2cbaa
commit
3630b27e37
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user