codeforpdx / recordexpungPDX

A project to automate the expungement of qualifying criminal records in Oregon. This project is done in conjunction with Qiu-Qiu Law.
https://recordsponge.com
MIT License
52 stars 88 forks source link

Provide alternative search summary display #1652

Closed monocle closed 1 year ago

monocle commented 1 year ago

On visiting last Friday, @michaelzhang43 thought it would be helpful to have a search summary display that was sorted by case. It would be a condensed form of the displayed cases.

Current Search Summary

image

More info needed

@michaelzhang43

image image

The top line has: case date, case number. Clicking on the case number scrolls down to the case details.

The changes can be seen here https://monocle.github.io/recordexpungPDX/

Just navigate to the demo.

(Note some things, like the icons, are broken due to how I'm hosting it. But at least you can see and click things as a webpage.)

monocle commented 1 year ago

Related to this component, currently when the search results come up empty, the Generate Paperwork button is still present. If the user clicks the button, an error message is displayed:

image

Since I'm refactoring this component, should we just hide the button when the search results are empty?

KentShikama commented 1 year ago

Note that you can manually add cases and so if there is no search results but a case is manually added, then we still should show the paperwork generation button.

hmarcks commented 1 year ago

I think both options should be visible, maybe something like this:

Screenshot 2023-01-17 at 11 10 46 PM
monocle commented 1 year ago

Here's where I'm at now with the new display.

image image

The date I'm displaying is the top level date field for CaseData:

https://github.com/codeforpdx/recordexpungPDX/blob/77cccb450e7ce11b80922c950ea441846891c127/src/frontend/src/components/RecordSearch/Record/types.ts#L20-L30

@KentShikama is this the arrest date? (@michaelzhang43 asked me, but I couldn't figure that out.)

@hmarcks What are your thoughts on the eligibility "badges"

image

especially since #1656 will be adding more eligibility types that are longer. This is the styling I'm using

image

If you know how to get rid of the extra space on the right side of the blue badge, please let me know.

KentShikama commented 1 year ago

@monocle It might be worth studying the scraper a bit. And the OECI site - as in what the raw display looks like (@michaelzhang43 can help you there). The arrest date is attached to the charge. The case date is separate. A case has zero or more charges. See https://github.com/codeforpdx/recordexpungPDX/blob/77cccb450e7ce11b80922c950ea441846891c127/src/backend/expungeservice/crawler/crawler.py#L138 for the relevant line.

hmarcks commented 1 year ago

@monocle I think the badges look good. One thing to consider is maybe making "Eligible now if balance paid" green as well, thanks!