2022-02-02 06:12:17 +00:00
|
|
|
<!-- $o=App\Models\User -->
|
2021-06-29 06:36:34 +00:00
|
|
|
<!-- Show active services -->
|
2021-06-30 05:50:33 +00:00
|
|
|
<div class="card card-dark">
|
2021-06-29 06:36:34 +00:00
|
|
|
<div class="card-header">
|
|
|
|
<h3 class="card-title">Active Services</h3>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
@if ($o->services->count())
|
|
|
|
<table class="table table-striped table-hover" id="services_active">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2022-06-12 01:21:20 +00:00
|
|
|
<th>Category</th>
|
2021-06-29 06:36:34 +00:00
|
|
|
<th>Service</th>
|
|
|
|
<th>Product</th>
|
|
|
|
<th>Next Invoice</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@foreach ($o->services as $oo)
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url('u/service',[$oo->id]) }}">{{ $oo->sid }}</a></td>
|
2022-06-12 01:21:20 +00:00
|
|
|
<td>{{ $oo->product->category_name }}</td>
|
2021-06-29 06:36:34 +00:00
|
|
|
<td>{{ $oo->name_short }}</td>
|
2022-10-18 12:23:45 +00:00
|
|
|
<td>{{ $oo->product->name_short }}</td>
|
2022-04-22 00:36:41 +00:00
|
|
|
<td>{{ $oo->external_billing ? '-' : $oo->invoice_next->format('Y-m-d') }}</td>
|
2021-06-29 06:36:34 +00:00
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<th>Count {{ $o->services->count() }}</th>
|
|
|
|
<th colspan="4"> </th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
@else
|
|
|
|
<p>No services active</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@section('page-scripts')
|
2021-12-20 03:08:00 +00:00
|
|
|
@css(datatables,bootstrap4|rowgroup)
|
|
|
|
@js(datatables,bootstrap4|rowgroup)
|
2021-06-29 06:36:34 +00:00
|
|
|
|
|
|
|
<style>
|
|
|
|
table.dataTable tr.dtrg-group.dtrg-end.dtrg-level-0 {
|
|
|
|
font-size: 75%;
|
|
|
|
background-color: #eeeeee !important;
|
|
|
|
}
|
|
|
|
table.dataTable tr.dtrg-group.dtrg-end.dtrg-level-0 td {
|
|
|
|
background-color: #fefefe !important;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
2022-04-21 04:41:26 +00:00
|
|
|
$('#services_active').DataTable({
|
2022-04-19 07:07:39 +00:00
|
|
|
order: [[1,'asc'],[2,'asc']],
|
2021-06-29 06:36:34 +00:00
|
|
|
rowGroup: {
|
|
|
|
dataSrc: 1,
|
|
|
|
endRender: function ( rows, group ) {
|
|
|
|
return rows.count()+' x ' + group;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
$('#services_active tbody').on('click','tr', function () {
|
|
|
|
$(this).toggleClass('selected');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|