


<?php $__env->startSection('seccion'); ?>


<!-- Content Header (Page header) -->
<div class="content-header">
    <div class="container-fluid">
      <div class="row mb-2">
        <div class="col-sm-6">
          <h1 class="m-0">Lista de requisiciones</h1>
        </div><!-- /.col -->
        <div class="col-sm-6">
          <ol class="breadcrumb float-sm-right">
            <li class="breadcrumb-item"><a href="#">Home</a></li>
            <li class="breadcrumb-item active">Dashboard v2</li>
          </ol>
        </div><!-- /.col -->
      </div><!-- /.row -->
    </div><!-- /.container-fluid -->
  </div>
  <!-- /.content-header -->

  <!-- Main content -->
  <section class="content">
    <div class="container-fluid">
        <div class="row">
          <!-- left column -->
          <div class="col-12">
            <div class="card">
              <div class="card-header">
                <h3 class="card-title">Listado de requisiciones</h3>
                <a href="<?php echo e(route('NuevaRequisicion')); ?>" class="btn btn-success float-right">Crear nuevo</a>
              </div>
              <!-- /.card-header -->
              <div class="card-body">
                <table id="dtListaRequisiciones" class="table table-bordered table-sm">
                  <thead>
                    <tr>
                      <th>ID</th>  
                      <th>Site</th>
                      <th>Requisitor</th>
                      <th>RQ</th>
                      <th>Articulo</th>
                      <th>Fec. RQ</th>
                      <th>Proveedor VB</th>
                      <th>Fec. VB</th>
                      <th>OC</th>
                      <th>Fec. OC</th>                      
                      <th>Acciones</th>
                    </tr>
                  </thead>
                  <tbody>
                    <?php $__currentLoopData = $requisiciones; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($item->rq_id); ?></td>
                            <td><?php echo e($item->rq_siteNombre); ?></td>
                            <td><?php echo e($item->rq_personaNombre); ?></td>
                            <td class="bg-info"><?php echo e($item->rq_numero); ?></td>                          
                            <td><?php echo e($item->rq_articulo); ?></td>
                            <td><?php echo e($item->rq_fecha); ?></td>
                            <td><?php echo e($item->rq_proveedorVB); ?></td>
                            <td><?php echo e($item->rq_fechaVB); ?></td>
                            <td><?php echo e($item->rq_numeroOC); ?></td>
                            <td><?php echo e($item->rq_fechaOC); ?></td>                                                                                  
                            <td> 
                                <?php switch($item->rq_estado):
                                    case ("RQ_OK"): ?>
                                      <a class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Visto bueno cotización" href="<?php echo e(route('CargarParaVB', $item->rq_id)); ?>"><i class="fas fa-check-circle"></i></a>
                                      <a class="btn btn-warning btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Agregar OC" href="<?php echo e(route('CargarParaOC', $item->rq_id)); ?>" ><i class="fas fa-plus-circle"></i></a>
                                      <a class="btn btn-danger btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Finalizar RQ" href="<?php echo e(route('CargarParaFin', $item->rq_id)); ?>" ><i class="fas fa-times-circle"></i></a></td>
                                    <?php break; ?>
                                
                                    <?php case ("VB_OK"): ?>
                                      <a class="btn btn-success btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Visto bueno cotización" href="<?php echo e(route('CargarParaVB', $item->rq_id)); ?>"><i class="fas fa-check-circle"></i></a>
                                      <a class="btn btn-warning btn-sm" data-toggle="tooltip" data-placement="top" title="Agregar OC" href="<?php echo e(route('CargarParaOC', $item->rq_id)); ?>"><i class="fas fa-plus-circle"></i></a>
                                      <a class="btn btn-danger btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Finalizar RQ" href="<?php echo e(route('CargarParaFin', $item->rq_id)); ?>"><i class="fas fa-times-circle"></i></a></td>
                                    <?php break; ?>

                                    <?php case ("OC_OK"): ?>
                                      <a class="btn btn-success btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Visto bueno cotización" href="<?php echo e(route('CargarParaVB', $item->rq_id)); ?>"><i class="fas fa-check-circle"></i></a>
                                      <a class="btn btn-warning btn-sm disabled" data-toggle="tooltip" data-placement="top" title="Agregar OC" href="<?php echo e(route('CargarParaOC', $item->rq_id)); ?>"><i class="fas fa-plus-circle"></i></a>
                                      <a class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Finalizar RQ" href="<?php echo e(route('CargarParaFin', $item->rq_id)); ?>"><i class="fas fa-times-circle"></i></a></td>
                                    <?php break; ?>
                                
                                    <?php default: ?>
                                        
                                <?php endswitch; ?>

                                <!-- <?php if($item->rq_fechaVB == ""): ?>
                                  <a class="btn btn-success btn-sm" data-toggle="tooltip" data-placement="top" title="Visto bueno cotización" href="<?php echo e(route('CargarParaVB', $item->rq_id)); ?>"><i class="fas fa-check-circle"></i></a>
                                <?php endif; ?>
                                <?php if($item->rq_fechaOC == ""): ?>
                                  <a class="btn btn-warning btn-sm" data-toggle="tooltip" data-placement="top" title="Agregar OC" href="<?php echo e(route('CargarParaOC', $item->rq_id)); ?>"><i class="fas fa-plus-circle"></i></a>
                                <?php endif; ?>
                                <a class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="Finalizar RQ" href="<?php echo e(route('CargarEquipos', $item->rq_id)); ?>"><i class="fas fa-times-circle"></i></a></td> -->
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
              
            </div>
            <!-- /.card -->
       
     
        </div><!--/. end row -->
        </div><!--/. end col -->
        </div><!--/. container-fluid -->
  </section>
  <!-- /.content -->

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


  <?php $__env->startSection('librerias'); ?>
  <!-- JS PROPIAS DE LA VISTA-->
  <script src="<?php echo e(asset('assets/js/myfunctions/requisicion.js')); ?>"></script>
  <!-- DataTables  & Plugins -->
  <script src="<?php echo e(asset('assets/plugins/datatables/jquery.dataTables.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-responsive/js/dataTables.responsive.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-buttons/js/dataTables.buttons.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-buttons/js/buttons.bootstrap4.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/jszip/jszip.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/pdfmake/pdfmake.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/pdfmake/vfs_fonts.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-buttons/js/buttons.html5.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-buttons/js/buttons.print.min.js')); ?>"></script>
  <script src="<?php echo e(asset('assets/plugins/datatables-buttons/js/buttons.colVis.min.js')); ?>"></script>  

    <script>
/************************************************************************************
* Funcionamiento de datatables --> equipoLista.blade.php
*************************************************************************************/
$(function () {
    $("#dtListaRequisiciones").DataTable({
      "responsive": true, "lengthChange": false, "autoWidth": false,
      "ordering": false,
      "pageLength": 25,
      "buttons": ["copy", "csv", "excel", "pdf", "print"],
      "language": {
        "search": "Buscar:"
    }
    
    }).buttons().container().appendTo('#dtListaRequisiciones_wrapper .col-md-6:eq(0)');
})


  $(function () {
      $('[data-toggle="tooltip"]').tooltip()
  }) 
    
</script>   
    
  <?php $__env->stopSection(); ?>
<?php echo $__env->make('plantilla', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Codigo\resources\views/rqLista.blade.php ENDPATH**/ ?>