Skip to content

Added bodies to the list view and graph view#203

Open
NethmikaKekuu wants to merge 8 commits into
LDFLK:mainfrom
NethmikaKekuu:feat/ac-bodies-departments
Open

Added bodies to the list view and graph view#203
NethmikaKekuu wants to merge 8 commits into
LDFLK:mainfrom
NethmikaKekuu:feat/ac-bodies-departments

Conversation

@NethmikaKekuu

Copy link
Copy Markdown
Member

This closes #174

Summary

  • Adds a third drill-down level — Bodies — to the Ministries → Departments & People stepper, so selecting a department now shows the bodies under it (with a Bodies/People pill toggle, matching the existing Departments/People pattern).
  • Extracts the repeated breadcrumb title+badge markup and the departments/people toggle into two new reusable components: HierarchyEntry and PillTabToggle, plus a HierarchyConnector for the visual link between stepper levels.
  • Wires up department selection end-to-end: clicking a department sets it in the URL (?department=), restores it on reload, and clicking the department name in the stepper breadcrumb jumps back to the department list.
  • Adds a mocked getBodiesByDepartment API (mockBodiesData.js, useBodiesByDepartment.js) as a placeholder until the real bodies endpoint exists.
  • Each department card carries a single link icon in its corner (linking to /department-profile/:id), and the Bodies view shows one shared "History" link next to the pill toggle rather than duplicating it per tile.

Test plan

  • Select a ministry → department → verify the Bodies step appears and lists mock bodies for that department
  • Confirm the department link icon and the Bodies "History" link both navigate to /department-profile/:id
  • Reload the page with ?ministry= and ?department= params set — verify the stepper restores to the correct step
  • Click the ministry/department breadcrumb names to confirm back-navigation works at each level

@gemini-code-assist gemini-code-assist Bot left a comment

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.

Code Review

This pull request introduces a third level of hierarchy ('Bodies') under departments in the organization view. It adds mock data, a query hook, and new UI components (HierarchyConnector, HierarchyEntry, and BodyTab) to display bodies, while updating MinistryCardGrid, DepartmentTab, GraphComponent, and Drawer to support navigation, breadcrumbs, and interactive graph nodes for bodies. The review feedback highlights several critical improvements: fixing a back-navigation bug in GraphComponent where the 'ministry' URL parameter is unconditionally deleted, properly cleaning up the abort signal listener in getBodiesByDepartment to prevent memory leaks, adding safe fallbacks for selectedPresident in BodyTab to avoid potential crashes, correcting an invalid CSS value ('none') in MinistryCardGrid, and ensuring consistent capitalization of the 'Poppins' font family.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/pages/OrganizationPage/components/graphComponent.jsx Outdated
Comment thread src/services/services.jsx
Comment thread src/pages/OrganizationPage/components/BodyTab.jsx
Comment thread src/pages/OrganizationPage/components/BodyTab.jsx Outdated
Comment thread src/pages/OrganizationPage/components/MinistryCardGrid.jsx Outdated
Comment thread src/components/HierarchyEntry.jsx Outdated
Comment thread src/components/HierarchyEntry.jsx Outdated
@NethmikaKekuu
NethmikaKekuu force-pushed the feat/ac-bodies-departments branch from b222a63 to 0d81c63 Compare July 24, 2026 06:33
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.

[Body View] Create the UI for Bodies under departments

1 participant