File: /var/www/vhost/disk-apps/alq-cali.bikenow.co/resources/views/flash_ticket/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;
}
.description {
min-width: 500px !important;
white-space: normal;
}
</style>
<div class="box-header">
<a class="auxiliar-black" href="{{ route('flash_ticket.add') }}">
<button class="btn btnAdd pull-right">
<i style="margin-right:5px;" class="fa fa-plus"></i>{{ __('messages.flash_ticket.title_7') }}
</button>
</a>
</div>
<!-- LISTADO Productos-->
<div class="box">
<div class="box-header">
<h3 class="box-title">{{ Lang::get('messages.flash_ticket.title_0')}} </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.flash_ticket.title_1')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_2')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_3')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_8')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_9')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_10')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_4')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_5')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.maximum_user_ticket_sales_box_office')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_17')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.show_image')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.coupon')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.apply_coupon')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_18')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.show_in')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.segmentation')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_19')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">
{{ Lang::get('messages.flash_ticket.title_6')}}
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">
{{ __('messages.events.title_15') }}
</th>
</tr>
</thead>
</table>
</div>
<!-- /.box-body -->
</div>
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/flash_ticket.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 = $('#example2').find("th:contains(" + Lang.get('messages.flash_ticket.title_19') + ")")[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 = $('#example2').DataTable({
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: "{{ route('flash_ticket.table') }}",
columns: [{
data: 'match_event',
render: function(data, type, row) {
if (row.match_event)
return row.match_event.name;
return '';
},
name: 'match_event.name',
},
{
data: 'zone',
render: function(data, type, row) {
if (row.zone)
return row.zone.name;
return '';
},
name: 'zone.name',
},
{
data: 'price',
render: function(data, type, row) {
return formatCurrency(row.price);
},
name: 'price'
},
{
data: 'web_price',
render: function(data, type, row) {
return formatCurrency(row.web_price);
},
name: 'web_price'
},
{
data: 'special_price',
render: function(data, type, row) {
return formatCurrency(row.special_price);
},
name: 'special_price'
},
{
data: 'courtesy_price',
render: function(data, type, row) {
return formatCurrency(row.courtesy_price);
},
name: 'courtesy_price'
},
{
data: 'salable_capacity',
name: 'salable_capacity'
},
{
data: 'maximum_number_ballots',
name: 'maximum_number_ballots'
},
{
data: 'maximum_user_ticket_sales_box_office',
name: 'maximum_user_ticket_sales_box_office'
},
{
data: 'image',
name: 'image'
},
{
data: 'show_image',
name: 'show_image'
},
{
data: 'coupon',
name: 'coupon'
},
{
data: 'apply_coupon_type',
render: function(data, type, row) {
response = row.apply_coupon_type;
switch (response) {
case 'none':
return 'Ninguno';
case 'special_price':
return 'Precio especial';
case 'tribune':
return 'Ver tribuna';
case 'all':
return 'Todos';
default:
return 'Ninguno';
}
},
name: 'apply_coupon_type'
},
{
data: 'description',
className: "description",
name: 'description'
},
{
data: 'show_in',
name: 'show_in'
},
{
data: 'segmentation',
render: function(data, type, row) {
let tags = '';
if (row.segmentation) {
let list = row.segmentation.split(',');
let data = list.map(function(d) {
return '<li>' + d + '</li>';
});
tags = data.join('');
}
return tags;
},
name: 'tags.name'
},
{
data: 'created_at',
name: 'created_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 Código, Nombre y Teléfono</p></div>';
$('#example2_filter').append(info);
$('#btn-info-busqueda').on('click', function() {
$('#menuBusqueda').toggle();
});
});
</script>
@endsection