-
-
Notifications
You must be signed in to change notification settings - Fork 77
Sireesha taking over Aswin phase3 participation report fixes #4410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
4ed9f99
Merge pull request #4008 from OneCommunityGlobal/development
one-community 84b4292
Merge pull request #4016 from OneCommunityGlobal/development
one-community 9874dfd
Merge pull request #4045 from OneCommunityGlobal/development
one-community 575cb57
Merge pull request #4052 from OneCommunityGlobal/development
one-community 3438814
Merge pull request #4057 from OneCommunityGlobal/development
one-community 6acad2e
Merge pull request #4059 from OneCommunityGlobal/development
one-community 2d942b3
Merge pull request #4076 from OneCommunityGlobal/development
one-community fb52488
Revert "Frontend Release to Main [4.49]"
one-community 6ff6183
Merge pull request #4077 from OneCommunityGlobal/revert-4076-development
one-community 3becdf1
Revert "Revert "Frontend Release to Main [4.49]""
one-community c17dbe7
Merge pull request #4079 from OneCommunityGlobal/revert-4077-revert-4…
one-community a71f1d4
Merge pull request #4085 from OneCommunityGlobal/development
one-community e27fd0e
Merge pull request #4088 from OneCommunityGlobal/development
one-community 175ad65
Merge pull request #4113 from OneCommunityGlobal/development
one-community 89e3428
Merge pull request #4148 from OneCommunityGlobal/development
one-community c64808d
Merge pull request #4174 from OneCommunityGlobal/development
one-community 28f9367
Merge pull request #4180 from OneCommunityGlobal/development
one-community 0646f73
Merge pull request #4189 from OneCommunityGlobal/development
one-community feefb8a
Merge pull request #4223 from OneCommunityGlobal/development
one-community a14ddd0
Revert "Frontend Release to Main [4.57]"
one-community a4f7e20
Merge pull request #4228 from OneCommunityGlobal/revert-4223-development
one-community 0cd4277
Merge pull request #4230 from OneCommunityGlobal/development
one-community ee60711
Revert "Revert "Frontend Release to Main [4.57]""
one-community 60dfb03
Merge pull request #4231 from OneCommunityGlobal/revert-4228-revert-4…
one-community 3d6f695
Revert "Revert "Revert "Frontend Release to Main [4.57]"""
one-community d2ce3a1
Merge pull request #4232 from OneCommunityGlobal/revert-4231-revert-4…
one-community 7b40c4b
Revert "Revert "Revert "Revert "Frontend Release to Main [4.57]""""
one-community 0c291af
Merge pull request #4245 from OneCommunityGlobal/revert-4232-revert-4…
one-community 6c32a62
Revert "Revert "Revert "Revert "Revert "Frontend Release to Main [4.5…
one-community 164d0f5
Merge pull request #4247 from OneCommunityGlobal/revert-4245-revert-4…
one-community 2864a2e
Revert "Revert "Revert "Revert "Revert "Revert "Frontend Release to M…
one-community 78b9e55
Merge pull request #4250 from OneCommunityGlobal/revert-4247-revert-4…
one-community b31c732
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Frontend Rele…
one-community 7dc9ec6
Merge pull request #4251 from OneCommunityGlobal/revert-4250-revert-4…
one-community 04b05b3
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Front…
one-community b897de0
Merge pull request #4259 from OneCommunityGlobal/revert-4251-revert-4…
one-community 3d2eb78
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
one-community 575387a
Merge pull request #4260 from OneCommunityGlobal/revert-4259-revert-4…
one-community e3fee31
Revert "Revert "Revert "Revert "Revert "Revert "Revert "Revert "Rever…
one-community c4d8b86
Merge pull request #4262 from OneCommunityGlobal/revert-4260-revert-4…
one-community 2d0b18f
Merge pull request #4263 from OneCommunityGlobal/development
one-community affdda6
revert: revert 4186 on main
57c96ec
Merge pull request #4264 from OneCommunityGlobal/sundar/revert-4186
one-community f1c2fe7
Merge pull request #4271 from OneCommunityGlobal/development
one-community ea60ff2
Merge pull request #4303 from OneCommunityGlobal/development
one-community ff9bd9e
Merge pull request #4328 from OneCommunityGlobal/development
one-community 9f3e659
Merge pull request #4357 from OneCommunityGlobal/development
one-community 836cae7
Completed Step 1 (Routing Fix) and Step 2 (CSS Module Migration) for …
860db96
Phase 3 Participation Report: Completed Task 4 (CSS modules), Task 5 …
ba1d62f
Completed Tasks 7, 9, and 11 for Phase 3 Participation Report; update…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
146 changes: 146 additions & 0 deletions
146
src/components/CommunityPortal/Reports/Participation/ChartsSection.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| import { useSelector } from 'react-redux'; | ||
| import { | ||
| BarChart, | ||
| Bar, | ||
| XAxis, | ||
| YAxis, | ||
| Tooltip, | ||
| ResponsiveContainer, | ||
| LineChart, | ||
| Line, | ||
| PieChart, | ||
| Pie, | ||
| Cell, | ||
| Legend, | ||
| } from 'recharts'; | ||
|
|
||
| import mockEvents from './mockData'; | ||
| import styles from './ChartsSection.module.css'; | ||
|
|
||
| function ChartsSection() { | ||
| const darkMode = useSelector(state => state.theme.darkMode); | ||
|
|
||
| // Group data by event type | ||
| const eventTypeStats = []; | ||
| const groups = {}; | ||
|
|
||
| mockEvents.forEach(evt => { | ||
| const key = evt.eventType; | ||
|
|
||
| if (!groups[key]) { | ||
| groups[key] = { count: 0, noShowSum: 0, dropSum: 0 }; | ||
| } | ||
|
|
||
| groups[key].count++; | ||
| groups[key].noShowSum += parseInt(evt.noShowRate, 10); | ||
| groups[key].dropSum += parseInt(evt.dropOffRate, 10); | ||
| }); | ||
|
|
||
| for (const key in groups) { | ||
| eventTypeStats.push({ | ||
| eventType: key, | ||
| avgNoShow: Math.round(groups[key].noShowSum / groups[key].count), | ||
| avgDrop: Math.round(groups[key].dropSum / groups[key].count), | ||
| }); | ||
| } | ||
|
|
||
| // Monthly trend | ||
| const monthlyTrend = {}; | ||
|
|
||
| mockEvents.forEach(evt => { | ||
| const m = new Date(evt.eventDate).getMonth(); | ||
|
|
||
| if (!monthlyTrend[m]) { | ||
| monthlyTrend[m] = { count: 0, noShowSum: 0 }; | ||
| } | ||
|
|
||
| monthlyTrend[m].count++; | ||
| monthlyTrend[m].noShowSum += parseInt(evt.noShowRate, 10); | ||
| }); | ||
|
|
||
| const trendData = Object.keys(monthlyTrend).map(m => ({ | ||
| month: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'][m], | ||
| avgNoShow: Math.round(monthlyTrend[m].noShowSum / monthlyTrend[m].count), | ||
| })); | ||
|
|
||
| // Location distribution | ||
| const locationGroups = {}; | ||
|
|
||
| mockEvents.forEach(evt => { | ||
| const loc = evt.location; | ||
| if (!locationGroups[loc]) locationGroups[loc] = 0; | ||
| locationGroups[loc]++; | ||
| }); | ||
|
|
||
| const locationData = Object.keys(locationGroups).map(loc => ({ | ||
| name: loc, | ||
| value: locationGroups[loc], | ||
| })); | ||
|
|
||
| const pieColors = ['#007bff', '#00b894', '#e17055', '#6c5ce7', '#fdcb6e']; | ||
|
|
||
| return ( | ||
| <div className={`${styles.chartsSection} ${darkMode ? styles.chartsSectionDark : ''}`}> | ||
| <h3 className={styles.sectionTitle}>Comparative Charts</h3> | ||
|
|
||
| {/* Row 1 — Bar Charts */} | ||
| <div className={styles.row}> | ||
| {/* No-Show Chart */} | ||
| <div className={styles.chartBox}> | ||
| <h4>No-show rate by event type</h4> | ||
| <ResponsiveContainer width="100%" height={250}> | ||
| <BarChart data={eventTypeStats}> | ||
| <XAxis dataKey="eventType" stroke={darkMode ? '#fff' : '#333'} /> | ||
| <YAxis stroke={darkMode ? '#fff' : '#333'} /> | ||
| <Tooltip /> | ||
| <Bar dataKey="avgNoShow" fill="#FF6B6B" /> | ||
| </BarChart> | ||
| </ResponsiveContainer> | ||
| </div> | ||
|
|
||
| {/* Drop-Off Chart */} | ||
| <div className={styles.chartBox}> | ||
| <h4>Drop-off rate by event type</h4> | ||
| <ResponsiveContainer width="100%" height={250}> | ||
| <BarChart data={eventTypeStats}> | ||
| <XAxis dataKey="eventType" stroke={darkMode ? '#fff' : '#333'} /> | ||
| <YAxis stroke={darkMode ? '#fff' : '#333'} /> | ||
| <Tooltip /> | ||
| <Bar dataKey="avgDrop" fill="#4C89FF" /> | ||
| </BarChart> | ||
| </ResponsiveContainer> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Row 2 — Line Chart */} | ||
| <div className={styles.chartBoxFull}> | ||
| <h4>Monthly no-show trend</h4> | ||
| <ResponsiveContainer width="100%" height={280}> | ||
| <LineChart data={trendData}> | ||
| <XAxis dataKey="month" stroke={darkMode ? '#fff' : '#333'} /> | ||
| <YAxis stroke={darkMode ? '#fff' : '#333'} /> | ||
| <Tooltip /> | ||
| <Line type="monotone" dataKey="avgNoShow" stroke="#FF6B6B" strokeWidth={2} /> | ||
| </LineChart> | ||
| </ResponsiveContainer> | ||
| </div> | ||
|
|
||
| {/* Row 3 — Pie Chart */} | ||
| <div className={styles.chartBoxFull}> | ||
| <h4>Participation by location</h4> | ||
| <ResponsiveContainer width="100%" height={300}> | ||
| <PieChart> | ||
| <Pie data={locationData} dataKey="value" nameKey="name" outerRadius={110} label> | ||
| {locationData.map((entry, index) => ( | ||
| <Cell key={index} fill={pieColors[index % pieColors.length]} /> | ||
| ))} | ||
| </Pie> | ||
| <Legend /> | ||
| </PieChart> | ||
| </ResponsiveContainer> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default ChartsSection; |
56 changes: 56 additions & 0 deletions
56
src/components/CommunityPortal/Reports/Participation/ChartsSection.module.css
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| .chartsSection { | ||
| margin-top: 30px; | ||
| background: #ffffff; | ||
| padding: 25px; | ||
| border-radius: 10px; | ||
| box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); | ||
| } | ||
|
|
||
| .chartsSectionDark { | ||
| background: #1c2541; | ||
| color: #ffffff; | ||
| border: 1px solid #333; | ||
| } | ||
|
|
||
| .sectionTitle { | ||
| font-size: 1.3rem; | ||
| font-weight: 600; | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .row { | ||
| display: grid; | ||
| grid-template-columns: 1fr 1fr; | ||
| gap: 20px; | ||
| } | ||
|
|
||
| .chartBox { | ||
| background: #f8f9fa; | ||
| padding: 15px; | ||
| border-radius: 10px; | ||
| border: 1px solid #ddd; | ||
| } | ||
|
|
||
| .chartsSectionDark .chartBox { | ||
| background: #3a506b; | ||
| border: 1px solid #555; | ||
| } | ||
|
|
||
| .chartBox h4 { | ||
| margin-bottom: 10px; | ||
| font-size: 1rem; | ||
| font-weight: 600; | ||
| } | ||
|
|
||
| .chartBoxFull { | ||
| margin-top: 20px; | ||
| background: #f8f9fa; | ||
| padding: 15px; | ||
| border-radius: 10px; | ||
| border: 1px solid #ddd; | ||
| } | ||
|
|
||
| .chartsSectionDark .chartBoxFull { | ||
| background: #3a506b; | ||
| border: 1px solid #555; | ||
| } |
24 changes: 24 additions & 0 deletions
24
src/components/CommunityPortal/Reports/Participation/Demographics.jsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { useSelector } from 'react-redux'; | ||
| import styles from './Participation.module.css'; | ||
|
|
||
| function Demographics() { | ||
| const darkMode = useSelector(state => state.theme.darkMode); | ||
|
|
||
| return ( | ||
| <div className={`${styles.demographicsPage} ${darkMode ? styles.demographicsPageDark : ''}`}> | ||
| <h2 | ||
| className={`${styles.demographicsHeader} ${darkMode ? styles.demographicsHeaderDark : ''}`} | ||
| > | ||
| Demographics Overview | ||
| </h2> | ||
|
|
||
| <div className={styles.demographicsContent}> | ||
| <div className={styles.placeholderBox}> | ||
| <p>Charts and breakdowns for age, gender, and location demographics will appear here.</p> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| export default Demographics; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mutating date object incorrectly.