mirror of
https://github.com/IT4Change/gradido.git
synced 2026-02-06 01:46:07 +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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import { communityInfo } from '../../graphql/queries'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'registerCommunity',
|
name: 'registerCommunity',
|
||||||
data() {
|
data() {
|
||||||
return {}
|
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>
|
</script>
|
||||||
<style></style>
|
<style></style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user