ucsb-cs156-f23 / proj-organic-f23-6pm-2

https://ucsb-cs156-f23.github.io/proj-organic-f23-6pm-2/
0 stars 0 forks source link

EPIC: School and Term validations #12

Open github-actions[bot] opened 10 months ago

github-actions[bot] commented 10 months ago

User Story for Epic

This is an Epic, not a single issue

This is an Epic, meaning that this issue is intended to be the "master issue" that is broken into multiple individual issues.

Copy the user stories/acceptance criteria into a separate issue before starting to work on it, and make PRs for each part separately. Benefits to this staged approach:

Discussion

Currently, when entering a course, the school field is free form.

We'd like that, instead, to be a dropdown with a list of schools so that the data will be more uniform.

To this end, we want admins (only admins) to be able to do CRUD operations on a table that with four fields:

Once this table exists, the free form entry in the CourseForm for term can be replaced with a drop down from the entries in this table. The courseForm can do a useBackend call to get the list of schools and populate a downdown. It can also put the text for term description next to the term box. (In the first version, we can ignore the termRegex and termError messages; those are for a later issue below.

Note that this will mean that at least one school must be in the table before any courses can be created. To make things easier, it may be helpful (in a separate issue) to add code that, on startup, checks to see if the Schools table is empty, and if so, has code that inserts this entry into the Schools table during application startup:

That way courses can be entered immediately.

Once that's done, we can work on an issue that, in the Course form, will also use the regex and error message to validate the term entries based on the school that is selected. Note that this requires those to be changed dynamically based on the value selected in a dropdown on another part of the form, so this may or may not be straightforward; it will require react knowledge that is beyond the examples already in the code base. So that may be a particular challenging issue.

Acceptance Criteria

This list is for the entire epic; you'll need to break these down into the specific issues; each of these roughly corresponds to one issue.

Implementation Todos

B1: Backend Issue: entity/repository for schools

B2: Backend Issue: schools controller: GET all, GET by id, POST

B3: Backend Issue: PUT, DELETE

F1: Frontend: Form / Table for schools

F2: Frontend Create and Index Pages

F3: Frontend CourseForm uses schools dropdown

F4: Frontend Course Form shows school specific term description

F5: Frontend Course Form uses school specific regex.

github-actions[bot] commented 10 months ago

Copied from https://github.com/ucsb-cs156/proj-organic/issues/27