Refact: Split config and datas in store
This commit is contained in:
@@ -38,19 +38,18 @@ export default {
|
||||
key: 'Libellé',
|
||||
sortable: true
|
||||
}
|
||||
],
|
||||
],
|
||||
spending: true
|
||||
}
|
||||
},
|
||||
mounted: function () {
|
||||
this.$store.dispatch('config/find_csv')
|
||||
this.$store.dispatch('datas/find_csv')
|
||||
},
|
||||
computed: {
|
||||
...mapGetters({
|
||||
'csvs': 'config/csvs',
|
||||
'data_dir': 'config/data_dir',
|
||||
'rows': 'config/filter_rows',
|
||||
'date': 'config/dates_boundaries'
|
||||
'csvs': 'datas/csvs',
|
||||
'rows': 'datas/filter_rows',
|
||||
'date': 'datas/dates_boundaries'
|
||||
}),
|
||||
date_start () {
|
||||
return this.date[0]
|
||||
@@ -68,10 +67,10 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
update_date_start (e) {
|
||||
this.$store.dispatch('config/set_start_date', e)
|
||||
this.$store.dispatch('datas/set_start_date', e)
|
||||
},
|
||||
update_date_end (e) {
|
||||
this.$store.dispatch('config/set_end_date', e)
|
||||
this.$store.dispatch('datas/set_end_date', e)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user