@extends('adminlte::page')

@section('title', 'Pesquisa de Titulos')

@section('content_header')
@endsection
@section('content')
    <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css"
        rel="stylesheet">
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/js/bootstrap-datepicker.js"></script>
    @foreach ($documentosPessoa as $documentoPessoa)
        @foreach ($lotes as $lote)

            <h1>DADOS DO DETENTOR</h1>
            <h2>{{ $lote->proprietario }}</h1>
                <h3>CPF:{{ $documentoPessoa->cpf }} </h1>
        @endforeach
    @endforeach
    </div>
    <div class="card card-outline card-success">
        <div class="card-header">
            <h3 class="card-title"><b>Listagem dos Títulos</b></h3>
        </div>
        <div class="card-body">
            <table class="table table-striped">
                <thead>
                    <tr align="center">
                        <th>MUNICÍPIO</th>
                        <th>PROPRIETÁRIO</th>
                        <th>CPF</th>
                        <th>TRAMITE</th>
                        <th width="100">AÇÕES</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach ($documentosPessoa as $documentoPessoa)
                        @foreach ($lotes as $lote)
                            @foreach ($titulos as $titulo)
                                <tr align="center">
                                    <td>{{ $lote->municipio->nome }}</td>
                                    <td>{{ $lote->proprietario }}</td>
                                    <td>{{ $documentoPessoa->cpf }}</td>
                                    <td>{{ $tramite->nome }}</td>
                                    <td>
                                        <a href="{{ route('titulos.show', $lote->id) }}" class="badge bg-green">Detalhes</a>
                                    </td>
                                </tr>
                            @endforeach
                        @endforeach
                    @endforeach
                </tbody>
            </table>
            <div class="container">
                <div class="row">
                    <div class='col-sm-6'>
                        <div class="form-group">
                            <div class='input-group date' id='datetimepicker1'>
                                <input type='text' class="form-control datetimepicker" />
                                <span class="input-group-addon">
                                    <span class="glyphicon glyphicon-calendar"></span>
                                </span>
                            </div>
                        </div>
                    </div>
                    <script type="text/javascript">
                        $(function () {
                            $('#datetimepicker1').datepicker();
                        });
                    </script>
                </div>
            </div>

           
            {{-- <button type="submit"
                class="btn btn-block btn-primary btn_pesquisa">Agendar</button> --}}
           
        </div>
        <div class="card-footer">
            {{-- {!! $titulos->appends($filters)->links() !!} --}}
        </div>
    </div>
@endsection
