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