
<?php $__env->startSection('contenido'); ?>
<div class="content">
	<div class="card">
        <div class="card-header header-elements-inline">
            <h5 class="card-title">LISTADO DE SOCIOS</h5>
            <div class="header-elements">
                <div class="list-icons">
                    <?php if(auth()->user()->id_role==1): ?>
                    <a href="<?php echo e(route('socios.crear')); ?>" class="btn btn-link btn-float text-default">
                        <i class="icon-file-plus2 text-primary"></i><span>Nuevo Socio</span>
                    </a>
                    <?php endif; ?>
                    <a class="list-icons-item" data-action="collapse"></a>
                </div>
            </div>
        </div>
        <table id="contenedorFarmacias" class="table">
            <thead>
                <tr>
                    <th>Nombre</th>
                    <th>Apellido</th>
                    <th>Línea</th>
                    <th>Especialidad</th>
                    <th>Tipo</th>
                    <th>Clasificación</th>
                    <th>Gira</th>
                    <th class="text-center">Acciones</th>
                </tr>
            </thead>
            <tbody>
                <?php $__currentLoopData = $socios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $socio): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                
                    <tr>
                        <td><?php echo e($socio['primer_nombre_socio']); ?> <?php echo e($socio['segundo_nombre_socio']); ?></td>
                        <td><?php echo e($socio['primer_apellido_socio']); ?> <?php echo e($socio['segundo_apellido_socio']); ?></td>
                        <td>
                            <?php $__currentLoopData = $socio->lineas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $linea): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <span class="badge badge-success"><?php echo e($linea['descripcion_linea']); ?></span>
                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                        </td>
                        <td><?php echo e($socio->especialidad['descripcion_especialidad']); ?></td>
                        <td><?php echo e($socio->tipoSocio['descripcion_tipo_socio']); ?></td>
                        <td><?php echo e($socio->clasificacion['descripcion_clasificacion']); ?></td>
                        <td><?php echo e($socio->codigo->gira->descripcion_gira??''); ?></td>
                        <td class="text-center">
                            <div class="list-icons">
                                <div class="dropdown">
                                    <a href="#" class="list-icons-item" data-toggle="dropdown">
                                        <i class="icon-menu9"></i>
                                    </a>

                                    <div class="dropdown-menu dropdown-menu-right">
                                        <a href="<?php echo e(route('socios.editar', $socio['id'])); ?>" class="dropdown-item"><i class="icon-pencil6"></i> Editar</a>
                                        <a href="<?php echo e(route('socios.eliminar', $socio['id'])); ?>" class="dropdown-item"><i class="icon-trash"></i> Eliminar</a>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </tbody>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/buttons/1.5.6/css/buttons.dataTables.min.css"/>
<style>
    #contenedorFarmacias_filter{
        clear: both!important;
    }
    .dataTables_info{
        display: none;
    }
    .datatable-header .dataTables_filter{
        display: none!important;
    }
    #contenedorFarmacias_paginate{
        display: none!important;
    }
</style>
<?php $__env->startSection('javascript'); ?>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/dataTables.buttons.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.html5.min.js"></script>
<script src="https://cdn.datatables.net/buttons/1.5.6/js/buttons.print.min.js"></script>

<script>
$(document).ready(function() {
    $('#contenedorFarmacias').DataTable({
        dom: 'Bfrtip <"datatable-header"fl><"datatable-scroll"t><"datatable-footer"ip>',
        buttons: [
            'excel','print'
        ],
    });
} );
</script>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('layouts.index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/cuatro5/visitamed.cuatroaces.com/resources/views/socios/lista.blade.php ENDPATH**/ ?>