diff --git a/epictrack-web/src/components/workPlan/phase/PhaseAccordion.tsx b/epictrack-web/src/components/workPlan/phase/PhaseAccordion.tsx index a7a6b9c62..30dc9eddc 100644 --- a/epictrack-web/src/components/workPlan/phase/PhaseAccordion.tsx +++ b/epictrack-web/src/components/workPlan/phase/PhaseAccordion.tsx @@ -100,6 +100,15 @@ const PhaseAccordion = ({ phase, ...rest }: PhaseAccordionProps) => { [phase] ); + const getPhaseOverdueColour = (daysLeft: number, isLegislated: boolean) => { + if (daysLeft >= 0) return Palette.neutral.dark; + if (isLegislated) { + return Palette.error.dark; + } else { + return Palette.purple; + } + }; + return ( <> { bold={isSelectedPhase} sx={{ ...summaryContentStyle, - color: - phase.days_left < 0 - ? Palette.error.dark - : Palette.neutral.dark, + color: getPhaseOverdueColour( + phase.days_left, + phase.work_phase.legislated + ), }} > {phase.work_phase.is_completed && ( diff --git a/epictrack-web/src/styles/theme.tsx b/epictrack-web/src/styles/theme.tsx index 53b9d74ed..eef3f3739 100644 --- a/epictrack-web/src/styles/theme.tsx +++ b/epictrack-web/src/styles/theme.tsx @@ -63,6 +63,7 @@ export const Palette = { }, white: "#FFFFFF", black: "#000000", + purple: "#4006AC", hover: { light: "#4C81AF", },