Merge branch 'develop' into feature/CSR-1382-loose-ends
This commit is contained in:
commit
cbef188b01
9 changed files with 34 additions and 11 deletions
|
|
@ -73,7 +73,7 @@ const storeActions = {
|
||||||
SAVE_VIN: "saveVin",
|
SAVE_VIN: "saveVin",
|
||||||
SAVE_REGISTRATION_ADDRESS_LOOKUP: "saveRegistrationAddressLookup",
|
SAVE_REGISTRATION_ADDRESS_LOOKUP: "saveRegistrationAddressLookup",
|
||||||
SAVE_GLASS_PARTS: "saveGlassParts",
|
SAVE_GLASS_PARTS: "saveGlassParts",
|
||||||
SAVE_GLASS_PART_PRICES: "saveGlassPartPrices",
|
SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING: "saveGlassPartsSuppressingStateResetting",
|
||||||
SAVE_PART_QUESTION_ANSWERS: "savePartQuestionAnswers",
|
SAVE_PART_QUESTION_ANSWERS: "savePartQuestionAnswers",
|
||||||
RESET_MOLDING_AND_CAPABILITY_QUESTIONS_IF_NEEDED:
|
RESET_MOLDING_AND_CAPABILITY_QUESTIONS_IF_NEEDED:
|
||||||
"resetMoldingAndCapabilityQuestionAnswersIfNeeded",
|
"resetMoldingAndCapabilityQuestionAnswersIfNeeded",
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ const storeMutations = {
|
||||||
UPDATE_IS_PIA: "updateIsPia",
|
UPDATE_IS_PIA: "updateIsPia",
|
||||||
UPDATE_PIA_TYPE: "updatePiaType",
|
UPDATE_PIA_TYPE: "updatePiaType",
|
||||||
WORK_ORDER_NUMBER: "updateWorkOrderNumber",
|
WORK_ORDER_NUMBER: "updateWorkOrderNumber",
|
||||||
|
Customer_Portal_Login_Token: "updateCustomerPortalLoginToken",
|
||||||
|
|
||||||
// EVENT BUS MUTATIONS
|
// EVENT BUS MUTATIONS
|
||||||
ADD_EVENT_TO_BUS: "addEventToBus",
|
ADD_EVENT_TO_BUS: "addEventToBus",
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ async function saveSessionHelper(
|
||||||
crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(),
|
crmCustomerId: savedSessionInfo.data.crmCustomerId?.toString(),
|
||||||
eon: savedSessionInfo.data.eon,
|
eon: savedSessionInfo.data.eon,
|
||||||
workOrderNumber: savedSessionInfo.data.workOrderNumber,
|
workOrderNumber: savedSessionInfo.data.workOrderNumber,
|
||||||
|
customerPortalLoginToken: savedSessionInfo.data.customerPortalLoginToken,
|
||||||
},
|
},
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -94,9 +94,13 @@ export default {
|
||||||
ScheduleConfirmationImage() {
|
ScheduleConfirmationImage() {
|
||||||
return this.getCmsContent("ScheduleConfirmationWidget", "Image");
|
return this.getCmsContent("ScheduleConfirmationWidget", "Image");
|
||||||
},
|
},
|
||||||
|
CustomerPortalLoginToken() {
|
||||||
|
return store.getters.order.customerPortalLoginToken;
|
||||||
|
},
|
||||||
ConfirmationEmailText() {
|
ConfirmationEmailText() {
|
||||||
return this.getCmsContent("ConfirmationEmailWidget", "BodyText")
|
return this.getCmsContent("ConfirmationEmailWidget", "BodyText")
|
||||||
?.replaceAll("{custom:MY_ACCOUNT_URL}", applicationConfig.MY_ACCOUNT)
|
?.replaceAll("{custom:MY_ACCOUNT_URL}", applicationConfig.MY_ACCOUNT)
|
||||||
|
?.replaceAll("{custom:CUSTOMER_PORTAL_LOGIN_TOKEN}", this.CustomerPortalLoginToken)
|
||||||
?.replaceAll("<", "<")
|
?.replaceAll("<", "<")
|
||||||
?.replaceAll(">", ">");
|
?.replaceAll(">", ">");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -271,8 +271,19 @@ export default {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
// save lineitems as they now have salestax added
|
||||||
|
await this.dispatchStoreAction(
|
||||||
|
storeActions.SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING,
|
||||||
|
this.lineItems.glassParts,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
|
||||||
|
await this.dispatchStoreAction(
|
||||||
|
storeActions.SAVE_SUPPORTING_ITEMS_SUPPRESSING_STATE_RESETTING,
|
||||||
|
this.lineItems.supportingItems,
|
||||||
|
false
|
||||||
|
);
|
||||||
|
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
||||||
await this.dispatchStoreAction(storeActions.SAVE_PROMOS, this.lineItems.promos, false);
|
await this.dispatchStoreAction(storeActions.SAVE_PROMOS, this.lineItems.promos, false);
|
||||||
|
|
||||||
if (this.paymentMethod == paymentMethods.LATER) {
|
if (this.paymentMethod == paymentMethods.LATER) {
|
||||||
|
|
|
||||||
|
|
@ -419,12 +419,10 @@ export default {
|
||||||
return itemsForPia;
|
return itemsForPia;
|
||||||
},
|
},
|
||||||
getAmountDue() {
|
getAmountDue() {
|
||||||
return 1600;
|
return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||||
//return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
|
||||||
},
|
},
|
||||||
getDisplayAmountDue() {
|
getDisplayAmountDue() {
|
||||||
return "$1600.00";
|
return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
||||||
//return baseMixin.methods.getDisplayAmountDue(store.getters.order.lineItems);
|
|
||||||
},
|
},
|
||||||
isPaypal() {
|
isPaypal() {
|
||||||
if (this.getPaymentType() == "pp") {
|
if (this.getPaymentType() == "pp") {
|
||||||
|
|
|
||||||
|
|
@ -258,7 +258,7 @@ export default {
|
||||||
|
|
||||||
if (this.pricedGlassParts.length > 0) {
|
if (this.pricedGlassParts.length > 0) {
|
||||||
this.dispatchStoreAction(
|
this.dispatchStoreAction(
|
||||||
this.storeActions.SAVE_GLASS_PART_PRICES,
|
this.storeActions.SAVE_GLASS_PARTS_SUPPRESSING_STATE_RESETTING,
|
||||||
this.pricedGlassParts,
|
this.pricedGlassParts,
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,9 @@ export default {
|
||||||
return totalPrice;
|
return totalPrice;
|
||||||
},
|
},
|
||||||
getTotalLineItemPrice(lineItem) {
|
getTotalLineItemPrice(lineItem) {
|
||||||
return lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice;
|
return (
|
||||||
|
lineItem.kitPrice + lineItem.laborAmount + lineItem.sellingPrice + lineItem.salesTax
|
||||||
|
);
|
||||||
},
|
},
|
||||||
getDisplayAmountDue(lineItems) {
|
getDisplayAmountDue(lineItems) {
|
||||||
return this.getAmountDue(lineItems).toLocaleString("en-US", {
|
return this.getAmountDue(lineItems).toLocaleString("en-US", {
|
||||||
|
|
@ -123,7 +125,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getAmountDue(lineItems) {
|
getAmountDue(lineItems) {
|
||||||
// TODO: verify tax is included in lineitems
|
|
||||||
var amountDue = 0;
|
var amountDue = 0;
|
||||||
if (lineItems.glassParts) {
|
if (lineItems.glassParts) {
|
||||||
amountDue = this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.glassParts);
|
amountDue = this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.glassParts);
|
||||||
|
|
@ -133,7 +134,7 @@ export default {
|
||||||
lineItems.supportingItems
|
lineItems.supportingItems
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (lineItems.supportingItems.vaps) {
|
if (lineItems.vaps) {
|
||||||
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.vaps);
|
amountDue += this.getTotalPriceOfAllLineItemsAndChildParts(lineItems.vaps);
|
||||||
}
|
}
|
||||||
return amountDue;
|
return amountDue;
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ const getDefaultState = () => {
|
||||||
referralCorrelationId: null,
|
referralCorrelationId: null,
|
||||||
eon: null,
|
eon: null,
|
||||||
workOrderNumber: null,
|
workOrderNumber: null,
|
||||||
|
customerPortalLoginToken: null,
|
||||||
},
|
},
|
||||||
applicationUser: {
|
applicationUser: {
|
||||||
eventBus: [],
|
eventBus: [],
|
||||||
|
|
@ -245,6 +246,9 @@ export const mutations = {
|
||||||
updateWorkOrderNumber(state, workOrderNumber) {
|
updateWorkOrderNumber(state, workOrderNumber) {
|
||||||
state.order.workOrderNumber = workOrderNumber;
|
state.order.workOrderNumber = workOrderNumber;
|
||||||
},
|
},
|
||||||
|
updateCustomerPortalLoginToken(state, customerPortalLoginToken) {
|
||||||
|
state.order.customerPortalLoginToken = customerPortalLoginToken;
|
||||||
|
},
|
||||||
updateCCToken(state, ccToken) {
|
updateCCToken(state, ccToken) {
|
||||||
state.order.payment.ccToken.subscriptionId = ccToken.subscriptionId;
|
state.order.payment.ccToken.subscriptionId = ccToken.subscriptionId;
|
||||||
state.order.payment.ccToken.expMonth = ccToken.expMonth;
|
state.order.payment.ccToken.expMonth = ccToken.expMonth;
|
||||||
|
|
@ -451,6 +455,7 @@ export const mutations = {
|
||||||
state.order.referralDate = sessionInformation.order.referralDate;
|
state.order.referralDate = sessionInformation.order.referralDate;
|
||||||
state.order.referralCorrelationId = sessionInformation.order.referralCorrelationId;
|
state.order.referralCorrelationId = sessionInformation.order.referralCorrelationId;
|
||||||
state.order.eon = sessionInformation.order.eon;
|
state.order.eon = sessionInformation.order.eon;
|
||||||
|
state.order.customerPortalLoginToken = sessionInformation.order.CustomerPortalLoginToken;
|
||||||
|
|
||||||
if (state.order.vehicle.vin !== sessionInformation.order.vehicle?.vin) {
|
if (state.order.vehicle.vin !== sessionInformation.order.vehicle?.vin) {
|
||||||
state.applicationUser.pageData[fmgPageValues.PART_QUESTIONS] = null;
|
state.applicationUser.pageData[fmgPageValues.PART_QUESTIONS] = null;
|
||||||
|
|
@ -1014,6 +1019,7 @@ export const actions = {
|
||||||
savedSessionId,
|
savedSessionId,
|
||||||
crmCustomerId,
|
crmCustomerId,
|
||||||
workOrderNumber,
|
workOrderNumber,
|
||||||
|
customerPortalLoginToken,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
|
context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber);
|
||||||
|
|
@ -1025,6 +1031,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_SAVED_SESSION_ID, savedSessionId);
|
context.commit(storeMutations.UPDATE_SAVED_SESSION_ID, savedSessionId);
|
||||||
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
context.commit(storeMutations.UPDATE_CRM_CUSTOMER_ID, crmCustomerId);
|
||||||
context.commit(storeMutations.WORK_ORDER_NUMBER, workOrderNumber);
|
context.commit(storeMutations.WORK_ORDER_NUMBER, workOrderNumber);
|
||||||
|
context.commit(storeMutations.Customer_Portal_Login_Token, customerPortalLoginToken);
|
||||||
},
|
},
|
||||||
|
|
||||||
logPageView(
|
logPageView(
|
||||||
|
|
@ -2381,7 +2388,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, parts);
|
context.commit(storeMutations.UPDATE_GLASS_PARTS, parts);
|
||||||
},
|
},
|
||||||
|
|
||||||
saveGlassPartPrices(context, parts) {
|
saveGlassPartsSuppressingStateResetting(context, parts) {
|
||||||
context.commit(storeMutations.UPDATE_GLASS_PARTS, parts);
|
context.commit(storeMutations.UPDATE_GLASS_PARTS, parts);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue