Skip to content

Commit

Permalink
Merge pull request #8 from xPand4B/v1.1.0
Browse files Browse the repository at this point in the history
V1.1.0
  • Loading branch information
xPand4B authored Jul 30, 2019
2 parents 9d55099 + 786e627 commit b3e1c6f
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 30 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/MenuManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Controllers/OrderManagementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
32 changes: 19 additions & 13 deletions resources/views/pages/manage/menus/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
<table class="table table-sm table-hover" id="table-management">
<thead>
<th>@sortablelink('name', trans('tables.management.head.name'))</th>
<th>@sortablelink('number', trans('tables.management.head.number'))</th>
<th>@sortablelink('price', trans('tables.management.head.price'))</th>
<th>@sortablelink('created_at', trans('tables.management.head.createdAt'))</th>
<th>@sortablelink('updated_at', trans('tables.management.head.updatedAt'))</th>
<th class="text-center">@sortablelink('number', trans('tables.management.head.number'))</th>
<th class="text-center">@sortablelink('price', trans('tables.management.head.price'))</th>
<th class="text-center">@sortablelink('created_at', trans('tables.management.head.createdAt'))</th>
<th class="text-center">@sortablelink('updated_at', trans('tables.management.head.updatedAt'))</th>
<th></th>
</thead>
<tbody>
Expand All @@ -59,18 +59,22 @@
@endif
<td style="display:none">id:{{ $menu->id }}</td>
<td>{{ $menu->name }}</td>
<td>{{ $menu->number }}</td>
<td>{{ $menu->price }} {{ config('app.currency') }}</td>
<td>
{{ date('d.m.Y - H:i', strtotime($menu->created_at)) }} @lang('forms.manage.edit.time')
<td class="text-center">{{ $menu->number }}</td>
<td class="text-center">{{ $menu->price }} {{ config('app.currency') }}</td>
<td class="text-center">
{{ date('d.m.Y', strtotime($menu->created_at)) }}
<br>
{{ date('H:i', strtotime($menu->created_at)) }} @lang('forms.manage.edit.time')
</td>
<td>
<td class="text-center">
@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)) }}
<br>
{{ date('H:i', strtotime($menu->updated_at)) }} @lang('forms.manage.edit.time')
@endif
</td>
<td>
<div class="row pull-right">
<div class="row pull-right mx-2">

{{-- Edit --}}
@if (! $menu->order->closed)
Expand Down Expand Up @@ -109,7 +113,7 @@

<hr class="mb-5">

{!! $menus->appends(\Request::except('page'))->render() !!}
{{-- {!! $menus->appends(\Request::except('page'))->render() !!} --}}
</div>

@include('pages.manage.menus.edit', [ 'menus' => $menus ])
Expand All @@ -119,4 +123,6 @@
</div>
@endsection

@include('partials._livesearch')
@section('javascript')
@include('partials._livesearch')
@endsection
32 changes: 19 additions & 13 deletions resources/views/pages/manage/orders/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
<table class="table table-sm table-hover" id="table-management">
<thead>
<th>@sortablelink('name', trans('tables.management.head.name'))</th>
<th>@sortablelink('delivery_service', trans('tables.management.head.deliveryService'))</th>
<th>@sortablelink('deadline', trans('tables.management.head.deadline'))</th>
<th>@sortablelink('created_at', trans('tables.management.head.createdAt'))</th>
<th>@sortablelink('updated_at', trans('tables.management.head.updatedAt'))</th>
<th class="text-center">@sortablelink('delivery_service', trans('tables.management.head.deliveryService'))</th>
<th class="text-center">@sortablelink('deadline', trans('tables.management.head.deadline'))</th>
<th class="text-center">@sortablelink('created_at', trans('tables.management.head.createdAt'))</th>
<th class="text-center">@sortablelink('updated_at', trans('tables.management.head.updatedAt'))</th>
<th></th>
</thead>
<tbody>
Expand All @@ -59,24 +59,30 @@
@endif
<td style="display:none">id:{{ $order->id }}</td>
<td>{{ $order->name }}</td>
<td>
<td class="text-center">
<a href="{{ $order->site_link }}" class="link" target="_blank">
{{ $order->delivery_service }}
</a>
</td>
<td>
{{ date('d.m.Y - H:i', strtotime($order->deadline)) }} @lang('forms.manage.edit.time')
<td class="text-center">
{{ date('d.m.Y', strtotime($order->deadline)) }}
<br>
{{ date('H:i', strtotime($order->deadline)) }} @lang('forms.manage.edit.time')
</td>
<td>
{{ date('d.m.Y - H:i', strtotime($order->created_at)) }} @lang('forms.manage.edit.time')
<td class="text-center">
{{ date('d.m.Y', strtotime($order->created_at)) }}
<br>
{{ date('H:i', strtotime($order->created_at)) }} @lang('forms.manage.edit.time')
</td>
<td>
<td class="text-center">
@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)) }}
<br>
{{ date('H:i', strtotime($order->updated_at)) }} @lang('forms.manage.edit.time')
@endif
</td>
<td>
<div class="row pull-right">
<div class="row pull-right mx-2">

{{-- Edit --}}
@if (! $order->closed)
Expand Down Expand Up @@ -123,7 +129,7 @@

<hr class="mb-5">

{!! $orders->appends(\Request::except('page'))->render() !!}
{{-- {!! $orders->appends(\Request::except('page'))->render() !!} --}}
</div>

@include('pages.manage.orders.edit', [ 'orders' => $orders, 'timesteps' => $timesteps])
Expand Down

0 comments on commit b3e1c6f

Please sign in to comment.