Commit 61fc7105 authored by Marcos Albano's avatar Marcos Albano 💬

Telas de cpfInvalido e cpfValidoSemTitulo funcionando

parent 887986ab
...@@ -35,10 +35,13 @@ class AgendamentoController extends Controller ...@@ -35,10 +35,13 @@ class AgendamentoController extends Controller
public function index() public function index()
{ {
$agendamento = Agendamento::paginate(); $agendamentos = Agendamento::get();
return view('admin.pages.agendamentos.index', [ foreach($agendamentos as $agendamento){
'agendamentos' => $agendamento return view('admin.pages.agendamentos.index', [
]); 'agendamentos' => $agendamentos
]);
}
} }
/** /**
...@@ -74,12 +77,12 @@ class AgendamentoController extends Controller ...@@ -74,12 +77,12 @@ class AgendamentoController extends Controller
{ {
// if(!$agendamento = $this->repository->find($id)) // if(!$agendamento = $this->repository->find($id))
// return redirect()->back(); // return redirect()->back();
$agendamento = DB::table('agendamento.agendamentos')->where('id', $id)->first(); $agendamentos = DB::table('agendamento.agendamentos')->find($id);
if(!$agendamento) if(!$agendamentos)
return redirect()->back(); return redirect()->back();
return view('admin.pages.agendamentos.show', [ return view('admin.pages.agendamentos.show', [
'agendamentos' => $agendamento 'agendamentos' => $agendamentos
]); ]);
} }
......
...@@ -39,30 +39,34 @@ class TituloController extends Controller ...@@ -39,30 +39,34 @@ class TituloController extends Controller
->with('lotesTramites', 'municipio') ->with('lotesTramites', 'municipio')
->get(); ->get();
foreach ($lotes as $lote) { foreach ($lotes as $lote) {
$lotesTramites = LoteTramite::where('lote_id', $pessoaLote->lote_id)->get(); $loteTramite = LoteTramite::where('lote_id', $pessoaLote->lote_id)->max('id');
foreach ($lotesTramites as $loteTramite) { $lotesTramites = LoteTramite::where('id', $loteTramite)->get();
$tramites = Tramite::where('id', $loteTramite->tramite_id)->where('documento_tipo', 'TITULO DO IMOVEL') foreach ($lotesTramites as $lotTramite) {
->where('id', 67) $tramites = Tramite::where('id', $lotTramite->tramite_id)->get();
->get();
foreach ($tramites as $tramite) { foreach ($tramites as $tramite) {
$titulos = Titulo::where('lote_id', $lote->id)->where('flag_cancelamento', '<>', 'S')->get(); if ($tramite->nome === "ARQUIVO PRONTO PARA ENTREGA") {
foreach ($titulos as $titulo) { $titulos = Titulo::where('lote_id', $lote->id)->where('flag_cancelamento', '<>', 'S')->get();
$agendamentos = Agendamento::get()->last(); foreach ($titulos as $titulo) {
if ($agendamentos) { $agendamentos = Agendamento::get()->last();
return view( if ($agendamentos) {
'admin.pages.titulos.index', return view(
[ 'admin.pages.titulos.index',
'titulos' => $titulos, [
'lotes' => $lotes, 'titulos' => $titulos,
'documentoPessoa' => $documentoPessoa, 'lotes' => $lotes,
'loteTramite' => $loteTramite, 'documentoPessoa' => $documentoPessoa,
'tramite' => $tramite, 'loteTramite' => $loteTramite,
'agendamentos' => $agendamentos, 'tramite' => $tramite,
] 'agendamentos' => $agendamentos,
); ]
);
}
} }
} else {
return view('cpfValidoSemTitulo')->with(['cpf' => $this->request->cpf]);
} }
} }
} }
} }
} }
......
@extends('adminlte::page')
@section('title', 'CPF Inválido')
@section('content')
<form action="" method="post" enctype="multipart/form-data" class="form">
<div class="row">
<!-- left column -->
<div class="col-md-3">
</div>
<div class="col-md-6 tela_cpf_invalido">
<img class="logoidace" src="{{ asset('img/logo-idace.png') }}" >
<h1 class="titulo">Nenhum Título encontrato o CPF: {{ $cpf }}</h1>
<h4 class="titulo2">Caso tenha alguma dúvida, entre em contato através do telefone: 85 0000-0000</h4>
<!-- general form elements -->
<!-- /.card-header -->
<!-- form start -->
<button href="/" type="button " style="margin-top:100px" class="btn btn-block btn-primary btn_pesquisa">Voltar</button>
</div>
<!-- /.card -->
<!--/.col (left) -->
<!-- right column -->
<!--/.col (right) -->
<div class="col-md-3">
</div>
</div>
</form>
@endsection
\ No newline at end of file
...@@ -47,6 +47,9 @@ Route::get('/cpfInvalido', function () { ...@@ -47,6 +47,9 @@ Route::get('/cpfInvalido', function () {
return view('cpfInvalido'); return view('cpfInvalido');
})->name('cpfInvalido'); })->name('cpfInvalido');
Route::get('/cpfValidoSemTitulo', function () {
return view('cpfValidoSemTitulo');
})->name('cpfValidoSemTitulo');
......
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