mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Fix 'groupQuery' GQL on group edit page
- Fix links 'group/my-groups' to 'my-groups'. - Fix 'createGroupMutation' to be used as a function on group create page.
This commit is contained in:
parent
bba4ca0fc6
commit
c2f7604918
@ -60,7 +60,7 @@
|
||||
</ds-space>
|
||||
</ds-form>
|
||||
<ds-space centered v-show="!update">
|
||||
<nuxt-link to="/group/my-groups">zurück</nuxt-link>
|
||||
<nuxt-link to="/my-groups">zurück</nuxt-link>
|
||||
</ds-space>
|
||||
</ds-container>
|
||||
</div>
|
||||
|
||||
@ -143,7 +143,7 @@ export const changeGroupMemberRoleMutation = () => {
|
||||
// ------ queries
|
||||
|
||||
export const groupQuery = (i18n) => {
|
||||
const lang = i18n.locale().toUpperCase()
|
||||
const lang = i18n ? i18n.locale().toUpperCase() : 'EN'
|
||||
return gql`
|
||||
query ($isMember: Boolean, $id: ID, $slug: String) {
|
||||
Group(isMember: $isMember, id: $id, slug: $slug) {
|
||||
|
||||
@ -33,7 +33,7 @@ export default {
|
||||
const variables = { name, about, description, groupType, actionRadius, categoryIds }
|
||||
try {
|
||||
await this.$apollo.mutate({
|
||||
mutation: createGroupMutation,
|
||||
mutation: createGroupMutation(),
|
||||
variables,
|
||||
})
|
||||
this.$toast.success(this.$t('group.group-created'))
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</ds-flex-item>
|
||||
</ds-flex>
|
||||
<ds-space centered>
|
||||
<nuxt-link to="/group/my-groups">zurück</nuxt-link>
|
||||
<nuxt-link to="/my-groups">zurück</nuxt-link>
|
||||
</ds-space>
|
||||
</div>
|
||||
</template>
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
Group: [group],
|
||||
},
|
||||
} = await client.query({
|
||||
query: groupQuery(this.$i18n),
|
||||
query: groupQuery(), // "this.$i18n" is undefined here, so we use default lang
|
||||
variables: { id },
|
||||
})
|
||||
if (group.myRole !== 'owner') {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user