<?php $__env->startSection('content'); ?>
<div class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="card card-nav-tabs">
                <div class="card-header card-header-warning">
                    <nav class="navbar navbar-expand-lg bg-primary">
                        <div class="container">
                            <div class="navbar-translate">
                                <a class="navbar-brand" href="">ACTIVAR BUSQUEDA</a>
                            </div>
                            <div class="collapse navbar-collapse">
                                <form class="form-inline ml-auto">
                                    
                                </form>
                            </div>
                        </div>
                    </nav>
                </div>

                <div class="card-body">

                    <div class=""> 
                        <table class="table" style="font-size: 10px">
                            <thead>
                                <tr>
                                    <th style="color: #9a0202; font-size: 12px;"> ID</th>
                                    <th style="color: #9a0202; font-size: 12px;width:20%;"> NOMBRE </th>
                                    <th style="color: #9a0202; font-size: 12px;"> FECHA </th>
                                    <th style="color: #9a0202; font-size: 12px;"> ESTADO </th>
                                    <th style="color: #9a0202; font-size: 12px;" class="text-center"> ACCIONES </th>
                                </tr>
                            </thead>
                            <tbody>

                                <?php
                                $cont = 0;
                                ?>
                                <?php $__currentLoopData = $data; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                <?php
                                $cont++;
                                ?>
                                <tr>
                                    <td class=""><?php echo e($cont); ?></td>
                                    <td class=""><?php echo e($item->nombre); ?></td>
                                    <td class=""><?php echo e($item->fecha); ?></td>
                                    <?php if($item->estado == 1): ?>
                                    <td class="">Activo</td>
                                    <?php else: ?>
                                    <td class="">Inactivo</td>
                                    <?php endif; ?>


                                    <td class="text-center">
                                        <?php if($item->idbusqueda == 1): ?>
                                        <?php if($item->estado == 0): ?>
                                        <a href="<?php echo e(URL::to('editarBusqueda')); ?>/<?php echo e($item->idbusqueda); ?>"
                                            title="Activar" class="btn btn-info btn-sm"><i
                                                class="nc-icon nc-check-2"></i></a>
                                        <?php endif; ?>
                                        <?php else: ?>
                                        <?php if($item->estado == 0): ?>
                                        <a href="<?php echo e(URL::to('editarBusqueda')); ?>/<?php echo e($item->idbusqueda); ?>"
                                            title="Activar" class="btn btn-info btn-sm"><i
                                                class="nc-icon nc-check-2"></i></a>
                                        <?php endif; ?>
                                        <a href="javascript:void(0);" onclick="$('#frmDel<?php echo e($item->idbusqueda); ?>').submit();"
                                            class="btn btn-danger btn-sm" title="Eliminar"><i
                                                class="nc-icon nc-simple-remove"></i></a>
                                        <?php echo e(Form::open(['url' => 'eliminarBusqueda' . '/' . $item->idbusqueda, 'class' => 'pull-right', 'id' => 'frmDel' . $item->idbusqueda])); ?>

                                        <?php echo e(Form::hidden('_method', 'DELETE')); ?>

                                        <?php echo e(Form::close()); ?>

                                        <a href="<?php echo e(URL::to('actualizarBusqueda')); ?>/<?php echo e($item->idbusqueda); ?>"
                                            title="Editar" class="btn btn- btn-sm"><i
                                                class="nc-icon nc-align-center"></i></a>
                                        <?php endif; ?>

                                    </td>
                                </tr>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                            </tbody>
                        </table>
                    </div>

                </div>
            </div>
        </div>
    </div>

</div>

<img src="/storage/1684045723_Cédula%20ma.pdf" alt="image">
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                ...
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                <button type="button" class="btn btn-primary">Save changes</button>
            </div>
        </div>
    </div>
</div>



<div class="modal" id="myModal">
    <div class="modal-dialog">
        <div class="modal-content">

            <!-- Modal Header -->
            <div class="modal-header">
                <h4 class="modal-title">SUBIR DOCUMENTO</h4>
                <!--<button type="button" class="close" data-dismiss="modal">&times;</button>-->
            </div>

            <!-- Modal body -->
            <form enctype="multipart/form-data" action="<?php echo e(url('addDocumento')); ?>" method="POST">
                <?php echo csrf_field(); ?>
                <div class="modal-body">
                    <input type="hidden" id="idCompromiso" name="idCompromiso" />
                    <!--<input type="hidden" name="MAX_FILE_SIZE" value="512000" />-->
                    <p><input name="subir_archivo" type="file" required></p>
                </div>

                <!-- Modal footer -->
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Cerrar</button>
                    <button type="submit" class="btn btn-primary">Guardar</button>
                </div>
            </form>
        </div>
    </div>
</div>



<div class="modal" id="myModal2">
    <div class="modal-dialog">
        <div class="modal-content">
            <!-- Modal Header -->
            <div class="modal-header">
                <h4 class="modal-title">DESCARGAR DOCUMENTO</h4>
                <!--<button type="button" class="close" data-dismiss="modal">&times;</button>-->
            </div>
            <!-- Modal body -->
            <div class="modal-body">
                <!--<input type="text" id="idCompromiso2"name="idCompromiso2"/>-->
                <table class="table" id="detalleTabla">

                </table>
            </div>
            <!-- Modal footer -->
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Cerrar</button>
            </div>

        </div>
    </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startPush('scripts'); ?>
<script>
    $(document).ready(function() {

    });

    function idCompromiso(id) {
        var idComp = id;
        $("#idCompromiso").val(idComp);
    }

    function idCompromiso2(id) {
        var idComp = id;


        var respuesta = $.ajax({
            url: "<?php echo e(URL::to('descargar')); ?>",
            data: {
                idComp: idComp
            },
            /* headers: {
                'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
            }, */
            type: "GET",

            success: function(data) {
                $('#myModal2').modal({
                    show: true
                });
                $('#detalleTabla').html(data);
            }
        });


    }
</script>
<?php $__env->stopPush(); ?>
<?php echo $__env->make('layouts.app', [
'class' => '',
'elementActive' => 'listarUsuarios',
], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\tablerogerencial\resources\views/pages/listarBusqueda.blade.php ENDPATH**/ ?>