Merge branch 'develop' into feature/SSR-132
This commit is contained in:
commit
664060473d
1 changed files with 19 additions and 20 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,38 +41,36 @@ import { globalEvents } from "@/constants/events";
|
|||
computed: {
|
||||
imageSrc()
|
||||
{
|
||||
return this.answersToDisplay().AnswerImageUrl;
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].AnswerImageUrl : "";
|
||||
},
|
||||
altText()
|
||||
{
|
||||
return this.answersToDisplay().AltText;
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].AltText : "";
|
||||
},
|
||||
hexCode()
|
||||
{
|
||||
return this.answersToDisplay().HexCode;
|
||||
return this.headerAnswers[0] !== undefined ? this.headerAnswers[0].HexCode : "";
|
||||
},
|
||||
logoBackgroundStyle() {
|
||||
return {
|
||||
"background-color": this.headerAnswers[0] !== undefined ? this.headerAnswers[0].HexCode : "#ffffff00"
|
||||
};
|
||||
},
|
||||
headerAnswers()
|
||||
{
|
||||
return this.getCmsContent(this.cmsWidgetName, "Answers")
|
||||
}
|
||||
},
|
||||
methods:
|
||||
{
|
||||
answersToDisplay()
|
||||
{
|
||||
const filteredAnswers = Array.isArray(this.headerAnswers)
|
||||
? this.headerAnswers.filter((ans) => {
|
||||
const accountNumber = ans.AccountNumber;
|
||||
mounted() {
|
||||
|
||||
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
|
||||
);
|
||||
})
|
||||
: [];
|
||||
return filteredAnswers;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// Check if alert event is on the bus
|
||||
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