Skip to content

Commit

Permalink
Enhanced styling collapsible list
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonas Heinrich committed Sep 28, 2023
1 parent 099fe36 commit 0aca7bc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 7 deletions.
9 changes: 9 additions & 0 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,15 @@ 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
17 changes: 10 additions & 7 deletions src/components/Editor/Invitees/InviteesListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
{{ $t('calendar', 'Non-participant') }}
</ActionRadio>

<ActionButton @click="removeAttendee">
<ActionButton @click="removeAttendee(attendee)">
<template #icon>
<Delete :size="20" decorative />
</template>
Expand All @@ -96,7 +96,7 @@
:is-read-only="isReadOnly"
:organizer-display-name="organizerDisplayName"
:members="member.members"
@remove-attendee="removeAttendee" />
@remove-attendee="removeAttendee(member)" />
</div>
</div>
</template>
Expand Down Expand Up @@ -231,8 +231,8 @@ export default {
/**
* Removes an attendee from the event
*/
removeAttendee() {
this.$emit('remove-attendee', this.attendee)
removeAttendee(attendee) {
this.$emit('remove-attendee', attendee)
},
/**
* Toggle member list if attendee is a group
Expand Down Expand Up @@ -277,12 +277,15 @@ export default {
max-height: 0;
flex-basis: 100%;
overflow: hidden;
transition: max-height 0.3s ease;
padding-left: 15px;
transition: all 0.3s ease;
padding: 0;
opacity: 0;
}

.member-list--open {
max-height: 1000px;
transition: max-height 0.3s ease;
transition: all 0.3s ease;
padding: 0 0 10px 15px;
opacity: 1;
}
</style>

0 comments on commit 0aca7bc

Please sign in to comment.