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