File: /var/www/vhost/disk-apps/teamdemo.sports-crowd.com/resources/views/users/preSubscribers.blade.php
@extends('modules.head') @section('contenido')
<div class="box-header">
<a class="btn btn-app btnReportProducts" data-toggle="modal" data-target="#modalImportSubscribers">
<i class="fa fa-cloud-upload"></i> {{ Lang::get('messages.modal_subscribers.title_3')}}
</a>
<a class="btn btn-app btnReportProducts" href="{{url('/clients/fans/all')}}">
<i class="fa fa-cloud-download"></i> {{ Lang::get('messages.modal_subscribers.title_8')}}
</a>
<a class="btn btn-app btnReportProducts" onclick="generateSubscribersCredit()">
<i class="fa fa-ticket"></i> {{ Lang::get('messages.modal_subscribers.title_7')}}
</a>
<a class="btn btn-app btnReportProducts" onclick="generateSubscribersRandom()">
<i class="fa fa-ticket"></i> {{ Lang::get('messages.modal_subscribers.single_match_subscriber')}}
</a>
<a class="btn btn-app btnReportProducts" onclick="deleteSubscribers()">
<i class="fa fa-ticket"></i> {{ Lang::get('messages.modal_subscribers.delete_subscriber_table_data')}}
</a>
</div>
<!-- List Data -->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ Lang::get('messages._subscribers.title_1')}}</h3>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive">
<table id="example2" class="table table-bordered table-hover dataTable" 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._subscribers.title_2')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">{{ Lang::get('messages._subscribers.title_3')}}</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._subscribers.title_7')}}</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._subscribers.title_8')}}</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._subscribers.title_6')}}</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._subscribers.title_4')}}</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._subscribers.title_5')}}</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._subscribers.payment')}}</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._subscribers.is_credit')}}</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.screen_clients_tag0') }}</th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
@include('users.modal.modalImportSubscribers')
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/users.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/ux.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function() {
_table = $('#example2').DataTable({
'paging': true,
'lengthChange': true,
'searching': true,
'ordering': false,
'info': true,
'autoWidth': true,
responsive: true,
processing: true,
serverSide: true,
language: {
url: window.DATATABLES_LANGUAGE_URL,
},
ajax: '{{ route("subscriber.table") }}',
columns: [{
data: 'document',
name: 'document'
},
{
data: 'email',
name: 'email'
},
{
data: 'seat.zone.zone.name',
name: 'seat.zone.zone.name',
"searchable": false
},
{
data: 'seat.zone.name',
name: 'seat.zone.name',
"searchable": false
},
{
data: 'seat.letter.name',
name: 'seat.letter.name',
"searchable": false
},
{
data: 'seat.code',
name: 'seat.code',
"searchable": false
},
{
data: 'price',
name: 'price',
"searchable": false
},
{
data: 'payment',
name: 'payment',
"searchable": false,
render: function(data, type, row, column) {
return row.payment ? 'SI' : 'NO';
},
},
{
data: 'is_credit',
name: 'is_credit',
"searchable": false,
render: function(data, type, row, column) {
return row.is_credit ? 'SI' : 'NO';
},
},
{
data: 'actions',
name: 'actions'
},
]
});
// Paginacion
$('#example2').on('page.dt', function() {
window.actualPage = $('#example2').DataTable().page();
localStorage.setItem("setPaginaActual", $('#example2').DataTable().page());
});
$('#example2').on('init.dt', function() {
if (localStorage.getItem("setPaginaActual")) {
let paginationCurrent = Number(localStorage.getItem("setPaginaActual", $('#example2').DataTable().page()));
if (parseInt(localStorage.getItem("setPaginaActual")) != paginationCurrent)
$('#example2').DataTable().page(paginationCurrent).draw('page');
}
});
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();
});
});
// Paginacion inicial
var URLactual = window.location.href;
document.addEventListener('click', function(e) {
if (e.target.closest('a')) {
var href = e.target.closest('a').href || '';
href = href.split('#')[0];
if (URLactual != href) {
localStorage.setItem("setPaginaActual", 0);
}
}
}, false);
</script>
@endsection