Display allocation warning during pending LSF approval (#622)#638
Open
DanielRukwasha wants to merge 2 commits into
Open
Display allocation warning during pending LSF approval (#622)#638DanielRukwasha wants to merge 2 commits into
DanielRukwasha wants to merge 2 commits into
Conversation
Extract allocation logic into app/logic/allocation.py (getAllocationSummary, getAllocationWarning), wire it into modal_approval_and_denial_data() to show a per-department warning box in the approval confirmation modal, and fix demo data so students/supervisors are marked active (needed for the approval checkbox to render at all).
isOverAllocated was a single combined flag, so a department over on one category but fine on the other would show the whole box the same way. Split into isPositionsOverAllocated / isBreakHoursOverAllocated so each metric line is highlighted (with an explicit warning marker, not just color) based on its own status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #622
Adds a non-blocking over-allocation warning to the pending-LSF approval confirmation modal, so Labor Office admins can see the allocation impact before approving.
Branched off \�llocation-card-real-data-ruk\ (not \�llocation_card\ directly) since this depends on the allocation logic from #636, which hasn't merged yet.
Tested via direct API calls and in-browser: confirmed the warning shows correct numbers, confirmed the red/amber highlighting triggers independently for positions-only and break-hours-only over-allocation scenarios, and confirmed the full approve flow completes correctly end-to-end.