2020-04-14 07:40:47 +00:00
|
|
|
<!-- Show client movements -->
|
2019-06-02 05:35:48 +00:00
|
|
|
<div class="card card-warning card-outline">
|
|
|
|
<div class="card-header">
|
|
|
|
<h4 class="card-title">Service Movements</h4>
|
|
|
|
|
|
|
|
<div class="card-tools">
|
|
|
|
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>
|
|
|
|
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-remove"></i></button>
|
2018-08-11 05:09:41 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2019-06-02 05:35:48 +00:00
|
|
|
<div class="card-body">
|
2020-04-14 07:40:47 +00:00
|
|
|
@if (($x=$user->client_service_movements())->count())
|
2019-06-02 05:35:48 +00:00
|
|
|
<table class="table table-striped table-hover" id="service_movements" style="width: 100%;">
|
2018-08-11 05:09:41 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Account</th>
|
|
|
|
<th>Name</th>
|
|
|
|
<th>Status</th>
|
|
|
|
<th>Product</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2020-04-14 07:40:47 +00:00
|
|
|
<tbody>
|
|
|
|
@foreach ($x as $o)
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url('u/service',$o->id) }}">{{ $o->id }}</a></td>
|
|
|
|
<td>{{ $o->account->name }}</td>
|
2020-04-18 22:33:41 +00:00
|
|
|
<td>{{ $o->name_short }}</td>
|
2020-04-22 13:23:54 +00:00
|
|
|
<td>
|
|
|
|
{{ $o->status }}
|
|
|
|
@if ($o->status == 'ORDER-SENT')
|
|
|
|
(#{{$o->order_info_reference}})
|
|
|
|
@endif
|
|
|
|
</td>
|
2020-04-14 07:40:47 +00:00
|
|
|
<td>{{ $o->product->name }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
2018-08-11 05:09:41 +00:00
|
|
|
<tfoot>
|
|
|
|
<tr>
|
2020-04-14 07:40:47 +00:00
|
|
|
<th>Count {{ $x->count() }}</th>
|
2018-08-11 05:09:41 +00:00
|
|
|
<th colspan="4"> </th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
@else
|
|
|
|
<p>No Service Movements</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section('page-scripts')
|
2020-02-08 11:51:50 +00:00
|
|
|
@css('//cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery')
|
|
|
|
@js('//cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery')
|
2019-07-04 04:55:05 +00:00
|
|
|
@css('//cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','dt-responsive-css','jq-dt-css')
|
|
|
|
@js('//cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','dt-responsive-js','jq-dt-js')
|
|
|
|
@css('//cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css','dt-rowgroup-css','jq-dt-css')
|
|
|
|
@js('//cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js','dt-rowgroup-js','jq-dt-js')
|
2019-06-02 05:35:48 +00:00
|
|
|
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
|
|
|
|
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
|
2018-08-11 05:09:41 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#service_movements').DataTable( {
|
|
|
|
responsive: true,
|
2018-09-18 02:37:04 +00:00
|
|
|
order: [3, 'asc'],
|
2018-08-23 05:17:26 +00:00
|
|
|
rowGroup: {
|
2020-04-14 07:40:47 +00:00
|
|
|
dataSrc: 1,
|
|
|
|
startRender: function ( rows, group ) {
|
|
|
|
return group+': '+rows.count()+' Services';
|
2018-08-23 05:17:26 +00:00
|
|
|
},
|
|
|
|
},
|
2018-09-18 02:37:04 +00:00
|
|
|
orderFixed: [1, 'asc']
|
2018-08-11 05:09:41 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
$('#service_movements tbody').on('click','tr', function () {
|
|
|
|
$(this).toggleClass('selected');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2018-09-18 02:37:04 +00:00
|
|
|
@append
|