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
badbbf21
Commit
badbbf21
authored
Nov 30, 2022
by
Lucas Henrique
Browse files
Adiciona visualização dos relatórios para projetos sem discentes
parent
4b3159a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
app/Http/Controllers/AdministradorController.php
View file @
badbbf21
...
...
@@ -5,6 +5,7 @@ namespace App\Http\Controllers;
use
App\Administrador
;
use
App\AdministradorResponsavel
;
use
App\Area
;
use
App\Arquivo
;
use
App\AvaliacaoRelatorio
;
use
App\Avaliador
;
use
App\CoordenadorComissao
;
...
...
@@ -123,6 +124,24 @@ class AdministradorController extends Controller
//$avaliacoesRelatorio = [];->join('users','users.id','=','candidatos.user_id')
$AvalRelatParcial
=
[];
$AvalRelatFinal
=
[];
if
(
$evento
->
numParticipantes
==
0
)
{
$arquivo
=
Arquivo
::
where
(
"trabalhoId"
,
$trabalho
->
id
)
->
first
();
if
(
isset
(
$arquivo
))
{
$avals
=
AvaliacaoRelatorio
::
where
(
'arquivo_id'
,
$arquivo
->
id
)
->
get
();
}
else
{
$avals
=
[];
}
foreach
(
$avals
as
$aval
)
{
if
(
$aval
->
tipo
==
'Parcial'
)
{
array_push
(
$AvalRelatParcial
,
$aval
);
}
else
{
array_push
(
$AvalRelatFinal
,
$aval
);
}
}
}
foreach
(
$trabalho
->
participantes
as
$participante
)
{
if
(
isset
(
$participante
->
planoTrabalho
))
{
$avals
=
AvaliacaoRelatorio
::
where
(
'arquivo_id'
,
$participante
->
planoTrabalho
->
id
)
->
get
();
...
...
app/Http/Controllers/ArquivoController.php
View file @
badbbf21
...
...
@@ -124,6 +124,7 @@ class ArquivoController extends Controller
$trabalho
=
Trabalho
::
where
(
'id'
,
$id
)
->
first
();
$participantes
=
$trabalho
->
participantes
;
$evento
=
$trabalho
->
evento
;
// Verficação de pendencia de substituição
$aux
=
count
(
Substituicao
::
where
(
'status'
,
'Em Aguardo'
)
->
whereIn
(
'participanteSubstituido_id'
,
$trabalho
->
participantes
->
pluck
(
'id'
))
->
get
());
...
...
@@ -139,12 +140,18 @@ class ArquivoController extends Controller
return
redirect
()
->
back
();
}
foreach
(
$participantes
as
$participante
){
array_push
(
$arquivos
,
$participante
->
planoTrabalho
);
if
(
$evento
->
numParticipantes
!=
0
)
{
foreach
(
$participantes
as
$participante
){
array_push
(
$arquivos
,
$participante
->
planoTrabalho
);
}
}
else
{
$arquivo
=
Arquivo
::
where
(
"trabalhoId"
,
$trabalho
->
id
)
->
first
();
array_push
(
$arquivos
,
$arquivo
);
}
$hoje
=
Carbon
::
today
(
'America/Recife'
);
$hoje
=
$hoje
->
toDateString
();
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
,
'hoje'
=>
$hoje
,
'trabalho'
=>
$trabalho
]);
return
view
(
'planosTrabalho.listar'
)
->
with
([
'arquivos'
=>
$arquivos
,
'hoje'
=>
$hoje
,
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
]);
}
public
function
anexarRelatorio
(
Request
$request
){
...
...
resources/views/administrador/analisarProposta.blade.php
View file @
badbbf21
...
...
@@ -141,16 +141,19 @@
</
div
>
@
endif
@
if
(
$evento
->
numParticipantes
==
0
)
@
php
$arquivo
=
App\Arquivo
::
where
(
"trabalhoId"
,
$trabalho
->
id
)
->
first
();
@
endphp
<
div
class
=
"col-md-12"
>
<
br
>
<
b
style
=
"color: #4D4D4D;"
>
Título
do
Plano
de
Trabalho
:
</
b
>
<
a
style
=
"color: #4D4D4D;"
>
{{
$
trabalho
->
proponente
->
planoTrabalh
o
->
titulo
}}
</
a
>
<
a
style
=
"color: #4D4D4D;"
>
{{
$
arquiv
o
->
titulo
}}
</
a
>
</
div
>
<
div
class
=
"col-md-12"
>
<
br
>
<
label
for
=
"anexoProjeto"
class
=
"col-form-label font-tam"
style
=
"font-weight: bold"
>
{{
__
(
'Anexo do Plano de Trabalho: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.plano', ['id' =>
$
trabalho->proponente
->planoTrabalh
o->id])}}"
>
<
a
href
=
"{{ route('baixar.plano', ['id' =>
$
arquiv
o->id
])}}"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/pdf.ico')}
}
"
style
=
"width:40px"
alt
=
""
>
</
a
>
</
div
>
...
...
@@ -532,7 +535,7 @@
<
div
class
=
"form-row mt-3"
>
<
div
class
=
"col-sm-9"
><
h5
style
=
"color: #234B8B; font-weight: bold"
>
Relatórios
</
h5
></
div
>
<
div
class
=
"col-sm-3 text-sm-right"
>
@
if
(
$substituicoesPendentes
->
count
()
==
0
)
@
if
(
$substituicoesPendentes
->
count
()
==
0
||
$evento
->
numParticipantes
==
0
)
<
a
href
=
"{{route('planos.listar', ['id' =>
$trabalho->id
])}}"
class
=
"button"
>
Listar
Relatórios
</
a
>
@
else
...
...
@@ -588,7 +591,7 @@
<
div
class
=
"col-sm-11"
><
h5
style
=
"color: #234B8B; font-weight: bold"
>
Avaliações
de
Relatórios
</
h5
></
div
>
@
if
(((
$evento
->
dt_fimRelatorioParcial
<
$hoje
&&
$hoje
<
$evento
->
dt_inicioRelatorioFinal
)
||
(
$hoje
>
$evento
->
dt_fimRelatorioFinal
))
&&
(
$substituicoesPendentes
->
count
()
==
0
)
)
||
(
$hoje
>
$evento
->
dt_fimRelatorioFinal
))
&&
(
$substituicoesPendentes
->
count
()
==
0
||
$evento
->
numParticipantes
==
0
)
)
<
div
class
=
"col-md-1 text-sm-right"
>
<
a
type
=
"button"
value
=
"{{
$trabalho->id
}}"
id
=
"atribuir1"
data
-
toggle
=
"modal"
data
-
target
=
"#avaliacaoRelatorioModal"
>
...
...
@@ -603,7 +606,7 @@
</
div
>
@
endif
<!--
Modal
-->
@
if
(
$substituicoesPendentes
->
count
()
==
0
)
@
if
(
$substituicoesPendentes
->
count
()
==
0
||
$evento
->
numParticipantes
==
0
)
<
div
class
=
"modal fade"
id
=
"avaliacaoRelatorioModal"
data
-
bs
-
backdrop
=
"static"
data
-
bs
-
keyboard
=
"false"
tabindex
=
"-1"
aria
-
labelledby
=
"staticBackdropLabel"
aria
-
hidden
=
"true"
style
=
"overflow-y: auto"
>
...
...
@@ -612,7 +615,7 @@
<
div
class
=
"modal-header modal-header-submeta"
>
<
div
class
=
"col-md-8"
style
=
"padding-left: 0px"
>
<
h5
class
=
"modal-title titulo-table"
id
=
"avaliacaoModalLongTitle"
>
@
if
(
$substituicoesPendentes
->
count
()
==
0
)
Seleciones
o
(
s
)
avaliador
(
es
)
@
else
Pendências
de
Substituição
@
endif
</
h5
>
@
if
(
$substituicoesPendentes
->
count
()
==
0
||
$evento
->
numParticipantes
==
0
)
Seleciones
o
(
s
)
avaliador
(
es
)
@
else
Pendências
de
Substituição
@
endif
</
h5
>
</
div
>
<
div
class
=
"col-md-4"
style
=
"text-align: right"
>
<
button
type
=
"button"
id
=
"enviarConviteButton"
class
=
"btn btn-info"
...
...
@@ -626,7 +629,7 @@
</
button
>
</
div
>
</
div
>
@
if
(
isset
(
$participante
->
planoTrabalho
))
@
if
(
isset
(
$participante
->
planoTrabalho
)
||
$evento
->
numParticipantes
==
0
)
<
div
class
=
"modal-body"
>
@
if
(
session
(
'error'
))
<
div
class
=
"col-md-12"
>
...
...
@@ -664,6 +667,26 @@
<
input
type
=
"text"
class
=
"form-control form-control-edit"
placeholder
=
"Nome do avaliador"
onkeyup
=
"buscarAvalRelatorio(this)"
>
<
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
>
</
div
>
</
div
>
@
if
(
$evento
->
numParticipantes
==
0
)
<
div
class
=
"col-md-6"
>
<
label
style
=
"font-weight: bold;font-size: 18px"
>
Plano
:
{{
$arquivo
->
titulo
}}
</
label
>
</
div
>
@
php
$avaliacoesId
=
\
App\AvaliacaoRelatorio
::
where
(
"arquivo_id"
,
$arquivo
->
id
)
->
where
(
"tipo"
,
$tipoTemp
)
->
pluck
(
'user_id'
);
$avalProjeto
=
\
Illuminate\Support\Facades\DB
::
table
(
'users'
)
->
join
(
'avaliadors'
,
'users.id'
,
'='
,
'avaliadors.user_id'
)
->
whereNotIn
(
'users.id'
,
$avaliacoesId
)
->
orderBy
(
'users.name'
)
->
get
();
@
endphp
<
select
name
=
"avaliadores_
{
{$arquivo->id}
}
_id[]"
multiple
class
=
"form-control"
id
=
"avaliacaoSelect"
style
=
"height: 200px;font-size:15px"
>
@
foreach
(
$avalProjeto
as
$avaliador
)
<
option
value
=
"{{
$avaliador->user_id
}}"
>
{{
$avaliador
->
name
}}
>
{{
$avaliador
->
instituicao
??
'Instituição Indefinida'
}}
>
{{
$avaliador
->
tipo
}}
>
{{
$avaliador
->
email
}}
</
option
>
@
endforeach
</
select
>
@
else
@
foreach
(
$trabalho
->
participantes
as
$participante
)
<
div
class
=
"col-md-6"
>
<
label
style
=
"font-weight: bold;font-size: 18px"
>
Plano
:
{{
$participante
->
planoTrabalho
->
titulo
}}
</
label
>
...
...
@@ -685,6 +708,7 @@
@
endforeach
</
select
>
@
endforeach
@
endif
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
</
div
>
...
...
resources/views/planosTrabalho/listar.blade.php
View file @
badbbf21
...
...
@@ -21,18 +21,21 @@
<
th
scope
=
"col"
style
=
"width:400px; text-align: center;"
>
Projeto
</
th
>
<
th
scope
=
"col"
style
=
"width:400px; text-align: center;"
>
Proponente
</
th
>
<
th
scope
=
"col"
style
=
"width:400px; text-align: center;"
>
Título
do
Plano
</
th
>
@
if
(
$evento
->
numParticipantes
!=
0
)
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Discente
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Parcial
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Final
</
th
>
@
endif
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Parcial
</
th
>
<
th
scope
=
"col"
style
=
"width:200px; text-align: center;"
>
Relatório
Final
</
th
>
</
tr
>
</
thead
>
@
foreach
(
$arquivos
as
$arquivo
)
<
tbody
>
<
td
style
=
"text-align: center;"
title
=
"
{
{$arquivo->trabalho->titulo}}">{{$arquivo->trabalho->titulo}
}
</td>
<td style="
text
-
align
:
center
;
" title="
{{
$arquivo
->
trabalho
->
proponente
->
user
->
name
}}
">
{
{$arquivo->trabalho->proponente->user->name}
}
</td>
<td style="
text
-
align
:
center
;
" title="
{{
$arquivo
->
titulo
}}
">
{
{$arquivo->titulo}
}
</td>
@if (
$evento->numParticipantes
!= 0)
<td style="
text
-
align
:
center
;
" title="
{{
$arquivo
->
participante
->
user
->
name
}}
" id="
td
-
nomeAluno
">
{
{$arquivo->participante->user->name}
}
</td>
@endif
<td style="
text
-
align
:
center
;
">
@if((Auth::user()->proponentes != null) && (
$arquivo->relatorioParcial
== null) &&
(
$arquivo->trabalho
->evento->dt_inicioRelatorioParcial <=
$hoje
) && (
$hoje
<=
$arquivo->trabalho
->evento->dt_fimRelatorioParcial))
...
...
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