@extends('modelo.modelo')

@section('content')
    <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
    <script type="text/javascript" src="{{ asset('js/acompanhamento.js') }}"></script>
    <div class="container">
        <div class="row">
            <div class="col-md-12">
                <div class="card">
                    <div class="h3">Solicitação #{{ $protocolo->id }}</div>
                    <div class="card-body">

                        <a href="{{ url('funcionario/solicitacoes') }}" title="Back"><button class="btn btn-warning  btn-hero btn-sm"><i
                                    class="fa fa-arrow-left" aria-hidden="true"></i> Voltar</button></a>
                        <!--a href="{{-- url('protocolo/'.$protocolo->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'.'/'.$protocolo->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-->
                        <br />
                        <br />

                        <div class="table-responsive">
                            <table class="table">
                                <tbody>
                                    <tr>
                                        <th> Tipo </th>
                                        <td style="text-transform: capitalize;"> {{ $protocolo->tipo }} </td>
                                    </tr>
                                    <tr>
                                        <th> Status </th>
                                        <td style="text-transform: capitalize;"> {{ $protocolo->status }} </td>
                                    </tr>
                                    <tr>
                                        <th> Codigo </th>
                                        <td style="text-transform: capitalize;"> {{ $protocolo->codigo }} </td>
                                    </tr>

                                    <tr>
                                        <th> Data de Criação </th>
                                        <td> {{ date_format(date_create($protocolo->created_at), 'd/m/Y') }} </td>
                                    </tr>

                                    <tr>
                                        <th> Descrição </th>
                                        <td style="text-transform: capitalize;"> {{ $protocolo->descricao }} </td>
                                    </tr>

                                    <tr>
                                        <td>
                                            <form method="post" action="{{ url('protocolo/updateSetor') }}">
                                                <input type="hidden" name="id" value="id">
                                                <select name="idSetor" id="idSetor" class="form-control">
                                                    <option value="0">Escolha o Setor</option>
                                                    @foreach ($setores as $indice => $setor)
                                                        <option value="{{$indice}}">{{$setor}}</option>
                                                    @endforeach
                                                </select>
                                                <br>
                                                <button class="btn btn-info ">Encaminhar ao Setor</button>
                                            </form>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>

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