
<?php $__env->startSection('content'); ?>
    <div class="container">
        <?php if(Session::has('Mensaje')): ?>
            <div class="alert alert-success" role="alert">
                <?php echo e(Session::get('Mensaje')); ?>

            </div>
        <?php endif; ?>

    <p>
        <h4><b>Vacaciones de Personal</b></h4>
    </p>

    <div class="input-group col-md-6 mb-3" style="padding:0;">
        <span type="submit" class="input-group-text border-0" id="search-addon">
            <i class="fas fa-search"></i>
        </span>
        <input type="text" class="form-control" placeholder="Buscar..." id="search" name="search">
    </div>

    <table class="table table-light">
        <thead class="thead-dark">
            <tr style="text-align: center">
                <th>#</th>
                <th>Personal</th>
                <th>Días Tomados</th>
                <th>Vacaciones Correspondientes</th>
                <th>Accion</th>
            </tr>
        </thead>
        <tbody class="generaldata">
            <?php $__currentLoopData = $datos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $dato): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <tr style="text-align: center">
                    <td><?php echo e($loop->iteration); ?></td>
                    <td><?php echo e($dato->nombre); ?> <?php echo e($dato->apellidos); ?> </td>
                    <td><?php echo e($dato->dias_tomados); ?></td>
                    <td><?php echo e($dato->dias_descanso); ?></td>
                    <td>
                        <a href="<?php echo e(url('/Vacaciones/'.$dato->id_vacacion.'/edit')); ?>" class="btn btn-warning">
                            <span class="far fa-edit"></span> Editar</a>
                    </td>
                </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
        <tbody id="content" class="ajaxdata"></tbody>
    </table>
    <div class="paginate_gnraldata"><?php echo e($datos->links()); ?></div>

    <script>
        $(function(){
            $(document).on('keyup', '#search', function(){
                $value = $(this).val();
                if($value)
                {
                    $('.generaldata').hide();
                    $('.paginate_gnraldata').hide();
                    $('.ajaxdata').show();
                }
                else
                {
                    $('.generaldata').show();
                    $('.ajaxdata').hide();
                    $('.paginate_gnraldata').show();
                }
                $.ajax({
                    type:"GET",
                    url:"<?php echo e(url('SearchVacaciones')); ?>",
                    data:{'search':$value},
                    success:function(data){
                        $('#content').html(data);
                    }
                });
            });
        });
    </script>

    </div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\Proyectos Laravel\SistemaDigTelRed\resources\views/Vacaciones/index.blade.php ENDPATH**/ ?>