
<?php $__env->startSection('cssDashboard'); ?>
<link href="../assets/css/bootstrap-table.min.css" rel="stylesheet">
<?php $__env->stopSection(); ?>

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

<?php $__env->startSection('content'); ?>
<div class="card shadow mb-4">
  <div class="card-header py-3">
    <form method="POST" action="<?php echo e(Request::url()); ?>" id="frm-filter" class="needs-validation" novalidate>
      <?php echo csrf_field(); ?>
      <div class="form-row align-items-center">
        <h1>
          Reporte de Solicitudes
        </h1>
      </div>
      <div class="form-row">
        <div class="form-group col-md-2">
          <label for="from">Desde:</label>
          <input class="form-control" type="date" name="from" id="from" required/>
        </div>
        <div class="form-group col-md-2">
          <label for="until">Hasta:</label>
          <input class="form-control" type="date" name="until" id="until" required/>
        </div>
        <div class="form-group col-md-2">
            <label for="type">Tipo de Solicitud:</label>
            <select type="text" class="form-control" id="type" name="type">
                <option value="0">Todos</option>
                <option value="ts">Trabajo Social</option>
                <option value="responsiva">Responsiva</option>
                <option value="foliado">Foliado</option>              
          </select>
        </div>
        <div class="form-group col-md-3">                      
            <?php if(isset($categories)): ?>
                <label for="categories_id">Categoría de los productos</label>
                <select id="categories_id"  name="categories_id" class="form-control" required>
                    <option value="0">Todos</option>
                    <?php $__currentLoopData = $categories; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e($element['id']); ?>" ><?php echo e($element['name']); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            <?php endif; ?>          
        </div>
        <div class="form-group col-md-2">
            <?php if(isset($products)): ?>
                <label for="products_id">Productos</label>
                <select id="products_id"  name="products_id" class="form-control" required>
                    <option value="0">Todos</option>
                    <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <option value="<?php echo e($element['id']); ?>" ><?php echo e($element['name']); ?></option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            <?php endif; ?> 
        </div>
        <div class="form-group col-md-1">
          <label for="area">Area:</label>
          <input class="form-control" type="text" name="area" id="area"/>
        </div>
      </div>
      <div class="form-row">
          <div class="form-group col-md-12">
            <button type="button" class="btn btn-secondary btn-rounded btn-busca-inf float-right" id="btnBuscar"  onclick="buscarInfRequest()" title="Buscar">
              <i class="fas fa-search"></i> Buscar
              </button>
            <button type="submit" class="btn btn-primary btn-filter-zone btn-excel float-right" id="btnExcel" name="btn" style="margin-right: .5rem;" title="Exportar a Excel" value ="excel">
              <i class="fas fa-file-excel"></i> Exportar a Excel
            </button>            
             <button type="submit" class="btn btn-primary btn-filter-zone btn-pdfm float-right" style="margin-right: .5rem;" id="btnPDF" name="btn" title="Exportar a PDF" value="PDF">
            <i class="fas fa-file-pdf"></i>Exportar a PDF
          </button>
        </div>
      </div>
    </form>

    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered table-hover" id="dataTable" data-search="true" data-pagination="true" data-show-toggle="true" data-click-to-select="true" width="100%" cellspacing="0">
          <thead>
            <tr>           
                <th data-field="number" data-sortable="true">#</th>
                <th data-field="folio" data-sortable="true">Folio</th>
                <th data-field="typerequest" data-sortable="true">Tipo</th>
                <th data-field="beneficiaries" data-sortable="true">Beneficiarios</th>
                <th data-field="beneficiariesCurp" data-sortable="true">CURP</th>
                <th data-field="beneficiariesNumber">Teléfono</th>
                <th data-field="address">Domicilio</th>
                <th data-field="qty">Cantidad</th>
                <th data-field="product">Producto</th>
                <th data-field="area">Area</th>
                <th data-field="status">Estado</th>
                <th data-field="actions" data-events="operateEvents" data-width="80"></th>
            </tr>
          </thead>            
        </table>
      </div>
    </div>
  </div>
</div>

