Skip to content

Commit

Permalink
Merge branch 'main' into APPS-2300_remove-donor-filter
Browse files Browse the repository at this point in the history
  • Loading branch information
jendiamond authored Aug 4, 2023
2 parents 8cae2c1 + 9e04bec commit 4a793df
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
3 changes: 1 addition & 2 deletions gql/queries/ServiceOrResourceOrWorkshopDetail.gql
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@ query ServiceOrResourceOrWorkshopDetail($slug: [String!]) {
sectionHandle
slug
uri
button: buttonUrl {
buttonUrl {
... on buttonUrl_button_BlockType {
id
buttonText
buttonUrl
}
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"sass": "^1.45.2",
"sass-loader": "^10.1.1",
"ucla-library-design-tokens": "^5.4.1",
"ucla-library-website-components": "^2.38.0",
"ucla-library-website-components": "^2.38.1",
"vue-svg-loader": "^0.16.0",
"vue-template-compiler": "^2.6.12"
}
Expand Down
17 changes: 10 additions & 7 deletions pages/help/services-resources/_slug.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<template lang="html">
<template>
<main id="main" class="page page-service-detail">
<!-- ServiceOrResource Detail -->
<div v-if="page.serviceOrResource">
Expand Down Expand Up @@ -37,13 +37,13 @@
:category="page.serviceOrResource.type"
:title="page.serviceOrResource.title"
:text="page.serviceOrResource.text"
:to="parsedButtonTo"
:prompt="parsedButtonText"
:to="parsedButtonTo"
/>
</section-wrapper>

<section-wrapper theme="divider">
<divider-way-finder color="help" />
</section-wrapper>
<section-wrapper theme="divider">
<divider-way-finder />
</section-wrapper>

<page-anchor
Expand Down Expand Up @@ -93,6 +93,7 @@
:title="page.workshopSeries.title"
parent-title="Services & Resources"
/>

<banner-text
v-if="
page.workshopSeries &&
Expand Down Expand Up @@ -138,6 +139,7 @@
class="content"
:blocks="page.workshopSeries.blocks"
/>

<section-wrapper
v-if="page.workshopSeries.blocks.length > 0"
theme="divider"
Expand Down Expand Up @@ -214,6 +216,7 @@ import _get from "lodash/get"
import removeTags from "~/utils/removeTags"
// GQL
import SERVICE_OR_RESOURCE_OR_WORKSHOPSERIES_DETAIL from "~/gql/queries/ServiceOrResourceOrWorkshopDetail"
export default {
async asyncData({ $graphql, params, $elasticsearchplugin, error }) {
// Do not remove testing live preview
Expand Down Expand Up @@ -321,10 +324,10 @@ export default {
})
},
parsedButtonText() {
return _get(this.page.serviceOrResource, "button[0].buttonText", "")
return _get(this.page.serviceOrResource, "buttonUrl[0].buttonText", "")
},
parsedButtonTo() {
return _get(this.page.serviceOrResource, "button[0].buttonUrl", "")
return _get(this.page.serviceOrResource, "buttonUrl[0].buttonUrl", "")
},
associatedEvents() {
return this.page.workshopSeries.event.map((obj) => {
Expand Down

0 comments on commit 4a793df

Please sign in to comment.