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
283 stars 204 forks source link

Facility phone number issue on locations page #96156

Open outerpress opened 2 weeks ago

outerpress commented 2 weeks ago

Summary

Describe what went wrong

On the choose a location page we have logic display an additional info section "Why isn't my facility listed". I noticed on staging that the phone numbers listed have too many numbers. I don't know if this issue is in prod, or is a staging data issue.

Image

Specs

Steps to Reproduce

Test User:

  1. Go to staging.va.gov
  2. Log in as Royal Tester
  3. Start scheduling a new amputation care appointment
  4. Navigate to the Choose a Location page
  5. Open the additional info "Why isn't my facility listed"

Actual Result

Describe what happened that was unexpected or undesired; including screenshots is encouraged

staging.va.gov_my-health_appointments_schedule_location.png

Desired Result

Describe what was supposed to happen; reference existing Github issue that contains a solution if possible

The phone number should be formatted correctly. If it includes an extension, that should be indicated.

Definition of Done


How to configure this issue

jenniemc commented 3 days ago

Add the logic to check for the "main" phone extensions.

The github ticket below inadvertently removed the constant array that separates the phone number from the extension. I incorrectly assumed that main phone numbers do not contain extension. https://github.com/department-of-veterans-affairs/vets-website/pull/30969/files/1a1aae9e816eceac1984235842ad94bbff8c5296#diff-f21fbf3645ef0c13c3ae92e275c5c7cdcd381fbccb4fd520515da4d9637bc85d

Phone object returned for Cheyenne VA Mobile Clinic

{
    "main": "307-778-7550 x3816",
    "fax": "307-778-7381",
    "pharmacy": "866-420-6337",
    "afterHours": "307-778-7550",
    "patientAdvocate": "307-778-7550 x7573",
    "enrollmentCoordinator": "307-778-7550 x7579"
}