Skip to content

Commit

Permalink
Merge branch 'main' into alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
ayumi-oxd committed Oct 15, 2024
2 parents 014957e + 26dae69 commit f2f1bf6
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ jobs:
- name: Git Checkout
uses: actions/checkout@v3

- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-alpha-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
- name: Set env
run: echo "SHORT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/deploy-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ jobs:
echo "::error::Git Tag not found, please double check input"
exit 1
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/on-tag-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ jobs:
echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/publish-gatsby.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ jobs:
docker push ${{ steps.vars.outputs.registry_image }}:${{ env.IMAGE_TAG }}
working-directory: gatsby

- name: Install OpenShift CLI tools
uses: redhat-actions/openshift-tools-installer@v1
with:
oc: "4.14"

- name: Login OpenShift
uses: redhat-actions/oc-login@v1
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ module.exports = ({ strapi }) => ({
populate: { "parkNameType": { fields: ["nameTypeId"] } }
},
parkFacilities: {
fields: ["isFacilityOpen", "isActive"],
fields: ["isFacilityOpen", "isActive", "publishedAt"],
populate: {
"facilityType": {
fields: ["facilityCode", "isActive", "facilityNumber"]
}
}
},
parkActivities: {
fields: ["isActivityOpen", "isActive"],
fields: ["isActivityOpen", "isActive", "publishedAt"],
populate: {
"activityType": {
fields: ["activityCode", "isActive", "activityNumber"]
}
}
},
parkCampingTypes: {
fields: ["isCampingOpen", "isActive"],
fields: ["isCampingOpen", "isActive", "publishedAt"],
populate: {
"campingType": {
fields: ["campingTypeCode", "isActive", "campingTypeNumber"]
Expand Down
24 changes: 12 additions & 12 deletions src/gatsby/src/utils/advisoryHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ import axios from "axios"
const qs = require('qs');

const getAdvisoryTypeFromUrl = () => {
let aType = "all", thisUrl = "", params
if (typeof window !== "undefined" && window.document) {
thisUrl = new URLSearchParams(window.location.search)
params = Object.fromEntries(thisUrl.entries())
}
if (params && params.type) {
aType = params.type
}
return aType
let aType = "all", thisUrl = "", params

if (typeof window !== "undefined" && window.document) {
thisUrl = new URLSearchParams(window.location.search)
params = Object.fromEntries(thisUrl.entries())
}

if (params && params.type) {
aType = params.type
}
return aType
}

const loadAdvisories = (apiBaseUrl, orcsId) => {
Expand All @@ -39,7 +39,7 @@ const WINTER_FULL_PARK_ADVISORY = {
title: "Limited access to this park during winter season",
description: `<p>Vehicle access to the park is not available during the winter season. Visitors
can still access the park on foot, but parking may not be available. Check
<a href="#camping">camping</a> and <a href="#facilities">facilities</a> for details and
<a href="#main-content">park opening dates</a>, <a href="#camping">camping</a>, and <a href="#facilities">facilities</a> for details and
opening dates.</p>`,
urgency: { sequence: 1, color: "blue" },
eventType: { eventType: "Winter access" }
Expand Down
6 changes: 3 additions & 3 deletions src/scheduler/elasticsearch/transformers/park/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ exports.createElasticPark = async function (park, photos) {
if (park?.parkCampingTypes?.length) {
const parkCampingTypes = park.parkCampingTypes
.filter(ct => {
return ct.isActive && ct.campingType?.isActive;
return ct.isActive && ct.campingType?.isActive && ct.publishedAt !== null;
})
.map(ct => {
park.hasCamping = true;
Expand All @@ -86,7 +86,7 @@ exports.createElasticPark = async function (park, photos) {
if (park?.parkFacilities?.length) {
park.parkFacilities = park.parkFacilities
.filter(f => {
return f.isActive && f.facilityType?.isActive;
return f.isActive && f.facilityType?.isActive && f.publishedAt !== null;
})
.map(f => {
return {
Expand All @@ -100,7 +100,7 @@ exports.createElasticPark = async function (park, photos) {
if (park?.parkActivities?.length) {
park.parkActivities = park.parkActivities
.filter(a => {
return a.isActive && a.activityType?.isActive;
return a.isActive && a.activityType?.isActive && a.publishedAt !== null;
})
.map(a => {
return {
Expand Down

0 comments on commit f2f1bf6

Please sign in to comment.