Check for if 2nd tier should be shown wasn't being used. Fixed the preparation of the tiers so that it will be hidden when it should be.
This commit is contained in:
parent
90d56cc741
commit
5c17e51124
1 changed files with 23 additions and 24 deletions
|
|
@ -63,20 +63,28 @@
|
|||
},
|
||||
servicePackageAnswers() {
|
||||
if (!this.cmsWidgetName) return [];
|
||||
const cmsAnswersContent = [
|
||||
const cmsAnswersContent = [];
|
||||
cmsAnswersContent.push(
|
||||
{
|
||||
Name: 'TierOne',
|
||||
cmsWidgetName: 'EconomyServicePackage'
|
||||
},
|
||||
{
|
||||
Name: 'TierTwo',
|
||||
cmsWidgetName: 'StandardServicePackage'
|
||||
},
|
||||
}
|
||||
);
|
||||
if(this.shouldDisplayTierTwoPackage)
|
||||
{
|
||||
cmsAnswersContent.push(
|
||||
{
|
||||
Name: 'TierTwo',
|
||||
cmsWidgetName: 'StandardServicePackage'
|
||||
},
|
||||
);
|
||||
}
|
||||
cmsAnswersContent.push(
|
||||
{
|
||||
Name: 'TierThree',
|
||||
cmsWidgetName: 'PremiumServicePackage'
|
||||
}
|
||||
];
|
||||
);
|
||||
//if cms content has not yet loaded, skip
|
||||
if (this.getCmsContent(cmsAnswersContent[0].cmsWidgetName, 'HeaderText') == '') {
|
||||
return {};
|
||||
|
|
@ -96,27 +104,18 @@
|
|||
return this.lineItemsContainsPartType(partTypeStrings.RECALIBRATION);
|
||||
},
|
||||
frontWipersApplicableForTierTwo() {
|
||||
const store = useMainStore();
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType(
|
||||
partTypeStrings.FRONT_WIPER
|
||||
);
|
||||
const isRepair = store.order.damage.isRepair;
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(
|
||||
glassLocations.WINDSHIELD
|
||||
);
|
||||
if (frontWipersAreAvailable) {
|
||||
if (isRepair) {
|
||||
return true;
|
||||
} else {
|
||||
if (glassToReplaceContainsWindshield) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(glassLocations.WINDSHIELD);
|
||||
|
||||
if(frontWipersAreAvailable && (useMainStore().order.damage.isRepair || glassToReplaceContainsWindshield))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
},
|
||||
rearWiperApplicableForTierTwo() {
|
||||
const rearWiperIsAvailable = this.lineItemsContainsPartType(partTypeStrings.REAR_WIPER);
|
||||
|
|
|
|||
Loading…
Reference in a new issue