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
7e6eec6f
Commit
7e6eec6f
authored
Jul 26, 2021
by
José Rômulo
Browse files
Remover atribuição de projeto/ Vizualizar parecer
parent
5853372c
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
7e6eec6f
...
...
@@ -52,14 +52,19 @@ class AdministradorController extends Controller
public
function
pareceres
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$evento
->
trabalhos
->
where
(
'status'
,
'Submetido'
);;
$trabalhosSubmetidos
=
$evento
->
trabalhos
->
where
(
'status'
,
'submetido'
);
$trabalhosAvaliados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'avaliado'
);
$trabalhos
=
$trabalhosSubmetidos
->
merge
(
$trabalhosAvaliados
);
return
view
(
'administrador.projetos'
)
->
with
([
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
public
function
analisar
(
Request
$request
){
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$evento
->
trabalhos
->
where
(
'status'
,
'Submetido'
);
$trabalhosSubmetidos
=
$evento
->
trabalhos
->
where
(
'status'
,
'submetido'
);
$trabalhosAvaliados
=
$evento
->
trabalhos
->
Where
(
'status'
,
'avaliado'
);
$trabalhos
=
$trabalhosSubmetidos
->
merge
(
$trabalhosAvaliados
);
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
// $participantes = Participante::where('trabalho_id', $id)->get();
// $participantesUsersIds = Participante::where('trabalho_id', $id)->select('user_id')->get();
...
...
@@ -433,6 +438,16 @@ class AdministradorController extends Controller
}
public
function
removerProjAval
(
Request
$request
){
$aval
=
Avaliador
::
where
(
'id'
,
$request
->
avaliador_id
)
->
first
();
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
trabalho_id
)
->
first
();
$aval
->
trabalhos
()
->
detach
(
$trabalho
);
$aval
->
save
();
return
redirect
()
->
back
();
}
public
function
buscar
(
Request
$request
){
$trabalho
=
Trabalho
::
where
(
'id'
,
$request
->
item
)
->
first
();
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
7e6eec6f
...
...
@@ -112,7 +112,8 @@
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Usuário
</
th
>
<
th
scope
=
"col"
>
E
-
mail
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Titulo
do
projeto
</
th
>
<
th
scope
=
"col"
>
Status
avaliação
</
th
>
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
</
tr
>
</
thead
>
...
...
@@ -123,13 +124,32 @@
@
if
(
$trabalho
->
pivot
->
status
==
true
)
@
php
$contador
++
;
@
endphp
@
endif
@
endforeach
<
tr
>
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$contador
}}
/
{{
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
}}
</
td
>
<
td
style
=
"text-align:center"
>
...
</
td
>
<
td
>
{{
$trabalho
->
titulo
}}
</
td
>
{{
--
<
td
>
{{
$contador
}}
/
{{
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
}}
</
td
>
--
}}
<
td
>@
if
(
$trabalho
->
pivot
->
parecer
==
null
)
Pendente
@
else
Avaliado
@
endif
</
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"
>
@
if
(
$trabalho
->
pivot
->
parecer
!=
null
)
<
a
href
=
"{{ route('admin.visualizarParecer', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
]) }}"
class
=
"dropdown-item text-center"
>
Vizualizar
Parecer
</
a
>
@
else
<
a
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
]) }}"
class
=
"dropdown-item text-center"
>
Desatribuir
Avaliador
</
a
>
@
endif
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
@
endforeach
</
tbody
>
</
table
>
...
...
resources/views/administrador/visualizarParecer.blade.php
View file @
7e6eec6f
...
...
@@ -7,6 +7,7 @@
<
div
class
=
"col-sm-12"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
<
div
class
=
"card-body"
>
<
a
href
=
"
{
{url()->previous()}
}
"
class
=
"btn btn-primary mb-2"
>
Voltar
</
a
>
<
h5
class
=
"card-title"
>
Parecer
do
avaliador
:
{{
$avaliador
->
user
->
name
}}
</
h5
>
<
h6
class
=
"card-title"
>
Trabalho
:
{{
$trabalho
->
titulo
}}
</
h6
>
<
p
class
=
"card-text"
>
...
...
@@ -23,8 +24,6 @@
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
div
>
<
a
href
=
"
{
{url()->previous()}
}
"
class
=
"btn btn-primary"
>
Voltar
</
a
>
</
div
>
</
div
>
</
div
>
...
...
routes/web.php
View file @
7e6eec6f
...
...
@@ -173,10 +173,12 @@ Route::prefix('usuarios')->name('admin.')->group(function(){
Route
::
get
(
'/selecionarProjetos'
,
'AdministradorController@projetos'
)
->
name
(
'projetos'
);
Route
::
post
(
'/adicionarAvalEvento'
,
'AdministradorController@adicionar'
)
->
name
(
'adicionar'
);
Route
::
post
(
'/removerAvalEvento'
,
'AdministradorController@remover'
)
->
name
(
'remover'
);
Route
::
get
(
'/removerProjAval'
,
'AdministradorController@removerProjAval'
)
->
name
(
'removerProjAval'
);
Route
::
post
(
'/atribuirAvaliadorProjeto'
,
'AdministradorController@atribuicaoProjeto'
)
->
name
(
'atribuicao.projeto'
);
Route
::
post
(
'/enviarConviteAvaliador'
,
'AdministradorController@enviarConvite'
)
->
name
(
'enviarConvite'
);
Route
::
post
(
'/reenviarConviteAvaliador'
,
'AdministradorController@reenviarConvite'
)
->
name
(
'reenviarConvite'
);
Route
::
post
(
'/visualizarParecer'
,
'AdministradorController@visualizarParecer'
)
->
name
(
'visualizarParecer'
);
Route
::
get
(
'/visualizarParecer'
,
'AdministradorController@visualizarParecer'
)
->
name
(
'visualizarParecer'
);
Route
::
get
(
'/pareceresProjetos'
,
'AdministradorController@pareceres'
)
->
name
(
'pareceres'
);
Route
::
get
(
'/analisarProjetos'
,
'AdministradorController@analisar'
)
->
name
(
'analisar'
);
Route
::
get
(
'/showrProjetos'
,
'AdministradorController@showProjetos'
)
->
name
(
'showProjetos'
);
...
...
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