Skip to content

Commit

Permalink
VA-16652: Use mental health number for mental health services
Browse files Browse the repository at this point in the history
  • Loading branch information
maxx1128 committed Feb 9, 2024
1 parent d050192 commit ab662fa
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
2 changes: 2 additions & 0 deletions src/site/facilities/facility_health_service.drupal.liquid
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{% assign serviceTaxonomy = healthService.fieldServiceNameAndDescripti.entity %}
{% assign isMentalHealthService = serviceTaxonomy.name | localHealthCareServiceIsMentalHealth %}

<va-accordion-item
{% if serviceTaxonomy.fieldAlsoKnownAs %}
subheader="{{ serviceTaxonomy.fieldAlsoKnownAs }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% for location in locations %}
{% include "src/site/paragraphs/service_location.drupal.liquid" with
single = location.entity
isMentalHealth = isMentalHealthService
serviceLocationSubHeaderLevel = 5
%}
{% endfor %}
Expand Down Expand Up @@ -46,14 +47,6 @@
%}
{% endfor %}
</div>
{% else %}
<div class="vads-u-display--flex vads-u-flex-direction--column vads-u-margin-bottom--1" data-template="facilities/health_care_local_health_service">
{% include "src/site/components/phone-number.drupal.liquid" with
phoneNumber = fieldPhoneNumber
phoneLabel = 'Main Phone'
phoneHeaderLevel = 5
%}
</div>
{% endif %}

{% assign OMIT_REFERRAL_OR_WALKIN = "not_applicable, unknown" %}
Expand Down
23 changes: 21 additions & 2 deletions src/site/paragraphs/service_location.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,28 @@
{% comment %}
Conditionally display facility phone number
{% endcomment %}
{% if fieldPhoneNumber and single.fieldUseMainFacilityPhone %}

{% if isMentalHealthService and fieldMentalHealthPhone %}
{% assign serviceLocationMainNumber = fieldMentalHealthPhone %}
<p>
<strong>
CONDITIONAL CASE 1 <br />
serviceLocationMainNumber: {{ serviceLocationMainNumber }}
</strong>
</p>
{% else %}
{% assign serviceLocationMainNumber = fieldPhoneNumber %}
<p>
<strong>
CONDITIONAL CASE 2 <br />
serviceLocationMainNumber: {{ serviceLocationMainNumber }}
</strong>
</p>
{% endif %}

{% if serviceLocationMainNumber and single.fieldUseMainFacilityPhone %}
{% include "src/site/components/phone-number.drupal.liquid" with
phoneNumber = fieldPhoneNumber
phoneNumber = serviceLocationMainNumber
phoneLabel = 'Main Phone'
phoneHeaderLevel = serviceLocationSubHeaderLevel
%}
Expand Down

0 comments on commit ab662fa

Please sign in to comment.