Add draft count to nav panel
This commit is contained in:
parent
3c828f3575
commit
19b5bb06a0
|
@ -82,7 +82,8 @@ export const ROOT_ITEMS = {
|
|||
drafts: {
|
||||
route: 'drafts',
|
||||
icon: 'file-pen',
|
||||
label: 'nav.drafts'
|
||||
label: 'nav.drafts',
|
||||
badgeGetter: 'draftCount'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ export const getters = {
|
|||
},
|
||||
draftsArray (state) {
|
||||
return Object.values(state.drafts)
|
||||
},
|
||||
draftCount (state) {
|
||||
return Object.values(state.drafts).length
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue