Commit 9e2252d3 authored by Marcos Albano's avatar Marcos Albano 💬

Atualizacao do show

parent 1d822319
......@@ -30,15 +30,12 @@ class TituloController extends Controller
{
$documentosPessoa = DocumentoPessoa::where('cpf', $this->request->cpf)->with('pessoa')->get();
foreach ($documentosPessoa as $documentoPessoa) {
//echo "Documento/Pessoa: " . "{$documentoPessoa}<hr>";
$pessoasLote = PessoaLote::where('pessoa_id', $documentoPessoa->pessoa_id)->with('lote')->get();
foreach ($pessoasLote as $pessoaLote) {
//echo "Pessoa/Pessoa_Lote: " . "{$pessoaLote}<hr>";
$lotes = Lote::where('id', $pessoaLote->lote_id)->with('lotesTramites', 'municipio')->get();
foreach ($lotes as $lote) {
$lotesTramites = LoteTramite::where('lote_id', $lote->id)->get();
foreach ($lotesTramites as $loteTramite) {
//echo "LOte/Tramite: " . "{$loteTramite}<hr>";
$tramites = Tramite::where('id', $loteTramite->tramite_id)->where('documento_tipo', 'TITULO DO IMOVEL')
->where('id', 67)
->get();
......@@ -47,7 +44,8 @@ class TituloController extends Controller
foreach ($titulos as $titulo) {
// echo "<b>Município: {$lote->municipio->nome}" . " | Título: {$titulo->numero_titulo}" . " | Proprietário: {$lote->proprietario}" .
// " | CPF: {$documentoPessoa->cpf}" . " | Tramite Nome: {$tramite->nome}" . " | Localizacao: {$loteTramite->localizacao_nova}" . " | Lote: {$lote->numero}" . " | Cancelado?: {$titulo->flag_cancelamento} </b><hr>";
// " | CPF: {$documentoPessoa->cpf}" . " | Tramite Nome: {$tramite->nome}" . " | Localizacao: {$loteTramite->localizacao_nova}" .
// " | Lote: {$lote->numero}" . " | Cancelado?: {$titulo->flag_cancelamento} </b><hr>";
//echo "Titulo: " . "{$titulo}<hr>";
return view(
......@@ -108,24 +106,18 @@ class TituloController extends Controller
if (!$lotes = Lote::find($id)) {
return redirect()->back();
} else {
foreach ($lotes as $lote) {
return view('admin.pages.titulos.show', [
'lotes' => $lotes,
]);
}
}
if (!$titulos = Titulo::where('lote_id', $id)->get()) {
return redirect()->back();
}else{
foreach ($titulos as $titulo) {
} else {
return view('admin.pages.titulos.show', [
'titulos' => $titulos,
]);
}
}
}
/**
......
......@@ -5,16 +5,6 @@
@section('content_header')
@endsection
@section('content')
{{-- <div class="card card-outline card-success">
<div class="card-body">
<form action="{{ route('titulos.search') }}" class="form form-inline" method="POST">
@csrf
<input type="text" name="filter" placeholder="Filtrar:" class="form-control"
value="{{ $filters['filter'] ?? '' }}">
<button type="submit" class="btn btn-info">Pesquisar</button>
</form>
</div>
</div> --}}
<div class="header_listagem small-box bg-gradient-success">
@foreach ($documentosPessoa as $documentoPessoa)
@foreach ($lotes as $lote)
......@@ -25,22 +15,18 @@
@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 align="center">
<th>MUNICÍPIO</th>
<th>PROPRIETÁRIO</th>
<th>NÚMERO TÍTULO</th>
<th>CPF</th>
<th>TRAMITE</th>
<th>LOCALIZAÇÃO</th>
<th width="100">AÇÕES</th>
</tr>
</thead>
......@@ -51,10 +37,8 @@
<tr align="center">
<td>{{ $lote->municipio->nome }}</td>
<td>{{ $lote->proprietario }}</td>
<td>{{ $titulo->numero_titulo }}</td>
<td>{{ $documentoPessoa->cpf }}</td>
<td>{{ $tramite->nome }}</td>
<td>{{ $loteTramite->localizacao_nova }}</td>
<td>
<a href="{{ route('titulos.show', $lote->id) }}"
class="badge bg-green">Detalhes</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment