Recidiviz / justice-counts

Technical infrastructure for the Justice Counts initiative
GNU General Public License v3.0
2 stars 0 forks source link

[Superagencies][3/n] Add toggle for child agencies in Explore Data #1276

Closed lilidworkin closed 7 months ago

lilidworkin commented 8 months ago

Now that we're saving the right data in Agency Store, no matter where we are in the app, if the user is logged into to a superagency, we should know which child agencies belong to that superagency.

We'd like to add a dropdown on the Explore Metrics page that looks like this Figma. Note that you should look at the second Figma, the one that says "Old Explore Data UI", since we have not made the update yet.

The dropdown should only appear if the current agency is a superagency, and it should be populated with that agency's child agencies in alphabetical order. It should also be searchable.

When the user selects a child agencies, the page should behave similar to what would happen just like if the user had used the menu in the top left to switch to that child agency (but only this page is refreshed).

If the child agencies differ in the systems they belong to -- for instance if some of the child agencies belong to Law Enforcement and some to Courts -- we want to add sections to the dropdown and group the child agencies by which systems they belong to. They should be sorted alphabetically within each section. Reach out to @mxosman and @forrestkim00 when you get to this part for more clarity!