fix lint and locales

This commit is contained in:
ogerly 2022-09-19 18:50:53 +02:00
parent 7d5205e08b
commit 57a6e74d10
10 changed files with 122 additions and 87 deletions

View File

@ -30,7 +30,11 @@
placeholder="Status ..." placeholder="Status ..."
></ds-select> ></ds-select>
<ds-input v-model="formData.about" :label="$t('group.short-description')" rows="3"></ds-input> <ds-input
v-model="formData.about"
:label="$t('group.short-description')"
rows="3"
></ds-input>
<ds-input <ds-input
v-model="formData.description" v-model="formData.description"
@ -112,7 +116,8 @@ export default {
}, },
}, },
data() { data() {
const { name, slug, groupType, about, description, actionRadius, locationName, categories } = this.group const { name, slug, groupType, about, description, actionRadius, locationName, categories } =
this.group
return { return {
categoriesActive: this.$env.CATEGORIES_ACTIVE, categoriesActive: this.$env.CATEGORIES_ACTIVE,
disabled: false, disabled: false,
@ -155,7 +160,8 @@ export default {
methods: { methods: {
submit() { submit() {
const { name, about, description, groupType, actionRadius, locationName, categoryIds } = this.formData const { name, about, description, groupType, actionRadius, locationName, categoryIds } =
this.formData
const variables = { const variables = {
name, name,
about, about,

View File

@ -1,8 +1,12 @@
<template> <template>
<ds-container class="group-card"> <ds-container class="group-card">
<ds-space> <ds-space>
<div @click="onlyOwnerGroups(true)" ref="myGruops"><ds-button >{{$t('group.show-my-created-groups')}}</ds-button ></div> <div @click="onlyOwnerGroups(true)" ref="myGruops">
<div @click="onlyOwnerGroups(false)" ref="allGruops" hidden><ds-button >{{$t('group.show-all-my-groups')}}</ds-button ></div> <ds-button>{{ $t('group.show-my-created-groups') }}</ds-button>
</div>
<div @click="onlyOwnerGroups(false)" ref="allGruops" hidden>
<ds-button>{{ $t('group.show-all-my-groups') }}</ds-button>
</div>
</ds-space> </ds-space>
<ds-space margin-bottom="small" v-for="item in items" :key="item.id"> <ds-space margin-bottom="small" v-for="item in items" :key="item.id">
<ds-card :ref="item.myRole === null ? 'null' : item.myRole"> <ds-card :ref="item.myRole === null ? 'null' : item.myRole">
@ -38,7 +42,13 @@
</ds-space> </ds-space>
</ds-flex-item> </ds-flex-item>
<ds-flex-item width="10%" centered> <ds-flex-item width="10%" centered>
<group-menu v-if="item.myRole === 'owner'" resource-type="group" :resource="item" :isOwner="item.myRole" @joinGroup="joinGroup"/> <group-menu
v-if="item.myRole === 'owner'"
resource-type="group"
:resource="item"
:isOwner="item.myRole"
@joinGroup="joinGroup"
/>
</ds-flex-item> </ds-flex-item>
</ds-flex> </ds-flex>
</ds-card> </ds-card>

View File

@ -1,6 +1,8 @@
<template> <template>
<div> <div>
<ds-space><h3>{{$t('group.members')}}</h3></ds-space> <ds-space>
<h3>{{ $t('group.members') }}</h3>
</ds-space>
<base-card> <base-card>
<ds-table :data="responseGroupMembersQuery" :fields="tableFields" condensed> <ds-table :data="responseGroupMembersQuery" :fields="tableFields" condensed>
<template slot="avatar"> <template slot="avatar">

View File

@ -59,14 +59,14 @@ export default {
if (this.resourceType === 'group') { if (this.resourceType === 'group') {
if (this.isOwner === 'owner') { if (this.isOwner === 'owner') {
routes.push({ routes.push({
label: $t('admin.settings.name'), label: this.$t('admin.settings.name'),
path: `/group/edit/${this.resource.id}`, path: `/group/edit/${this.resource.id}`,
icon: 'edit', icon: 'edit',
}) })
} }
if (this.isOwner === 'usual') { if (this.isOwner === 'usual') {
routes.push({ routes.push({
label: $t('group.unfollowing'), label: this.$t('group.unfollowing'),
callback: () => { callback: () => {
// this.$emit('join-group', this.resource) // this.$emit('join-group', this.resource)
}, },
@ -75,7 +75,7 @@ export default {
} }
if (this.isOwner === 'pending') { if (this.isOwner === 'pending') {
routes.push({ routes.push({
label: $t('group.unfollowing'), label: this.$t('group.unfollowing'),
callback: () => { callback: () => {
// this.removePending(this.resource) // this.removePending(this.resource)
}, },
@ -84,7 +84,7 @@ export default {
} }
if (this.isOwner === null) { if (this.isOwner === null) {
routes.push({ routes.push({
label: $t('group.follow'), label: this.$t('group.follow'),
callback: () => { callback: () => {
this.$emit('joinGroup', this.resource) this.$emit('joinGroup', this.resource)
}, },

View File

@ -371,28 +371,28 @@
"following": "Folge Ich" "following": "Folge Ich"
}, },
"group": { "group": {
"group-name":"Gruppenname",
"myGroups": "Meine Gruppen",
"group-created": "Die Gruppe wurde angelegt!",
"group-updated": "Die Gruppendaten wurden geändert!",
"newGroup": "Erstelle eine neue Gruppe",
"save": "Neue Gruppe anlegen",
"update": "Änderung speichern",
"show-my-created-groups":"Meine angelegten Gruppen anzeigen",
"show-all-my-groups":"Alle meine Gruppen anzeigen",
"visibility":"Sichtbarkeit",
"short-description":"Kurzbeschreibung",
"long-description":"Beschreibung",
"radius":"Radius",
"reset-form":"Formular zurücksetzen",
"back": "zurück", "back": "zurück",
"unfollowing":"Nicht mehr folgen", "change-member-role": "Die Rolle wurde auf ({role}) geändert!",
"follow": "Folge", "follow": "Folge",
"settings":"Gruppeneinstellungen",
"general": "Allgemein", "general": "Allgemein",
"group-created": "Die Gruppe wurde angelegt!",
"group-name": "Gruppenname",
"group-updated": "Die Gruppendaten wurden geändert!",
"long-description": "Beschreibung",
"members": "Mitglieder", "members": "Mitglieder",
"removemember":"Mitglied entfernen", "myGroups": "Meine Gruppen",
"change-member-role":"Die Rolle wurde auf ({role}) geändert!" "newGroup": "Erstelle eine neue Gruppe",
"radius": "Radius",
"remove-member": "Mitglied entfernen",
"reset-form": "Formular zurücksetzen",
"save": "Neue Gruppe anlegen",
"settings": "Gruppeneinstellungen",
"short-description": "Kurzbeschreibung",
"show-all-my-groups": "Alle meine Gruppen anzeigen",
"show-my-created-groups": "Meine angelegten Gruppen anzeigen",
"unfollowing": "Nicht mehr folgen",
"update": "Änderung speichern",
"visibility": "Sichtbarkeit"
}, },
"hashtags-filter": { "hashtags-filter": {
"clearSearch": "Suche löschen", "clearSearch": "Suche löschen",

View File

@ -371,27 +371,28 @@
"following": "Following" "following": "Following"
}, },
"group": { "group": {
"group-name":"Group name",
"myGroups": "My Groups",
"group-created": "The group was created!",
"group-updated": "The group data has been changed.",
"newGroup": "Create a new Group",
"save": "Create new group",
"update": "Save change",
"show-my-created-groups":"show only my groups",
"show-all-my-groups":"show all groups",
"visibility":"Visibility",
"short-description":"Short description",
"long-description":"Description",
"radius":"Radius",
"reset-form":"Reset form",
"back": "back", "back": "back",
"unfollowing":"unfollowing", "change-member-role": "The role has been changed to ({role})!",
"follow": "Follow", "follow": "Follow",
"settings":"Group Settings",
"general": "General", "general": "General",
"group-created": "The group was created!",
"group-name": "Group name",
"group-updated": "The group data has been changed.",
"long-description": "Description",
"members": "Members", "members": "Members",
"remove-member":"Remove member" "myGroups": "My Groups",
"newGroup": "Create a new Group",
"radius": "Radius",
"remove-member": "Remove member",
"reset-form": "Reset form",
"save": "Create new group",
"settings": "Group Settings",
"short-description": "Short description",
"show-all-my-groups": "show all groups",
"show-my-created-groups": "show only my groups",
"unfollowing": "unfollowing",
"update": "Save change",
"visibility": "Visibility"
}, },
"hashtags-filter": { "hashtags-filter": {
"clearSearch": "Clear search", "clearSearch": "Clear search",

View File

@ -29,10 +29,16 @@ export default {
}, },
methods: { methods: {
async createGroup(value) { async createGroup(value) {
console.log('createGroup')
console.log(value)
const { name, about, description, groupType, actionRadius, locationName, categoryIds } = value const { name, about, description, groupType, actionRadius, locationName, categoryIds } = value
const variables = { name, about, description, groupType, actionRadius, locationName, categoryIds } const variables = {
name,
about,
description,
groupType,
actionRadius,
locationName,
categoryIds,
}
try { try {
await this.$apollo.mutate({ await this.$apollo.mutate({
mutation: createGroupMutation, mutation: createGroupMutation,

View File

@ -34,11 +34,11 @@ export default {
routes() { routes() {
return [ return [
{ {
name: $t('group.general'), name: this.$t('group.general'),
path: `/group/edit/${this.group.id}`, path: `/group/edit/${this.group.id}`,
}, },
{ {
name: $t('group.members'), name: this.$t('group.members'),
path: `/group/edit/${this.group.id}/members`, path: `/group/edit/${this.group.id}/members`,
}, },
] ]

View File

@ -23,8 +23,18 @@ export default {
}, },
methods: { methods: {
async updateGroup(value) { async updateGroup(value) {
const { id, name, about, description, groupType, actionRadius, locationName, categoryIds } = value const { id, name, about, description, groupType, actionRadius, locationName, categoryIds } =
const variables = { id, name, about, description, groupType, actionRadius, locationName, categoryIds } value
const variables = {
id,
name,
about,
description,
groupType,
actionRadius,
locationName,
categoryIds,
}
try { try {
await this.$apollo.mutate({ await this.$apollo.mutate({
mutation: updateGroupMutation, mutation: updateGroupMutation,