async hook with v-if, added state objects
This commit is contained in:
parent
7a5a537cd4
commit
a5ec3b322b
4 changed files with 62 additions and 11 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="select-car">
|
<div v-if="isPageReady" class="select-car">
|
||||||
<div class="select-car-form rounded text-center">
|
<div class="select-car-form rounded text-center">
|
||||||
<Header :text="headerTextWidgets[0].HeaderText" class="Header" />
|
<Header :text="headerTextWidgets[0].HeaderText" class="Header" />
|
||||||
<yearQuestion :questionText="radioQuestionWidgets[0].QuestionText" />
|
<yearQuestion :questionText="radioQuestionWidgets[0].QuestionText" />
|
||||||
|
|
@ -17,16 +17,16 @@ export default {
|
||||||
return {
|
return {
|
||||||
headerTextWidgets: {},
|
headerTextWidgets: {},
|
||||||
radioQuestionWidgets: {},
|
radioQuestionWidgets: {},
|
||||||
|
isPageReady: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
created() {
|
async created() {
|
||||||
let self = this;
|
const pageContent = await this.GetContentFromCms();
|
||||||
|
|
||||||
this.GetContentFromCms().then(response => {
|
this.headerTextWidgets = pageContent.HeaderTextWidget;
|
||||||
self.headerTextWidgets = response.HeaderTextWidget;
|
this.radioQuestionWidgets = pageContent.RadioQuestionWidget;
|
||||||
self.radioQuestionWidgets = response.RadioQuestionWidget;
|
this.isPageReady = true;
|
||||||
});
|
|
||||||
|
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<radioQuestion class="radioQuestion" :questionText="questionText" :answers="years" :chooseAnswer="selectYear" />
|
<radioQuestion class="radioQuestion" :questionText="questionText" :answers="years" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ export default {
|
||||||
pageDataFromCms[widget.Type] = [widget.Model];
|
pageDataFromCms[widget.Type] = [widget.Model];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
return pageDataFromCms;
|
return pageDataFromCms;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,59 @@ export default createStore({
|
||||||
storage: window.sessionStorage,
|
storage: window.sessionStorage,
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
state: {},
|
state: {
|
||||||
|
order: {
|
||||||
|
vehicle: {
|
||||||
|
year: 0,
|
||||||
|
make: '',
|
||||||
|
model: '',
|
||||||
|
style: '',
|
||||||
|
vin: '',
|
||||||
|
licensePlate: '',
|
||||||
|
carId: '',
|
||||||
|
evoxImageId: '',
|
||||||
|
hasSplitWindshieldOption: false,
|
||||||
|
hasBackglassSliderOption: false,
|
||||||
|
registration: {
|
||||||
|
rawAddress: '',
|
||||||
|
zipCode: '',
|
||||||
|
firstName: '',
|
||||||
|
lastName: '',
|
||||||
|
licensePlate: ''
|
||||||
|
},
|
||||||
|
damage: {
|
||||||
|
isRepair: false,
|
||||||
|
isReplacement: false,
|
||||||
|
numberOfChips: 0,
|
||||||
|
glassToReplace: [],
|
||||||
|
problemGlassQuestions: [],
|
||||||
|
problemMoldingQuestions: [],
|
||||||
|
problemPropertyQuestions: [],
|
||||||
|
},
|
||||||
|
items: [],
|
||||||
|
customer: {
|
||||||
|
emailAddress: '',
|
||||||
|
firstName: '',
|
||||||
|
lastName: '',
|
||||||
|
phoneNumber: {
|
||||||
|
isMobile: false,
|
||||||
|
optInSms: false,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
payment: {
|
||||||
|
isInsurance: false,
|
||||||
|
isCash: false,
|
||||||
|
},
|
||||||
|
referral: {
|
||||||
|
referralSeqNum: 0,
|
||||||
|
workOrderId: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
applicationUser: {
|
||||||
|
experiments: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
mutations: {},
|
mutations: {},
|
||||||
actions: {
|
actions: {
|
||||||
// Vehicle API Actions
|
// Vehicle API Actions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue