diff --git a/src/components/CommunityPortal/Activities/ActivityAttendance.jsx b/src/components/CommunityPortal/Activities/ActivityAttendance.jsx index 0164869801..b1e76342bd 100644 --- a/src/components/CommunityPortal/Activities/ActivityAttendance.jsx +++ b/src/components/CommunityPortal/Activities/ActivityAttendance.jsx @@ -2,7 +2,7 @@ import { useSelector } from 'react-redux'; import { Doughnut } from 'react-chartjs-2'; import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js'; import { v4 as uuidv4 } from 'uuid'; -import { FaRegClock, FaIdCard } from 'react-icons/fa'; +import { FaRegClock, FaIdCard, FaInfoCircle } from 'react-icons/fa'; import styles from './ActivityAttendance.module.css'; import { useState } from 'react'; import profileImg from '../../../assets/images/profile.png'; @@ -57,10 +57,20 @@ const exportToCSV = students => { document.body.removeChild(link); }; -function StatsCard({ title, value, color }) { +function StatsCard({ title, value, color, definition }) { return (
-

{title}

+
+

{title}

+ +

{value}

@@ -159,10 +169,34 @@ function ActivityAttendance() { const [statusFilter, setStatusFilter] = useState('All'); const statsData = [ - { id: uuidv4(), title: 'Total Community Members', value: 400, color: '#4CAF50' }, - { id: uuidv4(), title: 'Registered', value: 100, color: '#2196F3' }, - { id: uuidv4(), title: 'No Show', value: 15, color: '#F44336' }, - { id: uuidv4(), title: 'Community Visitor', value: 19, color: '#FF9800' }, + { + id: uuidv4(), + title: 'Total Community Members', + value: 400, + color: '#4CAF50', + definition: 'All members registered in the community, including inactive users and visitors.', + }, + { + id: uuidv4(), + title: 'Registered', + value: 100, + color: '#2196F3', + definition: 'Members registered for the selected event/session only.', + }, + { + id: uuidv4(), + title: 'No Show', + value: 15, + color: '#F44336', + definition: 'Registered members who did not check in or attend the event.', + }, + { + id: uuidv4(), + title: 'Community Visitor', + value: 19, + color: '#FF9800', + definition: 'Non-registered participants who attended the event.', + }, ]; const students = [ @@ -201,7 +235,13 @@ function ActivityAttendance() {
{statsData.map(stat => ( - + ))}
diff --git a/src/components/CommunityPortal/Activities/ActivityAttendance.module.css b/src/components/CommunityPortal/Activities/ActivityAttendance.module.css index 219a06edee..638938b297 100644 --- a/src/components/CommunityPortal/Activities/ActivityAttendance.module.css +++ b/src/components/CommunityPortal/Activities/ActivityAttendance.module.css @@ -187,16 +187,42 @@ box-shadow: 0 2px 8px var(--shadow-color); } -.statsCard h3 { +.statsValue { + font-size: 1.3rem; + font-weight: 700; +} + +.statsCardHeader { + display: flex; + align-items: center; + justify-content: center; + gap: 6px; margin-bottom: 8px; - font-size: 1rem; +} + +.statsCardHeader h3 { + margin-bottom: 0; + font-size: 0.9rem; font-weight: 500; color: var(--text-color); } -.statsValue { - font-size: 1.3rem; - font-weight: 700; +.infoIconWrapper { + display: flex; + align-items: center; + cursor: help; + color: var(--border-color); + transition: color 0.2s ease; +} + +.infoIconWrapper:hover, +.infoIconWrapper:focus { + color: var(--heading-color); + outline: none; +} + +.infoIcon { + font-size: 0.85rem; } /* ====================================== @@ -278,12 +304,6 @@ margin-top: 10px; } -@media (min-width: 500px) { - .exportBtn { - margin-top: 0; - } -} - .exportBtn:hover { opacity: 0.9; transform: translateY(-1px); @@ -385,10 +405,21 @@ } /* ====================================== - 11) RESPONSIVE ADJUSTMENTS + 11) MEDIA QUERIES ====================================== */ +@media (min-width: 600px) { + .searchContainer { + margin-top: 0; + } +} + +@media (min-width: 500px) { + .exportBtn { + margin-top: 0; + } +} + @media (max-width: 750px) { - /* Stack chart + stats vertically */ .statsChartContainer { flex-direction: column; align-items: center;