<?php echo $__env->yieldContent('contentForm'); ?>
<!-- Diagrama de solicitudes Mensual -->
<div class="col-xl-4 col-lg-4">
  <div class="card shadow mb-4">
    <!-- Card Header - Dropdown -->
    <div class="card-header text-center">
      <h6 class="m-0 font-weight-bold text-primary">Grafica del Reporte por Producto</h6>
    </div>
  </div>
  <div class="card-body">
    <div class="chart-pie pt-4 pb-2">
      <canvas id="myPieChart1"></canvas>
    </div>
    <div id="legend1" name="legend1" class="mt-4 text-center small">      
      <?php $__currentLoopData = $defaultLegend1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>        
        <span class='mr-2'><i class='fas fa-circle' style="color:<?php echo e($value['color']); ?>"> </i><?php echo e($value['name']); ?> </span>         
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>  
  </div>
</div>

<div class="col-xl-4 col-lg-4">
  <div class="card shadow mb-4">
    <!-- Card Header - Dropdown -->
    <div class="card-header text-center">
      <h6 class="m-0 font-weight-bold text-primary">Grafica del Reporte por Categoría</h6>
    </div>
  </div>
  <div class="card-body">
    <div class="chart-pie pt-4 pb-2">
      <canvas id="myPieChart2"></canvas>
    </div>
    <div id="legend2" name="legend2" class="mt-4 text-center small">      
      <?php $__currentLoopData = $defaultLegend2; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>        
        <span class='mr-2'><i class='fas fa-circle' style="color:<?php echo e($value['color']); ?>"> </i><?php echo e($value['name']); ?> </span>         
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>  
  </div>
</div>

<div class="col-xl-4 col-lg-4">
  <div class="card shadow mb-4">
    <!-- Card Header - Dropdown -->
    <div class="card-header text-center">
      <h6 class="m-0 font-weight-bold text-primary">Grafica del Reporte por Area</h6>
    </div>
  </div>
  <div class="card-body">
    <div class="chart-pie pt-4 pb-2">
      <canvas id="myPieChart3"></canvas>
    </div>
    <div id="legend3" name="legend3" class="mt-4 text-center small">      
      <?php $__currentLoopData = $defaultLegend3; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>        
        <span class='mr-2'><i class='fas fa-circle' style="color:<?php echo e($value['color']); ?>"> </i><?php echo e($value['name']); ?> </span>         
      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    </div>  
  </div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('jsDashboard'); ?>
  
  <script src="../assets/js/bootstrap-table.min.js"></script>
  <script src="../assets/js/bootstrap-table-locale-all.min.js"></script>
  <script>   
    var names1 = [];
    <?php $__currentLoopData = $defaultNames1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      names1.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var data1 = [];
    <?php $__currentLoopData = $defaultData1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      data1.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var bgcolor1 = [];
    <?php $__currentLoopData = $defaultbgColor1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      bgcolor1.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var hbgcolor1 = [];
    <?php $__currentLoopData = $defaulthbgColor1; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      hbgcolor1.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    var names2 = [];
    <?php $__currentLoopData = $defaultNames2; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      names2.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var data2 = [];
    <?php $__currentLoopData = $defaultData2; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      data2.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var bgcolor2 = [];
    <?php $__currentLoopData = $defaultbgColor2; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      bgcolor2.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var hbgcolor2 = [];
    <?php $__currentLoopData = $defaulthbgColor2; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      hbgcolor2.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

    var names3 = [];
    <?php $__currentLoopData = $defaultNames3; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      names3.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var data3 = [];
    <?php $__currentLoopData = $defaultData3; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      data3.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var bgcolor3 = [];
    <?php $__currentLoopData = $defaultbgColor3; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      bgcolor3.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
    var hbgcolor3 = [];
    <?php $__currentLoopData = $defaulthbgColor3; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $value): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
      hbgcolor3.push('<?php echo e($value); ?>');
    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  </script>
  <script src="../assets/js/Reports.js"></script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('base.base', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\laragon\www\ApoyosPresidencia\resources\views/reports/reportsrequests.blade.php ENDPATH**/ ?>