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
b7d2533c
Unverified
Commit
b7d2533c
authored
May 22, 2021
by
Gabriel Antônio da Silva
Committed by
GitHub
May 22, 2021
Browse files
Merge branch 'master' into modificacoes_layout_2
parents
8de6a88e
18615797
Changes
23
Hide whitespace changes
Inline
Side-by-side
app/Arquivo.php
View file @
b7d2533c
...
...
@@ -12,10 +12,17 @@ class Arquivo extends Model
* @var array
*/
protected
$fillable
=
[
'nome'
,
'versao'
,
'versaoFinal'
,
'data'
,
'trabalhoId'
,
'nome'
,
'versao'
,
'versaoFinal'
,
'data'
,
'trabalhoId'
,
'participanteId'
];
public
function
trabalho
(){
return
$this
->
belongsTo
(
'App\Trabalho'
,
'trabalhoId'
);
}
public
function
participante
()
{
return
$this
->
belongsTo
(
'App\Participante'
,
'participanteId'
);
}
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
,
'avaliadors_plano_trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
}
}
app/Avaliador.php
View file @
b7d2533c
...
...
@@ -20,6 +20,9 @@ class Avaliador extends Model
public
function
trabalhos
(){
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
}
public
function
planoTrabalhos
(){
return
$this
->
belongsToMany
(
'App\Arquivo'
,
'avaliadors_plano_trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao'
,
'created_at'
);
}
public
function
eventos
(){
return
$this
->
belongsToMany
(
'App\Evento'
)
->
withPivot
(
'convite'
,
'created_at'
);
}
...
...
app/Http/Controllers/AvaliadorController.php
View file @
b7d2533c
...
...
@@ -42,15 +42,25 @@ class AvaliadorController extends Controller
public
function
parecer
(
Request
$request
){
//$trabalho = Trabalho::find($request->trabalho_id);
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
$recomendacaos
=
Recomendacao
::
all
();
//dd($request->all());
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
$recomendacaos
=
Recomendacao
::
all
();
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
,
'recomendacaos'
=>
$recomendacaos
]);
}
public
function
parecerPlano
(
Request
$request
){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$plano
=
$avaliador
->
planoTrabalhos
->
where
(
'id'
,
$request
->
plano_id
)
->
first
();
$evento
=
Evento
::
find
(
$request
->
evento
);
$recomendacaos
=
Recomendacao
::
all
();
// dd($plano);
return
view
(
'avaliador.parecerPlano'
,
[
'plano'
=>
$plano
,
'evento'
=>
$evento
,
'recomendacaos'
=>
$recomendacaos
]);
}
public
function
enviarParecer
(
Request
$request
){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
...
...
@@ -63,9 +73,9 @@ class AvaliadorController extends Controller
$trabalho
->
status
=
'Avaliado'
;
$trabalho
->
save
();
$data
=
Carbon
::
now
(
'America/Recife'
);
if
(
$request
->
anexoParecer
==
''
){
if
(
$request
->
anexoParecer
==
''
){
$avaliador
->
trabalhos
()
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
}
else
{
$anexoParecer
=
$request
->
anexoParecer
;
...
...
@@ -74,8 +84,8 @@ class AvaliadorController extends Controller
Storage
::
putFileAs
(
$path
,
$anexoParecer
,
$nome
);
$anexoParecer
=
$path
.
$nome
;
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$anexoParecer
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$anexoParecer
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
}
...
...
@@ -91,4 +101,49 @@ class AvaliadorController extends Controller
//dd( $user->avaliadors->eventos->where('id', $evento->id)->first()->pivot);
return
redirect
()
->
back
();
}
public
function
listarPlanos
(
Request
$request
){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$planos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
planoTrabalhos
;
//dd();
return
view
(
'avaliador.listarPlanos'
,
[
'planos'
=>
$planos
,
'evento'
=>
$evento
]);
}
public
function
enviarParecerPlano
(
Request
$request
){
$user
=
User
::
find
(
Auth
::
user
()
->
id
);
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$planos
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
()
->
planoTrabalhos
;
$avaliador
=
$user
->
avaliadors
->
where
(
'user_id'
,
$user
->
id
)
->
first
();
$plano
=
$avaliador
->
planoTrabalhos
->
find
(
$request
->
plano_id
);
$plano
->
versao
=
1
;
$plano
->
save
();
$data
=
Carbon
::
now
(
'America/Recife'
);
if
(
$request
->
anexoParecer
==
''
){
$avaliador
->
planoTrabalhos
()
->
updateExistingPivot
(
$plano
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
}
else
{
$anexoParecer
=
$request
->
anexoParecer
;
$path
=
'anexoParecerPlano/'
.
$avaliador
->
id
.
$plano
->
id
.
'/'
;
$nome
=
"parecerPlano.pdf"
;
Storage
::
putFileAs
(
$path
,
$anexoParecer
,
$nome
);
$anexoParecer
=
$path
.
$nome
;
$avaliador
->
planoTrabalhos
()
->
updateExistingPivot
(
$plano
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$anexoParecer
,
'recomendacao'
=>
$request
->
recomendacao
,
'created_at'
=>
$data
]);
}
// dd($trabalho);
return
view
(
'avaliador.listarPlanos'
,
[
'planos'
=>
$planos
,
'evento'
=>
$evento
]);
}
}
app/Http/Controllers/PlanoTrabalhoController.php
0 → 100644
View file @
b7d2533c
<?php
namespace
App\Http\Controllers
;
use
App\Evento
;
use
App\Arquivo
;
use
App\Avaliador
;
use
Illuminate\Http\Request
;
class
PlanoTrabalhoController
extends
Controller
{
public
function
index
(
$evento_id
)
{
$evento
=
Evento
::
find
(
$evento_id
);
return
view
(
'planosTrabalho.index'
,
compact
(
'evento'
));
}
public
function
selecionarPlanos
(
$evento_id
)
{
$evento
=
Evento
::
where
(
'id'
,
$evento_id
)
->
first
();
$planos
=
Arquivo
::
all
();
$avaliadores
=
$evento
->
avaliadors
;
foreach
(
$planos
as
$key
=>
$plano
)
{
$avalSelecionadosId
=
$plano
->
avaliadors
->
pluck
(
'id'
);
$avalProjeto
=
Avaliador
::
whereNotIn
(
'id'
,
$avalSelecionadosId
)
->
get
();
$plano
->
aval
=
$avalProjeto
;
}
return
view
(
'planosTrabalho.selecionarPlanos'
,
[
'evento'
=>
$evento
,
'planos'
=>
$planos
,
'avaliadores'
=>
$avaliadores
]);
}
public
function
atribuicao
(
Request
$request
)
{
$plano
=
Arquivo
::
where
(
'id'
,
$request
->
plano_id
)
->
first
();
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$avaliadores
=
Avaliador
::
whereIn
(
'id'
,
$request
->
avaliadores_id
)
->
get
();
$plano
->
avaliadors
()
->
attach
(
$avaliadores
);
$evento
->
avaliadors
()
->
syncWithoutDetaching
(
$avaliadores
);
// dd($plano->avaliadors);
$plano
->
save
();
return
redirect
()
->
back
();
}
public
function
store
(
Request
$request
)
{
}
public
function
edit
(
$id
)
{
}
public
function
update
(
Request
$request
,
$id
)
{
}
public
function
destroy
(
$id
)
{
}
}
app/Http/Controllers/TrabalhoController.php
View file @
b7d2533c
No preview for this file type
app/Participante.php
View file @
b7d2533c
...
...
@@ -18,4 +18,8 @@ class Participante extends Model
public
function
trabalhos
(){
return
$this
->
belongsToMany
(
'App\Trabalho'
,
'trabalho_participante'
);
}
public
function
planoTrabalho
()
{
return
$this
->
hasOne
(
'App\Arquivo'
,
'participanteId'
);
}
}
app/Trabalho.php
View file @
b7d2533c
...
...
@@ -28,6 +28,7 @@ class Trabalho extends Model
'anexoAutorizacaoComiteEtica'
,
'JustificativaAutorizacaoEtica'
,
'anexoLattesCoordenador'
,
'anexoGrupoPesquisa'
,
'anexoPlanilhaPontuacao'
,
'anexoProjeto'
,
...
...
@@ -82,7 +83,7 @@ class Trabalho extends Model
return
$this
->
hasMany
(
'App\PlanoTrabalho'
);
}
public
function
participantes
(){
return
$this
->
belongsTo
Many
(
'App\Participante'
,
'trabalho_
participante
'
);
return
$this
->
has
Many
(
'App\Participante'
,
'trabalho_
id
'
);
}
public
function
proponente
(){
return
$this
->
belongsTo
(
'App\Proponente'
);
...
...
database/migrations/2020_02_05_123048_create_trabalhos_table.php
View file @
b7d2533c
...
...
@@ -23,10 +23,11 @@ class CreateTrabalhosTable extends Migration
$table
->
string
(
'pontuacaoPlanilha'
);
$table
->
date
(
'data'
)
->
nullable
();
//Anexos
$table
->
string
(
'anexoProjeto'
);
$table
->
string
(
'anexoProjeto'
)
->
nullable
()
;
$table
->
string
(
'anexoDecisaoCONSU'
)
->
nullable
();
$table
->
string
(
'anexoPlanilhaPontuacao'
);
$table
->
string
(
'anexoLattesCoordenador'
);
$table
->
string
(
'anexoPlanilhaPontuacao'
)
->
nullable
();
$table
->
string
(
'anexoLattesCoordenador'
)
->
nullable
();
$table
->
string
(
'anexoGrupoPesquisa'
)
->
nullable
();
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();
$table
->
string
(
'justificativaAutorizacaoEtica'
)
->
nullable
();
//chaves estrangeiras
...
...
database/migrations/2021_05_21_224038_create_avaliadors_plano_trabalho_table.php
0 → 100644
View file @
b7d2533c
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateAvaliadorsPlanoTrabalhoTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'avaliadors_plano_trabalho'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
text
(
'parecer'
)
->
nullable
();
$table
->
string
(
'AnexoParecer'
)
->
nullable
();
$table
->
boolean
(
'status'
)
->
nullable
();
$table
->
string
(
'recomendacao'
)
->
nullable
();
$table
->
softDeletes
();
$table
->
unsignedBigInteger
(
'arquivo_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
foreign
(
'arquivo_id'
)
->
references
(
'id'
)
->
on
(
'arquivos'
);
$table
->
foreign
(
'avaliador_id'
)
->
references
(
'id'
)
->
on
(
'avaliadors'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'avaliadors_plano_trabalho'
);
}
}
resources/views/administrador/atribuirAvaliadores.blade.php
View file @
b7d2533c
...
...
@@ -37,9 +37,9 @@
</
div
>
</
a
>
</
div
>
<
div
class
=
"col-sm-3 d-flex justify-content-center"
>
<
a
href
=
"{{ route('admin.projetos', ['evento_id' =>
$evento->id
]) }}"
style
=
"text-decoration:none; color: inherit;"
>
<
a
href
=
"{{ route('admin.projetos', ['evento_id' =>
$evento->id
]) }}"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center card-menu"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
div
class
=
"container"
>
...
...
@@ -66,15 +66,38 @@
</
div
>
</
a
>
</
div
>
{{
--
<
div
class
=
"col-sm-3 d-flex justify-content-center"
>
<
a
href
=
"#"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center "
style
=
"border-radius: 30px; width: 13rem;height: 15rem;"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
h2
style
=
"padding-top:15px"
>
Mensagens
</
h2
>
</
div
>
</
div
>
</
a
>
</
div
>
--
}}
<
div
class
=
"col-sm-3 d-flex justify-content-center "
>
<
a
href
=
"{{route('plano.trabalho.index', ['evento_id' =>
$evento->id
])}}"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center card-menu"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
div
class
=
"container"
>
<
div
class
=
"row titulo-card-menu"
>
<
div
class
=
"col-md-12"
>
<
h2
style
=
"padding-top:15px"
>
Planos
de
Trabalho
</
h2
>
</
div
>
</
div
>
@
php
$avaliadores
=
\
App\Participante
::
count
();
@
endphp
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h5
>
Nº
total
de
planos
de
trabalho
:</
h5
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h1
class
=
"quant-titulo-card"
>
{{
$avaliadores
}}
</
h1
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
a
>
</
div
>
</
div
>
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
b7d2533c
...
...
@@ -69,7 +69,7 @@
</
div
>
<
div
class
=
"modal-body"
>
<
form
action
=
"{{ route('
admin
.atribuicao') }}"
method
=
"POST"
>
<
form
action
=
"{{ route('
plano.trabalho
.atribuicao') }}"
method
=
"POST"
>
@
csrf
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
...
...
resources/views/avaliador/editais.blade.php
View file @
b7d2533c
...
...
@@ -41,6 +41,10 @@
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Projetos
para
avaliar
</
a
>
<
a
href
=
"{{ route('avaliador.listarPlanos', ['evento_id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Planos
para
avaliar
</
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/listarPlanos.blade.php
0 → 100644
View file @
b7d2533c
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Planos
do
Edital
:
{{
$evento
->
nome
}}
</
h3
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Projeto
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Parecer
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$planos
as
$plano
)
<
tr
>
<
td
>
{{
$plano
->
titulo
}}
</
td
>
<
td
>
{{
$plano
->
created_at
}}
</
td
>
{{
--
<
td
>
<
a
href
=
"{{route('download', ['file' =>
$trabalho->anexoProjeto
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
td
>
<
td
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
php
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
!=
null
){
$planoTrabalho
=
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
->
nome
;
}
else
{
$planoTrabalho
=
null
;
}
@
endphp
@
if
(
$planoTrabalho
!=
null
)
<
a
href
=
"{{route('download', ['file' =>
$planoTrabalho
])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
@
else
Não
há
planos
de
trabalho
.
@
endif
@
endforeach
</
td
>
--
}}
<
td
>
<
div
class
=
"row"
>
<
form
action
=
"{{ route('avaliador.parecer.plano', ['evento' =>
$evento
]) }}"
method
=
"POST"
>
@
csrf
<
input
type
=
"hidden"
name
=
"plano_id"
value
=
"{{
$plano->id
}}"
>
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
Parecer
</
button
>
</
form
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
resources/views/avaliador/listarTrabalhos.blade.php
View file @
b7d2533c
...
...
@@ -36,8 +36,8 @@
<
td
>
@
foreach
(
$trabalho
->
participantes
as
$participante
)
@
php
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
pivot
->
participante_
id
)
->
first
()
!=
null
){
$planoTrabalho
=
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
pivot
->
participante_
id
)
->
first
()
->
nome
;
if
(
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
!=
null
){
$planoTrabalho
=
App\Arquivo
::
where
(
'participanteId'
,
$participante
->
id
)
->
first
()
->
nome
;
}
else
{
$planoTrabalho
=
null
;
}
...
...
resources/views/avaliador/parecerPlano.blade.php
0 → 100644
View file @
b7d2533c
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container content"
>
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
div
class
=
"card"
style
=
"margin-top:50px"
>
<
div
class
=
"card-body"
>
<
h5
class
=
"card-title"
>
Meu
Parecer
</
h5
>
<
h6
class
=
"card-title"
>
Plano
:
{{
$plano
->
titulo
}}
</
h6
>
<
p
class
=
"card-text"
>
<
form
method
=
"POST"
action
=
"
{
{route('avaliador.enviarParecerPlano')}
}
"
enctype
=
"multipart/form-data"
>
@
csrf
<
input
type
=
"hidden"
name
=
"plano_id"
value
=
"{{
$plano->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlTextarea1"
>
Parecer
:</
label
>
<
textarea
class
=
"form-control"
id
=
"exampleFormControlTextarea1"
rows
=
"3"
name
=
"textParecer"
>
{{
$plano
->
pivot
->
parecer
}}
</
textarea
>
</
div
>
<
select
class
=
"custom-select"
name
=
"recomendacao"
>
@
foreach
(
$recomendacaos
as
$recomendacao
)
@
if
(
$plano
->
pivot
->
recomendacao
==
$recomendacao
->
nome
)
<
option
selected
value
=
"{{
$recomendacao->nome
}}"
>
{{
$recomendacao
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$recomendacao->nome
}}"
>
{{
$recomendacao
->
nome
}}
</
option
>
@
endif
@
endforeach
</
select
>
<
div
class
=
"form-group mt-3 md-3"
>
@
if
(
$plano
->
pivot
->
AnexoParecer
==
null
)
<
label
for
=
"exampleFormControlFile1"
>
Anexo
do
Parecer
:</
label
>
<
input
type
=
"file"
class
=
"form-control-file"
id
=
"exampleFormControlFile1"
name
=
"anexoParecer"
>
@
else
<
label
for
=
"exampleFormControlFile1"
>
Já
existe
um
arquivo
,
quer
atualizar
?</
label
>
<
br
>
<
label
for
=
"exampleFormControlFile1"
>
Arquivo
atual
:</
label
>
<
a
href
=
"{{route('download', ['file' =>
$plano->pivot
->AnexoParecer])}}"
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
><
br
>
<
input
type
=
"file"
class
=
"form-control-file"
id
=
"exampleFormControlFile1"
name
=
"anexoParecer"
>
@
endif
</
div
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Enviar
</
button
>
<
a
href
=
"{{ route('avaliador.visualizarTrabalho', ['evento_id' =>
$evento->id
])}}"
class
=
"btn btn-danger"
>
Cancelar
</
a
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
type
=
"text/javascript"
>
</
script
>
@
endsection
resources/views/evento/submeterTrabalho.blade.php
View file @
b7d2533c
...
...
@@ -1991,6 +1991,27 @@ function validarPart3(){
}
}
</
script
>
<
script
src
=
"https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"
></
script
>
<
script
type
=
"text/javascript"
>
// $("#button").click(function(e){
// e.preventDefault();
</
script
>
// $.ajax({
// headers: {
// 'X-CSRF-Token': $('input[name="_token"]').val()
// },
// url: "{{route('trabalho.store')}}",
// type: 'post',
// enctype: 'multipart/form-data',
// success: function(result){
// console.log("success")
// console.log(result)
// },
// erro: (xhr,status,error) => {
// console.log("erro")
// }
// });
// });
</
script
>
@
endsection
resources/views/index.blade.php
View file @
b7d2533c
...
...
@@ -66,9 +66,11 @@
<
div
class
=
"color-subtitle-edital"
>
Submissão
até
o
dia
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
fimSubmissao
))
}}
</
div
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
button
class
=
"btn btn-opcoes-edital background-yellow"
style
=
"float: right;"
disable
>
Em
avaliação
</
button
>
<
a
href
=
"{{ route('evento.visualizarNaoLogado', ['id' =>
$evento->id
]) }}"
>
<
button
class
=
"btn btn-opcoes-edital background-yellow"
style
=
"float: right;"
disable
>
Em
avaliação
</
button
>
</
a
>
</
div
>
</
div
>
</
div
>
...
...
@@ -85,9 +87,11 @@
<
div
class
=
"color-subtitle-edital"
>
Submissão
até
o
dia
{{
date
(
'd/m/Y'
,
strtotime
(
$evento
->
fimSubmissao
))
}}
</
div
>
</
div
>
<
div
class
=
"col-sm-3"
>
<
button
class
=
"btn btn-opcoes-edital background-red"
style
=
"float: right;"
disabled
>
Encerrado
</
button
>
<
a
href
=
"{{ route('evento.visualizarNaoLogado', ['id' =>
$evento->id
]) }}"
>
<
button
class
=
"btn btn-opcoes-edital background-red"
style
=
"float: right;"
disabled
>
Encerrado
</
button
>
</
a
>
</
div
>
</
div
>
</
div
>
...
...
resources/views/planosTrabalho/index.blade.php
0 → 100644
View file @
b7d2533c
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-center titulo-menu mb-0"
>
<
h4
>
Planos
de
Trabalho
</
h4
>
</
div
>
<
div
class
=
"row justify-content-center mb-5"
>
<
h5
>
Edital
Selecionado
:
{{
$evento
->
nome
}}
</
h5
>
</
div
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"col-sm-3 d-flex justify-content-center "
>
<
a
href
=
"{{route('admin.selecionar', ['evento_id' =>
$evento->id
])}}"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center card-menu"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
div
class
=
"container"
>
<
div
class
=
"row titulo-card-menu"
>
<
div
class
=
"col-md-12"
>
<
h2
style
=
"padding-top:15px"
>
Selecionar
avaliadores
</
h2
>
</
div
>
</
div
>
@
php
$avaliadores
=
\
App\Avaliador
::
count
();
@
endphp
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h5
>
Nº
total
de
avaliadores
:</
h5
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h1
class
=
"quant-titulo-card"
>
{{
$avaliadores
}}
</
h1
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
a
>
</
div
>
<
div
class
=
"col-sm-3 d-flex justify-content-center"
>
<
a
href
=
"{{ route('plano.trabalho.selecionarPlanos', ['evento_id' =>
$evento->id
]) }}"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center card-menu"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
div
class
=
"container"
>
<
div
class
=
"row titulo-card-menu"
>
<
div
class
=
"col-md-12"
>
<
h2
style
=
"padding-top:15px"
>
Planos
de
trabalho
</
h2
>
</
div
>
</
div
>
@
php
$arquivo
=
\
App\Arquivo
::
count
();
@
endphp
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h5
>
Nº
total
de
projetos
:</
h5
>
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-12"
>
<
h1
class
=
"quant-titulo-card"
>
{{
$arquivo
}}
</
h1
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
a
>
</
div
>
</
div
>
</
div
>
@
endsection
resources/views/planosTrabalho/selecionarAvaliadores.blade.php
0 → 100644
View file @
b7d2533c
resources/views/planosTrabalho/selecionarPlanos.blade.php
0 → 100644
View file @
b7d2533c
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 30px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row justify-content-center"
style
=
"margin-bottom: 50px;"
>
<
div
class
=
"col-md-1"
>
<
a
href
=
"{{ route('plano.trabalho.index', ['evento_id' =>
$evento->id
]) }}"
class
=
"btn btn-secondary"
>
Voltar
</
a
>
</
div
>
<
div
class
=
"col-md-10"
style
=
"text-align: center;"
>
<
h3
class
=
"titulo-table"
>
Lista
de
Planos
do
Edital
:
<
span
style
=
"color: black;"
>
{{
$evento
->
nome
}}
</
span
>
</
h3
>
</
div
>
<
div
class
=
"col-md-1"
>
<!--
Button
trigger
modal
-->
{{
--
<
button
type
=
"button"
class
=
"btn btn-info"
data
-
toggle
=
"modal"
data
-
target
=
"#exampleModalCenter"
>
Enviar
Convite
</
button
>
--
}}
</
div
>
</
div
>
<
div
class
=
"row"
>
<
div
class
=
"col-md-8"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1"
>
<
button
class
=
"btn"
onclick
=
"buscar(this.parentElement.parentElement.children[1].children[0])"
>
<
img
src
=
"
{
{asset('img/icons/logo_lupa.png')}
}
"
alt
=
""
>
</
button
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
input
type
=
"text"
class
=
"form-control form-control-edit"
placeholder
=
"Digite o nome do projeto"
onkeyup
=
"buscar(this)"
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Projeto
</
th
>
<
th
scope
=
"col"
>
Proponente
</
th
>
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
</
tr
>
</
thead
>
<
tbody
id
=
"projetos"
>
@
foreach
(
$planos
as
$plano
)
<
tr
>
<
td
>
{{
$plano
->
titulo
}}
</
td
>
{{
--
<
td
>
{{
App\Area
::
find
(
$trabalho
->
area_id
)
->
nome
}}
</
td
>
--
}}
<
td
>
{{
$plano
->
participante
->
user
->
name
}}
</
td
>
<
td
style
=
"text-align:center"
>
<
button
type
=
"button"
class
=
"btn btn-primary"
value
=
"{{
$plano->id
}}"
id
=
"atribuir1"
data
-
toggle
=
"modal"
data
-
target
=
"#exampleModalCenter{{
$plano->id
}}"
>
Atribuir
</
button
>
<!--
Modal
-->
<
div
class
=
"modal fade"
id
=
"exampleModalCenter{{
$plano->id
}}"
tabindex
=
"-1"
role
=
"dialog"
aria
-
labelledby
=
"exampleModalCenterTitle"
aria
-
hidden
=
"true"
>
<
div
class
=
"modal-dialog modal-dialog-centered"
role
=
"document"
>
<
div
class
=
"modal-content modal-submeta"
>
<
div
class
=
"modal-header modal-header-submeta"
>
<
h5
class
=
"modal-title titulo-table"
id
=
"exampleModalLongTitle"
>
Selecione
o
(
s
)
avaliador
(
es
)
</
h5
>
<
button
type
=
"button"
class
=
"close"
data
-
dismiss
=
"modal"
aria
-
label
=
"Close"
style
=
"color: rgb(182, 182, 182)"
>
<
span
aria
-
hidden
=
"true"
>&
times
;
</
span
>
</
button
>
</
div
>
<
div
class
=
"modal-body"
>
<
form
action
=
"{{ route('plano.trabalho.atribuicao') }}"
method
=
"POST"
>
@
csrf
<
input
type
=
"hidden"
name
=
"plano_id"
value
=
"{{
$plano->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlSelect2"
>
Selecione
o
(
s
)
avaliador
(
es
)
para
esse
plano
</
label
>
<
select
name
=
"avaliadores_id[]"
multiple
class
=
"form-control"
id
=
"exampleFormControlSelect2"
>
@
foreach
(
$plano
->
aval
as
$avaliador
)
<
option
value
=
"{{
$avaliador->id
}}"
>
{{
$avaliador
->
user
->
name
}}
({{
$avaliador
->
area
->
nome
??
'Indefinida'
}})
</
option
>
@
endforeach
</
select
>
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
</
div
>
<
div
>
<
button
type
=
"submit"
class
=
"btn btn-info"
style
=
"width: 100%"
>
Atribuir
</
button
>
</
div
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
<
div
class
=
"container"
style
=
"margin-top: 50px;"
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
h3
class
=
"titulo-table"
>
Status
dos
Planos
em
Avaliação
do
edital
:
<
span
style
=
"color: black;"
>
{{
$evento
->
nome
}}
</
span
>
</
h3
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Usuário
</
th
>
<
th
scope
=
"col"
>
E
-
mail
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$avaliadores
as
$avaliador
)
@
php
$contador
=
0
;
@
endphp
@
foreach
(
$avaliador
->
planoTrabalhos
as
$plano
)
@
if
(
$plano
->
pivot
->
status
==
true
)
@
php
$contador
++
;
@
endphp
@
endif
@
endforeach
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$contador
}}
/
{{
$avaliador
->
planoTrabalhos
->
count
()
}}
</
td
>
<
td
style
=
"text-align:center"
>
...
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
<!--
Button
trigger
modal
-->
@
endsection
@
section
(
'javascript'
)
<
script
>
$
(
'#myModal'
)
.
on
(
'shown.bs.modal'
,
function
()
{
$
(
'#myInput'
)
.
trigger
(
'focus'
)
});
function
buscar
(
input
)
{
var
editais
=
document
.
getElementById
(
'projetos'
)
.
children
;
if
(
input
.
value
.
length
>
2
)
{
for
(
var
i
=
0
;
i
<
editais
.
length
;
i
++
)
{
var
nomeEvento
=
editais
[
i
]
.
children
[
0
]
.
textContent
;
if
(
nomeEvento
.
substr
(
0
)
.
indexOf
(
input
.
value
)
>=
0
)
{
editais
[
i
]
.
style
.
display
=
""
;
}
else
{
editais
[
i
]
.
style
.
display
=
"none"
;
}
}
}
else
{
for
(
var
i
=
0
;
i
<
editais
.
length
;
i
++
)
{
editais
[
i
]
.
style
.
display
=
""
;
}
}
}
</
script
>
@
endsection
Prev
1
2
Next
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