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
fb517551
Commit
fb517551
authored
Jun 04, 2020
by
Gabriel-31415
Browse files
cricao de recomendacao e area para avaliador
parent
debdab41
Changes
19
Hide whitespace changes
Inline
Side-by-side
app/Area.php
View file @
fb517551
...
@@ -34,4 +34,7 @@ class Area extends Model
...
@@ -34,4 +34,7 @@ class Area extends Model
public
function
revisor
(){
public
function
revisor
(){
return
$this
->
hasMany
(
'App\User'
,
'eventoId'
);
return
$this
->
hasMany
(
'App\User'
,
'eventoId'
);
}
}
public
function
avaliador
(){
return
$this
->
hasMany
(
'App\Area'
);
}
}
}
app/Avaliador.php
View file @
fb517551
...
@@ -16,9 +16,13 @@ class Avaliador extends Model
...
@@ -16,9 +16,13 @@ class Avaliador extends Model
return
$this
->
belongsTo
(
'App\User'
);
return
$this
->
belongsTo
(
'App\User'
);
}
}
public
function
trabalhos
(){
public
function
trabalhos
(){
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
);
return
$this
->
belongsToMany
(
'App\Trabalho'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao_id'
);
}
}
public
function
eventos
(){
public
function
eventos
(){
return
$this
->
belongsToMany
(
'App\Evento'
);
return
$this
->
belongsToMany
(
'App\Evento'
);
}
}
public
function
area
(){
return
$this
->
belongsTo
(
'App\Area'
);
}
}
}
app/Http/Controllers/AvaliadorController.php
View file @
fb517551
...
@@ -5,6 +5,8 @@ namespace App\Http\Controllers;
...
@@ -5,6 +5,8 @@ namespace App\Http\Controllers;
use
Illuminate\Http\Request
;
use
Illuminate\Http\Request
;
use
Auth
;
use
Auth
;
use
App\Trabalho
;
use
App\Trabalho
;
use
App\Evento
;
use
App\Recomendacao
;
class
AvaliadorController
extends
Controller
class
AvaliadorController
extends
Controller
{
{
...
@@ -13,13 +15,23 @@ class AvaliadorController extends Controller
...
@@ -13,13 +15,23 @@ class AvaliadorController extends Controller
return
view
(
'avaliador.index'
);
return
view
(
'avaliador.index'
);
}
}
public
function
editais
(){
$eventos
=
Auth
()
->
user
()
->
avaliadors
->
eventos
;
return
view
(
'avaliador.editais'
,
[
"eventos"
=>
$eventos
]);
}
public
function
visualizarTrabalhos
(
Request
$request
){
public
function
visualizarTrabalhos
(
Request
$request
){
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
$trabalhos_id
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
->
pluck
(
'id'
);;
$evento
=
Evento
::
where
(
'id'
,
$request
->
evento_id
)
->
first
();
$trabalhos
=
$evento
->
trabalhos
->
whereIn
(
'id'
,
$trabalhos_id
);
//dd($trabalhos);
//dd($trabalhos);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
]);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
}
...
@@ -28,31 +40,30 @@ class AvaliadorController extends Controller
...
@@ -28,31 +40,30 @@ class AvaliadorController extends Controller
//$trabalho = Trabalho::find($request->trabalho_id);
//$trabalho = Trabalho::find($request->trabalho_id);
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$evento
=
Evento
::
find
(
$request
->
evento
);
$recomendacaos
=
Recomendacao
::
all
();
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
]);
//dd($request->all());
return
view
(
'avaliador.parecer'
,
[
'trabalho'
=>
$trabalho
,
'evento'
=>
$evento
,
'recomendacaos'
=>
$recomendacaos
]);
}
}
public
function
enviarParecer
(
Request
$request
){
public
function
enviarParecer
(
Request
$request
){
$evento
=
Evento
::
find
(
$request
->
evento_id
);
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
$trabalhos
=
Auth
::
user
()
->
avaliadors
->
first
()
->
trabalhos
;
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$avaliador
=
Auth
::
user
()
->
avaliadors
->
first
();
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
$trabalho
=
$avaliador
->
trabalhos
->
find
(
$request
->
trabalho_id
);
if
(
$request
->
anexoParecer
==
''
){
if
(
$request
->
anexoParecer
==
''
){
$avaliador
$avaliador
->
trabalhos
()
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
]);
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'recomendacao_id'
=>
$request
->
recomendacao_id
]);
}
else
{
}
else
{
$avaliador
$avaliador
->
trabalhos
()
->
trabalhos
()
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
->
updateExistingPivot
(
$trabalho
->
id
,[
'status'
=>
1
,
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$request
->
anexoParecer
,
'recomendacao_id'
=>
$request
->
recomendacao_id
]);
'parecer'
=>
$request
->
textParecer
,
'AnexoParecer'
=>
$request
->
anexoParecer
]);
}
}
// dd($trabalho);
// dd($trabalho);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
]);
return
view
(
'avaliador.listarTrabalhos'
,
[
'trabalhos'
=>
$trabalhos
,
'evento'
=>
$evento
]);
}
}
}
}
app/Recomendacao.php
0 → 100644
View file @
fb517551
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Recomendacao
extends
Model
{
protected
$fillable
=
[
'nome'
];
}
app/Trabalho.php
View file @
fb517551
...
@@ -85,6 +85,6 @@ class Trabalho extends Model
...
@@ -85,6 +85,6 @@ class Trabalho extends Model
return
$this
->
belongsTo
(
'App\CoordenadorComissao'
);
return
$this
->
belongsTo
(
'App\CoordenadorComissao'
);
}
}
public
function
avaliadors
(){
public
function
avaliadors
(){
return
$this
->
belongsToMany
(
'App\Avaliador'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
);
return
$this
->
belongsToMany
(
'App\Avaliador'
)
->
withPivot
(
'status'
,
'AnexoParecer'
,
'parecer'
,
'recomendacao_id'
);
}
}
}
}
database/migrations/2020_05_23_054805_create_avaliadors_table.php
View file @
fb517551
...
@@ -19,6 +19,9 @@ class CreateAvaliadorsTable extends Migration
...
@@ -19,6 +19,9 @@ class CreateAvaliadorsTable extends Migration
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'user_id'
)
->
nullable
();
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
foreign
(
'user_id'
)
->
references
(
'id'
)
->
on
(
'users'
);
$table
->
unsignedBigInteger
(
'area_id'
)
->
nullable
();
$table
->
foreign
(
'area_id'
)
->
references
(
'id'
)
->
on
(
'areas'
);
});
});
}
}
...
...
database/migrations/2020_05_26_223341_create_avaliadors_trabalhos_table.php
View file @
fb517551
...
@@ -21,6 +21,7 @@ class CreateAvaliadorsTrabalhosTable extends Migration
...
@@ -21,6 +21,7 @@ class CreateAvaliadorsTrabalhosTable extends Migration
$table
->
string
(
'AnexoParecer'
)
->
nullable
();
$table
->
string
(
'AnexoParecer'
)
->
nullable
();
$table
->
boolean
(
'status'
)
->
nullable
();
$table
->
boolean
(
'status'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'recomendacao_id'
)
->
nullable
();
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
$table
->
unsignedBigInteger
(
'avaliador_id'
);
...
...
database/migrations/2020_06_04_054313_create_recomendacaos_table.php
0 → 100644
View file @
fb517551
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreateRecomendacaosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'recomendacaos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'nome'
);
$table
->
timestamps
();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'recomendacaos'
);
}
}
database/migrations/2020_06_04_060029_add_recomendacao_avaliador_trabalho_table.php
0 → 100644
View file @
fb517551
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
AddRecomendacaoAvaliadorTrabalhoTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
table
(
'avaliador_trabalho'
,
function
(
Blueprint
$table
)
{
$table
->
foreign
(
'recomendacao_id'
)
->
references
(
'id'
)
->
on
(
'recomendacaos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
table
(
'avaliador_trabalho'
,
function
(
Blueprint
$table
)
{
//
});
}
}
database/seeds/AvaliadorSeeder.php
View file @
fb517551
...
@@ -16,6 +16,7 @@ class AvaliadorSeeder extends Seeder
...
@@ -16,6 +16,7 @@ class AvaliadorSeeder extends Seeder
DB
::
table
(
'avaliadors'
)
->
insert
([
DB
::
table
(
'avaliadors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
'area_id'
=>
1
,
]);
]);
$aval
=
App\Avaliador
::
find
(
1
);
$aval
=
App\Avaliador
::
find
(
1
);
...
@@ -35,6 +36,7 @@ class AvaliadorSeeder extends Seeder
...
@@ -35,6 +36,7 @@ class AvaliadorSeeder extends Seeder
DB
::
table
(
'avaliadors'
)
->
insert
([
DB
::
table
(
'avaliadors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
'area_id'
=>
1
,
]);
]);
$aval
=
App\Avaliador
::
find
(
2
);
$aval
=
App\Avaliador
::
find
(
2
);
$evento
=
App\Evento
::
find
(
1
);
$evento
=
App\Evento
::
find
(
1
);
...
@@ -49,6 +51,7 @@ class AvaliadorSeeder extends Seeder
...
@@ -49,6 +51,7 @@ class AvaliadorSeeder extends Seeder
DB
::
table
(
'avaliadors'
)
->
insert
([
DB
::
table
(
'avaliadors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
'area_id'
=>
1
,
]);
]);
// $aval = App\Avaliador::find(2);
// $aval = App\Avaliador::find(2);
...
@@ -61,6 +64,7 @@ class AvaliadorSeeder extends Seeder
...
@@ -61,6 +64,7 @@ class AvaliadorSeeder extends Seeder
DB
::
table
(
'avaliadors'
)
->
insert
([
DB
::
table
(
'avaliadors'
)
->
insert
([
'user_id'
=>
$user_id
[
0
],
'user_id'
=>
$user_id
[
0
],
'area_id'
=>
1
,
]);
]);
}
}
}
}
database/seeds/DatabaseSeeder.php
View file @
fb517551
...
@@ -23,6 +23,7 @@ class DatabaseSeeder extends Seeder
...
@@ -23,6 +23,7 @@ class DatabaseSeeder extends Seeder
$this
->
call
(
CoordenadorComissaoSeeder
::
class
);
$this
->
call
(
CoordenadorComissaoSeeder
::
class
);
$this
->
call
(
ParticipanteSeeder
::
class
);
$this
->
call
(
ParticipanteSeeder
::
class
);
$this
->
call
(
NaturezaSeeder
::
class
);
$this
->
call
(
NaturezaSeeder
::
class
);
$this
->
call
(
RecomendacaoSeeder
::
class
);
// $this->call(UsersTableSeeder::class);
// $this->call(UsersTableSeeder::class);
...
...
database/seeds/RecomendacaoSeeder.php
0 → 100644
View file @
fb517551
<?php
use
Illuminate\Database\Seeder
;
class
RecomendacaoSeeder
extends
Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public
function
run
()
{
DB
::
table
(
'recomendacaos'
)
->
insert
([
'nome'
=>
'Aceitacao Forte'
,
]);
DB
::
table
(
'recomendacaos'
)
->
insert
([
'nome'
=>
'Aceitacao Média'
,
]);
DB
::
table
(
'recomendacaos'
)
->
insert
([
'nome'
=>
'Aceitacao Fraca'
,
]);
}
}
resources/views/administrador/selecionarAvaliadores.blade.php
View file @
fb517551
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<
tr
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Usuário
</
th
>
<
th
scope
=
"col"
>
Nome
do
Usuário
</
th
>
<
th
scope
=
"col"
>
Email
</
th
>
<
th
scope
=
"col"
>
Email
</
th
>
<
th
scope
=
"col"
>
Área
</
th
>
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
<
th
scope
=
"col"
style
=
"text-align:center"
>
Ação
</
th
>
</
tr
>
</
tr
>
</
thead
>
</
thead
>
...
@@ -34,6 +35,7 @@
...
@@ -34,6 +35,7 @@
<
tr
>
<
tr
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
name
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$avaliador
->
user
->
email
}}
</
td
>
<
td
>
{{
$avaliador
->
area
->
nome
}}
</
td
>
<
td
style
=
"text-align:center"
>
<
td
style
=
"text-align:center"
>
<
form
action
=
"{{ route('admin.adicionar') }}"
method
=
"POST"
>
<
form
action
=
"{{ route('admin.adicionar') }}"
method
=
"POST"
>
@
csrf
@
csrf
...
...
resources/views/administrador/selecionarProjetos.blade.php
View file @
fb517551
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<
label
for
=
"exampleFormControlSelect2"
>
Example
multiple
select
</
label
>
<
label
for
=
"exampleFormControlSelect2"
>
Example
multiple
select
</
label
>
<
select
name
=
"avaliadores_id[]"
multiple
class
=
"form-control"
id
=
"exampleFormControlSelect2"
>
<
select
name
=
"avaliadores_id[]"
multiple
class
=
"form-control"
id
=
"exampleFormControlSelect2"
>
@
foreach
(
$trabalho
->
aval
as
$avaliador
)
@
foreach
(
$trabalho
->
aval
as
$avaliador
)
<
option
value
=
"{{
$avaliador->id
}}"
>
{{
$avaliador
->
user
->
name
}}
</
option
>
<
option
value
=
"{{
$avaliador->id
}}"
>
{{
$avaliador
->
user
->
name
}}
({{
$avaliador
->
area
->
nome
}})
</
option
>
@
endforeach
@
endforeach
</
select
>
</
select
>
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
<
small
id
=
"emailHelp"
class
=
"form-text text-muted"
>
Segure
SHIFT
do
teclado
para
selecionar
mais
de
um
.
</
small
>
...
...
resources/views/avaliador/editais.blade.php
View file @
fb517551
...
@@ -6,12 +6,9 @@
...
@@ -6,12 +6,9 @@
<
div
class
=
"container"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-1
0
"
>
<
div
class
=
"col-sm-1
2
"
>
<
h3
>
Meus
Editais
</
h3
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
</
div
>
<
div
class
=
"col-sm-2"
>
<
a
href
=
"
{
{route('evento.criar')}
}
"
class
=
"btn btn-primary"
>
Criar
Edital
</
a
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
<
hr
>
<
hr
>
...
@@ -26,10 +23,8 @@
...
@@ -26,10 +23,8 @@
<
tbody
>
<
tbody
>
@
foreach
(
$eventos
as
$evento
)
@
foreach
(
$eventos
as
$evento
)
<
tr
>
<
tr
>
<
td
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
{{
$evento
->
nome
}}
</
a
>
</
td
>
</
td
>
<
td
>
10
/
05
/
2020
</
td
>
<
td
>
10
/
05
/
2020
</
td
>
<
td
>
<
td
>
...
@@ -38,23 +33,11 @@
...
@@ -38,23 +33,11 @@
{{
--
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
--
}}
{{
--
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
--
}}
</
a
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('
coord.detalhesEvent
o', ['evento
I
d' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
a
href
=
"{{ route('
avaliador.visualizarTrabalh
o', ['evento
_i
d' =>
$evento->id
]) }}"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
<
img
src
=
"
{
{asset('img/icons/eye-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Detalhes
Projetos
para
avaliar
</
a
>
</
a
>
<
a
href
=
"
{
{route('evento.editar',$evento->id)}
}
"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/edit-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Editar
</
a
>
<
form
method
=
"POST"
action
=
"
{
{route('evento.deletar',$evento->id)}
}
"
>
{{
csrf_field
()
}}
{{
method_field
(
'DELETE'
)
}}
<
button
type
=
"submit"
class
=
"dropdown-item"
>
<
img
src
=
"
{
{asset('img/icons/trash-alt-regular.svg')}
}
"
class
=
"icon-card"
alt
=
""
>
Deletar
</
button
>
</
form
>
</
div
>
</
div
>
</
div
>
</
div
>
</
td
>
</
td
>
...
...
resources/views/avaliador/index.blade.php
View file @
fb517551
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"row justify-content-center d-flex align-items-center"
>
<
div
class
=
"col-sm-4 d-flex justify-content-center "
>
<
div
class
=
"col-sm-4 d-flex justify-content-center "
>
<
a
href
=
"
#
"
style
=
"text-decoration:none; color: inherit;"
>
<
a
href
=
"
{{ route('avaliador.editais') }}
"
style
=
"text-decoration:none; color: inherit;"
>
<
div
class
=
"card text-center "
style
=
"border-radius: 30px; width: 18rem;"
>
<
div
class
=
"card text-center "
style
=
"border-radius: 30px; width: 18rem;"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
div
class
=
"card-body d-flex justify-content-center"
>
<
h2
style
=
"padding-top:15px"
>
Editais
</
h2
>
<
h2
style
=
"padding-top:15px"
>
Editais
</
h2
>
...
@@ -17,25 +17,6 @@
...
@@ -17,25 +17,6 @@
</
div
>
</
div
>
</
a
>
</
a
>
</
div
>
</
div
>
<
div
class
=
"col-sm-4 d-flex justify-content-center"
>
<
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
>
</
div
>
</
div
>
</
a
>
</
div
>
<
div
class
=
"col-sm-4 d-flex justify-content-center"
>
<
a
href
=
"{{ route('admin.usuarios') }}"
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"
>
Usuários
</
h2
>
</
div
>
</
div
>
</
a
>
</
div
>
</
div
>
</
div
>
...
...
resources/views/avaliador/listarTrabalhos.blade.php
View file @
fb517551
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<
div
class
=
"container"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Trabalhos
</
h3
>
<
h3
>
Trabalhos
do
Edital
:
{{
$evento
->
nome
}}
</
h3
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
</
td
>
</
td
>
<
td
>
<
td
>
<
div
class
=
"row"
>
<
div
class
=
"row"
>
<
form
action
=
"{{ route('avaliador.parecer') }}"
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
}}"
>
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
<
button
type
=
"submit"
class
=
"btn btn-primary mr-2 ml-2"
>
...
...
resources/views/avaliador/parecer.blade.php
View file @
fb517551
...
@@ -13,10 +13,20 @@
...
@@ -13,10 +13,20 @@
<
form
method
=
"POST"
action
=
"
{
{route('avaliador.enviarParecer')}
}
"
enctype
=
"multipart/form-data"
>
<
form
method
=
"POST"
action
=
"
{
{route('avaliador.enviarParecer')}
}
"
enctype
=
"multipart/form-data"
>
@
csrf
@
csrf
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
input
type
=
"hidden"
name
=
"trabalho_id"
value
=
"{{
$trabalho->id
}}"
>
<
input
type
=
"hidden"
name
=
"evento_id"
value
=
"{{
$evento->id
}}"
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
<
label
for
=
"exampleFormControlTextarea1"
>
Parecer
:</
label
>
<
label
for
=
"exampleFormControlTextarea1"
>
Parecer
:</
label
>
<
textarea
class
=
"form-control"
id
=
"exampleFormControlTextarea1"
rows
=
"3"
name
=
"textParecer"
>
{{
$trabalho
->
pivot
->
parecer
}}
</
textarea
>
<
textarea
class
=
"form-control"
id
=
"exampleFormControlTextarea1"
rows
=
"3"
name
=
"textParecer"
>
{{
$trabalho
->
pivot
->
parecer
}}
</
textarea
>
</
div
>
</
div
>
<
select
class
=
"custom-select"
name
=
"recomendacao_id"
>
@
foreach
(
$recomendacaos
as
$recomendacao
)
@
if
(
$trabalho
->
pivot
->
recomendacao_id
==
$recomendacao
->
id
)
<
option
selected
value
=
"{{
$recomendacao->id
}}"
>
{{
$recomendacao
->
nome
}}
</
option
>
@
else
<
option
value
=
"{{
$recomendacao->id
}}"
>
{{
$recomendacao
->
nome
}}
</
option
>
@
endif
@
endforeach
</
select
>
<
div
class
=
"form-group"
>
<
div
class
=
"form-group"
>
@
if
(
$trabalho
->
pivot
->
AnexoParecer
==
null
)
@
if
(
$trabalho
->
pivot
->
AnexoParecer
==
null
)
<
label
for
=
"exampleFormControlFile1"
>
Anexo
do
Parecer
:</
label
>
<
label
for
=
"exampleFormControlFile1"
>
Anexo
do
Parecer
:</
label
>
...
@@ -30,7 +40,7 @@
...
@@ -30,7 +40,7 @@
</
div
>
</
div
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Enviar
</
button
>
<
button
type
=
"submit"
class
=
"btn btn-primary"
>
Enviar
</
button
>
<
a
href
=
"{{ route('avaliador.visualizarTrabalho')
}}"
class
=
"btn btn-danger"
>
Cancelar
</
a
>
<
a
href
=
"{{ route('avaliador.visualizarTrabalho'
, ['evento_id' =>
$evento->id
]
)}}"
class
=
"btn btn-danger"
>
Cancelar
</
a
>
</
form
>
</
form
>
</
div
>
</
div
>
...
...
routes/web.php
View file @
fb517551
...
@@ -24,6 +24,7 @@ Route::prefix('avaliador')->name('avaliador.')->group(function(){
...
@@ -24,6 +24,7 @@ Route::prefix('avaliador')->name('avaliador.')->group(function(){
Route
::
get
(
'/index'
,
'AvaliadorController@index'
)
->
name
(
'index'
);
Route
::
get
(
'/index'
,
'AvaliadorController@index'
)
->
name
(
'index'
);
Route
::
get
(
'/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
Route
::
get
(
'/trabalhos'
,
'AvaliadorController@visualizarTrabalhos'
)
->
name
(
'visualizarTrabalho'
);
Route
::
post
(
'/parecer'
,
'AvaliadorController@parecer'
)
->
name
(
'parecer'
);
Route
::
post
(
'/parecer'
,
'AvaliadorController@parecer'
)
->
name
(
'parecer'
);
Route
::
get
(
'/editais'
,
'AvaliadorController@editais'
)
->
name
(
'editais'
);
Route
::
post
(
'/Enviarparecer'
,
'AvaliadorController@enviarParecer'
)
->
name
(
'enviarParecer'
);
Route
::
post
(
'/Enviarparecer'
,
'AvaliadorController@enviarParecer'
)
->
name
(
'enviarParecer'
);
});
});
...
...
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