mirror of
http://172.20.10.11:3000/gitadmin/INSIGHT-MVP.git
synced 2026-06-25 00:16:41 +02:00
fix(frontend): Kalender-Eintragsfarben vereinheitlichen (einheitliches Primary-Blau statt Hash-Farben)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
8b4a71edb2
commit
f72ac6cb90
1 changed files with 6 additions and 11 deletions
|
|
@ -74,13 +74,8 @@ function getEventsForDay(events: M365CalendarEvent[], day: Date): M365CalendarEv
|
|||
);
|
||||
}
|
||||
|
||||
// Deterministische Farbe anhand Event-ID
|
||||
const EVENT_COLORS = ['#3b82f6', '#8b5cf6', '#ec4899', '#f59e0b', '#10b981', '#ef4444'];
|
||||
function eventColor(id: string): string {
|
||||
let h = 0;
|
||||
for (const ch of id) h = (h * 31 + ch.charCodeAt(0)) % EVENT_COLORS.length;
|
||||
return EVENT_COLORS[h];
|
||||
}
|
||||
// Einheitliche Farbe für alle Kalendereinträge (Primary-Blau)
|
||||
const EVENT_COLOR = 'var(--color-primary)';
|
||||
|
||||
// ── Calendar Event Detail Modal ────────────────────────────────────────────────
|
||||
|
||||
|
|
@ -351,7 +346,7 @@ export function DayAgenda({
|
|||
<div
|
||||
key={event.id}
|
||||
className={styles.agendaItem}
|
||||
style={{ borderLeftColor: eventColor(event.id), cursor: 'pointer' }}
|
||||
style={{ borderLeftColor: EVENT_COLOR, cursor: 'pointer' }}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={() => onEventClick?.(event)}
|
||||
|
|
@ -441,7 +436,7 @@ function AgendaView({
|
|||
<div
|
||||
key={e.id}
|
||||
className={styles.agendaFullEvent}
|
||||
style={{ borderLeftColor: eventColor(e.id), cursor: 'pointer' }}
|
||||
style={{ borderLeftColor: EVENT_COLOR, cursor: 'pointer' }}
|
||||
role="button"
|
||||
tabIndex={0}
|
||||
onClick={(ev) => {
|
||||
|
|
@ -528,7 +523,7 @@ function MonthView({
|
|||
<div
|
||||
key={e.id}
|
||||
className={styles.eventChip}
|
||||
style={{ background: eventColor(e.id) }}
|
||||
style={{ background: EVENT_COLOR }}
|
||||
title={`${formatTime(e.start.dateTime, e.start.timeZone)} ${e.subject}`}
|
||||
>
|
||||
{formatTime(e.start.dateTime, e.start.timeZone)} {e.subject}
|
||||
|
|
@ -593,7 +588,7 @@ function WeekView({
|
|||
<div
|
||||
key={e.id}
|
||||
className={styles.weekEvent}
|
||||
style={{ borderLeftColor: eventColor(e.id) }}
|
||||
style={{ borderLeftColor: EVENT_COLOR }}
|
||||
title={e.subject}
|
||||
onClick={(ev) => {
|
||||
ev.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue