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
f8b1b7d8
Unverified
Commit
f8b1b7d8
authored
Aug 24, 2022
by
GuilhermeGz
Committed by
GitHub
Aug 24, 2022
Browse files
Merge pull request #591 from S-Nathalia/master
Restrição do envio de parecer | adição de coluna para status
parents
fab038ea
c4834eb8
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
f8b1b7d8
...
@@ -135,6 +135,8 @@ class AvaliadorController extends Controller
...
@@ -135,6 +135,8 @@ class AvaliadorController extends Controller
//
//
$participantes
=
$trabalho
->
participantes
;
$participantes
=
$trabalho
->
participantes
;
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$trabalho
->
id
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$trabalho
->
id
)
->
get
();
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'avaliador.parecerInterno'
,
return
view
(
'avaliador.parecerInterno'
,
[
'trabalho'
=>
$trabalho
,
[
'trabalho'
=>
$trabalho
,
...
@@ -147,6 +149,7 @@ class AvaliadorController extends Controller
...
@@ -147,6 +149,7 @@ class AvaliadorController extends Controller
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'enum_turno'
=>
Participante
::
ENUM_TURNO
,
'arquivos'
=>
$arquivos
,
'arquivos'
=>
$arquivos
,
'estados'
=>
$this
->
estados
,
'estados'
=>
$this
->
estados
,
'hoje'
=>
$hoje
]);
]);
}
}
...
@@ -271,16 +274,12 @@ class AvaliadorController extends Controller
...
@@ -271,16 +274,12 @@ class AvaliadorController extends Controller
}
}
// dd($trabalho);
return
redirect
(
route
(
'avaliador.visualizarTrabalho'
,
[
'evento_id'
=>
$evento
->
id
]));
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhosEx'
=>
$trabalhosEx
,
'trabalhosIn'
=>
$trabalhosIn
,
'evento'
=>
$evento
]);
}
}
public
function
conviteResposta
(
Request
$request
){
public
function
conviteResposta
(
Request
$request
){
//dd($request->all());
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$user
->
avaliadors
->
eventos
()
->
updateExistingPivot
(
$evento
->
id
,
[
'convite'
=>
$request
->
resposta
]);
$user
->
avaliadors
->
eventos
()
->
updateExistingPivot
(
$evento
->
id
,
[
'convite'
=>
$request
->
resposta
]);
//dd( $user->avaliadors->eventos->where('id', $evento->id)->first()->pivot);
return
redirect
()
->
back
();
return
redirect
()
->
back
();
}
}
...
...
resources/views/avaliador/listarTrabalhos.blade.php
View file @
f8b1b7d8
...
@@ -64,9 +64,9 @@
...
@@ -64,9 +64,9 @@
@
if
(
Auth
::
user
()
->
avaliadors
->
tipo
==
'Externo'
||
Auth
::
user
()
->
avaliadors
->
tipo
==
null
)
@
if
(
Auth
::
user
()
->
avaliadors
->
tipo
==
'Externo'
||
Auth
::
user
()
->
avaliadors
->
tipo
==
null
)
<
th
scope
=
"col"
>
Projeto
</
th
>
<
th
scope
=
"col"
>
Projeto
</
th
>
<
th
scope
=
"col"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
>
Parecer
Externo
</
th
>
<
th
scope
=
"col"
style
=
"text-align: center"
>
Status
</
th
>
@
else
@
else
<
th
scope
=
"col"
>
Status
Parecer
</
th
>
<
th
scope
=
"col"
style
=
"text-align: center"
>
Status
</
th
>
<
th
scope
=
"col"
>
Parecer
Interno
</
th
>
<
th
scope
=
"col"
>
Parecer
Interno
</
th
>
@
endif
@
endif
...
@@ -78,13 +78,13 @@
...
@@ -78,13 +78,13 @@
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
style
=
"text-align: center"
>
{{
$trabalho
->
created_at
->
format
(
'd/m/Y'
)
}}
</
td
>
<
td
style
=
"text-align: center"
>
{{
$trabalho
->
created_at
->
format
(
'd/m/Y'
)
}}
</
td
>
@
if
(
Auth
::
user
()
->
avaliadors
->
tipo
==
'Externo'
||
Auth
::
user
()
->
avaliadors
->
tipo
==
null
)
@
if
(
Auth
::
user
()
->
avaliadors
->
tipo
==
'Externo'
||
Auth
::
user
()
->
avaliadors
->
tipo
==
null
)
<
td
style
=
"text-align: center"
>
<
td
>
{{
--
--
}}
{{
--
--
}}
<
a
href
=
"{{route('download', ['file' =>
$trabalho->anexoProjeto
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
class
=
"btn btn-light"
>
<
a
href
=
"{{route('download', ['file' =>
$trabalho->anexoProjeto
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
class
=
"btn btn-light"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:15px"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:15px"
>
</
a
>
</
a
>
</
td
>
</
td
>
<
td
style
=
"text-align: center"
>
<
td
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
php
@
php
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
!=
null
){
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
!=
null
){
...
@@ -124,8 +124,16 @@
...
@@ -124,8 +124,16 @@
@
php
@
php
$parecer
=
App\ParecerInterno
::
where
([[
'avaliador_id'
,
Auth
::
user
()
->
avaliadors
->
id
],[
'trabalho_id'
,
$trabalho
->
id
]])
->
first
();
$parecer
=
App\ParecerInterno
::
where
([[
'avaliador_id'
,
Auth
::
user
()
->
avaliadors
->
id
],[
'trabalho_id'
,
$trabalho
->
id
]])
->
first
();
@
endphp
@
endphp
<
td
style
=
"text-align: center"
>
<
td
>
@
if
(
$parecer
!=
null
&&
$parecer
->
statusParecer
!=
null
){{
$parecer
->
statusParecer
}}
@
else
Sem
Parecer
@
endif
@
if
(
$parecer
!=
null
&&
$parecer
->
statusParecer
!=
null
)
@
if
(
$parecer
->
statusParecer
==
'RECOMENDADO'
)
Recomendado
@
else
Não
Recomendado
@
endif
@
else
Pendente
@
endif
</
td
>
</
td
>
<
td
>
<
td
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
...
@@ -161,12 +169,14 @@
...
@@ -161,12 +169,14 @@
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Projeto
</
th
>
<
th
scope
=
"col"
>
Projeto
</
th
>
<
th
scope
=
"col"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
>
Plano
de
Trabalho
</
th
>
<
th
scope
=
"col"
style
=
"text-align: center"
>
Status
</
th
>
<
th
scope
=
"col"
>
Parecer
Externo
</
th
>
<
th
scope
=
"col"
>
Parecer
Externo
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
<
tbody
>
<
tbody
>
@
foreach
(
$trabalhosEx
as
$trabalho
)
@
foreach
(
$trabalhosEx
as
$trabalho
)
<
tr
>
<
tr
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
style
=
"max-width:100px; overflow-x:hidden; text-overflow:ellipsis"
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
style
=
"text-align: center"
>
{{
$trabalho
->
created_at
->
format
(
'd/m/Y'
)
}}
</
td
>
<
td
style
=
"text-align: center"
>
{{
$trabalho
->
created_at
->
format
(
'd/m/Y'
)
}}
</
td
>
...
@@ -194,20 +204,24 @@
...
@@ -194,20 +204,24 @@
@
endif
@
endif
@
endforeach
@
endforeach
</
td
>
</
td
>
<
td
style
=
"text-align: center"
>
@
if
(
$trabalho
->
pivot
->
recomendacao
==
'RECOMENDADO'
)
Recomendado
@
elseif
(
$trabalho
->
pivot
->
recomendacao
==
null
)
Pendente
@
else
Não
Recomendado
@
endif
</
td
>
<
td
>
<
td
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"row justify-content-center"
>
<
form
action
=
"{{ route('avaliador.parecer', ['evento' =>
$evento
]) }}"
method
=
"POST"
>
<
form
action
=
"{{ route('avaliador.parecer', ['evento' =>
$evento
]) }}"
method
=
"POST"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
@
if
(
$trabalho
->
pivot
->
AnexoParecer
==
null
)
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
Parecer
Parecer
</
button
>
</
button
>
@
else
<
button
type
=
"submit"
class
=
"btn btn-secondary mr-2 ml-2"
>
Enviado
</
button
>
@
endif
</
form
>
</
form
>
</
div
>
</
div
>
...
...
resources/views/avaliador/parecerInterno.blade.php
View file @
f8b1b7d8
...
@@ -235,9 +235,9 @@
...
@@ -235,9 +235,9 @@
<
div
><
hr
></
div
>
<
div
><
hr
></
div
>
<
div
class
=
"d-flex justify-content-end"
>
<
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
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
>
</
div
>
</
form
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
...
...
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