Add “Unassigned” shelf view for books not in any shelf
This commit is contained in:
committed by
Aditya Chandel
parent
22f10d0475
commit
4cb82d2ba7
@@ -106,4 +106,12 @@ export class ShelfService {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
getUnshelvedBookCount(): Observable<number> {
|
||||
return this.bookService.bookState$.pipe(
|
||||
map(state =>
|
||||
(state.books || []).filter(book => !book.shelves || book.shelves.length === 0).length
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user