diff --git a/pages/researchStudies/_studyId/contributors/join.vue b/pages/researchStudies/_studyId/contributors/join.vue index 6f96346..f4ecbbc 100644 --- a/pages/researchStudies/_studyId/contributors/join.vue +++ b/pages/researchStudies/_studyId/contributors/join.vue @@ -56,7 +56,7 @@ export default { } }, data() { - const $t = this.$t.bind(this) + // const $t = this.$t.bind(this) return { joinState: -1, @@ -79,18 +79,12 @@ export default { }, }, }, - onResponse() { - this.vm.$toast.success( $t('page.researchStudies.studyId.contributors.contributorId.updated', { - study: this.vm.$store.getters['studies/getActiveStudy'].name, - contributor : this.vm.contributor.researcher.display_name, - role: this.vm.$store.getters['studies/getRole'](this.vm.formData.role).name - }) - ) + onResponse(response) { + // TODO: Should be a gui/client side translated text + this.vm.$toast.success( response.data.message ) this.joinState = 0 - - const studyId = this.vm.$route.params.studyId this.vm.$router.push( - this.vm.localePath(`/researchStudies/${studyId}`) + this.vm.localePath(`/researchStudies/${this.vm.$route.params.studyId}`) ) }, }), @@ -104,8 +98,7 @@ export default { } }, mounted() { - // TODO: Should it not be possible to post the form with this.form.submit() ??? - document.forms[0].submit() + // TODO: Should it not be possible to post the form with this.form.submit() ??? Can't get the form to auto submit the correct data :( }, methods: { ...mapActions(['studies/joinContributor']),