Ocelot-Social/webapp/pages/my-groups.vue
Wolfgang Huß 2aa85d7b05 Merge branch '5059-epic-groups' of github.com:Ocelot-Social-Community/Ocelot-Social into 5344-add-group-members-management
# Conflicts:
#	backend/src/db/graphql/groups.js
#	backend/src/schema/resolvers/groups.js
#	webapp/components/Group/GroupCard.vue
#	webapp/components/Group/GroupForm.vue
#	webapp/components/Group/GroupTeaser.vue
#	webapp/graphql/groups.js
#	webapp/locales/de.json
#	webapp/locales/en.json
#	webapp/pages/group/edit/_id.vue
2022-09-23 15:04:49 +02:00

59 lines
1.3 KiB
Vue

<template>
<div>
<ds-section>
<h1 class="ds-heading ds-heading-h1">{{ $t('group.myGroups') }}</h1>
<nuxt-link :to="{ name: 'group-create' }">
<base-button
v-tooltip="{
content: $t('group.newGroup'),
placement: 'left',
delay: { show: 500 },
}"
:path="{ name: 'group-create' }"
class="profile-post-add-button"
icon="plus"
circle
filled
/>
</nuxt-link>
</ds-section>
<br />
<br />
<group-list :items="responseGroupListQuery" />
</div>
</template>
<script>
import GroupList from '~/components/Group/GroupList'
import { groupQuery } from '~/graphql/groups.js'
export default {
name: 'MyGroups',
components: {
GroupList,
},
data() {
return {
responseGroupListQuery: [],
}
},
methods: {
async groupListQuery() {
try {
const response = await this.$apollo.query({
query: groupQuery(this.$i18n),
})
this.responseGroupListQuery = response.data.Group
} catch (error) {
this.responseGroupListQuery = []
this.$toast.error(error.message)
} finally {
this.pending = false
}
},
},
created() {
this.groupListQuery()
},
}
</script>