Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Project Affiliations Menu to Main Interface #9417

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

NadaElmasry
Copy link
Collaborator

@NadaElmasry NadaElmasry commented Oct 22, 2024

Description

This PR introduces a Project Affiliations menu to the application's main interface, mirroring the existing Site Affiliations menu.


Changes Implemented

  1. User Class Enhancements

    • Fetch Projects by User ID:
      • Updated the User class to retrieve associated projects using the user's ID using user_projects_query.
  2. Template Modifications

    • Added a new Project Affiliations menu item to the main template.
    • Expanded the existing Affiliations Menu to include a Project Affiliations section.
  3. Middleware Adjustments

    • User Page Middleware Integration:
      • Updated the user page middleware to incorporate the newly fetched project affiliations from the User class.using getProjectIDs() and >getProjectNames()).

GUI

Affiliations Menus with single project or site

projectaffiliations1

projectaffiliations2

Affiliations Menus with multiple projects or sites

projectaffiliationsmultipleprojects

siteaffiliationsmultiplesites

Suggested Changes

Affiliations drop-down menu with fixed hieight and scrollable option

siteaffiliationsscrollable

Removed separate Project and Sites Menus

siteaffiliationsscrollable2


Related Issue

Store examiner's centerID with active status and radiologist flag,
ensuring centerID is a string
*/
$examiner_info[(string)$val['centerID']] = [
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need that change? Does it solve an error?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it was to stay consistent with my changes when I used to cast the projects and sites into strings but it doesn't affect functionality so it can removed.

if (!empty($examiner_check) && !is_null($examiner_check)) {
$examiner_info = [];

if (!empty($examiner_check)&& !is_null($examiner_check)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add back the space before &&

@christinerogers
Copy link
Contributor

Notes from Oct. 25 EEG meeting discussion :

  • hide Project Affiliations: 1 and Site Affiliations: 1 elements -- just leave the one drop-down.
  • Limit the height of the drop-down, make it scrollable -- see Laetitia
  • add a screenshot to show what it looks like with multiple site and multiple projects
  • add note in the PR header to explain why changes (very important for merge)

);
} else {
return $this->userInfo[$var];
return $this->userInfo[$var] ?? null;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain the reasoning behind this change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it's to prevent an error if the key doesn't exist in the userinfo.

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.

3 participants