icefoganalytics / student-financial-aid

Student Financial Aid (SFA)
0 stars 0 forks source link

Refactor: Rebuild the getNext Navigation Function So It Doesn’t Block #11

Closed klondikemarlen closed 1 year ago

klondikemarlen commented 1 year ago

Relates to https://github.com/ytgov/sfa-client/pull/108

Context

When attempting to complete a funding request application, the "Save and next" button kept not working for me.

Implementation

Fix "getNext" navigation function. Use better typing in relevantSections Use standard find methods instead of complex loop. Have "save and next" button loop if next section is not active. See note.

Note

Note, it would probably be better to have the "getNext" function return the next section so that the "Save and Next" button could be disabled if the next section was disabled. I opted for a "loop around" pattern instead of the "just go nowhere and look broken approach".

Testing Instructions

  1. In the sfa-client repo boot the back-end via API_PORT=3100 dev up
  2. In the student-financial-aid repo boot the back-end via cd src/api && npm run start
  3. In the student-financial-aid repo boot the front-end via cd src/web && npm run start
  4. Go to http://localhost:8080 and log in.
  5. Either edit an existing "In Progress" application or create a new one.
  6. Try out the "agree and next" buttons and see if they work better than before.