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
acc32505
Commit
acc32505
authored
Aug 31, 2020
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mostrando todos os lotes
parent
61fc7105
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
55 deletions
+45
-55
TituloController.php
app/Http/Controllers/TituloController.php
+12
-13
LoteTramite.php
app/Models/LoteTramite.php
+4
-4
PessoaLote.php
app/Models/PessoaLote.php
+1
-1
index.blade.php
resources/views/admin/pages/titulos/index.blade.php
+22
-33
show.blade.php
resources/views/admin/pages/titulos/show.blade.php
+1
-0
cpfInvalido.blade.php
resources/views/cpfInvalido.blade.php
+1
-1
cpfValidoSemTitulo.blade.php
resources/views/cpfValidoSemTitulo.blade.php
+3
-2
web.php
routes/web.php
+1
-1
No files found.
app/Http/Controllers/TituloController.php
View file @
acc32505
...
...
@@ -31,31 +31,30 @@ class TituloController extends Controller
{
$documentoPessoa
=
DocumentoPessoa
::
where
(
'cpf'
,
$this
->
request
->
cpf
)
->
with
(
'pessoa'
)
->
first
();
if
(
$documentoPessoa
)
{
$pessoa
s
=
Pessoa
::
where
(
'id'
,
$documentoPessoa
->
pessoa_id
)
->
ge
t
();
foreach
(
$pessoas
as
$pessoa
)
{
$pessoasLote
=
PessoaLote
::
where
(
'pessoa_id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'lote'
)
->
get
();
$pessoa
=
Pessoa
::
where
(
'id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'pessoaLote'
,
'documentoPessoa'
)
->
firs
t
();
if
(
$pessoa
)
{
$pessoasLote
=
PessoaLote
::
where
(
'pessoa_id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'lote'
,
'pessoa'
)
->
get
();
foreach
(
$pessoasLote
as
$pessoaLote
)
{
$lotes
=
Lote
::
where
(
'id'
,
$pessoaLote
->
lote_id
)
->
with
(
'lotesTramites'
,
'municipio'
)
->
get
();
$lotes
=
Lote
::
where
(
'id'
,
$pessoaLote
->
lote
->
id
)
->
with
(
'municipio'
,
'pessoaLote'
,
'lotesTramites'
)
->
get
();
foreach
(
$lotes
as
$lote
)
{
$loteTramite
=
LoteTramite
::
where
(
'lote_id'
,
$pessoaLote
->
lote_id
)
->
max
(
'id'
);
$loteTramite
=
LoteTramite
::
where
(
'lote_id'
,
$pessoaLote
->
lote_id
)
->
with
(
'tramite'
)
->
max
(
'id'
);
$lotesTramites
=
LoteTramite
::
where
(
'id'
,
$loteTramite
)
->
get
();
foreach
(
$lotesTramites
as
$lotTramite
)
{
$tramites
=
Tramite
::
where
(
'id'
,
$lotTramite
->
tramite_id
)
->
get
();
foreach
(
$tramites
as
$tramite
)
{
if
(
$tramite
->
nome
===
"ARQUIVO PRONTO PARA ENTREGA"
)
{
$titulos
=
Titulo
::
where
(
'lote_id'
,
$
lote
->
id
)
->
where
(
'flag_cancelamento'
,
'<>'
,
'S'
)
->
get
();
if
(
$tramite
->
id
===
67
)
{
$titulos
=
Titulo
::
where
(
'lote_id'
,
$
pessoaLote
->
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
,
'
pessoasLote'
=>
$pessoasLote
,
'lotes'
=>
$lotes
,
'documentoPessoa'
=>
$documentoPessoa
,
'loteTramite'
=>
$loteTramite
,
'titulos'
=>
$titulo
,
'lotesTramites'
=>
$lotesTramites
,
'tramite'
=>
$tramite
,
'agendamentos'
=>
$agendamentos
,
]
...
...
@@ -63,13 +62,13 @@ class TituloController extends Controller
}
}
}
else
{
return
view
(
'cpfValidoSemTitulo'
)
->
with
([
'cpf'
=>
$this
->
request
->
cpf
]);
return
view
(
'cpfValidoSemTitulo'
)
->
with
([
'cpf'
=>
$this
->
request
->
cpf
,
'nome'
=>
$tramite
->
nome
]);
}
}
}
}
}
}
}
else
{
return
view
(
'cpfInvalido'
)
->
with
([
'cpf'
=>
$this
->
request
->
cpf
]);
...
...
app/Models/LoteTramite.php
View file @
acc32505
...
...
@@ -8,10 +8,10 @@ class LoteTramite extends Model
{
protected
$table
=
'sige.lotes_tramites'
;
// public function tramites
()
//
{
// return $this->hasMany(Tramite::class, 'id', 'tramite_
id');
//
}
public
function
tramite
()
{
return
$this
->
belongsTo
(
Tramite
::
class
,
'
id'
);
}
// public function secUser(){
// return $this->belongsTo(SecUser::class);
...
...
app/Models/PessoaLote.php
View file @
acc32505
...
...
@@ -10,7 +10,7 @@ class PessoaLote extends Model
public
function
pessoa
()
{
return
$this
->
belongsTo
(
Pessoa
::
class
);
return
$this
->
belongsTo
(
Pessoa
::
class
,
'pessoa_id'
,
'id'
);
}
public
function
lote
()
...
...
resources/views/admin/pages/titulos/index.blade.php
View file @
acc32505
...
...
@@ -10,26 +10,17 @@
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
=
"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
(
$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
:
{{
$agendamentos
->
data
}}
</
h1
>
<
h3
>
DATA
DO
AGENDAMENTO
:
{{
date
(
'd/m/Y'
,
strtotime
(
$agendamentos
->
data
))
}}
</
h1
>
@
endforeach
{{
--
@
endforeach
--
}}
@
endforeach
--
}}
</
div
>
<!--
<
h1
></
h1
>
-->
<
div
class
=
"card card-outline card-success"
>
...
...
@@ -43,6 +34,7 @@
<
tr
>
<
th
>
MUNICÍPIO
</
th
>
<
th
>
PROPRIETÁRIO
</
th
>
<
th
>
LOTE
</
th
>
<
th
>
CPF
</
th
>
<
th
>
STATUS
</
th
>
{{
--
<
th
>
DATA
</
th
>
--
}}
...
...
@@ -51,26 +43,24 @@
</
tr
>
</
thead
>
<
tbody
>
{{
--
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
--
}}
@
foreach
(
$lotes
as
$lote
)
@
foreach
(
$titulos
as
$titulo
)
@
if
(
$agendamentos
)
<
tr
>
<
td
>
{{
$lote
->
municipio
->
nome
}}
</
td
>
<
td
>
{{
$lote
->
proprietario
}}
</
td
>
<
td
>
{{
$documentoPessoa
->
cpf
}}
</
td
>
<
td
>
{{
$tramite
->
nome
}}
</
td
>
{{
--
<
td
>
{{
$agendamentos
->
data
}}
</
td
>
--
}}
{{
--
<
td
>
{{
$agendamentos
->
id
}}
</
td
>
--
}}
<
td
>
<
a
href
=
"{{ route('titulos.show',
$lote->id
) }}"
class
=
"badge bg-green"
>
DETALHES
</
a
>
</
td
>
</
tr
>
@
endif
@
endforeach
{{
--
@
endforeach
--
}}
@
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
>
...
...
@@ -83,7 +73,6 @@
<
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
>
...
...
resources/views/admin/pages/titulos/show.blade.php
View file @
acc32505
...
...
@@ -17,6 +17,7 @@
<
h4
class
=
"titulo2"
>
DETENTOR
:
<
strong
>
{{
$lotes
->
proprietario
}}
</
strong
></
h4
>
<
h4
class
=
"titulo2"
>
IMÓVEL
:
<
strong
>
{{
$lotes
->
nome
}}
</
strong
></
h4
>
<
h4
class
=
"titulo2"
>
CPF
:
<
strong
>
{{
$lotes
->
cpf
}}
</
strong
></
h4
>
<
h4
class
=
"titulo2"
>
LOTE
:
<
strong
>
{{
$lotes
->
numero
}}
</
strong
></
h4
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-6"
style
=
"text-align:center;font-size:23px;"
>
{{
--
<
h4
class
=
"titulo2"
>
Data
:
<
strong
>
02
/
02
/
2020
</
strong
></
h4
>
--
}}
...
...
resources/views/cpfInvalido.blade.php
View file @
acc32505
...
...
@@ -16,7 +16,7 @@
<
img
class
=
"logoidace"
src
=
"{{ asset('img/logo-idace.png') }}"
>
<
h1
class
=
"titulo"
>
Nenhum
dado
encontra
t
o
o
CPF
:
{{
$cpf
}}
</
h1
>
<
h1
class
=
"titulo"
>
Nenhum
dado
encontra
d
o
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/cpfValidoSemTitulo.blade.php
View file @
acc32505
...
...
@@ -15,8 +15,9 @@
<
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
>
<
h1
class
=
"titulo"
>
Nenhum
Título
pronto
para
entrega
para
o
CPF
:
{{
$cpf
}}
</
h1
>
<
h1
class
=
"titulo"
>
Status
do
Título
encontrado
:
{{
$nome
}}
</
h1
>
<
h4
class
=
"titulo2"
>
Caso
tenha
alguma
dúvida
,
entre
em
contato
através
do
telefone
:
85
0000
-
0000
</
h4
>
<!--
general
form
elements
-->
...
...
routes/web.php
View file @
acc32505
...
...
@@ -33,7 +33,7 @@ Route::get('/home', 'HomeController@index')->name('home');
Route
::
get
(
'/'
,
function
()
{
return
view
(
'pesquisaCpf'
);
});
})
->
name
(
'pesquisaCpf'
)
;
// Route::get('/', function () {
// return view('teste');
...
...
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