|
|
|
@ -10,9 +10,12 @@ export default {
@@ -10,9 +10,12 @@ export default {
|
|
|
|
|
async asyncData({ store }) { |
|
|
|
|
await store.dispatch('studies/getStudies') |
|
|
|
|
await store.dispatch('studies/getStudyFields') |
|
|
|
|
const me = store.getters['authorisation/getUser'] |
|
|
|
|
return { |
|
|
|
|
studies: store.getters['studies/getStudies'], |
|
|
|
|
// TODO: This is due to the invite page.... So here we filter out all studies were we are not active |
|
|
|
|
studies: store.getters['studies/getStudies'].filter(study => {return study.contributors.filter(contributor => {return contributor.researcher.id === me.id && contributor.active}).length > 0}), |
|
|
|
|
studyFields: store.getters['studies/getStudyFields'], |
|
|
|
|
me: store.getters['authorisation/getUser'] |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
head() { |
|
|
|
|