Skip to content

Commit

Permalink
feat: add organizer selection
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Aug 27, 2024
1 parent 0404ac8 commit d50afa8
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -322,22 +322,27 @@ export default {
return organizer
},
changeOrganizer({ id, address, label }, attend) {
// retrieve current organizer
const current = this.selectedOrganizer()
// remove new organizer from attendees
this.calendarObjectInstance.attendees.forEach(function(attendee) {
if (removeMailtoPrefix(attendee.uri) === address || removeMailtoPrefix(attendee.uri) === current.address) {
this.removeAttendee(attendee)
}
}, this)
// determine if current organizer needs to be converted to a attendee
if (attend === true) {
const current = this.selectedOrganizer()
this.calendarObjectInstanceStore.addAttendee({
calendarObjectInstance: this.calendarObjectInstance,
this.addAttendee({
commonName: current.label,
uri: current.address,
email: current.address,
calendarUserType: 'INDIVIDUAL',
participationStatus: 'NEEDS-ACTION',
role: 'REQ-PARTICIPANT',
rsvp: true,
language: null,
timezoneId: null,
organizer: null,
member: null,
})
}
// set new organizer
this.calendarObjectInstanceStore.setOrganizer({
calendarObjectInstance: this.calendarObjectInstance,
commonName: label,
Expand All @@ -359,7 +364,7 @@ export default {
organizer: this.principalsStore.getCurrentUserPrincipal,
member,
})
this.recentAttendees.push(email)
// this.recentAttendees.push(email)
},
removeAttendee(attendee) {
// Remove attendee from participating group
Expand Down

0 comments on commit d50afa8

Please sign in to comment.