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
c93296a3
Commit
c93296a3
authored
Aug 29, 2020
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agendamento funcionando
parent
cf150342
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
127 additions
and
66 deletions
+127
-66
DatepickerController.php
app/Http/Controllers/DatepickerController.php
+3
-1
TituloController.php
app/Http/Controllers/TituloController.php
+36
-19
Datepicker.php
app/Models/Datepicker.php
+1
-0
Lote.php
app/Models/Lote.php
+8
-8
Processo.php
app/Models/Processo.php
+3
-3
index.blade.php
resources/views/admin/pages/titulos/index.blade.php
+28
-32
show.blade.php
resources/views/admin/pages/titulos/show.blade.php
+2
-3
dadosAtendimento.blade.php
resources/views/dadosAtendimento.blade.php
+42
-0
web.php
routes/web.php
+4
-0
No files found.
app/Http/Controllers/DatepickerController.php
View file @
c93296a3
...
...
@@ -14,10 +14,12 @@ class DatepickerController extends Controller
public
function
datepicker
(
Request
$request
)
{
$datepicker
=
new
Datepicker
();
$datepicker
->
data
=
$request
->
get
(
'data'
);
// $datepicker->cpf = $request->get('cpf');
$datepicker
->
save
();
// return redirect('datepicker')->with('success', 'Agendamento adicionado com sucesso!');
return
redirect
()
->
back
();
// return view('dadosAtendimento');
}
}
app/Http/Controllers/TituloController.php
View file @
c93296a3
...
...
@@ -3,6 +3,7 @@
namespace
App\Http\Controllers
;
use
App\Http\Requests\StoreUpdateTituloRequest
;
use
App\Models\Agendamento
;
use
App\Models\DocumentoPessoa
;
use
App\Models\Lote
;
use
App\Models\LoteTramite
;
...
...
@@ -28,12 +29,16 @@ 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'
)
->
get
();
$lotes
=
Lote
::
where
(
'id'
,
$pessoaLote
->
lote_id
)
->
with
(
'lotesTramites'
,
'municipio'
,
'situacaoJuridica'
,
'pessoaLote'
,
'formasObtencao'
,
'processos'
)
->
get
();
dd
(
$lotes
);
foreach
(
$lotes
as
$lote
)
{
$lotesTramites
=
LoteTramite
::
where
(
'lote_id'
,
$lote
->
id
)
->
get
();
foreach
(
$lotesTramites
as
$loteTramite
)
{
...
...
@@ -42,23 +47,27 @@ class TituloController extends Controller
->
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
,
]
);
$agendamentos
=
Agendamento
::
get
()
->
last
();
//dd($agendamentos);
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
,
]
);
}
}
}
}
...
...
@@ -93,7 +102,7 @@ class TituloController extends Controller
public
function
store
(
Request
$request
)
{
return
$request
->
name
;
}
...
...
@@ -120,6 +129,14 @@ class TituloController extends Controller
'titulos'
=>
$titulos
,
]);
}
if
(
!
$agendamentos
=
Agendamento
::
get
()
->
last
())
{
return
redirect
()
->
back
();
}
else
{
return
view
(
'admin.pages.titulos.show'
,
[
'agendamentos'
=>
$agendamentos
,
]);
}
}
/**
...
...
app/Models/Datepicker.php
View file @
c93296a3
...
...
@@ -7,4 +7,5 @@ use Illuminate\Database\Eloquent\Model;
class
Datepicker
extends
Model
{
protected
$table
=
'agendamento.agendamentos'
;
}
app/Models/Lote.php
View file @
c93296a3
...
...
@@ -7,19 +7,19 @@ use Illuminate\Database\Eloquent\Model;
class
Lote
extends
Model
{
protected
$table
=
'sige.lotes'
;
protected
$fillable
=
[
'id'
,
'area'
,
'ativo'
,
'criado_por_id'
,
'dhc'
,
'dhm'
,
'modificado_por_id'
,
'municipio_id'
,
'nome'
,
'numero'
,
'perimetro'
,
'proprietario'
,
'situacao_juridica_id'
,
'titulo'
,
'sncr'
,
'cpf'
,
'protocolo'
,
'is_aprovado'
,
'data_termino_periodo_de_uso'
,
'status_estrutura'
,
'status_pessoa'
,
'status_uso'
,
'comunidade'
,
'localidade'
,
'projeto_especial'
,
'cnpj'
,
'status_titulo'
,
'migrado_para_access'
,
'cod_imo_rur'
];
//
protected $fillable = ['id', 'area', 'ativo', 'criado_por_id', 'dhc', 'dhm', 'modificado_por_id',
//
'municipio_id', 'nome', 'numero', 'perimetro', 'proprietario', 'situacao_juridica_id',
//
'titulo', 'sncr', 'cpf', 'protocolo', 'is_aprovado', 'data_termino_periodo_de_uso',
//
'status_estrutura', 'status_pessoa', 'status_uso', 'comunidade', 'localidade', 'projeto_especial',
//
'cnpj', 'status_titulo', 'migrado_para_access', 'cod_imo_rur'];
// public function titulos(){
// return $this->hasMany(Titulo::class, 'lote_id', 'id');
// }
public
function
secUser
(){
return
$this
->
belongsTo
(
SecUser
::
class
);
}
//
public function secUser(){
//
return $this->belongsTo(SecUser::class);
//
}
public
function
municipio
()
{
...
...
app/Models/Processo.php
View file @
c93296a3
...
...
@@ -7,9 +7,9 @@ use Illuminate\Database\Eloquent\Model;
class
Processo
extends
Model
{
protected
$table
=
'sige.processos'
;
protected
$fillable
=
[
'id'
,
'ativo'
,
'criado_por_id'
,
'descricao'
,
'dhc'
,
'dhm'
,
'etapa_id'
,
'lote_id'
,
'modificado_por_id'
,
'pendencia_id'
,
'sem_pendencia'
,
'situacao'
,
'conferido'
,
'data_conferencia'
,
'conferido_por_id'
];
//
protected $fillable = ['id', 'ativo', 'criado_por_id', 'descricao', 'dhc', 'dhm', 'etapa_id', 'lote_id',
//
'modificado_por_id', 'pendencia_id', 'sem_pendencia', 'situacao', 'conferido',
//
'data_conferencia', 'conferido_por_id'];
public
function
search
(
$filter
=
null
)
{
...
...
resources/views/admin/pages/titulos/index.blade.php
View file @
c93296a3
...
...
@@ -5,12 +5,11 @@
@
section
(
'content_header'
)
@
endsection
@
section
(
'content'
)
<
link
href
=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
rel
=
"stylesheet"
>
<
link
href
=
"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css"
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
>
<
link
href
=
"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
rel
=
"stylesheet"
>
<
link
href
=
"https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.5.0/css/bootstrap-datepicker.css"
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"
>
...
...
@@ -40,35 +39,35 @@
<
div
class
=
"card-body"
>
<
table
class
=
"table table-striped"
>
<
thead
>
<
tr
align
=
"center"
>
<
tr
>
<
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
>
<
th
>
DATA
</
th
>
<
th
>
ID
</
th
>
{{
--
<
th
width
=
"100"
>
AÇÕES
</
th
>
--
}}
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
@
foreach
(
$lotes
as
$lote
)
@
foreach
(
$titulos
as
$titulo
)
<
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
>
</
td
>
</
tr
>
@
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
>
</
tr
>
@
endif
@
endforeach
@
endforeach
@
endforeach
</
tbody
>
</
table
>
<
div
class
=
"container"
>
<
form
method
=
"post"
action
=
"{{ route('datepicker') }}"
enctype
=
"multipart/form-data"
>
...
...
@@ -78,27 +77,24 @@
<
div
class
=
"form-group col-md-4"
>
<
strong
>
Date
:
</
strong
>
<
input
class
=
"date form-control"
type
=
"text"
id
=
"datepicker"
name
=
"data"
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-4"
></
div
>
<
div
class
=
"form-group col-md-4"
style
=
"margin-top:60px"
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
Submit
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-success"
>
AGENDAR
</
button
>
<
a
href
=
"{{ route('titulos.show', $ ->id) }}"
class
=
"badge bg-green"
>
DADOS
DO
ATENDIMENTO
</
a
>
</
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
({
autoclose
:
true
,
format
:
'dd/mm/yyyy'
});
</
script
>
{{
--
<
button
type
=
"submit"
class
=
"btn btn-block btn-primary btn_pesquisa"
>
Agendar
</
button
>
--
}}
</
div
>
<
div
class
=
"card-footer"
>
{{
--
{
!!
$titulos
->
appends
(
$filters
)
->
links
()
!!
}
--
}}
</
div
>
</
div
>
@
endsection
resources/views/admin/pages/titulos/show.blade.php
View file @
c93296a3
...
...
@@ -16,7 +16,6 @@
<
img
class
=
"logoidace"
src
=
"{{ asset('img/logo-idace.png') }}"
>
<
h1
class
=
"titulo"
>
Dados
do
atendimento
</
h1
>
<
h4
class
=
"titulo2"
>
Município
:
<
strong
>
{{
$lotes
->
municipio
->
nome
}}
</
strong
></
h4
>
<
h4
class
=
"titulo2"
>
Detentor
:
<
strong
>
{{
$lotes
->
proprietario
}}
</
strong
></
h4
>
<
h4
class
=
"titulo2"
>
CPF
:
<
strong
>
{{
$lotes
->
cpf
}}
</
strong
></
h4
>
<
div
class
=
"row"
>
...
...
@@ -26,12 +25,12 @@
</
div
>
<
div
class
=
"col-sm-6"
style
=
"text-align:center;font-size:23px;"
>
<
h4
class
=
"titulo2"
>
Horário
:<
strong
>
09
:
30
AM
-
10
:
00
AM
</
strong
></
h4
>
{{
--
<
h4
class
=
"titulo2"
>
Horário
:<
strong
>
09
:
30
AM
-
10
:
00
AM
</
strong
></
h4
>
--
}}
</
div
>
</
div
>
<
h4
class
=
"titulo2"
>
Número
do
Atendimento
:
<
strong
>
423566
</
strong
></
h4
>
{{
--
<
h4
class
=
"titulo2"
>
Número
do
Atendimento
:
<
strong
>
423566
</
strong
></
h4
>
--
}}
<!--
general
form
elements
-->
...
...
resources/views/dadosAtendimento.blade.php
0 → 100644
View file @
c93296a3
@
extends
(
'adminlte::page'
)
@
section
(
'title'
,
'CPF Inválido'
)
@
section
(
'content'
)
<
form
action
=
"{{ route('agendamentos.index',
$lote->id
) }}"
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"
>
Agendamento
realizado
com
sucesso
</
h1
>
<!--
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
routes/web.php
View file @
c93296a3
...
...
@@ -38,6 +38,10 @@ Route::get('/home', 'HomeController@index')->name('home');
// return view('teste');
// });
Route
::
get
(
'/dadosAtendimento'
,
function
()
{
return
view
(
'dadosAtendimento'
);
})
->
name
(
'dadosAtendimento'
);
Route
::
get
(
'/cpfinvalido'
,
function
()
{
return
view
(
'cpfInvalido'
);
})
->
name
(
'cpfinvalido'
);
...
...
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