commit
This commit is contained in:
parent
3d96b1b09b
commit
d4b307dbf7
1 changed files with 25 additions and 2 deletions
|
|
@ -40,13 +40,36 @@ import { globalEvents } from "@/constants/events";
|
||||||
computed: {
|
computed: {
|
||||||
imageSrc()
|
imageSrc()
|
||||||
{
|
{
|
||||||
return this.getCmsContent(this.cmsWidgetName, "LogoImageURL")
|
return this.answersToDisplay().AnswerImageUrl;
|
||||||
},
|
},
|
||||||
altText()
|
altText()
|
||||||
{
|
{
|
||||||
return this.getCmsContent(this.cmsWidgetName, "AltText")
|
return this.answersToDisplay().AltText;
|
||||||
|
},
|
||||||
|
hexCode()
|
||||||
|
{
|
||||||
|
return this.answersToDisplay().HexCode;
|
||||||
|
},
|
||||||
|
headerAnswers()
|
||||||
|
{
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, "Answers")
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods:
|
||||||
|
{
|
||||||
|
answersToDisplay()
|
||||||
|
{
|
||||||
|
const filteredAnswers = Array.isArray(this.headerAnswers)
|
||||||
|
? this.headerAnswers.filter((ans) => {
|
||||||
|
const accountNumber = ans.AccountNumber;
|
||||||
|
return (
|
||||||
|
accountNumber === this.mainStore.order.accountNumber
|
||||||
|
);
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
return filteredAnswers;
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// Check if alert event is on the bus
|
// Check if alert event is on the bus
|
||||||
const alertEvent = eventBus.readAndPopEventFromBus(
|
const alertEvent = eventBus.readAndPopEventFromBus(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue