Skip to content

Commit

Permalink
Remove attendee from group after removal
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Heinrich committed Sep 29, 2023
1 parent 2061abf commit 2b4062a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
9 changes: 0 additions & 9 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,15 +235,6 @@ export default {
})
},
removeAttendee(attendee) {
// Attendee is part of a group, therefore remove from group array
if (attendee.member) {
var groups = this.groups.filter(group => {
return group.uri === attendee.member
})
if (groups) {
console.log(groups)
}
}
this.$store.commit('removeAttendee', {
calendarObjectInstance: this.calendarObjectInstance,
attendee,
Expand Down
13 changes: 10 additions & 3 deletions src/components/Editor/Invitees/InviteesListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
<div v-if="hasMembers"
class="member-list"
:class="{ 'member-list--open':memberListExpaneded }">
<InviteesListItem v-for="member in attendee.members"
<InviteesListItem v-for="member in members"
:key="member.email"
:attendee="member"
:is-read-only="isReadOnly"
Expand Down Expand Up @@ -145,7 +145,8 @@ export default {
},
data() {
return {

Check failure on line 147 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Mixed spaces and tabs
memberListExpaneded: false
memberListExpaneded: false,

Check failure on line 148 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Mixed spaces and tabs
members: this.attendee.members

Check warning on line 149 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing trailing comma
};
},
computed: {
Expand Down Expand Up @@ -232,14 +233,20 @@ export default {
* Removes an attendee from the event
*/
removeAttendee(attendee) {
// Remove attendee from participating group
if (attendee.member) {
this.members = this.members.filter(
member => member.uri !== attendee.uri
)
}
this.$emit('remove-attendee', attendee)
},
/**

Check warning on line 244 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing JSDoc @param "e" declaration
* Toggle member list if attendee is a group
*/
toggleMemberList(e) {
this.memberListExpaneded = !this.memberListExpaneded
},
}

Check warning on line 249 in src/components/Editor/Invitees/InviteesListItem.vue

View workflow job for this annotation

GitHub Actions / eslint

Missing trailing comma
},
}
</script>
Expand Down

0 comments on commit 2b4062a

Please sign in to comment.