-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
working query and beginning of page - not clickable sidenav for VA Po…
…lice
- Loading branch information
Showing
6 changed files
with
314 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,214 @@ | ||
{% include "src/site/includes/header.html" %} | ||
{% include "src/site/includes/preview-edit.drupal.liquid" %} | ||
{% include "src/site/includes/breadcrumbs.drupal.liquid" with hideHomeBreadcrumb = true %} | ||
|
||
<div id="content" class="interior"> | ||
<main class="va-l-detail-page va-facility-page"> | ||
<div class="usa-grid usa-grid-full"> | ||
{% include 'src/site/navigation/facility_sidebar_nav.drupal.liquid' with sidebarData = facilitySidebar %} | ||
<div class="usa-width-three-fourths"> | ||
<article class="usa-content"> | ||
{% include "src/site/includes/lovell-switch-link.drupal.liquid" with | ||
entityUrl = entityUrl | ||
%} | ||
|
||
<h1>{{ title }}</h1> | ||
{% assign image = fieldMedia.entity.image %} | ||
|
||
<div | ||
class="duotone darken lighten medium-screen:vads-u-margin-bottom--0p5"> | ||
<img class="system-img" src="{{ image.derivative.url }}" aria-hidden="true" role="presentation" alt="" width="100%"> | ||
</div> | ||
|
||
<div | ||
class="usa-grid usa-grid-full vads-u-margin-top--0 vads-u-margin-bottom--3"> | ||
{% assign basePath = entityUrl.path | regionBasePath %} | ||
{% include "src/site/facilities/main_buttons.drupal.liquid" with path = basePath %} | ||
</div> | ||
|
||
{% if fieldIntroText != empty %} | ||
<div class="va-introtext"> | ||
<p class="vads-u-margin-bottom--0">{{ fieldIntroText }}</p> | ||
</div> | ||
{% endif %} | ||
|
||
<section> | ||
<h2 | ||
class="vads-u-font-size--xl vads-u-margin-top--3 medium-screen:vads-u-margin-top--5 medium-screen:vads-u-margin-bottom--2p5"> | ||
Locations</h2> | ||
{% for main in mainFacilities.entities %} | ||
{% include 'src/site/includes/facilityListing.drupal.liquid' with | ||
entity = main | ||
fieldVaHealthConnectPhone = fieldVaHealthConnectPhone | ||
%} | ||
{% endfor %} <a | ||
onClick="recordEvent({ event: 'nav-secondary-button-click' });" | ||
class="usa-button usa-button-secondary vads-facility-hub-button vads-u-width--full medium-screen:vads-u-width--auto vads-u-font-size--md" | ||
href="{{ entityUrl.path }}/locations"> | ||
See all locations <i | ||
class="fa fa-chevron-right va-l-font-size--12px"> </i> | ||
</a> | ||
</section> | ||
|
||
<!-- "Manage your health online" section --> | ||
{% comment %} Hide this section for Lovell TRICARE {% endcomment %} | ||
{% if fieldAdministration.entity.entityId != '1039' %} | ||
<section> | ||
{% if fieldAdministration.entity.entityId == '1040' %} | ||
<h3>Manage your VA health online</h3> | ||
{% else %} | ||
<h3>Manage your health online</h3> | ||
{% endif %} | ||
<div | ||
class="vads-u-display--flex medium-screen:vads-u-flex-direction--row vads-u-flex-direction--column"> | ||
<div | ||
class="vads-u-margin-right--0 medium-screen:vads-u-margin-right--3"> | ||
<div class="vads-facility-hub-cta"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="{{ fieldVamcEhrSystem | topTaskUrl: "refill-track-prescriptions/", buildtype }}" | ||
class="top-task-link vads-u-height--full vads-u-width--full"> | ||
<i | ||
class=" fa fa-prescription-bottle vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">Refill and track | ||
your prescriptions<i | ||
class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
<div class="vads-facility-hub-cta"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="{{ fieldVamcEhrSystem | topTaskUrl: "secure-messaging/", buildtype }}" | ||
class="top-task-link vads-u-height--full vads-u-width--full"> | ||
<i | ||
class="far fa-comments vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">Send a secure | ||
message to your health care team<i | ||
class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
<div | ||
class="vads-facility-hub-cta vads-u-border-color--primary-alt-light medium-screen:vads-u-border-bottom--1px"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="{{ fieldVamcEhrSystem | topTaskUrl: "schedule-view-va-appointments/", buildtype }}" | ||
class="top-task-link vads-u-height--full vads-u-width--full"> | ||
<i | ||
class="far fa-calendar-check vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">Schedule and manage | ||
health appointments<i | ||
class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
</div> | ||
<div> | ||
<div class="vads-facility-hub-cta"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="{{ fieldVamcEhrSystem | topTaskUrl: "get-medical-records/", buildtype }}" | ||
class="top-task-link vads-u-height--full vads-u-width--full"> | ||
<i | ||
class="fa fa-file-medical vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">Download your VA | ||
medical records (Blue Button)<i | ||
class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
<div class="vads-facility-hub-cta"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="{{ fieldVamcEhrSystem | topTaskUrl: "view-test-and-lab-results/", buildtype }}" | ||
class="top-task-link vads-u-height--full vads-u-width--full"> | ||
<i | ||
class="fa fa-clipboard-list vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">View your lab and | ||
test results<i | ||
class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
<div | ||
class="vads-facility-hub-cta vads-facility-hub-cta-last-line vads-u-border-top--1px vads-u-border-color--primary-alt-light"> | ||
<a onClick="recordEvent({ event: 'cta-hub-link-click' });" | ||
href="/health-care/order-hearing-aid-batteries-and-accessories/" | ||
class="vads-u-height--full vads-u-width--full"> | ||
<i | ||
class="fa fa-deaf vads-facility-hub-cta-circle"> </i> | ||
<span class="vads-facility-hub-cta-label">Order hearing aid batteries <br/> and accessories<i class="fa fa-chevron-right vads-facility-hub-cta-arrow"> </i></span> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
</section> | ||
{% endif %} | ||
|
||
|
||
<!-- List of links section --> | ||
<div class="vads-u-margin-top--5"> | ||
{% include "src/site/paragraphs/facilities/list_of_link_teasers_facility.drupal.liquid" | ||
with paragraph = fieldRelatedLinks.entity | ||
regionNickname = title | ||
%} | ||
</div> | ||
|
||
{% assign header = "h3" %} | ||
<!-- Stories --> | ||
{% if newsStoryTeasersFeatured.entities.0.reverseFieldListingNode.entities.length %} | ||
{% assign featuredStories = newsStoryTeasersFeatured.entities.0.reverseFieldListingNode.entities %} | ||
<section> | ||
<h2 | ||
class="vads-u-margin-bottom--3 medium-screen:vads-u-margin-top--5"> | ||
Stories</h2> | ||
|
||
{% for story in featuredStories limit:2 %} | ||
{% assign node = story %} | ||
{% include "src/site/teasers/news_story.drupal.liquid" with node = story %} | ||
{% endfor %} | ||
<a onClick="recordEvent({ event: 'nav-secondary-button-click' });" | ||
class="usa-button usa-button-secondary vads-facility-hub-button vads-u-width--full medium-screen:vads-u-width--auto vads-u-font-size--md vads-u-margin--0" | ||
href="{{ entityUrl.path }}/stories"> | ||
See all stories <i | ||
class="fa fa-chevron-right va-l-font-size--12px"></i> | ||
</a> | ||
</section> | ||
{% endif %} | ||
|
||
<!-- Events --> | ||
{% if eventTeasersFeatured.entities.0.reverseFieldListingNode.entities.length %} | ||
<section> | ||
<h2 | ||
class="vads-u-margin-top--4 vads-u-margin-bottom--2 medium-screen:vads-u-margin-bottom--2p5"> | ||
Events</h2> | ||
{% for event in eventTeasersFeatured.entities.0.reverseFieldListingNode.entities %} | ||
{% assign node = event %} | ||
{% include "src/site/teasers/event.drupal.liquid" %} | ||
{% endfor %} | ||
<a onClick="recordEvent({ event: 'nav-secondary-button-click' });" | ||
class="usa-button usa-button-secondary vads-facility-hub-button vads-u-width--full medium-screen:vads-u-width--auto vads-u-font-size--md vads-u-margin--0" | ||
href="{{ entityUrl.path }}/events"> | ||
See all events <i | ||
class="fa fa-chevron-right va-l-font-size--12px"></i> | ||
</a> | ||
</section> | ||
{% elsif eventTeasersAll.entities.0.reverseFieldListingNode.entities.length %} | ||
{% assign upcomingEvents = eventTeasersAll.entities.0.reverseFieldListingNode.entities %} | ||
{% assign sortedEvents = upcomingEvents | filterAndSortEvents %} | ||
<section> | ||
<h2 | ||
class="vads-u-margin-top--4 vads-u-margin-bottom--2 medium-screen:vads-u-margin-bottom--2p5"> | ||
Events</h2> | ||
{% for event in sortedEvents limit:1 %} | ||
{% assign node = event %} | ||
{% include "src/site/teasers/event.drupal.liquid" %} | ||
{% endfor %} | ||
<a onClick="recordEvent({ event: 'nav-secondary-button-click' });" | ||
class="usa-button usa-button-secondary vads-facility-hub-button vads-u-width--full medium-screen:vads-u-width--auto vads-u-font-size--md vads-u-margin--0" | ||
href="{{ entityUrl.path }}/events"> | ||
See all events <i class="fa fa-chevron-right va-l-font-size--12px" aria-hidden="true"></i> | ||
</a> | ||
</section> | ||
{% endif %} | ||
{% include "src/site/facilities/facility_social_links.drupal.liquid" with regionNickname = title %} | ||
|
||
</article> | ||
<!-- Last updated & feedback button--> | ||
{% include "src/site/includes/above-footer-elements.drupal.liquid" %} | ||
</div> | ||
</div> | ||
</main> | ||
{% include "src/site/includes/footer.html" %} | ||
{% include "src/site/includes/debug.drupal.liquid" %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
const { generatePaginatedQueries } = require('../individual-queries-helpers'); | ||
|
||
const draftContentOverride = process.env.UNPUBLISHED_CONTENT === 'true'; | ||
const entityElementsFromPages = require('./entityElementsForPages.graphql'); | ||
|
||
const vaPoliceFragment = ` | ||
fragment vaPoliceFragment on NodeVamcSystemVaPolice { | ||
${entityElementsFromPages} | ||
... on NodeVamcSystemVaPolice { | ||
fieldOffice { | ||
entity { | ||
... on NodeHealthCareRegionPage { | ||
entityLabel | ||
title | ||
} | ||
} | ||
} | ||
title | ||
entityLabel | ||
fieldCcFaq { | ||
fetched | ||
} | ||
fieldCcVaPoliceOverview { | ||
fetched | ||
} | ||
fieldCcTermDefinitionsNation { | ||
fetched | ||
} | ||
fieldCcPoliceReport{ | ||
fetched | ||
} | ||
fieldAdministration { | ||
entity{ | ||
name | ||
path { | ||
alias | ||
pid | ||
langcode | ||
pathauto | ||
} | ||
} | ||
} | ||
} | ||
}`; | ||
|
||
const getVaPoliceSlice = (operationName, offset, limit) => { | ||
return ` | ||
${vaPoliceFragment} | ||
query GetVaPolicePages${ | ||
!draftContentOverride ? '($onlyPublishedContent: Boolean!)' : '' | ||
} { | ||
nodeQuery( | ||
limit: ${limit} | ||
offset: ${offset} | ||
filter: { | ||
conditions: [ | ||
${ | ||
!draftContentOverride | ||
? '{ field: "status", value: ["1"], enabled: $onlyPublishedContent },' | ||
: '' | ||
} | ||
{ field: "type", value: ["vamc_system_va_police"] } | ||
] | ||
}) { | ||
entities { | ||
... vaPoliceFragment | ||
} | ||
} | ||
} | ||
`; | ||
}; | ||
|
||
const getVaPoliceQueries = entityCounts => { | ||
return generatePaginatedQueries({ | ||
operationNamePrefix: 'GetVaPolicePages', | ||
entitiesPerSlice: 25, | ||
totalEntities: entityCounts.data.vaPolicePage.count, | ||
getSlice: getVaPoliceSlice, | ||
}); | ||
}; | ||
|
||
module.exports = { | ||
fragment: vaPoliceFragment, | ||
getVaPoliceQueries, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters