Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
agendamento
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Marcos Albano
agendamento
Commits
887986ab
Commit
887986ab
authored
Aug 30, 2020
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pagina de cpfInvalido funcionando.
parent
242586de
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
58 additions
and
73 deletions
+58
-73
TituloController.php
app/Http/Controllers/TituloController.php
+37
-38
DocumentoPessoa.php
app/Models/DocumentoPessoa.php
+4
-4
index.blade.php
resources/views/admin/pages/titulos/index.blade.php
+10
-13
cpfInvalido.blade.php
resources/views/cpfInvalido.blade.php
+1
-1
pesquisaCpf.blade.php
resources/views/pesquisaCpf.blade.php
+2
-14
web.php
routes/web.php
+4
-3
No files found.
app/Http/Controllers/TituloController.php
View file @
887986ab
...
...
@@ -7,6 +7,7 @@ use App\Models\Agendamento;
use
App\Models\DocumentoPessoa
;
use
App\Models\Lote
;
use
App\Models\LoteTramite
;
use
App\Models\Pessoa
;
use
App\Models\PessoaLote
;
use
App\Models\Titulo
;
use
App\Models\Tramite
;
...
...
@@ -16,10 +17,9 @@ class TituloController extends Controller
{
protected
$request
;
//Injeção de dependência
public
function
__construct
(
Request
$request
,
Lote
$lote
)
public
function
__construct
(
Request
$request
)
{
$this
->
request
=
$request
;
$this
->
repository
=
$lote
;
}
/**
...
...
@@ -29,48 +29,46 @@ class TituloController extends Controller
*/
public
function
index
()
{
$documentosPessoa
=
DocumentoPessoa
::
where
(
'cpf'
,
$this
->
request
->
cpf
)
->
with
(
'pessoa'
)
->
get
();
foreach
(
$documentosPessoa
as
$documentoPessoa
)
{
$pessoasLote
=
PessoaLote
::
where
(
'pessoa_id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'lote'
)
->
get
();
foreach
(
$pessoasLote
as
$pessoaLote
)
{
$lotes
=
Lote
::
where
(
'id'
,
$pessoaLote
->
lote_id
)
->
with
(
'lotesTramites'
,
'municipio'
,
'situacaoJuridica'
,
'pessoaLote'
,
'formasObtencao'
,
'processos'
)
->
get
();
foreach
(
$lotes
as
$lote
)
{
$lotesTramites
=
LoteTramite
::
where
(
'lote_id'
,
$lote
->
id
)
->
get
();
foreach
(
$lotesTramites
as
$loteTramite
)
{
$tramites
=
Tramite
::
where
(
'id'
,
$loteTramite
->
tramite_id
)
->
where
(
'documento_tipo'
,
'TITULO DO IMOVEL'
)
->
where
(
'id'
,
67
)
->
get
();
foreach
(
$tramites
as
$tramite
)
{
$titulos
=
Titulo
::
where
(
'lote_id'
,
$lote
->
id
)
->
where
(
'flag_cancelamento'
,
'<>'
,
'S'
)
->
get
();
foreach
(
$titulos
as
$titulo
)
{
$agendamentos
=
Agendamento
::
get
()
->
last
();
if
(
$agendamentos
)
{
// 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>";
//echo "Titulo: " . "{$titulo}<hr>";
return
view
(
'admin.pages.titulos.index'
,
[
'titulos'
=>
$titulos
,
'lotes'
=>
$lotes
,
'documentosPessoa'
=>
$documentosPessoa
,
'loteTramite'
=>
$loteTramite
,
'tramite'
=>
$tramite
,
'agendamentos'
=>
$agendamentos
,
]
);
$documentoPessoa
=
DocumentoPessoa
::
where
(
'cpf'
,
$this
->
request
->
cpf
)
->
with
(
'pessoa'
)
->
first
();
if
(
$documentoPessoa
)
{
$pessoas
=
Pessoa
::
where
(
'id'
,
$documentoPessoa
->
pessoa_id
)
->
get
();
foreach
(
$pessoas
as
$pessoa
)
{
$pessoasLote
=
PessoaLote
::
where
(
'pessoa_id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'lote'
)
->
get
();
foreach
(
$pessoasLote
as
$pessoaLote
)
{
$lotes
=
Lote
::
where
(
'id'
,
$pessoaLote
->
lote_id
)
->
with
(
'lotesTramites'
,
'municipio'
)
->
get
();
foreach
(
$lotes
as
$lote
)
{
$lotesTramites
=
LoteTramite
::
where
(
'lote_id'
,
$pessoaLote
->
lote_id
)
->
get
();
foreach
(
$lotesTramites
as
$loteTramite
)
{
$tramites
=
Tramite
::
where
(
'id'
,
$loteTramite
->
tramite_id
)
->
where
(
'documento_tipo'
,
'TITULO DO IMOVEL'
)
->
where
(
'id'
,
67
)
->
get
();
foreach
(
$tramites
as
$tramite
)
{
$titulos
=
Titulo
::
where
(
'lote_id'
,
$lote
->
id
)
->
where
(
'flag_cancelamento'
,
'<>'
,
'S'
)
->
get
();
foreach
(
$titulos
as
$titulo
)
{
$agendamentos
=
Agendamento
::
get
()
->
last
();
if
(
$agendamentos
)
{
return
view
(
'admin.pages.titulos.index'
,
[
'titulos'
=>
$titulos
,
'lotes'
=>
$lotes
,
'documentoPessoa'
=>
$documentoPessoa
,
'loteTramite'
=>
$loteTramite
,
'tramite'
=>
$tramite
,
'agendamentos'
=>
$agendamentos
,
]
);
}
}
}
}
}
}
}
}
else
{
return
view
(
'cpfInvalido'
)
->
with
([
'cpf'
=>
$this
->
request
->
cpf
]);
}
}
...
...
@@ -98,6 +96,7 @@ class TituloController extends Controller
// }
//guardar data
public
function
store
(
Request
$request
)
{
...
...
app/Models/DocumentoPessoa.php
View file @
887986ab
...
...
@@ -13,10 +13,10 @@ class DocumentoPessoa extends Model
return
$this
->
belongsTo
(
Municipio
::
class
);
}
public
function
pessoa
()
{
return
$this
->
belongsTo
(
Pessoa
::
class
,
'id'
);
}
public
function
pessoa
()
{
return
$this
->
belongsTo
(
Pessoa
::
class
,
'pessoa_id'
,
'id'
);
}
}
resources/views/admin/pages/titulos/index.blade.php
View file @
887986ab
...
...
@@ -21,7 +21,7 @@
</
div
>
</
div
>
--
}}
<
div
class
=
"header_listagem small-box bg-gradient-success"
>
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
{{
--
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
--
}}
@
foreach
(
$lotes
as
$lote
)
<
h1
>
DADOS
DO
ATENDIMENTO
</
h1
>
<
h2
>
{{
$lote
->
proprietario
}}
</
h1
>
...
...
@@ -29,7 +29,7 @@
<
h3
>
NÚMERO
DO
ATENDIMENTO
:
{{
$agendamentos
->
id
}}
</
h1
>
<
h3
>
DATA
DO
AGENDAMENTO
:
{{
$agendamentos
->
data
}}
</
h1
>
@
endforeach
@
endforeach
{{
--
@
endforeach
--
}}
</
div
>
<!--
<
h1
></
h1
>
-->
<
div
class
=
"card card-outline card-success"
>
...
...
@@ -45,13 +45,13 @@
<
th
>
PROPRIETÁRIO
</
th
>
<
th
>
CPF
</
th
>
<
th
>
STATUS
</
th
>
<
th
>
DATA
</
th
>
<
th
>
NÚMERO
DO
ATENDIMENTO
</
th
>
{{
--
<
th
>
DATA
</
th
>
--
}}
{{
--
<
th
>
NÚMERO
DO
ATENDIMENTO
</
th
>
--
}}
<
th
width
=
"100"
>
AÇÕES
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
{{
--
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
--
}}
@
foreach
(
$lotes
as
$lote
)
@
foreach
(
$titulos
as
$titulo
)
@
if
(
$agendamentos
)
...
...
@@ -60,15 +60,16 @@
<
td
>
{{
$lote
->
proprietario
}}
</
td
>
<
td
>
{{
$documentoPessoa
->
cpf
}}
</
td
>
<
td
>
{{
$tramite
->
nome
}}
</
td
>
<
td
>
{{
$agendamentos
->
data
}}
</
td
>
<
td
>
{{
$agendamentos
->
id
}}
</
td
>
{{
--
<
td
>
{{
$agendamentos
->
data
}}
</
td
>
--
}}
{{
--
<
td
>
{{
$agendamentos
->
id
}}
</
td
>
--
}}
<
td
>
<
a
href
=
"{{ route('titulos.show',
$lote->id
) }}"
class
=
"badge bg-green"
>
DETALHES
</
a
>
<
a
href
=
"{{ route('titulos.show',
$lote->id
) }}"
class
=
"badge bg-green"
>
DETALHES
</
a
>
</
td
>
</
tr
>
@
endif
@
endforeach
@
endforeach
{{
--
@
endforeach
--
}}
@
endforeach
</
tbody
>
...
...
@@ -86,8 +87,6 @@
</
div
>
</
div
>
</
form
>
{{
--
<
a
href
=
"{{ route('titulos.show',
$lote->id
) }}"
class
=
"badge bg-green"
>
DADOS
DO
ATENDIMENTO
</
a
>
--
}}
</
div
>
<
script
type
=
"text/javascript"
>
$
(
'#datepicker'
)
.
datepicker
({
...
...
@@ -96,8 +95,6 @@
});
</
script
>
</
div
>
</
div
>
@
endsection
resources/views/cpfInvalido.blade.php
View file @
887986ab
...
...
@@ -16,7 +16,7 @@
<
img
class
=
"logoidace"
src
=
"{{ asset('img/logo-idace.png') }}"
>
<
h1
class
=
"titulo"
>
Nenhum
dado
encontrato
para
esse
CPF
.
</
h1
>
<
h1
class
=
"titulo"
>
Nenhum
dado
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
-->
...
...
resources/views/pesquisaCpf.blade.php
View file @
887986ab
...
...
@@ -12,24 +12,12 @@
<
div
class
=
"col-md-6 tela"
>
<
img
class
=
"logoidace"
src
=
"{{ asset('img/logo-idace.png') }}"
>
<
h1
class
=
"titulo"
>
Agendamento
de
entrega
de
Títulos
</
h1
>
<
h4
class
=
"titulo2"
>
Pree
cha
com
cpf
V
álido
</
h4
>
<
h4
class
=
"titulo2"
>
Pree
ncha
com
CPF
v
álido
</
h4
>
<
form
action
=
"{{ route('titulos.store') }}"
class
=
"form form-inline sem_flex"
method
=
"GET"
>
<
input
type
=
"text"
class
=
"form-control label_cpf"
data
-
mask
=
"000.000.000-00"
name
=
"cpf"
placeholder
=
"000.000.000-00"
>
<
input
type
=
"text"
class
=
"form-control label_cpf"
data
-
mask
=
"000.000.000-00"
name
=
"cpf"
placeholder
=
"000.000.000-00"
>
<
button
type
=
"submit"
class
=
"btn btn-block btn-primary btn_pesquisa"
>
Pesquisar
</
button
>
</
form
>
<!--
{{
--
<
form
role
=
"form"
>
<
div
class
=
"card-body"
>
<
div
class
=
"form-group "
>
<
input
type
=
"email"
class
=
"form-control label_cpf"
data
-
mask
=
"000.000.000-00"
id
=
"exampleInputEmail1"
placeholder
=
"000.000.000-00"
>
<
button
type
=
"button "
class
=
"btn btn-block btn-primary btn_pesquisa"
>
Pesquisar
</
button
>
</
div
>
</
div
>
</
form
>
--
}}
-->
</
div
>
<
div
class
=
"col-md-3"
>
</
div
>
...
...
routes/web.php
View file @
887986ab
...
...
@@ -11,7 +11,7 @@ Route::get('one-to-many', 'OneToManyController@oneToMany');
Route
::
get
(
'one-to-one'
,
'OneToOneController@oneToOne'
);
Route
::
any
(
'agendamentos/search'
,
'AgendamentoController@search'
)
->
name
(
'agendamentos.search'
)
->
middleware
(
'auth'
);
//->middleware('auth');
Route
::
any
(
'titulos/search'
,
'TituloController@search'
)
->
name
(
'titulos.search'
)
->
middleware
(
'auth'
);
//->middleware('auth');
Route
::
resource
(
'titulos'
,
'TituloController'
);
//->middleware('auth');
Route
::
resource
(
'titulos'
,
'TituloController'
);
Route
::
get
(
'titulos/{id}'
,
'TituloController@show'
)
->
name
(
'titulos.show'
);
//->middleware('auth');
Route
::
resource
(
'agendamentos'
,
'AgendamentoController'
)
->
middleware
(
'auth'
);
Route
::
any
(
'lotes/search'
,
'LoteController@search'
)
->
name
(
'lotes.search'
);
...
...
@@ -24,6 +24,7 @@ Route::any('glebas/search', 'GlebaController@search')->name('glebas.search')->mi
Route
::
get
(
'datepicker'
,
'DatepickerController@create'
)
->
name
(
'datepicker'
);
Route
::
post
(
'datepicker'
,
'DatepickerController@datepicker'
)
->
name
(
'datepicker.datepicker'
);
Route
::
resource
(
'teste'
,
'TesteController'
);
Auth
::
routes
();
...
...
@@ -42,9 +43,9 @@ Route::get('/dadosAtendimento', function () {
return
view
(
'dadosAtendimento'
);
})
->
name
(
'dadosAtendimento'
);
Route
::
get
(
'/cpf
i
nvalido'
,
function
()
{
Route
::
get
(
'/cpf
I
nvalido'
,
function
()
{
return
view
(
'cpfInvalido'
);
})
->
name
(
'cpf
i
nvalido'
);
})
->
name
(
'cpf
I
nvalido'
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment