Skip to content

Commit

Permalink
[VA-17103] Add VBA Operating Status Component (#1926)
Browse files Browse the repository at this point in the history
* VA-17103: add VBA OP Status More Info to query

* VA-17103: Add VBA Expandable Alert partial
  • Loading branch information
maxx1128 authored Feb 23, 2024
1 parent 24f28b3 commit 9698bde
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
30 changes: 30 additions & 0 deletions src/site/includes/vba_facilities/expandable_alert.liquid
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{% assign showVBAExpandableAlert = false %}

{% if fieldOperatingStatusFacility == 'notice' %}
{% assign showVBAExpandableAlert = true %}
{% assign VBAExpandableAlertTrigger = 'Facility Notice' %}
{% assign VBAExpandableAlertStatus = 'info' %}
{% elsif fieldOperatingStatusFacility == 'limited' %}
{% assign showVBAExpandableAlert = true %}
{% assign VBAExpandableAlertTrigger = 'Limited services and hours' %}
{% assign VBAExpandableAlertStatus = 'warning' %}
{% elsif fieldOperatingStatusFacility == 'closed' %}
{% assign showVBAExpandableAlert = true %}
{% assign VBAExpandableAlertTrigger = 'Facility Closed' %}
{% assign VBAExpandableAlertStatus = 'error' %}
{% endif %}

{% if showVBAExpandableAlert %}
<va-alert-expandable
data-template="components/vba_facilities/expandable-alert.drupal.liquid"
class="vads-u-margin-top--0 vads-u-margin-bottom--0 vamc-facility-expandable-alert"
status="{{ VBAExpandableAlertStatus }}"
trigger="{{ VBAExpandableAlertTrigger }}"
>
<div>
<p>
{{ fieldOperatingStatusMoreInfo | newline_to_br }}
</p>
</div>
</va-alert-expandable>
{% endif %}
5 changes: 3 additions & 2 deletions src/site/layouts/vba_facility.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@
<div>
<div class="vads-c-facility-detail">

{% if fieldOperatingStatusFacility and fieldOperatingStatusFacility != 'normal' %}
{% if fieldOperatingStatusMoreInfo and fieldOperatingStatusFacility and fieldOperatingStatusFacility != 'normal' %}
<div class="vads-u-display--inline-block vads-u-margin-bottom--1">
{% include "src/site/includes/operatingStatusFlagsLinks.drupal.liquid" %}
{% include "src/site/includes/vba_facilities/expandable_alert.liquid" %}
</div>
{% endif %}

<section class="vads-facility-detail">
<script type="application/ld+json">
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const vbaFacilityFragment = `
fieldIntroText
fieldFacilityLocatorApiId
fieldOperatingStatusFacility
fieldOperatingStatusMoreInfo
fieldPhoneNumber
fieldCcBenefitsHotline {
fetched
Expand Down

0 comments on commit 9698bde

Please sign in to comment.