Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
486 commits
Select commit Hold shift + click to select a range
c83b83a
Merge branch 'feature/rules-dashboard' into #3748-team-rules-no-project
cielbellerose Nov 21, 2025
2165267
#3748 test updates + small fix
cielbellerose Nov 21, 2025
74984ed
#3748 test org googleauth fix
cielbellerose Nov 21, 2025
67ea535
#3759 fixes from review
staysgt Nov 23, 2025
789f389
undo first faulty develop merge revert
chpy04 Nov 23, 2025
578ea2c
Revert "Revert "Merge branch 'develop' into feature/rules-dashboard""
chpy04 Nov 23, 2025
23646bc
#3759 added comment
staysgt Nov 23, 2025
5cb25eb
#3755 enforce rule type
patriots1 Nov 23, 2025
a546ff9
#3755 comprehensive update
patriots1 Nov 23, 2025
dde62df
Merge branch 'feature/rules-dashboard' into #3755-Get-Rule-Sub-Rules
patriots1 Nov 23, 2025
9725de4
rules changes for new user schema
chpy04 Nov 23, 2025
140562a
Merge branch 'develop' into feature/rules-dashboard
chpy04 Nov 24, 2025
10309e1
Merge branch 'feature/rules-dashboard' into #3755-Get-Rule-Sub-Rules
patriots1 Nov 24, 2025
fa9e246
add get project rules endpoint
lilyshiomitsu Nov 24, 2025
f451d5e
#3755 fix test errors
patriots1 Nov 24, 2025
c50ad54
Merge branch 'feature/rules-dashboard' into #3747-get-rules-with-no-tea
cielbellerose Nov 24, 2025
07f1c4f
#3747 linting/prettier fixes from merge
cielbellerose Nov 24, 2025
67324cb
Merge pull request #3770 from Northeastern-Electric-Racing/#3747-get-…
cielbellerose Nov 24, 2025
bbacd97
#3733: add tests
lilyshiomitsu Nov 24, 2025
1ba03e9
#3733: add comment
lilyshiomitsu Nov 24, 2025
5763792
#3584 addressed comments
Zwendle Nov 24, 2025
5ca60f0
#3584 prettier fix
Zwendle Nov 24, 2025
34c250f
#3710 Merge from feature/rules-dashboard
chrisdicono Nov 24, 2025
36b63e5
#3710 pr changes
chrisdicono Nov 24, 2025
7f1d0c1
added checks for org and archiving
chrisdicono Nov 25, 2025
1639b16
testing for additional checks
chrisdicono Nov 25, 2025
2ca774d
#3680 car type specified
nunnyu Nov 25, 2025
0536eee
#3710 fixing tests
chrisdicono Nov 25, 2025
d319f38
#3680 Finished file adding system, and changed styling to match the mock
nunnyu Nov 25, 2025
47088f9
#3680 Updated test
nunnyu Nov 25, 2025
2a378a2
#3680 fixed linting errors
nunnyu Nov 25, 2025
34391a1
#3710 changed comment
chrisdicono Nov 25, 2025
7099272
Merge pull request #3637 from Northeastern-Electric-Racing/#3574-edit…
chpy04 Nov 25, 2025
333d5ac
#3645: update style
hayliepedersen Nov 25, 2025
1f31057
#3755 refactoring
patriots1 Nov 25, 2025
57e1d1d
Merge branch 'feature/rules-dashboard' into #3755-Get-Rule-Sub-Rules
patriots1 Nov 25, 2025
232e2b2
Merge branch 'feature/rules-dashboard' into #3748-team-rules-no-project
cielbellerose Nov 25, 2025
640fd4d
Merge pull request #3766 from Northeastern-Electric-Racing/#3748-team…
cielbellerose Nov 25, 2025
c9bfa4c
Merge branch 'feature/rules-dashboard' into #3759-update-ruleset-status
staysgt Nov 25, 2025
eff90ff
#3759 fixes from review
staysgt Nov 25, 2025
eeb7ae0
#3584 brought back error throw for no active ruleset
Zwendle Nov 26, 2025
bbbf18c
Merge branch 'feature/rules-dashboard' into 3584-fetch-active-ruleset
Zwendle Nov 26, 2025
fcb2c72
#3584 post-merge test fix
Zwendle Nov 26, 2025
583675b
GetTopLevelRules backend
EdgarButtner Nov 26, 2025
1b88afb
#3757 GetTopLevelRules
EdgarButtner Nov 26, 2025
b9ee188
Merge pull request #3758 from Northeastern-Electric-Racing/3584-fetch…
cielbellerose Nov 26, 2025
a2f3b88
Merge branch 'feature/rules-dashboard' into #3746-get-team-rules-for-…
cielbellerose Nov 26, 2025
8c10711
#3746 merge fix
cielbellerose Nov 26, 2025
86bffcc
Merge branch 'feature/rules-dashboard' into #3757-EdgarButtner-getTop…
cielbellerose Nov 27, 2025
26fc9b6
#3757 added org + checks
cielbellerose Nov 27, 2025
66c50c2
#3757 route fix
cielbellerose Nov 27, 2025
7e2a651
Merge branch 'feature/rules-dashboard' into #3733-get-project-rules
cielbellerose Nov 27, 2025
f5092c1
#3757 org check
cielbellerose Nov 27, 2025
e2e541f
Merge pull request #3786 from Northeastern-Electric-Racing/#3733-get-…
cielbellerose Nov 27, 2025
c15c9cd
Merge branch 'feature/rules-dashboard' into #3757-EdgarButtner-getTop…
cielbellerose Nov 27, 2025
6944ed5
Merge branch 'feature/rules-dashboard' into #3746-get-team-rules-for-…
cielbellerose Nov 27, 2025
cc2278d
#3746 active ruleset fix
cielbellerose Nov 27, 2025
16d86ac
#3746 readded project rule stuff
cielbellerose Nov 27, 2025
b7ba9f9
#3746 test fix
cielbellerose Nov 27, 2025
3864ba5
#3710 toggle
cielbellerose Nov 27, 2025
12ba673
#3710 user test fix
cielbellerose Nov 27, 2025
64a4eb2
#3710 LINTING
cielbellerose Nov 27, 2025
0fc35bc
Merge pull request #3789 from Northeastern-Electric-Racing/#3757-Edga…
chpy04 Nov 27, 2025
a3ca63f
#3759 fix status parameter
staysgt Nov 27, 2025
174bde4
Merge pull request #3779 from Northeastern-Electric-Racing/#3759-upda…
chpy04 Nov 27, 2025
a43027a
Merge pull request #3772 from Northeastern-Electric-Racing/#3650-edit…
Aryan0102 Nov 28, 2025
a19a77c
Merge branch 'feature/rules-dashboard' into #3746-get-team-rules-for-…
Aryan0102 Nov 28, 2025
625d9db
check for date archived
Aryan0102 Nov 28, 2025
dc577c0
#3648-initial-push
Aryan0102 Nov 29, 2025
5d64656
fixed lint
Aryan0102 Nov 29, 2025
f335fc6
#3645: change requests
hayliepedersen Nov 30, 2025
b047f8d
#3645: mobile
hayliepedersen Nov 30, 2025
1b0f3e3
#3645: adjustments
hayliepedersen Nov 30, 2025
89f7631
3647- ruleset page and ruleset table made
molowu06 Dec 1, 2025
2ce1976
#3710 changed names to reflect functionality
chrisdicono Dec 2, 2025
599cb6c
#3710 error message changes
chrisdicono Dec 2, 2025
72c583f
#3710 test suite name change
chrisdicono Dec 2, 2025
3d7fead
Merge pull request #3791 from Northeastern-Electric-Racing/#3648-sing…
chpy04 Dec 3, 2025
89df786
Merge pull request #3777 from Northeastern-Electric-Racing/#3710-chri…
chpy04 Dec 3, 2025
5aaf21e
Merge branch 'feature/rules-dashboard' into #3755-Get-Rule-Sub-Rules
cielbellerose Dec 3, 2025
bafe299
Merge branch 'feature/rules-dashboard' into #3755-Get-Rule-Sub-Rules
cielbellerose Dec 3, 2025
38c2a08
#3755 merge conflict in github fix
cielbellerose Dec 3, 2025
9edeb0f
#3622 basic endpoint setup
cielbellerose Dec 3, 2025
e115e14
Merge pull request #3785 from Northeastern-Electric-Racing/#3755-Get-…
chpy04 Dec 3, 2025
c2975cf
#3680 completed requested changes + added yup schema
nunnyu Dec 3, 2025
c7c31ea
#3622 parse util functions progress
cielbellerose Dec 3, 2025
090d79a
#3680 fixed linter error
nunnyu Dec 3, 2025
2bfda39
#3680 fixed more linter errors
nunnyu Dec 4, 2025
f971f50
#3680 Re-added console.log with the data
nunnyu Dec 4, 2025
0455dc0
Merge pull request #3787 from Northeastern-Electric-Racing/#3680-AddN…
chpy04 Dec 5, 2025
67cc592
Merge pull request #3769 from Northeastern-Electric-Racing/#3746-get-…
chpy04 Dec 5, 2025
07eb8f1
#3622 simplified util functions
cielbellerose Dec 6, 2025
ce707ed
#3622 service update + added pdf parser dependency
cielbellerose Dec 6, 2025
aff6c9b
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Dec 6, 2025
0b07c8e
#3622 remove parser script version
cielbellerose Dec 6, 2025
6c6e283
#3622 frontend connections
cielbellerose Dec 6, 2025
bd72765
#3724 team view rules page
staysgt Dec 8, 2025
69e97de
#3645: date pipe
hayliepedersen Dec 9, 2025
410dd59
#3795-Adding Rules Tab to Project page.
EdgarButtner Dec 9, 2025
241a30c
#3795-AddingRulesTabToProjectPage
EdgarButtner Dec 10, 2025
bb2039d
Merge branch 'feature/rules-dashboard' into #3645-ruleset-types-table
hayliepedersen Dec 10, 2025
bf317e1
#3645: ruleset page
hayliepedersen Dec 10, 2025
0bac2c5
#3645 merge
hayliepedersen Dec 10, 2025
1f765ec
#3645: temporary move for add file button
hayliepedersen Dec 10, 2025
190a3d3
#3622 fix page flow for file upload location
cielbellerose Dec 10, 2025
99affea
#3724 fixes from review
staysgt Dec 11, 2025
5d79a30
3825-initial-commit
Aryan0102 Dec 11, 2025
ff9c391
fix linting
Aryan0102 Dec 11, 2025
92c3f9e
prettier check
Aryan0102 Dec 11, 2025
16bb962
Merge pull request #3822 from Northeastern-Electric-Racing/#3795-AddR…
chpy04 Dec 12, 2025
460a2e3
Merge pull request #3815 from Northeastern-Electric-Racing/#3724-team…
chpy04 Dec 13, 2025
b4f17f0
Merge branch 'feature/rules-dashboard' into #3645-ruleset-types-table
cielbellerose Dec 14, 2025
67c1f5d
Merge pull request #3788 from Northeastern-Electric-Racing/#3645-rule…
cielbellerose Dec 14, 2025
c468f07
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Dec 14, 2025
cc2155a
#3622 file modal updates
cielbellerose Dec 15, 2025
b578f54
#3622 connect car to file upload modal
cielbellerose Dec 15, 2025
373588b
Merge branch 'feature/rules-dashboard' into 3647-rulesdashboard---rul…
cielbellerose Dec 15, 2025
592c6f2
#3647 table matches ruleset type, fixed pages
cielbellerose Dec 15, 2025
6976dce
#3647 prettier/linting
cielbellerose Dec 15, 2025
cb04807
Apply suggestions from code review
Aryan0102 Dec 18, 2025
3360785
#3647 slight sx adjustments
Zwendle Dec 20, 2025
f7b2a6f
Linting
Zwendle Dec 20, 2025
644443c
#3723 created add rule box and dummy modals for Add Rule/Add Rule Sec…
Zwendle Dec 21, 2025
bea4397
#3723 hoping to make tests run
Zwendle Dec 21, 2025
25a8982
#3723 will tests run now?
Zwendle Dec 21, 2025
cb540a7
Merge pull request #3792 from Northeastern-Electric-Racing/3647-rules…
chpy04 Dec 21, 2025
aa8f142
Merge branch 'feature/rules-dashboard' into #3825-assign-team-rules
Zwendle Dec 22, 2025
b050462
#3825 restored AssignRulesTab component to its proper place
Zwendle Dec 22, 2025
75e138f
#3825 linting fix
Zwendle Dec 22, 2025
612f3f2
Merge remote-tracking branch 'origin/feature/rules-dashboard' into 36…
cielbellerose Dec 24, 2025
9c85601
#3622 seed updates, route fixes, and temp console logs for file upload
cielbellerose Dec 24, 2025
c1a7dd8
#3622 upload file backend
cielbellerose Dec 24, 2025
01d4192
#3549 ruleset type modal
cielbellerose Dec 24, 2025
9d67a3c
#3549 typescript fix
cielbellerose Dec 24, 2025
fc138c1
#3723 moved button text to end and removed padding
Zwendle Dec 25, 2025
7857f30
#3843 table separate component + api/hook
cielbellerose Dec 25, 2025
e65ca39
#3843 temp button fix
cielbellerose Dec 25, 2025
de013f3
Merge pull request #3842 from Northeastern-Electric-Racing/#3549-rule…
Zwendle Dec 25, 2025
d6d82a2
Merge remote-tracking branch 'origin/feature/rules-dashboard' into 36…
cielbellerose Dec 25, 2025
d818fac
Merge remote-tracking branch 'origin/feature/rules-dashboard' into #3…
cielbellerose Dec 26, 2025
e312384
#3843 separate ruleset table & match formatting + service fix
cielbellerose Dec 26, 2025
720746a
#3843 linting fix
cielbellerose Dec 26, 2025
8320f23
Merge remote-tracking branch 'origin/feature/rules-dashboard' into #3…
cielbellerose Dec 26, 2025
24580c5
finsihed project rules page
Aryan0102 Dec 28, 2025
cd9fb57
fixed brought up issues
Aryan0102 Dec 28, 2025
5fb2a7a
hihglights rule section when all leaf rules are selected
Aryan0102 Dec 28, 2025
26392f6
Merge branch 'feature/rules-dashboard' into #3825-assign-team-rules
Aryan0102 Dec 28, 2025
fc24bbf
fixed prettier
Aryan0102 Dec 28, 2025
d3d4d42
Merge pull request #3846 from Northeastern-Electric-Racing/#3843-rule…
chpy04 Dec 30, 2025
4761903
Merge branch 'feature/rules-dashboard' into #3825-assign-team-rules
Zwendle Dec 30, 2025
5a64991
#3825 post-merge conflict linting fix
Zwendle Dec 30, 2025
6d4e383
#3825 prettier fix (and hopefully the random test won't fail)
Zwendle Dec 30, 2025
276cad2
Merge pull request #3826 from Northeastern-Electric-Racing/#3825-assi…
Zwendle Dec 30, 2025
f35c01f
Merge branch 'feature/rules-dashboard' into #3723-make-add-rule-or-ch…
Zwendle Dec 31, 2025
005f765
#3844 ruleset table has data
cielbellerose Jan 2, 2026
4b62a38
#3844 buttons functional
cielbellerose Jan 2, 2026
72503cb
#3844 linting/prettier and car id fix + ruleset display fix
cielbellerose Jan 2, 2026
3da7f30
#3844 lint
cielbellerose Jan 2, 2026
355a09f
#3622 ruleset pr fixes
cielbellerose Jan 2, 2026
935ea9b
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Jan 2, 2026
1defcd9
#3622 added ruleset pr items for ruleset table
cielbellerose Jan 2, 2026
f512d12
#3622 parser adds uploaded ruleset & RULES! view rules on edit page!
cielbellerose Jan 2, 2026
592a425
#3622 fix fsae header/footer & cleaning
cielbellerose Jan 3, 2026
af69f4e
#3844 url + query fixes
cielbellerose Jan 3, 2026
a8422de
#3844 active checkbox works
cielbellerose Jan 3, 2026
becdcfa
#3844 ruleset ordering test fix
cielbellerose Jan 3, 2026
f7b065d
#3844 delete for ruleset type & ruleset
cielbellerose Jan 4, 2026
959de69
#3853 team view with mock data
cielbellerose Jan 4, 2026
1ee998b
Merge branch 'feature/rules-dashboard' into 3827-project-rules-page
Zwendle Jan 4, 2026
2195bf9
#3827 test fixes
Zwendle Jan 4, 2026
dcf82f8
#3778 initial commit for history modal
Zwendle Jan 4, 2026
f81b409
#3854 general view
cielbellerose Jan 4, 2026
b6b548e
finished
Aryan0102 Jan 4, 2026
e98cec5
#3844 added cannot delete active ruleset logic
cielbellerose Jan 4, 2026
3f8dd87
Merge pull request #3855 from Northeastern-Electric-Racing/#3853-rule…
cielbellerose Jan 4, 2026
d915140
Merge branch 'feature/rules-dashboard' into #3854-rules-general-view
cielbellerose Jan 4, 2026
d130247
fixed prettier
Aryan0102 Jan 4, 2026
2bfcf56
Merge pull request #3852 from Northeastern-Electric-Racing/#3844-rule…
cielbellerose Jan 4, 2026
8a2b599
Merge branch 'feature/rules-dashboard' into #3651-Rule-Deletion-Modal-2
Aryan0102 Jan 4, 2026
853b148
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Jan 4, 2026
fcdcd9f
#3778 slight modal adjustments and added scrollbar
Zwendle Jan 4, 2026
3119d5c
#3622 edit/view are disabled when parsing is happening
cielbellerose Jan 4, 2026
a3f7483
#3622 orphan fixes
cielbellerose Jan 4, 2026
7356a7c
#3778 separated RuleHistoryModal from ProjectRulesTab
Zwendle Jan 4, 2026
683f0ca
#3778 linting fix
Zwendle Jan 4, 2026
d47f86a
Merge branch 'feature/rules-dashboard' into 3827-project-rules-page
Zwendle Jan 4, 2026
f46ccc1
#3827 test fixes
Zwendle Jan 4, 2026
6fe6269
Merge branch '3827-project-rules-page' into #3778-history-modal
Zwendle Jan 4, 2026
67b9e59
#3778 linting fix
Zwendle Jan 4, 2026
9686131
#3854 lint
cielbellerose Jan 4, 2026
9ec2dd3
Merge pull request #3857 from Northeastern-Electric-Racing/#3854-rule…
Zwendle Jan 4, 2026
9c3f328
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Jan 4, 2026
d257080
#3658 initial commit for add rule modal
Zwendle Jan 5, 2026
9a11057
Merge pull request #3858 from Northeastern-Electric-Racing/#3651-Rule…
Zwendle Jan 5, 2026
dc20ca9
Merge branch 'feature/rules-dashboard' into #3658-EditRulesetPage-add…
Zwendle Jan 5, 2026
ce4bf05
fixed the add rule modal
Aryan0102 Jan 6, 2026
d3f5ba0
#3658 fixed add rule functionality
Zwendle Jan 7, 2026
a223431
#3622 error handling fix + cleaning
cielbellerose Jan 10, 2026
c87b81f
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Jan 10, 2026
7fc9377
#3658 removing referenced rule functionality for sake of scope :(
Zwendle Jan 12, 2026
beb996c
#3658 linting fix (temporarily removing delete rule related imports i…
Zwendle Jan 12, 2026
f02c778
#3658 removing unnecessary console.log
Zwendle Jan 12, 2026
bc0abbd
#3658 prettier fix
Zwendle Jan 12, 2026
89759da
#3622 linting
cielbellerose Jan 12, 2026
e2a0ba0
#3622 lint
cielbellerose Jan 12, 2026
194907e
#3827 changed modal font styling to match figma better
Zwendle Jan 14, 2026
cb43fab
Merge pull request #3848 from Northeastern-Electric-Racing/3827-proje…
Zwendle Jan 14, 2026
af710bc
Merge branch 'feature/rules-dashboard' into #3778-history-modal
Zwendle Jan 14, 2026
36f2b84
#3868 partial breadcrumb functionality
Zwendle Jan 14, 2026
826fb03
#3869 removed console.log
Zwendle Jan 14, 2026
57a6e8e
#3869 lint fix
Zwendle Jan 14, 2026
d010583
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
cielbellerose Jan 15, 2026
0373f00
initial implmentation
Aryan0102 Jan 15, 2026
99667d4
Merge pull request #3856 from Northeastern-Electric-Racing/#3778-hist…
Zwendle Jan 19, 2026
d6a1ead
working?
Aryan0102 Jan 19, 2026
a347932
prettier
Aryan0102 Jan 19, 2026
4ddcd6e
Merge pull request #3877 from Northeastern-Electric-Racing/view-rulesets
Zwendle Jan 19, 2026
f31c415
Merge branch 'feature/rules-dashboard' into #3725-edit-rules-2
Zwendle Jan 19, 2026
dced682
fixed co-pilot recs
Aryan0102 Jan 19, 2026
9acd415
#3725 fixed visual bugs
Zwendle Jan 19, 2026
2d127a9
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
Aryan0102 Jan 19, 2026
4013943
#3725 fixed comment
Zwendle Jan 19, 2026
dc3ece8
Merge branch 'feature/rules-dashboard' into #3658-EditRulesetPage-add…
Zwendle Jan 20, 2026
ac6b6f0
#3658 uncommented delete modal
Zwendle Jan 20, 2026
050cd76
#3658 test fix
Zwendle Jan 20, 2026
82e647e
#3658 cleaned up AddRuleModal
Zwendle Jan 20, 2026
e812220
#3622 fixed RulesetEditPage
Zwendle Jan 20, 2026
3ae3fc0
#3622 lint fix
Zwendle Jan 20, 2026
1b7275c
Merge pull request #3859 from Northeastern-Electric-Racing/#3658-Edit…
Aryan0102 Jan 20, 2026
c19732c
#3622 small fixes from copilot
Zwendle Jan 20, 2026
e133b90
Merge pull request #3898 from Northeastern-Electric-Racing/#3725-edit…
Zwendle Jan 20, 2026
f47272b
quick little hot fix
Zwendle Jan 20, 2026
57650c7
Merge branch 'feature/rules-dashboard' into 3622-rulesdashboard-parsing
Aryan0102 Jan 20, 2026
51f1e46
fixed teams saving
Aryan0102 Jan 20, 2026
9eeef5f
#3901 added add rule section modal
Zwendle Jan 20, 2026
60e257f
#3901 changed placeholder ruleContent
Zwendle Jan 20, 2026
b282f8c
fixed parent references
Aryan0102 Jan 20, 2026
b16737c
#3825 clip percent of rules assigned
Zwendle Jan 20, 2026
710011e
fix prettier and tsc
Aryan0102 Jan 20, 2026
11df9ff
fixed lint
Aryan0102 Jan 20, 2026
23158ca
Merge pull request #3730 from Northeastern-Electric-Racing/3622-rules…
Aryan0102 Jan 20, 2026
2a4b432
Merge pull request #3903 from Northeastern-Electric-Racing/#3825-save…
Aryan0102 Jan 20, 2026
82dcd31
Merge pull request #3904 from Northeastern-Electric-Racing/#3901-add-…
Aryan0102 Jan 20, 2026
3af6834
Merge branch 'feature/rules-dashboard' into #3869-rules-breadcrumbs
Zwendle Jan 20, 2026
05c89d5
fixed team grouping
Aryan0102 Jan 20, 2026
c3ce323
#3869 test fixes
Zwendle Jan 20, 2026
9b82cec
parent rule fix
Aryan0102 Jan 20, 2026
6a97c48
#3869 fixed breadcrumbs
Zwendle Jan 20, 2026
99d046b
Merge pull request #3876 from Northeastern-Electric-Racing/#3869-rule…
Aryan0102 Jan 20, 2026
c4d7a63
Merge pull request #3905 from Northeastern-Electric-Racing/team-view-fix
Aryan0102 Jan 20, 2026
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
2 changes: 2 additions & 0 deletions src/backend/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import statisticsRouter from './src/routes/statistics.routes';
import retrospectiveRouter from './src/routes/retrospective.routes';
import partsRouter from './src/routes/parts.routes';
import financeRouter from './src/routes/finance.routes';
import rulesRouter from './src/routes/rules.routes';

const app = express();

Expand Down Expand Up @@ -87,6 +88,7 @@ app.use('/statistics', statisticsRouter);
app.use('/retrospective', retrospectiveRouter);
app.use('/parts', partsRouter);
app.use('/finance', financeRouter);
app.use('/rules', rulesRouter);
app.use('/', (_req, res) => {
res.status(200).json('Welcome to FinishLine');
});
Expand Down
1 change: 1 addition & 0 deletions src/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"jsonwebtoken": "^8.5.1",
"multer": "^1.4.5-lts.1",
"nodemailer": "^6.9.1",
"pdf-parse-new": "^1.4.1",
"prisma": "^6.2.1",
"shared": "1.0.0"
},
Expand Down
339 changes: 339 additions & 0 deletions src/backend/src/controllers/rules.controllers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,339 @@
import { NextFunction, Request, Response } from 'express';
import RulesService from '../services/rules.services';
import { ProjectRule, Rule, Ruleset } from 'shared';
import { HttpException } from '../utils/errors.utils';

export default class RulesController {
static async getActiveRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetTypeId } = req.params;
const rulesetType = await RulesService.getActiveRuleset(req.currentUser, rulesetTypeId, req.organization);
res.status(200).json(rulesetType);
} catch (error: unknown) {
next(error);
}
}

static async getRulesetById(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const ruleset = await RulesService.getRulesetById(rulesetId, req.organization.organizationId);
res.status(200).json(ruleset);
} catch (error: unknown) {
next(error);
}
}

static async createRule(req: Request, res: Response, next: NextFunction) {
try {
const { ruleCode, ruleContent, rulesetId, parentRuleId, referencedRules, imageFileIds } = req.body;

const rule = await RulesService.createRule(
req.currentUser,
ruleCode,
ruleContent,
rulesetId,
req.organization,
parentRuleId,
referencedRules || [],
imageFileIds || []
);

res.status(201).json(rule);
} catch (error: unknown) {
next(error);
}
}

static async deleteRule(req: Request, res: Response, next: NextFunction) {
try {
const { ruleId } = req.params;
const deletedRule = await RulesService.deleteRule(ruleId, req.currentUser, req.organization);
res.status(200).json(deletedRule);
} catch (error: unknown) {
next(error);
}
}

static async createRulesetType(req: Request, res: Response, next: NextFunction) {
try {
const { name } = req.body;
const rulesetType = await RulesService.createRulesetType(req.currentUser, name, req.organization);
res.status(200).json(rulesetType);
} catch (error: unknown) {
next(error);
}
}

static async createProjectRule(req: Request, res: Response, next: NextFunction) {
try {
const { ruleId, projectId } = req.body;
const projectRule: ProjectRule = await RulesService.createProjectRule(
req.currentUser,
req.organization,
ruleId,
projectId
);

res.status(200).json(projectRule);
} catch (error: unknown) {
next(error);
}
}

