Skip to content

Commit

Permalink
VA-16652: avoid duplicate health service phone numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
maxx1128 committed Feb 9, 2024
1 parent 9a79f3d commit 992fd59
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions src/site/facilities/health_care_local_health_service.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,24 @@
{% endcomment %}
{% if locationEntity.fieldPhoneNumbersParagraph.length > 0 %}
<div class="vads-u-display--flex vads-u-flex-direction--column vads-u-margin-bottom--1" data-template="facilities/health_care_local_health_service">
fieldPhoneNumber
fieldMentalHealthPhone

{% if isMentalHealthService and fieldMentalHealthPhone %}
{% assign localServiceMainNumber = fieldMentalHealthPhone %}
{% else %}
{% assign localServiceMainNumber = fieldPhoneNumber %}
{% endif %}

{% 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
%}
{% if number.entity.fieldPhoneNumber != localServiceMainNumber or number.entity.fieldPhoneNumber == localServiceMainNumber and number.entity.fieldPhoneExtension %}
{% include "src/site/components/phone-number.drupal.liquid" with
phoneNumber = number.entity.fieldPhoneNumber
phoneExtension = number.entity.fieldPhoneExtension
phoneLabel = number.entity.fieldPhoneLabel
phoneHeaderLevel = 5
%}
{% endif %}
{% endfor %}
</div>
{% endif %}
Expand Down

0 comments on commit 992fd59

Please sign in to comment.