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
cf150342
Commit
cf150342
authored
Aug 27, 2020
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
DatePicker
parent
4592caa2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
48 deletions
+69
-48
DatepickerController.php
app/Http/Controllers/DatepickerController.php
+2
-4
TituloController.php
app/Http/Controllers/TituloController.php
+2
-0
Agendamento.php
app/Models/Agendamento.php
+11
-11
index.blade.php
resources/views/admin/pages/titulos/index.blade.php
+51
-31
web.php
routes/web.php
+3
-2
No files found.
app/Http/Controllers/DatepickerController.php
View file @
cf150342
...
...
@@ -15,11 +15,9 @@ class DatepickerController extends Controller
public
function
datepicker
(
Request
$request
)
{
$datepicker
=
new
Datepicker
();
$datepicker
->
id
=
$request
->
get
(
'id'
);
$datepicker
->
nome
=
$request
->
get
(
'nome'
);
$datepicker
->
cpf
=
$request
->
get
(
'cpf'
);
$datepicker
->
data
=
$request
->
get
(
'data'
);
$datepicker
->
save
();
return
redirect
(
'datepicker'
)
->
with
(
'success'
,
'Agendamento adicionado com sucesso!'
);
// return redirect('datepicker')->with('success', 'Agendamento adicionado com sucesso!');
return
redirect
()
->
back
();
}
}
app/Http/Controllers/TituloController.php
View file @
cf150342
...
...
@@ -28,6 +28,7 @@ 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
();
...
...
@@ -92,6 +93,7 @@ class TituloController extends Controller
public
function
store
(
Request
$request
)
{
return
$request
->
name
;
}
...
...
app/Models/Agendamento.php
View file @
cf150342
...
...
@@ -8,16 +8,16 @@ use Illuminate\Support\Facades\DB;
class
Agendamento
extends
Model
{
protected
$table
=
'agendamento.agendamentos'
;
protected
$fillable
=
[
'
nome'
,
'cpf'
,
'telefone'
,
'servico'
,
'
data'
];
protected
$fillable
=
[
'data'
];
public
function
search
(
$filter
=
null
)
{
$results
=
$this
->
where
(
function
(
$query
)
use
(
$filter
){
if
(
$filter
){
$query
->
where
(
'nome'
,
'LIKE'
,
"%
{
$filter
}
%"
);
}
})
//->toSql();
->
paginate
();
return
$results
;
}
//
public function search($filter = null)
//
{
//
$results = $this->where(function ($query) use ($filter){
//
if($filter){
//
$query->where('nome', 'LIKE', "%{$filter}%");
//
}
//
})//->toSql();
//
->paginate();
//
return $results;
//
}
}
resources/views/admin/pages/titulos/index.blade.php
View file @
cf150342
...
...
@@ -5,32 +5,48 @@
@
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
>
@
foreach
(
$documentosPessoa
as
$documentoPessoa
)
@
foreach
(
$lotes
as
$lote
)
<
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
>
<
h1
>
DADOS
DO
DETENTOR
</
h1
>
<
h2
>
{{
$lote
->
proprietario
}}
</
h1
>
<
h3
>
CPF
:
{{
$documentoPessoa
->
cpf
}}
</
h1
>
{{
--
<
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
(
$lotes
as
$lote
)
<
h1
>
DADOS
DO
DETENTOR
</
h1
>
<
h2
>
{{
$lote
->
proprietario
}}
</
h1
>
<
h3
>
CPF
:
{{
$documentoPessoa
->
cpf
}}
</
h1
>
@
endforeach
@
endforeach
@
endforeach
</
div
>
<!--
<
h1
></
h1
>
-->
<
div
class
=
"card card-outline card-success"
>
<
div
class
=
"card-header"
>
<
h3
class
=
"card-title"
><
b
>
Listagem
dos
Títulos
</
b
></
h3
>
</
div
>
<!--
/.
card
-
header
-->
<
div
class
=
"card-body"
>
<
table
class
=
"table table-striped"
>
<
thead
>
<
tr
align
=
"center"
>
<
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
>
</
tr
>
</
thead
>
...
...
@@ -41,8 +57,10 @@
<
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
>
...
...
@@ -53,29 +71,31 @@
</
tbody
>
</
table
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
'col-sm-6'
>
<
div
class
=
"form-group"
>
<
div
class
=
'input-group date'
id
=
'datetimepicker1'
>
<
input
type
=
'text'
class
=
"form-control datetimepicker"
/>
<
span
class
=
"input-group-addon"
>
<
span
class
=
"glyphicon glyphicon-calendar"
></
span
>
</
span
>
</
div
>
<
form
method
=
"post"
action
=
"{{ route('datepicker') }}"
enctype
=
"multipart/form-data"
>
@
csrf
<
div
class
=
"row"
>
<
div
class
=
"col-md-4"
></
div
>
<
div
class
=
"form-group col-md-4"
>
<
strong
>
Date
:
</
strong
>
<
input
class
=
"date form-control"
type
=
"text"
id
=
"datepicker"
name
=
"data"
>
</
div
>
</
div
>
<
script
type
=
"text/javascript"
>
$
(
function
()
{
$
(
'#datetimepicker1'
)
.
datepicker
();
});
</
script
>
</
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
>
</
div
>
</
div
>
</
form
>
</
div
>
{{
--
<
button
type
=
"submit"
class
=
"btn btn-block btn-primary btn_pesquisa"
>
Agendar
</
button
>
--
}}
<
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
()
!!
}
--
}}
...
...
routes/web.php
View file @
cf150342
...
...
@@ -12,7 +12,7 @@ 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::get('titulos/{id}', 'TituloController@show')->name('titulos.show');//->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'
);
...
...
@@ -21,7 +21,8 @@ Route::any('municipios/search', 'MunicipioController@search')->name('municipios.
Route
::
resource
(
'glebas'
,
'GlebaController'
)
->
middleware
(
'auth'
);
Route
::
any
(
'glebas/search'
,
'GlebaController@search'
)
->
name
(
'glebas.search'
)
->
middleware
(
'auth'
);
//->middleware('auth');
Route
::
get
(
'datepicker'
,
'DatepickerController@create'
)
->
name
(
'datepicker'
);
Route
::
post
(
'datepicker'
,
'DatepickerController@datepicker'
)
->
name
(
'datepicker.datepicker'
);
Route
::
resource
(
'teste'
,
'TesteController'
);
...
...
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