Browse Source

Manual join check :(

master
Joshua Rubingh 4 months ago
parent
commit
5e8e2d0fbf
  1. 19
      pages/researchStudies/_studyId/contributors/join.vue

19
pages/researchStudies/_studyId/contributors/join.vue

@ -56,7 +56,7 @@ export default { @@ -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 { @@ -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 { @@ -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']),

Loading…
Cancel
Save