From 80af7de859f0495b12df9166b9536a50621af29b Mon Sep 17 00:00:00 2001 From: xPand4B Date: Tue, 30 Jul 2019 13:38:06 +0200 Subject: [PATCH 1/2] Removed paginate, because issuse with search --- app/Http/Controllers/MenuManagementController.php | 4 ++-- app/Http/Controllers/OrderManagementController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Http/Controllers/MenuManagementController.php b/app/Http/Controllers/MenuManagementController.php index 235b8a0..098094f 100644 --- a/app/Http/Controllers/MenuManagementController.php +++ b/app/Http/Controllers/MenuManagementController.php @@ -26,8 +26,8 @@ public function __construct() public function index() { try { - $menus = Menu::FromUser(Auth::user()->id) - ->paginate(15); + $menus = Menu::FromUser(Auth::user()->id)->get(); + // ->paginate(15); } catch (ColumnSortableException $e) { return redirect()->back(); diff --git a/app/Http/Controllers/OrderManagementController.php b/app/Http/Controllers/OrderManagementController.php index ff44bac..21fbaf6 100644 --- a/app/Http/Controllers/OrderManagementController.php +++ b/app/Http/Controllers/OrderManagementController.php @@ -27,8 +27,8 @@ public function __construct() public function index() { try { - $orders = Order::FromUser(Auth::user()->id) - ->paginate(15); + $orders = Order::FromUser(Auth::user()->id)->get(); + // ->paginate(15); } catch (ColumnSortableException $e) { return redirect()->back(); From 786e62741a12db37b12bbdc4ad5e74d161bdfaad Mon Sep 17 00:00:00 2001 From: xPand4B Date: Tue, 30 Jul 2019 13:38:25 +0200 Subject: [PATCH 2/2] Removed paginate + small layout changes --- .../views/pages/manage/menus/index.blade.php | 32 +++++++++++-------- .../views/pages/manage/orders/index.blade.php | 32 +++++++++++-------- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/resources/views/pages/manage/menus/index.blade.php b/resources/views/pages/manage/menus/index.blade.php index 9036356..356e51a 100644 --- a/resources/views/pages/manage/menus/index.blade.php +++ b/resources/views/pages/manage/menus/index.blade.php @@ -44,10 +44,10 @@ - - - - + + + + @@ -59,18 +59,22 @@ @endif - - - + + -
@sortablelink('name', trans('tables.management.head.name'))@sortablelink('number', trans('tables.management.head.number'))@sortablelink('price', trans('tables.management.head.price'))@sortablelink('created_at', trans('tables.management.head.createdAt'))@sortablelink('updated_at', trans('tables.management.head.updatedAt'))@sortablelink('number', trans('tables.management.head.number'))@sortablelink('price', trans('tables.management.head.price'))@sortablelink('created_at', trans('tables.management.head.createdAt'))@sortablelink('updated_at', trans('tables.management.head.updatedAt'))
id:{{ $menu->id }} {{ $menu->name }}{{ $menu->number }}{{ $menu->price }} {{ config('app.currency') }} - {{ date('d.m.Y - H:i', strtotime($menu->created_at)) }} @lang('forms.manage.edit.time') + {{ $menu->number }}{{ $menu->price }} {{ config('app.currency') }} + {{ date('d.m.Y', strtotime($menu->created_at)) }} +
+ {{ date('H:i', strtotime($menu->created_at)) }} @lang('forms.manage.edit.time')
+ @if ($menu->created_at != $menu->updated_at) - {{ date('d.m.Y - H:i', strtotime($menu->updated_at)) }} @lang('forms.manage.edit.time') + {{ date('d.m.Y', strtotime($menu->updated_at)) }} +
+ {{ date('H:i', strtotime($menu->updated_at)) }} @lang('forms.manage.edit.time') @endif
-
+
{{-- Edit --}} @if (! $menu->order->closed) @@ -109,7 +113,7 @@
- {!! $menus->appends(\Request::except('page'))->render() !!} + {{-- {!! $menus->appends(\Request::except('page'))->render() !!} --}}
@include('pages.manage.menus.edit', [ 'menus' => $menus ]) @@ -119,4 +123,6 @@
@endsection -@include('partials._livesearch') +@section('javascript') + @include('partials._livesearch') +@endsection diff --git a/resources/views/pages/manage/orders/index.blade.php b/resources/views/pages/manage/orders/index.blade.php index e5e4ae0..9a7e4b8 100644 --- a/resources/views/pages/manage/orders/index.blade.php +++ b/resources/views/pages/manage/orders/index.blade.php @@ -44,10 +44,10 @@ - - - - + + + + @@ -59,24 +59,30 @@ @endif - - - -
@sortablelink('name', trans('tables.management.head.name'))@sortablelink('delivery_service', trans('tables.management.head.deliveryService'))@sortablelink('deadline', trans('tables.management.head.deadline'))@sortablelink('created_at', trans('tables.management.head.createdAt'))@sortablelink('updated_at', trans('tables.management.head.updatedAt'))@sortablelink('delivery_service', trans('tables.management.head.deliveryService'))@sortablelink('deadline', trans('tables.management.head.deadline'))@sortablelink('created_at', trans('tables.management.head.createdAt'))@sortablelink('updated_at', trans('tables.management.head.updatedAt'))
id:{{ $order->id }} {{ $order->name }} + {{ $order->delivery_service }} - {{ date('d.m.Y - H:i', strtotime($order->deadline)) }} @lang('forms.manage.edit.time') + + {{ date('d.m.Y', strtotime($order->deadline)) }} +
+ {{ date('H:i', strtotime($order->deadline)) }} @lang('forms.manage.edit.time')
- {{ date('d.m.Y - H:i', strtotime($order->created_at)) }} @lang('forms.manage.edit.time') + + {{ date('d.m.Y', strtotime($order->created_at)) }} +
+ {{ date('H:i', strtotime($order->created_at)) }} @lang('forms.manage.edit.time')
+ @if ($order->created_at != $order->updated_at) - {{ date('d.m.Y - H:i', strtotime($order->updated_at)) }} @lang('forms.manage.edit.time') + {{ date('d.m.Y', strtotime($order->updated_at)) }} +
+ {{ date('H:i', strtotime($order->updated_at)) }} @lang('forms.manage.edit.time') @endif
-
+
{{-- Edit --}} @if (! $order->closed) @@ -123,7 +129,7 @@
- {!! $orders->appends(\Request::except('page'))->render() !!} + {{-- {!! $orders->appends(\Request::except('page'))->render() !!} --}}
@include('pages.manage.orders.edit', [ 'orders' => $orders, 'timesteps' => $timesteps])