File: /var/www/vhost/disk-apps/qas.sports-crowd.com/resources/views/ticket_backups/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(!in_array(Auth::user()->rol->id, [7,15]))
<a class="auxiliar-black" onclick="validateMasive()">
<button class="btn btnAdd pull-right">
<i class="fa fa-mail-reply-all"></i> {{ Lang::get('messages.ticket_backups.title_18') }}
</button>
</a>
<a class="auxiliar-black" onclick="getWithoutTickets()">
<button class="btn btnAdd pull-right">
<i class="fa fa-search"></i> {{ Lang::get('messages.ticket_backups.title_19') }}
</button>
</a>
@endif
</div>
<!-- List events-->
<div class="box">
<div class="box-header with-border">
<h3 class="box-title">{{ __('messages.ticket_backups.title_1') }}</h3>
</div>
<!-- /.box-header -->
<div class="box-body table-responsive ">
<table id="ticket_backups" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="ticket_backups_info">
<thead>
<tr role="row">
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_2') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_22') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_24') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_27') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_23') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_3') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_4') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_5') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_6-1') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_6-2') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_6-3') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_25') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_26') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_8') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_15') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_16') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_17-1') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_17-2') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ __('messages.ticket_backups.title_14') }}</th>
<th class="sorting" tabindex="0" aria-controls="ticket_backups" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">{{ __('messages.ticket_backups.title_7') }}</th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
<div class="modal fade" id="modal_without_ticket">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">{{ Lang::get('messages.ticket_backups.title_20') }}</h4>
</div>
<div class="modal-body">
<div class="box-body">
<div class="row mx-md-n5 container_total">
<div class="form-row">
<div class="form-group col-md-12 listTickets"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/ticket_backups.js') . '?v=' . time() }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script src="{{ asset('js/util.js') . '?v=' . time() }}"></script>
<script type="text/javascript">
$(document).ready(function() {
var sort_col = $('#ticket_backups').find("th:contains(" + Lang.get('messages.ticket_backups.title_14') + ")")[0].cellIndex;
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 = $('#ticket_backups').DataTable({
stateSave: true,
stateSaveCallback: function(settings, data) {
localStorage.setItem('DataTables_' + settings.sInstance, JSON.stringify(data))
},
stateLoadCallback: function(settings) {
return JSON.parse(localStorage.getItem('DataTables_' + settings.sInstance))
},
responsive: true,
processing: true,
serverSide: true,
order: [
[sort_col, 'desc']
],
language: {
url: window.DATATABLES_LANGUAGE_URL,
},
scrollX: true,
scrollCollapse: true,
paging: true,
fixedColumns: fixedColumns,
ajax: {
url: "{{ route('ticket_backups.table') }}",
headers: {
"X-CSRF-TOKEN": $('meta[name="csrf-token"]').attr("content"),
},
type: "POST"
},
columns: [{
data: 'payment_reference',
name: 'payment_reference'
},
{
data: 'payment_transaction_id',
name: 'payment_transaction_id'
},
{
data: 'reference_tercero',
name: 'reference_tercero'
},
{
data: 'pin',
render: function(data, type, row) {
return row.pin ?? row.pin_internal ?? row.pin_tercero;
},
name: 'pin' || 'pin_internal' || 'pin_tercero'
},
{
data: 'gatewayPayments',
name: 'gateway_payments.name'
},
{
data: 'payment_state',
name: 'payment_state'
},
{
data: 'payment_attempts',
name: 'payment_attempts'
},
{
data: 'payment_comment',
name: 'payment_comment'
},
{
data: 'subtotal',
render: function(data, type, row) {
return formatCurrency(row.subtotal ?? 0);
},
name: 'subtotal'
},
{
data: 'service_charge',
render: function(data, type, row) {
return formatCurrency(row.service_charge ?? 0);
},
name: 'service_charge'
},
{
data: 'total',
render: function(data, type, row) {
return formatCurrency(row.total ?? 0);
},
name: 'total'
},
{
data: 'events',
name: 'match_events.name'
},
{
data: 'ticketTypes',
name: 'ticket_types.name'
},
{
data: 'tickets',
name: 'total'
},
{
data: 'first_name',
render: function(data, type, row) {
return row.last_name ? (row.first_name + ' ' + row.last_name) : row.first_name;
},
name: 'users.first_name' || 'users.last_name'
},
{
data: 'email',
name: 'users.email'
},
{
data: 'sellerFirst_name',
render: function(data, type, row) {
return row.seller ? row.seller.last_name ? (row.seller.first_name + ' ' + row.seller.last_name) : row.seller.first_name : '';
},
name: 'seller.first_name' || 'seller.last_name'
},
{
data: 'sellerEmail',
name: 'seller.email'
},
{
data: 'created_at',
name: 'created_at'
},
{
data: 'actions',
name: 'actions'
},
]
});
});
</script>
@endsection