From 0ff404d8a6c3aa6c51809add2f2955a98a448005 Mon Sep 17 00:00:00 2001 From: A1Gard Date: Mon, 25 Nov 2024 20:54:08 +0330 Subject: [PATCH] optimize panel buttons improved ui --- app/Http/Controllers/Admin/CityController.php | 4 ++-- .../Controllers/Admin/CustomerController.php | 4 ++-- .../Controllers/Admin/DiscountController.php | 4 ++-- .../Admin/EvaluationController.php | 4 ++-- .../Controllers/Admin/InvoiceController.php | 20 +++++++++++++++++++ app/Http/Controllers/Admin/PropController.php | 4 ++-- .../Controllers/Admin/SliderController.php | 4 ++-- .../Controllers/Admin/StateController.php | 4 ++-- .../Controllers/Admin/TransportController.php | 4 ++-- .../Controllers/Admin/XLangController.php | 4 ++-- .../ParallelCategoriesGrid.blade.php | 5 ++++- 11 files changed, 42 insertions(+), 19 deletions(-) diff --git a/app/Http/Controllers/Admin/CityController.php b/app/Http/Controllers/Admin/CityController.php index 4292e20..c6a0566 100644 --- a/app/Http/Controllers/Admin/CityController.php +++ b/app/Http/Controllers/Admin/CityController.php @@ -30,8 +30,8 @@ class CityController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/CustomerController.php b/app/Http/Controllers/Admin/CustomerController.php index c9a6d38..8536871 100644 --- a/app/Http/Controllers/Admin/CustomerController.php +++ b/app/Http/Controllers/Admin/CustomerController.php @@ -31,8 +31,8 @@ class CustomerController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/DiscountController.php b/app/Http/Controllers/Admin/DiscountController.php index 2b342a5..94e157d 100644 --- a/app/Http/Controllers/Admin/DiscountController.php +++ b/app/Http/Controllers/Admin/DiscountController.php @@ -29,8 +29,8 @@ class DiscountController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/EvaluationController.php b/app/Http/Controllers/Admin/EvaluationController.php index 0fcbd3a..803a2a9 100644 --- a/app/Http/Controllers/Admin/EvaluationController.php +++ b/app/Http/Controllers/Admin/EvaluationController.php @@ -29,8 +29,8 @@ class EvaluationController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/InvoiceController.php b/app/Http/Controllers/Admin/InvoiceController.php index bdf0790..eedda41 100644 --- a/app/Http/Controllers/Admin/InvoiceController.php +++ b/app/Http/Controllers/Admin/InvoiceController.php @@ -10,6 +10,8 @@ use App\Models\Credit; use App\Models\Customer; use App\Models\Invoice; use App\Models\Order; +use chillerlan\QRCode\QRCode; +use chillerlan\QRCode\QROptions; use Illuminate\Http\Request; use App\Helper; use function App\Helpers\hasCreateRoute; @@ -161,4 +163,22 @@ class InvoiceController extends XController return redirect()->back()->with('message', __('Order removed successfully')); } /*restore**/ + + + public function show($hash){ + + $invoice = Invoice::where('hash', $hash)->firstOrFail(); + $area = 'invoice'; + $title = __("Invoice"); + $subtitle = __("Invoice ID:") . ' ' . $invoice->hash; + + $options = new QROptions([ + 'version' => 5, + 'outputType' => QRCode::OUTPUT_MARKUP_SVG, + 'eccLevel' => QRCode::ECC_L, +// 'imageTransparent' => true, + ]); + $qr = new QRCode($options); + return view('client.invoice', compact('area', 'title', 'subtitle', 'invoice', 'qr')); + } } diff --git a/app/Http/Controllers/Admin/PropController.php b/app/Http/Controllers/Admin/PropController.php index 312e723..1955339 100644 --- a/app/Http/Controllers/Admin/PropController.php +++ b/app/Http/Controllers/Admin/PropController.php @@ -30,8 +30,8 @@ class PropController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/SliderController.php b/app/Http/Controllers/Admin/SliderController.php index 0d52135..af48433 100644 --- a/app/Http/Controllers/Admin/SliderController.php +++ b/app/Http/Controllers/Admin/SliderController.php @@ -33,8 +33,8 @@ class SliderController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/StateController.php b/app/Http/Controllers/Admin/StateController.php index c05109f..001e9e2 100644 --- a/app/Http/Controllers/Admin/StateController.php +++ b/app/Http/Controllers/Admin/StateController.php @@ -29,8 +29,8 @@ class StateController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/TransportController.php b/app/Http/Controllers/Admin/TransportController.php index e6d96a6..ac5030b 100644 --- a/app/Http/Controllers/Admin/TransportController.php +++ b/app/Http/Controllers/Admin/TransportController.php @@ -29,8 +29,8 @@ class TransportController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/app/Http/Controllers/Admin/XLangController.php b/app/Http/Controllers/Admin/XLangController.php index 0118fa8..d87597b 100644 --- a/app/Http/Controllers/Admin/XLangController.php +++ b/app/Http/Controllers/Admin/XLangController.php @@ -73,8 +73,8 @@ class XLangController extends XController protected $buttons = [ 'edit' => ['title' => "Edit", 'class' => 'btn-outline-primary', 'icon' => 'ri-edit-2-line'], - 'show' => - ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], +// 'show' => +// ['title' => "Detail", 'class' => 'btn-outline-light', 'icon' => 'ri-eye-line'], 'destroy' => ['title' => "Remove", 'class' => 'btn-outline-danger delete-confirm', 'icon' => 'ri-close-line'], ]; diff --git a/resources/views/segments/category/ParallelCategoriesGrid/ParallelCategoriesGrid.blade.php b/resources/views/segments/category/ParallelCategoriesGrid/ParallelCategoriesGrid.blade.php index 407dd2d..044bb56 100644 --- a/resources/views/segments/category/ParallelCategoriesGrid/ParallelCategoriesGrid.blade.php +++ b/resources/views/segments/category/ParallelCategoriesGrid/ParallelCategoriesGrid.blade.php @@ -9,7 +9,10 @@ @foreach($category->parallelCategories() as $subCat)
- {{$subCat->name}} + + {{$subCat->name}} +

{{$subCat->name}}