Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sisage
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
sisage
Commits
808717ff
Commit
808717ff
authored
Jan 26, 2021
by
Marcos Albano
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adicionada Rota de agendamento titulo
parent
06076e8a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
75 additions
and
45 deletions
+75
-45
AgendamentoController.php
app/Http/Controllers/Admin/AgendamentoController.php
+3
-24
UserController.php
app/Http/Controllers/Admin/UserController.php
+53
-5
AgendamentoRepositoryInterface.php
...Repositories/Contracts/AgendamentoRepositoryInterface.php
+1
-1
UserRepositoryInterface.php
app/Repositories/Contracts/UserRepositoryInterface.php
+2
-1
agendamentoTituloSede.blade.php
.../views/admin/agendamentos/agendamentoTituloSede.blade.php
+1
-2
web.php
routes/web.php
+15
-12
No files found.
app/Http/Controllers/Admin/AgendamentoController.php
View file @
808717ff
...
...
@@ -3,7 +3,9 @@
namespace
App\Http\Controllers\Admin
;
use
App\Http\Controllers\Controller
;
use
App\Models\Agendamento
;
use
App\Models\DocumentoPessoa
;
use
App\Models\User
;
use
App\Repositories\Contracts\AgendamentoRepositoryInterface
;
use
Illuminate\Http\Request
;
use
Illuminate\Support\Facades\Validator
as
FacadesValidator
;
...
...
@@ -223,29 +225,6 @@ class AgendamentoController extends Controller
return
redirect
()
->
route
(
$routeName
.
'.index'
);
}
public
function
pesquisaTitulo
(
Request
$request
)
{
$columnList
=
[
'id'
=>
'#'
,
'municipio'
=>
trans
(
'agendamento.municipio'
),
'detentor'
=>
trans
(
'agendamento.name'
),
'cpf'
=>
trans
(
'agendamento.cpf'
),
'titulo'
=>
trans
(
'agendamento.titulo'
),
'nome_mae'
=>
trans
(
'agendamento.nome_mae'
),
'data'
=>
trans
(
'agendamento.data'
),
'hora'
=>
trans
(
'agendamento.hora'
),
'escritorio'
=>
trans
(
'agendamento.escritorio'
)];
$page
=
trans
(
'agendamento.agendamento_list'
);
$data
=
$request
->
all
();
$routeName
=
$this
->
route
;
$list
=
$this
->
model
->
paginate
(
$this
->
paginate
);
$breadcrumb
=
[
(
object
)
[
'url'
=>
route
(
'home'
),
'title'
=>
trans
(
'agendamento.home'
)],
(
object
)
[
'url'
=>
''
,
'title'
=>
trans
(
'agendamento.list'
,
[
'page'
=>
$page
])],
];
return
view
(
'admin.'
.
$routeName
.
'.pesquisaTitulo'
,
[
'page'
=>
$page
,
'columnList'
=>
$columnList
,
'routeName'
=>
$routeName
,
'list'
=>
$list
,
'breadcrumb'
=>
$breadcrumb
]);
}
}
app/Http/Controllers/Admin/UserController.php
View file @
808717ff
...
...
@@ -3,12 +3,14 @@
namespace
App\Http\Controllers\Admin
;
use
App\Http\Controllers\Controller
;
use
App\Models\DocumentoPessoa
;
use
App\Models\Lote
;
use
App\Models\User
;
use
App\Repositories\Contracts\UserRepositoryInterface
;
use
Illuminate\Http\Request
;
use
Illuminate\Validation\Rule
;
use
Illuminate\Support\Facades\Hash
;
use
Illuminate\Support\Facades\Validator
as
FacadesValidator
;
use
Illuminate\Validation\Rule
;
class
UserController
extends
Controller
{
...
...
@@ -31,7 +33,7 @@ class UserController extends Controller
$columnList
=
[
'id'
=>
'#'
,
'nome'
=>
trans
(
'agendamento.name'
),
'email'
=>
trans
(
'agendamento.email'
),
'cpf'
=>
trans
(
'agendamento.cpf'
),
'sobrenome'
=>
trans
(
'agendamento.sobrenome'
),
'telefone'
=>
trans
(
'agendamento.telefone'
),
'data_nascimento'
=>
trans
(
'agendamento.data_nascimento'
)
'data_nascimento'
=>
trans
(
'agendamento.data_nascimento'
)
,
];
$page
=
trans
(
'agendamento.user_list'
);
...
...
@@ -53,7 +55,7 @@ class UserController extends Controller
return
view
(
'admin.'
.
$routeName
.
'.index'
,
[
'list'
=>
$list
,
'search'
=>
$search
,
'page'
=>
$page
,
'routeName'
=>
$routeName
,
'columnList'
=>
$columnList
,
'breadcrumb'
=>
$breadcrumb
'page'
=>
$page
,
'routeName'
=>
$routeName
,
'columnList'
=>
$columnList
,
'breadcrumb'
=>
$breadcrumb
,
]);
}
...
...
@@ -100,6 +102,7 @@ class UserController extends Controller
]);
$documentosPessoa
=
Lote
::
where
(
'cpf'
,
$data
[
'cpf'
])
->
first
();
if
(
$documentosPessoa
)
{
$this
->
model
->
create
(
$data
);
session
()
->
flash
(
'msg'
,
trans
(
'agendamento.record_added_successfully'
));
...
...
@@ -198,8 +201,6 @@ class UserController extends Controller
'data_nascimento'
=>
'required'
,
]);
if
(
$this
->
model
->
update
(
$data
,
$id
))
{
session
()
->
flash
(
'msg'
,
trans
(
'agendamento.successfully_edited_record'
));
session
()
->
flash
(
'status'
,
'success'
);
// success error notification
...
...
@@ -230,4 +231,51 @@ class UserController extends Controller
$routeName
=
$this
->
route
;
return
redirect
()
->
route
(
$routeName
.
'.index'
);
}
public
function
pesquisaTitulo
()
{
$columnList
=
[
'id'
=>
'#'
,
'municipio'
=>
trans
(
'agendamento.municipio'
),
'detentor'
=>
trans
(
'agendamento.name'
),
'cpf'
=>
trans
(
'agendamento.cpf'
),
'titulo'
=>
trans
(
'agendamento.titulo'
),
'nome_mae'
=>
trans
(
'agendamento.nome_mae'
),
'data'
=>
trans
(
'agendamento.data'
),
'hora'
=>
trans
(
'agendamento.hora'
),
'escritorio'
=>
trans
(
'agendamento.escritorio'
)];
$page
=
trans
(
'agendamento.agendamento_list'
);
$page_create
=
trans
(
'agendamento.agendamento'
);
$routeName
=
$this
->
route
;
$list
=
$this
->
model
->
paginate
(
$this
->
paginate
);
$breadcrumb
=
[
(
object
)
[
'url'
=>
route
(
'home'
),
'title'
=>
trans
(
'agendamento.home'
)],
(
object
)
[
'url'
=>
''
,
'title'
=>
trans
(
'agendamento.list'
,
[
'page'
=>
$page
])],
];
// $listUsers = $this->model->all();
// foreach ($listUsers as $user) {
// $documentosPessoa = DocumentoPessoa::where('cpf', $user->cpf)->with('pessoa')->first();
// //dd($documentosPessoa->cpf);
// if($user->cpf == $documentosPessoa->cpf){
// // dd("CPFS IGUAIS");
// echo $user->cpf;
// echo $documentosPessoa->cpf;
// dd("OK");
// }else{
// dd("CPFS DIFERENTES");
// }
// //dd($documentosPessoa);
// //$listUser = $this->model->findWhereLike(['cpf'], $user->cpf);
// //dd($user->cpf);
// }
// $documentosPessoa = DocumentoPessoa::where('cpf', $user->cpf)->with('pessoa')->get();
// foreach ($documentosPessoa as $docPessoa) {
// echo $docPessoa;
// }
// //echo $listUser;
return
view
(
'admin.agendamentos.agendamentoTitulo'
,
[
'page'
=>
$page
,
'columnList'
=>
$columnList
,
'routeName'
=>
$routeName
,
'list'
=>
$list
,
'page_create'
=>
$page_create
,
'breadcrumb'
=>
$breadcrumb
]);
}
}
app/Repositories/Contracts/AgendamentoRepositoryInterface.php
View file @
808717ff
...
...
@@ -6,7 +6,7 @@ interface AgendamentoRepositoryInterface
{
public
function
all
(
string
$column
=
'id'
,
string
$order
=
'ASC'
);
public
function
paginate
(
int
$paginate
=
10
,
string
$column
=
'id'
,
string
$order
=
'ASC'
);
public
function
findWhereLike
(
array
$columns
,
string
$search
,
string
$column
=
'
id'
,
string
$order
=
'ASC
'
);
public
function
findWhereLike
(
array
$columns
,
string
$search
,
string
$column
=
'
cpf
'
);
public
function
create
(
array
$data
);
public
function
find
(
int
$id
);
public
function
update
(
array
$data
,
int
$id
);
...
...
app/Repositories/Contracts/UserRepositoryInterface.php
View file @
808717ff
...
...
@@ -4,9 +4,10 @@ namespace App\Repositories\Contracts;
interface
UserRepositoryInterface
{
public
function
all
(
string
$column
=
'
id'
,
string
$order
=
'ASC
'
);
public
function
all
(
string
$column
=
'
cpf
'
);
public
function
paginate
(
int
$paginate
=
10
,
string
$column
=
'id'
,
string
$order
=
'ASC'
);
public
function
findWhereLike
(
array
$columns
,
string
$search
,
string
$column
=
'id'
,
string
$order
=
'ASC'
);
public
function
findWhere
(
array
$columns
,
string
$search
);
public
function
create
(
array
$data
);
public
function
find
(
int
$id
);
public
function
update
(
array
$data
,
int
$id
);
...
...
resources/views/admin/agendamentos/agendamentoTituloSede.blade.php
View file @
808717ff
...
...
@@ -17,8 +17,7 @@
<
fieldset
class
=
"calendario"
>
<
input
type
=
"date"
id
=
"data"
name
=
"dataAgendamento"
>
<
br
>
<
button
class
=
"enviarbtn"
onclick
=
"window.location = '{{ route('agendamentoTituloSede') }}'"
>@
lang
(
'agendamento.next'
)
</
button
>
<
button
class
=
"enviarbtn"
onclick
=
"window.location = '{{ route('agendamentoTituloSede') }}'"
>@
lang
(
'agendamento.next'
)
</
button
>
</
fieldset
>
@
endform
...
...
routes/web.php
View file @
808717ff
...
...
@@ -37,11 +37,12 @@ Auth::routes();
Route
::
get
(
'/home'
,
'HomeController@index'
)
->
name
(
'home'
);
Route
::
prefix
(
'admin'
)
->
namespace
(
'Admin'
)
->
group
(
function
()
{
Route
::
prefix
(
'admin'
)
->
middleware
(
'auth'
)
->
namespace
(
'Admin'
)
->
group
(
function
()
{
Route
::
resource
(
'/users'
,
'UserController'
);
Route
::
resource
(
'/permissions'
,
'PermissionController'
);
Route
::
resource
(
'/roles'
,
'RoleController'
);
Route
::
resource
(
'/agendamentos'
,
'AgendamentoController'
);
Route
::
get
(
'/pesquisaTitulo'
,
'UserController@pesquisaTitulo'
)
->
name
(
'pesquisaTitulo'
);
});
//Rotas de Agendamento
...
...
@@ -120,19 +121,21 @@ Route::any('/agendamentoContato', function () {
})
->
name
(
'agendamentoContato'
);
Route
::
any
(
'/pesquisaTitulo'
,
function
()
{
$routeName
=
'agendamentos'
;
$page
=
trans
(
'agendamento.agendamento_list'
);
$page_create
=
trans
(
'agendamento.agendamento'
);
$breadcrumb
=
[
(
object
)
[
'url'
=>
route
(
'home'
),
'title'
=>
trans
(
'agendamento.home'
)],
(
object
)
[
'url'
=>
route
(
$routeName
.
'.index'
),
'title'
=>
trans
(
'agendamento.list'
,
[
'page'
=>
$page
])],
(
object
)
[
'url'
=>
''
,
'title'
=>
trans
(
'agendamento.create_crud'
,
[
'page'
=>
$page_create
])],
];
return
view
(
'admin.'
.
$routeName
.
'.pesquisaTitulo'
,
[
'page'
=>
$page
,
'page_create'
=>
$page_create
,
'routeName'
=>
$routeName
,
'breadcrumb'
=>
$breadcrumb
]);
// Route::any('/pesquisaTitulo', function() {
// $routeName = 'agendamentos';
// $page = trans('agendamento.agendamento_list');
// $page_create = trans('agendamento.agendamento');
// $breadcrumb = [
// (object) ['url' => route('home'), 'title' => trans('agendamento.home')],
// (object) ['url' => route($routeName . '.index'), 'title' => trans('agendamento.list', ['page' => $page])],
// (object) ['url' => '', 'title' => trans('agendamento.create_crud', ['page' => $page_create])],
// ];
// return view('admin.agendamentos.pesquisaTitulo', ['page' => $page, 'page_create' => $page_create, 'routeName' => $routeName, 'breadcrumb' => $breadcrumb]);
})
->
name
(
'pesquisaTitulo'
);
//
})->name('pesquisaTitulo');
//->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