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
faca512c
Unverified
Commit
faca512c
authored
4 years ago
by
Aline Tenório
Committed by
GitHub
4 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #23 from lmts-ufape/fluxo-participante
Fluxo participante
parents
df0e9928
86534f1e
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
app/Http/Controllers/ParticipanteController.php
+15
-0
app/Http/Controllers/ParticipanteController.php
app/Http/Controllers/TrabalhoController.php
+43
-2
app/Http/Controllers/TrabalhoController.php
app/Participante.php
+3
-0
app/Participante.php
database/migrations/2020_02_05_123115_create_arquivos_table.php
+1
-0
...se/migrations/2020_02_05_123115_create_arquivos_table.php
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
+0
-36
...ations/2020_05_21_020029_create_plano_trabalhos_table.php
database/migrations/2020_05_23_054945_create_participantes_table.php
+2
-0
...grations/2020_05_23_054945_create_participantes_table.php
resources/lang/en/validation.php
+1
-1
resources/lang/en/validation.php
resources/views/administrador/editais.blade.php
+2
-2
resources/views/administrador/editais.blade.php
resources/views/evento/submeterTrabalho.blade.php
+32
-7
resources/views/evento/submeterTrabalho.blade.php
resources/views/participante/editais.blade.php
+0
-70
resources/views/participante/editais.blade.php
resources/views/participante/projetos.blade.php
+72
-0
resources/views/participante/projetos.blade.php
resources/views/projeto/visualizar.blade.php
+207
-0
resources/views/projeto/visualizar.blade.php
routes/web.php
+4
-0
routes/web.php
with
382 additions
and
118 deletions
+382
-118
app/Http/Controllers/ParticipanteController.php
View file @
faca512c
...
...
@@ -3,6 +3,9 @@
namespace
App\Http\Controllers
;
use
Illuminate\Http\Request
;
use
App\Evento
;
use
App\Trabalho
;
use
App\Participante
;
class
ParticipanteController
extends
Controller
{
...
...
@@ -10,4 +13,16 @@ class ParticipanteController extends Controller
return
view
(
'participante.index'
);
}
public
function
edital
(
$id
){
$edital
=
Evento
::
find
(
$id
);
$trabalhosId
=
Trabalho
::
where
(
'evento_id'
,
'='
,
$id
)
->
select
(
'id'
)
->
get
();
$meusTrabalhosId
=
Participante
::
where
(
'user_id'
,
'='
,
Auth
()
->
user
()
->
id
)
->
whereIn
(
'trabalho_id'
,
$trabalhosId
)
->
select
(
'trabalho_id'
)
->
get
();
$projetos
=
Trabalho
::
whereIn
(
'id'
,
$meusTrabalhosId
)
->
get
();
//dd($projetos);
return
view
(
'participante.projetos'
)
->
with
([
'edital'
=>
$edital
,
'projetos'
=>
$projetos
]);
}
}
This diff is collapsed.
Click to expand it.
app/Http/Controllers/TrabalhoController.php
View file @
faca512c
...
...
@@ -105,7 +105,9 @@ class TrabalhoController extends Controller
'nomePlanoTrabalho.*'
=>
[
'required'
,
'string'
],
'anexoProjeto'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoCONSU'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoComiteEtica'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'botao'
=>
[
'required'
],
'anexoComiteEtica'
=>
[
'required_without:justificativaAutorizacaoEtica'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'justificativaAutorizacaoEtica'
=>
[
'required_without:anexoComiteEtica'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoLatterCoordenador'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanilha'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
'anexoPlanoTrabalho.*'
=>
[
'required'
,
'file'
,
'mimes:pdf'
,
'max:2000000'
],
...
...
@@ -228,6 +230,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
...
...
@@ -270,9 +273,30 @@ class TrabalhoController extends Controller
* @param \App\Trabalho $trabalho
* @return \Illuminate\Http\Response
*/
public
function
show
(
Trabalho
$trabalho
)
public
function
show
(
$id
)
{
//
$projeto
=
Trabalho
::
find
(
$id
);
$edital
=
Evento
::
find
(
$projeto
->
evento_id
);
$grandeArea
=
GrandeArea
::
where
(
'id'
,
$projeto
->
grande_area_id
)
->
select
(
'nome'
)
->
first
();
$area
=
Area
::
where
(
'id'
,
$projeto
->
area_id
)
->
select
(
'nome'
)
->
first
();
$subarea
=
Subarea
::
where
(
'id'
,
$projeto
->
sub_area_id
)
->
select
(
'nome'
)
->
first
();
$proponente
=
Proponente
::
find
(
$projeto
->
proponente_id
);
$funcaoParticipantes
=
FuncaoParticipantes
::
all
();
$participantes
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
get
();
$participantesUsersIds
=
Participante
::
where
(
'trabalho_id'
,
$id
)
->
select
(
'user_id'
)
->
get
();
$users
=
User
::
whereIn
(
'id'
,
$participantesUsersIds
)
->
get
();
$arquivos
=
Arquivo
::
where
(
'trabalhoId'
,
$id
)
->
get
();
return
view
(
'projeto.visualizar'
)
->
with
([
'projeto'
=>
$projeto
,
'grandeArea'
=>
$grandeArea
,
'area'
=>
$area
,
'subArea'
=>
$subarea
,
'proponente'
=>
$proponente
,
'edital'
=>
$edital
,
'users'
=>
$users
,
'funcaoParticipantes'
=>
$funcaoParticipantes
,
'participantes'
=>
$participantes
,
'arquivos'
=>
$arquivos
,]);
}
/**
...
...
@@ -439,6 +463,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
...
...
@@ -471,6 +496,7 @@ class TrabalhoController extends Controller
Storage
::
putFileAs
(
$path
,
$file
,
$nome
);
$arquivo
=
new
Arquivo
();
$arquivo
->
titulo
=
$request
->
nomePlanoTrabalho
[
$key
];
$arquivo
->
nome
=
$path
.
$nome
;
$arquivo
->
trabalhoId
=
$trabalho
->
id
;
$arquivo
->
data
=
$mytime
;
...
...
@@ -513,6 +539,16 @@ class TrabalhoController extends Controller
return
redirect
()
->
back
();
}
public
function
excluirParticipante
(
$id
){
$participante
=
Participante
::
where
(
'user_id'
,
Auth
()
->
user
()
->
id
)
->
where
(
'trabalho_id'
,
$id
)
->
first
();
$participante
->
trabalhos
()
->
detach
(
$id
);
$participante
->
delete
();
return
redirect
()
->
back
();
}
public
function
novaVersao
(
Request
$request
){
$mytime
=
Carbon
::
now
(
'America/Recife'
);
$mytime
=
$mytime
->
toDateString
();
...
...
@@ -676,4 +712,9 @@ class TrabalhoController extends Controller
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
anexoPlanilhaPontuacao
);
}
public
function
baixarAnexoJustificativa
(
$id
)
{
$projeto
=
Trabalho
::
find
(
$id
);
return
Storage
::
download
(
$projeto
->
justificativaAutorizacaoEtica
);
}
}
This diff is collapsed.
Click to expand it.
app/Participante.php
View file @
faca512c
...
...
@@ -3,9 +3,12 @@
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
use
Illuminate\Database\Eloquent\SoftDeletes
;
class
Participante
extends
Model
{
use
SoftDeletes
;
protected
$fillable
=
[
'name'
,
'user_id'
,
'trabalho_id'
,
'participante_id'
];
public
function
user
(){
...
...
This diff is collapsed.
Click to expand it.
database/migrations/2020_02_05_123115_create_arquivos_table.php
View file @
faca512c
...
...
@@ -17,6 +17,7 @@ class CreateArquivosTable extends Migration
$table
->
bigIncrements
(
'id'
);
$table
->
timestamps
();
$table
->
string
(
'nome'
);
$table
->
string
(
'titulo'
);
$table
->
integer
(
'versao'
)
->
nullable
();
$table
->
boolean
(
'versaoFinal'
)
->
nullable
();
$table
->
date
(
'data'
)
->
nullable
();
...
...
This diff is collapsed.
Click to expand it.
database/migrations/2020_05_21_020029_create_plano_trabalhos_table.php
deleted
100644 → 0
View file @
df0e9928
<?php
use
Illuminate\Database\Migrations\Migration
;
use
Illuminate\Database\Schema\Blueprint
;
use
Illuminate\Support\Facades\Schema
;
class
CreatePlanoTrabalhosTable
extends
Migration
{
/**
* Run the migrations.
*
* @return void
*/
public
function
up
()
{
Schema
::
create
(
'plano_trabalhos'
,
function
(
Blueprint
$table
)
{
$table
->
bigIncrements
(
'id'
);
$table
->
string
(
'titulo'
);
$table
->
string
(
'anexoPlanoTrabalho'
);
$table
->
timestamps
();
$table
->
unsignedBigInteger
(
'trabalho_id'
);
$table
->
foreign
(
'trabalho_id'
)
->
references
(
'id'
)
->
on
(
'trabalhos'
);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public
function
down
()
{
Schema
::
dropIfExists
(
'plano_trabalhos'
);
}
}
This diff is collapsed.
Click to expand it.
database/migrations/2020_05_23_054945_create_participantes_table.php
View file @
faca512c
...
...
@@ -25,6 +25,8 @@ class CreateParticipantesTable extends Migration
$table
->
unsignedBigInteger
(
'funcao_participante_id'
)
->
nullable
();
$table
->
foreign
(
'funcao_participante_id'
)
->
references
(
'id'
)
->
on
(
'funcao_participantes'
);
$table
->
softDeletes
();
});
}
...
...
This diff is collapsed.
Click to expand it.
resources/lang/en/validation.php
View file @
faca512c
...
...
@@ -61,7 +61,7 @@ return [
'required_unless'
=>
'O :attribute é necessário a menos que :other esteja em :values.'
,
'required_with'
=>
'O campo é obrigatório.'
,
'required_with_all'
=>
'O campo :attribute é obrigatório quando :values estão presentes.'
,
'required_without'
=>
'O campo
:attribute
é obrigatório
quando :values não está presente
.'
,
'required_without'
=>
'O campo é obrigatório.'
,
'required_without_all'
=>
'O campo :attribute é obrigatório quando nenhum destes estão presentes: :values.'
,
'same'
=>
':Attribute e :other devem ser iguais.'
,
'size'
=>
[
...
...
This diff is collapsed.
Click to expand it.
resources/views/administrador/editais.blade.php
View file @
faca512c
...
...
@@ -167,8 +167,8 @@
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('p
rojetos
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetid
os
<
a
href
=
"{{ route('p
articipante
.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Meus
projet
os
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
...
...
This diff is collapsed.
Click to expand it.
resources/views/evento/submeterTrabalho.blade.php
View file @
faca512c
...
...
@@ -177,19 +177,26 @@
<div class="
col
-
sm
-
6
">
<label for="
nomeTrabalh
o
" class="
col
-
form
-
label
">{{ __('Possui autorização do Comitê de Ética*:') }}</label>
<label for="
bota
o
" class="
col
-
form
-
label
@
error
(
'botao'
)
is
-
invalid
@
enderror
">{{ __('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
">
<button id="
buttonNao
" class="
btn
btn
-
primary
mt
-
2
mb
-
2
">Não</button>
<
input type="
hidden
" id="
botao
" name="
botao
" value="
">
@error('botao')
<span id="
botao
" class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
inline
">
<strong>{{
$message
}}</strong>
</span>
@enderror
<div class="
input
-
group
">
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'anexoComiteEtica'
)
is
-
invalid
@
enderror
" id="
inputEtica
" aria-describedby="
inputGroupFileAddon01
" name="
anexoComiteEtica
">
<input
disabled
type="
file
" class="
custom
-
file
-
input
@
error
(
'anexoComiteEtica'
)
is
-
invalid
@
enderror
" id="
inputEtica
" 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>
</div>
@error('anexoComiteEtica')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<span
id="
comiteErro
"
class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
none
">
<strong>{{
$message
}}</strong>
</span>
@enderror
...
...
@@ -219,12 +226,12 @@
<div class="
custom
-
file
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'justificativaAutorizacaoEtica'
)
is
-
invalid
@
enderror
" id="
inputJustificativa
" aria-describedby="
inputGroupFileAddon01
" disabled
="
disabled
"
name="
justificativaAutorizacaoEtica
">
<input type="
file
" class="
custom
-
file
-
input
@
error
(
'justificativaAutorizacaoEtica'
)
is
-
invalid
@
enderror
" id="
inputJustificativa
" aria-describedby="
inputGroupFileAddon01
" 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('justificativaAutorizacaoEtica')
<span class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
block
">
<span
id="
justificativaErro
"
class="
invalid
-
feedback
" role="
alert
" style="
overflow
:
visible
;
display
:
none
">
<strong>{{
$message
}}</strong>
</span>
@enderror
...
...
@@ -424,14 +431,32 @@
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
false
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
true
);
exibirErro
(
'comite'
);
});
$
(
'#buttonNao'
)
.
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'#inputEtica'
)
.
prop
(
'disabled'
,
true
);
$
(
'#inputJustificativa'
)
.
prop
(
'disabled'
,
false
);
console
.
log
(
'button nao'
);
exibirErro
(
'justificativa'
);
});
});
function
exibirErro
(
campo
){
console
.
log
(
"o campo "
+
campo
);
var
botao
=
document
.
getElementById
(
'botao'
);
botao
.
value
=
"sim"
;
var
comiteErro
=
document
.
getElementById
(
'comiteErro'
);
var
justificativaErro
=
document
.
getElementById
(
'justificativaErro'
);
if
(
campo
===
'comite'
){
comiteErro
.
style
.
display
=
"block"
;
justificativaErro
.
style
.
display
=
"none"
;
}
else
if
(
campo
===
'justificativa'
){
comiteErro
.
style
.
display
=
"none"
;
justificativaErro
.
style
.
display
=
"block"
;
}
}
// Remover Coautor
function
addModalidade
(
areaId
)
{
...
...
This diff is collapsed.
Click to expand it.
resources/views/participante/editais.blade.php
deleted
100644 → 0
View file @
df0e9928
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Meus
Editais
</
h3
>
</
div
>
</
div
>
</
div
>
<
hr
>
@
if
(
auth
()
->
user
()
->
tipo
===
"participante"
)
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
Edital
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Baixar
edital
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$eventos
as
$evento
)
<
tr
>
<
td
>
<
a
href
=
"{{ route('evento.visualizar',['id'=>
$evento->id
]) }}"
class
=
"visualizarEvento"
>
{{
$evento
->
nome
}}
</
a
>
</
td
>
<
td
></
td
>
<
td
>
{{
$evento
->
created_at
}}
</
td
>
<
td
style
=
"text-align: center"
>
<
a
href
=
"{{ route('baixar.edital', ['id' =>
$evento->id
]) }}"
>
<
img
src
=
"
{
{asset('img/icons/file-download-solid.svg')}
}
"
width
=
"15px"
>
</
a
>
</
td
>
<
td
>
<
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"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('projetos.edital', ['id' =>
$evento->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Projetos
submetidos
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Visualizar
resultado
</
a
>
{{
--
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
preeliminar
</
a
>
<
a
href
=
""
class
=
"dropdown-item"
style
=
"text-align: center"
>
Resultado
final
</
a
>
--
}}
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
@
endif
</
div
>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/participante/projetos.blade.php
0 → 100644
View file @
faca512c
@
extends
(
'layouts.app'
)
@
section
(
'content'
)
<
div
class
=
"container"
style
=
"margin-top: 100px;"
>
<
div
class
=
"container"
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-10"
>
<
h3
>
Projetos
do
edital
{{
$edital
->
nome
}}
</
h3
>
<
h6
style
=
"color: rgb(4, 78, 4);"
>
Submissão
irá
até
o
dia
{{
date
(
'd-m-Y'
,
strtotime
(
$edital
->
fimSubmissao
))
}}
</
h6
>
</
div
>
<
div
class
=
"col-sm-2"
>
<!--
Se
usuário
não
é
proponente
,
redirecionar
para
view
de
cadastro
-->
@
if
(
Auth
::
user
()
->
proponentes
==
null
)
<
a
href
=
"{{ route('proponente.create' )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
else
<
a
href
=
"{{ route('trabalho.index', ['id' =>
$edital->id
] )}}"
class
=
"btn btn-primary"
>
Criar
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
div
>
<
hr
>
<
table
class
=
"table table-bordered"
>
<
thead
>
<
tr
>
<
th
scope
=
"col"
>
Nome
do
projeto
</
th
>
<
th
scope
=
"col"
>
Status
</
th
>
<
th
scope
=
"col"
>
Data
de
Criação
</
th
>
<
th
scope
=
"col"
>
Opção
</
th
>
</
tr
>
</
thead
>
<
tbody
>
@
foreach
(
$projetos
as
$projeto
)
<
tr
>
<
td
>
{{
$projeto
->
titulo
}}
</
td
>
@
if
(
$projeto
->
status
==
'Avaliado'
)
<
td
style
=
"color: rgb(6, 85, 6)"
>
Avaliado
</
td
>
@
elseif
(
$projeto
->
status
==
'Submetido'
)
<
td
style
=
"color: rgb(0, 0, 0)"
>
Submetido
</
td
>
@
endif
<
td
>
{{
date
(
'd-m-Y'
,
strtotime
(
$projeto
->
updated_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"
>
<
img
src
=
"
{
{asset('img/icons/ellipsis-v-solid.svg')}
}
"
style
=
"width:8px"
>
</
a
>
<
div
class
=
"dropdown-menu"
>
<
a
href
=
"{{ route('trabalho.show', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center;"
>
Visualizar
projeto
</
a
>
@
if
(
$projeto
->
status
==
'Submetido'
)
<
a
href
=
"{{ route('trabalho.excluirParticipante', ['id' =>
$projeto->id
]) }}"
class
=
"dropdown-item"
style
=
"text-align: center"
>
Sair
do
projeto
</
a
>
@
endif
</
div
>
</
div
>
</
td
>
</
tr
>
@
endforeach
</
tbody
>
</
table
>
</
div
>
@
endsection
@
section
(
'javascript'
)
<
script
>
</
script
>
@
endsection
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/projeto/visualizar.blade.php
0 → 100644
View file @
faca512c
@
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"
>
Visualizar
Projeto
</
h5
>
<
p
class
=
"card-text"
>
<
input
type
=
"hidden"
name
=
"editalId"
value
=
"{{
$edital->id
}}"
>
{{
--
Nome
do
Projeto
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-12"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Nome do Projeto:'
)
}}
</
label
>
<
span
id
=
"nomeTrabalho"
class
=
"form-control"
name
=
"nomeProjeto"
>
{{
$projeto
->
titulo
}}
</
span
>
</
div
>
</
div
>
{{
--
Grande
Area
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"grandeArea"
class
=
"col-form-label"
>
{{
__
(
'Grande Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"grandeArea"
name
=
"grandeArea"
>
{{
$grandeArea
->
nome
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"area"
class
=
"col-form-label"
>
{{
__
(
'Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"area"
name
=
"area"
>
{{
$area
->
nome
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
for
=
"subArea"
class
=
"col-form-label"
>
{{
__
(
'Sub Área:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"subArea"
name
=
"subArea"
>
{{
$subArea
->
nome
}}
</
span
>
</
div
>
</
div
>
<
hr
>
<
h3
>
Coordenador
</
h3
>
{{
--
Coordenador
--
}}
<
div
class
=
"row justify-content-center"
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeCoordenador"
class
=
"col-form-label"
>
{{
__
(
'Coordenador:'
)
}}
</
label
>
<
span
class
=
"form-control"
id
=
"nomeCoordenador"
name
=
"nomeCoordenador"
disabled
>
{{
$proponente
->
user
->
name
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
Link
Lattes
do
Proponente
</
label
>
<
span
class
=
"form-control"
name
=
"linkLattesEstudante"
>
@
if
(
$proponente
->
linkLattes
!=
null
)
{{
$proponente
->
linkLattes
}}
@
endif
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Pontuação da Planilha de Pontuação :'
)
}}
</
label
>
<
span
class
=
"form-control"
name
=
"pontuacaoPlanilha"
>
{{
$projeto
->
pontuacaoPlanilha
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Link do grupo de pesquisa:'
)
}}
</
label
>
<
span
class
=
"form-control"
name
=
"linkGrupo"
>
{{
$projeto
->
linkGrupoPesquisa
}}
</
span
>
</
div
>
</
div
>
<
hr
>
<
h3
>
Anexos
</
h3
>
{{
--
Anexo
do
Projeto
--
}}
<
div
class
=
"row justify-content-center"
>
{{
--
Arquivo
--
}}
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoProjeto"
class
=
"col-form-label"
>
{{
__
(
'Anexo Projeto: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.anexo.projeto', ['id' =>
$projeto->id
])}}"
>
Arquivo
atual
</
a
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoLatterCoordenador"
class
=
"col-form-label"
>
{{
__
(
'Anexo do Lattes do Coordenador: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.anexo.lattes', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Autorização do Comitê de Ética: '
)
}}
</
label
>
@
if
(
$projeto
->
anexoAutorizacaoComiteEtica
!=
null
)
<
a
href
=
"{{ route('baixar.anexo.comite', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
@
else
-
@
endif
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoPlanilha"
class
=
"col-form-label"
>
{{
__
(
'Anexo do Planilha de Pontuação: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.anexo.planilha', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
</
div
>
<
div
class
=
"col-sm-6"
>
<
label
for
=
"nomeTrabalho"
class
=
"col-form-label"
>
{{
__
(
'Justificativa: '
)
}}
</
label
>
@
if
(
$projeto
->
justificativaAutorizacaoEtica
!=
null
)
<
a
href
=
"{{ route('baixar.anexo.justificativa', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
@
else
-
@
endif
</
div
>
@
if
(
$edital
->
tipo
==
'PIBIC'
||
$edital
->
tipo
==
'PIBIC-EM'
)
{{
--
Decisão
do
CONSU
--
}}
<
div
class
=
"col-sm-6"
>
<
label
for
=
"anexoCONSU"
class
=
"col-form-label"
>
{{
__
(
'Decisão do CONSU: '
)
}}
</
label
>
<
a
href
=
"{{ route('baixar.anexo.consu', ['id' =>
$projeto->id
]) }}"
>
Arquivo
atual
</
a
>
</
div
>
@
endif
</
div
>
<
hr
>
<
h4
>
Participantes
</
h4
>
{{
--
Participantes
--
}}
<
div
class
=
"row"
style
=
"margin-top:20px"
>
<
div
class
=
"col-sm-12"
>
<
div
id
=
"participantes"
>
@
foreach
(
$participantes
as
$participante
)
@
foreach
(
$users
as
$user
)
@
if
(
$participante
->
user_id
===
$user
->
id
)
<
div
id
=
"novoParticipante"
>
<
br
>
<
h5
>
Dados
do
participante
</
h5
>
<
div
class
=
"row"
>
<
div
class
=
"col-sm-5"
>
<
label
>
Nome
Completo
</
label
>
<
span
style
=
"margin-bottom:10px"
class
=
"form-control"
name
=
"nomeParticipante[]"
>
{{
$user
->
name
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-4"
>
<
label
>
E
-
mail
</
label
>
<
span
style
=
"margin-bottom:10px"
class
=
"form-control"
name
=
"emailParticipante[]"
>
{{
$user
->
email
}}
</
span
>
</
div
>
<
div
class
=
"col-sm-3"
>
<
label
>
Função
:</
label
>
<
select
disabled
class
=
"form-control"
name
=
"funcaoParticipante[]"
id
=
"funcaoParticipante"
>
<
option
value
=
""
disabled
selected
hidden
>--
Função
--</
option
>
@
foreach
(
$funcaoParticipantes
as
$funcaoParticipante
)
@
if
(
$funcaoParticipante
->
id
===
$participante
->
funcao_participante_id
)
<
option
value
=
"
{
{$funcaoParticipante->id}
}
"
selected
>
{{
$funcaoParticipante
->
nome
}}
</
option
>
@
else
<
option
value
=
"
{
{$funcaoParticipante->id}}">{{$funcaoParticipante->nome}
}
</option>
@endif
@endforeach
</select>
</div>
</div>
<h5>Dados do plano de trabalho</h5>
@foreach(
$arquivos
as
$arquivo
)
@if(
$arquivo->participanteId
===
$participante->id
)
<div class="
row
">
<div class="
col
-
sm
-
12
">
<div id="
planoTrabalho
">
<div class="
row
">
<div class="
col
-
sm
-
4
">
<label>Titulo </label>
<span style="
margin
-
bottom
:
10
px
" class="
form
-
control
" name="
nomePlanoTrabalho
[]
">
{
{$arquivo->titulo}
}
</span>
</div>
{{-- Arquivo --}}
<div class="
col
-
sm
-
7
">
<label for="
nomeTrabalho
">Anexo</label>
<p>
<a href="
{{
route
(
'baixar.plano'
,
[
'id'
=>
$arquivo
->
id
])
}}
">Plano de trabalho atual</a>
</p>
</div>
</div>
</div>
</div>
</div>
@endif
@endforeach
</div>
@endif
@endforeach
@endforeach
</div>
</div>
</div>
</p>
<div class="
row
justify
-
content
-
center
">
<div class="
col
-
md
-
12
">
<a href="
{{
route
(
'participante.edital'
,[
'id'
=>
$edital
->
id
])}}
" class="
btn
btn
-
secondary
" style="
width
:
100
%
">Voltar</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
faca512c
...
...
@@ -35,6 +35,7 @@ Route::post('/proponente/cadastro', 'ProponenteController@store'
//######### Participante ########################################
Route
::
get
(
'/participante/index'
,
'ParticipanteController@index'
)
->
name
(
'participante.index'
);
Route
::
get
(
'/participante/edital/{id}'
,
'ParticipanteController@edital'
)
->
name
(
'participante.edital'
);
//######### Rotas Administrador #################################
Route
::
get
(
'/perfil-usuario'
,
'UserController@minhaConta'
)
->
middleware
(
'auth'
)
->
name
(
'user.perfil'
);
...
...
@@ -88,12 +89,14 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
//######### Trabalho ########################################
Route
::
get
(
'/trabalho/submeter/{id}'
,
'TrabalhoController@index'
)
->
name
(
'trabalho.index'
);
Route
::
get
(
'/trabalho/visualizar/{id}'
,
'TrabalhoController@show'
)
->
name
(
'trabalho.show'
);
Route
::
post
(
'/trabalho/novaVersao'
,
'TrabalhoController@novaVersao'
)
->
name
(
'trabalho.novaVersao'
);
Route
::
post
(
'/trabalho/criar'
,
'TrabalhoController@store'
)
->
name
(
'trabalho.store'
);
Route
::
get
(
'/edital/{id}/projetos'
,
'TrabalhoController@projetosDoEdital'
)
->
name
(
'projetos.edital'
);
Route
::
get
(
'/projeto/{id}/editar'
,
'TrabalhoController@edit'
)
->
name
(
'trabalho.editar'
);
Route
::
post
(
'/projeto/{id}/atualizar'
,
'TrabalhoController@update'
)
->
name
(
'trabalho.update'
);
Route
::
get
(
'/projeto/{id}/excluir'
,
'TrabalhoController@destroy'
)
->
name
(
'trabalho.destroy'
);
Route
::
get
(
'/projeto/{id}/excluirParticipante'
,
'TrabalhoController@excluirParticipante'
)
->
name
(
'trabalho.excluirParticipante'
);
//######### Atribuição #######################################
Route
::
get
(
'/atribuir'
,
'AtribuicaoController@distribuicaoAutomatica'
)
->
name
(
'distribuicao'
);
...
...
@@ -112,6 +115,7 @@ Route::group(['middleware' => ['isTemp', 'auth', 'verified']], function(){
Route
::
get
(
'/baixar/anexo-projeto/{id}'
,
'TrabalhoController@baixarAnexoProjeto'
)
->
name
(
'baixar.anexo.projeto'
);
Route
::
get
(
'/baixar/anexo-consu/{id}'
,
'TrabalhoController@baixarAnexoConsu'
)
->
name
(
'baixar.anexo.consu'
);
Route
::
get
(
'/baixar/anexo-comite/{id}'
,
'TrabalhoController@baixarAnexoComite'
)
->
name
(
'baixar.anexo.comite'
);
Route
::
get
(
'/baixar/anexo-justificativa/{id}'
,
'TrabalhoController@baixarAnexoJustificativa'
)
->
name
(
'baixar.anexo.justificativa'
);
Route
::
get
(
'/baixar/anexo-lattes/{id}'
,
'TrabalhoController@baixarAnexoLattes'
)
->
name
(
'baixar.anexo.lattes'
);
Route
::
get
(
'/baixar/anexo-planilha/{id}'
,
'TrabalhoController@baixarAnexoPlanilha'
)
->
name
(
'baixar.anexo.planilha'
);
Route
::
get
(
'/baixar/plano-de-trabalho/{id}'
,
'ArquivoController@baixarPlano'
)
->
name
(
'baixar.plano'
);
...
...
This diff is collapsed.
Click to expand it.
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