MINI MINI MANI MO
<?php $__env->startSection('title', 'MCG - Iniciativas'); ?>
<?php $__env->startSection('vendor-style'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/data-tables/css/jquery.dataTables.min.css')); ?>">
<link rel="stylesheet" type="text/css"
href="<?php echo e(asset('vendors/data-tables/extensions/responsive/css/responsive.dataTables.min.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/data-tables/css/select.dataTables.min.css')); ?>">
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('vendors/sweetalert/sweetalert.css')); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-style'); ?>
<link rel="stylesheet" type="text/css" href="<?php echo e(asset('css/pages/app-invoice.css')); ?>">
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<!-- invoice list -->
<section class="invoice-list-wrapper section">
<!-- create invoice button-->
<!-- Options and filter dropdown button-->
<div class="seaction">
<div class="row">
<div class="col s12 m12 l12">
<div id="button-trigger2" class="card card card-default scrollspy">
<div class="card-content">
<!-- create invoice button-->
<div class="invoice-create-btn">
<a href="<?php echo e(route('mcg.iniciativas.create')); ?>"
class="btn waves-effect waves-light invoice-create border-round z-depth-4">
<i class="material-icons">add</i>
<span class="hide-on-small-only">Registrar <?php echo e($tipo); ?></span>
</a>
</div>
<br>
<div class="responsive-table">
<table class="table invoice-data-table white border-radius-4 pt-1" id="tableservicios">
<thead>
<tr>
<th>
<span>#</span>
</th>
<th>Proyecto</th>
<th>Autor(a)/es</th>
<th>Turno a</th>
<th style="width: 20%;">Aprobación</th>
<th>Decreto/Dictamen</th>
<th>Opciones</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $iniciativas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><?php echo e($item->folio); ?></td>
<td>
Iniciativa No . <?php echo e($item->folio); ?><br>
<?php echo e(Date::parse($item->presentada)->format('d/m/Y')); ?> <br>
<?php echo e($item->iniciativa); ?> <br>
<a href="<?php echo e(asset("storage/documentos/asuntos/iniciativas/".$item->documento)); ?>"
target="_blank"
class="link">
Ver documento
</a>
</td>
<td><?php echo e($item->autor); ?></td>
<td><?php if(json_decode($item->comisiones) != null): ?>
<?php $__currentLoopData = json_decode($item->comisiones); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $data = app('\App\Http\Controllers\MCG\ComisionesController'); ?><?php echo e($data->ComisionNombre($value)); ?>
.<br>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php else: ?>
<?php echo e($item->comisiones); ?>
<?php endif; ?></td>
<td>
<?php if(count($item->votacion)): ?>
<?php if($item->favor): ?>
A favor: <?php echo e($item->favor->count()); ?> <br>
<?php endif; ?>
<?php if($item->contra): ?>
En contra: <?php echo e($item->contra->count()); ?> <br>
<?php endif; ?>
<?php if($item->abstencion): ?>
Abstención: <?php echo e($item->abstencion->count()); ?><br>
<?php endif; ?>
<?php if($item->sinRegistro): ?>
Sin registro: <?php echo e($item->sinRegistro->count()); ?>
<?php endif; ?>
<?php endif; ?>
<a href="<?php echo e(asset("mcg/iniciativas/votacion/".base64_encode(base64_encode($item->id)).'/'."0")); ?>"
class="material-icons capturar_votacion" id="capturar_votacion">
<i
class="material-icons">check</i>
</a>
<?php echo e($item->status); ?>
</td>
<td>
<?php if($tipo != "Punto de Acuerdo"): ?>
<?php if(!is_null($item->nombre_decreto)): ?>
<?php echo e(\Carbon\Carbon::parse($item->fecha_decreto)->format('d/m/Y')); ?>
<br>
<?php echo e($item->nombre_decreto); ?> <br>
<?php if($item->decreto != ""): ?>
<a href="<?php echo e(asset("storage/documentos/asuntos/iniciativas/".$item->decreto)); ?>"
target="_blank"
class="link">
Ver decreto
</a>
<?php endif; ?>
<?php endif; ?>
<?php else: ?>
<?php if(!is_null($item->nombre_acuerdo)): ?>
<?php echo e(\Carbon\Carbon::parse($item->fecha_acuerdo)->format('d/m/Y')); ?>
<br>
<?php echo e($item->nombre_acuerdo); ?> <br>
<?php if($item->acuerdo != ""): ?>
<a href="<?php echo e(asset("storage/documentos/asuntos/iniciativas/".$item->acuerdo)); ?>"
target="_blank"
class="link">
Ver acuerdo
</a>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</td>
<td>
<div class="invoice-action">
<a href="<?php echo e(route('mcg.iniciativas.edit',base64_encode(base64_encode($item->id)))); ?>"
class="invoice-action-edit">
<i class="material-icons">edit</i>
</a>
<?php echo Form::open(['route' => ['mcg.iniciativas.destroy', base64_encode(base64_encode($item->id))], 'method'=>'DELETE','id' => base64_encode(base64_encode($item->id))]); ?>
<a href="javascript:{}"
onclick="eliminar('<?php echo e(base64_encode(base64_encode($item->id))); ?>')"><i
class="material-icons">delete</i></a>
<?php echo Form::close(); ?>
</div>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('vendor-script'); ?>
<script src="<?php echo e(asset('vendors/data-tables/js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/data-tables/extensions/responsive/js/dataTables.responsive.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/data-tables/js/dataTables.select.min.js')); ?>"></script>
<script src="<?php echo e(asset('vendors/sweetalert/sweetalert.min.js')); ?>"></script>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('page-script'); ?>
<script>
$(document).ready(function () {
$("#tableservicios").dataTable().fnDestroy();
$('#tableservicios').DataTable({
language: datatable_esp,
"ordering": true,
"order": [[0, 'desc']],
"columnDefs": [
{"width": "20%", "targets": 5}
]
});
<?php if(session('delete') == 'ok'): ?>
Swal.fire({
title: 'Operación exitosa',
text: 'Registro eliminado correctamente',
icon: 'success',
})
<?php endif; ?>
<?php if(session('success') == 'success'): ?>
Swal.fire({
title: 'Operación exitosa',
text: 'Se ha guardado la votacion exitosamente',
icon: 'success',
})
<?php endif; ?>
});
function eliminar(id) {
Swal.fire({
title: "¿Está seguro?",
text: "Al oprimir el botón de aceptar se eliminará el registro",
icon: 'warning',
buttons: {
cancel: true,
delete: 'Aceptar'
}
}).then(function (willDelete) {
if (willDelete) {
document.getElementById(id).submit();
}
});
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('../Administrador/layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/legislaedomex/public_html/legislativoedomex/resources/views/Administrador/iniciativas/index.blade.php ENDPATH**/ ?>
OHA YOOOO