|
|
|
@ -119,11 +119,15 @@ export default {
@@ -119,11 +119,15 @@ export default {
|
|
|
|
|
async asyncData({ store }) { |
|
|
|
|
await store.dispatch('researchers/getMe') |
|
|
|
|
const me = store.getters['researchers/getMe'] |
|
|
|
|
await store.dispatch('universities/getFaculties', { |
|
|
|
|
universityId: me.university.id, |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
if (me.university ) { |
|
|
|
|
await store.dispatch('universities/getFaculties', { |
|
|
|
|
universityId: me.university.id |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
faculties: store.getters['universities/getFaculties'], |
|
|
|
|
faculties: store.getters['universities/getFaculties'], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
@ -136,7 +140,7 @@ export default {
@@ -136,7 +140,7 @@ export default {
|
|
|
|
|
last_name: profile.last_name, |
|
|
|
|
mobilephone: profile.mobilephone, |
|
|
|
|
idnumber: profile.idnumber, |
|
|
|
|
faculty: profile.faculty.id, |
|
|
|
|
faculty: profile.faculty ? profile.faculty.id : null, |
|
|
|
|
/* TODO: The API should provide the full url, or we should have a setting for specifying the full media url (CDN caching) */ |
|
|
|
|
avatar: profile.avatar, |
|
|
|
|
}, |
|
|
|
|