-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connect backend and frontend for convert hearing type page #15314
Conversation
Generated by 🚫 Danger |
Code Climate has analyzed commit 69926a5 and detected 0 issues on this pull request. View more on Code Climate. |
@@ -106,6 +106,8 @@ def update | |||
render json: { | |||
tasks: tasks_hash | |||
} | |||
rescue ActiveRecord::RecordInvalid => error | |||
invalid_record_error(error.record) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was using this to test the error handling code on the frontend. I figured it probably makes sense to always JSONify any validation errors, so I kept it in the PR.
travel: "T", | ||
central: "C" | ||
}.freeze | ||
REQUEST_TYPES = Constants::HEARING_REQUEST_TYPES.with_indifferent_access.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved these mappings to a JSON constants file so the frontend would have access to them too.
|
||
// Depending on where this component is used, the *FullName fields will be available. | ||
// If they aren't, the *FirstName/*LastName fields should be available. | ||
const appellantName = hearing?.appellantIsNotVeteran ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this based on the appellantIsNotVeteran
flag, which is how we determine whether or not to use appellant vs. veteran in other places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks thats a much better way to check
@@ -126,9 +126,3 @@ export const HEARING_CONVERSION_TYPES = [ | |||
'change_email_or_timezone', | |||
'change_hearing_time' | |||
]; | |||
|
|||
export const HEARING_REQUEST_TYPES = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this and preferred directly importing VIDEO_HEARING
, CENTRAL_OFFICE_HEARING
, and VIRTUAL_HEARING
. We declare these kinds of mappings in a bunch of different places, so I'm trying to consolidate where possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I tested both scenarios and when geomatched it does show the regional office and when not it shows the correct text. There is just one issue I noticed and that is when the hearing is converted to travel, I need to refresh the page in order to see the hearing type change to "Virtual"
530f91b
to
2ac01b3
Compare
It looks like this is an issue because the appeal never gets refreshed after the change is made. I updated the submit call to delete the appeal from the store, which forces the case details page to do a full reload of the appeals data. Commit: 2ac01b3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolves [CASEFLOW-210](https://vajira.max.gov/browse/CASEFLOW-210) ### Description Gives Hearing Coordinators the ability to convert the hearing request type on any appeal applying the same workflow as was used to convert Travel Board request types implemented in #15314. ### Acceptance Criteria - [ ] Code compiles correctly - [ ] Users are able to successfully convert hearing request types from Central Office/Video to Virtual ### Testing Plan 1. Shadow user `BVASYELOW`: http://localhost:3000/test/users 2. Navigate to the hearing schedule: http://localhost:3000/hearings/schedule 3. Click the "Schedule Veterans" button 4. Search for "St. Petersburg, FL" in the Regional Office dropdown and navigate to the "AMA Veterans Waiting" tab 5. Select 1 of the Veterans from the list to navigate to their case details page 6. Once the case details page loads, check the actions dropdown for the Convert to Virtual Hearing action and select that 7. Review the conversion page and based on whether you selected the Central Office or another regional office, you should see a message at the top indicating in which queue this request will be 8. Click the Convert to Virtual Hearing button 9. Ensure you receive a success banner and that the action to Convert to Virtual Hearing is no longer available 10. Ensure that the Hearing Request type in the claims header now says Virtual 11. Scroll down and check that there is a ChangeHearingRequestType indicating the conversion 12. Scroll back up and click the Schedule Veteran action and ensure that the Virtual option is preselected ### Code Documentation Updates - [x] Add or update code comments at the top of the class, module, and/or component. ### Database Changes *Only for Schema Changes* * [x] Column comments updated * [x] Verify that `migrate:rollback` works as desired ([`change` supported functions](https://edgeguides.rubyonrails.org/active_record_migrations.html#using-the-change-method)) * [x] DB schema docs updated with `make docs` (after running `make migrate`) * [x] #appeals-schema notified with summary and link to this PR
Resolves #15159
Description
HearingTypeConversion
component which wraps theHearingTypeConversionForm
Acceptance Criteria
ChangeHearingRequestTypeTask
shows the non-modal "Convert Hearing to Virtual" form (created in Non-modal form for converting travel board request type to virtual #15217)Testing Plan
N/A
User Facing Changes
Note: The task tree is a bit messed up because I was reusing the same appeal over and over again. When I completed the task the first time, it unlocks the schedule hearing task. From there, I was able to schedule the appeal, which is why you see the select hearing disposition task in the screencap.
Code Documentation Updates
Storybook Story
For Frontend (Presentationa) Components
MyComponent.stories.js
alongsideMyComponent.jsx
)