Skip to content

Commit

Permalink
VACMS 19968 - remove CMS toggle usage for phone number migration and …
Browse files Browse the repository at this point in the history
…use only new fields (#2380)

* remove CMS toggle usage and use only new fields
* checked with deleted old phone numbers
  • Loading branch information
eselkin authored Dec 12, 2024
1 parent e4e2719 commit 2528a35
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 63 deletions.
10 changes: 1 addition & 9 deletions src/site/includes/facilityListing.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<strong>VA health connect:</strong> {{ fieldVaHealthConnectPhone | processPhoneToVaTelephoneOrFallback : '', 'VA health connect' }}
</div>
{% endif %}
{% if entity.fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if entity.fieldTelephone %}
<div>
{% include "src/site/components/phone-number-no-header.drupal.liquid" with
phoneNumber = entity.fieldTelephone.entity.fieldPhoneNumber
Expand All @@ -51,14 +51,6 @@
phoneLabel = entity.fieldTelephone.entity.fieldPhoneLabel | default: 'Mental health care'
%}
</div>
{% elsif entity.fieldMentalHealthPhone and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<div>
{% include "src/site/components/phone-number-no-header.drupal.liquid" with
phoneNumber = entity.fieldMentalHealthPhone
phoneLabel = 'Mental health care'
phoneNumberType = "tel"
%}
</div>
{% endif %}
</div>
</section>
Expand Down
10 changes: 1 addition & 9 deletions src/site/layouts/health_care_local_facility.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
</strong> {{ fieldRegionPage.entity.fieldVaHealthConnectPhone | processPhoneToVaTelephoneOrFallback : '', 'VA health connect' }}
</div>
{% endif %}
{% if fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if fieldTelephone %}
<div>
{% include "src/site/components/phone-number-no-header.drupal.liquid" with
phoneNumber = fieldTelephone.entity.fieldPhoneNumber
Expand All @@ -127,14 +127,6 @@
phoneLabel = fieldTelephone.entity.fieldPhoneLabel | default: 'Mental health care'
%}
</div>
{% elsif fieldMentalHealthPhone and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<div>
{% include "src/site/components/phone-number-no-header.drupal.liquid" with
phoneNumber = fieldMentalHealthPhone
phoneLabel = 'Mental health care'
phoneNumberType = 'tel'
%}
</div>
{% endif %}
</div>
{% include 'src/site/includes/hours.liquid' with allHours = fieldOfficeHours headerType = 'clinical' %}
Expand Down
9 changes: 1 addition & 8 deletions src/site/layouts/person_profile.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
vads-u-font-weight--regular">
<span class="vads-u-font-weight--bold">Email:</span> <va-link type="email" href="mailto:{{ fieldEmailAddress }}" text="{{ fieldEmailAddress }}"></va-link></p>
{% endif %}
{% if fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if fieldTelephone %}
<p class="
vads-u-margin--0
vads-u-margin-bottom--0p5
Expand All @@ -72,13 +72,6 @@
phoneLabel = fieldTelephone.entity.fieldPhoneLabel
%}
</p>
{% elsif fieldPhoneNumber and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<p class="
vads-u-font-weight--regular
vads-u-margin--0
vads-u-margin-bottom--0p5">
<span class="vads-u-font-weight--bold">Phone:</span> {{ fieldPhoneNumber | processPhoneToVaTelephoneOrFallback : '', '' }}
</p>
{% endif %}
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/site/layouts/press_release.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{% if c != empty %}
<div>
<p class="vads-u-margin-top--1 vads-u-margin-bottom--0">{{ c.title }}{% if c.fieldDescription != empty %}, {{ c.fieldDescription }} {% endif %}</p>
{% if c.fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if c.fieldTelephone %}
<p class="vads-u-margin-top--1 vads-u-margin-bottom--0">
{% include "src/site/components/phone-number-no-header.drupal.liquid" with
phoneNumber = c.fieldTelephone.entity.fieldPhoneNumber
Expand All @@ -57,8 +57,6 @@
phoneLabel = c.fieldTelephone.entity.fieldPhoneLabel
%}
</p>
{% elsif c.fieldPhoneNumber and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<p class="vads-u-margin-top--1 vads-u-margin-bottom--0">{{ c.fieldPhoneNumber }}</p>
{% endif %}
{% if c.fieldEmailAddress != empty %}
<p class="vads-u-margin-top--1 vads-u-margin-bottom--0"><va-link
Expand Down
8 changes: 1 addition & 7 deletions src/site/layouts/vamc_system_billing_insurance.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
immunizations.
</p>
{% endif %}
{% if fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if fieldTelephone %}
{% include "src/site/components/phone-number.drupal.liquid" with
phoneHeaderLevel = 3
useParagraph = true
Expand All @@ -48,12 +48,6 @@
phoneType = fieldTelephone.entity.fieldPhoneNumberType
phoneLabel = fieldTelephone.entity.fieldPhoneLabel
%}
{% elsif fieldPhoneNumber and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<h3>
Phone
</h3>
<p>{{ fieldPhoneNumber | processPhoneToVaTelephoneOrFallback : '', '' }}
</p>
{% endif %}
<div class="vads-u-margin-bottom--3">
{% include 'src/site/includes/hours.liquid' with allHours = fieldOfficeHours headerType = 'small' %}
Expand Down
6 changes: 1 addition & 5 deletions src/site/paragraphs/service_location.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,10 @@
{% endcomment %}
{% assign shouldShowIntroText = single.fieldApptIntroTextType | shouldShowIntroText: single.fieldApptIntroTextCustom %}

{% if isMentalHealthService and fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if isMentalHealthService and fieldTelephone %}
{% assign serviceLocationMainNumber = fieldTelephone.entity.fieldPhoneNumber %}
{% assign serviceLocationMainExt = fieldTelephone.entity.fieldPhoneExtension %}
{% assign serviceLocationMainPhoneType = fieldTelephone.entity.fieldPhoneNumberType %}
{% elsif isMentalHealthService and fieldMentalHealthPhone and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% assign serviceLocationMainNumber = fieldMentalHealthPhone %}
{% assign serviceLocationMainExt = "" %}
{% assign serviceLocationMainPhoneType = "tel" %}
{% elsif fieldPhoneNumber %}
{% assign serviceLocationMainNumber = fieldPhoneNumber %}
{% assign serviceLocationMainExt = "" %}
Expand Down
9 changes: 1 addition & 8 deletions src/site/paragraphs/staff_profile.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
{{ bio.fieldOffice.entity.entityLabel }}
</p>
{% endif %}
{% if bio.fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if bio.fieldTelephone %}
<p class="
vads-u-font-weight--normal
vads-u-margin--0
Expand All @@ -59,13 +59,6 @@
phoneLabel = bio.fieldTelephone.entity.fieldPhoneLabel
%}
</p>
{% elsif bio.fieldPhoneNumber and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<p class="
vads-u-font-weight--normal
vads-u-margin--0
vads-u-margin-bottom--1">
<strong>Phone:</strong> {{ bio.fieldPhoneNumber | processPhoneToVaTelephoneOrFallback : '', '' }}
</p>
{% endif %}
{% if bio.fieldEmailAddress %}
<p class="
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ const FACILITIES_RESULTS = `
postalCode
}
fieldPhoneNumber
fieldMentalHealthPhone
${mhTelephonePara}
fieldOfficeHours {
day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const PERSON_PROFILE_RESULTS = `
fieldLastName
fieldSuffix
fieldEmailAddress
fieldPhoneNumber
${personTelephoneParagraphGraphql}
fieldDescription
fieldOffice {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ const healthCareLocalFacilityPageFragment = `
lon
}
fieldPhoneNumber
fieldMentalHealthPhone
${mhTelephonePara}
fieldOfficeHours {
day
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ const leadershipListingPage = `
entity {
... on NodePersonProfile {
title
fieldPhoneNumber
${personTelephoneParagraphGraphql}
entityPublished
fieldNameFirst
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module.exports = `
fieldSuffix
fieldDescription
fieldEmailAddress
fieldPhoneNumber
${personTelephoneParagraphGraphql}
fieldCompleteBiographyCreate
fieldIntroText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const pressReleaseFragment = `
...on NodePersonProfile {
title
fieldDescription
fieldPhoneNumber
${personTelephoneParagraphGraphql}
fieldEmailAddress
}
Expand Down
9 changes: 1 addition & 8 deletions src/site/teasers/bio.drupal.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ Example data:
{{ node.fieldOffice.entity.entityLabel }}
</p>
{% endif %}
{% if node.fieldTelephone and enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
{% if node.fieldTelephone %}
<p class="
vads-u-margin--0
vads-u-margin-bottom--1
Expand All @@ -98,13 +98,6 @@ Example data:
phoneLabel = node.fieldTelephone.entity.fieldPhoneLabel
%}
</p>
{% elsif node.fieldPhoneNumber and !enabledFeatureFlags.FEATURE_TELEPHONE_MIGRATION_V1 %}
<p class="
vads-u-margin--0
vads-u-margin-bottom--1
vads-u-font-size--base">
<strong>Phone:</strong> {{ node.fieldPhoneNumber | processPhoneToVaTelephoneOrFallback : '', '' }}
</p>
{% endif %}
{% if node.fieldEmailAddress %}
<p class="
Expand Down

0 comments on commit 2528a35

Please sign in to comment.