Merge pull request #330 from Safelite/feature/digital/SSR-500

Feature/digital/ssr 500
This commit is contained in:
Jason Wheeler 2023-06-01 09:31:09 -04:00 committed by GitHub
commit 0470771b4b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);