Notification Added For All Items

This commit is contained in:
Devansh 2020-08-05 19:59:54 +05:30
parent fbe5a9cc9b
commit d74e6e9cbc
1 changed files with 2 additions and 2 deletions

View File

@ -194,15 +194,15 @@
if (productId == "all") {
updatedItems = [];
this.$set(this, 'products', []);
window.flashMessages = [{'type': 'alert-success', 'message': '{{ __('velocity::app.customer.compare.removed-all') }}' }];
} else {
updatedItems = existingItems.filter(item => item != productId);
this.$set(this, 'products', this.products.filter(product => product.id != productId));
window.flashMessages = [{'type': 'alert-success', 'message': '{{ __('velocity::app.customer.compare.removed') }}' }];
}
this.setStorageValue('compared_product', updatedItems);
window.flashMessages = [{'type': 'alert-success', 'message': '{{ __('velocity::app.customer.compare.removed') }}' }];
this.$root.addFlashMessages();
}
},