Skip to content

Commit

Permalink
feat: add organizer selection
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
  • Loading branch information
SebastianKrupinski committed Aug 27, 2024
1 parent 1b0a8c9 commit 1df6e09
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

Check warning on line 325 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L323-L325

Added lines #L323 - L325 were not covered by tests
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) {

Check warning on line 329 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L328-L329

Added lines #L328 - L329 were not covered by tests
this.removeAttendee(attendee)
}
}, this)
// determine if current organizer needs to be converted to a attendee
if (attend === true) {
const current = this.selectedOrganizer()

Check warning on line 335 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L335

Added line #L335 was not covered by tests
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,

Check warning on line 340 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L339-L340

Added lines #L339 - L340 were not covered by tests
timezoneId: null,
organizer: null,
member: null,

Check warning on line 342 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L342

Added line #L342 was not covered by tests
})
}
// set new organizer
this.calendarObjectInstanceStore.setOrganizer({
calendarObjectInstance: this.calendarObjectInstance,

Check warning on line 347 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L346-L347

Added lines #L346 - L347 were not covered by tests
commonName: label,
Expand All @@ -359,7 +364,7 @@ export default {
organizer: this.principalsStore.getCurrentUserPrincipal,
member,
})
this.recentAttendees.push(email)
// this.recentAttendees.push(email)

Check warning on line 367 in src/components/Editor/Invitees/InviteesList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/Editor/Invitees/InviteesList.vue#L367

Added line #L367 was not covered by tests
},
removeAttendee(attendee) {
// Remove attendee from participating group
Expand Down

0 comments on commit 1df6e09

Please sign in to comment.