CASH-535 - Moved saving the vuex code functionality from order helper to quote page for cashPriceSubTotal.
This commit is contained in:
parent
e09e490fe5
commit
8bf64643ca
2 changed files with 17 additions and 16 deletions
|
|
@ -83,22 +83,6 @@ export async function saveSession({
|
||||||
if (!store.getters.applicationUser.savedSessionId || shouldAwaitSaveSessionQueue) {
|
if (!store.getters.applicationUser.savedSessionId || shouldAwaitSaveSessionQueue) {
|
||||||
await saveSessionPromise;
|
await saveSessionPromise;
|
||||||
}
|
}
|
||||||
|
|
||||||
const lineItems = store.getters.order?.lineItems ?? {};
|
|
||||||
const combinedLineItems = [
|
|
||||||
...(lineItems.glassParts || []),
|
|
||||||
...(lineItems.supportingItems || []),
|
|
||||||
...(lineItems.vaps || []),
|
|
||||||
...(lineItems.promos || []),
|
|
||||||
];
|
|
||||||
|
|
||||||
const cashPriceSubtotal = combinedLineItems.length
|
|
||||||
? baseMixin.methods
|
|
||||||
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
|
||||||
.toFixed(2)
|
|
||||||
: "";
|
|
||||||
|
|
||||||
store.commit(storeMutations.UPDATE_CASH_PRICE_SUBTOTAL, cashPriceSubtotal);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function submitWorkOrder({
|
export async function submitWorkOrder({
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ import {
|
||||||
} from "@/helpers/heritage-integration/cookie-helper";
|
} from "@/helpers/heritage-integration/cookie-helper";
|
||||||
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
import { showFmgLoadingModal } from "@/helpers/loading-modal-helper";
|
||||||
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
|
||||||
|
import { storeMutations } from "@/constants/store-mutations";
|
||||||
|
|
||||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||||
|
|
||||||
|
|
@ -766,6 +767,22 @@ export default {
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const lineItems = store.getters.order?.lineItems ?? {};
|
||||||
|
const combinedLineItems = [
|
||||||
|
...(lineItems.glassParts || []),
|
||||||
|
...(lineItems.supportingItems || []),
|
||||||
|
...(lineItems.vaps || []),
|
||||||
|
...(lineItems.promos || []),
|
||||||
|
];
|
||||||
|
|
||||||
|
const cashPriceSubtotal = combinedLineItems.length
|
||||||
|
? baseMixin.methods
|
||||||
|
.getTotalPriceOfAllLineItemsAndChildParts(combinedLineItems, false)
|
||||||
|
.toFixed(2)
|
||||||
|
: "";
|
||||||
|
|
||||||
|
store.commit(storeMutations.UPDATE_CASH_PRICE_SUBTOTAL, cashPriceSubtotal);
|
||||||
},
|
},
|
||||||
attachCustomEventsForAnalytics() {
|
attachCustomEventsForAnalytics() {
|
||||||
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
this.prependActionToMethod(this, this.forwardButtonAction, () => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue