Skip to content

ELCC-82: Add Hot Meal Feature and Funding Period Error Handling - #109

Merged
klondikemarlen merged 49 commits into
mainfrom
elcc-82/model-quality-program-enhancement-section-per-centre-and-month
Apr 17, 2026
Merged

klondikemarlen merged 49 commits into
mainfrom
elcc-82/model-quality-program-enhancement-section-per-centre-and-month

Conversation

@klondikemarlen

@klondikemarlen klondikemarlen commented Apr 17, 2026

Copy link
Copy Markdown
Member

Relates to:

Context

Child care centres need per-region hot meal increment configuration to apply different funding amounts based on regional policies. The existing system used fixed quality enhancement values that could not be customized by region. This PR adds per-region hot meal increment configuration and applies it during funding submission line JSON generation.

Implementation

  1. Configure hot meal increment amounts per funding region through admin UI
  2. Apply region-specific hot meal increments to quality enhancement funding during JSON generation
  3. Regenerate funding submission line JSONs when centre hot meal option is toggled
  4. Delete funding regions with dependent building expense categories
  5. Show role-specific guidance when funding period is missing during fiscal year initialization

Deferred

  • Funding region hot meal increment changes do not automatically regenerate funding submission line JSONs for affected centres. Centres continue using the old increment amount until their hot meal setting is toggled off and on. Deferred until epic https://yg-hpw.atlassian.net/browse/ELCC-79 is complete to reduce complexity.

Screenshots

Funding Region table with new hot meal increment amount
http://localhost:8080/administration/funding-regions
image

Funding Region creation with new hot meal increment amount (edit and view pages also include this)
http://localhost:8080/administration/funding-regions/new
image

Center Main View when funding period doesn't exist as admin
http://localhost:8080/child-care-centres/1/2026-27/summary/reconciliation
Screenshot From 2026-04-17 10-48-29

Center Main View when funding period doesn't exist as regular user
http://localhost:8080/child-care-centres/1/2026-27/summary/reconciliation
Screenshot From 2026-04-17 10-47-59

Testing Instructions

  1. Run the test suite via dev test (or dev test_api).
  2. Boot the app via dev up.
  3. Log in to the app at http://localhost:8080.
  4. Navigate to AdministrationFunding Regions.
  5. Edit a funding region and set a hot meal increment amount.
  6. Navigate to a child care centre and enable hot meal option.
  7. Verify the funding submission line JSONs include hot meal enhancements.
  8. Disable the hot meal option on the centre.
  9. Verify the hot meal enhancements are removed from the funding submission line JSONs.
  10. Re-enable the hot meal option on the centre.
  11. Verify the hot meal enhancements are reapplied to the funding submission line JSONs.
  12. Navigate to a child care centre with no funding period for the selected fiscal year.
  13. Verify appropriate empty state is shown with guidance based on user role.

Why? Align all documentation with traditional-knowledge, wrap, and travel-authorization projects while adapting for ELCC Data Management context.

What? Pulled in comprehensive documentation improvements from reference projects and ensured proper alignment:

- COMMITTING.md with complete emoji guidance and commit structure rules
- AGENTS.md with design philosophy section and proper technology stack
- Pull request workflow aligned with project-specific naming and context
- Complete agents templates library (backend + frontend + filter templates)
- Sharded documentation structure with all missing README files
- agents/plans/README.md with proper structure and current plans

Key improvements:
- Template library for rapid CRUD development
- Consistent documentation patterns across all subsystems
- Better developer experience with comprehensive guides
- AI agent support with specific workflow and template guidance
- Proper alignment with established patterns from reference projects

See agents/templates/README.md for complete template overview
See AGENTS.md for project-wide conventions and philosophy
Why? Create comprehensive implementation plan for ELCC-82 and ELCC-63 hot meal feature work.

What? Added detailed implementation plan with:

