-
Notifications
You must be signed in to change notification settings - Fork 66
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
101426 update AppointmentsController#fetch_drive_times #20510
base: master
Are you sure you want to change the base?
Conversation
…/long from user's vet360 data
…y string if user's lat/long are unavailable
@@ -380,6 +380,10 @@ def fetch_provider_slots | |||
end | |||
|
|||
def fetch_drive_times(provider) | |||
user_address = current_user.vet360_contact_info&.residential_address | |||
|
|||
return '' unless user_address&.latitude && user_address.longitude |
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.
this looks good. I'm curious how this will get serialized and show up in the response to front-end...should we add a request spec for it, if one doesn't exist already?
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.
actually, the specs might be a part of department-of-veterans-affairs/va.gov-team#101428 that @devin-mccurdy is working on. if that's the case, this looks good
@@ -380,6 +380,10 @@ def fetch_provider_slots | |||
end | |||
|
|||
def fetch_drive_times(provider) | |||
user_address = current_user.vet360_contact_info&.residential_address | |||
|
|||
return '' unless user_address&.latitude && user_address.longitude |
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.
actually, the specs might be a part of department-of-veterans-affairs/va.gov-team#101428 that @devin-mccurdy is working on. if that's the case, this looks good
Summary
address
attribute, but that data is obtained from the MPI service and does not include lat/long. Instead we can obtain the lat/long from the user'svet360_contact_info
data if available.Related issue(s)
department-of-veterans-affairs/va.gov-team#101426
Testing done
Acceptance criteria
Requested Feedback
As per John W, return an empty string if the user's lat/long are not available.