File: /var/www/vhost/disk-apps/alq-cali.bikenow.co/resources/views/collection_invoices/list.blade.php
@extends('modules.head') @section('contenido')
<style>
/* Ensure that the demo table scrolls */
/* th, */
td {
white-space: nowrap;
}
div.dataTables_wrapper {
height: fit-content;
margin: 0px 10px 0px 10px;
}
.dataTables_scrollBody {
max-height: none !important;
}
</style>
<div class="box-header">
@if (Auth::user()->rol->id == 1)
<a class="auxiliar-black" href="{{ url('/collection_invoices/add') }}">
<button class="btn btnAdd pull-right">
<i style="margin-right:5px;" class="fa fa-plus"></i>
{{ Lang::get('messages.collection_invoices.title_create') }}
</button>
</a>
@endif
</div>
<!-- List -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ Lang::get('messages.collection_invoices.title_list') }}</h3>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive ">
<table id="example2" class="stripe row-border order-column" style="width:100%" role="grid" aria-describedby="example2_info">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag1') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag2') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag3') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag5') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag4') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag9') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag6') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.deposit_of') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag7') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag8') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag10') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag0') }} </th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending"> {{ Lang::get('messages.collection_invoices.tag00') }} </th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/crud.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/collection_invoices.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
let fixedColumns = false;
let isMobileDevice = /Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
if (!isMobileDevice) {
fixedColumns = {
left: 1,
right: 2
};
}
_table = $('#example2').DataTable({
responsive: true,
processing: true,
serverSide: true,
order: [],
language: {
url: window.DATATABLES_LANGUAGE_URL,
},
scrollX: true,
scrollCollapse: true,
paging: true,
fixedColumns: fixedColumns,
ajax: "{{ route('collection_invoices.table') }}",
columns: [{
data: 'name',
name: 'name'
},
{
data: 'image',
name: 'image'
},
{
data: 'total',
name: 'total'
},
{
data: 'payment',
name: 'payment'
},
{
data: 'debt',
name: 'debt'
},
{
data: 'percentage',
render: function(data, type, row, column) {
return row.percentage + '%';
},
name: 'percentage'
},
{
data: 'gateway_payment',
render: function(data, type, row, column) {
return row.gateway_payment ? row.gateway_payment.name : '';
},
name: 'gateway_payment.name'
},
{
data: 'deposit_of',
name: 'deposit_of'
},
{
data: 'user_id',
render: function(data, type, row, column) {
return row.user ? row.user.last_name ? (row.user.first_name + ' ' + row.user.last_name) : row.user.first_name : '';
},
name: 'user.first_name' || 'user.last_name'
},
{
data: 'created_at',
name: 'created_at'
},
{
data: 'lastPaymentDate',
name: 'updated_at'
},
{
data: 'active',
name: 'active'
},
{
data: 'actions',
name: 'actions'
}
]
});
var info =
'<i class="fa fa-info-circle" id="btn-info-busqueda"></i><div class="dropdown-menu" id="menuBusqueda" style="left: 50%; padding: 5px; background-color: #f9fb8f;"><p data-toggle="modal">Busqueda por Nombre, Orden y Link</p></div>';
$('#example2_filter').append(info);
$('#btn-info-busqueda').on('click', function() {
$('#menuBusqueda').toggle();
});
});
</script>
@endsection