static async editRule(req: Request, res: Response, next: NextFunction) {
try {
const { ruleId } = req.params;
const { ruleContent, ruleCode, imageFileIds, parentRuleId } = req.body;

const rule = await RulesService.editRule(
req.currentUser,
ruleContent,
ruleId,
ruleCode,
imageFileIds,
req.organization,
parentRuleId
);
res.status(200).json(rule);
} catch (error: unknown) {
next(error);
}
}

static async getAllRulesetTypes(req: Request, res: Response, next: NextFunction) {
try {
const rulesets = await RulesService.getAllRulesetTypes(req.organization);
res.status(200).json(rulesets);
} catch (error: unknown) {
next(error);
}
}

static async getRulesetsByRulesetType(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetTypeId } = req.params;
const rulesets = await RulesService.getRulesetsByRulesetType(rulesetTypeId, req.organization.organizationId);
res.status(200).json(rulesets);
} catch (error: unknown) {
next(error);
}
}

static async getRulesetType(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetTypeId } = req.params;
const rulesetType = await RulesService.getRulesetType(rulesetTypeId, req.organization.organizationId);
res.status(200).json(rulesetType);
} catch (error: unknown) {
next(error);
}
}

static async deleteRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const ruleset = await RulesService.deleteRuleset(rulesetId, req.currentUser.userId, req.organization.organizationId);
res.status(200).json(ruleset);
} catch (error: unknown) {
next(error);
}
}

