use an 'AsyncButton' that waits for completion of an async onClick handler for mail replies and comments in tickets

This commit is contained in:
j3d1 2024-11-05 23:32:53 +01:00
parent 90f47fa9d6
commit 3ee525ef1f

View file

@ -104,18 +104,15 @@ export default {
}, },
}, },
methods: { methods: {
...mapActions(['fetchShippingVouchers']), ...mapActions(['sendMail', 'postComment']),
sendMailAndClear: function () { sendMailAndClear: async function () {
this.$emit('sendMail', this.newMail); await this.sendMail(this.newMail);
this.newMail = ""; this.newMail = "";
}, },
addCommentAndClear: function () { addCommentAndClear: async function () {
this.$emit('addComment', this.newComment); await this.postComment(this.newComment);
this.newComment = ""; this.newComment = "";
} }
},
mounted() {
this.fetchShippingVouchers();
} }
}; };
</script> </script>