Browse Source

Join update

master
Joshua Rubingh 5 months ago
parent
commit
c3e7849d1a
  1. 12
      pages/researchStudies/_studyId/contributors/join.vue
  2. 5
      store/studies.js

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

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
</ui-rug-card-title>
<v-card-text class="flex-row mb-6">
{{ studyData }}
<pre>{{ studyData }}</pre>
<v-btn elevation="2" @click="check_invitation"></v-btn>
</v-card-text>
</v-col>
@ -99,12 +99,16 @@ export default { @@ -99,12 +99,16 @@ export default {
},
methods: {
// ...mapActions(['studies/inviteContributor']),
check_invitation() {
// console.log(this)
this.$store.dispatch('studies/joinContributor', {
async check_invitation({ store }) {
console.log(this)
// Dit kan een 404 veroorzaken, maar dat zou dan als melding terug moeten komen, en niet een 404 pagina tonen.....
await this.$store.dispatch('studies/joinContributor', {
studyId: this.studyId,
key: this.jwtToken,
})
const joinSuccess = store.getters['studies/getJoinInvitationMessage']
console.log(joinSuccess)
},
},
}

5
store/studies.js

@ -6,6 +6,7 @@ export const state = () => ({ @@ -6,6 +6,7 @@ export const state = () => ({
studyFields: [],
activeStudy: {},
roles: [],
join: {},
})
export const actions = {
@ -106,6 +107,10 @@ export const mutations = { @@ -106,6 +107,10 @@ export const mutations = {
inviteContributorSuccess(state, { result }) {
},
joinContributorSuccess(state, { result }) {
console.log('Join result', result)
state.join = result;
}
}
export const getters = {

Loading…
Cancel
Save