mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Changed the register community page so that it loads community informations if not provided.
This commit is contained in:
parent
35b01d9010
commit
5febfc337e
@ -49,12 +49,32 @@
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { communityInfo } from '../../graphql/queries'
|
||||
|
||||
export default {
|
||||
name: 'registerCommunity',
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
methods: {},
|
||||
methods: {
|
||||
async onCreated() {
|
||||
if (!this.$state.store.community) {
|
||||
this.$apollo
|
||||
.query({
|
||||
query: communityInfo,
|
||||
})
|
||||
.then((result) => {
|
||||
this.$store.commit('community', result.data.getCommunityInfo)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
})
|
||||
}
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.onCreated()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style></style>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user