CSR-2305 save to store immediately when removing from cart
CSR-2305 save to store immediately when removing from cart. this allows the review component to re-render with the correct service package details
This commit is contained in:
parent
6eddb0d652
commit
b6046d5baf
1 changed files with 4 additions and 1 deletions
|
|
@ -165,6 +165,7 @@ import baseMixin from "@/mixins/base-mixin.js";
|
|||
import { deepClone } from "@/helpers/object-helper";
|
||||
import { getHighestFullySatisfiedTier, getPackageContents } from "@/helpers/service-package-helper";
|
||||
import { getPromoCodeWithoutBundleIdentifier } from "@/helpers/promotions-helper";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
|
||||
// Constants
|
||||
import { partTypeStrings } from "@/constants/part-type-strings";
|
||||
|
|
@ -281,10 +282,12 @@ export default {
|
|||
: this.currencyFormatter.format(amount);
|
||||
},
|
||||
|
||||
removeItem(cartItemType, category) {
|
||||
async removeItem(cartItemType, category) {
|
||||
this.lineItems[category] = this.lineItems[category].filter(
|
||||
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
|
||||
);
|
||||
|
||||
await this.dispatchStoreAction(storeActions.SAVE_VAPS, this.lineItems.vaps, false);
|
||||
},
|
||||
|
||||
getPromoCodeList() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue