Skip to content
Snippets Groups Projects
Verified Commit b6ecc511 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Cache filters

parent 3ccccd15
Branches
No related tags found
No related merge requests found
...@@ -86,12 +86,15 @@ ...@@ -86,12 +86,15 @@
import sources from '@/sources' import sources from '@/sources'
import config from '@/config' import config from '@/config'
import orderBy from 'lodash/orderBy' import orderBy from 'lodash/orderBy'
import defaults from 'lodash/defaults'
import pull from 'lodash/pull' import pull from 'lodash/pull'
import chunk from 'lodash/chunk' import chunk from 'lodash/chunk'
import axios from 'axios' import axios from 'axios'
export default { export default {
data () { data () {
let filters = this.$store.state.cache.suggestionFilters || {}
filters = defaults(filters, {providers: [], retributeOnly: null})
return { return {
sources: sources.sources, sources: sources.sources,
maxDays: 60, maxDays: 60,
...@@ -101,10 +104,7 @@ export default { ...@@ -101,10 +104,7 @@ export default {
aggregatedSuggestions: this.$store.state.cache.aggregatedSuggestions || {}, aggregatedSuggestions: this.$store.state.cache.aggregatedSuggestions || {},
retributeProfiles: this.$store.state.cache.retributeProfiles || {}, retributeProfiles: this.$store.state.cache.retributeProfiles || {},
loadingRetributeProfiles: [], loadingRetributeProfiles: [],
filters: { filters: filters,
retributeOnly: null,
providers: [],
},
providers: this.$store.state.cache.providers || [] providers: this.$store.state.cache.providers || []
} }
}, },
...@@ -295,6 +295,12 @@ export default { ...@@ -295,6 +295,12 @@ export default {
}, },
deep: true deep: true
}, },
"filters": {
handler (v) {
this.$store.commit('setRecursiveState', {key: 'cache.suggestionFilters', value: this.filters})
},
deep: true
},
providers: { providers: {
handler (v) { handler (v) {
this.$store.commit('setRecursiveState', {key: 'cache.providers', value: this.providers}) this.$store.commit('setRecursiveState', {key: 'cache.providers', value: this.providers})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment