@extends('modelo.modelo')

@section('content')
    <div class="container">
        <a href="{{ url('/home') }}" title="Back"><button class="btn btn-warning  btn-hero btn-sm"><i class="fa fa-arrow-left" aria-hidden="true"></i> Voltar</button></a>
        <br>
        <br>
        <div class="row">


            <div class="col-md-12">
                <div class="card">
                    <div class=" cor_olinda_azul_bg">
                        <h3 class=" p-5 text-white">
                            <center>Minhas Solicitações</center>
                        </h3>
                    </div>

                    <div class="card-body">

                        <script>
                            $(document).ready(function() {
                                $('#myTable').DataTable({
                "bJQueryUI": true,
                "oLanguage": {
                    "sProcessing":   "Processando...",
                    "sLengthMenu":   "Mostrar _MENU_ registros",
                    "sZeroRecords":  "Não foram encontrados resultados",
                    "sInfo":         "Mostrando de _START_ até _END_ de _TOTAL_ registros",
                    "sInfoEmpty":    "Mostrando de 0 até 0 de 0 registros",
                    "sInfoFiltered": "",
                    "sInfoPostFix":  "",
                    "sSearch":       "Buscar:",
                    "sUrl":          "",
                    "oPaginate": {
                        "sFirst":    "Primeiro",
                        "sPrevious": "Anterior",
                        "sNext":     "Seguinte",
                        "sLast":     "Último"
                    }
                }
            });
                            });
                        </script>
                        <br />
                        <br />
                        <div class="table-responsive" >
                            <table class="table" id="myTable">
                                <thead>
                                    <tr>
                                        <th>#</th>
                                        <th>Codigo</th>
                                        <th>Tipo</th>
                                        <th>Descrição</th>
                                        <th>Actions</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @foreach ($protocolo as $item)
                                        <tr>
                                            <td>{{ $loop->iteration }}</td>
                                            <td>{{ $item->codigo }}</td>
                                            <td>{{ $item->tipo }}</td>
                                            <td>{{ $item->descricao }}</td>
                                            <td>
                                                <a href="{{ url('/protocolo/' . $item->id) }}"
                                                    title="View Protocolo"><button class="btn btn-info btn-sm"><i
                                                            class="fa fa-eye" aria-hidden="true"></i>&nbsp;Visualizar</button></a>
                                                <!--a href="{{ url('/protocolo/' . $item->id . '/edit') }}"
                                                    title="Edit Protocolo"><button class="btn btn-primary btn-sm"><i
                                                            class="fa fa-pencil-square-o" aria-hidden="true"></i>
                                                        Edit</button></a-->

                                                <!--form method="POST"
                                                    action="{{ url('/protocolo' . '/' . $item->id) }}"
                                                    accept-charset="UTF-8" style="display:inline">
                                                    {{ method_field('DELETE') }}
                                                    {{ csrf_field() }}
                                                    <button type="submit" class="btn btn-danger btn-sm"
                                                        title="Delete Protocolo"
                                                        onclick="return confirm(&quot;Confirm delete?&quot;)"><i
                                                            class="fa fa-trash-o" aria-hidden="true"></i> Delete</button>
                                                </form-->
                                            </td>
                                        </tr>
                                    @endforeach
                                </tbody>
                            </table>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
