Skip to content

Members card#651

Open
BhushanSah wants to merge 16 commits into
department-portal-basefrom
MembersCard
Open

Members card#651
BhushanSah wants to merge 16 commits into
department-portal-basefrom
MembersCard

Conversation

@BhushanSah

@BhushanSah BhushanSah commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Description

This PR adds a Members card to the Department Portal homepage. The card gives users a quick overview of the people connected to a department by showing the assigned Labor Coordinator(s) and a preview of department members.

Fixes #603
The card is meant to provide a simple summary on the homepage, while full personnel management will remain part of Issue #605.

Changes

  • Added a Members card to the Department Portal homepage.
  • Displayed assigned Labor Coordinator(s) for the selected department.
  • Displayed a preview of department members.
  • Connected the card to real department/personnel data instead of hard-coded values.
  • Added a View Details button for navigating to the Manage Personnel page.
  • Refactored the member display logic to make the route easier to read and maintain.

Notes

Testing

  • Verified that the Members card displays on the Department Portal homepage.
  • Verified that Labor Coordinator(s) and department members are separated correctly.
  • Verified that the page still loads when no personnel is assigned.
  • Checked that the View Details button is present.

Comment thread app/controllers/main_routes/main_routes.py Outdated
Comment thread app/controllers/main_routes/main_routes.py Outdated
Comment thread app/controllers/main_routes/main_routes.py Outdated
Comment thread app/controllers/main_routes/main_routes.py Outdated
@@ -0,0 +1,22 @@
.card {
border-radius: 1rem;
overflow: hidden;

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 file could create a merge conflict just a caution

Comment thread app/templates/main/departmentPortal.html Outdated
Comment thread app/templates/main/departmentPortal.html
Comment thread app/templates/main/departmentPortal.html Outdated


for supervisorDepartment in supervisorDepartments:
supervisor = supervisorDepartment.supervisor

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Supervisors may be excluded because of missing name fields

buildSupervisorDisplay() requires both FIRST_NAME and LAST_NAME. A supervisor who has a preferred name or legal name but is missing one of those fields may be removed from the displayed list completely.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

There is no first name column in the database; the firstname attribute is linked to the preferred name to legal name method, which checks either.

Comment thread app/logic/getSupervisors.py Outdated
Comment thread app/logic/getSupervisors.py Outdated
Comment thread app/static/css/departmentPortal.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants