@extends('unal')

@section('content')
<div class="panel-heading" style="margin-top:16px;">
    <p>Bienvenido {{Auth::user()->name}}</p>
    <p>Seleccione uno o varios perfiles para ver los candidatos inscritos.   </p>
</div>

<div class="panel-body">
    <div class="form-group">
        <div class="col-md-8">
          <a href="{{ env('APP_URL') }}admin/candidatos"> <button class="btn btn-warning">
              Atrás
          </button></a>
        </div>

		<div class="col-md-3">
            <form method="get" action="{{ env('APP_URL') }}auth/logout">
                {!! csrf_field() !!}
                <button type="submit" class="btn btn-danger">
                    Cerrar sesión
                </button>

            </form>
        </div>
    </div>
</div>

<div class="panel-heading">
    <strong>Resumen de correos fallidos</strong>
</div>
<div class="panel-body">
    <table id="candidates" class="datatable table table-striped">
        <thead>
            <tr>
                <th style="text-align: center">#id</th>
                <th style="text-align: center">Tipo</th>
                <th style="text-align: center">Usuario</th>
            </tr>
        </thead>
        <tbody>
            @foreach($correos as $correo)
            <tr data-id="{{$correo->id}}" class="candidate_row">
                <td style="text-align: center">
                    {{$correo->id}}
                </td>
                <td style="text-align: center">
                    {{$correo->tipo}}
                </td>
                <td style="text-align: center">
                    {{$correo->usuario}}
                </td>
                <td style="text-align: center">
                    <form method="post" action="{{ env('APP_URL') }}admin/candidatos/emails/resend/{{$correo->id}}" style="margin:20px 0">
                        {!! csrf_field() !!}
                        <button type="submit" data-id="{{$correo->id}}" class="btn btn-primary btn-sm">
                            <i class="fa fa-refresh" aria-hidden="true"> Reenviar</i>
                        </button>
                    </form>
                </td>
            </tr>
            @endforeach
        </tbody>
    </table>

<script type="text/javascript">
    (function () {
        // Script vacío - sin dependencias de jQuery
    })();

</script>

@stop
