Skip to content
Snippets Groups Projects
Commit d0af7e49 authored by Angelina Filippova's avatar Angelina Filippova
Browse files

Hide Invites menu item if invites are disabled

parent 9010cbbf
No related branches found
No related tags found
No related merge requests found
<template>
<div v-if="!item.hidden&&item.children" class="menu-wrapper">
<div v-if="!item.hidden && item.children && invitesEnabled" class="menu-wrapper">
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
<app-link :to="resolvePath(onlyOneChild.path)">
......@@ -68,6 +68,11 @@ export default {
onlyOneChild: null
}
},
computed: {
invitesEnabled() {
return this.basePath === '/invites' ? this.$store.state.app.invitesEnabled : true
}
},
methods: {
hasOneShowingChild(children, parent) {
const showingChildren = children.filter(item => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment