CSR-747 WIP

This commit is contained in:
Katie 2022-12-05 15:50:30 -05:00
parent 3690ac7b4b
commit aa875c84d7
13 changed files with 42 additions and 37 deletions

View file

@ -124,8 +124,8 @@ const endpoints = {
},
GetPriceForLineItems: {
url: "/price/api/v1/price/order-items",
method: "GET"
}
method: "GET",
},
};
export { endpoints };

View file

@ -13,8 +13,7 @@ export default {
if (endpoint.includes("/order/")) {
cfDistroUrl = "https://localhost:44346";
}
else if (endpoint.includes("/price/")) {
} else if (endpoint.includes("/price/")) {
cfDistroUrl = "https://localhost:44372";
}

View file

@ -41,7 +41,7 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}, existingHerita
Used to navigate to the heritage funnel with the correct query string and url.
*/
export async function navigateToHeritageFunnel({shouldSaveSession = true, loadingModal}) {
export async function navigateToHeritageFunnel({ shouldSaveSession = true, loadingModal }) {
// Create the order (or save existing order) when navigating to Heritage Funnel.
if (shouldSaveSession) {
await saveSession();
@ -49,14 +49,14 @@ export async function navigateToHeritageFunnel({shouldSaveSession = true, loadin
// TODO KO Can we trigger loading modal from here?
if (loadingModal && loadingModal.showModal) {
loadingModal.showModal()
loadingModal.showModal();
}
router.navigateToExternalUrl(externalUrls.HERITAGE_FUNNEL, {
corid: store.getters.order.referralCorrelationId,
src: "concept-funnel",
conceptsqid: store.getters.applicationUser.savedSessionId,
isInsurance: store.getters.payment.isInsurance
isInsurance: store.getters.payment.isInsurance,
});
}

View file

@ -162,12 +162,11 @@ export default {
price: 150.0,
},
];
vm.supportingItems = resultMap.supportingItems;
vm.availableLineItems = pricingResults;
vm.isInsuranceSelected = vm.getDefaultIsInsuranceSelectedValue();
vm.dispatchStoreAction(storeActions.SAVE_IS_INSURANCE, vm.isInsuranceSelected);
});
},
@ -180,9 +179,9 @@ export default {
};
},
methods: {
pricingTest() {
pricingTest() {
const test = this.dispatchStoreAction(storeActions.GET_PRICES_FOR_LINE_ITEMS);
console.log({test})
console.log({ test });
},
arePagePrerequisitesValid() {
return true;
@ -212,7 +211,7 @@ export default {
false
);
navigateToHeritageFunnel({loadingModal: this.$refs.loadingModal});
navigateToHeritageFunnel({ loadingModal: this.$refs.loadingModal });
},
},
components: {
@ -225,7 +224,7 @@ export default {
cashOrInsuranceQuestion,
servicePackageQuestion,
modal,
loadingModal
loadingModal,
},
};
</script>

View file

@ -315,9 +315,10 @@ export default {
return !!partTypeMatches.length;
},
glassToReplaceContainsGlassLocation(glassLocation) {
const glassLocationMatches = this.$store.getters.order.damage.glassToReplace?.filter(
(glassToReplace) => glassToReplace.glassLocation === glassLocation
) ?? [];
const glassLocationMatches =
this.$store.getters.order.damage.glassToReplace?.filter(
(glassToReplace) => glassToReplace.glassLocation === glassLocation
) ?? [];
return !!glassLocationMatches.length;
},
},

View file

@ -226,7 +226,7 @@ export default {
funnelSubHeader,
funnelFooter,
alert,
loadingModal
loadingModal,
},
};
</script>

View file

@ -462,7 +462,7 @@ export default {
vinInformation,
textBlock,
Form,
loadingModal
loadingModal,
},
};
</script>

View file

