mirror of https://github.com/nextcloud/calendar
Improve attendance tooltip of resources
Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
This commit is contained in:
parent
90dd907349
commit
643338eac6
|
@ -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,
|
||||
|
|
|
@ -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: {
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue