Skip to content

Commit

Permalink
fix: enable attendee selection on shared calendars
Browse files Browse the repository at this point in the history
Signed-off-by: SebastianKrupinski <[email protected]>
  • Loading branch information
SebastianKrupinski committed Jul 24, 2024
1 parent e40c35e commit c66e356
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 24 deletions.
15 changes: 4 additions & 11 deletions src/components/Editor/Invitees/InviteesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,25 @@
{{ statusHeader }}
</div>

<InviteesListSearch v-if="!isReadOnly && !isSharedWithMe && hasUserEmailAddress"
<InviteesListSearch v-if="!isReadOnly && hasUserEmailAddress"
:already-invited-emails="alreadyInvitedEmails"
:organizer="calendarObjectInstance.organizer"
@add-attendee="addAttendee" />
<OrganizerListItem v-if="hasOrganizer"
:is-read-only="isReadOnly || isSharedWithMe"
:is-read-only="isReadOnly"
:organizer="calendarObjectInstance.organizer" />
<InviteesListItem v-for="invitee in limitedInviteesWithoutOrganizer"
:key="invitee.email"
:attendee="invitee"
:is-read-only="isReadOnly || isSharedWithMe"
:is-read-only="isReadOnly"
:organizer-display-name="organizerDisplayName"
:members="invitee.members"
@remove-attendee="removeAttendee" />
<div v-if="limit > 0 && inviteesWithoutOrganizer.length > limit"
class="invitees-list__more">
{{ n('calendar', '%n more guest', '%n more guests', inviteesWithoutOrganizer.length - limit) }}
</div>
<NoAttendeesView v-if="isReadOnly && isSharedWithMe && !hideErrors"
<NoAttendeesView v-if="isReadOnly && !hideErrors"
:message="noOwnerMessage" />
<NoAttendeesView v-else-if="isReadOnly && isListEmpty && hasUserEmailAddress"
:message="noInviteesMessage" />
Expand Down Expand Up @@ -106,10 +106,6 @@ export default {
type: Object,
required: true,
},
isSharedWithMe: {
type: Boolean,
required: true,
},
showHeader: {
type: Boolean,
required: true,
Expand Down Expand Up @@ -144,9 +140,6 @@ export default {
noInviteesMessage() {
return this.$t('calendar', 'No attendees yet')
},
noOwnerMessage() {
return this.$t('calendar', 'You do not own this calendar, so you cannot add attendees to this event')
},
invitees() {
return this.calendarObjectInstance.attendees.filter(attendee => {
return !['RESOURCE', 'ROOM'].includes(attendee.attendeeProperty.userType)
Expand Down
12 changes: 0 additions & 12 deletions src/mixins/EditorMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,18 +196,6 @@ export default {

return calendar.readOnly
},
isSharedWithMe() {
if (!this.calendarObject) {
return true
}

const calendar = this.calendarsStore.getCalendarById(this.calendarObject.calendarId)
if (!calendar) {
return true
}

return calendar.isSharedWithMe
},
/**
* Returns whether the user is an attendee of the event
*
Expand Down
1 change: 0 additions & 1 deletion src/views/EditSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@
<InviteesList v-if="!isLoading"
:calendar-object-instance="calendarObjectInstance"
:is-read-only="isReadOnly"
:is-shared-with-me="isSharedWithMe"
:show-header="false"
@update-dates="updateDates" />
</div>
Expand Down

0 comments on commit c66e356

Please sign in to comment.