feat: book counts
This commit is contained in:
parent
5e168c7c79
commit
e3e24f2499
4 changed files with 11 additions and 2 deletions
|
@ -225,6 +225,13 @@ export default {
|
|||
const dateB = DateTime.fromISO(b.dateAdded)
|
||||
return dateB - dateA
|
||||
}),
|
||||
currentBookCount: (books) => {
|
||||
const year = DateTime.now().year
|
||||
return books.filter(book => {
|
||||
if (book.status === 'finished' && book.dateAdded) return parseInt(book.dateAdded.split('-')[0]) === year
|
||||
return ''
|
||||
}).length
|
||||
},
|
||||
|
||||
// tags
|
||||
filterTags: (tags) => {
|
||||
|
|
Reference in a new issue