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: {
...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>