Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enable attendee selection on shared calendars #6202

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading