diff --git a/web/src/components/Timeline.vue b/web/src/components/Timeline.vue index 2cf8b97..88bfa94 100644 --- a/web/src/components/Timeline.vue +++ b/web/src/components/Timeline.vue @@ -104,18 +104,15 @@ export default { }, }, methods: { - ...mapActions(['fetchShippingVouchers']), - sendMailAndClear: function () { - this.$emit('sendMail', this.newMail); + ...mapActions(['sendMail', 'postComment']), + sendMailAndClear: async function () { + await this.sendMail(this.newMail); this.newMail = ""; }, - addCommentAndClear: function () { - this.$emit('addComment', this.newComment); + addCommentAndClear: async function () { + await this.postComment(this.newComment); this.newComment = ""; } - }, - mounted() { - this.fetchShippingVouchers(); } }; </script>