Skip to content

Commit

Permalink
Don't build health care region pages for Manila
Browse files Browse the repository at this point in the history
  • Loading branch information
SnowboardTechie committed Jan 16, 2025
1 parent d3fadcd commit ccc3d9a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/site/stages/build/drupal/process-manila-pages.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* eslint-disable no-param-reassign */
const { ENTITY_BUNDLES } = require('../../../constants/content-modeling');

const MANILA_VA_CLINIC_ENTITY_ID = '1187';

function getManilaClinicUrl(path) {
Expand All @@ -13,6 +15,13 @@ function isManilaVAClinicPage(page) {
);
}

function isManillaVaRegionHomepage(page) {
return (
isManilaVAClinicPage(page) &&
page?.entityBundle === ENTITY_BUNDLES.HEALTH_CARE_REGION_PAGE
);
}

function updateManilaSystemLinks(page) {
// Update main URL path
if (page.entityUrl?.path) {
Expand Down Expand Up @@ -53,6 +62,10 @@ function processManilaPages(drupalData) {
if (isManilaVAClinicPage(page)) {
acc.manilaVAClinicPages.push(page);
} else {
// Federal Region Homepage should not be created for Manila VA Clinic
if (isManillaVaRegionHomepage(page)) {
return acc;
}
acc.otherPages.push(page);
}

Expand Down

0 comments on commit ccc3d9a

Please sign in to comment.