From ab6655e04dfffd217b242b81197b4d212e4fb52f Mon Sep 17 00:00:00 2001 From: Eli Selkin <5606931+eselkin@users.noreply.github.com> Date: Tue, 3 Dec 2024 17:32:27 -0800 Subject: [PATCH] VACMS 19825 - Updated all operating status content-build templates (#2355) * updated all operating status content-build templates * operation_status_information.liquid was not used/imported * slim alert if no fieldOperatingStatusMoreInfo * margin and spacing --- .../operatingStatusFlagsLinks.drupal.liquid | 24 ++++++++- .../operating_status_expandable_alert.liquid | 31 ++++++++++-- .../operation_status_information.liquid | 19 ------- .../vba_facilities/expandable_alert.liquid | 50 +++++++++++++++---- .../health_care_facility_status.drupal.liquid | 24 ++++++++- ...er_locations_operating_status.unit.spec.js | 4 +- ..._operating_status_and_alerts.drupal.liquid | 17 ++++++- src/site/layouts/vba_facility.drupal.liquid | 6 +-- 8 files changed, 129 insertions(+), 46 deletions(-) delete mode 100644 src/site/includes/operation_status_information.liquid diff --git a/src/site/includes/operatingStatusFlagsLinks.drupal.liquid b/src/site/includes/operatingStatusFlagsLinks.drupal.liquid index 360c978ea6..08124f1fae 100644 --- a/src/site/includes/operatingStatusFlagsLinks.drupal.liquid +++ b/src/site/includes/operatingStatusFlagsLinks.drupal.liquid @@ -7,15 +7,35 @@ /> {% elsif fieldOperatingStatusFacility == 'limited' %} - + +{% elsif fieldOperatingStatusFacility == 'temporary_closure' %} + + + +{% elsif fieldOperatingStatusFacility == 'temporary_location' %} + + + +{% elsif fieldOperatingStatusFacility == 'virtual_care' %} + + + +{% elsif fieldOperatingStatusFacility == 'coming_soon' %} + + + {% elsif fieldOperatingStatusFacility == 'closed' %} - + @@ -25,8 +37,21 @@ class="vads-u-margin-y--0 vamc-facility-expandable-alert" style="max-width: 303px;" > -

{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}

+

{{ fieldOperatingStatusMoreInfo | drupalToVaPath | phoneLinks | newline_to_br }}

+ {% elsif status %} +
+ +

{{ trigger }}

+
+
{% endif %} {% endif %} \ No newline at end of file diff --git a/src/site/includes/operation_status_information.liquid b/src/site/includes/operation_status_information.liquid deleted file mode 100644 index 922aa879a7..0000000000 --- a/src/site/includes/operation_status_information.liquid +++ /dev/null @@ -1,19 +0,0 @@ -{% if fieldOperatingStatusFacility == 'notice' %} - - - Facility notice - - - {% elsif fieldOperatingStatusFacility == 'limited' %} - - - Limited services and hours - - - {% elsif fieldOperatingStatusFacility == 'closed' %} - - - Facility Closed - - -{% endif %} \ No newline at end of file diff --git a/src/site/includes/vba_facilities/expandable_alert.liquid b/src/site/includes/vba_facilities/expandable_alert.liquid index a1b08beaa8..7bd364cec8 100644 --- a/src/site/includes/vba_facilities/expandable_alert.liquid +++ b/src/site/includes/vba_facilities/expandable_alert.liquid @@ -7,24 +7,52 @@ {% elsif fieldOperatingStatusFacility == 'limited' %} {% assign showVBAExpandableAlert = true %} {% assign VBAExpandableAlertTrigger = 'Limited services and hours' %} - {% assign VBAExpandableAlertStatus = 'warning' %} + {% assign VBAExpandableAlertStatus = 'info' %} {% elsif fieldOperatingStatusFacility == 'closed' %} {% assign showVBAExpandableAlert = true %} {% assign VBAExpandableAlertTrigger = 'Facility Closed' %} - {% assign VBAExpandableAlertStatus = 'error' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'temporary_closure' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Temporary facility closure' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'temporary_location' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Temporary location' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'virtual_care' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Virtual care only' %} + {% assign VBAExpandableAlertStatus = 'warning' %} +{% elsif fieldOperatingStatusFacility == 'coming_soon' %} + {% assign showVBAExpandableAlert = true %} + {% assign VBAExpandableAlertTrigger = 'Coming soon' %} + {% assign VBAExpandableAlertStatus = 'warning' %} {% endif %} {% if showVBAExpandableAlert %} - -
+
+ {% if fieldOperatingStatusMoreInfo and fieldOperatingStatusMoreInfo != blank %} +

{{ fieldOperatingStatusMoreInfo | newline_to_br | phoneLinks }}

-
- + + {% else %} + +

{{ VBAExpandableAlertTrigger }}

+
+ {% endif %} +
{% endif %} diff --git a/src/site/layouts/health_care_facility_status.drupal.liquid b/src/site/layouts/health_care_facility_status.drupal.liquid index 10a9bb45fe..76c0b53360 100644 --- a/src/site/layouts/health_care_facility_status.drupal.liquid +++ b/src/site/layouts/health_care_facility_status.drupal.liquid @@ -21,13 +21,33 @@ {% if office.fieldOperatingStatusFacility == 'normal' %} Normal services and hours {% elsif office.fieldOperatingStatusFacility == 'limited' %} - + Limited services and hours {% elsif office.fieldOperatingStatusFacility == 'closed' %} - + Facility closed + {% elsif office.fieldOperatingStatusFacility == 'notice' %} + + Facility notice + + {% elsif office.fieldOperatingStatusFacility == 'temporary_closure' %} + + Temporary facility closure + + {% elsif office.fieldOperatingStatusFacility == 'temporary_location' %} + + Temporary location + + {% elsif office.fieldOperatingStatusFacility == 'virtual_care' %} + + Virtual care only + + {% elsif office.fieldOperatingStatusFacility == 'coming_soon' %} + + Coming soon + {% endif %} {% endfor %} diff --git a/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js b/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js index 77fe2e322c..b722bc9f86 100644 --- a/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js +++ b/src/site/layouts/tests/vet_center/vet_center_locations_operating_status.unit.spec.js @@ -51,9 +51,9 @@ describe('Vet Center Locations Operating Status', () => { ); const operatingStatus = queryAllByTestId( rendered, - 'operating-status-vc_5141OS', + 'operating-status-nonexp-vc_5141OS', ); - expect(operatingStatus).to.be.empty; + expect(operatingStatus).to.have.lengthOf(1); }); it('should render a limited operating status when has status and more info', async () => { diff --git a/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid b/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid index 77b493f56b..f440c5e0bc 100644 --- a/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid +++ b/src/site/layouts/vamc_operating_status_and_alerts.drupal.liquid @@ -68,12 +68,25 @@ {% elsif status.entity.fieldOperatingStatusFacility == 'limited' %} - Limited services and hours + Limited services and hours {% elsif status.entity.fieldOperatingStatusFacility == 'closed' %} - Facility Closed + Facility Closed + + {% elsif status.entity.fieldOperatingStatusFacility == 'temporary_closure' %} + Temporary facility closure + + {% elsif status.entity.fieldOperatingStatusFacility == 'temporary_location' %} + Temporary location + + {% elsif status.entity.fieldOperatingStatusFacility == 'virtual_care' %} + Virtual care only + + {% elsif status.entity.fieldOperatingStatusFacility == 'coming_soon' %} + Coming soon {% endif %} + {% if status.entity.fieldOperatingStatusMoreInfo and status.entity.fieldOperatingStatusFacility != 'normal' %}
{{ status.entity.fieldOperatingStatusMoreInfo }} diff --git a/src/site/layouts/vba_facility.drupal.liquid b/src/site/layouts/vba_facility.drupal.liquid index 8bf957a9ae..9b7cfebf0a 100644 --- a/src/site/layouts/vba_facility.drupal.liquid +++ b/src/site/layouts/vba_facility.drupal.liquid @@ -43,11 +43,7 @@
- {% if fieldOperatingStatusMoreInfo and fieldOperatingStatusFacility and fieldOperatingStatusFacility != 'normal' %} -
- {% include "src/site/includes/vba_facilities/expandable_alert.liquid" %} -
- {% endif %} + {% include "src/site/includes/vba_facilities/expandable_alert.liquid" %}