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
b00ec816
Commit
b00ec816
authored
May 29, 2020
by
Gabriel-31415
Browse files
listar trabalhos de avaliador
parent
94275bdd
Changes
8
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
0 → 100644
View file @
b00ec816
<?php
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
Auth
;
class
AvaliadorController
extends
Controller
{
public
function
visualizarTrabalhos
(
Request
$request
){
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
//dd($trabalhos);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
]);
}
}
app/Http/Controllers/HomeController.php
View file @
b00ec816
...
@@ -39,6 +39,9 @@ class HomeController extends Controller
...
@@ -39,6 +39,9 @@ class HomeController extends Controller
else
if
(
Auth
::
user
()
->
tipo
==
'proponente'
)
{
else
if
(
Auth
::
user
()
->
tipo
==
'proponente'
)
{
return
view
(
'proponente.index'
);
return
view
(
'proponente.index'
);
}
}
else
if
(
Auth
::
user
()
->
has
(
'avaliadors'
))
{
return
view
(
'avaliador.index'
);
}
else
if
(
Auth
::
user
()
->
tipo
==
'participante'
)
{
else
if
(
Auth
::
user
()
->
tipo
==
'participante'
)
{
return
view
(
'participante.index'
);
return
view
(
'participante.index'
);
}
}
...
...
app/Policies/UsuariosPolicy.php
0 → 100644
View file @
b00ec816
<?php
namespace
App\Policies
;
use
App\User
;
use
App\Evento
;
use
App\CoordenadorComissao
;
use
App\AdministradorResponsavel
;
use
Illuminate\Auth\Access\HandlesAuthorization
;
class
UsuariosPolicy
{
use
HandlesAuthorization
;
/**
* Create a new policy instance.
*
* @return void
*/
public
function
__construct
()
{
}
public
function
isUser
(
User
$user
){
if
(
$user
->
has
(
''
)){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
else
if
(){
}
}
}
resources/views/avaliador/editais.blade.php
0 → 100644
View file @
b00ec816
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
<
div
class
=
"col-sm-2"
>
<
a
href
=
"
{
{route('evento.criar')}
}
"
class
=
"btn btn-primary"
>
Criar
Edital
</
a
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$eventos
as
$evento
)
<
tr
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
</
a
>
</
td
>
<
td
>
10
/
05
/
2020
</
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
{{
--
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
--
}}
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('coord.detalhesEvento', ['eventoId' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Detalhes
</
a
>
<
a
href
=
"
{
{route('evento.editar',$evento->id)}
}
"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/edit-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Editar
</
a
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
>
{{
csrf_field
()
}}
{{
method_field
(
'DELETE'
)
}}
<
button
type
=
"submit"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/trash-alt-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Deletar
</
button
>
</
form
>
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
resources/views/avaliador/index.blade.php
0 → 100644
View file @
b00ec816
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
>
<
h2
style
=
"margin-top: 100px; "
>
{{
Auth
()
->
user
()
->
name
}}
</
h2
>
<
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;"
>
<
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
>
</
div
>
</
div
>
</
a
>
</
div
>
<
div
class
=
"col-sm-4 d-flex justify-content-center"
>
<
a
href
=
"{{ route('visualizarTrabalho') }}"
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"
>
Trabalhos
</
h2
>
</
div
>
</
div
>
</
a
>
</
div
>
<
div
class
=
"col-sm-4 d-flex justify-content-center"
>
<
a
href
=
"{{ route('admin.usuarios') }}"
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"
>
Usuários
</
h2
>
</
div
>
</
div
>
</
a
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/avaliador/listarTrabalhos.blade.php
0 → 100644
View file @
b00ec816
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Trabalhos
</
h3
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Projeto
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Baixar
</
th
>
<
th
scope
=
"col"
>
Parecer
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$trabalhos
as
$trabalho
)
<
tr
>
<
td
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
>
{{
$trabalho
->
create_at
}}
</
td
>
<
td
>
baixar
</
td
>
<
td
>
parecer
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
resources/views/layouts/app.blade.php
View file @
b00ec816
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
</div>
</div>
</li>
</li>
@endif
@endif
@if(Auth::user()->tipo == 'participante')
@if(Auth::user()->tipo == 'participante'
)
<li
class=
"nav-item"
>
<li
class=
"nav-item"
>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
<a
class=
"nav-link"
href=
"{{route('visualizarEvento')}}"
>
Home
</a>
</li>
</li>
...
@@ -255,6 +255,41 @@
...
@@ -255,6 +255,41 @@
</a>
</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;"
>
<form
id=
"logout-form"
action=
"{{ route('logout') }}"
method=
"POST"
style=
"display: none;"
>
@csrf
@csrf
</form>
</form>
...
...
routes/web.php
View file @
b00ec816
...
@@ -101,6 +101,8 @@ Route::post('/coordenador/retornoDetalhes', 'CoordenadorComissaoController@retor
...
@@ -101,6 +101,8 @@ Route::post('/coordenador/retornoDetalhes', 'CoordenadorComissaoController@retor
Route
::
post
(
'/coordenador/atribuirAvaliadorTrabalho'
,
'TrabalhoController@atribuirAvaliadorTrabalho'
)
->
name
(
'coordenador.atribuirAvaliadorTrabalho'
);
Route
::
post
(
'/coordenador/atribuirAvaliadorTrabalho'
,
'TrabalhoController@atribuirAvaliadorTrabalho'
)
->
name
(
'coordenador.atribuirAvaliadorTrabalho'
);
Route
::
post
(
'/coordenador/atribuir'
,
'TrabalhoController@atribuir'
)
->
name
(
'coordenador.atribuir'
);
Route
::
post
(
'/coordenador/atribuir'
,
'TrabalhoController@atribuir'
)
->
name
(
'coordenador.atribuir'
);
// Rotas Avaliador
Route
::
get
(
'/avaliador/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
Route
::
group
([
'middleware'
=>
[
'isTemp'
,
'auth'
,
'verified'
]],
function
(){
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