Auto stash before merge of "feature/CSR-1971" and "origin/develop"
This commit is contained in:
parent
8f2fda3995
commit
37b876f72c
3 changed files with 17 additions and 4 deletions
|
|
@ -236,8 +236,6 @@ export default {
|
||||||
this.lineItems[category] = this.lineItems[category].filter(
|
this.lineItems[category] = this.lineItems[category].filter(
|
||||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||||
);
|
);
|
||||||
|
|
||||||
this.$emit("update:modelValue", this.lineItems);
|
|
||||||
},
|
},
|
||||||
getPromoCodeList() {
|
getPromoCodeList() {
|
||||||
if (this.$refs["promoModalQuestion"]) {
|
if (this.$refs["promoModalQuestion"]) {
|
||||||
|
|
@ -245,6 +243,10 @@ export default {
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
|
handleAddedPromo(lineItems) {
|
||||||
|
// NOTE: these lineItems are passed from promo-modal-question
|
||||||
|
//this.$emit("update:modelValue", lineItems);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
screenReaderTotalAmountDueText() {
|
screenReaderTotalAmountDueText() {
|
||||||
|
|
@ -846,6 +848,12 @@ export default {
|
||||||
},
|
},
|
||||||
deep: true,
|
deep: true,
|
||||||
},
|
},
|
||||||
|
lineItems: {
|
||||||
|
handler(newValue) {
|
||||||
|
console.log('cart emitted a modelValue update');
|
||||||
|
this.$emit("update:modelValue", newValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
textBlock,
|
textBlock,
|
||||||
|
|
|
||||||
|
|
@ -86,6 +86,7 @@ import baseMixin from "@/mixins/base-mixin.js";
|
||||||
import vehicleQuestionsMixin from "../../mixins/vehicle-questions-mixin";
|
import vehicleQuestionsMixin from "../../mixins/vehicle-questions-mixin";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
|
import { deepClone } from "@/helpers/object-helper";
|
||||||
import store from "@/store";
|
import store from "@/store";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { required } from "@/helpers/validation-rules";
|
import { required } from "@/helpers/validation-rules";
|
||||||
|
|
@ -149,7 +150,7 @@ export default {
|
||||||
];
|
];
|
||||||
|
|
||||||
const resultMap = await settleAllPromises(promiseResultMap);
|
const resultMap = await settleAllPromises(promiseResultMap);
|
||||||
const lineItems = store.getters.order.lineItems;
|
const lineItems = deepClone(store.getters.order.lineItems);
|
||||||
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
const nullSafeGlassParts = lineItems.glassParts ?? [];
|
||||||
const availableLineItems = [
|
const availableLineItems = [
|
||||||
resultMap.rainDefense,
|
resultMap.rainDefense,
|
||||||
|
|
@ -180,7 +181,8 @@ export default {
|
||||||
const oldInactivePromos = store.getters.order.payment.inactivePromos?.slice(0);
|
const oldInactivePromos = store.getters.order.payment.inactivePromos?.slice(0);
|
||||||
|
|
||||||
const promoCodeFromQueryString = getQuerystringParameter(queryStrings.PROMO);
|
const promoCodeFromQueryString = getQuerystringParameter(queryStrings.PROMO);
|
||||||
|
console.log("lineItems before sending off for promo");
|
||||||
|
console.log(JSON.parse(JSON.stringify(lineItems)));
|
||||||
const { validatePromoResponse, revalidatePromoResponse } =
|
const { validatePromoResponse, revalidatePromoResponse } =
|
||||||
await revalidatePromosAndValidateQueryStringPromo(
|
await revalidatePromosAndValidateQueryStringPromo(
|
||||||
promoCodeFromQueryString,
|
promoCodeFromQueryString,
|
||||||
|
|
@ -190,6 +192,7 @@ export default {
|
||||||
lineItems.glassParts = nullSafeGlassParts;
|
lineItems.glassParts = nullSafeGlassParts;
|
||||||
lineItems.promos = lineItems.promos ?? [];
|
lineItems.promos = lineItems.promos ?? [];
|
||||||
lineItems.vaps = lineItems.vaps ?? [];
|
lineItems.vaps = lineItems.vaps ?? [];
|
||||||
|
console.log("lineItems.vaps", JSON.parse(JSON.stringify(lineItems.vaps)));
|
||||||
// End of promo logic
|
// End of promo logic
|
||||||
|
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
|
|
|
||||||
|
|
@ -2176,6 +2176,7 @@ export const actions = {
|
||||||
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
context.commit(storeMutations.UPDATE_SUPPORTING_ITEMS, supportingItems);
|
||||||
},
|
},
|
||||||
saveVaps(context, vaps) {
|
saveVaps(context, vaps) {
|
||||||
|
console.log("saving vaps");
|
||||||
addGuidToLineItemsIfNotAlreadyThere(vaps);
|
addGuidToLineItemsIfNotAlreadyThere(vaps);
|
||||||
context.commit(storeMutations.UPDATE_VAPS, vaps);
|
context.commit(storeMutations.UPDATE_VAPS, vaps);
|
||||||
},
|
},
|
||||||
|
|
@ -2426,6 +2427,7 @@ export const actions = {
|
||||||
lineItemsToUse = lineItemsToUse ? deepClone(lineItemsToUse) : deepClone(order.lineItems);
|
lineItemsToUse = lineItemsToUse ? deepClone(lineItemsToUse) : deepClone(order.lineItems);
|
||||||
addGuidToLineItemsIfNotAlreadyThere(lineItemsToUse.vaps);
|
addGuidToLineItemsIfNotAlreadyThere(lineItemsToUse.vaps);
|
||||||
lineItemsToUse.promos = activePromosToUse;
|
lineItemsToUse.promos = activePromosToUse;
|
||||||
|
console.log("lineItemsToUse:", lineItemsToUse);
|
||||||
|
|
||||||
inactivePromosToUse = inactivePromosToUse ?? order.payment.inactivePromos;
|
inactivePromosToUse = inactivePromosToUse ?? order.payment.inactivePromos;
|
||||||
inactivePromosToUse = removeCurrentlyActivePromoCodesFromInactivePromos(
|
inactivePromosToUse = removeCurrentlyActivePromoCodesFromInactivePromos(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue