ucsb-cs156-s24 / proj-courses-s24-4pm-2

https://ucsb-cs156-s24.github.io/proj-courses-s24-4pm-2/
0 stars 0 forks source link

BUG: Add course dialog allows adding course to the wrong schedule #35

Closed WhrainySu closed 1 month ago

WhrainySu commented 1 month ago

In this PR, I achieved two goals:

  1. When the user clicks the add button for a course in a given quarter, say F24, in the modal that pops up, all of the personal schedules for that quarter are shown, and ONLY the personal schedules for that quarter are shown.

  2. When the user clicks the add button for a course in a given quarter, say F24, if there are no personal schedules for that quarter that already exist, the modal says: "There are no personal schedules for F24" (or whatever the quarter is), and there is a button [Create Personal Schedule] that when the user clicks it, navigates to the create page.

The following is the steps to operate:

  1. Create two new schedules, S23 and S24 image

  2. Seach courses in quarter S24 ( schedule already exist), and try to add a course image image

    We can see that only schedule for S24 is shown, and CS 5A is successfully added.

  3. Seach courses in quarter F24 ( schedule not exist), and try to add a course image

    We can see that there is no schedule for F24, and we can create a new schedule for it by clicking the link.

  4. Create a schedule for F24, and try to add a course image image image

    We can see that there is a new schedule for F24, and CS 5A is successfully added.

Dokku Link: https://project-whrainysu-dev.dokku-02.cs.ucsb.edu Close: #24 #25