Fixed getCSV to use data from global store
This commit is contained in:
parent
301e52adb6
commit
02f919af47
@ -257,12 +257,12 @@ export default {
|
|||||||
getCSV: function() {
|
getCSV: function() {
|
||||||
Vue.axios
|
Vue.axios
|
||||||
.post("/observations/csv", {
|
.post("/observations/csv", {
|
||||||
site: this.siteSelection,
|
site: this.$store.state.search.site,
|
||||||
tutor: this.tutorSelection,
|
tutor: this.$store.state.search.tutor,
|
||||||
startDate: moment(this.startDate).format("YYYY-MM-DD"),
|
startDate: moment(this.startDate).format("YYYY-MM-DD"),
|
||||||
endDate: moment(this.endDate).format("YYYY-MM-DD"),
|
endDate: moment(this.endDate).format("YYYY-MM-DD"),
|
||||||
whom: this.whom,
|
whom: this.$store.state.search.whom,
|
||||||
person: this.person
|
person: this.$store.state.search.person
|
||||||
})
|
})
|
||||||
.then(response => {
|
.then(response => {
|
||||||
let blob = new Blob([response.data], { type: "text/csv" });
|
let blob = new Blob([response.data], { type: "text/csv" });
|
||||||
|
Loading…
Reference in New Issue
Block a user