Merge pull request #330 from Safelite/feature/digital/SSR-500
Feature/digital/ssr 500
This commit is contained in:
commit
0470771b4b
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