Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Walter Felipe
submeta
Commits
49468eb2
Commit
49468eb2
authored
May 30, 2020
by
Gabriel-31415
Browse files
adicao de opcoes de acessar diferentes perfils
parent
b00ec816
Changes
7
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
49468eb2
...
...
@@ -7,6 +7,12 @@ use Auth;
class
AvaliadorController
extends
Controller
{
public
function
index
(){
return
view
(
'avaliador.index'
);
}
public
function
visualizarTrabalhos
(
Request
$request
){
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
...
...
app/Http/Controllers/ParticipanteController.php
0 → 100644
View file @
49468eb2
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
class
ParticipanteController
extends
Controller
{
public
function
index
(){
return
view
(
'participante.index'
);
}
}
app/Http/Controllers/ProponenteController.php
View file @
49468eb2
...
...
@@ -6,5 +6,8 @@ use Illuminate\Http\Request;
class
ProponenteController
extends
Controller
{
//
public
function
index
(){
return
view
(
'proponente.index'
);
}
}
app/User.php
View file @
49468eb2
...
...
@@ -77,22 +77,22 @@ class User extends Authenticatable implements MustVerifyEmail
return
$this
->
hasMany
(
'App\Evento'
,
'coordenadorId'
);
}
public
function
administradors
(){
return
$this
->
has
Many
(
'App\Administrador'
);
return
$this
->
has
One
(
'App\Administrador'
);
}
public
function
proponentes
(){
return
$this
->
has
Many
(
'App\Proponente'
);
return
$this
->
has
One
(
'App\Proponente'
);
}
public
function
AdministradorResponsavel
(){
return
$this
->
has
Many
(
'App\AdministradorResponsavel'
);
return
$this
->
has
One
(
'App\AdministradorResponsavel'
);
}
public
function
participantes
(){
return
$this
->
has
Many
(
'App\Participante'
);
return
$this
->
has
One
(
'App\Participante'
);
}
public
function
avaliadors
(){
return
$this
->
has
Many
(
'App\Avaliador'
);
return
$this
->
has
One
(
'App\Avaliador'
);
}
public
function
coordenadorComissao
(){
return
$this
->
has
Many
(
'App\CoordenadorComissao'
);
return
$this
->
has
One
(
'App\CoordenadorComissao'
);
}
public
function
sendPasswordResetNotification
(
$token
){
...
...
resources/views/avaliador/index.blade.php
View file @
49468eb2
...
...
@@ -8,7 +8,7 @@
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"col-sm-4 d-flex justify-content-center "
>
<
a
href
=
""
style
=
"text-decoration:none; color: inherit;"
>
<
a
href
=
"
#
"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center "
style
=
"border-radius: 30px; width: 18rem;"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
h2
style
=
"padding-top:15px"
>
Editais
</
h2
>
...
...
resources/views/layouts/app.blade.php
View file @
49468eb2
...
...
@@ -55,12 +55,8 @@
{{--
<a
class=
"nav-link"
data-toggle=
"modal"
data-target=
"#modalCadastro"
>
{{ __('Cadastro') }}
</a>
--}}
</li>
@endif
@else
<!-- Se o usuário for um aluno -->
@if(Auth::user()->tipo == 'administrador')
<li
class=
"nav-item"
>
@else
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
...
...
@@ -87,56 +83,46 @@
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
{{--
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
--}}
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
{{-- Pro-reitor --}}
@if(Auth::user()->tipo == 'administradorResponsavel')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('adminResp.editais')}}"
>
Editais
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{ route('admin.usuarios') }}"
>
Usuários
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('user.perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
@if(Auth::user()->administradors != null)
<a
class=
"dropdown-item"
href=
"{{ route('admin.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Administrador') }}
</a>
@endif
@if(Auth::user()->AdministradorResponsavel != null)
<a
class=
"dropdown-item"
href=
"{{ route('adminResp.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Pro-reitor') }}
</a>
@endif
@if(Auth::user()->coordenadorComissao != null)
<a
class=
"dropdown-item"
href=
"{{ route('coordenador.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Coordenador') }}
</a>
@endif
@if(Auth::user()->avaliadors != null)
<a
class=
"dropdown-item"
href=
"{{ route('avaliador.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Avaliador') }}
</a>
@endif
@if(Auth::user()->proponentes != null)
<a
class=
"dropdown-item"
href=
"{{ route('proponente.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Proponente') }}
</a>
@endif
@if(Auth::user()->participantes != null)
<a
class=
"dropdown-item"
href=
"{{ route('participante.index') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Perfil Participante') }}
</a>
@endif
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
...
...
@@ -150,178 +136,7 @@
</form>
</div>
</li>
@endif
@if(Auth::user()->tipo == 'coordenador')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('coordenador.editais')}}"
>
Meus Editais
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('coordenador.usuarios')}}"
>
Usuários
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('user.perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
@if(Auth::user()->tipo == 'proponente')
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('user.meusTrabalhos')}}"
>
Meus Trabalhos
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('user.perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
@if(Auth::user()->tipo == 'participante' )
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('user.perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
@if(Auth::user()->has('avaliadors'))
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarTrabalho')}}"
>
Trabalhos
</a>
</li>
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('user.perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
@endif
{{--
<li
class=
"nav-item dropdown"
>
<a
id=
"navbarDropdown"
class=
"nav-link dropdown-toggle"
href=
"#"
role=
"button"
data-toggle=
"dropdown"
aria-haspopup=
"true"
aria-expanded=
"false"
v-pre
>
{{ Auth::user()->name }}
<span
class=
"caret"
></span>
</a>
<div
class=
"dropdown-menu dropdown-menu-right"
aria-labelledby=
"navbarDropdown"
>
<a
class=
"dropdown-item"
href=
"{{ route('perfil') }}"
>
<img
src=
"{{asset('img/icons/perfil.svg')}}"
alt=
""
>
{{ __('Minha Conta') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('user.meusTrabalhos') }}"
>
<img
src=
"{{asset('img/icons/file-alt-regular-black.svg')}}"
alt=
""
>
{{ __('Participante') }}
</a>
<a
class=
"dropdown-item"
href=
"{{ route('logout') }}"
onclick=
"event.preventDefault();
document.getElementById('logout-form').submit();"
>
<img
src=
"{{asset('img/icons/sign-out-alt-solid.svg')}}"
alt=
""
>
{{ __('Sair') }}
</a>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
</form>
</div>
</li>
--}}
@endguest
</ul>
</div>
...
...
routes/web.php
View file @
49468eb2
...
...
@@ -53,6 +53,7 @@ Route::post('/usuarios/editar/deletar/{id}', 'AdministradorController@destroy')-
Route
::
get
(
'admin/editais'
,
'AdministradorController@editais'
)
->
middleware
(
'checkAdministrador'
)
->
name
(
'admin.editais'
);
// Rotas de administrador responsavel (Reitor ou pro-reitor)
Route
::
get
(
'adminResp/index'
,
'AdministradorResponsavelController@index'
)
->
name
(
'adminResp.index'
);
Route
::
get
(
'adminResp/editais'
,
'AdministradorResponsavelController@editais'
)
->
name
(
'adminResp.editais'
);
Route
::
get
(
'adminResp/usuarios'
,
'AdministradorResponsavelController@usuarios'
)
->
name
(
'adminResp.usuarios'
);
Route
::
get
(
'adminResp/atribuir'
,
'AdministradorResponsavelController@atribuirPermissao'
)
->
name
(
'adminResp.atribuir'
);
...
...
@@ -88,7 +89,7 @@ Route::post('/naturezas/subarea/excluir/{id}', 'SubAreaController@destroy')->mid
// Rotas Coordenador
Route
::
get
(
'/coordenador/
home
'
,
'CoordenadorComissaoController@index'
)
->
name
(
'coordenador.index'
);
Route
::
get
(
'/coordenador/
index
'
,
'CoordenadorComissaoController@index'
)
->
name
(
'coordenador.index'
);
Route
::
get
(
'/coordenador/editais'
,
'CoordenadorComissaoController@editais'
)
->
name
(
'coordenador.editais'
);
Route
::
get
(
'/coordenador/usuarios'
,
'CoordenadorComissaoController@usuarios'
)
->
name
(
'coordenador.usuarios'
);
Route
::
get
(
'/coordenador/listarCoord'
,
'CoordenadorComissaoController@coordenadorComite'
)
->
name
(
'coordenador.coord'
);
...
...
@@ -102,8 +103,15 @@ Route::post('/coordenador/atribuirAvaliadorTrabalho', 'TrabalhoController@atribu
Route
::
post
(
'/coordenador/atribuir'
,
'TrabalhoController@atribuir'
)
->
name
(
'coordenador.atribuir'
);
// Rotas Avaliador
Route
::
get
(
'/avaliador/index'
,
'AvaliadorController@index'
)
->
name
(
'avaliador.index'
);
Route
::
get
(
'/avaliador/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
//Proponente
Route
::
get
(
'/proponente/index'
,
'ProponenteController@index'
)
->
name
(
'proponente.index'
);
//Participante
Route
::
get
(
'/participante/index'
,
'ParticipanteController@index'
)
->
name
(
'participante.index'
);
Route
::
group
([
'middleware'
=>
[
'isTemp'
,
'auth'
,
'verified'
]],
function
(){
...
...
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