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
415f066b
Commit
415f066b
authored
Jun 03, 2020
by
Gabriel-31415
Browse files
parecer de avaliador
parent
6d92b310
Changes
13
Show whitespace changes
Inline
Side-by-side
app/Http/Controllers/AvaliadorController.php
View file @
415f066b
...
...
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
use
Illuminate\Http\Request
;
use
Auth
;
use
App\Trabalho
;
class
AvaliadorController
extends
Controller
{
...
...
@@ -21,4 +22,28 @@ class AvaliadorController extends Controller
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
]);
}
public
function
parecer
(
Request
$request
){
//$trabalho = Trabalho::find($request->trabalho_id);
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
]);
}
public
function
enviarParecer
(
Request
$request
){
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
1
);
$avaliador
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,
[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$request
->
anexoParecer
]);
// dd($trabalho);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
]);
}
}
app/Http/Controllers/TrabalhoController.php
View file @
415f066b
...
...
@@ -76,6 +76,9 @@ class TrabalhoController extends Controller
$mytime
=
$mytime
->
toDateString
();
$evento
=
Evento
::
find
(
$request
->
editalId
);
$coordenador
=
CoordenadorComissao
::
find
(
$evento
->
coordenadorId
);
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
//$trabalho->proponentes()->save($proponente);
//dd($coordenador->id);
if
(
$evento
->
inicioSubmissao
>
$mytime
){
...
...
@@ -105,6 +108,7 @@ class TrabalhoController extends Controller
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
]);
//dd($request->all());
$trabalho
=
Trabalho
::
create
([
'titulo'
=>
$request
->
nomeProjeto
,
...
...
@@ -118,14 +122,16 @@ class TrabalhoController extends Controller
'data'
=>
$mytime
,
'evento_id'
=>
$request
->
editalId
,
'avaliado'
=>
0
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexoDecisaoCONSU'
=>
$request
->
anexoCONSU
,
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'JustificativaAutorizacaoEtica'
=>
$request
->
JustificativaAutorizacaoEtica
,
'anexoLattesCoordenador'
=>
$request
->
anexoLatterCoordenador
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
//dd($
request->all()
);
//dd($
trabalho
);
}
else
{
//Caso em que o anexo da Decisão do CONSU não necessário
$validatedData
=
$request
->
validate
([
...
...
@@ -160,18 +166,18 @@ class TrabalhoController extends Controller
'data'
=>
$mytime
,
'evento_id'
=>
$request
->
editalId
,
'avaliado'
=>
0
,
'proponente_id'
=>
$proponente
->
id
,
//Anexos
'anexoProjeto'
=>
$request
->
anexoProjeto
,
'anexoAutorizacaoComiteEtica'
=>
$request
->
anexoComiteEtica
,
'JustificativaAutorizacaoEtica'
=>
$request
->
JustificativaAutorizacaoEtica
,
'anexoLattesCoordenador'
=>
$request
->
anexoLatterCoordenador
,
'anexoPlanilhaPontuacao'
=>
$request
->
anexoPlanilha
,
]);
}
//Relaciona o projeto criado com o proponente que criou o projeto
$proponente
=
Proponente
::
where
(
'user_id'
,
Auth
::
user
()
->
id
)
->
first
();
$trabalho
->
proponentes
()
->
save
(
$proponente
);
//Envia email com senha temp para cada participante do projeto
if
(
$request
->
emailParticipante
!=
null
){
...
...
app/Trabalho.php
View file @
415f066b
...
...
@@ -14,7 +14,7 @@ class Trabalho extends Model
protected
$fillable
=
[
'titulo'
,
'data'
,
'a
vali
ado'
,
'a
prov
ado'
,
'decisaoCONSU'
,
'pontuacaoPlanilha'
,
'linkGrupoPesquisa'
,
...
...
@@ -22,6 +22,7 @@ class Trabalho extends Model
'anexoDecisaoCONSU'
,
'anexoAutorizacaoComiteEtica'
,
'JustificativaAutorizacaoEtica'
,
'anexoLattesCoordenador'
,
'anexoPlanilhaPontuacao'
,
'anexoProjeto'
,
...
...
database/migrations/2020_02_05_123048_create_trabalhos_table.php
View file @
415f066b
...
...
@@ -16,7 +16,7 @@ class CreateTrabalhosTable extends Migration
Schema
::
create
(
'trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'titulo'
);
$table
->
boolean
(
'a
vali
ado'
)
->
nullable
();
$table
->
boolean
(
'a
prov
ado'
)
->
nullable
();
$table
->
string
(
'linkGrupoPesquisa'
);
$table
->
string
(
'linkLattesEstudante'
);
$table
->
string
(
'pontuacaoPlanilha'
);
...
...
@@ -26,7 +26,8 @@ class CreateTrabalhosTable extends Migration
$table
->
string
(
'anexoDecisaoCONSU'
)
->
nullable
();
$table
->
string
(
'anexoPlanilhaPontuacao'
);
$table
->
string
(
'anexoLattesCoordenador'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
);
$table
->
string
(
'anexoAutorizacaoComiteEtica'
)
->
nullable
();;
$table
->
string
(
'JustificativaAutorizacaoEtica'
)
->
nullable
();;
//chaves estrangeiras
$table
->
unsignedBigInteger
(
'grande_area_id'
);
$table
->
unsignedBigInteger
(
'area_id'
);
...
...
database/seeds/DatabaseSeeder.php
View file @
415f066b
...
...
@@ -84,6 +84,7 @@ class DatabaseSeeder extends Seeder
'numMaxTrabalhos'
=>
2
,
'numMaxCoautores'
=>
5
,
'coordenadorId'
=>
1
,
'created_at'
=>
'2020-03-30'
,
'criador_id'
=>
1
,
]);
...
...
database/seeds/TrabalhoSeeder.php
View file @
415f066b
...
...
@@ -34,6 +34,7 @@ class TrabalhoSeeder extends Seeder
'linkGrupoPesquisa'
=>
'link'
,
'linkLattesEstudante'
=>
'link'
,
'pontuacaoPlanilha'
=>
'link'
,
'aprovado'
=>
0
,
'data'
=>
'2020-01-01'
,
'anexoProjeto'
=>
'Álgebra'
,
'anexoDecisaoCONSU'
=>
'Álgebra'
,
...
...
@@ -46,6 +47,7 @@ class TrabalhoSeeder extends Seeder
'evento_id'
=>
1
,
'coordenador_id'
=>
1
,
'proponente_id'
=>
1
,
'created_at'
=>
'2020-01-01'
,
]);
DB
::
table
(
'trabalhos'
)
->
insert
([
...
...
@@ -53,6 +55,7 @@ class TrabalhoSeeder extends Seeder
'linkGrupoPesquisa'
=>
'link'
,
'linkLattesEstudante'
=>
'link'
,
'pontuacaoPlanilha'
=>
'link'
,
'aprovado'
=>
0
,
'data'
=>
'2020-01-01'
,
'anexoProjeto'
=>
'Álgebra'
,
'anexoDecisaoCONSU'
=>
'Álgebra'
,
...
...
@@ -65,6 +68,7 @@ class TrabalhoSeeder extends Seeder
'evento_id'
=>
1
,
'coordenador_id'
=>
1
,
'proponente_id'
=>
1
,
'created_at'
=>
'2020-01-02'
,
]);
}
...
...
resources/views/administrador/editais.blade.php
View file @
415f066b
...
...
@@ -38,8 +38,9 @@
{{
$evento
->
nome
}}
</
a
>
</
td
>
<
td
>
10
/
05
/
2020
</
td
>
<
td
>
{{
$evento
->
created_at
}}
</
td
>
<
td
>
@
if
(
auth
()
->
user
()
->
id
==
$evento
->
criador_id
)
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
{{
--
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
--
}}
...
...
@@ -64,6 +65,7 @@
</
form
>
</
div
>
</
div
>
@
endif
</
td
>
</
tr
>
@
endforeach
...
...
@@ -90,7 +92,7 @@
</
a
>
</
td
>
<
td
></
td
>
<
td
>
10
/
05
/
2020
</
td
>
<
td
>
{{
$evento
->
created_at
}}
</
td
>
<
td
>
<
div
class
=
"btn-group dropright dropdown-options"
>
<
a
id
=
"options"
class
=
"dropdown-toggle "
data
-
toggle
=
"dropdown"
aria
-
haspopup
=
"true"
aria
-
expanded
=
"false"
>
...
...
resources/views/avaliador/index.blade.php
View file @
415f066b
...
...
@@ -19,7 +19,7 @@
</
div
>
<
div
class
=
"col-sm-4 d-flex justify-content-center"
>
<
a
href
=
"{{ route('visualizarTrabalho') }}"
style
=
"text-decoration:none; color: inherit;"
>
<
a
href
=
"{{ route('
avaliador.
visualizarTrabalho') }}"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center "
style
=
"border-radius: 30px; width: 18rem;"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
h2
style
=
"padding-top:15px"
>
Trabalhos
</
h2
>
...
...
resources/views/avaliador/listarTrabalhos.blade.php
View file @
415f066b
...
...
@@ -25,9 +25,25 @@
@
foreach
(
$trabalhos
as
$trabalho
)
<
tr
>
<
td
>
{{
$trabalho
->
titulo
}}
</
td
>
<
td
>
{{
$trabalho
->
create_at
}}
</
td
>
<
td
>
baixar
</
td
>
<
td
>
parecer
</
td
>
<
td
>
{{
$trabalho
->
created_at
}}
</
td
>
<
td
>
{{
--
{{
route
(
'download'
,
[
'file'
=>
$arquivo
])}}
--
}}
<
a
target
=
"_new"
style
=
"font-size: 20px; color: #114048ff;"
>
<
img
class
=
""
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
style
=
"width:20px"
>
</
a
>
</
td
>
<
td
>
<
div
class
=
"row"
>
<
form
action
=
"{{ route('avaliador.parecer') }}"
method
=
"POST"
>
@
csrf
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
Parecer
</
button
>
</
form
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
...
...
resources/views/avaliador/parecer.blade.php
0 → 100644
View file @
415f066b
@
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"
>
Trabalho
:
{{
$trabalho
->
titulo
}}
</
h6
>
<
p
class
=
"card-text"
>
<
form
method
=
"POST"
action
=
"
{
{route('avaliador.enviarParecer')}
}
"
enctype
=
"multipart/form-data"
>
@
csrf
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlTextarea1"
>
Parecer
:</
label
>
<
textarea
class
=
"form-control"
id
=
"exampleFormControlTextarea1"
rows
=
"3"
name
=
"textParecer"
>
{{
$trabalho
->
pivot
->
parecer
}}
</
textarea
>
</
div
>
<
div
class
=
"form-group"
>
@
if
(
$trabalho
->
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"
>
Atualizar
arquivo
do
Parecer
?</
label
>
<
br
>
<
label
for
=
"exampleFormControlFile1"
>
Arquivo
:
{{
$trabalho
->
pivot
->
AnexoParecer
}}
</
label
>
<
input
type
=
"file"
class
=
"form-control-file"
id
=
"exampleFormControlFile1"
name
=
"anexoParecer"
>
@
endif
</
div
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Enviar
</
button
>
<
a
href
=
"
{
{url()->previous()}
}
"
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 @
415f066b
...
...
@@ -99,7 +99,7 @@
<input class="
form
-
control
" type="
text
" name="
linkLattesEstudante
"
@if(Auth()->user()->proponentes->linkLattes != null)
value="
{{
Auth
()
->
user
()
->
proponentes
->
linkLattes
}}
"
disabled="
disabled
"
@else
value=""
@endif >
...
...
@@ -115,26 +115,6 @@
</div>
{{-- Pontuação da Planilha de Pontuação --}}
<div class="
row
justify
-
content
-
center
mt
-
2
">
{{-- Nome Trabalho --}}
</div>
{{-- Link do grupo de pesquisa --}}
<div class="
row
justify
-
content
-
center
mb
-
3
">
</div>
{{-- Link do grupo de pesquisa --}}
<div class="
row
justify
-
content
-
center
mb
-
3
">
</div>
<hr>
<h3>Anexos</h3>
...
...
@@ -176,19 +156,20 @@
</span>
@enderror
</div>
<form>
<input type="
radio
" name="
colors
" id="
red
">Red<br>
<input type="
radio
" name="
colors
" id="
blue
">Blue
</form>
<div class="
col
-
sm
-
6
" >
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Autorização do Comitê de Ética:') }}</label>
<div class="
col
-
sm
-
6
" >
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Possui autorização do Comitê de Ética:') }}</label>
<button id="
buttonSim
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Sim</button>
<button id="
buttonNao
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Não</button>
<div class="
input
-
group
">
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
" id="
input
GroupFile01
"
<input type="
file
" class="
custom
-
file
-
input
" id="
input
Etica
"
aria-describedby="
inputGroupFileAddon01
" name="
anexoComiteEtica
">
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
...
...
@@ -200,7 +181,7 @@
@enderror
</div>
<div class="
col
-
sm
-
6
" >
<div class="
col
-
sm
-
6
mt
-
3
" >
<label for="
anexoPlanilha
" class="
col
-
form
-
label
">{{ __('Anexo do Planilha de Pontuação :') }}</label>
<div class="
input
-
group
">
...
...
@@ -217,15 +198,29 @@
</span>
@enderror
</div>
</div>
<div class="
col
-
sm
-
6
" >
<label for="
nomeTrabalho
" class="
col
-
form
-
label
">{{ __('Justificativa:') }}</label>
<div class="
input
-
group
">
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
" id="
inputJustificativa
"
aria-describedby="
inputGroupFileAddon01
" disabled="
disabled
" name="
JustificativaAutorizacaoEtica
">
<label class="
custom
-
file
-
label
" id="
custom
-
file
-
label
" for="
inputGroupFile01
">O arquivo deve ser no formato PDF de até 2mb.</label>
</div>
</div>
@error('arquivo')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<strong>{{
$message
}}</strong>
</span>
@enderror
</div>
@if(
$edital->tipo
== 'PIBIC' ||
$edital->tipo
== 'PIBIC-EM')
{{-- Decisão do CONSU --}}
<div class="
row
justify
-
content
-
center
">
{{-- Arquivo --}}
<div class="
col
-
sm
-
12
" >
<div class="
col
-
sm
-
6
" >
<label for="
anexoCONSU
" class="
col
-
form
-
label
">{{ __('Decisão do CONSU:') }}</label>
<div class="
input
-
group
">
...
...
@@ -242,9 +237,9 @@
</span>
@enderror
</div>
</div>
@endif
</div>
<hr>
<h4>Participantes</h4>
...
...
@@ -426,6 +421,20 @@
$
(
this
)
.
next
(
'#custom-file-label'
)
.
html
(
fileName
);
})
// F
$
(
'#buttonSim'
)
.
on
(
'click'
,
function
(
e
){
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
false
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
true
);
});
$
(
'#buttonNao'
)
.
on
(
'click'
,
function
(
e
){
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
console
.
log
(
'button nao'
);
});
});
// Remover Coautor
...
...
resources/views/proponente/index.blade.php
View file @
415f066b
...
...
@@ -19,7 +19,7 @@
</
div
>
<
div
class
=
"col-sm-3 d-flex justify-content-center"
>
<
a
href
=
""
style
=
"text-decoration:none; color: inherit;"
>
<
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"
>
Projetos
</
h2
>
...
...
@@ -28,7 +28,7 @@
</
a
>
</
div
>
<
div
class
=
"col-sm-3 d-flex justify-content-center"
>
<
a
href
=
""
style
=
"text-decoration:none; color: inherit;"
>
<
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
>
...
...
routes/web.php
View file @
415f066b
...
...
@@ -20,8 +20,12 @@ Route::get('/evento/visualizar/naologado/{id}','EventoController@showNaoLogado'
Auth
::
routes
([
'verify'
=>
true
]);
//######## Rotas Avaliador ####################################
Route
::
get
(
'/avaliador/index'
,
'AvaliadorController@index'
)
->
name
(
'avaliador.index'
);
Route
::
get
(
'/avaliador/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
Route
::
prefix
(
'avaliador'
)
->
name
(
'avaliador.'
)
->
group
(
function
(){
Route
::
get
(
'/index'
,
'AvaliadorController@index'
)
->
name
(
'index'
);
Route
::
get
(
'/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
Route
::
post
(
'/parecer'
,
'AvaliadorController@parecer'
)
->
name
(
'parecer'
);
Route
::
post
(
'/Enviarparecer'
,
'AvaliadorController@enviarParecer'
)
->
name
(
'enviarParecer'
);
});
//######### Proponente ########################################
Route
::
get
(
'/proponente/index'
,
'ProponenteController@index'
)
->
name
(
'proponente.index'
);
...
...
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