Revert "Revert "Merge branch 'develop' into feature/CSR-1382-loose-ends""
This reverts commit 936bc95957.
This commit is contained in:
parent
d8dd23e2c9
commit
cfedf248b7
11 changed files with 84 additions and 56 deletions
|
|
@ -93,6 +93,7 @@ const storeActions = {
|
||||||
SAVE_PIA_ERROR_CODE: "savePiaErrorCode",
|
SAVE_PIA_ERROR_CODE: "savePiaErrorCode",
|
||||||
SAVE_PIA_WORK_ORDER: "savePiaWorkOrder",
|
SAVE_PIA_WORK_ORDER: "savePiaWorkOrder",
|
||||||
SAVE_CCTOKEN: "saveCCToken",
|
SAVE_CCTOKEN: "saveCCToken",
|
||||||
|
SAVE_PAYPAL_TOKEN: "savePaypalToken",
|
||||||
};
|
};
|
||||||
|
|
||||||
export { storeActions };
|
export { storeActions };
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ const storeMutations = {
|
||||||
UPDATE_PIA_ERROR_CODE: "updatePiaErrorCode",
|
UPDATE_PIA_ERROR_CODE: "updatePiaErrorCode",
|
||||||
UPDATE_PIA_WORK_ORDER: "updatePiaWorkOrder",
|
UPDATE_PIA_WORK_ORDER: "updatePiaWorkOrder",
|
||||||
UPDATE_CCTOKEN: "updateCCToken",
|
UPDATE_CCTOKEN: "updateCCToken",
|
||||||
|
UPDATE_PAYPAL_TOKEN: "updatePaypalToken",
|
||||||
|
|
||||||
// VEHICLE MUTATIONS
|
// VEHICLE MUTATIONS
|
||||||
UPDATE_YEAR: "updateYear",
|
UPDATE_YEAR: "updateYear",
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6 col-xl-4">
|
||||||
<vehicleBanner
|
<vehicleBanner
|
||||||
cmsWidgetName="VehicleBannerWidget"
|
cmsWidgetName="VehicleBannerWidget"
|
||||||
:displayGenericVehicleImage="false" />
|
:displayGenericVehicleImage="false" />
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,6 @@ export default {
|
||||||
cartLineItems: [],
|
cartLineItems: [],
|
||||||
availableLineItems: [],
|
availableLineItems: [],
|
||||||
paymentMethodInternalModel: this.getPaymentMethodFromStore(),
|
paymentMethodInternalModel: this.getPaymentMethodFromStore(),
|
||||||
displayPiaAlert: this.getPiaAlert(),
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
@ -249,9 +248,6 @@ export default {
|
||||||
packageReqs && serviceLocationReqs && isInsuranceSet && scheduleReqs && customerReqs
|
packageReqs && serviceLocationReqs && isInsuranceSet && scheduleReqs && customerReqs
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
getPiaAlert() {
|
|
||||||
return store.getters.order.payment.piaErrorCode ? true : false;
|
|
||||||
},
|
|
||||||
getPaymentMethodFromStore() {
|
getPaymentMethodFromStore() {
|
||||||
const isPia = store.getters.order.payment.isPia;
|
const isPia = store.getters.order.payment.isPia;
|
||||||
|
|
||||||
|
|
@ -270,24 +266,29 @@ export default {
|
||||||
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
this.$router.navigateWithoutSaving(this.navigationScenarios.CLICKED_BACK, this.$route);
|
||||||
},
|
},
|
||||||
async forwardButtonAction() {
|
async forwardButtonAction() {
|
||||||
|
await this.dispatchStoreAction(
|
||||||
|
storeActions.SAVE_PAYMENT_METHOD_CHOICE,
|
||||||
|
this.paymentMethod,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
||||||
|
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_PROMOS, this.lineItems.promos, false);
|
||||||
|
|
||||||
switch (this.paymentMethod) {
|
switch (this.paymentMethod) {
|
||||||
case paymentMethods.CREDIT_CARD:
|
case paymentMethods.CREDIT_CARD:
|
||||||
this.piaSetup("cc");
|
this.piaSetup(this.paymentMethod);
|
||||||
break;
|
break;
|
||||||
case paymentMethods.PAYPAL:
|
case paymentMethods.PAYPAL:
|
||||||
this.piaSetup("pp");
|
this.piaSetup(this.paymentMethod);
|
||||||
break;
|
break;
|
||||||
case paymentMethods.AFTERPAY:
|
case paymentMethods.AFTERPAY:
|
||||||
this.piaSetup("ap");
|
this.piaSetup(this.paymentMethod);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
this.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
||||||
this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
||||||
this.dispatchStoreAction(
|
|
||||||
storeActions.SAVE_PAYMENT_METHOD_CHOICE,
|
|
||||||
this.paymentMethod,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
await submitWorkOrder({ pageNameToLog: "payment-method" });
|
await submitWorkOrder({ pageNameToLog: "payment-method" });
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(
|
||||||
this.navigationScenarios.CLICKED_FORWARD,
|
this.navigationScenarios.CLICKED_FORWARD,
|
||||||
|
|
@ -300,11 +301,6 @@ export default {
|
||||||
|
|
||||||
// since we're leaving the site for pia, clear any save session promises that we will not be able to resolve when we return
|
// since we're leaving the site for pia, clear any save session promises that we will not be able to resolve when we return
|
||||||
await this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
await this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||||
await this.dispatchStoreAction(
|
|
||||||
storeActions.SAVE_PAYMENT_METHOD_CHOICE,
|
|
||||||
payNowType,
|
|
||||||
false
|
|
||||||
);
|
|
||||||
|
|
||||||
// make sure pia error codes are reset
|
// make sure pia error codes are reset
|
||||||
this.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
this.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
||||||
|
|
@ -357,6 +353,9 @@ export default {
|
||||||
|
|
||||||
return this.paymentMethodInternalModel;
|
return this.paymentMethodInternalModel;
|
||||||
},
|
},
|
||||||
|
displayPiaAlert() {
|
||||||
|
return store.getters.order.payment.piaErrorCode ? true : false;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
customCtaCopy(newValue) {
|
customCtaCopy(newValue) {
|
||||||
|
|
|
||||||
|
|
@ -13,18 +13,13 @@ import store from "@/store";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
import loadingModal from "@/fmg-components/loading-modal/loading-modal.vue";
|
||||||
import { Form } from "vee-validate";
|
import { Form } from "vee-validate";
|
||||||
|
import { paymentMethods } from "@/constants/payment-method-constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "payment-pia-return",
|
name: "payment-pia-return",
|
||||||
async mounted() {
|
async mounted() {
|
||||||
this.$refs.loadingModal.showModal();
|
this.$refs.loadingModal.showModal();
|
||||||
// from paypal
|
|
||||||
const piaError = getQuerystringParameter(queryStrings.ERROR);
|
const piaError = getQuerystringParameter(queryStrings.ERROR);
|
||||||
const token = getQuerystringParameter(queryStrings.TOKEN);
|
|
||||||
const payerId = getQuerystringParameter(queryStrings.PAYERID);
|
|
||||||
|
|
||||||
// from credit card
|
|
||||||
const subscriptionID = getQuerystringParameter(queryStrings.SUBSCRIPTIONID);
|
|
||||||
|
|
||||||
if (piaError) {
|
if (piaError) {
|
||||||
console.log("Error during payment: " + piaError);
|
console.log("Error during payment: " + piaError);
|
||||||
|
|
@ -35,25 +30,26 @@ export default {
|
||||||
);
|
);
|
||||||
this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_ERROR, this.$route);
|
this.$router.navigateWithoutSaving(this.navigationScenarios.PIA_ERROR, this.$route);
|
||||||
} else {
|
} else {
|
||||||
if (token && payerId) {
|
switch (store.getters.order.payment.piaType) {
|
||||||
await this.processPaypalResponse();
|
case paymentMethods.CREDIT_CARD:
|
||||||
} else {
|
case paymentMethods.AFTERPAY:
|
||||||
if (subscriptionID) {
|
await this.processCreditCardResponse();
|
||||||
await this.processCreditCardResponse(subscriptionID);
|
break;
|
||||||
} else {
|
case paymentMethods.PAYPAL:
|
||||||
console.log(
|
await this.processPaypalResponse();
|
||||||
"Error during payment: " + token + " : " + payerId + " : " + subscriptionID
|
break;
|
||||||
);
|
default:
|
||||||
|
var msg = "Unknown Pia type: " + store.getters.order.payment.piaType;
|
||||||
|
console.log(msg);
|
||||||
baseMixin.methods.dispatchStoreAction(
|
baseMixin.methods.dispatchStoreAction(
|
||||||
storeActions.SAVE_PIA_ERROR_CODE,
|
storeActions.SAVE_PIA_ERROR_CODE,
|
||||||
piaError,
|
msg,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
this.$router.navigateWithoutSaving(
|
this.$router.navigateWithoutSaving(
|
||||||
this.navigationScenarios.PIA_ERROR,
|
this.navigationScenarios.PIA_ERROR,
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -62,12 +58,16 @@ export default {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
async processPaypalResponse() {
|
async processPaypalResponse() {
|
||||||
|
const token = getQuerystringParameter(queryStrings.TOKEN);
|
||||||
|
const payerId = getQuerystringParameter(queryStrings.PAYERID);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
||||||
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PAYPAL_TOKEN, token, false);
|
||||||
|
|
||||||
await this.saveAndSubmitWorkOrder();
|
await this.saveAndSubmitWorkOrder();
|
||||||
},
|
},
|
||||||
async processCreditCardResponse(subscriptionID) {
|
async processCreditCardResponse() {
|
||||||
|
const subscriptionID = getQuerystringParameter(queryStrings.SUBSCRIPTIONID);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PIA_ERROR_CODE, null, false);
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_WORK_ORDER_FLAG, true, false);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ import { externalUrls } from "@/router/router-constants/externalUrl-values";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { applicationConfig } from "@/constants/application-config";
|
import { applicationConfig } from "@/constants/application-config";
|
||||||
|
import { paymentMethods } from "@/constants/payment-method-constants";
|
||||||
import baseMixin from "@/mixins/base-mixin.js";
|
import baseMixin from "@/mixins/base-mixin.js";
|
||||||
|
|
||||||
// Validation
|
// Validation
|
||||||
|
|
@ -286,7 +287,16 @@ export default {
|
||||||
: store.getters.order.serviceLocation.provider.address.zipCode;
|
: store.getters.order.serviceLocation.provider.address.zipCode;
|
||||||
},
|
},
|
||||||
getPaymentType() {
|
getPaymentType() {
|
||||||
return store.getters.order.payment.piaType;
|
switch (store.getters.order.payment.piaType) {
|
||||||
|
case paymentMethods.AFTERPAY:
|
||||||
|
return "ap";
|
||||||
|
case paymentMethods.CREDIT_CARD:
|
||||||
|
return "cc";
|
||||||
|
case paymentMethods.PAYPAL:
|
||||||
|
return "pp";
|
||||||
|
default:
|
||||||
|
return store.getters.payment.piaType;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
getHeaderLine1() {
|
getHeaderLine1() {
|
||||||
if (!this.isPaypal()) {
|
if (!this.isPaypal()) {
|
||||||
|
|
@ -316,11 +326,11 @@ export default {
|
||||||
return itemsForPia;
|
return itemsForPia;
|
||||||
},
|
},
|
||||||
getAmountDue() {
|
getAmountDue() {
|
||||||
return 350.0;
|
return 2;
|
||||||
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||||
},
|
},
|
||||||
getDisplayAmountDue() {
|
getDisplayAmountDue() {
|
||||||
return "$350.00";
|
return "$2.00";
|
||||||
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
||||||
},
|
},
|
||||||
isPaypal() {
|
isPaypal() {
|
||||||
|
|
|
||||||
|
|
@ -265,7 +265,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.dispatchStoreAction(this.storeActions.SAVE_VAPS, this.selectedVaps, false);
|
this.dispatchStoreAction(this.storeActions.SAVE_VAPS, this.selectedVaps, false);
|
||||||
this.dispatchStoreAction(this.storeActions.SAVE_PROMOS, this.newValidatedPromos, false);
|
this.dispatchStoreAction(this.storeActions.SAVE_PROMOS, this.allActivePromos, false);
|
||||||
|
|
||||||
const payment = this.$store.getters.payment;
|
const payment = this.$store.getters.payment;
|
||||||
if (payment.isInsurance) {
|
if (payment.isInsurance) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 col-xl-4">
|
<div class="col-md-6 col-xl-4">
|
||||||
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" class="mt-5" />
|
<funnelSubHeader cmsWidgetName="FunnelSubHeaderWidget" class="mt-4" />
|
||||||
<template v-if="ChangeShopLink.length">
|
<template v-if="ChangeShopLink.length">
|
||||||
<textBlock
|
<textBlock
|
||||||
cmsWidgetName="ChangeShopLink"
|
cmsWidgetName="ChangeShopLink"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-md-6 col-lg-4">
|
<div class="col-md-6 col-xl-4">
|
||||||
<vehicleBanner
|
<vehicleBanner
|
||||||
ref="vehicleBanner"
|
ref="vehicleBanner"
|
||||||
cmsWidgetName="VehicleBannerWidget"
|
cmsWidgetName="VehicleBannerWidget"
|
||||||
|
|
|
||||||
|
|
@ -124,16 +124,17 @@ export default {
|
||||||
},
|
},
|
||||||
getAmountDue(lineItems) {
|
getAmountDue(lineItems) {
|
||||||
// TODO: verify tax is included in lineitems
|
// TODO: verify tax is included in lineitems
|
||||||
// Price everything in lineitems except the server data string
|
|
||||||
var amountDue = 0;
|
var amountDue = 0;
|
||||||
const itemsClone = { ...lineItems };
|
if (lineItems.glassParts) {
|
||||||
delete itemsClone.serverData;
|
amountDue = this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.glassParts);
|
||||||
for (var propertyName in itemsClone) {
|
}
|
||||||
if (itemsClone[propertyName]) {
|
if (lineItems.supportingItems) {
|
||||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(
|
||||||
itemsClone[propertyName]
|
lineItems.supportingItems
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (lineItems.supportingItems.vaps) {
|
||||||
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.vaps);
|
||||||
}
|
}
|
||||||
return amountDue;
|
return amountDue;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -99,6 +99,7 @@ const getDefaultState = () => {
|
||||||
piaType: null,
|
piaType: null,
|
||||||
piaErrorCode: null,
|
piaErrorCode: null,
|
||||||
inactivePromos: null,
|
inactivePromos: null,
|
||||||
|
paypalToken: null,
|
||||||
ccToken: {
|
ccToken: {
|
||||||
subscriptionId: null,
|
subscriptionId: null,
|
||||||
expMonth: null,
|
expMonth: null,
|
||||||
|
|
@ -270,6 +271,9 @@ export const mutations = {
|
||||||
state.order.payment.ccToken.transactionId = ccToken.transactionId;
|
state.order.payment.ccToken.transactionId = ccToken.transactionId;
|
||||||
state.order.payment.ccToken.transReferenceNumber = ccToken.transReferenceNumber;
|
state.order.payment.ccToken.transReferenceNumber = ccToken.transReferenceNumber;
|
||||||
},
|
},
|
||||||
|
updatePaypalToken(state, ppToken) {
|
||||||
|
state.order.payment.paypalToken = ppToken;
|
||||||
|
},
|
||||||
updateInsuranceVerifiedStatus(state, isVerified) {
|
updateInsuranceVerifiedStatus(state, isVerified) {
|
||||||
state.order.payment.insuranceCoverage.isVerified = isVerified;
|
state.order.payment.insuranceCoverage.isVerified = isVerified;
|
||||||
},
|
},
|
||||||
|
|
@ -495,10 +499,12 @@ export const mutations = {
|
||||||
state.order.lineItems.glassParts = sessionInformation.order.lineItems.glassParts;
|
state.order.lineItems.glassParts = sessionInformation.order.lineItems.glassParts;
|
||||||
state.order.lineItems.supportingItems = sessionInformation.order.lineItems.supportingItems;
|
state.order.lineItems.supportingItems = sessionInformation.order.lineItems.supportingItems;
|
||||||
state.order.lineItems.vaps = sessionInformation.order.lineItems.vaps;
|
state.order.lineItems.vaps = sessionInformation.order.lineItems.vaps;
|
||||||
|
state.order.lineItems.promos = sessionInformation.order.lineItems.promos;
|
||||||
state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData;
|
state.order.lineItems.serverData = sessionInformation.order.lineItems.serverData;
|
||||||
|
|
||||||
state.order.payment.parentAccountNumber =
|
state.order.payment.parentAccountNumber =
|
||||||
sessionInformation.order.payment.parentAccountNumber;
|
sessionInformation.order.payment.parentAccountNumber;
|
||||||
|
state.order.payment.inactivePromos = sessionInformation.order.payment.inactivePromos;
|
||||||
|
|
||||||
state.order.serviceLocation.address =
|
state.order.serviceLocation.address =
|
||||||
sessionInformation.order.serviceLocation.streetAddress;
|
sessionInformation.order.serviceLocation.streetAddress;
|
||||||
|
|
@ -1645,6 +1651,11 @@ export const actions = {
|
||||||
isInsurance: order.payment.isInsurance,
|
isInsurance: order.payment.isInsurance,
|
||||||
parentAccountNumber: order.payment.parentAccountNumber,
|
parentAccountNumber: order.payment.parentAccountNumber,
|
||||||
inactivePromos: order.payment.inactivePromos,
|
inactivePromos: order.payment.inactivePromos,
|
||||||
|
isCreditCard:
|
||||||
|
order.payment.piaType == paymentMethods.CREDIT_CARD ? true : false,
|
||||||
|
isPaypal: order.payment.piaType == paymentMethods.PAYPAL ? true : false,
|
||||||
|
isAfterPay: order.payment.piaType == paymentMethods.AFTERPAY ? true : false,
|
||||||
|
paypalToken: order.payment.paypalToken,
|
||||||
ccToken: {
|
ccToken: {
|
||||||
subscriptionId: order.payment.ccToken.subscriptionId,
|
subscriptionId: order.payment.ccToken.subscriptionId,
|
||||||
expMonth: order.payment.ccToken.expMonth,
|
expMonth: order.payment.ccToken.expMonth,
|
||||||
|
|
@ -1778,6 +1789,9 @@ export const actions = {
|
||||||
saveCCToken(context, ccToken) {
|
saveCCToken(context, ccToken) {
|
||||||
context.commit(storeMutations.UPDATE_CCTOKEN, ccToken);
|
context.commit(storeMutations.UPDATE_CCTOKEN, ccToken);
|
||||||
},
|
},
|
||||||
|
savePaypalToken(context, ppToken) {
|
||||||
|
context.commit(storeMutations.UPDATE_PAYPAL_TOKEN, ppToken);
|
||||||
|
},
|
||||||
|
|
||||||
// Business domain actions
|
// Business domain actions
|
||||||
|
|
||||||
|
|
@ -2239,6 +2253,7 @@ export const actions = {
|
||||||
addGuidToLineItemsIfNotAlreadyThere(addableVaps);
|
addGuidToLineItemsIfNotAlreadyThere(addableVaps);
|
||||||
const requestObject = {
|
const requestObject = {
|
||||||
promoCode: promoCode,
|
promoCode: promoCode,
|
||||||
|
addableVaps: addableVaps,
|
||||||
order: {
|
order: {
|
||||||
appointmentType: order.serviceLocation.appointmentType,
|
appointmentType: order.serviceLocation.appointmentType,
|
||||||
carId: order.vehicle.carId,
|
carId: order.vehicle.carId,
|
||||||
|
|
@ -2247,7 +2262,6 @@ export const actions = {
|
||||||
isRepair: order.damage.isRepair,
|
isRepair: order.damage.isRepair,
|
||||||
glassToReplace: renameGlassToReplaceAttributes(order.damage.glassToReplace),
|
glassToReplace: renameGlassToReplaceAttributes(order.damage.glassToReplace),
|
||||||
lineItemsOnOrder: getArrayOfAllLineItems(order.lineItems),
|
lineItemsOnOrder: getArrayOfAllLineItems(order.lineItems),
|
||||||
addableVaps: addableVaps,
|
|
||||||
parentAccountNumber: order.payment.parentAccountNumber,
|
parentAccountNumber: order.payment.parentAccountNumber,
|
||||||
referralSequenceNumber: order.referralSequenceNumber,
|
referralSequenceNumber: order.referralSequenceNumber,
|
||||||
serviceState: order.serviceLocation.state,
|
serviceState: order.serviceLocation.state,
|
||||||
|
|
@ -2268,10 +2282,12 @@ export const actions = {
|
||||||
pageNameToLog: pageNameToLog,
|
pageNameToLog: pageNameToLog,
|
||||||
});
|
});
|
||||||
|
|
||||||
context.commit(
|
if (validateResponse?.data?.serverData) {
|
||||||
storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA,
|
context.commit(
|
||||||
validateResponse.data.lineItemsServerData
|
storeMutations.UPDATE_LINE_ITEMS_SERVER_DATA,
|
||||||
);
|
validateResponse.data.serverData
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return validateResponse;
|
return validateResponse;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue