diff --git a/frontend/src/components/Profile/ProfileEdit.vue b/frontend/src/components/Profile/ProfileEdit.vue index 2c656fb..b4287b0 100644 --- a/frontend/src/components/Profile/ProfileEdit.vue +++ b/frontend/src/components/Profile/ProfileEdit.vue @@ -163,7 +163,7 @@ Save - Cancel + Cancel @@ -250,7 +250,8 @@ export default { this.twitter = this.$store.state.user.twitter this.facebook = this.$store.state.user.facebook this.insta = this.$store.state.user.instagram - + this.edit = false + } }, mounted() { diff --git a/frontend/src/views/pages/ManageEvents.vue b/frontend/src/views/pages/ManageEvents.vue index bbdb332..d272a2d 100644 --- a/frontend/src/views/pages/ManageEvents.vue +++ b/frontend/src/views/pages/ManageEvents.vue @@ -5,7 +5,7 @@ - +
- + +

Create an event to see you seminars

item.__typename === "Event") + console.log(this.$store.state.user.associate) + if(res.length !== 0) this.showAddSeminar = true }, methods: { getAll(){ diff --git a/frontend/src/views/pages/authentication/Login.vue b/frontend/src/views/pages/authentication/Login.vue index 68bdbaa..ea7b430 100644 --- a/frontend/src/views/pages/authentication/Login.vue +++ b/frontend/src/views/pages/authentication/Login.vue @@ -134,15 +134,22 @@ export default { .then(res => { if (res.data){ user.manage = [] - res.data.getMyManagingEventsAndSeminars.forEach(element => { - if (element.creator_id === user.id) { - user.manage.push(element) - } else if (element.__typename === "Seminar") { - user.manage.push(element) - } - }) + user.associate = [] + console.log(res.data.getMyManagingEventsAndSeminars) + if(res.data.getMyManagingEventsAndSeminars.length > 0){ + user.associate = res.data.getMyManagingEventsAndSeminars + res.data.getMyManagingEventsAndSeminars.forEach(element => { + if (element.creator_id === user.id) { + user.manage.push(element) + } else if (element.__typename === "Seminar") { + user.manage.push(element) + } + }) + } } else { user.manage = [] + console.log("no manging") + } console.log(user) this.$store.commit("setLogin", user);