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
838d399b
Commit
838d399b
authored
Aug 22, 2022
by
GuilhermeGz
Browse files
Merge branch 'master' of
https://github.com/GuilhermeGz/submeta
parents
6b5e5824
38c26e70
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
838d399b
...
...
@@ -109,6 +109,8 @@ class AvaliadorController extends Controller
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
// Verficação de pendencia de substituição
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participanteSubstituido_id'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
...
...
@@ -116,7 +118,7 @@ class AvaliadorController extends Controller
return
redirect
()
->
back
()
->
withErrors
(
"A proposta "
.
$trabalho
->
titulo
.
" possui substituições pendentes"
);
}
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
]);
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
,
'hoje'
=>
$hoje
]);
}
public
function
parecerInterno
(
Request
$request
){
...
...
app/Http/Requests/StoreTrabalho.php
View file @
838d399b
...
...
@@ -30,6 +30,10 @@ class StoreTrabalho extends FormRequest
//dd($this->all());
$evento
=
Evento
::
find
(
$this
->
editalId
);
$rules
=
[];
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
@@ -65,7 +69,7 @@ class StoreTrabalho extends FormRequest
}
if
(
$this
->
has
(
'rascunho'
))
{
if
(
$this
->
has
(
'rascunho'
))
{
$rules
=
[];
return
$rules
;
}
else
{
...
...
app/Http/Requests/UpdateTrabalho.php
View file @
838d399b
...
...
@@ -32,6 +32,9 @@ class UpdateTrabalho extends FormRequest
$projeto
=
Trabalho
::
find
(
$this
->
id
);
$evento
=
Evento
::
find
(
$this
->
editalId
);
if
(
!
(
$this
->
has
(
'marcado'
))){
$rules
[
'erro'
]
=
[
'required'
];
}
if
(
$this
->
has
(
'marcado'
)){
foreach
(
$this
->
get
(
'marcado'
)
as
$key
=>
$value
)
{
if
(
intval
(
$value
)
==
$key
){
...
...
resources/views/avaliador/editais.blade.php
View file @
838d399b
...
...
@@ -67,23 +67,11 @@
</
a
>
<
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
)
</
button
>
@
endif
<
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
>
@
elseif
(
!
is_null
(
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
)
&&
Auth
::
user
()
->
avaliadors
->
eventos
->
where
(
'id'
,
$evento
->
id
)
->
first
()
->
pivot
->
convite
==
false
)
<
button
disabled
=
"disabled"
class
=
"dropdown-item"
>
Convite
recusado
...
...
resources/views/avaliador/parecer.blade.php
View file @
838d399b
...
...
@@ -151,7 +151,8 @@
<
hr
style
=
"border-top: 1px solid#1492E6"
>
<
div
class
=
"d-flex justify-content-end"
>
<
div
style
=
"margin-right: 15px"
><
a
href
=
"{{ route('avaliador.visualizarTrabalho', ['evento_id' =>
$evento->id
])}}"
class
=
"btn btn-light"
style
=
"color: red;"
>
Cancelar
</
a
></
div
>
<
div
><
button
type
=
"submit"
class
=
"btn btn-success"
>
Enviar
meu
parecer
</
button
></
div
>
<
div
><
button
type
=
"submit"
class
=
"btn btn-success"
@
if
(
$evento
->
inicioRevisao
>
$hoje
||
$evento
->
fimRevisao
<
$hoje
)
disabled
@
endif
>
Enviar
meu
parecer
</
button
></
div
>
</
div
>
</
form
>
...
...
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