diff --git a/frontend/src/views/ViewObservations.vue b/frontend/src/views/ViewObservations.vue index aa2f154..8c76528 100644 --- a/frontend/src/views/ViewObservations.vue +++ b/frontend/src/views/ViewObservations.vue @@ -180,7 +180,12 @@ - CSV Dump + CSV Dump + Send as Email Loading... @@ -289,6 +294,13 @@ export default { setInterval: function(amount, timeType) { this.endDate = moment(); 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(); + }); } } };