KOKINIO - MANAGER
Edit File: 04b58d5ef9e5db35dfa914f7cb86f456
<?php $__env->startSection('content'); ?> <style type="text/css"> .filterable { margin-top: 15px; } .filterable .panel-heading .pull-right { margin-top: -20px; } .filterable .filters input[disabled] { background-color: transparent; border: none; cursor: auto; box-shadow: none; padding: 0; height: auto; } .filterable .filters input[disabled]::-webkit-input-placeholder { color: #333; } .filterable .filters input[disabled]::-moz-placeholder { color: #333; } .filterable .filters input[disabled]:-ms-input-placeholder { color: #333; } </style> <div id="page-content"> <div class="content-header"> <div class="header-section"> <h1> <i class="fa fa-recycle"></i>Peso Clientes Reporte<br><small>Recolectora Metropolitana</small> </h1> </div> </div> <div class="block"> <div class="block-title"> <h2><strong>Filtros</strong> </h2> <div class="block-options pull-right"> </div> </div> <div class="row"> <div class="col-md-12"> <div class="form-group col-md-3"> <label for="mes">Año:</label> <select id="year-select" class="form-control" onchange="Peso.getMonths(this)"> <option value="null">Selecciona</option> <?php if(isset($years)): ?> <?php foreach($years as $year): ?> <option value="<?php echo e($year->Year); ?>"><?php echo e($year->Year); ?></option> <?php endforeach; ?> <?php endif; ?> </select> </div> <div class="form-group col-md-3"> <label for="mes">Mes:</label> <select id="month-select" class="form-control"> <option value="null">Selecciona</option> </select> </div> <div class="form-group col-md-5"> <label for="clientes-select">Cliente:</label> <select id="clientes-select" class="select-chosen select2" style="width: 100%;" tabindex="-1" aria-hidden="true" > <option id="null" value="null">Vacio</option> <?php if(isset($clientes)): ?> <?php foreach($clientes as $cliente): ?> <option value="<?php echo e($cliente->id); ?>" id="<?php echo e($cliente->id); ?>" ><?php echo e($cliente->nombre_comercial); ?></option> <?php endforeach; ?> <?php endif; ?> </select> </div> <div class="form-group col-md-1"> <label> </label> <button class="form-control btn btn-success" onclick="Peso.filter_peso(this)">Filtrar</button> </div> </div> </div> </div> <div class="block"> <div class="block-title"> <h2><strong>Peso de Clientes</strong> </h2> <div class="block-options pull-right"> <a href="<?php echo e(URL::To('/').'/catalogo/pesosClientes'); ?>" class="btn btn-alt btn-sm btn-default toggle-bordered enable-tooltip" title="" data-original-title="">Actualizar</a> </div> </div> <div class="panel filterable block full table-responsive"> <div class="pull-right"> <button onclick="Peso.tableFilter(this)" id="filter" class="btn btn-default btn-xs btn-filter"><span class="glyphicon glyphicon-filter"></span> Filter</button> </div> <table id="table_peso" class="table table-hover"> <thead> <tr class="filters"> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Año" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Cliente" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Mes" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Inorganicos" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Organicos" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Sanitarios" disabled></th> <th class="text-center"><input type="text" class="form-control text-center" placeholder="Total" disabled></th> </tr> </thead> <tbody> <?php /* dd($pesos) */ ?> <?php if($pesos != ""): ?> <?php foreach( $pesos as $peso ): ?> <tr> <td class="text-center"><?php echo $peso->Year; ?></td> <td class="text-center"><?php echo $peso->cliente; ?></td> <td class="text-center"><?php echo $peso->Mes; ?></td> <td class="text-center"><?php echo Helper::redondeado($peso->inorganicos,3); ?></td> <td class="text-center"><?php echo Helper::redondeado($peso->organicos,3); ?></td> <td class="text-center"><?php echo Helper::redondeado($peso->sanitarios,3); ?></td> <td class="text-center"><?php echo Helper::redondeado($peso->Total,3); ?></td> </tr> <?php endforeach; ?> <?php else: ?> <tr> <td class="text-center" colspan="7">No hay información disponible</td> </tr> <?php endif; ?> </tbody> </table> </div> </div> </div> <script src="<?php echo e(URL::To('/js/catalogo_js/peso.js')); ?>"></script> <script type="text/javascript"> $('.filterable .filters input').keyup(function(e){ /* Ignore tab key */ var code = e.keyCode || e.which; if (code == '9') return; /* Useful DOM data and selectors */ var $input = $(this), inputContent = $input.val().toLowerCase(), $panel = $input.parents('.filterable'), column = $panel.find('.filters th').index($input.parents('th')), $table = $panel.find('.table'), $rows = $table.find('tbody tr'); /* Dirtiest filter function ever ;) */ var $filteredRows = $rows.filter(function(){ var value = $(this).find('td').eq(column).text().toLowerCase(); return value.indexOf(inputContent) === -1; }); /* Clean previous no-result if exist */ $table.find('tbody .no-result').remove(); /* Show all rows, hide filtered ones (never do that outside of a demo ! xD) */ $rows.show(); $filteredRows.hide(); /* Prepend no-result row if all rows are filtered */ if ($filteredRows.length === $rows.length) { $table.find('tbody').prepend($('<tr class="no-result text-center"><td colspan="'+ $table.find('.filters th').length +'">No result found</td></tr>')); } }); </script> <?php $__env->stopSection(); ?> <?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>