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() {
|
||||
const answers = this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||
this.headerAnswers = Array.isArray(answers)
|
||||
? answers.filter(x => x.AccountNumber == this.mainStore.issConfig.accountNumber)[0]
|
||||
: null;
|
||||
|
||||
this.$nextTick(this.setupHeader);
|
||||
|
||||
// Check if alert event is on the bus
|
||||
const alertEvent = eventBus.readAndPopEventFromBus(
|
||||
globalEvents.Categories.GLOBAL_ALERT,
|
||||
|
|
@ -78,11 +85,11 @@ export default({
|
|||
{
|
||||
document.getElementsByTagName("body")[0].className += " " + clientOverrideClass;
|
||||
}
|
||||
},
|
||||
components: {
|
||||
menuModal,
|
||||
alert
|
||||
},
|
||||
},
|
||||
components: {
|
||||
menuModal,
|
||||
alert
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue