icefoganalytics / elcc-data-management

Data Management application for Education's Early Learning Child Centre
Apache License 2.0
0 stars 0 forks source link

ELCC-45: Payments Aren’t Persisting Against the Correct Centre and Fiscal Year on Save #69

Closed klondikemarlen closed 10 months ago

klondikemarlen commented 10 months ago

Fixes https://yg-hpw.atlassian.net/browse/ELCC-45

Context

User report

None of the payments that I entered (and hit save) remain after logging out. I did it multiple times, it disappeared every time.

Could not re-create; however, this may have been fixed by fixing payment -> fiscal year reactivity in https://github.com/icefoganalytics/elcc-data-management/pull/67

Investigation

image

Lots of payments are showing up in the database against the same fiscal year and center id. This is likely the result of a hard-coded center id and/or fiscal year in the data entry. Or the data entry not being reactive to the currently selected fiscal year/center id.

Implementation

Force invalid api calls to bounce the user to the login page. There have been reports that payments aren't persisting after logout, and since I haven't been able to recreate the issue locally, the only other thing I can think of is that the user's session had silently expired. This is generally a good practice, though it might be better to handle this in a route guard or global watcher or something. Support double click go to on center list.

Testing Instructions

  1. Boot the app via dev up
  2. Check that the app complies, and that you can log in at http://localhost:8080.
  3. Go to http://localhost:8080/child-care-centres.
  4. Double click a child care center to go to the center details. (new)
  5. Go to the Summary -> Payments tab.
  6. Switch the fiscal year, and then enter some payments
  7. Reload the page and see if they persist after refresh.