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