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 12, 2024
1 parent 1564712 commit 265bcfd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 8 deletions.
25 changes: 18 additions & 7 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ export default {
return organizerDisplayName(this.calendarObjectInstance.organizer)
},
organizerSelection() {
const organizers = []
const owner = this.principalsStore.getPrincipalByUrl(this.calendarInstance.owner)
const principal = this.principalsStore.getCurrentUserPrincipal
var organizers = []

Check failure on line 237 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Unexpected var, use let or const instead

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L237 was not covered by tests
var owner = this.principalsStore.getPrincipalByUrl(this.calendarInstance.owner)

Check failure on line 238 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Unexpected var, use let or const instead
var principal = this.principalsStore.getCurrentUserPrincipal

Check failure on line 239 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Unexpected var, use let or const instead
if (owner) {
organizers.push({
id: owner.id,

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L242 was not covered by tests
Expand All @@ -251,14 +251,25 @@ export default {
address: principal.emailAddress
})
}
return organizers
},
organizerSelected() {

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L256 was not covered by tests
return {
label: this.calendarObjectInstance.organizer.commonName,
address: removeMailtoPrefix(this.calendarObjectInstance.organizer.uri)
var organizer = null

Check failure on line 257 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Unexpected var, use let or const instead
if (this.calendarObjectInstance.organizer !== null) {
let user = this.calendarObjectInstance.organizer

Check failure on line 259 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'user' is never reassigned. Use 'const' instead
organizer = {
label: user.commonName,
address: removeMailtoPrefix(user.uri)
}
}

Check failure on line 264 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Closing curly brace does not appear on the same line as the subsequent block
else if (this.principalsStore.getCurrentUserPrincipal !== null) {
let user = this.principalsStore.getCurrentUserPrincipal

Check failure on line 266 in src/components/Editor/Invitees/InviteesList.vue

View workflow job for this annotation

GitHub Actions / NPM lint

'user' is never reassigned. Use 'const' instead
organizer = {
label: user.displayname,
address: user.emailAddress

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L269 was not covered by tests
}
}

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L271 was not covered by tests
return organizer
},
isListEmpty() {
return !this.calendarObjectInstance.organizer && this.invitees.length === 0
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor/Invitees/OrganizerList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-->

<template>
<NcSelect class=".organizer-select__multiselect"
<NcSelect class="organizer-select__multiselect"
:options="organizerSelection"
:searchable="false"
:max-height="600"
Expand Down

0 comments on commit 265bcfd

Please sign in to comment.