Updated datatables, using @pa instead of @js/@css, using conditionalPaging in datatables
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<div class="card card-dark">
|
||||
<div class="card-header">
|
||||
<div class="card-header p-2">
|
||||
<h4 class="card-title">Accounts</h4>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body p-2">
|
||||
@if($x=$o->accounts_all->count())
|
||||
<table class="table table-striped table-hover" id="accounts">
|
||||
<table class="table table-sm table-striped table-hover" id="accounts">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Profile</th>
|
||||
<th style="width: 10%;">Profile</th>
|
||||
<th>Name</th>
|
||||
<th class="text-right">Services</th>
|
||||
<th class="text-right" style="width: 10%;">Services</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -40,15 +40,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-styles')
|
||||
@css(datatables,bootstrap4)
|
||||
@append
|
||||
@section('page-scripts')
|
||||
@js(datatables,bootstrap4)
|
||||
@pa(datatables,rowgroup|conditionalpaging)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#accounts').DataTable({
|
||||
conditionalPaging: true,
|
||||
language: {
|
||||
emptyTable: "No Active Clients"
|
||||
},
|
||||
|
@@ -1,16 +1,16 @@
|
||||
<!-- $o=Account::class -->
|
||||
<!-- Show outstanding invoices -->
|
||||
<div class="card card-warning">
|
||||
<div class="card-header">
|
||||
<div class="card-header p-2">
|
||||
<h3 class="card-title">Invoices Due</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body p-2">
|
||||
@if(($list=$o->invoiceSummaryDue()->get())->count())
|
||||
@include('theme.backend.adminlte.invoice.widget.due',['type'=>'account'])
|
||||
@include('theme.backend.adminlte.invoice.widget.due',['type'=>'account','list'=>$list])
|
||||
|
||||
@else
|
||||
<p>No invoice due</p>
|
||||
<p>No invoices to list</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
@@ -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,
|
||||
|
@@ -1,17 +1,15 @@
|
||||
<!-- $o=Account::class -->
|
||||
@php
|
||||
$o->load(['services_active.invoiced_service_items_active_recent']);
|
||||
@endphp
|
||||
@php($o->load(['services_active.invoiced_service_items_active_recent']))
|
||||
|
||||
<!-- Show active services -->
|
||||
<div class="card card-light">
|
||||
<div class="card-header">
|
||||
<div class="card-header p-2">
|
||||
<h3 class="card-title">Active Services</h3>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="card-body p-2">
|
||||
@if(($x=$o->services_active)->count())
|
||||
<table class="table table-striped table-hover w-100" id="services_active_{{ $ao->id }}">
|
||||
<table class="table table-sm table-striped table-hover" id="services_active_{{ $ao->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
@@ -47,29 +45,29 @@
|
||||
</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">
|
||||
$(document).ready(function() {
|
||||
$('#services_active_{{ $ao->id }}').DataTable({
|
||||
order: [[1,'asc'],[2,'asc']],
|
||||
rowGroup: {
|
||||
dataSrc: 1,
|
||||
endRender: function ( rows, group ) {
|
||||
return rows.count()+' x ' + group;
|
||||
@if($x->count())
|
||||
$('#services_active_{{ $ao->id }}').DataTable({
|
||||
conditionalPaging: true,
|
||||
order: [[1,'asc'],[2,'asc']],
|
||||
rowGroup: {
|
||||
dataSrc: 1,
|
||||
endRender: function (rows,group) {
|
||||
return rows.count()+' x '+group;
|
||||
},
|
||||
},
|
||||
},
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [1],
|
||||
visible: false,
|
||||
},
|
||||
],
|
||||
});
|
||||
columnDefs: [
|
||||
{
|
||||
targets: [1],
|
||||
visible: false,
|
||||
},
|
||||
],
|
||||
});
|
||||
@endif
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user