diff --git a/frontend/src/components/pages/CompliancePage.js b/frontend/src/components/pages/CompliancePage.js index 9964100..e10b45d 100644 --- a/frontend/src/components/pages/CompliancePage.js +++ b/frontend/src/components/pages/CompliancePage.js @@ -90,7 +90,7 @@ function groupByMetricFamily(allEntries, team) { // --------------------------------------------------------------------------- // Sub-components // --------------------------------------------------------------------------- -function VariantPill({ entry }) { +function VariantPill({ entry, label }) { const color = statusColor(entry.status); const isOk = entry.status === 'Meets/Exceeds Target'; return ( @@ -114,7 +114,7 @@ function VariantPill({ entry }) { boxShadow: `0 0 5px ${color}`, }} /> )} - {entry.description || entry.team} + {label && {label}} {pctDisplay(entry.compliance_pct)} ); @@ -178,9 +178,14 @@ function MetricHealthCard({ family, active, onClick, onInfoClick, definitionLook {/* Variant pills */}
- {family.entries.map((entry, i) => ( - - ))} + {family.entries.map((entry, i) => { + // Only show a label when there are multiple variants to differentiate + let label = null; + if (family.entries.length > 1) { + label = entry.priority || `#${i + 1}`; + } + return ; + })}
{/* Target */}