static async deleteProjectRule(req: Request, res: Response, next: NextFunction) {
try {
const { projectRuleId } = req.params;
const deletedProjectRule = await RulesService.deleteProjectRule(projectRuleId, req.currentUser, req.organization);
res.status(200).json(deletedProjectRule);
} catch (error: unknown) {
next(error);
}
}

static async editProjectRuleStatus(req: Request, res: Response, next: NextFunction) {
try {
const { projectRuleId } = req.params;
const { newStatus } = req.body;

const projectRule: ProjectRule = await RulesService.editProjectRuleStatus(
req.currentUser,
req.organization,
projectRuleId,
newStatus
);

res.status(200).json(projectRule);
} catch (error: unknown) {
next(error);
}
}

static async toggleRuleTeam(req: Request, res: Response, next: NextFunction) {
try {
const { ruleId } = req.params;
const { teamId } = req.body;

const changedRule = await RulesService.toggleRuleTeam(ruleId, teamId, req.currentUser, req.organization);

res.status(200).json(changedRule);
} catch (error: unknown) {
next(error);
}
}

static async createRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { name, rulesetTypeId, carNumber, active, fileId } = req.body;

const ruleset = await RulesService.createRuleset(
req.currentUser,
req.organization,
name,
rulesetTypeId,
carNumber,
active,
fileId
);

res.status(200).json(ruleset);
} catch (error: unknown) {
next(error);
}
}

static async deleteRulesetType(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetTypeId } = req.params;

const rulesetType = await RulesService.deleteRulesetType(req.currentUser, rulesetTypeId, req.organization);

res.status(200).json(rulesetType);
} catch (error: unknown) {
next(error);
}
}

static async updateRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const { name, isActive } = req.body;

const ruleset: Ruleset = await RulesService.updateRuleset(
req.currentUser,
req.organization.organizationId,
rulesetId,
name,
isActive
);

res.status(200).json(ruleset);
} catch (error: unknown) {
next(error);
}
}

static async getChildRules(req: Request, res: Response, next: NextFunction) {
try {
const { ruleId: parentRuleId } = req.params;
const childrenRules: Rule[] = await RulesService.getChildRules(parentRuleId, req.organization);

res.status(200).json(childrenRules);
} catch (error: unknown) {
next(error);
}
}

static async getUnassignedRules(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const rules = await RulesService.getUnassignedRules(rulesetId, req.organization);
res.status(200).json(rules);
} catch (error: unknown) {
next(error);
}
}

static async getUnassignedRulesForRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId, teamId } = req.params;
const rules = await RulesService.getUnassignedRulesForRuleset(rulesetId, teamId, req.organization.organizationId);
res.status(200).json(rules);
} catch (error: unknown) {
next(error);
}
}

