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);