LG-16371 Use constants for idv document types#12398
Conversation
edcf4e7 to
e017962
Compare
e017962 to
86f91bf
Compare
There was a problem hiding this comment.
should we have Idp::Constants:DocumentTypes::STATE_ID_CARD here?
There was a problem hiding this comment.
I wasn't sure if this should be a constant or not. Maybe it should be the value that we send when you select state_id on the choose_id_type page.
There was a problem hiding this comment.
After a quick trace through where this method is called and ends up, we can take two paths:
The quick path would be to make a constant for state_id no card.
The other path would be to investigate all the uses of idType in the react portion of document capture. Starting at app/javascript/packages/document-capture/context/upload.tsx
There was a problem hiding this comment.
Looking into the latter today.
There was a problem hiding this comment.
I am actually wondering if it make more sense to use drivers_license here instead... That is the type that can be selected on the choose_id_type page. Thoughts?
AShukla-GSA
left a comment
There was a problem hiding this comment.
Agreed with earlier thread by alex, but otherwise LGTM
9004f07 to
7af7809
Compare
solipet
left a comment
There was a problem hiding this comment.
This is a HUGE improvement! I left a few optional suggestions - your choice.
app/forms/idv/choose_id_type_form.rb
Outdated
There was a problem hiding this comment.
nit
| `choose_id_type` #{@chosen_id_type} is invalid, | |
| `chosen_id_type` #{@chosen_id_type} is invalid, |
There was a problem hiding this comment.
Maybe use the constants here?
| ['passport', 'state_id_card', 'drivers_license'].each do |id_type| | |
| [ | |
| Idp::Constants::DocumentTypes::PASSPORT, | |
| Idp::Constants::DocumentTypes::STATE_ID_CARD, | |
| Idp::Constants::DocumentTypes::DRIVERS_LICENSE, | |
| ].each do |id_type| |
[skip changelog]
There was a problem hiding this comment.
I talked to @solipet about this change and at the end of our conversation we felt that this value should be state_id_card. So I am reverting this commit
d42dc11 to
ea5b1fd
Compare
🎫 Ticket
Link to the relevant ticket:
LG-16371
🛠 Summary of changes
Create constants for idv document types
📜 Testing Plan