department-of-veterans-affairs / va.gov-team

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
281 stars 198 forks source link

Select Accredited Representative #91077

Open oddball-lindsay opened 1 month ago

oddball-lindsay commented 1 month ago

Issue Description

This screen allows users to select the representative they'd like to appoint. The search results are powered by our new accredited_entities_for_appoint endpoint, which has been built/tested locally over in https://github.com/department-of-veterans-affairs/va.gov-team/issues/82840.

The Select Accredited Representative page will be available to all users:

  1. Authenticated and unauthenticated Veteran users
  2. Authenticated and unauthenticated non-Veteran users
  3. 21-22 and 21-22a forms

If the user selects:

  1. An attorney/claims agent, complete section 16 of the 21-22a:
    1. Field 16a: representative name
    2. Field 16b: representative type
    3. Field 16 c,d,e: representative contact information, as it exists in the database
  2. A VSO representative that is only accredited with a single organization, complete field 15 of the 21-22:
    1. Field 15: Veteran Service Organization name

URL: /representative-select

Previous path: /claimant-type

Next paths:

  1. /representative-contact

MVP Planning Mural

Designs

Prototype, Canvas, Annotations

There are a few states to consider:

  1. Initial state
  2. Search results state
  3. No search results state (not in Prototype)
  4. Organization search results (not in Prototype)

And a couple of things to keep in mind... Initial state:

  1. We talked about having a minimum character input of 2 characters. I believe the backend is enforcing this, but we could have an error state on the frontend too to give that feedback to users.

Search results state:

  1. The "Select this representative" button on search results cards are what advances to the next path. We have an error state (last screenshot) which will come into play if a user tries to click "Continue", as they need to select a representative here.
  2. When showing the individual search results, VSO representatives may have associated organizations to show. I don't believe we have this "organization association" concept for attorneys/claims agents.
  3. We are only showing the top 10 matches for the search input (no pagination), the backend should be operating with a higher trigram threshold so we don't anticipate more than 10 search results if the full name is searched.
  4. This is likely an edge case, but there could be a scenario where search results contain a mix of both individual and organization results. (E.g. searching "Dale" or "Graham" could bring up individual representatives named "Dale" or "Graham", but the VSO "Dale K. Graham Veterans Foundation" could also come up)
Screenshots #### Initial State image.png image.png #### Individual search results image.png image.png #### Organization search results image.png #### No search results image.png #### Empty search image.png image.png #### Error state image.png image.png

Tasks

Acceptance Criteria

cosu419 commented 3 weeks ago

8/27 update - VASearchInput component doesn't function properly within a form flow and needs to be implemented as a custom component.

cosu419 commented 3 weeks ago

8/29 update - Linked initial PR for this screen.

oddball-lindsay commented 2 weeks ago

Remaining things: styling and search results

Once this ticket is completed, the team can divide and conquer other screens in this chapter.

cosu419 commented 4 days ago

9/16 update: about to wrap up the final PR on this ticket

cosu419 commented 1 day ago

@mtri ready for review. Getting the error message not to wrap the results is going to take some refactoring, but let me know what else you find.

mtri commented 1 day ago

Thanks!