From: soufiane Date: Wed, 19 Jul 2023 09:34:33 +0000 (+0200) Subject: wait #6144 @0:15 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=85adeb6ace99c7dbf1ba3d866e2016a198fb72e9;p=pmi.git wait #6144 @0:15 --- 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