Bug 34418: Add is_empty flag
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
05637b23cf
commit
6660b56124
1 changed files with 6 additions and 2 deletions
|
@ -115,16 +115,20 @@ export const useNavigationStore = defineStore("navigation", {
|
|||
return child.is_base || (child.path && child.path !== "");
|
||||
}
|
||||
|
||||
function _isEmptyNode(child) {
|
||||
return !child.is_empty;
|
||||
}
|
||||
|
||||
function _mapMatches(currentMatches) {
|
||||
return currentMatches
|
||||
.filter(match => _isBaseOrNotStub(match.meta.self))
|
||||
.filter(match => _isEmptyNode(match.meta.self))
|
||||
.map(match => ({
|
||||
...match.meta.self,
|
||||
icon: null,
|
||||
path: match.path,
|
||||
children: null,
|
||||
}))
|
||||
.filter(match => match.title);
|
||||
}));
|
||||
}
|
||||
},
|
||||
leftNavigation() {
|
||||
|
|
Loading…
Reference in a new issue