commit
93995c2b42
1 changed files with 27 additions and 5 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<div class="site-header d-flex justify-content-center align-items-center flex-column">
|
||||
<div class="site-header d-flex justify-content-center align-items-center flex-column" :style="logoBackgroundStyle">
|
||||
<img id="siteHeaderImage" class="img-fluid" :src="imageSrc" :alt="altText" />
|
||||
<menuModal/>
|
||||
</div>
|
||||
|
|
@ -32,6 +32,7 @@ import { globalEvents } from "@/constants/events";
|
|||
messageHeadline: "",
|
||||
type: "",
|
||||
},
|
||||
headerAnswers:Array
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
|
@ -40,15 +41,36 @@ import { globalEvents } from "@/constants/events";
|
|||
computed: {
|
||||
imageSrc()
|
||||
{
|
||||
return "https://digitalisscms.dev.safelite.io/images/default-source/default-album/logos/insuranceLogo.jpg";
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].AnswerImageUrl : "";
|
||||
},
|
||||
altText()
|
||||
{
|
||||
return "Logo";
|
||||
}
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].AltText : "";
|
||||
},
|
||||
hexCode()
|
||||
{
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].HexCode : "";
|
||||
},
|
||||
logoBackgroundStyle() {
|
||||
return {
|
||||
"background-color": this.headerAnswers[0] !== undefined ? this.headerAnswers[0].HexCode : "#FFFFFF"
|
||||
};
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// Check if alert event is on the bus
|
||||
|
||||
var cmsAnswers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||
const filteredAnswers = Array.isArray(cmsAnswers)
|
||||
? cmsAnswers.filter((ans) => {
|
||||
const accountNumber = Number(ans.AccountNumber);
|
||||
return (
|
||||
accountNumber === this.mainStore.order.accountNumber
|
||||
);
|
||||
})
|
||||
: [];
|
||||
this.headerAnswers = filteredAnswers;
|
||||
|
||||
// Check if alert event is on the bus
|
||||
const alertEvent = eventBus.readAndPopEventFromBus(
|
||||
globalEvents.Categories.GLOBAL_ALERT,
|
||||
globalEvents.SubCategories.PAGE_NOT_FOUND
|
||||
|
|
|
|||
Loading…
Reference in a new issue