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
924bd801
Commit
924bd801
authored
Jan 26, 2023
by
Lucas Henrique
Browse files
Adiciona campo de pontuação para parecer de avaliação por link
parent
7164d9ee
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
924bd801
...
...
@@ -284,7 +284,12 @@ class AvaliadorController extends Controller
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$data
=
Carbon
::
now
(
'America/Recife'
);
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
if
(
$request
->
pontuacao
==
null
)
{
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
}
else
{
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
,
'pontuacao'
=>
$request
->
pontuacao
]);
}
return
redirect
(
route
(
'avaliador.visualizarTrabalho'
,
[
'evento_id'
=>
$evento
->
id
]));
}
...
...
resources/views/avaliador/parecerLink.blade.php
View file @
924bd801
...
...
@@ -104,11 +104,20 @@
</
div
>
</
div
>
<
p
>
Por
fim
,
informe
sua
recomendação
.
</
p
>
<
select
class
=
"custom-select"
name
=
"recomendacao"
>
<
option
@
if
(
$trabalho
->
pivot
->
recomendacao
==
'RECOMENDADO'
)
selected
@
endif
value
=
"RECOMENDADO"
>
RECOMENDADO
</
option
>
<
option
@
if
(
$trabalho
->
pivot
->
recomendacao
==
'NAO-RECOMENDADO'
)
selected
@
endif
value
=
"NAO-RECOMENDADO"
>
NAO
-
RECOMENDADO
</
option
>
</
select
>
<
p
>
Por
fim
,
informe
a
pontuação
(
caso
necessário
)
e
sua
recomendação
.
</
p
>
<
div
class
=
"form-group"
>
<
label
style
=
"font-weight: bold"
>
Pontuação
</
label
>
<
input
class
=
"form-control"
name
=
"pontuacao"
type
=
"number"
max
=
"10"
min
=
"0"
value
=
"{{
$trabalho->pivot
->pontuacao }}"
/>
</
div
>
<
div
class
=
"form-group"
>
<
label
style
=
"font-weight: bold"
>
Recomendação
<
span
style
=
"color:red; font-weight:bold;"
>*</
span
></
label
>
<
select
class
=
"custom-select"
name
=
"recomendacao"
required
>
<
option
@
if
(
$trabalho
->
pivot
->
recomendacao
==
'RECOMENDADO'
)
selected
@
endif
value
=
"RECOMENDADO"
>
RECOMENDADO
</
option
>
<
option
@
if
(
$trabalho
->
pivot
->
recomendacao
==
'NAO-RECOMENDADO'
)
selected
@
endif
value
=
"NAO-RECOMENDADO"
>
NAO
-
RECOMENDADO
</
option
>
</
select
>
</
div
>
<
hr
style
=
"border-top: 1px solid#1492E6"
>
<
div
class
=
"d-flex justify-content-end"
>
...
...
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