CSR-731 | Demo-ready commit
This commit is contained in:
parent
631db97a15
commit
18b508a550
3 changed files with 54 additions and 100 deletions
|
|
@ -38,75 +38,17 @@
|
|||
typeStyle="caption"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">h1</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h1"
|
||||
class="mt-4"
|
||||
<modal
|
||||
cmsWidgetName="EstimateRainDefenseModal"
|
||||
/>
|
||||
<h3 style="m-0">h2</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h2"
|
||||
class="mt-4"
|
||||
<modal
|
||||
cmsWidgetName="EstimateFrontWiperModal"
|
||||
/>
|
||||
<h3 style="m-0">h3</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h3"
|
||||
class="mt-4"
|
||||
<modal
|
||||
cmsWidgetName="EstimateRearWiperModal"
|
||||
/>
|
||||
<h3 style="m-0">h4</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h4"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">h5</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h5"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">h6</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="h6"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">Body</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="body"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">Label</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="label"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">Small</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="small"
|
||||
class="mt-4"
|
||||
/>
|
||||
<h3 style="m-0">Caption</h3>
|
||||
<textBlock
|
||||
cmsWidgetName="quoteDisclaimer"
|
||||
justifyText="left"
|
||||
typeStyle="caption"
|
||||
class="mt-4"
|
||||
<modal
|
||||
cmsWidgetName="EstimateRecalModal"
|
||||
/>
|
||||
<funnel-footer
|
||||
cmsWidgetName="FunnelFooterWidget"
|
||||
|
|
@ -129,7 +71,9 @@ import funnelSubHeader from "@/common-components/funnel-sub-header/funnel-sub-he
|
|||
import cashOrInsuranceQuestion from "./cash-or-insurance-question/cash-or-insurance-question";
|
||||
import servicePackageQuestion from "./service-package-question/service-package-question";
|
||||
import textBlock from "@/common-components/text-block/text-block";
|
||||
import modal from "@/common-components/modal/modal";
|
||||
import store from "@/store";
|
||||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { Form } from "vee-validate";
|
||||
|
|
@ -157,53 +101,55 @@ export default {
|
|||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
vm.setCmsContent(cmsContent);
|
||||
vm.isInsuranceSelected = vm.getDefaultIsInsuranceSelectedValue();
|
||||
vm.selectedPackage = vm.getDefaultSelectedPackageValue();
|
||||
vm.lineItems = [
|
||||
{
|
||||
PartNumber : "001",
|
||||
Description : "Windshield with Recal",
|
||||
PartType : "Windshield",
|
||||
partType : "Windshield",
|
||||
Quantity : "1",
|
||||
BasePartNumber : "001",
|
||||
Color : "Green",
|
||||
CanSafeliteRecalibrate: true,
|
||||
Price : 350.00
|
||||
price : 350.22
|
||||
},
|
||||
{
|
||||
PartNumber : "002",
|
||||
Description : "Front Wipers",
|
||||
PartType : "frontWiper",
|
||||
Quantity : "1",
|
||||
Price : 35.00,
|
||||
"partNumber": "SBB16",
|
||||
"description": "SAFELITE BEAM BLADE 16",
|
||||
"partType": "PASSENGER FRONT WIPER",
|
||||
"price": 32.64,
|
||||
},
|
||||
{
|
||||
PartNumber : "003",
|
||||
Description : "Rear Wiper",
|
||||
PartType : "rearWiper",
|
||||
Quantity : "1",
|
||||
Price : 25.00,
|
||||
"partNumber": "SBB26",
|
||||
"description": "SAFELITE BEAM BLADE 26",
|
||||
"partType": "DRIVER FRONT WIPER",
|
||||
"price": 53.04,
|
||||
},
|
||||
{
|
||||
PartNumber : "004",
|
||||
Description : "Rain Defense",
|
||||
PartType : "rainDefense",
|
||||
Quantity : "1",
|
||||
Price : 30.00,
|
||||
"partNumber": "SBBR12A",
|
||||
"description": "SAFELITE REAR BLADE 12A",
|
||||
"partType": "REAR WIPER",
|
||||
"price": 24.48,
|
||||
},
|
||||
{
|
||||
"partNumber": "RAIN DEFENSE",
|
||||
"description": null,
|
||||
"partType": "RAIN DEFENSE",
|
||||
"price": 35.50,
|
||||
},
|
||||
{
|
||||
PartNumber : "005",
|
||||
Description : "Recalibration",
|
||||
PartType : "recalibration",
|
||||
partType : "recalibration",
|
||||
Quantity : "1",
|
||||
Price : 150.00,
|
||||
price : 150.00,
|
||||
},
|
||||
];
|
||||
vm.isInsuranceSelected = vm.getDefaultIsInsuranceSelectedValue();
|
||||
});
|
||||
},
|
||||
data(){
|
||||
return {
|
||||
cashOrInsuranceThreshhold: 600,
|
||||
pricingRequestResult: null,
|
||||
isInsuranceSelected: null,
|
||||
selectedPackage: null,
|
||||
|
|
@ -219,7 +165,7 @@ export default {
|
|||
if(defaultIsInsuranceSelectedValue != null) {
|
||||
return defaultIsInsuranceSelectedValue;
|
||||
} else {
|
||||
return this.economyPackagePrice > this.cashOrInsuranceThreshhold;
|
||||
return baseMixin.methods.getEconomyPackagePrice(this.lineItems) > 600;
|
||||
}
|
||||
},
|
||||
getDefaultSelectedPackageValue() {
|
||||
|
|
@ -246,6 +192,7 @@ export default {
|
|||
textBlock,
|
||||
cashOrInsuranceQuestion,
|
||||
servicePackageQuestion,
|
||||
modal,
|
||||
},
|
||||
|
||||
};
|
||||
|
|
|
|||
|
|
@ -69,10 +69,10 @@ export default {
|
|||
return this.getArrayOfListItemsFromRawCmsCopy(this.getBodyTextFromCms);
|
||||
},
|
||||
isRecalibrationOnOrder() {
|
||||
return this.lineItemsContainsPartType("recalibration");
|
||||
return this.lineItemsContainsPartType("RECALIBRATION");
|
||||
},
|
||||
frontWipersApplicableForStandard() {
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("frontWiper");
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("FRONT WIPER");
|
||||
const isRepair = this.$store.getters.order.damage.isRepair;
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation("Windshield");
|
||||
if (frontWipersAreAvailable) {
|
||||
|
|
@ -90,19 +90,19 @@ export default {
|
|||
}
|
||||
},
|
||||
rearWiperApplicableForStandard() {
|
||||
const rearWiperIsAvailable = this.lineItemsContainsPartType("rearWiper");
|
||||
const rearWiperIsAvailable = this.lineItemsContainsPartType("REAR WIPER");
|
||||
return this.glassToReplaceContainsGlassLocation("Rear") && rearWiperIsAvailable;
|
||||
},
|
||||
frontWipersApplicableForPremium() {
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("frontWiper");
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("FRONT WIPER");
|
||||
return frontWipersAreAvailable;
|
||||
},
|
||||
rearWiperApplicableForPremium() {
|
||||
const rearWiperIsAvailable = this.lineItemsContainsPartType("rearWiper");
|
||||
const rearWiperIsAvailable = this.lineItemsContainsPartType("REAR WIPER");
|
||||
return this.glassToReplaceContainsGlassLocation("Rear") && rearWiperIsAvailable;
|
||||
},
|
||||
rainDefenseApplicableForPremium() {
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("frontWiper");
|
||||
const frontWipersAreAvailable = this.lineItemsContainsPartType("FRONT WIPER");
|
||||
const glassToReplaceContainsWindshield = this.glassToReplaceContainsGlassLocation("Windshield");
|
||||
const glassToReplaceContainsRearGlass = this.glassToReplaceContainsGlassLocation("Rear");
|
||||
if(this.frontWipersApplicableForStandard) {
|
||||
|
|
@ -155,7 +155,7 @@ export default {
|
|||
return this[str];
|
||||
},
|
||||
lineItemsContainsPartType(partType) {
|
||||
const results = this.additionalData.lineItems.filter(lineItem => lineItem.PartType === partType);
|
||||
const results = this.additionalData.lineItems.filter(lineItem => lineItem.partType.toUpperCase().includes(partType));
|
||||
return !!results.length;
|
||||
},
|
||||
glassToReplaceContainsGlassLocation(glassLocation) {
|
||||
|
|
@ -176,8 +176,8 @@ export default {
|
|||
const priceFrontWipers = this.frontWipersApplicableForStandard;
|
||||
const priceRearWipers = this.rearWiperApplicableForStandard;
|
||||
this.additionalData.lineItems.forEach(item => {
|
||||
if ((priceFrontWipers && item.PartType === "frontWiper") || (priceRearWipers && item.PartType === "rearWiper")) {
|
||||
vapsPrice += item.Price;
|
||||
if ((priceFrontWipers && item.partType.toUpperCase().includes("FRONT WIPER")) || (priceRearWipers && item.partType.toUpperCase().includes("REAR WIPER"))) {
|
||||
vapsPrice += item.price;
|
||||
}
|
||||
});
|
||||
return vapsPrice;
|
||||
|
|
@ -188,8 +188,8 @@ export default {
|
|||
const priceRearWipers = this.rearWiperApplicableForPremium;
|
||||
const priceRainDefense = this.rainDefenseApplicableForPremium;
|
||||
this.additionalData.lineItems.forEach(item => {
|
||||
if ((priceFrontWipers && item.PartType === "frontWiper") || (priceRearWipers && item.PartType === "rearWiper") || (priceRainDefense && item.PartType === "rainDefense")) {
|
||||
vapsPrice += item.Price;
|
||||
if ((priceFrontWipers && item.partType.toUpperCase().includes("FRONT WIPER")) || (priceRearWipers && item.partType.toUpperCase().includes("REAR WIPER")) || (priceRainDefense && item.partType.toUpperCase().includes("RAIN DEFENSE"))) {
|
||||
vapsPrice += item.price;
|
||||
}
|
||||
});
|
||||
return vapsPrice;
|
||||
|
|
@ -290,6 +290,13 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.package-footer {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #D4281C;
|
||||
margin-left: -32px;
|
||||
}
|
||||
|
||||
.package-specs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ export default {
|
|||
return lineItem.PartType != "frontWiper" && lineItem.PartType != "rearWiper" && lineItem.PartType != "rainDefense";
|
||||
});
|
||||
let totalPrice = 0;
|
||||
nonVapsItems.forEach(item => totalPrice += item.Price);
|
||||
nonVapsItems.forEach(item => totalPrice += item.price);
|
||||
return totalPrice;
|
||||
}
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue