From 85adeb6ace99c7dbf1ba3d866e2016a198fb72e9 Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 19 Jul 2023 11:34:33 +0200 Subject: [PATCH] wait #6144 @0:15 --- resources/js/app.js | 8 +++++--- resources/views/components/item-cart.blade.php | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/resources/js/app.js b/resources/js/app.js index b57ac7f..89651ab 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -557,13 +557,15 @@ const app = new Vue({ }) }, savedCartToCurrent(event) { - const id = event.target.dataset.id, - homeUrl = window.location.origin; + const id = event.target.dataset.id; + + let homeUrl = window.location.origin+'/'; + homeUrl += event.target.dataset.to ?? 'ma-selection' axios.post('/ajax/savedCartToCurrent', {id: id}) .then(function (response) { //root.animateDelete(el) - window.location.replace(homeUrl+'/ma-selection') + window.location.replace(homeUrl) }) .catch(function (error) { }) diff --git a/resources/views/components/item-cart.blade.php b/resources/views/components/item-cart.blade.php index 8c65fb0..42e106d 100644 --- a/resources/views/components/item-cart.blade.php +++ b/resources/views/components/item-cart.blade.php @@ -74,7 +74,7 @@ {{ __('Modifier ce panier') }} @isset($item['total']) - {{ __('Passer commande') }} + {{ __('Passer commande') }} @else {{ __('Demander un devis') }} @endisset -- 2.39.5