@ -458,13 +458,14 @@ export default {
// save to store lineItems.glassParts
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.
// 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})
shouldGoToHeritageQuote ||
(payment.isInsurance && payment.insuranceCoverage.isVerified)
? navigateToHeritageFunnel({ loadingModal: self.$refs.loadingModal })
: self.$router.navigateWithSaving(
self.navigationScenarios.CLICKED_FORWARD_WITH_NO_MORE_QUESTIONS,
self.$route

View file

@ -51,7 +51,7 @@ const routes = [
}
if (getFunnelCookie()?.SuppressConceptFunnel) {
await navigateToHeritageFunnel({shouldSaveSession: false});
await navigateToHeritageFunnel({ shouldSaveSession: false });
return next(false);
}
@ -66,7 +66,7 @@ const routes = [
// clear the saveSessionPromise - if it exists in the vuex store but a new instance was created
// the saveSessionPromise will no longer point to a valid promise
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
const loadSessionResponse = await loadSessionIfPresent();
const pageToRedirectTo = await getPageToRouteExistingOrderTo(
to,

View file

@ -20,8 +20,10 @@ const navigationScenarios = {
// Vin selection
CLICKED_BACK_WITH_VIN: "CLICKED_BACK_WITH_VIN",
CLICKED_FORWARD_WITH_VIN: "CLICKED_FORWARD_WITH_VIN",
CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE: "CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE",
CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE: "CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE",
CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE:
"CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE",
CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE:
"CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE",
CLICKED_FORWARD_WITHOUT_VIN: "CLICKED_FORWARD_WITHOUT_VIN",
CLICKED_FORWARD_WITH_MULTIPLE_VEHICLES: "CLICKED_FORWARD_WITH_MULTIPLE_VEHICLES",
SELECTED_VIN_WITH_MISMATCHED_GLASS: "SELECTED_VIN_WITH_MISMATCHED_GLASS",

View file

@ -68,11 +68,13 @@ const routingTable = function (store) {
destinationFmgPageValue: fmgPageValues.ESTIMATE,
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
scenario:
navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
destinationFmgPageValue: fmgPageValues.ESTIMATE,
},
{
scenario: navigationScenarios.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
scenario:
navigationScenarios.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
destinationFmgPageValue: fmgPageValues.VIN_LOOKUP,
},
],

View file

@ -367,7 +367,8 @@ export const mutations = {
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
state.order.payment.insuranceCoverage.coverageStatus =
sessionInformation?.insuranceInfo.coverageStatus;
state.order.customer.emailAddress = sessionInformation.order.customer.emailAddress;
state.order.existingPromoCode = sessionInformation.order.existingPromoCode;
@ -914,7 +915,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 = "167132"; //context.getters.order.accountNumber.toString();
return globalMethods.callHttpClient({
method: endpoints.GetSupportingItems.method,
endpoint: endpoints.GetSupportingItems.url,

View file

@ -127,12 +127,12 @@ html {
background-size: 16px 12px;
}
.has-search-icon {
button[type="submit"] {
background-color: $red-100;
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.7817 14.7328L11.8252 10.7762C12.8833 9.45005 13.3936 7.76911 13.2513 6.07849C13.1091 4.38788 12.325 2.81587 11.0601 1.6852C9.79515 0.554524 8.14538 -0.0490261 6.44946 -0.00154744C4.75353 0.0459312 3.14012 0.740836 1.94045 1.94051C0.740775 3.14018 0.0458701 4.75359 -0.00160848 6.44952C-0.0490871 8.14545 0.554463 9.79521 1.68514 11.0601C2.81581 12.325 4.38782 13.1091 6.07843 13.2514C7.76905 13.3937 9.44999 12.8834 10.7762 11.8252L14.7349 15.7839C14.8044 15.8527 14.8869 15.907 14.9774 15.9439C15.068 15.9808 15.165 15.9995 15.2628 15.9989C15.3606 15.9983 15.4573 15.9784 15.5475 15.9405C15.6376 15.9025 15.7194 15.8471 15.7881 15.7776C15.8568 15.708 15.9112 15.6256 15.9481 15.535C15.985 15.4444 16.0036 15.3474 16.0031 15.2496C16.0025 15.1518 15.9826 15.0551 15.9446 14.965C15.9067 14.8748 15.8513 14.7931 15.7817 14.7243V14.7328ZM6.63737 11.7913C5.61803 11.7913 4.62157 11.4891 3.77402 10.9228C2.92646 10.3564 2.26587 9.5515 1.87578 8.60975C1.4857 7.668 1.38363 6.63172 1.5825 5.63196C1.78136 4.6322 2.27222 3.71386 2.99301 2.99307C3.7138 2.27229 4.63214 1.78142 5.6319 1.58256C6.63166 1.38369 7.66793 1.48576 8.60969 1.87585C9.55144 2.26593 10.3564 2.92652 10.9227 3.77408C11.489 4.62163 11.7913 5.61809 11.7913 6.63743C11.7896 8.00382 11.2461 9.31376 10.2799 10.2799C9.3137 11.2461 8.00376 11.7897 6.63737 11.7913Z' fill='%23d4281c'/%3E%3C/svg%3E%0A");
border: 1px solid $red;
border-left: none;
}
button[type="submit"] {
background-color: $red-100;
background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15.7817 14.7328L11.8252 10.7762C12.8833 9.45005 13.3936 7.76911 13.2513 6.07849C13.1091 4.38788 12.325 2.81587 11.0601 1.6852C9.79515 0.554524 8.14538 -0.0490261 6.44946 -0.00154744C4.75353 0.0459312 3.14012 0.740836 1.94045 1.94051C0.740775 3.14018 0.0458701 4.75359 -0.00160848 6.44952C-0.0490871 8.14545 0.554463 9.79521 1.68514 11.0601C2.81581 12.325 4.38782 13.1091 6.07843 13.2514C7.76905 13.3937 9.44999 12.8834 10.7762 11.8252L14.7349 15.7839C14.8044 15.8527 14.8869 15.907 14.9774 15.9439C15.068 15.9808 15.165 15.9995 15.2628 15.9989C15.3606 15.9983 15.4573 15.9784 15.5475 15.9405C15.6376 15.9025 15.7194 15.8471 15.7881 15.7776C15.8568 15.708 15.9112 15.6256 15.9481 15.535C15.985 15.4444 16.0036 15.3474 16.0031 15.2496C16.0025 15.1518 15.9826 15.0551 15.9446 14.965C15.9067 14.8748 15.8513 14.7931 15.7817 14.7243V14.7328ZM6.63737 11.7913C5.61803 11.7913 4.62157 11.4891 3.77402 10.9228C2.92646 10.3564 2.26587 9.5515 1.87578 8.60975C1.4857 7.668 1.38363 6.63172 1.5825 5.63196C1.78136 4.6322 2.27222 3.71386 2.99301 2.99307C3.7138 2.27229 4.63214 1.78142 5.6319 1.58256C6.63166 1.38369 7.66793 1.48576 8.60969 1.87585C9.55144 2.26593 10.3564 2.92652 10.9227 3.77408C11.489 4.62163 11.7913 5.61809 11.7913 6.63743C11.7896 8.00382 11.2461 9.31376 10.2799 10.2799C9.3137 11.2461 8.00376 11.7897 6.63737 11.7913Z' fill='%23d4281c'/%3E%3C/svg%3E%0A");
border: 1px solid $red;
border-left: none;
}
}
}
}