Updated datatables, using @pa instead of @js/@css, using conditionalPaging in datatables
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
<!-- $o=Account::class -->
|
||||
<!-- Show past 12 months invoices -->
|
||||
<div class="card card-success">
|
||||
<div class="card-header">
|
||||
<div class="card-header p-2">
|
||||
<h3 class="card-title">Past Invoices</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body p-2">
|
||||
@if(($list=$o->invoiceSummaryPast()->where('invoices.created_at','>=',\Carbon\Carbon::now()->subYears(2)->startOfYear())->get())->count())
|
||||
<table class="table table-bordered w-100" id="invoices_past_{{ $o->id }}">
|
||||
<table class="table table-sm table-striped" id="invoices_past_{{ $o->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Account</th>
|
||||
@@ -37,16 +37,14 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-styles')
|
||||
@css(datatables,bootstrap4|rowgroup)
|
||||
@append
|
||||
@section('page-scripts')
|
||||
@js(datatables,bootstrap4|rowgroup)
|
||||
@pa(datatables,rowgroup|conditionalpaging)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
@if($list->count())
|
||||
$(document).ready(function() {
|
||||
$('#invoices_past_{{ $o->id }}').DataTable({
|
||||
conditionalPaging: true,
|
||||
order: [[2,'desc'],[0,'asc']],
|
||||
rowGroup: {
|
||||
dataSrc: 0,
|
||||
|
Reference in New Issue
Block a user