joven-health-mike / juno-react

A virtual therapy platform designed for K-12 schools.
0 stars 0 forks source link

Data loading issues #66

Closed joven-health-mike closed 1 year ago

joven-health-mike commented 1 year ago

Oftentimes, after adding a new object - such as an appointment or a student - other pages of the site that use that data are not correctly updated.

For example:

  1. Add a new student using the "Add Student" button.
  2. Navigate to the "Calendar" page and click a date to create a new appointment.
  3. Scroll through the list of users in the "Participants" tab.

Result - the newly added student does not show up in the list.

Another example:

  1. Add a new appointment using the "Add Appointment" button.
  2. Navigate to the "Home" page.
  3. Look at the list of appointments for the day of the appointment you just added.

Result - the newly added appointment does not show up in the list.

joven-health-mike commented 1 year ago

Looks like there are at least a couple of different issues going on here.

I found the solution to the 2nd example - after implementing recurring meetings, the server started returning an array of appointments instead of just 1 appointment. However, the parsing logic on the front-end wasn't updated accordingly. (There was another issue on the server that had to be deployed as well).

For the 1st example, I suspect that the users object needs to be updated whenever a counselor or a student is added, deleted, or modified. However, I implemented this in a basic way and it didn't appear to fix the problem.

I'll keep digging, but if I can't figure it out shortly, I will create a separate issue for the 1st example.