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
|
// Einheitliche Farbe für alle Kalendereinträge (Primary-Blau)
|
||||||
const EVENT_COLORS = ['#3b82f6', '#8b5cf6', '#ec4899', '#f59e0b', '#10b981', '#ef4444'];
|
const EVENT_COLOR = 'var(--color-primary)';
|
||||||
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];
|
|
||||||
}
|
|
||||||
|
|
||||||
// ── Calendar Event Detail Modal ────────────────────────────────────────────────
|
// ── Calendar Event Detail Modal ────────────────────────────────────────────────
|
||||||
|
|
||||||
|
|
@ -351,7 +346,7 @@ export function DayAgenda({
|
||||||
<div
|
<div
|
||||||
key={event.id}
|
key={event.id}
|
||||||
className={styles.agendaItem}
|
className={styles.agendaItem}
|
||||||
style={{ borderLeftColor: eventColor(event.id), cursor: 'pointer' }}
|
style={{ borderLeftColor: EVENT_COLOR, cursor: 'pointer' }}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onClick={() => onEventClick?.(event)}
|
onClick={() => onEventClick?.(event)}
|
||||||
|
|
@ -441,7 +436,7 @@ function AgendaView({
|
||||||
<div
|
<div
|
||||||
key={e.id}
|
key={e.id}
|
||||||
className={styles.agendaFullEvent}
|
className={styles.agendaFullEvent}
|
||||||
style={{ borderLeftColor: eventColor(e.id), cursor: 'pointer' }}
|
style={{ borderLeftColor: EVENT_COLOR, cursor: 'pointer' }}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
onClick={(ev) => {
|
onClick={(ev) => {
|
||||||
|
|
@ -528,7 +523,7 @@ function MonthView({
|
||||||
<div
|
<div
|
||||||
key={e.id}
|
key={e.id}
|
||||||
className={styles.eventChip}
|
className={styles.eventChip}
|
||||||
style={{ background: eventColor(e.id) }}
|
style={{ background: EVENT_COLOR }}
|
||||||
title={`${formatTime(e.start.dateTime, e.start.timeZone)} ${e.subject}`}
|
title={`${formatTime(e.start.dateTime, e.start.timeZone)} ${e.subject}`}
|
||||||
>
|
>
|
||||||
{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
|
<div
|
||||||
key={e.id}
|
key={e.id}
|
||||||
className={styles.weekEvent}
|
className={styles.weekEvent}
|
||||||
style={{ borderLeftColor: eventColor(e.id) }}
|
style={{ borderLeftColor: EVENT_COLOR }}
|
||||||
title={e.subject}
|
title={e.subject}
|
||||||
onClick={(ev) => {
|
onClick={(ev) => {
|
||||||
ev.stopPropagation();
|
ev.stopPropagation();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue