From 09047f0c0bf0c2237af85cf1fb98f7249ae94834 Mon Sep 17 00:00:00 2001 From: soufiane Date: Tue, 18 Jul 2023 14:16:21 +0200 Subject: [PATCH] =?utf8?q?wait=20#6138=200:25=20message=20de=20confirmatio?= =?utf8?q?n=20dynamique=20et=20renommage=20de=20la=20ref=20si=20pr=C3=A9se?= =?utf8?q?nce=20de=20"=20|=20"?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Admin/ProductBaseController.php | 1 + resources/js/app.js | 9 ++++++--- resources/styles/components/modal-confirm.styl | 4 +++- resources/views/pages/cart.blade.php | 2 +- resources/views/pages/my_account.blade.php | 2 +- resources/views/partials/header.blade.php | 3 +++ 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/Admin/ProductBaseController.php b/app/Http/Controllers/Admin/ProductBaseController.php index 0093da2..037d126 100644 --- a/app/Http/Controllers/Admin/ProductBaseController.php +++ b/app/Http/Controllers/Admin/ProductBaseController.php @@ -199,6 +199,7 @@ class ProductBaseController extends CubistMagicController { foreach ($datas as $id => $data) { $product = Product::find($id); if ($product) { + $product->reference = str_replace('|', '/', $product->reference); $product->update($data); $product->save(); $changes[$id] = $product->wasChanged(); diff --git a/resources/js/app.js b/resources/js/app.js index fa15b4f..52858f1 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -84,7 +84,8 @@ const app = new Vue({ discount: 0, // nameSaved: {}, - confirmMessageCart: '' + confirmMessage: '', + confirmMessageText: "Vos informations ont été mises à jour avec succès !" }, beforeMount() { @@ -425,6 +426,7 @@ const app = new Vue({ axios.post('/ajax/update', data) .then(function (response) { root.removeErrorsForm() + root.confirmMessage = root.confirmMessageText; root.validateAction = true root.form[id] = response.data }) @@ -442,6 +444,7 @@ const app = new Vue({ axios.post('/ajax/updateAddress', data) .then(function (response) { root.removeErrorsForm() + root.confirmMessage = root.confirmMessageText; root.validateAction = true }) .catch(function (error) { @@ -512,7 +515,7 @@ const app = new Vue({ axios.post('/ajax/storecart', data) .then(function (response) { root.validateAction = true - root.confirmMessageCart = response.data; + root.confirmMessage = response.data; }) .catch(function (error) { console.log(error) @@ -583,7 +586,7 @@ const app = new Vue({ axios.post('/ajax/order', data) .then(function (response) { root.validateAction = true - root.confirmMessageCart = response.data; + root.confirmMessage = response.data; root.items = {} }) .catch(function (error) { diff --git a/resources/styles/components/modal-confirm.styl b/resources/styles/components/modal-confirm.styl index 917a523..63c7bce 100644 --- a/resources/styles/components/modal-confirm.styl +++ b/resources/styles/components/modal-confirm.styl @@ -9,7 +9,7 @@ padding: 0 25px z-index: 999 //top: -120px - top: -var(--header-height) + top: var(--header-height) &-text width: 100% max-width: 744px @@ -21,6 +21,8 @@ z-index: 1 box-shadow: 0 30px 60px rgba(24,47,76,.2) font-family: 'Barlow',sans-serif + color: theme('colors.navy') + font-weight: 400 .mb-4 margin-bottom: 1rem !important &-close diff --git a/resources/views/pages/cart.blade.php b/resources/views/pages/cart.blade.php index 3293823..bc1845c 100644 --- a/resources/views/pages/cart.blade.php +++ b/resources/views/pages/cart.blade.php @@ -113,6 +113,6 @@ -

@{{ confirmMessageCart }}

+

@{{ confirmMessage }}

@endsection diff --git a/resources/views/pages/my_account.blade.php b/resources/views/pages/my_account.blade.php index 4e5fcee..cad66bc 100644 --- a/resources/views/pages/my_account.blade.php +++ b/resources/views/pages/my_account.blade.php @@ -162,6 +162,6 @@ -

{{ __('Vos informations ont été mises à jour avec succès !') }}

+

@{{ confirmMessage }}

@endsection diff --git a/resources/views/partials/header.blade.php b/resources/views/partials/header.blade.php index 2303287..f3b04cf 100644 --- a/resources/views/partials/header.blade.php +++ b/resources/views/partials/header.blade.php @@ -94,4 +94,7 @@ + +

@{{ confirmMessage }}

+
-- 2.39.5