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
1d822319
Commit
1d822319
authored
Aug 26, 2020
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implementado a funcionalidade do show
parent
428a5184
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
47 additions
and
68 deletions
+47
-68
TituloController.php
app/Http/Controllers/TituloController.php
+38
-57
adminlte.php
config/adminlte.php
+1
-1
index.blade.php
resources/views/admin/pages/titulos/index.blade.php
+1
-1
show.blade.php
resources/views/admin/pages/titulos/show.blade.php
+4
-7
brand-logo-xs.blade.php
...s/vendor/adminlte/partials/common/brand-logo-xs.blade.php
+1
-1
web.php
routes/web.php
+2
-1
No files found.
app/Http/Controllers/TituloController.php
View file @
1d822319
...
...
@@ -15,10 +15,10 @@ class TituloController extends Controller
{
protected
$request
;
//Injeção de dependência
public
function
__construct
(
Request
$request
,
Titulo
$titulo
)
public
function
__construct
(
Request
$request
,
Lote
$lote
)
{
$this
->
request
=
$request
;
$this
->
repository
=
$
titulo
;
$this
->
repository
=
$
lote
;
}
/**
...
...
@@ -30,77 +30,44 @@ class TituloController extends Controller
{
$documentosPessoa
=
DocumentoPessoa
::
where
(
'cpf'
,
$this
->
request
->
cpf
)
->
with
(
'pessoa'
)
->
get
();
foreach
(
$documentosPessoa
as
$documentoPessoa
)
{
$pessoasLotes
=
PessoaLote
::
where
(
'pessoa_id'
,
$documentoPessoa
->
pessoa_id
)
->
with
(
'lote'
)
->
get
();
foreach
(
$pessoasLotes
as
$pessoaLote
)
{
//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
)
{
$tramites
=
Tramite
::
where
(
'id'
,
$loteTramite
->
tramite_id
)
->
with
(
'setor'
)
->
where
(
'documento_tipo'
,
'TITULO DO IMOVEL'
)
//echo "LOte/Tramite: " . "{$loteTramite}<hr>";
$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
)
{
// 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
,
]
);
}
}
}
}
}
return
view
(
'admin.pages.titulos.index'
,
[
'titulos'
=>
$titulos
,
'lotes'
=>
$lotes
,
'documentosPessoa'
=>
$documentosPessoa
,
'loteTramite'
=>
$loteTramite
,
'tramite'
=>
$tramite
,
'pessoasLotes'
=>
$pessoasLotes
,
]
);
}
}
//------------------FUNCIONANDO----------------------------------
// $documentosPessoa = DocumentoPessoa::where('cpf', $this->request->cpf)->with('pessoa')->get();
// foreach ($documentosPessoa as $documentoPessoa) {
// $pessoasLotes = PessoaLote::where('pessoa_id', $documentoPessoa->pessoa_id)->with('lote')->get();
// foreach ($pessoasLotes as $pessoaLote) {
// $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) {
// $tramites = Tramite::where('id', $loteTramite->tramite_id)->with('setor')->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) {
// // 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,
// 'pessoasLotes' => $pessoasLotes,
// ]
// );
// }
// }
/**
* Show the form for creating a new resource.
*
...
...
@@ -138,13 +105,27 @@ class TituloController extends Controller
*/
public
function
show
(
$id
)
{
if
(
!
$
titulo
=
Titulo
::
find
(
$id
))
{
if
(
!
$
lotes
=
Lote
::
find
(
$id
))
{
return
redirect
()
->
back
();
}
else
{
foreach
(
$lotes
as
$lote
)
{
return
view
(
'admin.pages.titulos.show'
,
[
'lotes'
=>
$lotes
,
]);
}
}
return
view
(
'admin.pages.titulos.show'
,
[
'titulos'
=>
$titulo
,
]);
if
(
!
$titulos
=
Titulo
::
where
(
'lote_id'
,
$id
)
->
get
())
{
return
redirect
()
->
back
();
}
else
{
foreach
(
$titulos
as
$titulo
)
{
return
view
(
'admin.pages.titulos.show'
,
[
'titulos'
=>
$titulos
,
]);
}
}
}
/**
...
...
config/adminlte.php
View file @
1d822319
...
...
@@ -65,7 +65,7 @@ return [
|
*/
'usermenu_enabled'
=>
tru
e
,
'usermenu_enabled'
=>
fals
e
,
'usermenu_header'
=>
false
,
'usermenu_header_class'
=>
'bg-primary'
,
'usermenu_image'
=>
false
,
...
...
resources/views/admin/pages/titulos/index.blade.php
View file @
1d822319
...
...
@@ -56,7 +56,7 @@
<
td
>
{{
$tramite
->
nome
}}
</
td
>
<
td
>
{{
$loteTramite
->
localizacao_nova
}}
</
td
>
<
td
>
<
a
href
=
"{{ route('titulos.show',
$
trami
te->id
) }}"
<
a
href
=
"{{ route('titulos.show',
$
lo
te->id
) }}"
class
=
"badge bg-green"
>
Detalhes
</
a
>
</
td
>
</
tr
>
...
...
resources/views/admin/pages/titulos/show.blade.php
View file @
1d822319
@
extends
(
'adminlte::page'
)
@
section
(
'title'
,
"Detalhes do Título
{
$titulos
->
numero_titulo
}
"
)
@
section
(
'title'
,
"Detalhes do Título"
)
@
section
(
'content_header'
)
...
...
@@ -11,12 +11,9 @@
</
div
>
<
div
class
=
"card-body"
>
<
ul
>
<
li
><
strong
>
NÚMERO
TÍTULO
:
</
strong
>
{{
$titulos
->
numero_titulo
}}
</
li
>
<
li
><
strong
>
DHC
:
</
strong
>
{{
$titulos
->
dhc
}}
</
li
>
<
li
><
strong
>
DHM
:
</
strong
>
{{
$titulos
->
dhm
}}
</
li
>
<
li
><
strong
>
Lote_id
:
</
strong
>
{{
$titulos
->
lote_id
}}
</
li
>
<
li
><
strong
>
Gleba_id
:
</
strong
>
{{
$titulos
->
gleba_id
}}
</
li
>
<
li
><
strong
>
Ano
Titulo
:
</
strong
>
{{
$titulos
->
ano_titulo
}}
</
li
>
<
li
><
strong
>
MUNICÍPIO
:
</
strong
>
{{
$lotes
->
municipio
->
nome
}}
</
li
>
<
li
><
strong
>
DETENTOR
:
</
strong
>
{{
$lotes
->
proprietario
}}
</
li
>
<
li
><
strong
>
CPF
:
</
strong
>
{{
$lotes
->
cpf
}}
</
li
>
</
ul
>
</
div
>
<
div
class
=
"card-footer"
>
...
...
resources/views/vendor/adminlte/partials/common/brand-logo-xs.blade.php
View file @
1d822319
...
...
@@ -16,7 +16,7 @@
@
endif
>
{{
--
Small
brand
logo
--
}}
<
img
src
=
"{{ asset(config('adminlte.logo_img', '
vendor/adminlte/dist/img/AdminLTELogo
.png')) }}"
<
img
src
=
"{{ asset(config('adminlte.logo_img', '
img/ligoidace
.png')) }}"
alt
=
"{{ config('adminlte.logo_img_alt', 'AdminLTE') }}"
class
=
"{{ config('adminlte.logo_img_class', 'brand-image img-circle elevation-3') }}"
style
=
"opacity:.8"
>
...
...
routes/web.php
View file @
1d822319
...
...
@@ -11,7 +11,8 @@ 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'
);
//->middleware('auth');
// 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'
);
Route
::
resource
(
'lotes'
,
'LoteController'
)
->
middleware
(
'auth'
);
...
...
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