Modified to conform to SSR-315
This commit is contained in:
parent
276737f8c9
commit
e8c6250d14
1 changed files with 11 additions and 13 deletions
|
|
@ -54,7 +54,7 @@
|
|||
},
|
||||
servicePackageAnswers() {
|
||||
if (!this.cmsWidgetName) return [];
|
||||
const cmsAnswersContent = [
|
||||
let cmsAnswersContent = [
|
||||
{
|
||||
Name: 'TierOne',
|
||||
cmsWidgetName: 'EconomyServicePackage'
|
||||
|
|
@ -72,6 +72,10 @@
|
|||
if (this.getCmsContent(cmsAnswersContent[0].cmsWidgetName, 'HeaderText') == '') {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!this.shouldDisplayTierTwoPackage) {
|
||||
cmsAnswersContent = cmsAnswersContent.filter((answer) => answer.Name != packageNames.TIER_TWO);
|
||||
}
|
||||
const modifiedAnswers = cmsAnswersContent.map((answer) => ({
|
||||
value: answer.Name,
|
||||
buttonLabel: this.getHeaderTextFromCms(answer.cmsWidgetName),
|
||||
|
|
@ -88,13 +92,9 @@
|
|||
},
|
||||
frontWipersApplicableForTierTwo() {
|
||||
const store = useMainStore();
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType(
|
||||
partTypeStrings.FRONT_WIPER
|
||||
);
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType(partTypeStrings.FRONT_WIPER);
|
||||
const isRepair = store.order.damage.isRepair;
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(
|
||||
glassLocations.WINDSHIELD
|
||||
);
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation(glassLocations.WINDSHIELD);
|
||||
if (frontWipersAreAvailable) {
|
||||
if (isRepair) {
|
||||
return true;
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
},
|
||||
getPackagePriceString(packageName) {
|
||||
const formattedPriceFloat = parseFloat(this.getPackagePrice(packageName)).toFixed(2);
|
||||
return '$' + formattedPriceFloat;
|
||||
return '+$' + formattedPriceFloat;
|
||||
},
|
||||
getPackagePrice(packageName) {
|
||||
let priceFloat = 0;
|
||||
|
|
@ -178,11 +178,9 @@
|
|||
const priceFrontWipers = this.frontWipersApplicableForTierTwo;
|
||||
const priceRearWipers = this.rearWiperApplicableForTierTwo;
|
||||
this.nullSafeAvailableLineItems.forEach((item) => {
|
||||
if (
|
||||
(priceFrontWipers &&
|
||||
item.partType.toUpperCase() === partTypeStrings.FRONT_WIPER) ||
|
||||
(priceRearWipers && item.partType.toUpperCase() === partTypeStrings.REAR_WIPER)
|
||||
) {
|
||||
if ((priceFrontWipers &&
|
||||
item.partType.toUpperCase() === partTypeStrings.FRONT_WIPER) ||
|
||||
(priceRearWipers && item.partType.toUpperCase() === partTypeStrings.REAR_WIPER)) {
|
||||
vapsPrice += this.getTotalLineItemPrice(item);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue