Fixed getCSV to use data from global store

This commit is contained in:
neviyn 2019-07-15 14:14:15 +01:00
parent 301e52adb6
commit 02f919af47

View File

@ -257,12 +257,12 @@ export default {
getCSV: function() {
Vue.axios
.post("/observations/csv", {
site: this.siteSelection,
tutor: this.tutorSelection,
site: this.$store.state.search.site,
tutor: this.$store.state.search.tutor,
startDate: moment(this.startDate).format("YYYY-MM-DD"),
endDate: moment(this.endDate).format("YYYY-MM-DD"),
whom: this.whom,
person: this.person
whom: this.$store.state.search.whom,
person: this.$store.state.search.person
})
.then(response => {
let blob = new Blob([response.data], { type: "text/csv" });