WIP
This commit is contained in:
parent
328a1d422a
commit
977785a069
2 changed files with 19 additions and 5 deletions
|
|
@ -16,7 +16,7 @@
|
|||
class="my-4"
|
||||
cmsWidgetName="AlertMilitaryBaseZipWidget"
|
||||
v-if="zipContainsMilitaryBase"
|
||||
alertClass="alert-warning" />
|
||||
alertClass="alert-warning" />
|
||||
<serviceTypeQuestion
|
||||
v-model="selectedServiceType"
|
||||
ref="serviceTypeQuestion"
|
||||
|
|
@ -72,9 +72,11 @@ export default {
|
|||
city: this.getServiceCityFromStore(),
|
||||
state: this.getServiceStateFromStore(),
|
||||
zipCode: this.getServiceZipCodeFromStore(),
|
||||
isVehicleProtected: null,
|
||||
isZipServiceableMobile: null,
|
||||
isZipServiceableInShop: null,
|
||||
isVehicleProtected: null,
|
||||
isGlassServiceableInShop: null,
|
||||
isRecalibrationServiceableInShop: null,
|
||||
isGlassServiceableMobile: null,
|
||||
isRecalibrationServiceableMobile: null,
|
||||
mobileFeePart: null,
|
||||
zipContainsMilitaryBase: false,
|
||||
selectedServiceType: null,
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<div class="service-type-question" aria-live="polite">
|
||||
<buttonQuestion
|
||||
:questionText="questionText"
|
||||
:answers="answersFromCms"
|
||||
:answers="answersToDisplay"
|
||||
:groupName="groupName"
|
||||
buttonTypeString="listCard"
|
||||
v-model="selectedValues"
|
||||
|
|
@ -47,6 +47,18 @@ export default {
|
|||
answersFromCms() {
|
||||
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: {
|
||||
get: function () {
|
||||
return this.modelValue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue