Loading src/components/EventRender.vue +15 −1 Original line number Diff line number Diff line Loading @@ -32,18 +32,23 @@ <Bell v-if="hasAlarms" class="icon-event-reminder" :size="14" :style="{ color: isDarkText ? 'var(--color-main-text)' : 'var(--fc-event-text-color)' }" /> :style="{ color: iconColor }" /> <AccountMultiple v-if="hasAttendees" :size="14" :style="{ color: iconColor }" /> </div> </div> </div> </template> <script> import AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue' import Bell from 'vue-material-design-icons/Bell.vue' export default { name: 'EventRender', components: { AccountMultiple, Bell, }, props: { Loading @@ -53,12 +58,18 @@ export default { }, }, computed: { iconColor() { return this.isDarkText ? 'var(--color-main-text)' : 'var(--fc-event-text-color)' }, viewType() { return this.eventDetails?.view?.type }, hasAlarms() { return this.eventDetails?.event?._def?.extendedProps?.hasAlarms }, hasAttendees() { return this.eventDetails?.event?._def?.extendedProps?.hasAttendees }, isDarkText() { return this.eventDetails?.event?._def?.extendedProps?.darkText }, Loading @@ -67,6 +78,9 @@ export default { </script> <style scoped> .fc-event-title.fc-sticky { flex-grow: 1; } .fc-event-main-frame--icons { display: flex; justify-content: space-between; Loading src/fullcalendar/eventSources/eventSourceFunction.js +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez location: object.location, description: object.description, hasAlarms, hasAttendees: object.hasProperty('ATTENDEE'), }, } Loading tests/javascript/unit/fullcalendar/eventSources/freeBusyResourceEventSourceFunction.test.js +21 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), }, { name: 'VEVENT', id: '1-2', Loading @@ -98,6 +99,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'Untitled\nmultiline\nevent', }, { name: 'VEVENT', Loading @@ -117,6 +119,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(true), hasProperty: jest.fn().mockReturnValue(false), }] const eventComponentSet2 = [{ name: 'VEVENT', Loading @@ -136,6 +139,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), }] const eventComponentSet4 = [{ name: 'VEVENT', Loading @@ -155,6 +159,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), color: 'red', }] Loading Loading @@ -220,6 +225,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -241,6 +247,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -262,6 +269,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: true, hasAttendees: false, }, }, { Loading @@ -283,6 +291,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -304,6 +313,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, backgroundColor: '#ff0000', borderColor: '#ff0000', Loading Loading @@ -466,6 +476,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: null, }, { name: 'VTODO', Loading @@ -485,6 +496,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: null, }, { name: 'VTODO', Loading @@ -504,6 +516,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: 99, }, { name: 'VTODO', Loading @@ -523,6 +536,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'This task has a title', percent: null, }, { Loading @@ -543,6 +557,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'This task has a title and percent', percent: 99, }, { Loading @@ -553,6 +568,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { getReferenceRecurrenceId: jest.fn().mockReturnValue({ unixTime: 123 }), canModifyAllDay: jest.fn().mockReturnValue(false), hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'Task without Due', startDate: null, endDate: null, Loading Loading @@ -596,6 +612,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###1', start: event1End, Loading @@ -618,6 +635,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###2', start: event2End, Loading @@ -640,6 +658,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: 99, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###3', start: event3End, Loading @@ -662,6 +681,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false }, id: '1###4', start: event4End, Loading @@ -684,6 +704,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: 99, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###5', start: event5End, Loading Loading
src/components/EventRender.vue +15 −1 Original line number Diff line number Diff line Loading @@ -32,18 +32,23 @@ <Bell v-if="hasAlarms" class="icon-event-reminder" :size="14" :style="{ color: isDarkText ? 'var(--color-main-text)' : 'var(--fc-event-text-color)' }" /> :style="{ color: iconColor }" /> <AccountMultiple v-if="hasAttendees" :size="14" :style="{ color: iconColor }" /> </div> </div> </div> </template> <script> import AccountMultiple from 'vue-material-design-icons/AccountMultiple.vue' import Bell from 'vue-material-design-icons/Bell.vue' export default { name: 'EventRender', components: { AccountMultiple, Bell, }, props: { Loading @@ -53,12 +58,18 @@ export default { }, }, computed: { iconColor() { return this.isDarkText ? 'var(--color-main-text)' : 'var(--fc-event-text-color)' }, viewType() { return this.eventDetails?.view?.type }, hasAlarms() { return this.eventDetails?.event?._def?.extendedProps?.hasAlarms }, hasAttendees() { return this.eventDetails?.event?._def?.extendedProps?.hasAttendees }, isDarkText() { return this.eventDetails?.event?._def?.extendedProps?.darkText }, Loading @@ -67,6 +78,9 @@ export default { </script> <style scoped> .fc-event-title.fc-sticky { flex-grow: 1; } .fc-event-main-frame--icons { display: flex; justify-content: space-between; Loading
src/fullcalendar/eventSources/eventSourceFunction.js +1 −0 Original line number Diff line number Diff line Loading @@ -146,6 +146,7 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez location: object.location, description: object.description, hasAlarms, hasAttendees: object.hasProperty('ATTENDEE'), }, } Loading
tests/javascript/unit/fullcalendar/eventSources/freeBusyResourceEventSourceFunction.test.js +21 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), }, { name: 'VEVENT', id: '1-2', Loading @@ -98,6 +99,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'Untitled\nmultiline\nevent', }, { name: 'VEVENT', Loading @@ -117,6 +119,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(true), hasProperty: jest.fn().mockReturnValue(false), }] const eventComponentSet2 = [{ name: 'VEVENT', Loading @@ -136,6 +139,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), }] const eventComponentSet4 = [{ name: 'VEVENT', Loading @@ -155,6 +159,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), color: 'red', }] Loading Loading @@ -220,6 +225,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -241,6 +247,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -262,6 +269,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: true, hasAttendees: false, }, }, { Loading @@ -283,6 +291,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, }, { Loading @@ -304,6 +313,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { objectType: 'VEVENT', percent: null, hasAlarms: false, hasAttendees: false, }, backgroundColor: '#ff0000', borderColor: '#ff0000', Loading Loading @@ -466,6 +476,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: null, }, { name: 'VTODO', Loading @@ -485,6 +496,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: null, }, { name: 'VTODO', Loading @@ -504,6 +516,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), percent: 99, }, { name: 'VTODO', Loading @@ -523,6 +536,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'This task has a title', percent: null, }, { Loading @@ -543,6 +557,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { }), }, hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'This task has a title and percent', percent: 99, }, { Loading @@ -553,6 +568,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { getReferenceRecurrenceId: jest.fn().mockReturnValue({ unixTime: 123 }), canModifyAllDay: jest.fn().mockReturnValue(false), hasComponent: jest.fn().mockReturnValue(false), hasProperty: jest.fn().mockReturnValue(false), title: 'Task without Due', startDate: null, endDate: null, Loading Loading @@ -596,6 +612,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###1', start: event1End, Loading @@ -618,6 +635,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###2', start: event2End, Loading @@ -640,6 +658,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: 99, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###3', start: event3End, Loading @@ -662,6 +681,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: null, recurrenceId: 123, hasAlarms: false, hasAttendees: false }, id: '1###4', start: event4End, Loading @@ -684,6 +704,7 @@ describe('fullcalendar/freeBusyResourceEventSourceFunction test suite', () => { percent: 99, recurrenceId: 123, hasAlarms: false, hasAttendees: false, }, id: '1###5', start: event5End, Loading