From 5708b9c0e99bffb8fcf6b62b407442926e243b67 Mon Sep 17 00:00:00 2001 From: TheCOBAN Date: Sat, 18 Apr 2020 21:46:28 +0300 Subject: [PATCH 1/3] Fixed: wizard currency --- app/Http/Controllers/Settings/Currencies.php | 6 ++++-- resources/views/wizard/currencies/index.blade.php | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Settings/Currencies.php b/app/Http/Controllers/Settings/Currencies.php index 916845ee5..767e29780 100644 --- a/app/Http/Controllers/Settings/Currencies.php +++ b/app/Http/Controllers/Settings/Currencies.php @@ -229,14 +229,16 @@ class Currencies extends Controller public function config() { - $json = new \stdClass(); + $json = new \stdClass(); $code = request('code'); + $currencies = Currency::all()->pluck('rate', 'code'); + if ($code) { $currency = config('money.' . $code); - $currency['rate'] = isset($currency['rate']) ? $currency['rate'] : null; + $currency['rate'] = isset($currencies[$code]) ? $currencies[$code] : null; $currency['symbol_first'] = $currency['symbol_first'] ? 1 : 0; $json = (object) $currency; diff --git a/resources/views/wizard/currencies/index.blade.php b/resources/views/wizard/currencies/index.blade.php index 9a90341c6..e77eb2508 100644 --- a/resources/views/wizard/currencies/index.blade.php +++ b/resources/views/wizard/currencies/index.blade.php @@ -84,7 +84,7 @@ {{ Form::textGroup('name', trans('general.name'), 'font', [], null, '') }} - {{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode'], '') }} + {{ Form::selectGroup('code', trans('currencies.code'), 'code', $codes, null, ['required' => 'required', 'change' => 'onChangeCode', 'model' => 'form.code'], '') }} {{ Form::textGroup('rate', trans('currencies.rate'), 'percentage', ['required' => 'required'], null, '') }} From 7e14cf8c2e7da3cfa83393d22d4ddc67c76e6a71 Mon Sep 17 00:00:00 2001 From: TheCOBAN Date: Sat, 18 Apr 2020 21:48:01 +0300 Subject: [PATCH 2/3] fix typo --- app/Http/Controllers/Settings/Currencies.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/Settings/Currencies.php b/app/Http/Controllers/Settings/Currencies.php index 767e29780..2d26c29b3 100644 --- a/app/Http/Controllers/Settings/Currencies.php +++ b/app/Http/Controllers/Settings/Currencies.php @@ -229,7 +229,7 @@ class Currencies extends Controller public function config() { - $json = new \stdClass(); + $json = new \stdClass(); $code = request('code'); From ce68bb7afb968636ab7bc5c0a240571d311c55ef Mon Sep 17 00:00:00 2001 From: TheCOBAN Date: Sat, 18 Apr 2020 22:12:10 +0300 Subject: [PATCH 3/3] Fix: wizard currency delete --- resources/views/partials/wizard/content.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/partials/wizard/content.blade.php b/resources/views/partials/wizard/content.blade.php index 9fdc71051..fc161692b 100644 --- a/resources/views/partials/wizard/content.blade.php +++ b/resources/views/partials/wizard/content.blade.php @@ -13,6 +13,6 @@ @yield('content') @stack('content_content_end') - + @stack('content_end')