@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>
    <div class="header_listagem small-box bg-gradient-success">
         {{-- @foreach ($documentosPessoa as $documentoPessoa)
           
            @foreach ($lotes as $lote)
                <h1>DADOS DO ATENDIMENTO</h1>
                <h2>{{ $lote->proprietario }}</h1>
                    <h3>CPF: {{ $documentoPessoa->cpf }} </h1>
                        <h3>NÚMERO DO ATENDIMENTO: {{ $agendamentos->id }} </h1>
                            <h3>DATA DO AGENDAMENTO: {{ date('d/m/Y', strtotime($agendamentos->data)) }} </h1>
            @endforeach
            @endforeach --}}
    </div>
    <!-- <h1></h1> -->
    <div class="card card-outline card-success">
        <div class="card-header">
            <h3 class="card-title"><b>Listagem dos Títulos</b></h3>
        </div>
        <!-- /.card-header -->
        <div class="card-body">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th>MUNICÍPIO</th>
                        <th>PROPRIETÁRIO</th>
                        <th>LOTE</th>
                        <th>CPF</th>
                        <th>STATUS</th>
                        {{-- <th>DATA</th> --}}
                        {{-- <th>NÚMERO DO ATENDIMENTO</th> --}}
                        <th width="100">AÇÕES</th>
                    </tr>
                </thead>
                <tbody>
                    @foreach ($pessoasLote as $pessoaLote)
                    <tr>
                        <td>{{ $pessoaLote->lote->municipio->nome }}</td>
                        <td>{{ $pessoaLote->pessoa->nome }}</td>
                        <td>{{ $pessoaLote->lote->numero }}</td>
                        <td>{{ $documentoPessoa->cpf }}</td>
                        <td>{{ $tramite->nome }}</td>
                        <td><a
                            href="{{ route('titulos.show', $pessoaLote->lote->id) }}"
                            class="badge bg-green">DETALHES</a></td>
                    </tr>
                        
                        
                        
                        
                    @endforeach


                </tbody>

            </table>
            <div class="container">
                <form method="post" action="{{ route('datepicker') }}" enctype="multipart/form-data">
                    @csrf
                    <div class="row">
                        <div class="col-md-4"></div>
                        <div class="form-group col-md-4">
                            <strong>Date : </strong>
                            <input class="date form-control" type="text" id="datepicker" name="data">
                            <button type="submit" class="btn btn-success">AGENDAR</button>
                        </div>
                    </div>
                </form>
            </div>
            <script type="text/javascript">
                $('#datepicker').datepicker({
                    autoclose: true,
                    format: 'dd/mm/yyyy'
                });

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