CSR-747 Cleanup

This commit is contained in:
Katie 2022-12-08 13:25:22 -05:00
parent ff5d46bd5f
commit 53adf2f939
9 changed files with 5 additions and 182 deletions

View file

@ -40,8 +40,7 @@ const storeActions = {
RUN_EXPERIMENTS_FOR_TRIGGER: "runExperimentsForTrigger",
CLEAR_VIN: "clearVin",
RESET_SAVE_SESSION_PROMISE: "resetSaveSessionPromise",
GET_PRICES_FOR_LINE_ITEMS: "getPricesForLineItems",
// DEPENDENCY MUTATIONS
RESET_DAMAGE_STATE_AND_DEPENDENCIES: "resetDamageAndDependencies",
RESET_REGISTRATION_STATE_AND_DEPENDENCIES: "resetRegistrationAndDependencies",

View file

@ -9,14 +9,7 @@ import { headerKeys } from "@/constants/header-keys";
export default {
callHttpClient({ method, endpoint, payload, logApiCall = true }) {
return new Promise((resolve, reject) => {
let cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
if (endpoint.includes("/order/")) {
cfDistroUrl = "https://localhost:44346";
} else if (endpoint.includes("/price/")) {
cfDistroUrl = "https://localhost:44372";
}
const cfDistroUrl = applicationConfig.CONSUMER_CF_DISTRO;
const payloadAndAnalyticsData = Object.assign({}, payload, { AppName: "FixMyGlass" });
const headers = {
[headerKeys.EXPERIMENT]: JSON.stringify(store.getters.experimentSettings),

View file

@ -49,7 +49,6 @@ export async function navigateToHeritageFunnel({ shouldSaveSession = true, loadi
await saveSession();
}
// TODO KO Can we trigger loading modal from here?
if (loadingModal && loadingModal.showModal) {
loadingModal.showModal();
}

View file

@ -208,7 +208,6 @@ export default {
this.displayNonServiceableZipAlert = false;
const payment = this.$store.getters.payment;
// TODO KO If coverageStatus is null, they haven't gone to heritage yet... I think
const vehicleChangedDuringPolicyLookupInHeritage =
payment.isInsurance && payment.insuranceCoverage.coverageStatus;
if (vehicleChangedDuringPolicyLookupInHeritage) {

View file

@ -8,7 +8,6 @@
:displayGenericVehicleImage="false" />
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" />
<div class="fade-on-route-transition sub-container make-tall">
<button @click="pricingTest">Price Test</button>
<textBlock
cmsWidgetName="paymentServiceOptionsCopy"
justifyText="center"
@ -115,55 +114,6 @@ export default {
next((vm) => {
vm.setCmsContent(cmsContent);
vm.availableLineItems = [
{
partNumber: "001",
Description: "Windshield with Recal",
partType: "Windshield",
Quantity: "1",
BasePartNumber: "001",
Color: "Green",
CanSafeliteRecalibrate: true,
price: 350.22,
},
{
partNumber: "SBB16",
description: "SAFELITE BEAM BLADE 16",
partType: "FRONT WIPER",
price: 32.64,
},
{
partNumber: "A DISPOSAL FEE",
partType: "DISPOSAL FEE",
price: 15.0,
},
{
partNumber: "SBB26",
description: "SAFELITE BEAM BLADE 26",
partType: "FRONT WIPER",
price: 53.04,
},
{
partNumber: "SBBR12A",
description: "SAFELITE REAR BLADE 12A",
partType: "REAR WIPER",
price: 24.48,
},
{
partNumber: "RAIN DEFENSE",
description: null,
partType: "RAIN DEFENSE",
price: 35.5,
},
{
partNumber: "RECAL STATIC",
Description: "Recalibration",
partType: "recalibration",
Quantity: "1",
price: 150.0,
},
];
vm.supportingItems = resultMap.supportingItems;
vm.availableLineItems = pricingResults;
vm.isInsuranceSelected = vm.getDefaultIsInsuranceSelectedValue();
@ -180,10 +130,6 @@ export default {
};
},
methods: {
pricingTest() {
const test = this.dispatchStoreAction(storeActions.GET_PRICES_FOR_LINE_ITEMS);
console.log({ test });
},
arePagePrerequisitesValid() {
return (
store.getters.order.damage.isRepair ||

View file

@ -329,7 +329,8 @@ export default {
navigateForward() {
const payment = store.getters.payment;
if (payment.isInsurance && payment.insuranceCoverage.coverageStatus === "VERIFIED") {
const vehicleChangedDuringPolicyLookupInHeritage = payment.isInsurance && payment.insuranceCoverage.coverageStatus && payment.insuranceCoverage.coverageStatus !== "";
if (vehicleChangedDuringPolicyLookupInHeritage) {
if (store.getters.damage.isRepair) {
this.$router.navigateWithSaving(
this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,

View file

@ -450,9 +450,6 @@ export default {
self.$store.commit(storeMutations.UPDATE_GLASS_PARTS, collectedGlassParts);
const payment = self.$store.getters.payment;
// TODO KO If coverageStatus is null, they haven't been to heritage yet...
// TODO KO what happens if you go to CCPolicyInfo (insurance), go back to vin-lookup, and go forward.
// Does it skip quote?
shouldGoToHeritageQuote ||
(payment.isInsurance && payment.insuranceCoverage.isVerified)
? navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal })

View file

@ -290,11 +290,6 @@ function navigateToUrl(url, optionalQuery = {}) {
externalUrl.searchParams.append(queryKey, optionalQuery[queryKey]);
}
externalUrl.searchParams.append(
"experiments",
"ConceptFunnel=ConceptFunnel_V1=ConceptFunnel_TEST=true"
);
window.location.assign(externalUrl);
}

View file

@ -360,7 +360,6 @@ export const mutations = {
state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance;
state.order.payment.insuranceCoverage.isVerified =
sessionInformation?.order.payment.insuranceCoverage.isVerified;
// TODO KO CSR-747 double check this
state.order.payment.insuranceCoverage.coverageStatus =
sessionInformation?.insuranceInfo?.coverageStatus;
@ -907,7 +906,7 @@ export const actions = {
const carId = context.getters.vehicle.carId;
const isRepair = context.getters.damage.isRepair;
const numberOfChips = context.getters.damage.numberOfChips;
const parentAccountNumber = "167132"; //context.getters.order.accountNumber.toString();
const parentAccountNumber = context.getters.order.accountNumber.toString();
return globalMethods.callHttpClient({
method: endpoints.GetSupportingItems.method,
endpoint: endpoints.GetSupportingItems.url,
@ -1063,111 +1062,6 @@ export const actions = {
});
},
// START Pricing service call actions
getPricesForLineItems(context) {
const vehicle = context.getters.vehicle;
const lineItems = {
glassParts: [
{
partNumber: "FW04186GTYN",
description: "solar, soundproofing, lane keep assist",
color: "Green Tint",
requiresRecalibration: true,
requiresCapabilityQuestions: false,
recalibrationType: "DUAL",
childParts: [
{
partNumber: "GGG 3563 KIT",
},
],
},
{
partNumber: "FD25457GTYN",
description: "solar, driver side, rear",
color: "Green Tint",
requiresRecalibration: false,
requiresCapabilityQuestions: false,
recalibrationType: "",
childParts: null,
},
{
partNumber: "FD27090GTYN",
description: "solar, driver side, front",
color: "Green Tint",
requiresRecalibration: false,
requiresCapabilityQuestions: false,
recalibrationType: "",
childParts: null,
},
{
partNumber: "FB25460GTYN",
description: "heated glass, solar",
color: "Green Tint",
requiresRecalibration: false,
requiresCapabilityQuestions: false,
recalibrationType: "",
childParts: null,
},
],
supportingItems: [
{
partNumber: "PART1",
description: "solar, soundproofing, lane keep assist",
color: "Green Tint",
requiresRecalibration: true,
requiresCapabilityQuestions: false,
recalibrationType: "DUAL",
childParts: [
{
partNumber: "GGG 3563 KIT",
},
],
},
{
partNumber: "PART2",
description: "solar, driver side, rear",
color: "Green Tint",
requiresRecalibration: false,
requiresCapabilityQuestions: false,
recalibrationType: "",
childParts: null,
},
],
};
const commaSeparatedPartNumbers = Object.values(context.getters.order.lineItems)
.map((lineItemGroup) => lineItemGroup.map((lineItem) => lineItem.partNumber))
.flat()
.join(",");
console.log({
lineItems: Object.values(lineItems)
.map((lineItemGroup) => lineItemGroup.map((lineItem) => lineItem.partNumber))
.flat()
.join(","),
commaSeparatedPartNumbers,
});
// context.getters.order.lineItems.map(lineItemGroup => )
return globalMethods
.callHttpClient({
method: endpoints.GetPriceForLineItems.method,
endpoint: `${endpoints.GetPriceForLineItems.url}?CTU=01833&carId=${vehicle.carId}&make=${vehicle.make}&model=${vehicle.model}&year=${vehicle.year}&EON=S169140586&zipCode=34785&lineItems=${commaSeparatedPartNumbers}&parentAccountNumber=167132`,
})
.then((response) => {
// Flatten location and name properties
// clear the state if the existing EON does not equal what is returned from loadSession
// if (context.state.order.eon && context.state.order.eon != response.data.eon) {
// context.commit(storeMutations.RESET_STATE);
// }
// context.commit(storeMutations.UPDATE_STATE_WITH_ORDER_INFORMATION, response.data);
return response;
});
},
// END Pricing service call actions
// Business domain actions
// Vehicle