Added button to send observations data by email
This commit is contained in:
parent
b8a9321b3d
commit
5154820325
@ -180,7 +180,12 @@
|
|||||||
</b-tab>
|
</b-tab>
|
||||||
</b-tabs>
|
</b-tabs>
|
||||||
</b-card>
|
</b-card>
|
||||||
<b-button class="mt-2" variant="success" @click="getCSV()">CSV Dump</b-button>
|
<b-button class="mt-2" variant="success" @click="getCSV()"
|
||||||
|
>CSV Dump</b-button
|
||||||
|
>
|
||||||
|
<b-button class="mt-2" variant="success" @click="sendEmail()"
|
||||||
|
>Send as Email</b-button
|
||||||
|
>
|
||||||
</b-container>
|
</b-container>
|
||||||
<b-container v-else-if="loading">Loading...</b-container>
|
<b-container v-else-if="loading">Loading...</b-container>
|
||||||
<b-container v-else>
|
<b-container v-else>
|
||||||
@ -289,6 +294,13 @@ export default {
|
|||||||
setInterval: function(amount, timeType) {
|
setInterval: function(amount, timeType) {
|
||||||
this.endDate = moment();
|
this.endDate = moment();
|
||||||
this.startDate = moment().subtract(amount, timeType);
|
this.startDate = moment().subtract(amount, timeType);
|
||||||
|
},
|
||||||
|
sendEmail: function() {
|
||||||
|
Vue.axios.post("/observations/email").catch(error => {
|
||||||
|
this.errorStatus = error.response.status;
|
||||||
|
this.errorMessage = error.response.data;
|
||||||
|
this.$refs.errorModal.show();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user