Skip to content
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

Fall 2024 Features #3145

Merged
merged 1,147 commits into from
Jan 21, 2025
Merged
Changes from 6 commits
Commits
Show all changes
1147 commits
Select commit Hold shift + click to select a range
7944b83
#2725 removing unused file
superhvarn Dec 17, 2024
4fd7a2d
Merge pull request #2889 from Northeastern-Electric-Racing/2713-team-…
Aaryan1203 Dec 17, 2024
a445ba3
#2776: Added description to test utils to resolve test checks failing
gcooper407 Dec 17, 2024
ac36ab2
#2776: Updated description to test utils to resolve test checks faili…
gcooper407 Dec 17, 2024
e48b771
#3008 created questions block for admin tools
Aaryan1203 Dec 17, 2024
becfde8
#3008 fixed width
Aaryan1203 Dec 17, 2024
1df8e54
#3008 deplot
Aaryan1203 Dec 17, 2024
f34422a
#3008 deplot
Aaryan1203 Dec 17, 2024
75ced28
put all the code under if block
thaninbew Dec 17, 2024
0885f91
implement cant check if not all subtasks checked
thaninbew Dec 17, 2024
1bcc453
Merge branch 'feature/recruitment_and_onboarding' into #2942onboardin…
thaninbew Dec 17, 2024
496471e
Merge pull request #3059 from Northeastern-Electric-Racing/2776-stats…
wavehassman Dec 17, 2024
014dd39
#3010 minor modal changes
dreifusjack Dec 17, 2024
b8ecf05
#3010 modal sizing
dreifusjack Dec 17, 2024
ac3fffe
#2877 Adjust Graphing
Peyton-McKee Dec 17, 2024
0eddce7
Merge branch 'feature/stats-page' into #2877-KinseyBellerose-getSingu…
Peyton-McKee Dec 17, 2024
b2dce6f
#2877 Prettier Linting
Peyton-McKee Dec 17, 2024
83f78ea
Merge pull request #3067 from Northeastern-Electric-Racing/#3010-edit…
Aaryan1203 Dec 17, 2024
19e0719
#2725 merge conflicts
Aaryan1203 Dec 17, 2024
dc8d9b6
Merge pull request #3062 from Northeastern-Electric-Racing/#2877-Kins…
Peyton-McKee Dec 17, 2024
d78e892
#3008 created new contacts model for updated contacts
Aaryan1203 Dec 17, 2024
299689a
#2725 using the new hook in the guest page
superhvarn Dec 17, 2024
c4f5fff
#3008 styling
Aaryan1203 Dec 17, 2024
1a29318
#2725 weird prettier thing
superhvarn Dec 17, 2024
642ff2d
#3008 merge conflicts
Aaryan1203 Dec 17, 2024
96e638c
Merge branch 'feature/stats-page' into 3033-Get-Graph-Config
Peyton-McKee Dec 17, 2024
f460ee8
#3008 changed input for routes
Aaryan1203 Dec 17, 2024
29c9d96
#3008 github tests
Aaryan1203 Dec 17, 2024
165c444
#3033 Adjust Graph Creation
Peyton-McKee Dec 18, 2024
09e1b1f
#3033 Prettier Fix Form View
Peyton-McKee Dec 18, 2024
43c16e6
#2879: unit tests
kb578432 Dec 18, 2024
bb8cde5
#3008 combined migration files
Aaryan1203 Dec 18, 2024
edb554f
Merge pull request #3071 from Northeastern-Electric-Racing/#3008-ques…
Aaryan1203 Dec 18, 2024
d9db5a6
#3033 Allow Data to be filtered by time
Peyton-McKee Dec 18, 2024
9f105db
#2879: prettier
kb578432 Dec 18, 2024
8ad3ff3
#3033 Add Tests Hook Up Frontend
Peyton-McKee Dec 18, 2024
70dcfc3
Merge pull request #3061 from Northeastern-Electric-Racing/3033-Get-G…
Peyton-McKee Dec 18, 2024
78b1cfa
Merge branch 'feature/recruitment_and_onboarding' into 2725-recruitme…
superhvarn Dec 18, 2024
f65124f
#2725 typescript
superhvarn Dec 18, 2024
2ad4519
#2725 removing unecessary endpoint
superhvarn Dec 18, 2024
2344eb1
#2725 images are side by side
superhvarn Dec 18, 2024
1e3ef91
#3011 created checklist section for admin tools
Aaryan1203 Dec 19, 2024
210f137
#3011 fixed styling
Aaryan1203 Dec 19, 2024
d4090e0
#3011 linting and prettier
Aaryan1203 Dec 19, 2024
1c9d7f8
#3078 fixed onboarding navigation
Aaryan1203 Dec 19, 2024
b204b5f
Redeploy
Aaryan1203 Dec 19, 2024
e0890bf
#3078 linting
Aaryan1203 Dec 19, 2024
350375b
#2922 hook and api implmentation
dreifusjack Dec 19, 2024
2e38c0b
#2922 redesign of application table
dreifusjack Dec 19, 2024
3f75990
#2922 modal added form admin to update app link
dreifusjack Dec 19, 2024
0dac385
#2922 route typo
dreifusjack Dec 19, 2024
cc0c44a
#2922 column table design
dreifusjack Dec 19, 2024
2fcc412
#2922 moved edit icon
dreifusjack Dec 19, 2024
686edc5
#2922 invalid url handling
dreifusjack Dec 19, 2024
edd0529
#2811 progress bar
superhvarn Dec 20, 2024
8a01474
#2811 disabled button
superhvarn Dec 20, 2024
ac315ae
#2942 fixed toggle checklist logic
Aaryan1203 Dec 20, 2024
6efc2b1
#2942 added comment
Aaryan1203 Dec 20, 2024
a67a904
Raw Frontend (No Styling)
Peyton-McKee Dec 20, 2024
8592de1
Merge pull request #3077 from Northeastern-Electric-Racing/#3011-admi…
Peyton-McKee Dec 20, 2024
057fcfb
prettier
Peyton-McKee Dec 20, 2024
d338b4c
Update onboarding.services.ts
thaninbew Dec 20, 2024
7490219
not passing yet
thaninbew Dec 20, 2024
bbcdb53
#2922 removed onError
dreifusjack Dec 20, 2024
f36b1af
#2922 url style changes
dreifusjack Dec 20, 2024
12a32d3
#2942 finished toggle checklist endopint
Aaryan1203 Dec 20, 2024
87747df
#3078 allow onboarding members to see setting tab
Aaryan1203 Dec 20, 2024
ae0fea0
Merge pull request #3079 from Northeastern-Electric-Racing/#3078-onbo…
Aaryan1203 Dec 20, 2024
d0ed611
Merge pull request #3080 from Northeastern-Electric-Racing/#2922-upda…
Aaryan1203 Dec 20, 2024
4e44240
Merge branch 'feature/recruitment_and_onboarding' into #2942onboardin…
Aaryan1203 Dec 20, 2024
cefa85e
2811 styling
superhvarn Dec 20, 2024
0727f33
Merge branch 'feature/recruitment_and_onboarding' into #2811-setup-on…
superhvarn Dec 20, 2024
acbbb18
#2811 merge conflicts
superhvarn Dec 20, 2024
6825143
#2811 random commit
superhvarn Dec 20, 2024
8281964
#2814 made checkboxes functional
Aaryan1203 Dec 20, 2024
9b683ea
#2811 fixed progress bar styling
Aaryan1203 Dec 20, 2024
41ef6c8
#2811 styling
Aaryan1203 Dec 20, 2024
534a239
#2814 tsc
Aaryan1203 Dec 20, 2024
d148c78
#2811 fixed flakey test
Aaryan1203 Dec 20, 2024
50e22da
#2816 progress
superhvarn Dec 20, 2024
8477bb8
#2811 changing prop names
superhvarn Dec 20, 2024
a85ec32
#2816 modal done
superhvarn Dec 21, 2024
62efe19
#2816 modal handles user promotion
superhvarn Dec 21, 2024
9d14a64
services,transformer,controller,routes functions + tests
staysgt Dec 18, 2024
1ea5fa9
2883: Updated controller, routes, services, transformer to work with …
staysgt Dec 19, 2024
8f3777a
2883-finishing testing + seed data
staysgt Dec 20, 2024
316faa7
#2883 fixing tests
staysgt Dec 21, 2024
adab3eb
#2942 jdoc
Aaryan1203 Dec 21, 2024
75d7d7c
redeploy
Aaryan1203 Dec 21, 2024
2b409e6
#2814 fixed naming
Aaryan1203 Dec 21, 2024
37fc706
#2814 tsc
Aaryan1203 Dec 21, 2024
aee1e03
Merge branch 'feature/recruitment_and_onboarding' into 2725-recruitme…
superhvarn Dec 21, 2024
f0d1b0f
#2725 prettier
superhvarn Dec 21, 2024
62221dd
#2725 all tests pass???
superhvarn Dec 21, 2024
b064eb5
#2725 random commit
superhvarn Dec 21, 2024
bd515bc
#2725 linting
superhvarn Dec 21, 2024
bb46e51
Merge pull request #3085 from Northeastern-Electric-Racing/#2883-Crea…
Peyton-McKee Dec 21, 2024
af04987
Merge pull request #3026 from Northeastern-Electric-Racing/#2908-Fina…
Peyton-McKee Dec 21, 2024
fa8ebca
#3013 started create checklist modal
Aaryan1203 Dec 21, 2024
33cdb37
#2811 removed extra grids
Aaryan1203 Dec 21, 2024
3c4e573
Merge pull request #3084 from Northeastern-Electric-Racing/#2811-setu…
Aaryan1203 Dec 21, 2024
f778a64
#2942 updated service method
Aaryan1203 Dec 21, 2024
8734178
Merge pull request #3069 from Northeastern-Electric-Racing/#2942onboa…
Peyton-McKee Dec 22, 2024
ef9d16d
Merge pull request #3086 from Northeastern-Electric-Racing/stats-page…
Peyton-McKee Dec 22, 2024
11d55ef
Merge branch 'feature/recruitment_and_onboarding' into #2814-make-che…
Aaryan1203 Dec 22, 2024
276373c
#2814 unchecks all children checklists
Aaryan1203 Dec 22, 2024
f865f7d
#2814 tests
Aaryan1203 Dec 22, 2024
6e38ffb
#3013 merge conflicts
Aaryan1203 Dec 22, 2024
befd551
#3013 updated isOptional check
Aaryan1203 Dec 22, 2024
3ff4112
#2725 will linting pass?
superhvarn Dec 22, 2024
f2962ad
#2725 not using hooks conditionally
superhvarn Dec 22, 2024
b74cc89
#2725 error and loading indicator stuff
superhvarn Dec 22, 2024
890b5ba
#2693 modified event handler to remove users from optional users once…
Dec 22, 2024
aa20a64
Refactored handler into separate function
Dec 22, 2024
88817b4
#3013 creating task works
Aaryan1203 Dec 22, 2024
e218cde
#3013 fixed modal styling
Aaryan1203 Dec 22, 2024
ec641c7
#3013 Edit checklist now works
Aaryan1203 Dec 22, 2024
c51181a
#3013 prettier
Aaryan1203 Dec 22, 2024
705f0aa
#3097 hook done
superhvarn Dec 22, 2024
61a1f42
Triggering CI tests
superhvarn Dec 22, 2024
85f92ca
optimized method for filtering optional users
Dec 23, 2024
8d7402e
#3097 alphabetical checklist groups except for general
superhvarn Dec 23, 2024
fc2310b
#2815 some experimentation
superhvarn Dec 24, 2024
0d8ad13
Merge branch 'feature/recruitment_and_onboarding' into #2816-ConfirmO…
superhvarn Dec 24, 2024
776c9b5
Merge pull request #2860 from Northeastern-Electric-Racing/2725-recru…
Peyton-McKee Dec 24, 2024
5935531
Merge branch 'feature/stats-page' into #2879-Create-Edit-Graph-Endpoint
Peyton-McKee Dec 24, 2024
503a974
#2879 Merge Conflicts
Peyton-McKee Dec 24, 2024
9aeb019
#2879 Typo
Peyton-McKee Dec 24, 2024
cf976d2
Merge pull request #3073 from Northeastern-Electric-Racing/#2879-Crea…
Peyton-McKee Dec 24, 2024
5255209
Merge pull request #3088 from Northeastern-Electric-Racing/#2814-make…
walker-sean Dec 24, 2024
61ecfee
Merge pull request #3096 from Northeastern-Electric-Racing/#2693-requ…
walker-sean Dec 24, 2024
6220d82
#2816 user promotion
superhvarn Dec 25, 2024
4b44e67
Merge branch 'feature/recruitment_and_onboarding' into #3097-delete-c…
superhvarn Dec 25, 2024
e3d0a53
#3097 merge conflicts
superhvarn Dec 25, 2024
ff47601
#3097 delete team type checklists
superhvarn Dec 26, 2024
6547401
#2774: Completed line graph component and added sample line graph to …
gcooper407 Dec 27, 2024
752f57c
Add Necessary Backend Endpoints for Funtioning Creation and Retrieval
Peyton-McKee Dec 27, 2024
2a148aa
#2774: Completed line graph component and added sample line graph to …
gcooper407 Dec 27, 2024
760ea49
Cleanup UI
Peyton-McKee Dec 27, 2024
97d1eb0
prettier
Peyton-McKee Dec 27, 2024
44686f7
Fix Frontend Test
Peyton-McKee Dec 27, 2024
f6b6deb
#2815 checklists are now reactive
superhvarn Dec 30, 2024
ae31997
#2815 merge conflicts
superhvarn Dec 30, 2024
fb5fb67
#2815 merge conflicts
superhvarn Dec 30, 2024
c0e4225
#2815 merge conflicts
superhvarn Dec 30, 2024
17b9e8f
#2815 prettier
superhvarn Dec 30, 2024
a1cb48c
#2815 linting
superhvarn Dec 30, 2024
d401008
Merge branch '#2815-Make-Progress-bar-reactive' of https://github.com…
superhvarn Dec 30, 2024
09110e6
#2815 typescript
superhvarn Dec 30, 2024
ac8253d
#3013 merge conflicts
superhvarn Jan 1, 2025
237450d
#3013 merge conflcits
superhvarn Jan 1, 2025
36a15e4
Merge pull request #3102 from Northeastern-Electric-Racing/Stats-Clea…
Peyton-McKee Jan 2, 2025
0c98536
#3097 cleaned up modal
Aaryan1203 Jan 2, 2025
25fe8b6
Merge pull request #3098 from Northeastern-Electric-Racing/#3097-dele…
Aaryan1203 Jan 2, 2025
fe42de7
Merge branch 'feature/recruitment_and_onboarding' into #2815-Make-Pro…
Aaryan1203 Jan 2, 2025
2cb1455
#2815 refactored progress bar code
Aaryan1203 Jan 2, 2025
d610951
#2815 prettier and liting
Aaryan1203 Jan 2, 2025
ce53fe3
#3013 merge
superhvarn Jan 2, 2025
ecc8c8c
#2816 optimizing hook
superhvarn Jan 2, 2025
a35b65b
#2815 fixed isOptional handeling
Aaryan1203 Jan 3, 2025
c0d3dc3
#3013 edit and create checklists and subtasks now work
Aaryan1203 Jan 3, 2025
c6a8e6a
#3013 removed ()
Aaryan1203 Jan 3, 2025
63ef38d
Merge pull request #3090 from Northeastern-Electric-Racing/#2816-Conf…
Peyton-McKee Jan 3, 2025
6a4e37b
Merge branch 'develop' into feature/stats-page
Peyton-McKee Jan 3, 2025
efccc3f
Merge branch 'feature/recruitment_and_onboarding' into #2815-Make-Pro…
superhvarn Jan 3, 2025
5ae1e43
#2815 linting and prettier
superhvarn Jan 3, 2025
a747f56
#3104 all checklists appear in admin tools
superhvarn Jan 4, 2025
5d3224e
#3104 getting rid of a random console log
superhvarn Jan 4, 2025
5a398c0
Merge branch 'feature/stats-page' into 2774-stats-page-line-graph-com…
gcooper407 Jan 5, 2025
961543a
#2774: Updated line graph component according to Peyton's modificatio…
gcooper407 Jan 5, 2025
3e34a31
Merge branch '2774-stats-page-line-graph-component-3' into 2774-stats…
gcooper407 Jan 5, 2025
c4fdaa1
#3104 team checklists
superhvarn Jan 5, 2025
05d1663
#3013 cleaned up code
Aaryan1203 Jan 6, 2025
394d9b7
#3110 created select subteam homepage
Aaryan1203 Jan 6, 2025
cbb2559
#2774: Reverted changes to the statistics page
gcooper407 Jan 6, 2025
af67283
Dont require title, add units
Peyton-McKee Jan 6, 2025
045ea9e
Merge pull request #3101 from Northeastern-Electric-Racing/2774-stats…
Peyton-McKee Jan 6, 2025
1a3e5eb
prettier
Peyton-McKee Jan 6, 2025
cbf9cef
Merge pull request #3105 from Northeastern-Electric-Racing/feature/st…
Peyton-McKee Jan 6, 2025
e42ca34
Accepted page works
Aaryan1203 Jan 7, 2025
3ada368
#3110 prettier and linting
Aaryan1203 Jan 7, 2025
b31f9aa
Homepage Redesign
Peyton-McKee Jan 7, 2025
d0fc7a9
Merge branch 'develop' into feature/homepage-old-history
Peyton-McKee Jan 7, 2025
44fc84c
Merge Conflicts
Peyton-McKee Jan 7, 2025
b77ed2b
Fix TSC Check
Peyton-McKee Jan 7, 2025
3feeb64
Fix Wrong Imports
Peyton-McKee Jan 7, 2025
a7b1ef6
prettier
Peyton-McKee Jan 7, 2025
294a450
#3114 application link table back
superhvarn Jan 7, 2025
b79c4fb
Your commit message
superhvarn Jan 7, 2025
7f610b5
#3110 user gets added to team when accepting to join
Aaryan1203 Jan 8, 2025
cfbbd01
Merge pull request #3115 from Northeastern-Electric-Racing/#3114-rest…
Aaryan1203 Jan 9, 2025
8a2fd33
consolidate migrations
Peyton-McKee Jan 9, 2025
add39e6
Enforce User Organization Membership on API request
Peyton-McKee Jan 9, 2025
96c026f
Check if organization is deleted in middleware
Peyton-McKee Jan 9, 2025
e1150b1
#3110 onboarding flow works, still need to refactor
Aaryan1203 Jan 9, 2025
fa1e94a
#3110 used onboardingTeamType instead of completedOnboarding
Aaryan1203 Jan 9, 2025
010a925
#3110 removed completedOnboarding boolean
Aaryan1203 Jan 9, 2025
ab9af63
fixed endpoint checks on homepage
caiodasilva2005 Jan 9, 2025
95edbc6
small fix
caiodasilva2005 Jan 9, 2025
80b4d55
#3110 fixed flow for onbaording
Aaryan1203 Jan 9, 2025
cb75fc4
#3110 tests and prettier
Aaryan1203 Jan 9, 2025
8244752
#3110 linting
Aaryan1203 Jan 9, 2025
b358dd2
#3117 prettier
Aaryan1203 Jan 9, 2025
1febe1f
Merge pull request #3092 from Northeastern-Electric-Racing/#3013-crea…
Aaryan1203 Jan 9, 2025
a39ca39
#3104 reverting
superhvarn Jan 9, 2025
5ab8ade
#3110 merge conflicts
Aaryan1203 Jan 9, 2025
37213a2
#3117 fixed descriptions
superhvarn Jan 10, 2025
a40fb96
Your commit message here
superhvarn Jan 10, 2025
a05c93f
Merge pull request #3118 from Northeastern-Electric-Racing/#3117-fix-…
Aaryan1203 Jan 10, 2025
bc9feac
#3110 removed getTeamByTeamType endpoint:
Aaryan1203 Jan 10, 2025
a46fbfe
Merge pull request #3116 from Northeastern-Electric-Racing/homepage-u…
Peyton-McKee Jan 10, 2025
6a83bbf
Merge pull request #3109 from Northeastern-Electric-Racing/#3104-Add-…
Peyton-McKee Jan 10, 2025
3ebd054
Merge pull request #3113 from Northeastern-Electric-Racing/feature/ho…
Peyton-McKee Jan 10, 2025
0a76297
#2815 merge conflicts
superhvarn Jan 10, 2025
539729b
#2815 typescript
superhvarn Jan 10, 2025
c3a682a
#2815 renamed usersTeamTypeChecklists to usersChecklists
Aaryan1203 Jan 11, 2025
91e35bf
#2248 control/route/service + initial tests
cielbellerose Jan 13, 2025
e9ce6c5
#2248 tests fixed
cielbellerose Jan 13, 2025
145421f
#2248 linting + fixed test
cielbellerose Jan 13, 2025
63c0ef9
#2248 duplicate user fixed
cielbellerose Jan 13, 2025
5fe3c18
#2248 tests actually fixed this time
cielbellerose Jan 13, 2025
85acc57
Merge pull request #3103 from Northeastern-Electric-Racing/#2815-Make…
Peyton-McKee Jan 13, 2025
d57e328
#2248 added current organization check
cielbellerose Jan 13, 2025
0644a1b
Merge pull request #3120 from Northeastern-Electric-Racing/2248-delet…
Peyton-McKee Jan 14, 2025
2758b34
Merge remote-tracking branch 'origin/feature/recruitment_and_onboardi…
Peyton-McKee Jan 15, 2025
94f5854
Merge Conflicts
Peyton-McKee Jan 15, 2025
49d7794
#3110 Small Changes
Peyton-McKee Jan 15, 2025
4c9dcf5
Merge pull request #3111 from Northeastern-Electric-Racing/#3110-sele…
Peyton-McKee Jan 15, 2025
2fc8844
Merge branch 'develop' into feature/recruitment_and_onboarding
Peyton-McKee Jan 16, 2025
f129063
Merge Conflicts and dependency Updates
Peyton-McKee Jan 16, 2025
a7d4b3e
Update MIgration Files
Peyton-McKee Jan 16, 2025
9f19606
#3121 created new pr for bug fixes
Aaryan1203 Jan 17, 2025
0b233af
#3121 redeply
Aaryan1203 Jan 17, 2025
696fb87
#3121 Fix Tests
Peyton-McKee Jan 17, 2025
bde1892
#3121 Fix Frontend Tests and Date Adapter
Peyton-McKee Jan 17, 2025
268df1f
#3121 Linting Prettier TC Check
Peyton-McKee Jan 17, 2025
04b0560
#3121 redirect to pnm home page
Aaryan1203 Jan 18, 2025
e790ea5
Merge pull request #3123 from Northeastern-Electric-Racing/#3121-recr…
Aaryan1203 Jan 19, 2025
34203c7
Fixed announcement test
Aaryan1203 Jan 19, 2025
05b8636
Fixed team up image download
Aaryan1203 Jan 19, 2025
7c6ace2
Prettier
Aaryan1203 Jan 19, 2025
aa85e3b
Redeploy
Aaryan1203 Jan 19, 2025
9fe2433
redeploy
Aaryan1203 Jan 19, 2025
1d369f1
Fixed upload file checks
Aaryan1203 Jan 20, 2025
ae4516c
redeploy
Aaryan1203 Jan 20, 2025
edb17a3
skipped flakey test:
Aaryan1203 Jan 20, 2025
debf30a
Merge pull request #3126 from Northeastern-Electric-Racing/teamtype-b…
Peyton-McKee Jan 21, 2025
c4c7e8c
Merge pull request #3119 from Northeastern-Electric-Racing/feature/re…
Peyton-McKee Jan 21, 2025
05dd542
Remove static images
Peyton-McKee Jan 21, 2025
6b7fbe7
Skip Broken Test
Peyton-McKee Jan 21, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/backend/src/controllers/statistics.controllers.ts
Original file line number Diff line number Diff line change
@@ -20,9 +20,9 @@ export default class StatisticsController {
graphCollectionId
);

