-
Notifications
You must be signed in to change notification settings - Fork 241
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
Visually distinguish invitations in calendar grid #6624
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Grigory Vodyanov <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6624 +/- ##
=============================================
+ Coverage 23.17% 59.30% +36.12%
- Complexity 472 475 +3
=============================================
Files 250 42 -208
Lines 12020 2290 -9730
Branches 2296 0 -2296
=============================================
- Hits 2786 1358 -1428
+ Misses 8907 932 -7975
+ Partials 327 0 -327
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
if (object.status && object._properties.size > 9) { | ||
let didEveryoneDecline = true; | ||
for (const [key, value] of object._properties.entries()) { | ||
if (key === 'ATTENDEE') { | ||
value.forEach((attendee) => { | ||
for (const [key, value] of attendee._parameters.entries()) { | ||
if (key === 'PARTSTAT') console.log('key', key, value._value) | ||
if (key === 'PARTSTAT' && value._value !== 'DECLINED') { | ||
didEveryoneDecline = false; | ||
} | ||
} | ||
}) | ||
} | ||
} | ||
if (didEveryoneDecline) { | ||
classNames.push('fc-event-nc-all-declined') | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The data you need is already exposed by calendar-js. Take a look at the following pseudo-code:
for (const attendeeProperty of object.getPropertyIterator('ATTENDEE')) {
const hasDeclined = attendeeProperty.participationStatus === 'DECLINED'
// TODO: write the rest of the code
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And to check if there are attendees you could use:
object.hasProperty('ATTENDEE')
Fix #3869