mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge branch 'master' into fix_docker_production_build
This commit is contained in:
commit
2db6329a46
@ -38,10 +38,12 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
text: '',
|
text: '',
|
||||||
},
|
},
|
||||||
|
loading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit(event) {
|
onSubmit(event) {
|
||||||
|
this.loading = true
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
mutation: adminCreateContributionMessage,
|
mutation: adminCreateContributionMessage,
|
||||||
@ -55,9 +57,11 @@ export default {
|
|||||||
this.$emit('update-state', this.contributionId)
|
this.$emit('update-state', this.contributionId)
|
||||||
this.form.text = ''
|
this.form.text = ''
|
||||||
this.toastSuccess(this.$t('message.request'))
|
this.toastSuccess(this.$t('message.request'))
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.toastError(error.message)
|
this.toastError(error.message)
|
||||||
|
this.loading = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReset(event) {
|
onReset(event) {
|
||||||
@ -66,10 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
disabled() {
|
disabled() {
|
||||||
if (this.form.text !== '') {
|
return this.form.text === '' || this.loading
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,10 +38,12 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
text: '',
|
text: '',
|
||||||
},
|
},
|
||||||
|
isSubmitting: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
onSubmit() {
|
onSubmit() {
|
||||||
|
this.isSubmitting = true
|
||||||
this.$apollo
|
this.$apollo
|
||||||
.mutate({
|
.mutate({
|
||||||
mutation: createContributionMessage,
|
mutation: createContributionMessage,
|
||||||
@ -55,9 +57,11 @@ export default {
|
|||||||
this.$emit('update-state', this.contributionId)
|
this.$emit('update-state', this.contributionId)
|
||||||
this.form.text = ''
|
this.form.text = ''
|
||||||
this.toastSuccess(this.$t('message.reply'))
|
this.toastSuccess(this.$t('message.reply'))
|
||||||
|
this.isSubmitting = false
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
this.toastError(error.message)
|
this.toastError(error.message)
|
||||||
|
this.isSubmitting = false
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
onReset() {
|
onReset() {
|
||||||
@ -66,10 +70,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
disabled() {
|
disabled() {
|
||||||
if (this.form.text !== '') {
|
return this.form.text === '' || this.isSubmitting
|
||||||
return false
|
|
||||||
}
|
|
||||||
return true
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user