Feat: Tag filtering not on words

This commit is contained in:
2018-12-03 10:41:57 +01:00
parent 697435de30
commit 84768e5239
4 changed files with 50 additions and 18 deletions

View File

@@ -25,6 +25,11 @@ export default {
],
data () {
return {
default_poste: {
name: 'Tout',
variant: 'info',
icon: 'file-invoice-dollar'
}
}
},
computed: {
@@ -32,15 +37,23 @@ export default {
'postes'
]),
...mapGetters('datas', [
'libelle_filter_rows'
'tag_filter_rows'
]),
poste () {
return this.postes[this.postename]
if (this.postename) {
return this.postes[this.postename]
} else {
return this.default_poste
}
}
},
methods: {
filter_rows () {
return this.libelle_filter_rows(this.poste.words, this.poste.invert)
if (this.poste === this.default_poste) {
return this.tag_filter_rows([])
} else {
return this.tag_filter_rows([this.poste.name])
}
},
total () {
return Math.round(