Recidiviz / justice-counts

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

[Publisher][Superagencies] Update Home page for superagencies to display list of child agencies, their sectors and editable Upload IDs #1349

Closed mxosman closed 5 months ago

mxosman commented 6 months ago

The goal is to allow superagencies to view a list of their child agencies along with their sectors and Upload IDs (a.k.a. custom names - which they should be able to update). This list should be searchable, sortable and filterable based on selected sectors.

*Note that this will be an entirely new flow for superagencies - instead of showing them the current home page (w/ "See open tasks"), their home page will be this new feature.

Design (w/ notes from Forrest): Figma

Relevant files: HomeStore.ts, Home.tsx

We'll need to create a new PUT request to the /admin/agency/<child_agency_id>/custom-name endpoint to allow users to update their child agency's Upload ID/custom name.

The /api/home endpoint should return a response that includes a child_agencies property, which itself should include all the properties needed to power this page:

child_agencies: [ 
  ...
    {
        "custom_child_agency_name": "Test 1",
        "id": 371,
        "name": "AAB DELETE",
        "systems": [
            "LAW_ENFORCEMENT",
            "PROSECUTION",
            "PROBATION"
        ]
    }
  ...
]

Please let me know if you have any questions at all - and also feel free to use reasonably supported libraries that would make implementing search/dropdowns/pagination/tables easier.

mxosman commented 5 months ago

Hi @nasaownsky! I re-pinged design this morning and should hopefully have more clarification by end of day today - but, I'm strongly leaning towards the first dropdown being a simple search input filter. For now, I think we can proceed with the other dropdown (the sector filter) - and by EOD a final decision on the first dropdown. :)

nasaownsky commented 5 months ago

Hi @mxosman! I actually liked your idea so much, that I made this search filter to present to other people, so they can play with it and see if this change is practical or not. So please check it out!

mxosman commented 5 months ago

Hi @mxosman! I actually liked your idea so much, that I made this search filter to present to other people, so they can play with it and see if this change is practical or not. So please check it out!

Oh wow - thank you so much, @nasaownsky - much appreciated! Will check this out!

morden35 commented 5 months ago

@mxosman can I move this ticket to the "In Progress" pipeline?

mxosman commented 5 months ago

@mxosman can I move this ticket to the "In Progress" pipeline?

Absolutely, @morden35 - thank you so much!