From 6debf9d1ec8ad48b050126724c7f0fd36ae2f235 Mon Sep 17 00:00:00 2001 From: Stephanie Smith Date: Thu, 29 Aug 2024 18:54:32 -0700 Subject: [PATCH] adding mapping for edu events and elastic search --- .../vue/src/components/BasePill/BasePill.vue | 7 +++- .../BlockLinkCard/BlockLinkCard.vue | 7 ++-- .../BlockLinkCardList/BlockLinkCardList.vue | 1 + .../DetailHeadline/DetailHeadline.vue | 5 +-- .../src/components/HeroLarge/HeroLarge.vue | 5 +-- .../src/components/HeroMedium/HeroMedium.vue | 5 +-- .../SearchResultCard/SearchResultCard.vue | 14 ++++++- .../SearchResultsList/SearchResultsList.vue | 38 +++++++++++++++++-- packages/vue/src/constants.ts | 11 +++--- packages/vue/src/interfaces.ts | 21 +++++----- .../PageEduEventDetail/PageEduEventDetail.vue | 5 +-- 11 files changed, 82 insertions(+), 37 deletions(-) diff --git a/packages/vue/src/components/BasePill/BasePill.vue b/packages/vue/src/components/BasePill/BasePill.vue index 19523bcd..c61d2ac2 100644 --- a/packages/vue/src/components/BasePill/BasePill.vue +++ b/packages/vue/src/components/BasePill/BasePill.vue @@ -18,6 +18,7 @@ const sizeMap: Attributes = { } interface BasePillProps { + text?: string variant?: string size?: string contentType?: string @@ -44,14 +45,16 @@ const metadataAttrs = computed(() => { } return { variant: undefined, label: undefined } }) +const theText = computed(() => { + return props.text || metadataAttrs.value.label +}) diff --git a/packages/vue/src/components/BlockLinkCard/BlockLinkCard.vue b/packages/vue/src/components/BlockLinkCard/BlockLinkCard.vue index 6cd5df4c..ecc16e95 100644 --- a/packages/vue/src/components/BlockLinkCard/BlockLinkCard.vue +++ b/packages/vue/src/components/BlockLinkCard/BlockLinkCard.vue @@ -47,9 +47,8 @@ :class="{ 'mb-2': !large, 'mb-4': large }" size="sm" :content-type="metadataType" - > - {{ (theItem as EventCardObject).eventType }} - + :text="(theItem as EventCardObject).eventType" + /> diff --git a/packages/vue/src/components/DetailHeadline/DetailHeadline.vue b/packages/vue/src/components/DetailHeadline/DetailHeadline.vue index 4d0f585b..45ad2e5f 100644 --- a/packages/vue/src/components/DetailHeadline/DetailHeadline.vue +++ b/packages/vue/src/components/DetailHeadline/DetailHeadline.vue @@ -9,9 +9,8 @@ :variant="pillColor" size="lg" class="mr-3" - > - {{ pillLabel }} - + :text="pillLabel" + />