Current Child Care Center worksheets tab code is extremely hard to read. This PR should break the code out into several components and make each tab loadable via url params.
Implementation
Make worksheet tabs loadable from URL e.g. http://localhost:8080/child-care-centres/1/worksheets/june.
Only load the specific worksheet for the given month instead of all worksheets for the center.
Ensure consistent ordering or worksheets/FundingSubmissionLineJsons via back-end query order.
Did not add fiscal year to the url path as this was too large a change at this time.
Did not optimize funding submission line json index fetch for the same reason. The index action should likely not return the json "values" column.
Delete everything from the funding_submission_line_jsons table and refresh the page.
You should see the no worksheets prompt.
Add some worksheets.
Once the worksheet resolves it will select "April"; the first month.
Edit some content in section 1 of the sheet, and note that it propagates to sections 2 and 3.
Save the sheet and check that the content persists after a refresh.
Click the "replicate estimates" button and check that the "April" content propagates to the other months.
Note that the the tabs load much more quickly than before. The current code isn't very well optimized, but at least its loading one sheet per page, and only rendering the current tab.
Check that you can edit other sheets. e.g July.
When you are on the July sheet, reload the page. Note that after a delay, it loads "July" after page refresh instead of going back to "April".
Click on the "Worksheets" tab, and note that you are redirected to the first month, April, when a month is not specified.
Switch the fiscal year and create some worksheets.
Switch back to the previous fiscal year and notice that the page component refresh is very quick. This is because we are performing a fetch against a single worksheet, and only reloading the innermost tab content.
Context
Current Child Care Center worksheets tab code is extremely hard to read. This PR should break the code out into several components and make each tab loadable via url params.
Implementation
Make worksheet tabs loadable from URL e.g. http://localhost:8080/child-care-centres/1/worksheets/june. Only load the specific worksheet for the given month instead of all worksheets for the center. Ensure consistent ordering or worksheets/FundingSubmissionLineJsons via back-end query order.
Did not add fiscal year to the url path as this was too large a change at this time. Did not optimize funding submission line json index fetch for the same reason. The index action should likely not return the json "values" column.
Screenshots
Zero worksheets
Testing Instructions
dev up
funding_submission_line_jsons
table and refresh the page.