diff --git a/resources/views/front/sable/js/components/BasketPanel.vue b/resources/views/front/sable/js/components/BasketPanel.vue index 07516092..fabbb4bd 100644 --- a/resources/views/front/sable/js/components/BasketPanel.vue +++ b/resources/views/front/sable/js/components/BasketPanel.vue @@ -38,7 +38,7 @@ - + @@ -79,12 +79,12 @@ }, data() { return { - processing: false, success:false, errors:false, showConfirmEmpty:false, response: '', - promotion_slide: -1 + promotion_slide: -1, + disableBtn: false, } }, mounted() { @@ -125,23 +125,24 @@ .catch(function (error) { console.log(error); this.response = "Erreur lors de la modification du panier."; - this.processing = false; }); } }, removeItem(rowId) { + this.disableBtn = true; axios.post('/ajax/remove-from-cart', { rowId: rowId, instance: 'panier', }).then( (response) => { this.updateStore(response.data); + this.disableBtn = false; } ) .catch(function (error) { console.log(error); this.response = "Erreur lors de la modification du panier."; - this.processing = false; + this.disableBtn = false; }); }, emptyCart() { @@ -157,7 +158,6 @@ .catch(function (error) { console.log(error); this.response = "Erreur lors de la modification du panier."; - this.processing = false; }); }, confirmEmpty() {