Hide selection groups without visible selections
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
<div class="row" v-if="loaded">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
<h2>Selektionsmerkmale</h2>
|
||||
<template v-for="selectionGroup in this.crmData.selectionGroups">
|
||||
<template v-for="selectionGroup in this.crmData.selectionGroups"
|
||||
v-if="hasVisibleSelections(selectionGroup)">
|
||||
<h3>{{ selectionGroup.name}}</h3>
|
||||
<div class="checkbox" v-for="selection in selectionGroup.selections"
|
||||
v-if="selection.changeable === true || selection.value === true">
|
||||
@@ -44,10 +45,6 @@
|
||||
<script>
|
||||
import EventBus from '../../_bus'
|
||||
|
||||
const SELECTIONGROUP_TEAM = 10;
|
||||
const SELECTIONGROUP_CONCEPTS = 1;
|
||||
const SELECTIONGROUP_SERVICES = 71;
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
@@ -84,6 +81,14 @@
|
||||
}).then(() => {
|
||||
EventBus.$emit('scrollTo', '#myep-main');
|
||||
});
|
||||
},
|
||||
hasVisibleSelections (group) {
|
||||
for (let selection of group.selections) {
|
||||
if (selection.changeable === true || selection.value === true) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
Reference in New Issue
Block a user