Add blacklist for single selections
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
v-if="hasVisibleSelections(selectionGroup)">
|
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">
|
v-if="selection.changeable === true && isSelectionVisible(selection)">
|
||||||
<label :class="{ disabled: !selection.changeable}">
|
<label :class="{ disabled: !selection.changeable}">
|
||||||
<input type="checkbox" class="form-control" v-model="selection.value"
|
<input type="checkbox" class="form-control" v-model="selection.value"
|
||||||
:disabled="!selection.changeable"/>
|
:disabled="!selection.changeable"/>
|
||||||
@@ -50,7 +50,8 @@
|
|||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
crmData: [],
|
crmData: [],
|
||||||
hiddenSelectionGroups: [ 10 ]
|
hiddenSelectionGroups: [ 10 ],
|
||||||
|
hiddenSelections: [ 1070 ]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -75,11 +76,14 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (let selection of group.selections) {
|
for (let selection of group.selections) {
|
||||||
if (selection.changeable === true) {
|
if (this.hiddenSelections.indexOf(selection.id) === -1 && selection.changeable === true) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
},
|
||||||
|
isSelectionVisible (selection) {
|
||||||
|
return this.hiddenSelections.indexOf(selection.id) === -1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
Reference in New Issue
Block a user