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">
|
2018-08-11 05:09:41 +00:00
|
|
|
@if ($user->all_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>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th>Count {{ $user->all_client_service_movements()->count() }}</th>
|
|
|
|
<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,
|
|
|
|
ajax: {
|
|
|
|
url: "/api/r/service_movements"
|
|
|
|
},
|
|
|
|
columns: [
|
2018-08-23 05:17:26 +00:00
|
|
|
{ data:
|
|
|
|
@if($user->isWholesaler())
|
|
|
|
"admin_service_id_url"
|
|
|
|
@else
|
|
|
|
"service_id_url"
|
|
|
|
@endif
|
|
|
|
},
|
|
|
|
{ data: "account_name" },
|
2019-06-07 06:54:27 +00:00
|
|
|
{ data: "name_short" },
|
2018-08-23 05:17:26 +00:00
|
|
|
{ data: "status" },
|
2018-08-11 05:09:41 +00:00
|
|
|
{ data: "product_name" }
|
|
|
|
],
|
|
|
|
language: {
|
2018-11-21 02:46:16 +00:00
|
|
|
emptyTable: "No Service Movements"
|
2018-08-11 05:09:41 +00:00
|
|
|
},
|
2018-09-18 02:37:04 +00:00
|
|
|
order: [3, 'asc'],
|
2018-08-23 05:17:26 +00:00
|
|
|
rowGroup: {
|
|
|
|
dataSrc: 'account_name',
|
|
|
|
startRender: null,
|
|
|
|
endRender: function ( rows, group ) {
|
|
|
|
return rows.count()+' x ' + group;
|
|
|
|
},
|
|
|
|
},
|
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
|