@extends('modelo.modelo')

@section('content')

<a href="{{ url('cadastrador/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>

    <script>
        $(document).ready(function() {
            $('#myTable').DataTable();
        });
    </script>


    <table class="table table-striped" id="myTable">
        <thead>
            <tr>
                <th scope="col">Tipo</th>
                <th scope="col">Codigo</th>
                <th scope="col">Descrição</th>
                <th scope="col">Data de Criação</th>
                <th scope="col">Setor</th>
                <th scope="col">Status</th>
                <th scope="col">Ações</th>
            </tr>
        </thead>
        <tbody>
            @foreach ($protocolos as $protocolo)

                <tr>
                    <th style="text-transform: capitalize;">{{ $protocolo->tipo }}</th>
                    <td>{{ $protocolo->codigo }}</td>
                    <td style="text-transform: capitalize;">{{ $protocolo->descricao }}</td>
                    <td>{{ date_format(date_create($protocolo->data), 'd/m/Y') }}</td>
                    <td style="text-transform: capitalize;">{{ $protocolo->idSetor }}</td>
                    <td style="text-transform: capitalize;">{{ $protocolo->status }}</td>
                    <td><a class="btn btn-info" href="{{ url('/funcionario/solicitacoes/show',['id'=> $protocolo->id]) }}">Ver Detalhes</a></td>
                </tr>

            @endforeach


        </tbody>
    </table>

@endsection
