/* Parent Engagement Score — involvement dashboard + ways to improve */ function EngBar({ icon, tint, ic, label, value, max, unit }) { const pct = Math.round((value / max) * 100); return (
{label}
{value}/{max} {unit}
); } function EngagementScreen({ onNav, onBack }) { const score = 88; const metrics = [ { icon:'mail-open', tint:'var(--blue-100)', ic:'var(--blue-500)', label:'Messages read', value:12, max:14, unit:'' }, { icon:'calendar-check',tint:'var(--gold-100)', ic:'var(--gold-600)', label:'Events attended', value:3, max:4, unit:'' }, { icon:'clipboard-check',tint:'var(--success-100)',ic:'var(--success-500)', label:'Homework checked', value:18, max:20, unit:'' }, { icon:'car-front', tint:'var(--danger-100)', ic:'var(--danger-500)', label:'On-time pickups', value:20, max:22, unit:'' }, ]; const boosts = [ { icon:'message-circle', tint:'var(--blue-100)', ic:'var(--blue-500)', title:'Reply to Mrs. Johnson', sub:'1 message waiting', pts:'+4', go:()=>onNav('messages') }, { icon:'calendar-plus', tint:'var(--gold-100)', ic:'var(--gold-600)', title:'RSVP to the Science Fair', sub:'June 12 · 6:00 PM', pts:'+6', go:()=>jlToast('RSVP sent · see you there', { icon:'calendar-check' }) }, { icon:'clipboard-list', tint:'var(--success-100)', ic:'var(--success-500)', title:'Check this week\u2019s homework', sub:'2 assignments due', pts:'+3', go:()=>onNav('activities') }, ]; return (
{/* score hero */}
{score}
/ 100
ENGAGEMENT SCORE
Highly Involved
Top 15% this month
{/* breakdown */} This Month
{metrics.map((m,i) => ( {i>0 &&
} ))}
{/* ways to boost */} Ways to Boost Your Score
{boosts.map((b,i) => ( ))}
{/* why it matters note */}
Engaged families help kids thrive. Your score reflects involvement only — it's private to you and never shared with other parents.
); } Object.assign(window, { EngagementScreen, EngBar });