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
c968fb9c
Unverified
Commit
c968fb9c
authored
Jun 14, 2022
by
GuilhermeGz
Committed by
GitHub
Jun 14, 2022
Browse files
Merge pull request #236 from GuilhermeGz/master
Atualizações
parents
7b287f93
00ee1402
Changes
5
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
c968fb9c
...
...
@@ -61,6 +61,14 @@ class AvaliadorController extends Controller
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$eventos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
eventos
;
$aval
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
foreach
(
$eventos
as
$evento
){
$evento
->
flag
=
0
;
$trabalhos
=
Trabalho
::
where
(
'evento_id'
,
$evento
->
id
)
->
pluck
(
'id'
);
if
(
$aval
->
trabalhos
()
->
whereIn
(
"trabalho_id"
,
$trabalhos
)
->
count
()
!=
0
){
$evento
->
flag
=
1
;
}
}
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'avaliador.editais'
,
[
"eventos"
=>
$eventos
,
"hoje"
=>
$hoje
]);
...
...
app/Http/Controllers/TrabalhoController.php
View file @
c968fb9c
...
...
@@ -117,11 +117,20 @@ class TrabalhoController extends Controller
public
function
arquivar
(
Request
$request
){
$trabalho
=
Trabalho
::
find
(
$request
->
trabalho_id
);
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$trabalho
->
id
)
->
get
();
if
(
$request
->
arquivar_tipo
==
1
){
$trabalho
->
arquivado
=
true
;
foreach
(
$arquivos
as
$arquivo
){
$arquivo
->
arquivado
=
true
;
$arquivo
->
update
();
}
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" arquivado"
;
}
else
{
$trabalho
->
arquivado
=
false
;
foreach
(
$arquivos
as
$arquivo
){
$arquivo
->
arquivado
=
false
;
$arquivo
->
update
();
}
$message
=
"Projeto "
.
$trabalho
->
titulo
.
" desarquivado"
;
}
$trabalho
->
update
();
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
c968fb9c
...
...
@@ -185,7 +185,7 @@
<
input
value
=
'1'
name
=
'arquivar_tipo'
type
=
'hidden'
/>
</
form
>
@
else
<
a
title
=
"Desarquivar"
href
=
'javascript:arquivar2{{$participante->id}}.submit()'
>
<
a
@
if
(
$trabalho
->
arquivado
==
true
)
style
=
"pointer-events: none"
@
endif
title
=
"Desarquivar"
href
=
'javascript:arquivar2{{$participante->id}}.submit()'
>
<
svg
xmlns
=
"http://www.w3.org/2000/svg"
width
=
"24"
height
=
"24"
viewBox
=
"0 0 24 24"
fill
=
"none"
stroke
=
"#808080"
stroke
-
width
=
"2"
stroke
-
linecap
=
"round"
stroke
-
linejoin
=
"round"
><
path
d
=
"M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h5l2 3h9a2 2 0 0 1 2 2v11zM9.9 16.1L14 12M9.9 11.9L14 16"
/></
svg
>
</
a
>
<
form
method
=
"GET"
name
=
'arquivar2{{$participante->id}}'
action
=
'{{route('
arquivo
.
arquivar
')}}'
>
...
...
@@ -920,7 +920,8 @@
href
=
"{{ route('admin.visualizarParecerInterno', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
]) }}"
>
Avaliado
</
a
>
@
endif
</
h9
>
<
br
>
<
a
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
,'flag'=>1]) }}"
>
<
a
onclick
=
"return confirm('Tem certeza que deseja remover o avaliador
{
{$avaliador->user->name}
}
?')"
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
,'flag'=>1]) }}"
>
Remover
</
a
>
<
br
>
...
...
@@ -952,7 +953,8 @@
</
h9
>
<
br
>
<
a
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
,'flag'=>0]) }}"
>
<
a
onclick
=
"return confirm('Tem certeza que deseja remover o avaliador
{
{$avaliador->user->name}
}
?')"
href
=
"{{ route('admin.removerProjAval', ['trabalho_id' =>
$trabalho->id
, 'avaliador_id' =>
$avaliador->id
,'flag'=>0]) }}"
>
Remover
</
a
>
<
br
>
...
...
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
c968fb9c
...
...
@@ -117,7 +117,9 @@
@
csrf
<
input
type
=
"hidden"
name
=
"avaliador_id"
value
=
"{{
$avaliador->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
button
type
=
"submit"
class
=
"btn btn-danger"
@
if
(
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
!=
0
)
disabled
=
"disabled"
@
endif
>
Remover
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-danger"
@
if
(
$avaliador
->
trabalhos
->
where
(
'evento_id'
,
$evento
->
id
)
->
count
()
!=
0
)
disabled
=
"disabled"
@
endif
onclick
=
"return confirm('Tem certeza que deseja remover o avaliador
{
{$avaliador->user->name}
}
?')"
>
Remover
</
button
>
</
form
>
<
form
action
=
"{{ route('admin.reenviarConvite') }}"
method
=
"POST"
>
@
csrf
...
...
resources/views/avaliador/editais.blade.php
View file @
c968fb9c
...
...
@@ -68,10 +68,16 @@
<
div
class
=
"dropdown-menu"
>
@
if
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
true
)
@
if
(
$hoje
>=
$evento
->
inicioRevisao
&&
$hoje
<=
$evento
->
fimRevisao
)
@
if
(
$evento
->
flag
==
0
)
<
button
disabled
=
"disabled"
class
=
"dropdown-item"
>
Não
há
ainda
avaliação
atribuída
para
você
neste
edital
.
</
button
>
@
else
<
a
href
=
"{{ route('avaliador.visualizarTrabalho', ['evento_id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Avaliar
Propostas
</
a
>
@
endif
@
else
<
button
disabled
=
"disabled"
class
=
"dropdown-item"
>
Hoje
({{
date
(
'd/m/Y'
,
strtotime
(
$hoje
))
}})
não
faz
parte
do
período
de
revisão
(
avaliação
)
...
...
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