diff --git a/webapp/components/Group/GroupButton.vue b/webapp/components/Group/GroupButton.vue index f6965b349..2000e3046 100644 --- a/webapp/components/Group/GroupButton.vue +++ b/webapp/components/Group/GroupButton.vue @@ -1,6 +1,5 @@ \ No newline at end of file +
+ +
+ diff --git a/webapp/components/Group/GroupForm.vue b/webapp/components/Group/GroupForm.vue index 1cb7ca34c..01f5f906c 100644 --- a/webapp/components/Group/GroupForm.vue +++ b/webapp/components/Group/GroupForm.vue @@ -32,21 +32,21 @@ > - - + + - - + + Reset form 0 - ) { + this.formData.name !== '' && + this.formData.groupType !== '' && + this.formData.about !== '' && + this.formData.description !== '' && + this.formData.actionRadius !== '' && + this.formData.categoryIds.length > 0 + ) { return false } return true }, submitDisableEdit() { - if ( - this.formData.name !== this.group.name - || this.formData.groupType !== this.group.groupType - || this.formData.about !== this.group.about - || this.formData.description !== this.group.description - || this.formData.actionRadius !== this.group.actionRadius - || this.formData.categoryIds.length === 0 - || !this.sameCategories - ) { + this.formData.name !== this.group.name || + this.formData.groupType !== this.group.groupType || + this.formData.about !== this.group.about || + this.formData.description !== this.group.description || + this.formData.actionRadius !== this.group.actionRadius || + this.formData.categoryIds.length === 0 || + !this.sameCategories + ) { return false } return true }, - sameCategories(){ - let formDataCategories = this.formData.categoryIds.map((categoryIds) => categoryIds) - let groupDataCategories = this.group.categories.map((category) => category.id) + sameCategories() { + const formDataCategories = this.formData.categoryIds.map((categoryIds) => categoryIds) + const groupDataCategories = this.group.categories.map((category) => category.id) let result let each = true if (formDataCategories.length !== groupDataCategories.length) return false if (JSON.stringify(formDataCategories) !== JSON.stringify(groupDataCategories)) { - formDataCategories.forEach(element => { - result = groupDataCategories.filter(groupCategorieId => groupCategorieId === element) + formDataCategories.forEach((element) => { + result = groupDataCategories.filter((groupCategorieId) => groupCategorieId === element) if (result.length === 0) each = false }) return each } return true - } - } + }, + }, } diff --git a/webapp/components/Group/GroupList.vue b/webapp/components/Group/GroupList.vue index 8d0583e5a..714dd8c43 100644 --- a/webapp/components/Group/GroupList.vue +++ b/webapp/components/Group/GroupList.vue @@ -1,47 +1,54 @@ @@ -72,33 +79,28 @@ export default { addMemeberToGroup() { alert('addMemeberToGroup group') }, - onlyOwnerGroups(bool){ - console.log('bool', bool) - console.log('this.$refs.usual', this.$refs.usual) - console.log('this.$refs.pending', this.$refs.pending) - console.log('this.$refs.null', this.$refs.null) - - this.$refs.myGruops.hidden = bool - this.$refs.allGruops.hidden = !bool - + onlyOwnerGroups(bool) { + this.$refs.myGruops.hidden = bool + this.$refs.allGruops.hidden = !bool if (this.$refs.usual) { - this.$refs.usual.forEach(element => { - element.$el.hidden = bool}) - } + this.$refs.usual.forEach((element) => { + element.$el.hidden = bool + }) + } - - if (this.$refs.null) { - this.$refs.null.forEach(element => { - element.$el.hidden = bool}) - } + if (this.$refs.null) { + this.$refs.null.forEach((element) => { + element.$el.hidden = bool + }) + } - if (this.$refs.pending) { - this.$refs.pending.forEach(element => { - element.$el.hidden = bool}) - } - - } + if (this.$refs.pending) { + this.$refs.pending.forEach((element) => { + element.$el.hidden = bool + }) + } + }, }, } diff --git a/webapp/components/Group/GroupMember.vue b/webapp/components/Group/GroupMember.vue index a2a561ac7..00c3a4094 100644 --- a/webapp/components/Group/GroupMember.vue +++ b/webapp/components/Group/GroupMember.vue @@ -2,33 +2,33 @@

Members

- - - + + + { + label: 'Unfollowing', + callback: () => { this.unfollowGroup(this.resource) }, - icon: 'minus', - }) + icon: 'minus', + }) } if (this.isOwner === 'pending') { routes.push({ - label: 'Unfollowing', - callback: () => { + label: 'Unfollowing', + callback: () => { this.removePending(this.resource) }, - icon: 'minus', - }) + icon: 'minus', + }) } if (this.isOwner === null) { routes.push({ - label: 'Following', - callback: () => { + label: 'Following', + callback: () => { this.addMemeberToGroup(this.resource) }, - icon: 'plus', - }) + icon: 'plus', + }) } } diff --git a/webapp/layouts/default.vue b/webapp/layouts/default.vue index 06d2cce66..153e83c3c 100644 --- a/webapp/layouts/default.vue +++ b/webapp/layouts/default.vue @@ -105,7 +105,6 @@ import InviteButton from '~/components/InviteButton/InviteButton' import CategoriesMenu from '~/components/FilterMenu/CategoriesMenu.vue' import GroupButton from '~/components/Group/GroupButton.vue' - export default { components: { Logo, diff --git a/webapp/pages/group/create.vue b/webapp/pages/group/create.vue index a5f178e92..5eaff8f91 100644 --- a/webapp/pages/group/create.vue +++ b/webapp/pages/group/create.vue @@ -1,15 +1,16 @@ diff --git a/webapp/pages/group/edit/_id.vue b/webapp/pages/group/edit/_id.vue index 039342e5e..aa6fc6539 100644 --- a/webapp/pages/group/edit/_id.vue +++ b/webapp/pages/group/edit/_id.vue @@ -1,20 +1,21 @@