Merge branch 'master' of github.com:gradido/gradido into 2392-refactor-more-emails-to-translatables

This commit is contained in:
Wolfgang Huß 2022-11-29 14:21:50 +01:00
commit 84b5479610
2 changed files with 10 additions and 8 deletions

View File

@ -38,10 +38,12 @@ export default {
form: {
text: '',
},
loading: false,
}
},
methods: {
onSubmit(event) {
this.loading = true
this.$apollo
.mutate({
mutation: adminCreateContributionMessage,
@ -55,9 +57,11 @@ export default {
this.$emit('update-state', this.contributionId)
this.form.text = ''
this.toastSuccess(this.$t('message.request'))
this.loading = false
})
.catch((error) => {
this.toastError(error.message)
this.loading = false
})
},
onReset(event) {
@ -66,10 +70,7 @@ export default {
},
computed: {
disabled() {
if (this.form.text !== '') {
return false
}
return true
return this.form.text === '' || this.loading
},
},
}

View File

@ -38,10 +38,12 @@ export default {
form: {
text: '',
},
isSubmitting: false,
}
},
methods: {
onSubmit() {
this.isSubmitting = true
this.$apollo
.mutate({
mutation: createContributionMessage,
@ -55,9 +57,11 @@ export default {
this.$emit('update-state', this.contributionId)
this.form.text = ''
this.toastSuccess(this.$t('message.reply'))
this.isSubmitting = false
})
.catch((error) => {
this.toastError(error.message)
this.isSubmitting = false
})
},
onReset() {
@ -66,10 +70,7 @@ export default {
},
computed: {
disabled() {
if (this.form.text !== '') {
return false
}
return true
return this.form.text === '' || this.isSubmitting
},
},
}