diff --git a/src/layouts/service-packages/service-package-question/service-package-question.vue b/src/layouts/service-packages/service-package-question/service-package-question.vue index 8b87774e..9f6779aa 100644 --- a/src/layouts/service-packages/service-package-question/service-package-question.vue +++ b/src/layouts/service-packages/service-package-question/service-package-question.vue @@ -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);