add datatables on orders
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
@include('Shop.Orders.partials.list', ['dataTable' => $orders])
|
||||
|
||||
@if ($customer['orders'] ?? false)
|
||||
<table class="table table-striped gradient-green1 green-fluo">
|
||||
@foreach ($customer['orders'] as $order)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@if ($customer['company'])
|
||||
<i class="fa fa-building pr-2"></i>
|
||||
{{ $customer['company'] }}
|
||||
{{ $customer['company'] }}<br>
|
||||
@endif
|
||||
|
||||
<i class="fa fa-fw fa-user pr-2"></i>
|
||||
|
||||
2
resources/views/Shop/Orders/partials/filters.blade.php
Normal file
2
resources/views/Shop/Orders/partials/filters.blade.php
Normal file
@@ -0,0 +1,2 @@
|
||||
<form id="{{ $model }}-filters">
|
||||
</form>
|
||||
29
resources/views/Shop/Orders/partials/list.blade.php
Normal file
29
resources/views/Shop/Orders/partials/list.blade.php
Normal file
@@ -0,0 +1,29 @@
|
||||
@include('components.datatable', [
|
||||
'route' => route('Shop.Orders.index'),
|
||||
'model' => 'orders',
|
||||
'with_add' => false,
|
||||
'with_filters' => true,
|
||||
'with_exports' => false,
|
||||
'with_print' => false,
|
||||
'show_callback' => 'OrderView(id);',
|
||||
])
|
||||
|
||||
@component('components.layout.modal-filters', ['title' => 'Filters', 'id' => 'modal-aml_risks-filters'])
|
||||
@include('Shop.Orders.partials.filters', ['model' => 'aml_risks'])
|
||||
@endcomponent
|
||||
|
||||
@push('js')
|
||||
<script>
|
||||
|
||||
function OrderView(id) {
|
||||
var url_open = "{{ route('Shop.Orders.view') }}/" + id;
|
||||
openModal("Voir une commande", '#model-form', url_open, false, false, 'xl', {{ !($with_add ?? false) }});
|
||||
}
|
||||
|
||||
function OrderRefresh()
|
||||
{
|
||||
reloadDatatable("orders");
|
||||
}
|
||||
|
||||
</script>
|
||||
@endpush
|
||||
Reference in New Issue
Block a user