nusmods icon indicating copy to clipboard operation
nusmods copied to clipboard

Add duplicate modules conflict

Open ChillinRage opened this issue 1 year ago • 3 comments

Duplicate conflict checks if there are modules with the same module code added to the same academic year and semester.

Context

Proposal to fix #3732 which having same modules in the same year/semester shows no warnings.

Implementation

Added a new conflict that checks if the module list for a given semester has more than one module of the same module code.

Other Information

Added test case for the conflict, though I'm slightly confused as to what's the role/difference between planner and moduleBank (the variables in the planner.test.ts)?

ChillinRage avatar Jul 04 '24 04:07 ChillinRage

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nusmods-export ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 5:06pm
nusmods-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 5:06pm

vercel[bot] avatar Jul 04 '24 04:07 vercel[bot]

@ChillinRage is attempting to deploy a commit to the modsbot's projects Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Jul 04 '24 04:07 vercel[bot]

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 53.63%. Comparing base (e6423d8) to head (6efddc3).

Files Patch % Lines
website/src/views/planner/PlannerModule.tsx 0.00% 2 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3738      +/-   ##
==========================================
+ Coverage   53.60%   53.63%   +0.02%     
==========================================
  Files         274      274              
  Lines        6025     6032       +7     
  Branches     1446     1449       +3     
==========================================
+ Hits         3230     3235       +5     
- Misses       2795     2797       +2     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jul 04 '24 04:07 codecov[bot]

Apologies for the missing message and late response too. I've added the section that should display a warning message. Is there a way in which I can run a live webpage that allows me to test my local changes?

ChillinRage avatar Jul 16 '24 15:07 ChillinRage

Apologies for the missing message and late response too. I've added the section that should display a warning message. Is there a way in which I can run a live webpage that allows me to test my local changes?

Yes! Once you've cloned the repository, just run cd website to enter the website folder, yarn install to install all the dependencies, and then yarn start to start the web server.

Let me know if that works.

ravern avatar Jul 16 '24 17:07 ravern

Yes I just tried yarn start and it works. Thank you!

As for the conflict message, it does appear after the changes. image

ChillinRage avatar Jul 17 '24 14:07 ChillinRage