Skip to content

Commit

Permalink
style(eventDidMount): change everyone declined icon
Browse files Browse the repository at this point in the history
Signed-off-by: Grigory Vodyanov <[email protected]>
  • Loading branch information
GVodyanov committed Jan 23, 2025
1 parent d340b11 commit f945254
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/fullcalendar/eventSources/eventSourceFunction.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
}
}

if (didEveryoneDecline && object.getFirstPropertyFirstValue('ORGANIZER') === `mailto:${principalsStore.getCurrentUserPrincipalEmail}`) {
fcEvent.backgroundColor = 'transparent'
fcEvent.title = '⚠ ' + fcEvent.title
}

fcEvents.push(fcEvent)
}
}
Expand Down
13 changes: 13 additions & 0 deletions src/fullcalendar/rendering/eventDidMount.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ export default function({ event, el }) {
}
}

if (el.classList.contains('fc-event-nc-all-declined')) {
const titleElement = el.querySelector('.fc-event-title')

const svgString = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path d="m40-120 440-760 440 760H40Zm440-120q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Z"/></svg>'
titleElement.innerHTML = svgString + titleElement.innerHTML

const svgElement = titleElement.querySelector('svg')
svgElement.style.fill = el.style.borderColor
svgElement.style.width = '1.2em'
svgElement.style.paddingBottom = '0.2em'
svgElement.style.verticalAlign = 'middle'
}

if (el.classList.contains('fc-event-nc-tentative')) {
const dotElement = el.querySelector('.fc-daygrid-event-dot')

Expand Down

0 comments on commit f945254

Please sign in to comment.