Move replicateFirstEstimateToAllOthers function to the back-end and write some tests for it.
Create a back-end endpoint POST /api/funding-submission-line-jsons/replicate-estimates that maps to a funding-submission-line-jsons/replicate-estimates/create-service
Select a Child Care Centre by double-clicking on it, or adding a new one via the top right call-to-action.
Select the 2023/24 fiscal year from top right selector thing.
Select the Worksheets tab.
This will select the “April” sub-tab.
Click the “add worksheets for xxx” if no worksheets exist.
In the first section “Child Care Spaces”, fill in an estimate of “5” for Infants, and “6” for actuals.
Click the “Save” button at the top right of the tab.
Click the “replicate estimates” button below the “save” button.
Select the “May” sub-tab, and note that the “Actual” for Infants has been copied as well as the “Estimate”.
Implementation
Upgrade BaseSerivce and BaseController pattern with code from https://github.com/icefoganalytics/wrap
Move estimate replication to back-end service, and write some tests for it.
Add api/src/services/funding-submission-line-jsons/replicate-estimates-service.ts and use it in api/src/controllers/funding-submission-line-jsons/replicate-estimates-controller.ts
Make estimate generation slightly more flexible, so that it operates forward in time only. This means that we could update the UI so that the replicate estimates feature was on every tab, instead of just the first one.
Fixes https://yg-hpw.atlassian.net/browse/ELCC-59
Relates to:
web/src/modules/centre/pages/CentreDashboardWorksheetsMonthlyWorksheetPage.vue
Context
User Report
Relates to components:
web/src/modules/centre/pages/CentreDashboardWorksheetsMonthlyWorksheetPage.vue
Propose Implementation
Move replicateFirstEstimateToAllOthers function to the back-end and write some tests for it. Create a back-end endpoint POST /api/funding-submission-line-jsons/replicate-estimates that maps to a funding-submission-line-jsons/replicate-estimates/create-service
Reproduction Instructions
Implementation
Upgrade BaseSerivce and BaseController pattern with code from https://github.com/icefoganalytics/wrap Move estimate replication to back-end service, and write some tests for it. Add
api/src/services/funding-submission-line-jsons/replicate-estimates-service.ts
and use it inapi/src/controllers/funding-submission-line-jsons/replicate-estimates-controller.ts
Make estimate generation slightly more flexible, so that it operates forward in time only. This means that we could update the UI so that the replicate estimates feature was on every tab, instead of just the first one.Screenshots
Testing Instructions
dev up