File: /var/www/html/performance.sumar.com.py/resources/views/livewire/objetivos/index.blade.php
<div>
<style>
@media print{
.imprimir * {
display:block;
}
.toPrint{
display:block; border:0; width:100%; min-height:500px
}
.no-print, .no-print *{
display: none !important;
{
}
</style>
@if($updateMode)
@include('livewire.objetivos.update')
@else
@include('livewire.objetivos.create')
@endif
<br>
<div class="card">
<div class="card-body" id="factura">
<table class="table table-bordered">
<thead style="text-align: center;">
<tr>
<th rowspan="2">Objetivos</th>
<th colspan="3">Revisión</th>
<th colspan="2">Indicador meta</th>
<th colspan="3">Indicador alcanzado</th>
<th rowspan="2">Objetivo alcanzado</th>
<th rowspan="2" class="no-print">Acciones</th>
</tr>
<tr>
<th>Mensual</th>
<th>Semanal</th>
<th>Anual</th>
<th>Fuente/base</th>
<th>Valor</th>
<th>Mensual</th>
<th>Semanal</th>
<th>Anual</th>
</tr>
</thead>
<tbody>
@foreach ($objetivos as $value)
<tr>
<td>{{ $value->objetivo }}</td>
<td align="center">
@if($value->revision == 'mensual')
*
@endif
</td>
<td align="center">
@if($value->revision == 'semanal')
*
@endif
</td>
<td align="center">
@if($value->revision == 'anual')
*
@endif
</td>
<td>{{ $value->metafuente }}</td>
<td align="center">{{ $value->metavalor }}</td>
<td align="center">
@if($value->revision == 'mensual')
{{ $value->alcanzadovalor }}
@endif
</td>
<td align="center">
@if($value->revision == 'semanal')
{{ $value->alcanzadovalor }}
@endif
</td>
<td align="center">
@if($value->revision == 'anual')
{{ $value->alcanzadovalor }}
@endif
</td>
<td align="center">
{{ ($value->alcanzadovalor*100)/$value->metavalor }}%
</td>
<td class="no-print">
<button wire:click="edit({{ $value->id }})" class="btn btn-primary btn-sm"><i class="fas fa-edit"></i></button>
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#exampleModal{{ $value->id }}"><i class="fas fa-trash-alt"></i></button>
<!-- Modal -->
<div class="modal fade" id="exampleModal{{ $value->id }}" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Eliminar objetivo</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p>¿Realmente quiere eliminar el objetivo: {{ $value->objetivo }}?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cerrar</button>
<button type="button" wire:click="delete({{ $value->id }})" class="btn btn-danger" data-dismiss="modal">Eliminar</button>
</div>
</div>
</div>
</div>
</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<div class="card-footer" align="center">
<button class="btn btn-info no-print" onclick="imprimir()"><i class="fas fa-print"></i> Imprimir informe</button>
</div>
</div>
</div>