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 18: Support Customization of Employee Benefits Section #59

Closed klondikemarlen closed 10 months ago

klondikemarlen commented 10 months ago

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

Relates to:

Context

The Employee Benefits section math is set up the same as the rest of the spreadsheet, but it really should be quite different.

Currently it does the A x B = C math horizontally, and then adding up the totals vertically like everywhere else: image

It should be just data fields for Gross, EE Cost and ER Cost, with the 8% calculating automatically, and then the Section Total being the lesser of 8% compared to Employer Cost. image

Implementation

  1. Add unique constraints to fiscal periods and employee benefits tables.
  2. Build out an edit widget for employee benefits for a given month. Currently loading by centreId and fiscalPeriodId, but might make more sense to load from Id? And maybe have a separate creation and editing interface? It also might make sense to pre-populated all the benefits for the year, and then we would only have to worry about editing ...
  3. Remove Employee Benefits from funding_submission_line_jsons and funding_submission_lines and anywhere else it previously existed.

Screenshots

image

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. Click on the "Education is Currently Funding" widget to go to the list of centers page.
  4. Click on the first child care center to open the "Child Care Centre Details" panel.
  5. Click on the "View details" button in the bottom right corner.
  6. After you are redirected to the child care center dashboard, click on the "Employees" tab on the far right.
  7. Check that you can create/update employee benefits per-month.
  8. Check that the calculation of the section total is the lesser of 8% of Gross or Employee plus Employer cost.
  9. Go to the "Worksheets" tab e.g. http://localhost:8080/child-care-centres/1/2023-24/worksheets/april
  10. Check that the "Employee Benefits" section has now been removed.
  11. Go to the Administration page via the top right kebab menu.
  12. Click on the "Submission Format" card.
  13. Check that "Employee Benefits" have been removed form the list of submissions types.