EVOLUTION-MANAGER
Edit File: remplazantes.blade.php
@extends('layouts.backend') @section('ruta') Listado de Remplazantes @stop @section('titulo') REMPLAZANTES @stop @section('contenido') @include('alerts.errors') @include('alerts.success') @include('alerts.request') <div class="input-group"> <input type="text" id="txtclave" placeholder="Ingrese Cedula o Apellidos del Recaudador (Sin guión)" class="form-control input-lg"> <div class="input-group-btn"> <button class="btn btn-lg btn-primary" type="submit" id="btnbuscar" data-toggle="tooltip" title="Buscar paciente"> <i class="fa fa-search" aria-hidden="true"></i> </button> </div> </div> <div id='detalles' class="table-responsive"></div> @if (count($usuarios)) <style> #gif_cargando { display: none; } #txt_seguro { padding: 10px; font-size: 15px; width: 100%; font-weight: bold; border: none; } </style> <div class="table-responsive"> <table id="tbbuzon1" class="table table-striped table-bordered table-hover display" > <thead> <tr> <th>Id</th> <th>Cédula</th> <th>Nombre de usuario</th> <th>Email</th> <th>teléfono</th> <th>Fecha de nacimiento </th> <th width="10%">Quitar</th> </tr> </thead> <tbody> <?php $s = 0 ; ?> @foreach ($usuarios as $cliente) <td>{{ $cliente->id }}</td> <td>{{ $cliente->cedula }}</td> <td>{{ $cliente->name }}</td> <td>{{ $cliente->email }}</td> <td>{{ $cliente->telefono }}</td> <td>{{ $cliente->fecha_nacimiento }}</td> <td style="display: inline-flex; float: right;"> <a type="submit" class="btn btn-danger bnt-lg" href="quitarremplazante/{{$cliente->id}}" data-toggle="tooltip" title="Eliminar"><i class="fa fa-trash"></i></a> </td> </tr> @endforeach </tbody> </table> </div> @else No hay Remplazantes @endif @stop @section('script') <script> $(document).ready(function(){ $(".inline").colorbox(); // $(".add_usser").colorbox(); }); $(function () { $('[data-toggle="tooltip"]').tooltip('show') }) function SeguroEliminar(id) { $.colorbox({width:"auto",height:"auto", open:true, href:"seguro_eliminar/usuarios/"+id}); } $("#btnbuscar").click(function (){ //var txtbusqueda=$('#txtbuscar').val(); var cedula_ruc=$('#txtclave').val(); if (cedula_ruc==null||cedula_ruc=="") { // jAlert('no hay datos'); $('#pop_up_error_ingreso').modal('show'); }else { $.ajax({ type:"GET", url:"{{url('/')}}/consultar_recaudadores/"+cedula_ruc, dataType:"json", contentType:"text/plain", }).done(function(msg){ //console.log(msg); arreglo2=msg; if (arreglo2.length==0) { var gene1="<div class='container table-responsive'>"; gene1+="<h1 class='text-center'>No hay Doctores ingresado</h1>" gene1+="</div>"; $('#detalles').html(gene1); }else{ var elemen=arreglo2; gene="<table class='table table-striped table-bordered table-hover display'>"; gene+='<thead>'; gene+="<tr>"; gene+="<th width='20%'><center>Cédula</center></th>"; gene+="<th width='50%' ><center> Nombres y Apellidos </center></th>"; gene+="<th width='5%' ><center>Estado</center></th>"; gene+="<th width='5%'><center>Acciones</center></th>"; gene+="</tr>"; gene+='</thead>'; gene+='<tbody>'; msg.forEach(function(elemen){ gene+='<tr>'; gene+='<td>'+elemen.cedula+'</td>'; gene+='<td>'+elemen.name+'</td>'; gene+='<td>'+elemen.estado+'</td>'; var add_direccion="{{url('agregarremplazante')}}/"+elemen.id ; gene+='<td><a href="'+add_direccion+'" class="btn btn-success" data-toggle="tooltip" title="Añadir a Remplazantes"><i class="fa fa-plus" aria-hidden="true"></i></a>'; gene+='</tr>'; }) gene+='</tbody>'; gene+='</table>'; gene+='</div></div>'; $('#detalles').html(gene); } //hacer nuevamente la peticion }).error(function(error){ alert('Hay un error en la busqueda'); }); } }); </script> @stop