return res.status(200).json(graph);
res.status(200).json(graph);
} catch (error: unknown) {
return next(error);
next(error);
}
}
}
3 changes: 2 additions & 1 deletion src/backend/tests/test-utils.ts
Original file line number Diff line number Diff line change
@@ -484,7 +484,8 @@ export const createTestTeamType = async (organizationId?: string) => {
data: {
name: 'aTeam',
iconName: 'gear',
organizationId: orgId!
organizationId: orgId!,
description: 'aDescription'
}
});
};
86 changes: 86 additions & 0 deletions src/frontend/src/components/StatsPieChart.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { Pie } from 'react-chartjs-2';
import { Chart, ArcElement, Title, Tooltip, Legend } from 'chart.js';
import { Box } from '@mui/material';

Chart.register(ArcElement, Title, Tooltip, Legend);

interface StatsPieChartProps {
xAxisData: string[];
yAxisData: number[];
timeFrame?: string;
width?: number;
height?: number;
graphTitle: string;
}

const StatsPieChart: React.FC<StatsPieChartProps> = ({ xAxisData, yAxisData, width = 600, height = 400, graphTitle }) => {
const data = {
labels: xAxisData,
datasets: [
{
data: yAxisData,
backgroundColor: [
'#DE514C',
'#5471D1',
'#FFCE56',
'#54D162',
'#4BC0C0',
'#FF9F40',
'#FF6384',
'#9966FF',
'#8c0f0f',
'#A97D4E',
'#2A751B',
'#B0387C'
],
hoverBackgroundColor: [
'#EB6C67',
'#667FD1',
'#FAD784',
'#79D483',
'#53D7DB',
'#F7A859',
'#FA7C9A',
'#A881F7',
'#9A3C3C',
'#C6A37A',
'#3A8F2E',
'#C657A3'
]
}
]
};

const options = {
responsive: true,
maintainAspectRatio: true,
plugins: {
title: {
display: true,
text: graphTitle,
font: {
size: 18
},
color: 'white'
},
legend: {
display: true,
position: 'right' as const,
labels: {
font: {
size: 14
},
color: 'white'
}
}
}
};

return (
<Box style={{ width: '100%', height: '100%', maxWidth: width, maxHeight: height }}>
<Pie data={data} options={options} />
</Box>
);
};

export default StatsPieChart;
24 changes: 22 additions & 2 deletions src/frontend/src/pages/StatisticsPage/StatisticsPage.tsx
Original file line number Diff line number Diff line change
@@ -5,17 +5,37 @@

import PageLayout from '../../components/PageLayout';
import BarChart from '../../components/StatsBarChart';
import PieChart from '../../components/StatsPieChart';

const StatisticsPage: React.FC = () => {
// Testing bar chart component
// Testing bar and pie chart components
return (
<PageLayout title="Statistics">
<BarChart
xAxisData={['test1', 'test2', 'test3', 'test4']}
yAxisData={[100, 200, 50, 300]}
xAxisLabel="Categories"
yAxisLabel="Values"
graphTitle="Statistics Overview"
graphTitle="Bar Chart Test"
/>

<PieChart
xAxisData={[
'test1',
'test2',
'test3',
'test4',
'test5',
'test6',
'test7',
'test8',
'test9',
'test10',
'test11',
'test12'
]}
yAxisData={[10, 20, 5, 35, 15, 25, 10, 20, 5, 10, 12, 20]}
graphTitle="Pie Chart Test"
/>
</PageLayout>
);