Merge pull request #279 from Safelite/feature/digital/SSR-446
Set default header to account number 0 and loaded on nextclick to fix…
This commit is contained in:
commit
a272040248
1 changed files with 17 additions and 10 deletions
|
|
@ -53,12 +53,19 @@ export default({
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
methods: {
|
||||||
|
setupHeader(){
|
||||||
|
const answers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||||
|
if(Array.isArray(answers))
|
||||||
|
{
|
||||||
|
this.headerAnswers = answers.filter(x => x.AccountNumber == this.mainStore.issConfig.accountNumber)[0]
|
||||||
|
this.headerAnswers = !this.headerAnswers ? answers.filter(x => x.AccountNumber === '0')[0] : this.headerAnswers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const answers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
this.$nextTick(this.setupHeader);
|
||||||
this.headerAnswers = Array.isArray(answers)
|
|
||||||
? answers.filter(x => x.AccountNumber == this.mainStore.issConfig.accountNumber)[0]
|
|
||||||
: null;
|
|
||||||
|
|
||||||
// Check if alert event is on the bus
|
// Check if alert event is on the bus
|
||||||
const alertEvent = eventBus.readAndPopEventFromBus(
|
const alertEvent = eventBus.readAndPopEventFromBus(
|
||||||
globalEvents.Categories.GLOBAL_ALERT,
|
globalEvents.Categories.GLOBAL_ALERT,
|
||||||
|
|
@ -78,11 +85,11 @@ export default({
|
||||||
{
|
{
|
||||||
document.getElementsByTagName("body")[0].className += " " + clientOverrideClass;
|
document.getElementsByTagName("body")[0].className += " " + clientOverrideClass;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
menuModal,
|
menuModal,
|
||||||
alert
|
alert
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue