@extends('plantilla')


@section('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 cerradas</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 cerradas</h3>
                <!-- <a href="{{ route('NuevaRequisicion') }}" class="btn btn-success float-right">Crear nuevo</a> -->
              </div>
              <!-- /.card-header -->
              <div class="card-body">
                <table id="dtListaRqCerradas" 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>Estado</th>
                    </tr>
                  </thead>
                  <tbody>
                    @foreach($requisiciones as $item)
                        <tr>
                            <td>{{ $item->rq_id }}</td>
                            <td>{{ $item->rq_siteNombre }}</td>
                            <td>{{ $item->rq_personaNombre }}</td>
                            <td class="bg-info">{{ $item->rq_numero }}</td>                          
                            <td>{{ $item->rq_articulo }}</td>
                            <td>{{ $item->rq_fecha }}</td>
                            <td>{{ $item->rq_proveedorVB }}</td>
                            <td>{{ $item->rq_fechaVB }}</td>
                            <td>{{ $item->rq_numeroOC }}</td>
                            <td>{{ $item->rq_fechaOC }}</td>
                            <td>{{ $item->rq_estado }}</td>
                        </tr>
                    @endforeach
                  </tbody>
                </table>
              </div>
              <!-- /.card-body -->
              
            </div>
            <!-- /.card -->
       
     
        </div><!--/. end row -->
        </div><!--/. end col -->
        </div><!--/. container-fluid -->
  </section>
  <!-- /.content -->

  @endsection


  @section('librerias')
  <!-- JS PROPIAS DE LA VISTA-->
  <script src="{{ asset('assets/js/myfunctions/requisicion.js') }}"></script>
  <!-- DataTables  & Plugins -->
  <script src="{{ asset('assets/plugins/datatables/jquery.dataTables.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-bs4/js/dataTables.bootstrap4.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-responsive/js/dataTables.responsive.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-responsive/js/responsive.bootstrap4.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-buttons/js/dataTables.buttons.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.bootstrap4.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/jszip/jszip.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/pdfmake/pdfmake.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/pdfmake/vfs_fonts.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.html5.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.print.min.js') }}"></script>
  <script src="{{ asset('assets/plugins/datatables-buttons/js/buttons.colVis.min.js') }}"></script>  

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


  $(function () {
      $('[data-toggle="tooltip"]').tooltip()
  }) 
    
</script>   
    
  @endsection