seas-computing / course-planner

SEAS Course Planning Application. JSDoc Docs at: https://seas-computing.github.io/course-planner/
0 stars 1 forks source link

Course Admin: Create/Update Modal UI for adding "Same As" field #629

Closed jonseitz closed 1 year ago

jonseitz commented 1 year ago

As a follow-up from #388, we need to handle the new realtionship-style sameAs fields in the Course Admin. Currently, I think the Course Admin is going to throw an error if a user tries to add a SameAs relationship on a course, as the server is going to expect a UUID. We need to:

  1. Generate a list of valid parent course options with their UUIDs
  2. Throw those values in a Combobox with a "None" option
  3. Allow for changing/removing the parent course
  4. Send the UUID field to the server with the other data

We should make sure to apply our validation rules to generate the list of parents, which are:

  1. A course can only have one parent
  2. The parent course cannot be the child of any other course
  3. A child course cannot be the parent of any other course

We should also double-check those rules on the server-side.

rmainwork commented 1 year ago

A course also cannot be the parent of itself. So AC 209a, cannot choose "AC 209a" as the parent.