File: /var/www/vhost/disk-apps/agile-selling-orl/resources/views/discounts/infoDiscount.blade.php
@extends('modules.head') @section('contenido')
<h6><a class="ruta" class="" href="{{url('/discounts')}}">{{ Lang::get('messages.screen_discounts_tag1')}}</a>
<span class="separador-ruta">|</span><a class="ruta" class="">{{Lang::get('messages.screen_discounts_tag42')}}</a>
</h6>
@if(isset($discountUsers[0]))
<div class="box">
<div class="box-header with-border">
<div class="card cardDetailDiscount">
<ul class="list-group list-group-flush">
<li class="list-group-item text-center active">{{$discountUsers[0]->discount->name}}</li>
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag40')}}:
<span class="pull-right">
@if($discountUsers[0]->discount->price_discount>0)
$ {{number_format($discountUsers[0]->discount->price_discount)}}
@else
{{$discountUsers[0]->discount->percentage_discount}}%
@endif
</span>
</li>
@if($discountUsers[0]->discount->value_for_win)
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag43')}}:
<span class="pull-right">
$ {{number_format($discountUsers[0]->discount->value_for_win)}}
</span>
</li>
@endif
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag33')}}:
<span class="pull-right">
@if($discountUsers[0]->discount->current_winners == null)
0
@else
{{$discountUsers[0]->discount->current_winners}}
@endif de {{$discountUsers[0]->discount->max_winners}}
</span>
</li>
@if($discountUsers[0]->discount->code_coupon)
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag45')}}:
<span class="pull-right">
{{$discountUsers[0]->discount->code_coupon}}
</span>
</li>
@endif
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag46')}}:
<span class="pull-right">
{{$discountUsers[0]->discount->when_start}}
</span>
</li>
<li class="list-group-item">{{ Lang::get('messages.screen_discounts_tag47')}}:
<span class="pull-right">
{{$discountUsers[0]->discount->when_finish}}
</span>
</li>
</ul>
</div>
</div>
</div>
@endif
<div class="box">
<div class="box-header">
<h3 class="box-title">{{ Lang::get('messages.screen_discounts_tag41')}}</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.screen_discounts_tag35')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_discounts_tag36')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_discounts_tag37')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_discounts_tag38')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_discounts_tag39')}}</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">{{ Lang::get('messages.screen_discounts_tag44')}}</th>
@if(isset($discountUsers[0]) && $discountUsers[0]->discount->discount_type_id == 1)
<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_discounts_tag5')}}</th>
@endif
</tr>
</thead>
<tbody>
@foreach($discountUsers as $discountUser)
<tr>
<td>{{$discountUser->user->first_name}} {{$discountUser->user->last_name}}</td>
<td>{{$discountUser->user->email}}</td>
<td>{{$discountUser->user->phone}}</td>
<td>{{$discountUser->user->document}}</td>
<td>{{$discountUser->order->code}}</td>
<td>$ {{number_format($discountUser->order->total_price)}}</td>
@if(isset($discountUsers[0]) && $discountUsers[0]->discount->discount_type_id == 1)
<td>
<i class="fa fa-pencil iconMini " onClick="clickEditUserDetail({{$discountUser->discount_id}})" data-id="{{$discountUser->discount_id}}" data-toggle="tooltip" data-placement="bottom" title="Editar" style="cursor:pointer;"></i>
<i class="fa fa-trash iconMini " onClick="clickDeleteUserDetail({{$discountUser->discount_id}})" data-id="{{$discountUser->discount_id}}" data-toggle="tooltip" data-placement="bottom" title="Eliminar" style="cursor:pointer;" title="Eliminar"></i>
</td>
@endif
</tr>
@endforeach
</tbody>
</table>
</div>
<!-- /.box-body -->
</div>
<!-- /.MODAL VER INFO admin -->
@include('orders.modal_calification')
<script src="{{ asset('js/jQuery/jquery-2.2.3.min.js') }}"></script>
<script src="{{ asset('js/orders.js') }}"></script>
<script src="{{ asset('js/bootstrap/js/bootstrap.min.js') }}"></script>
<script type="text/javascript">
$(document).ready(function () {
$('#example2').DataTable({
'paging' : true,
'lengthChange': true,
'searching' : true,
'ordering' : false,
'info' : true,
'autoWidth' : true,
"order" : [],
"language": {
url: 'https://cdn.datatables.net/plug-ins/1.10.19/i18n/Spanish.json'
},
buttons: [
'copyHtml5',
'excelHtml5',
'csvHtml5',
'pdfHtml5'
]
});
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