static async getProjectRules(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId, projectId } = req.params;

const projectRules = await RulesService.getProjectRules(rulesetId, projectId, req.organization);

res.status(200).json(projectRules);
} catch (error: unknown) {
next(error);
}
}

static async getTeamRulesInRulesetType(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetTypeId, teamId } = req.params;
const rules = await RulesService.getTeamRulesInRulesetType(teamId, rulesetTypeId, req.organization);
res.status(200).json(rules);
} catch (error: unknown) {
next(error);
}
}

static async getTopLevelRules(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const rules = await RulesService.getTopLevelRules(rulesetId, req.organization.organizationId);
res.status(200).json(rules);
} catch (error: unknown) {
next(error);
}
}

static async parseRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { fileId, parserType } = req.body;
const { rulesetId } = req.params;

const parseResult = await RulesService.parseRuleset(
req.currentUser,
req.organization.organizationId,
fileId,
rulesetId,
parserType
);

res.status(200).json(parseResult);
} catch (error: unknown) {
next(error);
}
}

static async uploadRulesetFile(req: Request, res: Response, next: NextFunction) {
try {
if (!req.file) {
throw new HttpException(400, 'Invalid or undefined file data');
}

const fileId = await RulesService.uploadRulesetFile(req.file, req.currentUser, req.organization);
res.status(200).json(fileId);
} catch (error: unknown) {
next(error);
}
}

static async getSingleRuleset(req: Request, res: Response, next: NextFunction) {
try {
const { rulesetId } = req.params;
const ruleset = await RulesService.getSingleRuleset(req.currentUser, rulesetId, req.organization);
res.status(200).json(ruleset);
} catch (error: unknown) {
next(error);
}
}
}
Loading
Loading