WIP
This commit is contained in:
parent
328a1d422a
commit
977785a069
2 changed files with 19 additions and 5 deletions
|
|
@ -73,8 +73,10 @@ export default {
|
||||||
state: this.getServiceStateFromStore(),
|
state: this.getServiceStateFromStore(),
|
||||||
zipCode: this.getServiceZipCodeFromStore(),
|
zipCode: this.getServiceZipCodeFromStore(),
|
||||||
isVehicleProtected: null,
|
isVehicleProtected: null,
|
||||||
isZipServiceableMobile: null,
|
isGlassServiceableInShop: null,
|
||||||
isZipServiceableInShop: null,
|
isRecalibrationServiceableInShop: null,
|
||||||
|
isGlassServiceableMobile: null,
|
||||||
|
isRecalibrationServiceableMobile: null,
|
||||||
mobileFeePart: null,
|
mobileFeePart: null,
|
||||||
zipContainsMilitaryBase: false,
|
zipContainsMilitaryBase: false,
|
||||||
selectedServiceType: null,
|
selectedServiceType: null,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<div class="service-type-question" aria-live="polite">
|
<div class="service-type-question" aria-live="polite">
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
:questionText="questionText"
|
:questionText="questionText"
|
||||||
:answers="answersFromCms"
|
:answers="answersToDisplay"
|
||||||
:groupName="groupName"
|
:groupName="groupName"
|
||||||
buttonTypeString="listCard"
|
buttonTypeString="listCard"
|
||||||
v-model="selectedValues"
|
v-model="selectedValues"
|
||||||
|
|
@ -47,6 +47,18 @@ export default {
|
||||||
answersFromCms() {
|
answersFromCms() {
|
||||||
return this.getCmsContent(this.cmsWidgetName, "Answers");
|
return this.getCmsContent(this.cmsWidgetName, "Answers");
|
||||||
},
|
},
|
||||||
|
answersToDisplay() {
|
||||||
|
let filteredAnswers;
|
||||||
|
if (this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile && this.isGlassServiceableInShop && this.isRecalibrationServiceableInShop) {
|
||||||
|
filteredAnswers = this.answersFromCms;
|
||||||
|
} else if (this.isGlassServiceableMobile && this.isRecalibrationServiceableMobile && !this.isGlassServiceableInShop && !this.isRecalibrationServiceableInShop) {
|
||||||
|
filteredAnswers = this.answersFromCms.filter(answer => answer.Name == "InShop" || answer.Name == "DropOff");
|
||||||
|
} else if (this.isGlassServiceableInShop && this.isRecalibrationServiceableInShop && !this.isGlassServiceableMobile && !this.isRecalibrationServiceableMobile) {
|
||||||
|
filteredAnswers = this.answersFromCms.filter(answer => answer.Name == "Mobile");
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredAnswers;
|
||||||
|
},
|
||||||
selectedValues: {
|
selectedValues: {
|
||||||
get: function () {
|
get: function () {
|
||||||
return this.modelValue;
|
return this.modelValue;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue