Adding an Allocation Review & an Allocation Request Pages - #668
Open
ArtemKurasov wants to merge 25 commits into
Open
Adding an Allocation Review & an Allocation Request Pages#668ArtemKurasov wants to merge 25 commits into
ArtemKurasov wants to merge 25 commits into
Conversation
… allocation review + admins can no longer review allocations that has not been requested
…urrentYear instead of g.openTerm
…location requests
MImran2002
requested changes
Aug 6, 2026
|
|
||
| # checking if the allocation has already been approved (in other words, if an approved allocation exists) | ||
| if allocationExists(nextAY.termCode, dept, isFinal=True): | ||
| flash(f"The allocation for the {nextAY.termName.split(" ")[1]} academic year has already been approved; therefore, you can no longer resubmit it.", "danger") |
MImran2002
reviewed
Aug 7, 2026
| from app.logic.academicYearManager import getCurrentAndNextAY | ||
|
|
||
|
|
||
| @main_bp.route('/department/<org>/<account>/allocations/request', methods=['GET']) |
Contributor
There was a problem hiding this comment.
reroute it to managedepartment instead
| if not currentUser: # If the current user is not logged in | ||
| return render_template('errors/403.html') | ||
| if not currentUser.isLaborAdmin: | ||
| if not (currentUser.isLaborAdmin or currentUser.isLaborDepartmentStudent): |
Contributor
There was a problem hiding this comment.
we can remove currentuser.islabordepartmentstudent as they re only given to pendingforms and we figured out yesterday that islaboradmin can be given to student workers
|
|
||
| # checking if the department has requested any allocation review | ||
| if not allocationExists(nextAY.termCode, dept, isFinal=False): | ||
| flash(f"The {dept.DEPT_NAME} department has not requested an allocation review yet.", "danger") |
Contributor
There was a problem hiding this comment.
a warning or an info as this is nothing related to error it cannot be danger but this is about informing so this is likely a warning or info
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.
Issue
Fixes issues #613 and #614
Changes
getCurrentAndNextYear()andallocationExists()Automatic Testing
pytest tests/code/test_academicYearManager.pyandpytest tests/code/test_allocationManger.pyto make sure the newly created allocation functions work.Manual Testing
/allocations/requestto the end of the URL. You should appear on the Allocation Request page./allocations/requestto the end of the URL.