Improve attendance tooltip of resources

Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
Richard Steinmetz 2021-06-01 14:08:54 +02:00
parent 90dd907349
commit 643338eac6
No known key found for this signature in database
GPG Key ID: 31BA3356F0FA2874
2 changed files with 20 additions and 0 deletions

View File

@ -54,6 +54,10 @@ export default {
type: Boolean,
required: true,
},
isResource: {
type: Boolean,
required: true,
},
attendeeIsOrganizer: {
type: Boolean,
required: true,
@ -69,6 +73,17 @@ export default {
return null
}
if (this.isResource && this.participationStatus === 'ACCEPTED') {
return this.$t('calendar', '{name} is available.', {
name: this.commonName,
})
}
if (this.isResource && this.participationStatus === 'DECLINED') {
return this.$t('calendar', '{name} is not available.', {
name: this.commonName,
})
}
if (this.participationStatus === 'ACCEPTED' && this.isViewedByOrganizer) {
return this.$t('calendar', '{name} accepted your invitation.', {
name: this.commonName,

View File

@ -25,6 +25,7 @@
<AvatarParticipationStatus
:attendee-is-organizer="false"
:is-viewed-by-organizer="isViewedByOrganizer"
:is-resource="isResource"
:avatar-link="avatarLink"
:participation-status="attendee.participationStatus"
:organizer-display-name="organizerDisplayName"
@ -140,6 +141,10 @@ export default {
// TODO: check if also viewed by organizer
return !this.isReadOnly
},
isResource() {
return this.attendee.calendarUserType === 'RESOURCE'
|| this.attendee.calendarUserType === 'ROOM'
},
},
methods: {
/**