Skip to content

Commit

Permalink
Merge pull request #5 from phase2/Phase2-Sprint-6-2
Browse files Browse the repository at this point in the history
Added changes from PR #45
  • Loading branch information
aellison authored Oct 31, 2024
2 parents 039d08d + 644a0c1 commit 5e815c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/outline-yext-entities/outline-yext-entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ export class OutlineYextEntities extends LitElement {
case 'healthcareFacility':
case 'location':
return entity.photoGallery?.[0]?.image?.url || '';
case 'ce_person':
return entity.c_person_Photos || '';
default:
return '';
}
Expand Down
11 changes: 10 additions & 1 deletion src/components/outline-yext-vertical/teaser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function displayTeaser(vertical: string, result: verticalSearchResult) {
),
testimonial: () =>
testimonialTeaser(result.data.c_testimonial_Photo, title, url, cleanData),
person: () => defaultTeaser(title, url, highlightField('c_title')),
person: () => personTeaser(result.data.c_person_Photos, title, url, highlightField('c_title')),
page: () => defaultTeaser(highlightField('c_title'), url, cleanData),
locationsearch: () =>
locationTeaser(
Expand Down Expand Up @@ -86,6 +86,15 @@ export function defaultTeaser(title: string, url: string, snippet: string) {
></outline-teaser>`;
}

export function personTeaser(image: string, title: string, url: string, snippet: string) {
return html`<outline-teaser
url="${url}"
title="${title}"
image="${image}"
snippet="${snippet}"
></outline-teaser>`;
}

export function newsTeaser(
title: string,
url: string,
Expand Down

0 comments on commit 5e815c4

Please sign in to comment.