- Two-part implementation approach (ELCC-82 foundation + ELCC-63 feature)
- Complete data model architecture with ER diagram
- Detailed file change tables for both parts
- Service layer design for hot meal updates
- Final cleanup step with plan removal instructions

Plan establishes dedicated Quality Program Enhancement model structure as foundation for hot meal feature implementation.
Add token expiration handling to prevent failed API requests.
Add Ruby development setup documentation.
Add Ruby prettification and LSP setup instructions for VS Code with specific UI steps.
Replace deprecated TypeScript/JavaScript settings with unified js/ts.preferences format.
Simplifies to add hotMealIncrementAmount directly to funding regions table for easier implementation.
Enables per-region hot meal funding amounts for child care centers.
Enables hot meal funding calculations for centers in existing funding regions.
Enables per-region hot meal funding amounts for child care centers.
Sets default to current value as of 2026-04-15 for hot meal funding calculations.
Tracks completed database work and remaining tasks for hot meal functionality.
Why? We need the ability to link these sections to the center "hot meal" option, and can only do so if we guarantee the name is consistent.

In the future, this will likely be broken out into it's own model and the label will be configurable in the UI again.
Booleans should almost always be non-nullable.
Centres can now apply or remove hot meal increments to Quality Enhancement Program sections when the hot meal toggle changes.
Add time freezing, test description, multiple record assertion, and immutable transformation patterns to improve developer experience and code consistency.
Manual workaround available: update region, then toggle centre hotMeal off/on to trigger updates.
@klondikemarlen klondikemarlen self-assigned this Apr 17, 2026
@klondikemarlen klondikemarlen added the enhancement New feature or request label Apr 17, 2026
…ling projects

- Add issue linkage wording rule (Fixes vs Part of)
- Add decision rule to not stop at PR body drafting
- Add decision rule to use Jira workflow for issue framing
- Expand Implementation section guidance to be user/outcome-focused
- Add good/bad examples for Context and Implementation sections
- Expand Testing Instructions with standard steps and QA principles
- Add Backend Refactor example with table format
- Fix type checking commands to match ELCC patterns
- Remove duplicate workflow references
Allows centres to apply hot meal enhancements to the current month instead of only future periods.
@klondikemarlen
klondikemarlen force-pushed the elcc-82/model-quality-program-enhancement-section-per-centre-and-month branch from 14f0d66 to b21fe85 Compare April 17, 2026 18:42
Allows skipping global setup (database init, migrations, seeds) for
faster test iteration when the database is already initialized in
the current session. Pattern from wrap project.
… multiple args

Iterates over all args instead of just the first one, allowing multiple
test file paths to be reformatted. Pattern from wrap project:
icefoganalytics/wrap@31dc6e9d9
… support

- Add bin/open-in-editor-bridge.rb for Vue DevTools Open in Editor functionality
- Wrap up/down commands with OpenInEditorBridge.with_running
- Add Linux override compose file support (docker-compose.development.linux.yml)
- Add proxy configuration to web/vite.config.js for /__open-in-editor requests
- Add Open In Editor documentation to web/README.md
- Fix shutdown to kill entire process group with -pid
- Remove unused requires (fileutils, json, open3) from bin/dev

Pattern from traditional-knowledge:
icefoganalytics/traditional-knowledge@a1a66d5
icefoganalytics/traditional-knowledge@6c22433
Add bin/api-wait.mjs script and api_wait service to ensure web container
waits for API to be ready before starting. Prevents web container from
starting too early and triggering 500 errors during development.

Pattern from wrap:
icefoganalytics/wrap@4d35850d
icefoganalytics/wrap@462532c5
@klondikemarlen
klondikemarlen marked this pull request as ready for review April 17, 2026 19:40
@klondikemarlen
klondikemarlen merged commit b4534d4 into main Apr 17, 2026
@klondikemarlen
klondikemarlen deleted the elcc-82/model-quality-program-enhancement-section-per-centre-and-month branch April 17, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant