diff --git a/src/site/components/phone.drupal.liquid b/src/site/components/phone.drupal.liquid index b04121d7a3..9104a7cff6 100644 --- a/src/site/components/phone.drupal.liquid +++ b/src/site/components/phone.drupal.liquid @@ -48,4 +48,4 @@ {% endfor %} {% endif %} -{% endif %} +{% endif %} \ No newline at end of file diff --git a/src/site/facilities/health_care_local_health_service.drupal.liquid b/src/site/facilities/health_care_local_health_service.drupal.liquid index 23d0811c8b..e71e0a9d81 100644 --- a/src/site/facilities/health_care_local_health_service.drupal.liquid +++ b/src/site/facilities/health_care_local_health_service.drupal.liquid @@ -1,102 +1,7 @@ -

Contact information

- {% for location in locations %} {% include "src/site/paragraphs/service_location.drupal.liquid" with - single = location.entity - isMentalHealth = isMentalHealthService - serviceLocationSubHeaderLevel = 5 + single = location.entity + isMentalHealth = isMentalHealthService + serviceLocationSubHeaderLevel = 4 %} {% endfor %} - -{% if locationEntity.fieldReferralRequired or locationEntity.fieldWalkInsAccepted or locationEntity.fieldOnlineSchedulingAvailabl %} -
Appointments
- - {% assign introText = 'Contact us to schedule, reschedule, or - cancel your appointment. If a referral is required, you’ll need to contact your - primary care provider first.' - %} - - {% case locationEntity.fieldHserviceApptIntroSelect %} - {% when 'custom_intro_text' %} - {% if locationEntity.fieldHserviceApptLeadin != empty %} - {% assign introText = locationEntity.fieldHserviceApptLeadin %} - {% endif %} - {% when 'no_intro_text' %} - {% assign introText = '' %} - {% endcase %} - - {% if introText != empty %} -

- {{ introText }} -

- {% endif %} - - - {% comment %} - if fieldPhoneNumbersParagraph has values - use phone numbers from entities - {% endcomment %} - {% if locationEntity.fieldPhoneNumbersParagraph.length > 0 %} -
- {% for number in locationEntity.fieldPhoneNumbersParagraph %} - {% include "src/site/components/phone-number.drupal.liquid" with - phoneNumber = number.entity.fieldPhoneNumber - phoneExtension = number.entity.fieldPhoneExtension - phoneLabel = number.entity.fieldPhoneLabel - phoneHeaderLevel = 5 - sms = false - fax = false - tty = false - %} - {% endfor %} -
- {% else %} - {% if isMentalHealthService and fieldMentalHealthPhone %} - {% assign localHealthServiceMainNumber = fieldMentalHealthPhone %} - {% else %} - {% assign localHealthServiceMainNumber = fieldPhoneNumber %} - {% endif %} - -
- {% include "src/site/components/phone-number.drupal.liquid" with - phoneNumber = localHealthServiceMainNumber - phoneLabel = 'Main Phone' - phoneHeaderLevel = 5 - sms = false - fax = false - tty = false - %} -
- {% endif %} - - {% assign OMIT_REFERRAL_OR_WALKIN = "not_applicable, unknown" %} - - {% if locationEntity.fieldReferralRequired %} - {% unless OMIT_REFERRAL_OR_WALKIN contains locationEntity.fieldReferralRequired %} -

- Referral required? - {% if locationEntity.fieldReferralRequired == '1' %}Yes{% else %}No{% endif %} -

- {% endunless %} - {% endif %} - - {% if locationEntity.fieldWalkInsAccepted %} - {% unless OMIT_REFERRAL_OR_WALKIN contains locationEntity.fieldWalkInsAccepted %} -

- Walk-ins accepted? - {% if locationEntity.fieldWalkInsAccepted == '1' %}Yes{% else %}No{% endif %} -

- {% endunless %} - {% endif %} - - {% if locationEntity.fieldOnlineSchedulingAvailabl == '1' %} - - Schedule an appointment online - - {% endif %} -{% endif %} diff --git a/src/site/facilities/service_address.drupal.liquid b/src/site/facilities/service_address.drupal.liquid index 59be7f1164..3deb43ed36 100644 --- a/src/site/facilities/service_address.drupal.liquid +++ b/src/site/facilities/service_address.drupal.liquid @@ -1,3 +1,13 @@ +{% assign hasAddress = false %} +{% if serviceLocationAddress.fieldUseFacilityAddress and facilityAddress %} + {% assign hasAddress = true %} + {% assign addressData = facilityAddress %} +{% elsif location.entity.fieldServiceLocationAddress %} + {% assign hasAddress = true %} + {% assign addressData = location.entity.fieldServiceLocationAddress.entity.fieldAddress %} +{% endif %} + +{% if serviceLocationAddress.fieldClinicName or hasAddress or serviceLocationAddress.fieldBuildingNameNumber or serviceLocationAddress.fieldWingFloorOrRoomNumber %}
{% if serviceLocationAddress.fieldClinicName %} @@ -9,34 +19,32 @@ {% endif %} - {% comment %} - Include street address only if fieldUseFacilityAddress is false - {% endcomment %} - {% if serviceLocationAddress.fieldUseFacilityAddress == false %} - {% if serviceLocationAddress.fieldAddress.addressLine1 %} + + {% if hasAddress %} + {% if addressData.addressLine1 %} - {{ serviceLocationAddress.fieldAddress.addressLine1 }} + {{ addressData.addressLine1 }} {% endif %} - {% if serviceLocationAddress.fieldAddress.addressLine2 %} + {% if addressData.addressLine2 %} - {{ serviceLocationAddress.fieldAddress.addressLine2 }} + {{ addressData.addressLine2 }} {% endif %} - {% if serviceLocationAddress.fieldAddress.locality %} - {% if serviceLocationAddress.fieldAddress.administrativeArea%} - {% if serviceLocationAddress.fieldAddress.postalCode %} + {% if addressData.locality %} + {% if addressData.administrativeArea%} + {% if addressData.postalCode %} - {{ serviceLocationAddress.fieldAddress.locality }}, - {{ serviceLocationAddress.fieldAddress.administrativeArea }} - {{ serviceLocationAddress.fieldAddress.postalCode }} + {{ addressData.locality }}, + {{ addressData.administrativeArea }} + {{ addressData.postalCode }} {% endif %} {% endif %} {% endif %} - {% endif %} + {% endif %} {% comment %} hasAddress {% endcomment %} {% comment %} Always include building, wing, floor, etc. @@ -45,6 +53,7 @@ {{ serviceLocationAddress.fieldBuildingNameNumber }} + {% assign marginTop = 0 %} {% endif %} {% if serviceLocationAddress.fieldWingFloorOrRoomNumber %} @@ -52,4 +61,4 @@ {{ serviceLocationAddress.fieldWingFloorOrRoomNumber }} {% endif %} -
+ \ No newline at end of file diff --git a/src/site/facilities/vha_facility_nonclinical_service.drupal.liquid b/src/site/facilities/vha_facility_nonclinical_service.drupal.liquid index 509bc903b1..71831a5128 100644 --- a/src/site/facilities/vha_facility_nonclinical_service.drupal.liquid +++ b/src/site/facilities/vha_facility_nonclinical_service.drupal.liquid @@ -1,8 +1,13 @@ +{% if facility.locations.length >= 1 %} + {% assign typeOfLocation = "nonclinical" %} +{% endif %} + {% for location in facility.locations %} {% include "src/site/paragraphs/service_location.drupal.liquid" with single = location.entity fieldPhoneNumber = facility.fieldPhoneNumber fieldOfficeHours = facility.fieldOfficeHours serviceLocationSubHeaderLevel = serviceLocationSubHeaderLevel + typeOfLocation = typeOfLocation %} {% endfor %} diff --git a/src/site/facilities/vha_facility_nonclinical_services.drupal.liquid b/src/site/facilities/vha_facility_nonclinical_services.drupal.liquid index 46904bb49b..58526d3c5e 100644 --- a/src/site/facilities/vha_facility_nonclinical_services.drupal.liquid +++ b/src/site/facilities/vha_facility_nonclinical_services.drupal.liquid @@ -1,10 +1,11 @@ {% if facilities %} + {% assign nonClinicalSubHeaderLevel = nonClinicalHeaderLevel | plus: 1 %} {% for facility in facilities %} -

+ {{ facility.entityLabel }} -

+ {% comment %} Facility Address @@ -25,15 +26,13 @@ {% endif %} {% if facilityAddress.locality and facilityAddress.administrativeArea and facilityAddress.postalCode %} - {{ facilityAddress.locality }}, {{ facilityAddress.administrativeArea}} {{ facilityAddress.postalCode }} + {{ facilityAddress.locality }}, {{ facilityAddress.administrativeArea }} {{ facilityAddress.postalCode }} {% endif %} {% endif %} - {% include "src/site/facilities/vha_facility_nonclinical_service.drupal.liquid" with - facility = facility - serviceLocationSubHeaderLevel = 4 + {% include "src/site/facilities/vha_facility_nonclinical_service.drupal.liquid" with facility = facility serviceLocationSubHeaderLevel = nonClinicalSubHeaderLevel %} {% endfor %} -{% endif %} +{% endif %} \ No newline at end of file diff --git a/src/site/filters/liquid.js b/src/site/filters/liquid.js index 625c8674c2..6ace60f2a2 100644 --- a/src/site/filters/liquid.js +++ b/src/site/filters/liquid.js @@ -984,6 +984,20 @@ module.exports = function registerFilters() { } return accordions; }; + liquid.filters.shouldShowIconDiv = ( + fieldOfficeVisits, + fieldVirtualSupport, + fieldReferralRequired, + ) => { + if ( + (fieldOfficeVisits && fieldOfficeVisits !== 'no') || + (fieldVirtualSupport && fieldVirtualSupport !== 'no') || + fieldReferralRequired + ) { + return true; + } + return false; + }; liquid.filters.processCentralizedUpdatesVBA = fieldCcGetUpdatesFromVba => { if (!fieldCcGetUpdatesFromVba || !fieldCcGetUpdatesFromVba.fetched) @@ -1696,6 +1710,37 @@ module.exports = function registerFilters() { liquid.filters.deriveMostRecentDate = deriveMostRecentDate; + // from the matrix of when to show Service Location Appointments header and text + liquid.filters.shouldShowServiceLocationAppointments = serviceLocation => { + const { + fieldVirtualSupport: virtualSupport, + fieldOfficeVisits: officeVisits, + fieldApptIntroTextType: introTextType, + fieldApptIntroTextCustom: introTextCustom, + } = serviceLocation; + const baseYesConditions = ['yes_appointment_only']; + const yesOffice = [ + ...baseYesConditions, + 'yes_walk_in_visits_only', + 'yes_with_or_without_appointment', + ]; + const yesVirtual = [ + ...baseYesConditions, + 'yes_veterans_can_call', + 'virtual_visits_may_be_available', + ]; + const noVisitsAndCustomIntro = + !officeVisits && introTextType === 'customize_text' && introTextCustom; + const noVisitsAndDefaultInto = + !officeVisits && introTextType === 'use_default_text'; + return ( + yesVirtual.includes(virtualSupport) || + yesOffice.includes(officeVisits) || + noVisitsAndCustomIntro || + noVisitsAndDefaultInto + ); + }; + // Given an array of services provided at a facility, // return a flattened array of service locations that // offer service of type `serviceType` diff --git a/src/site/includes/health_services_listing_services.liquid b/src/site/includes/health_services_listing_services.liquid index ba932e7228..86e0f2549b 100644 --- a/src/site/includes/health_services_listing_services.liquid +++ b/src/site/includes/health_services_listing_services.liquid @@ -1,9 +1,9 @@ {% assign servicesList = clinicalHealthServices | filterBy: "fieldServiceNameAndDescripti.entity.fieldServiceTypeOfCare", typeOfCare, false %} -{% assign servicesListOrderedByName = servicesList | sortObjectsBy: "fieldServiceNameAndDescripti.entity.name"%} +{% assign servicesListOrderedByName = servicesList | sortObjectsBy: "fieldServiceNameAndDescripti.entity.name" %} {% if servicesListOrderedByName.length > 0 %}
-

{{typeOfCare}}

+

{{ typeOfCare }}

{% for service in servicesListOrderedByName %} @@ -16,4 +16,4 @@
-{% endif %} +{% endif %} \ No newline at end of file diff --git a/src/site/includes/vba_facilities/service_location.liquid b/src/site/includes/vba_facilities/service_location.liquid index 37195ce28a..1476c23f1b 100644 --- a/src/site/includes/vba_facilities/service_location.liquid +++ b/src/site/includes/vba_facilities/service_location.liquid @@ -73,10 +73,16 @@ {% endfor %} {% endif %} + {% if typeOfLocation == "vba" %} + {% assign scheduleAppointmentLink = "https://va.my.site.com/VAVERA/s/" %} + {% else %} + {% assign scheduleAppointmentLink = "/health-care/schedule-view-va-appointments" %} + {% endif %} +
{{ vbaServiceDescription | drupalToVaPath | phoneLinks }}

{% endif %} - {% if onlineSelfService.url %} + {% if onlineSelfService.title and onlineSelfService.url.path %}

Manage your benefits online

+

+ You always have the option to apply for and manage your VA benefits online. +

+

Release of Information office locations {% include "src/site/facilities/vha_facility_nonclinical_services.drupal.liquid" with facilities = medicalRecordsFacilities + nonClinicalHeaderLevel = 4 %} {% endif %} diff --git a/src/site/layouts/vamc_system_register_for_care.drupal.liquid b/src/site/layouts/vamc_system_register_for_care.drupal.liquid index b44a2f9893..b37b37c8ef 100644 --- a/src/site/layouts/vamc_system_register_for_care.drupal.liquid +++ b/src/site/layouts/vamc_system_register_for_care.drupal.liquid @@ -33,6 +33,7 @@ {% assign registerForCareFacilities = fieldOffice.entity.reverseFieldRegionPageNode.entities | healthCareRegionNonClinicalServiceLocationsByType: 'Register for care' %} {% include "src/site/facilities/vha_facility_nonclinical_services.drupal.liquid" with facilities = registerForCareFacilities + nonClinicalHeaderLevel = 3 %} {% endif %} diff --git a/src/site/paragraphs/alert.drupal.liquid b/src/site/paragraphs/alert.drupal.liquid index 52c75ef52f..0688316c11 100644 --- a/src/site/paragraphs/alert.drupal.liquid +++ b/src/site/paragraphs/alert.drupal.liquid @@ -38,6 +38,7 @@ data-entity-id="{{ entity.entityId }}" status="{{ alertType }}" class="vads-u-margin-top--3" + data-test-id="alert-{{ entity.targetId }}" uswds >

diff --git a/src/site/paragraphs/service_location.drupal.liquid b/src/site/paragraphs/service_location.drupal.liquid index e2e0764eed..056832c309 100644 --- a/src/site/paragraphs/service_location.drupal.liquid +++ b/src/site/paragraphs/service_location.drupal.liquid @@ -1,72 +1,242 @@ -{% include "src/site/facilities/service_address.drupal.liquid" with - serviceLocationAddress = single.fieldServiceLocationAddress.entity - serviceLocationAddressHeaderLevel = serviceLocationSubHeaderLevel -%} - -{% comment %} - single.fieldHours values: - - 0 = Use facility hours - - 1 = Do not specify hours - - 2 = Display specific hours -{% endcomment %} - -{% if single.fieldHours != "1" %} - Hours -{% endif %} - -{% case single.fieldHours %} - {% when '2' %} - {% if single.fieldOfficeHours %} - {% include "src/site/includes/hours.liquid" with allHours = single.fieldOfficeHours headerType = 'included' %} - {% endif %} - {% when '0' %} - {% if fieldOfficeHours %} - {% include "src/site/includes/hours.liquid" with allHours = fieldOfficeHours headerType = 'included' %} - {% endif %} -{% endcase %} - -{% if single.fieldAdditionalHoursInfo %} - {{ single.fieldAdditionalHoursInfo }} -{% endif %} - -{% comment %} +
+ {% assign serviceLocationH = serviceLocationSubHeaderLevel %} + {% if serviceHeader %} + + {{ serviceHeader }} + + {% comment %} Because serviceHeader should be lowest h-level of section {% endcomment %} + {% assign serviceLocationH = serviceLocationH | plus: 1 %} + {% assign hasPriorParagraph = true %} + {% endif %} + + {% if serviceDescription %} +

+ {{ serviceDescription | drupalToVaPath | phoneLinks }} +

+ {% assign hasPriorParagraph = true %} + {% endif %} + + + {% comment %} + possibly values for fieldOfficeVists + no + yes_appointment_only + yes_walk_in_visits_only + yes_with_or_without_appointment + {% endcomment %} + {% assign showIconDiv = single.fieldOfficeVisits | shouldShowIconDiv: single.fieldVirtualSupport, fieldReferralRequired %} + {% if showIconDiv %} +
+ {% if single.fieldOfficeVisits and single.fieldOfficeVisits != "no" %} +
+

+ + {% case single.fieldOfficeVisits %} + {% when "yes_appointment_only" %} + Visit our office, by appointment only + {% when "yes_walk_in_visits_only" %} + Visit our office, walk-in visits only + {% when "yes_with_or_without_appointment" %} + Visit our office, with or without an appointment + {% endcase %} +

+
+ {% endif %} + + {% comment %} + possibly values for fieldVirtualSupport + value: 'no' + value: yes_appointment_only + value: yes_veterans_can_call + value: virtual_visits_may_be_available + {% endcomment %} + {% if single.fieldVirtualSupport and single.fieldVirtualSupport != "no" %} +
+

+ {% case single.fieldVirtualSupport %} + {% when "yes_appointment_only" %} + Virtual visits by appointment only + {% when "yes_veterans_can_call" %} + Call at your convenience + {% when "virtual_visits_may_be_available" %} + Virtual visits may be available + {% endcase %} +

+
+ {% endif %} + + {% assign SL_OMIT_REFERRAL_OR_WALKIN = "not_applicable, unknown, 2" %} + + {% if fieldReferralRequired %} + {% unless SL_OMIT_REFERRAL_OR_WALKIN contains fieldReferralRequired %} +

+ {% case fieldReferralRequired %} + {% when "1" %} + A referral is required + {% when "0" %} + A referral is not required + {% endcase %} +

+ {% endunless %} + {% endif %} +
+ {% endif %} + + {% assign showAppointments = single | shouldShowServiceLocationAppointments %} + {% if showAppointments %} +
+ Appointments + {% if single.fieldApptIntroTextType != 'remove_text' %} + {% if single.fieldApptIntroTextType == 'customize_text' and single.fieldApptIntroTextCustom != empty %} +

{{ single.fieldApptIntroTextCustom | drupalToVaPath | phoneLinks }}

+ {% elsif single.fieldApptIntroTextType == 'use_default_text' %} +

+ Contact us to schedule, reschedule, or cancel your appointment. If a referral is required, + you’ll need to contact your primary care provider first. +

+ {% endif %} + {% endif %} +
+ {% endif %} + + {% comment %} Conditionally display facility phone number -{% endcomment %} - -{% if isMentalHealthService and fieldMentalHealthPhone %} - {% assign serviceLocationMainNumber = fieldMentalHealthPhone %} -{% else %} - {% assign serviceLocationMainNumber = fieldPhoneNumber %} -{% endif %} - -{% if serviceLocationMainNumber and single.fieldUseMainFacilityPhone %} - {% include "src/site/components/phone-number.drupal.liquid" with - phoneNumber = serviceLocationMainNumber - phoneLabel = 'Main Phone' - phoneHeaderLevel = serviceLocationSubHeaderLevel - sms = false - fax = false - tty = false - %} -{% endif %} - -{% comment %} - Display each additional phone number provided -{% endcomment %} -{% include "src/site/components/phone.drupal.liquid" with - numbers = single.fieldPhone - phoneHeaderLevel = serviceLocationSubHeaderLevel -%} - -{% if single.fieldEmailContacts %} - {% for email in single.fieldEmailContacts %} -

- {% if email.entity.fieldEmailLabel %} - {{ email.entity.fieldEmailLabel }} - {% endif %} - {{ email.entity.fieldEmailAddress }} - - {% endfor %} -{% endif %} + {% endcomment %} + {% if isMentalHealthService and fieldMentalHealthPhone %} + {% assign serviceLocationMainNumber = fieldMentalHealthPhone %} + {% elsif fieldPhoneNumber %} + {% assign serviceLocationMainNumber = fieldPhoneNumber %} + {% endif %} + + {% comment %} if there is a main phone number and it should be used for appointments {% endcomment %} + {% if serviceLocationMainNumber and single.fieldUseFacilityPhoneNumber %} +

+ {% include "src/site/components/phone-number.drupal.liquid" with + phoneNumber = serviceLocationMainNumber + phoneLabel = 'Main Phone' + phoneHeaderLevel = serviceLocationH + %} +
+ {% endif %} + {% if single.fieldOtherPhoneNumbers.length > 0 %} + {% comment %} other phone numbers {% endcomment %} +
+ {% for number in single.fieldOtherPhoneNumbers %} + {% include "src/site/components/phone-number.drupal.liquid" with + phoneNumber = number.entity.fieldPhoneNumber + phoneExtension = number.entity.fieldPhoneExtension + phoneLabel = number.entity.fieldPhoneLabel + phoneHeaderLevel = serviceLocationH + %} + {% endfor %} +
+ {% endif %} + + + + {% if single.fieldOnlineSchedulingAvail == "yes" %} +
+ {% if typeOfLocation == "vba" %} + {% assign scheduleAppointmentLink = "https://va.my.site.com/VAVERA/s/" %} + {% else %} + {% assign scheduleAppointmentLink = "/health-care/schedule-view-va-appointments" %} + {% endif %} + + + Schedule an appointment online + +
+ {% endif %} + + + + {% comment %} Includes header for clinic name {% endcomment %} + {% if single.fieldServiceLocationAddress.entity %} + {% include "src/site/facilities/service_address.drupal.liquid" with + serviceLocationAddress = single.fieldServiceLocationAddress.entity + serviceLocationAddressHeaderLevel = serviceLocationH + %} + {% endif %} + + {% if single.fieldUseMainFacilityPhone and serviceLocationMainNumber %} + {% comment %} + Display the main facility phone number + {% endcomment %} +
+ {% include "src/site/components/phone-number.drupal.liquid" with + phoneNumber = serviceLocationMainNumber + phoneLabel = 'Main Phone' + phoneHeaderLevel = serviceLocationH + %} +
+ {% endif %} + {% if single.fieldPhone.length > 0 %} + {% comment %} + Display each additional contact phone number provided + {% endcomment %} +
+ {% for number in single.fieldPhone %} + {% include "src/site/components/phone-number.drupal.liquid" with + phoneNumber = number.entity.fieldPhoneNumber + phoneExtension = number.entity.fieldPhoneExtension + phoneLabel = number.entity.fieldPhoneLabel + phoneHeaderLevel = serviceLocationH + %} + {% endfor %} +
+ {% endif %} + + {% if single.fieldEmailContacts %} + {% for email in single.fieldEmailContacts %} +

+ {% if email.entity.fieldEmailLabel %} + {{ email.entity.fieldEmailLabel }} + {% endif %} + {{ email.entity.fieldEmailAddress }} + +

+ {% endfor %} + {% endif %} + + {% comment %} + single.fieldHours values: + - 0 = Use facility hours + - 1 = Do not specify hours + - 2 = Display specific hours + {% endcomment %} + + {% if single.fieldHours != "1" %} + Service Hours + {% endif %} + {% if single.fieldHours != empty %} +
+ {% case single.fieldHours %} + {% when '2' %} + {% if single.fieldOfficeHours %} + {% include "src/site/includes/hours.liquid" with allHours = single.fieldOfficeHours headerType = 'included' %} + {% endif %} + {% when '0' %} +

+ The service hours are the same as our facility hours. +

+ {% endcase %} +
+ {% endif %} + {% if single.fieldAdditionalHoursInfo %} +

+ {{ single.fieldAdditionalHoursInfo }} +

+ {% endif %} +
diff --git a/src/site/paragraphs/tests/vamc/template/fixtures/health_care_local_facility.json b/src/site/paragraphs/tests/vamc/template/fixtures/health_care_local_facility.json new file mode 100644 index 0000000000..da5f1ed4e3 --- /dev/null +++ b/src/site/paragraphs/tests/vamc/template/fixtures/health_care_local_facility.json @@ -0,0 +1,654 @@ +{ + "entityBundle": "health_care_local_facility", + "entityId": "2263", + "entityPublished": true, + "title": "Washington VA Medical Center", + "vid": 841445, + "fieldFacilityLocatorApiId": "vha_688", + "fieldIntroText": "Our hospital provides primary care and specialty health services, including bariatric surgery, mental health care, palliative and hospice care, suicide prevention, women’s health care, and more. Below, you’ll find our address and hours, parking and transportation information, and the other health services we offer at Washington DC VA Medical Center. ", + "fieldSupplementalStatus": null, + "fieldSupplementalStatusMoreI": null, + "fieldOperatingStatusFacility": "normal", + "fieldAddress": { + "addressLine1": "50 Irving Street, Northwest", + "locality": "Washington", + "administrativeArea": "DC", + "postalCode": "20422-0001" + }, + "fieldPhoneNumber": "202-745-8000", + "fieldMentalHealthPhone": "202-745-8000, ext. 58156", + "fieldOfficeHours": [ + { + "day": 0, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 1, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 2, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 3, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 4, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 5, + "starthours": null, + "endhours": null, + "comment": "24/7" + }, + { + "day": 6, + "starthours": null, + "endhours": null, + "comment": "24/7" + } + ], + "fieldMainLocation": true, + "fieldLocalHealthCareService": [ + { + "entity": { + "status": true, + "fieldServiceLocation": [ + { + "entity": { + "fieldOnlineSchedulingAvail": "yes", + "fieldUseFacilityPhoneNumber": false, + "fieldOtherPhoneNumbers": [ + { + "entity": { + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel", + "fieldPhoneExtension": "option 2", + "fieldPhoneLabel": "COVID-19 appointment line " + } + } + ], + "fieldOfficeVisits": "yes_appointment_only", + "fieldApptIntroTextType": "customize_text", + "fieldApptIntroTextCustom": "COVID-19 vaccine appointments are available at your primary care clinic. A primary care clinic will be assigned if you do not already have one. Call 202-745-8000, option 2, to schedule an appointment. ", + "status": true, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldClinicName": null, + "fieldBuildingNameNumber": null, + "fieldWingFloorOrRoomNumber": null, + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "additionalName": null, + "administrativeArea": "", + "postalCode": "", + "locality": "", + "organization": null, + "dependentLocality": null, + "countryCode": "US", + "sortingCode": null + } + } + }, + "fieldEmailContacts": [], + "fieldOfficeHours": [ + { + "day": 1, + "starthours": 800, + "endhours": 1600, + "comment": "" + }, + { + "day": 2, + "starthours": 800, + "endhours": 1600, + "comment": "" + }, + { + "day": 3, + "starthours": 800, + "endhours": 1600, + "comment": "" + }, + { + "day": 4, + "starthours": 800, + "endhours": 1600, + "comment": "" + }, + { + "day": 5, + "starthours": 800, + "endhours": 1600, + "comment": "" + } + ], + "fieldHours": "2", + "fieldAdditionalHoursInfo": null, + "fieldPhone": [], + "fieldUseMainFacilityPhone": true + } + } + ], + "fieldReferralRequired": "0", + "fieldAdministration": { + "entity": { + "name": "VA Washington DC health care", + "entityId": "214" + } + }, + "fieldRegionalHealthService": { + "entity": { + "status": true, + "entityBundle": "regional_health_care_service_des", + "fieldBody": { + "processed": "\n

Learn more about COVID-19 vaccines at VA

\n" + }, + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "321", + "entityBundle": "health_care_service_taxonomy", + "fieldAlsoKnownAs": null, + "fieldCommonlyTreatedCondition": "coronavirus, COVID-19", + "name": "COVID-19 vaccines", + "description": { + "processed": "We offer COVID-19 vaccines to all Veterans enrolled in VA health care. This includes Veterans who live or travel outside of the U.S. and are eligible for the VA Foreign Medical Program." + }, + "fieldTricareDescription": "We offer COVID-19 vaccines to TRICARE enrollees and DoD employees. ", + "parent": [ + { + "entity": null + } + ], + "fieldHealthServiceApiId": "covid19Vaccine" + } + } + } + } + } + }, + { + "entity": { + "status": true, + "fieldServiceLocation": [ + { + "entity": { + "fieldOnlineSchedulingAvail": "yes", + "fieldUseFacilityPhoneNumber": false, + "fieldOtherPhoneNumbers": [ + { + "entity": { + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel", + "fieldPhoneExtension": "58270", + "fieldPhoneLabel": "Audiology and Speeh Clinic" + } + } + ], + "fieldOfficeVisits": "yes_with_or_without_appointment", + "fieldApptIntroTextType": "customize_text", + "fieldApptIntroTextCustom": "Speech and specialized audiology appointments require referrals. Walk-in hearing aid assistance is available daily from 10 a.m. to 4 p.m. Call to schedule all other appointments at this clinic. ", + "status": true, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldClinicName": "Audiology and Speech Clinic", + "fieldBuildingNameNumber": "Building 6", + "fieldWingFloorOrRoomNumber": "Room 1H-100", + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "additionalName": null, + "administrativeArea": "", + "postalCode": "", + "locality": "", + "organization": null, + "dependentLocality": null, + "countryCode": "US", + "sortingCode": null + } + } + }, + "fieldEmailContacts": [], + "fieldOfficeHours": [ + { + "day": 1, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 2, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 3, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 4, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 5, + "starthours": 730, + "endhours": 1600, + "comment": "" + } + ], + "fieldHours": "2", + "fieldAdditionalHoursInfo": null, + "fieldPhone": [ + { + "entity": { + "fieldPhoneExtension": "58270", + "fieldPhoneLabel": "Audiology and Speech Clinic", + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel" + } + } + ], + "fieldUseMainFacilityPhone": false + } + } + ], + "fieldReferralRequired": "not_applicable", + "fieldAdministration": { + "entity": { + "name": "VA Washington DC health care", + "entityId": "214" + } + }, + "fieldRegionalHealthService": { + "entity": { + "status": true, + "entityBundle": "regional_health_care_service_des", + "fieldBody": { + "processed": "

Our Audiology and Speech Pathology clinic provides diagnostic and rehabilitative services, VA compensation and pension examinations, and screening for employee hearing conservation. We offer a full range of audiology and speech pathology services like:

\n\n

To reach the Audiology and Speech clinic, call 202-745-8000, ext. 58270.

\n

Learn more about VA hearing aids

\n" + }, + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "33", + "entityBundle": "health_care_service_taxonomy", + "fieldAlsoKnownAs": "Hearing, speech, and balance", + "fieldCommonlyTreatedCondition": "tinnitus, vertigo, hearing loss, vestibular conditions, swallowing conditions", + "name": "Audiology and speech", + "description": { + "processed": "We diagnose and treat conditions affecting your hearing, speech or balance. These include hearing loss, tinnitus (noise or ringing the ears) & dizziness—also speech, language, voice or swallowing disorders." + }, + "fieldTricareDescription": null, + "parent": [ + { + "entity": null + } + ], + "fieldHealthServiceApiId": "audiology" + } + } + } + } + } + }, + { + "entity": { + "status": false, + "fieldServiceLocation": [ + { + "entity": { + "fieldOnlineSchedulingAvail": "yes", + "fieldUseFacilityPhoneNumber": false, + "fieldOtherPhoneNumbers": [ + { + "entity": { + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel", + "fieldPhoneExtension": "54535", + "fieldPhoneLabel": "Allergy Clinic " + } + } + ], + "fieldOfficeVisits": "yes_appointment_only", + "fieldApptIntroTextType": "use_default_text", + "fieldApptIntroTextCustom": null, + "status": true, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldClinicName": "Allergy Clinic", + "fieldBuildingNameNumber": "Main Building ", + "fieldWingFloorOrRoomNumber": "4th Floor, Room 4E-225", + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "additionalName": null, + "administrativeArea": "", + "postalCode": "", + "locality": "", + "organization": null, + "dependentLocality": null, + "countryCode": "US", + "sortingCode": null + } + } + }, + "fieldEmailContacts": [], + "fieldOfficeHours": [ + { + "day": 1, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 2, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 3, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 4, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 5, + "starthours": 730, + "endhours": 1600, + "comment": "" + } + ], + "fieldHours": "2", + "fieldAdditionalHoursInfo": null, + "fieldPhone": [ + { + "entity": { + "fieldPhoneExtension": "54535", + "fieldPhoneLabel": "Allergy Clinic ", + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel" + } + } + ], + "fieldUseMainFacilityPhone": true + } + } + ], + "fieldReferralRequired": "1", + "fieldAdministration": { + "entity": { + "name": "VA Washington DC health care", + "entityId": "214" + } + }, + "fieldRegionalHealthService": { + "entity": { + "status": true, + "entityBundle": "regional_health_care_service_des", + "fieldBody": { + "processed": "

We help Veterans on their recovery journey through outpatient and inpatient services. Our residential facility helps Veterans deal with substance abuse, homelessness, mental health, and unemployment through its 24-hour therapeutic and educational programs like:

\n\n

Learn more about our VA treatment programs

\n" + }, + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "47", + "entityBundle": "health_care_service_taxonomy", + "fieldAlsoKnownAs": "Drug and alcohol treatment and rehabilitation", + "fieldCommonlyTreatedCondition": null, + "name": "Addiction and substance use care", + "description": { + "processed": "We can help you overcome substance use problems from unhealthy alcohol use to life-threatening addiction. We match our services—like counseling, group therapy or medication—to your specific needs." + }, + "fieldTricareDescription": null, + "parent": [ + { + "entity": null + } + ], + "fieldHealthServiceApiId": "addiction" + } + } + } + } + } + }, + { + "entity": { + "status": true, + "fieldServiceLocation": [ + { + "entity": { + "fieldOnlineSchedulingAvail": "no", + "fieldUseFacilityPhoneNumber": true, + "fieldOtherPhoneNumbers": [], + "fieldOfficeVisits": "yes_appointment_only", + "fieldApptIntroTextType": "remove_text", + "fieldApptIntroTextCustom": null, + "status": true, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldClinicName": null, + "fieldBuildingNameNumber": null, + "fieldWingFloorOrRoomNumber": null, + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "additionalName": null, + "administrativeArea": "", + "postalCode": "", + "locality": "", + "organization": null, + "dependentLocality": null, + "countryCode": "US", + "sortingCode": null + } + } + }, + "fieldEmailContacts": [], + "fieldOfficeHours": [], + "fieldHours": "1", + "fieldAdditionalHoursInfo": null, + "fieldPhone": [], + "fieldUseMainFacilityPhone": true + } + } + ], + "fieldReferralRequired": "not_applicable", + "fieldAdministration": { + "entity": { + "name": "VA Washington DC health care", + "entityId": "214" + } + }, + "fieldRegionalHealthService": { + "entity": { + "status": true, + "entityBundle": "regional_health_care_service_des", + "fieldBody": { + "processed": "

Our specially trained doctors, called anesthesiologists and certified nurses, called Nurse Anesthetists, can help with your care before, during, and after surgery. They will develop a plan for your care and safety, provide medicine to keep you comfortable during your operation, and help you manage your pain after surgery. Our services include:

\n\n" + }, + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "107", + "entityBundle": "health_care_service_taxonomy", + "fieldAlsoKnownAs": null, + "fieldCommonlyTreatedCondition": null, + "name": "Anesthesia", + "description": { + "processed": "The anesthesia service works to keep you comfortable, safe and pain-free during surgical or screening procedures." + }, + "fieldTricareDescription": null, + "parent": [ + { + "entity": null + } + ], + "fieldHealthServiceApiId": "anesthesia" + } + } + } + } + } + }, + { + "entity": { + "status": true, + "fieldServiceLocation": [ + { + "entity": { + "fieldOnlineSchedulingAvail": "yes", + "fieldUseFacilityPhoneNumber": false, + "fieldOtherPhoneNumbers": [ + { + "entity": { + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel", + "fieldPhoneExtension": "57937", + "fieldPhoneLabel": "Gynecology " + } + } + ], + "fieldOfficeVisits": "yes_appointment_only", + "fieldApptIntroTextType": "use_default_text", + "fieldApptIntroTextCustom": null, + "status": true, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldClinicName": "Women's Health Clinic ", + "fieldBuildingNameNumber": null, + "fieldWingFloorOrRoomNumber": null, + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "additionalName": null, + "administrativeArea": "", + "postalCode": "", + "locality": "", + "organization": null, + "dependentLocality": null, + "countryCode": "US", + "sortingCode": null + } + } + }, + "fieldEmailContacts": [], + "fieldOfficeHours": [ + { + "day": 1, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 2, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 3, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 4, + "starthours": 730, + "endhours": 1600, + "comment": "" + }, + { + "day": 5, + "starthours": 730, + "endhours": 1600, + "comment": "" + } + ], + "fieldHours": "2", + "fieldAdditionalHoursInfo": null, + "fieldPhone": [ + { + "entity": { + "fieldPhoneExtension": "57937", + "fieldPhoneLabel": "Gynecology ", + "fieldPhoneNumber": "202-745-8000", + "fieldPhoneNumberType": "tel" + } + } + ], + "fieldUseMainFacilityPhone": false + } + } + ], + "fieldReferralRequired": "0", + "fieldAdministration": { + "entity": { + "name": "VA Washington DC health care", + "entityId": "214" + } + }, + "fieldRegionalHealthService": { + "entity": { + "status": true, + "entityBundle": "regional_health_care_service_des", + "fieldBody": { + "processed": "

Our gynecologists focus on the female reproductive system and provide services that include:

\n\n

To schedule an appointment with gynecology, call 202-745-8000, ext. 57937.

\n" + }, + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "100", + "entityBundle": "health_care_service_taxonomy", + "fieldAlsoKnownAs": "Reproductive and maternal health, women's health", + "fieldCommonlyTreatedCondition": null, + "name": "Gynecology", + "description": { + "processed": "Our specialists offer reproductive health care services for women Veterans, including contraception, pregnancy care and fertility treatment." + }, + "fieldTricareDescription": "Our specialists offer reproductive health care services, including contraception, pregnancy care, and fertility treatment.", + "parent": [ + { + "entity": null + } + ], + "fieldHealthServiceApiId": "gynecology" + } + } + } + } + } + } + ], + "fieldAdministration": { + "entity": { + "entityId": "214" + } + } +} \ No newline at end of file diff --git a/src/site/paragraphs/tests/vamc/template/fixtures/non_clinical_service_location.json b/src/site/paragraphs/tests/vamc/template/fixtures/non_clinical_service_location.json new file mode 100644 index 0000000000..fd0e3b461f --- /dev/null +++ b/src/site/paragraphs/tests/vamc/template/fixtures/non_clinical_service_location.json @@ -0,0 +1,92 @@ +{ + "fieldAddress": { + "addressLine1": "1100 North College Avenue", + "addressLine2": null, + "postalCode": "72703-1944", + "locality": "Fayetteville", + "administrativeArea": "AR" + }, + "reverseFieldFacilityLocationNode": { + "entities": [ + { + "entityId": "46268", + "fieldServiceNameAndDescripti": { + "entity": { + "entityId": "1026", + "entityLabel": "Medical records", + "name": "Medical records" + }, + "targetId": 1026 + }, + "fieldServiceLocation": [ + { + "entity": { + "status": true, + "fieldAdditionalHoursInfo": null, + "fieldEmailContacts": [], + "fieldOfficeHours": [ + { + "day": 1, + "starthours": 800, + "endhours": 1630, + "comment": "" + }, + { + "day": 2, + "starthours": 800, + "endhours": 1630, + "comment": "" + }, + { + "day": 3, + "starthours": 800, + "endhours": 1630, + "comment": "" + }, + { + "day": 4, + "starthours": 800, + "endhours": 1630, + "comment": "" + }, + { + "day": 5, + "starthours": 800, + "endhours": 1630, + "comment": "" + } + ], + "fieldHours": "2", + "fieldPhone": [ + { + "entity": { + "fieldPhoneLabel": "Medical Records", + "fieldPhoneNumber": "479-443-4301", + "fieldPhoneExtension": "65052", + "fieldPhoneNumberType": "tel" + } + } + ], + "fieldUseMainFacilityPhone": false, + "fieldServiceLocationAddress": { + "entity": { + "fieldUseFacilityAddress": true, + "fieldBuildingNameNumber": "Building 1", + "fieldClinicName": "Room 1-44", + "fieldWingFloorOrRoomNumber": "Basement", + "fieldAddress": { + "addressLine1": "", + "addressLine2": "", + "postalCode": "", + "locality": "", + "administrativeArea": "" + } + } + } + } + } + ] + } + ] + } +} \ No newline at end of file diff --git a/src/site/paragraphs/tests/vamc/vamc_field_service_location.unit.spec.js b/src/site/paragraphs/tests/vamc/vamc_field_service_location.unit.spec.js new file mode 100644 index 0000000000..250aea1239 --- /dev/null +++ b/src/site/paragraphs/tests/vamc/vamc_field_service_location.unit.spec.js @@ -0,0 +1,99 @@ +/* eslint-disable @department-of-veterans-affairs/axe-check-required */ +import { expect } from 'chai'; +import { getByTestId } from '@testing-library/dom'; +import { parseFixture, renderHTML } from '../../../tests/support'; + +describe('VBA accordions for Service Locations', () => { + const fixture = parseFixture( + 'src/site/paragraphs/tests/vamc/template/fixtures/health_care_local_facility.json', + ); + const processedFixture = { + fieldAddress: fixture.fieldAddress, + fieldPhoneNumber: fixture.fieldPhoneNumber, + fieldOfficeHours: fixture.fieldOfficeHours, + }; + it('should render render contents of COVID service', async () => { + // has onlineScheduling + // has fieldOtherPhoneNumbers + // should show Appointments header + // should show main number + const covidVaccinesEntity = + fixture.fieldLocalHealthCareService[0].entity.fieldServiceLocation[0] + .entity; + const covidHTML = await renderHTML( + 'src/site/paragraphs/service_location.drupal.liquid', + { + ...processedFixture, + single: covidVaccinesEntity, + }, + ); + expect(getByTestId(covidHTML, 'service-location-field-office-visits')).to + .exist; + expect(getByTestId(covidHTML, 'service-location-appoinments-header')).to + .exist; + expect(getByTestId(covidHTML, 'service-location-show-other-phone-numbers')) + .to.exist; + expect( + getByTestId( + covidHTML, + 'service-location-main-facility-phone-for-contact', + ), + ).to.exist; + expect(getByTestId(covidHTML, 'service-location-field-hours')).to.exist; + expect(getByTestId(covidHTML, 'service-location-custom-text')).to.exist; + }); + it('should render render contents of Anesthesia service', async () => { + // No onlineScheduling + // remove text + // no clinic name + // should show Appointments header (but because they say yes_with_appoinment) + // should show main number + const anesthesiaEntity = + fixture.fieldLocalHealthCareService[3].entity.fieldServiceLocation[0] + .entity; + const anesthesiaHTML = await renderHTML( + 'src/site/paragraphs/service_location.drupal.liquid', + { + ...processedFixture, + single: anesthesiaEntity, + }, + ); + expect(getByTestId(anesthesiaHTML, 'service-location-field-office-visits')) + .to.exist; + expect(getByTestId(anesthesiaHTML, 'service-location-appoinments-header')) + .to.exist; // this one is odd - since it says yes_with_appoinment + expect(getByTestId(anesthesiaHTML, 'service-location-main-facility-phone')) + .to.exist; + // other expects will cause to fail + }); + it('should render render contents of Gynecology service', async () => { + // Yes onlineScheduling + // default text + // Has clinic name + // should show Appointments header + // should show icon for office visits + // should NOT show main number + // should show other phone numbers + const gynecologyEntity = + fixture.fieldLocalHealthCareService[4].entity.fieldServiceLocation[0] + .entity; + const gynecologyHTML = await renderHTML( + 'src/site/paragraphs/service_location.drupal.liquid', + { + ...processedFixture, + single: gynecologyEntity, + }, + ); + expect(getByTestId(gynecologyHTML, 'service-location-field-office-visits')) + .to.exist; + expect(getByTestId(gynecologyHTML, 'service-location-appoinments-header')) + .to.exist; + expect( + getByTestId(gynecologyHTML, 'service-location-show-other-phone-numbers'), + ).to.exist; + expect(getByTestId(gynecologyHTML, 'service-location-field-hours')).to + .exist; + expect(getByTestId(gynecologyHTML, 'service-location-default-text')).to + .exist; + }); +}); diff --git a/src/site/stages/build/drupal/graphql/file-fragments/appointmentItems.graphql.js b/src/site/stages/build/drupal/graphql/file-fragments/appointmentItems.graphql.js index 6154446fd6..49e563cc73 100644 --- a/src/site/stages/build/drupal/graphql/file-fragments/appointmentItems.graphql.js +++ b/src/site/stages/build/drupal/graphql/file-fragments/appointmentItems.graphql.js @@ -4,19 +4,5 @@ * */ module.exports = ` - fieldHserviceApptLeadin - fieldHserviceApptIntroSelect - fieldOnlineSchedulingAvailabl fieldReferralRequired - fieldWalkInsAccepted - fieldPhoneNumbersParagraph { - entity { - ... on ParagraphPhoneNumber { - fieldPhoneExtension - fieldPhoneLabel - fieldPhoneNumber - fieldPhoneNumberType - } - } - } `; diff --git a/src/site/stages/build/drupal/graphql/file-fragments/appointmentServiceLocationItems.graphql.js b/src/site/stages/build/drupal/graphql/file-fragments/appointmentServiceLocationItems.graphql.js new file mode 100644 index 0000000000..f03368639d --- /dev/null +++ b/src/site/stages/build/drupal/graphql/file-fragments/appointmentServiceLocationItems.graphql.js @@ -0,0 +1,23 @@ +/* + * + * Appointments info for a facility service under the Service Location + * + */ +module.exports = ` + fieldVirtualSupport + fieldOnlineSchedulingAvail + fieldUseFacilityPhoneNumber + fieldOtherPhoneNumbers { + entity { + ... on ParagraphPhoneNumber { + fieldPhoneNumber + fieldPhoneNumberType + fieldPhoneExtension + fieldPhoneLabel + } + } + } + fieldOfficeVisits + fieldApptIntroTextType + fieldApptIntroTextCustom +`; diff --git a/src/site/stages/build/drupal/graphql/paragraph-fragments/serviceLocation.paragraph.graphql.js b/src/site/stages/build/drupal/graphql/paragraph-fragments/serviceLocation.paragraph.graphql.js index 05d465455b..8d1545db6b 100644 --- a/src/site/stages/build/drupal/graphql/paragraph-fragments/serviceLocation.paragraph.graphql.js +++ b/src/site/stages/build/drupal/graphql/paragraph-fragments/serviceLocation.paragraph.graphql.js @@ -1,3 +1,5 @@ +const appointmentServiceLocationItems = require('../file-fragments/appointmentServiceLocationItems.graphql'); + /* * * A service location for a facility service. @@ -7,6 +9,7 @@ module.exports = ` fieldServiceLocation { entity { ... on ParagraphServiceLocation { + ${appointmentServiceLocationItems} status fieldServiceLocationAddress { entity { diff --git a/src/site/stages/build/drupal/graphql/vbaFacility.graphql.js b/src/site/stages/build/drupal/graphql/vbaFacility.graphql.js index f0c252f672..0c5caf10f9 100644 --- a/src/site/stages/build/drupal/graphql/vbaFacility.graphql.js +++ b/src/site/stages/build/drupal/graphql/vbaFacility.graphql.js @@ -2,6 +2,7 @@ const { generatePaginatedQueries } = require('../individual-queries-helpers'); const draftContentOverride = process.env.UNPUBLISHED_CONTENT === 'true'; const entityElementsFromPages = require('./entityElementsForPages.graphql'); +const appointmentServiceLocationItems = require('./file-fragments/appointmentServiceLocationItems.graphql'); const vbaFacilityFragment = ` fragment vbaFacilityFragment on NodeVbaFacility { @@ -147,6 +148,7 @@ const vbaFacilityFragment = ` id entityId fieldHours + ${appointmentServiceLocationItems} fieldOfficeHours { starthours endhours @@ -279,6 +281,7 @@ const vbaFacilityFragment = ` ... on ParagraphServiceLocation { id entityId + ${appointmentServiceLocationItems} fieldHours fieldAdditionalHoursInfo fieldOfficeHours {