-
Notifications
You must be signed in to change notification settings - Fork 13
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
Admin Edit Course Info Page Frontend #884
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
is there any way to increase the size of the CRN tags via some CSS magic? They are a bit small and hard to read |
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.
Small nits about the general layout/style of the form but everything seems present and functional, and the code is pretty clean too!
- moved cancel/save button to the bottom - increased the size of CRN tags - rel="noopener noreferrer"
for (const crn of new Set(coursePatch.crns)) { | ||
const courseCrnMaps = await CourseSectionMappingModel.find({ | ||
courseCrnMaps = await CourseSectionMappingModel.find({ |
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.
This is my bad for not getting to review the earlier backend PR, and I might be wrong - but I don't think courseCrnMaps
has to be requeried once per loop. I think you can maybe just get away with querying it the once at line 143 and using that array throughout. It won't be the most up to date CRNs for that course on each iteration, but I don't think you need it to be up to date each time. You've already made the patched crns into a set so there won't be any conflicts here, and any crns removed from above shouldn't be any reason for conflict either.
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.
This courseCrnMaps here is for any mappings with that crn, which is different from line 143 (mappings for that course), so I think it is still necessary here? Let me know if I misunderstood anything (and sorry for just addressing this after 7 months ∠( ᐛ 」∠)_ )
Thank you for reviewing my PR and leaving so many great comments (。・ω・。) (I have addressed all other ones!)
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.
ahh yes i think i understand. ive also mostly forgotten what all of this code does but regardless i catch the vibes here
can you add validation on the ical input to enforce that it ends in ".ics"? that will fix one step on this issue |
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.
LGTM babe sorry this did actually take 50000 years
Description
Added the Course Info page to the Admin Panel to allow professors (and course coordinators) to update course information (course display name, coordinator email, ical url, and crns).
Please include a summary of the change:
Closes #854
Type of change
Please delete options that are not relevant.
yarn install
How Has This Been Tested?
Please describe how you tested this PR (both manually and with tests)
Provide instructions so we can reproduce.
Checklist: