Skip to content

Manage Departments Page Update - #648

Open
ACBerea wants to merge 81 commits into
department-portal-basefrom
dep_portal_ad_ManageDepartments
Open

Manage Departments Page Update#648
ACBerea wants to merge 81 commits into
department-portal-basefrom
dep_portal_ad_ManageDepartments

Conversation

@ACBerea

@ACBerea ACBerea commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Issue Description

Fixes Issue #623

  • Display the allocation of all departments on the Manage Departments page.

Changes

  • Created an Academic Year Dropdown, along with 4 buttons to its sides.
  • Added a Positions column, where admins can view primary and secondary position allocation information.
  • Added an Allocation Status column, which shows whether the allocation requests have been approved or are still pending.
  • Made the page display current break hours out of maximum break hours.
  • Added an action button, which allows the admin to manage the departments.
  • Made modals/popups for the Annual Allocation Review and Annual Position Review buttons.
image

Manual Testing

  • Check if the Status toggle properly switches between In Compliance and Not in Compliance (you can also reload the page and rerun Flask to check if the changes get saved to the database).
  • Switch between different available years in the Academic Year dropdown. As you switch between years pay attention to the URL and the Allocation Status header: they must reflect the chosen year.
  • Click on the Annual Allocation Review and Annual Position Review buttons to make sure the modals actually pop up.

Testing with Test Suites

  • Type pytest tests/code/test_manageDepartments.py in the command line to run all the test suites written for the Manage Departments page.

zhytkovd and others added 30 commits July 2, 2026 20:56
…rmName to academicYear in manageDepartments.html
…website. Added commented out code for the pending variation of the Approved Button in manageDepartments.html.
…will now change based on if the allocation isFinal from either pending or approved.
@ArtemKurasov ArtemKurasov added epic A project that will require multiple sub-tasks to complete and removed draft labels Jul 29, 2026
@ArtemKurasov
ArtemKurasov requested a review from BhushanSah July 30, 2026 14:00
Comment thread app/logic/manageDepartments.py Outdated
.group_by(LaborStatusForm.department, LaborStatusForm.termCode).dicts()
)

print(list(totalBreakSum))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This debug print should be removed.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for pointing this out

on = (LaborStatusForm.termCode == Term.termCode)
)
.where(
(FormHistory.historyType == "Labor Status Form") &

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also filter FormHistory.historyType == "Labor Status Form"? Right now it only checks Approved status, so other approved history rows could accidentally be included in the position counts.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I am not sure. Actually, this will probably be fully replaced

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This filter is actually in the code! It's on line 81

@@ -0,0 +1,189 @@
import pytest

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we clean this test file before merging? There are several unused imports and a large commented-out test block. It would be better to keep only the active tests and the imports they need.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will clean this all up

Chosen AY: {{ academicYear.split(" ")[1] }}
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1" style="width: 200px; text-align: center;">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Academic year dropdown opens

    but does not clearly close
before closing the dropdown div.

<td style="white-space: nowrap">
<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action dropdown/table row markup looks unbalanced. There is an extra closing before .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic A project that will require multiple sub-tasks to complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants