<?php $__env->startSection('styles'); ?>
    <style>
        .filter-none {
            display: none;
        }
    </style>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>
    <h1 class="page-title">
        Tesorería
    </h1>
    <div class="portlet light">
        <div class="portlet-body">
            <div class="row" style="padding-bottom: 2%">
                <div class="col-md-6">
                    <div class="row">
                        <div class="col-md-12">
                            <h5><i class="glyphicon glyphicon-search"></i> B&uacute;squeda por c&oacute;digo de usuario</h5>
                        </div>
                        <div class="col-md-8">
                            <input type="search" class="form-control input-md" id="code-filter"
                                   aria-controls="tbEncuestas">
                        </div>
                        <div class="col-md-4">
                            <button style="width: 100%" id="btn-search-code" type="submit" class="btn btn-primary ladda-button" data-style="slide-down">
                                <span class="ladda-label">Buscar</span>
                                <span class="ladda-spinner"></span>
                            </button>
                        </div>
                    </div>

                </div>
                <div class="col-md-6">
                    <div class="row">
                        <div class="col-md-offset-6 col-md-6">
                            <h5>Generar pago de usuario externo</h5>
                        </div>
                        <div class="col-md-offset-6 col-md-6">
                            <button id="btnExterno" style="width: 100%" type="button" class="btn btn-primary ladda-button" data-style="slide-down">
                                <span class="ladda-label">Generar Pago Externo</span>
                                <span class="ladda-spinner"></span>
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="portlet light">
        <div class="portlet-title">
            <div class="caption">
                <span class="caption-subject bold"> Pagos Pendientes </span>
            </div>
            <div class="actions">
            </div>
        </div>
        <div class="portlet-body">
            <div class="text-center" id="hidden-filter" style="padding-bottom: 2%">
                <h4>Ingrese un c&oacute;digo de usuario</h4>
            </div>
            <div id="wait-filter" class="filter-none">
                <div class="tabbable-custom nav-justified">
                    <ul class="nav nav-tabs nav-justified">
                        <li class="active">
                            <a href="#tab_1_1_1" data-toggle="tab"> Tr&aacute;mites </a>
                        </li>
                        <li>
                            <a href="#tab_1_1_2" data-toggle="tab"> Biblioteca </a>
                        </li>
                        <li>
                            <a href="#tab_1_1_3" data-toggle="tab"> Otros Pagos </a>
                        </li>
                    </ul>
                    <div class="tab-content">
                        <div class="tab-pane active" id="tab_1_1_1">
                            <?php echo e(Form::open(['route' => 'pagos.tramites.post','class'=>'form-horizontal','id' => 'form-tramites'])); ?>

                            <div class="row">
                                <div class="col-md-12">
                                    <button type="button" class="btn btn-primary Crear" onclick="agregarTramite()">
                                        <i class="fa fa-plus"></i><span class="hidden-xs"> Nuevo Tr&aacute;mite </span>
                                    </button>
                                    <button id="btnHabilitar" type="button" class="btn btn-primary Habilitar">
                                        <i class="fa fa-hourglass"></i><span class="hidden-xs"> Habilitar Permiso </span>
                                    </button>
                                </div>
                            </div>

                            <div class="row">
                                <input id="user_tramite" name="usuario" type="hidden" value="">
                                <div class="col-md-12">
                                    <table class="table table-hover nowrap dataTable dtr-inline collapsed tbPersonal"
                                           id="tb-gestionpagos"
                                           width="100%" role="grid" aria-describedby="tbPersonal_info">
                                        <thead class="thead-default">
                                        <tr>
                                            <th><input name="select_all" value="1" type="checkbox"></th>
                                            <th>C&oacute;digo de Usuario</th>
                                            <th>Nombre</th>
                                            <th>Estado</th>
                                            <th>Monto Total</th>
                                            <th>Monto Pendiente</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="row">
                                <input type="hidden" id="hdn-ids" name="tramites"/>
                                <div class="col-md-offset-3 col-md-6">
                                    <button style="width: 100%" id="btn-pay-tramites" type="submit" class="btn btn-primary ladda-button" data-style="slide-down">
                                        <span class="ladda-label">Realizar Pago</span>
                                        <span class="ladda-spinner"></span>
                                    </button>
                                </div>
                            </div>
                            <?php echo Form::close(); ?>

                        </div>
                        <div class="tab-pane" id="tab_1_1_2">
                            <?php echo e(Form::open(['route' => 'pagos.biblioteca.post','class'=>'form-horizontal','id' => 'form-biblioteca'])); ?>

                            <div class="Forum-ForumTopicList row" style="margin:20px">
                                <input id="user_biblioteca" name="usuario" type="hidden" value="">
                                <table class="table table-hover nowrap dataTable dtr-inline collapsed tbPersonal"
                                       id="tb-biblioteca"
                                       width="100%" role="grid" aria-describedby="tbPersonal_info">
                                    <thead class="thead-default">
                                    <tr>
                                        <th><input name="select_all" value="1" type="checkbox"></th>
                                        <th>C&oacute;digo de Usuario</th>
                                        <th>Cód. deuda</th>
                                        <th>Nombre</th>
                                        <th>Fecha de Devolución</th>
                                        <th>Monto</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    </tbody>
                                </table>
                            </div>
                            <div class="row">
                                <input type="hidden" id="hdn-idb" name="biblioteca"/>
                                <div class="col-md-offset-3 col-md-6">
                                    <button style="width: 100%" id="btn-pay" type="submit" class="btn btn-primary ladda-button" data-style="slide-down">
                                        <span class="ladda-label">Realizar Pago</span>
                                        <span class="ladda-spinner"></span>
                                    </button>
                                </div>
                            </div>
                            <?php echo Form::close(); ?>

                        </div>
                        <div class="tab-pane" id="tab_1_1_3">
                            <?php echo e(Form::open(['route' => 'pagos.otros.post','class'=>'form-horizontal','id' => 'form-otros'])); ?>

                            <div class="row" style="padding-bottom: 2%; padding-top: 3%;">
                                <input id="user_otros" name="usuario" type="hidden" value="">
                                <div class="col-md-offset-3 col-md-6">
                                    <button style="width: 100%" id="btn-pay" type="submit" class="btn btn-primary ladda-button" data-style="slide-down">
                                        <span class="ladda-label">Realizar Pago</span>
                                        <span class="ladda-spinner"></span>
                                    </button>
                                </div>
                            </div>
                            <?php echo Form::close(); ?>

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

    <div id="Modal" class=""></div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('scripts'); ?>
    <script src="<?php echo e(asset('plugins/jquery-datatables-checkboxes/js/dataTables.checkboxes.min.js')); ?>" type="text/javascript"></script>
    <script>
        var url_base = "<?php echo e(url('tesoreria/pagos')); ?>";
        var url_tramites = "<?php echo e(route('pagos.tramites.get')); ?>";
        var url_biblioteca = "<?php echo e(route('pagos.biblioteca.get')); ?>";
        var url_valida = "<?php echo e(route('pagos.valida.usuario')); ?>";
    </script>
    <script src="<?php echo e(asset('js/pages/tesoreria.pagos.js')); ?>"></script>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('template.layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>